class jdk.internal.jimage.ImageBufferCache
  minor version: 0
  major version: 59
  flags: flags: (0x0020) ACC_SUPER
  this_class: jdk.internal.jimage.ImageBufferCache
  super_class: java.lang.Object
{
  private static final int MAX_CACHED_BUFFERS;
    descriptor: I
    flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
    ConstantValue: 3

  private static final int LARGE_BUFFER;
    descriptor: I
    flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
    ConstantValue: 65536

  private static final java.lang.ThreadLocal<jdk.internal.jimage.ImageBufferCache$BufferReference[]> CACHE;
    descriptor: Ljava/lang/ThreadLocal;
    flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
    Signature: Ljava/lang/ThreadLocal<[Ljdk/internal/jimage/ImageBufferCache$BufferReference;>;

  private static java.util.Comparator<jdk.internal.jimage.ImageBufferCache$BufferReference> DECREASING_CAPACITY_NULLS_LAST;
    descriptor: Ljava/util/Comparator;
    flags: (0x000a) ACC_PRIVATE, ACC_STATIC
    Signature: Ljava/util/Comparator<Ljdk/internal/jimage/ImageBufferCache$BufferReference;>;

  static void <clinit>();
    descriptor: ()V
    flags: (0x0008) ACC_STATIC
    Code:
      stack=2, locals=0, args_size=0
         0: .line 43
            new jdk.internal.jimage.ImageBufferCache$1
            dup
            invokespecial jdk.internal.jimage.ImageBufferCache$1.<init>:()V
         1: .line 42
            putstatic jdk.internal.jimage.ImageBufferCache.CACHE:Ljava/lang/ThreadLocal;
         2: .line 117
            new jdk.internal.jimage.ImageBufferCache$2
            dup
            invokespecial jdk.internal.jimage.ImageBufferCache$2.<init>:()V
         3: .line 116
            putstatic jdk.internal.jimage.ImageBufferCache.DECREASING_CAPACITY_NULLS_LAST:Ljava/util/Comparator;
         4: .line 123
            return
      LocalVariableTable:
        Start  End  Slot  Name  Signature

  void <init>();
    descriptor: ()V
    flags: (0x0000) 
    Code:
      stack=1, locals=1, args_size=1
        start local 0 // jdk.internal.jimage.ImageBufferCache this
         0: .line 39
            aload 0 /* this */
            invokespecial java.lang.Object.<init>:()V
            return
        end local 0 // jdk.internal.jimage.ImageBufferCache this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0  this  Ljdk/internal/jimage/ImageBufferCache;

  private static java.nio.ByteBuffer allocateBuffer(long);
    descriptor: (J)Ljava/nio/ByteBuffer;
    flags: (0x000a) ACC_PRIVATE, ACC_STATIC
    Code:
      stack=4, locals=2, args_size=1
        start local 0 // long size
         0: .line 52
            lload 0 /* size */
            ldc 4095
            ladd
            ldc -4096
            land
            l2i
            invokestatic java.nio.ByteBuffer.allocateDirect:(I)Ljava/nio/ByteBuffer;
            areturn
        end local 0 // long size
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0  size  J
    MethodParameters:
      Name  Flags
      size  

  static java.nio.ByteBuffer getBuffer(long);
    descriptor: (J)Ljava/nio/ByteBuffer;
    flags: (0x0008) ACC_STATIC
    Code:
      stack=4, locals=7, args_size=1
        start local 0 // long size
         0: .line 56
            lload 0 /* size */
            lconst_0
            lcmp
            iflt 1
            ldc 2147483647
            lload 0 /* size */
            lcmp
            ifge 2
         1: .line 57
      StackMap locals:
      StackMap stack:
            new java.lang.IndexOutOfBoundsException
            dup
            ldc "size"
            invokespecial java.lang.IndexOutOfBoundsException.<init>:(Ljava/lang/String;)V
            athrow
         2: .line 60
      StackMap locals:
      StackMap stack:
            aconst_null
            astore 2 /* result */
        start local 2 // java.nio.ByteBuffer result
         3: .line 62
            lload 0 /* size */
            ldc 65536
            lcmp
            ifle 6
         4: .line 63
            lload 0 /* size */
            invokestatic jdk.internal.jimage.ImageBufferCache.allocateBuffer:(J)Ljava/nio/ByteBuffer;
            astore 2 /* result */
         5: .line 64
            goto 21
         6: .line 65
      StackMap locals: java.nio.ByteBuffer
      StackMap stack:
            getstatic jdk.internal.jimage.ImageBufferCache.CACHE:Ljava/lang/ThreadLocal;
            invokevirtual java.lang.ThreadLocal.get:()Ljava/lang/Object;
            checkcast jdk.internal.jimage.ImageBufferCache$BufferReference[]
            astore 3 /* cache */
        start local 3 // jdk.internal.jimage.ImageBufferCache$BufferReference[] cache
         7: .line 69
            iconst_2
            istore 4 /* i */
        start local 4 // int i
         8: goto 18
         9: .line 70
      StackMap locals: jdk.internal.jimage.ImageBufferCache$BufferReference[] int
      StackMap stack:
            aload 3 /* cache */
            iload 4 /* i */
            aaload
            astore 5 /* reference */
        start local 5 // jdk.internal.jimage.ImageBufferCache$BufferReference reference
        10: .line 72
            aload 5 /* reference */
            ifnull 17
        11: .line 73
            aload 5 /* reference */
            invokevirtual jdk.internal.jimage.ImageBufferCache$BufferReference.get:()Ljava/lang/Object;
            checkcast java.nio.ByteBuffer
            astore 6 /* buffer */
        start local 6 // java.nio.ByteBuffer buffer
        12: .line 75
            aload 6 /* buffer */
            ifnull 17
            lload 0 /* size */
            aload 6 /* buffer */
            invokevirtual java.nio.ByteBuffer.capacity:()I
            i2l
            lcmp
            ifgt 17
        13: .line 76
            aload 3 /* cache */
            iload 4 /* i */
            aconst_null
            aastore
        14: .line 77
            aload 6 /* buffer */
            astore 2 /* result */
        15: .line 78
            aload 2 /* result */
            invokevirtual java.nio.ByteBuffer.rewind:()Ljava/nio/ByteBuffer;
            pop
        16: .line 79
            goto 19
        end local 6 // java.nio.ByteBuffer buffer
        end local 5 // jdk.internal.jimage.ImageBufferCache$BufferReference reference
        17: .line 69
      StackMap locals:
      StackMap stack:
            iinc 4 /* i */ -1
      StackMap locals:
      StackMap stack:
        18: iload 4 /* i */
            ifge 9
        end local 4 // int i
        19: .line 84
      StackMap locals:
      StackMap stack:
            aload 2 /* result */
            ifnonnull 21
        20: .line 85
            lload 0 /* size */
            invokestatic jdk.internal.jimage.ImageBufferCache.allocateBuffer:(J)Ljava/nio/ByteBuffer;
            astore 2 /* result */
        end local 3 // jdk.internal.jimage.ImageBufferCache$BufferReference[] cache
        21: .line 89
      StackMap locals:
      StackMap stack:
            aload 2 /* result */
            lload 0 /* size */
            l2i
            invokevirtual java.nio.ByteBuffer.limit:(I)Ljava/nio/ByteBuffer;
            pop
        22: .line 91
            aload 2 /* result */
            areturn
        end local 2 // java.nio.ByteBuffer result
        end local 0 // long size
      LocalVariableTable:
        Start  End  Slot       Name  Signature
            0   23     0       size  J
            3   23     2     result  Ljava/nio/ByteBuffer;
            7   21     3      cache  [Ljdk/internal/jimage/ImageBufferCache$BufferReference;
            8   19     4          i  I
           10   17     5  reference  Ljdk/internal/jimage/ImageBufferCache$BufferReference;
           12   17     6     buffer  Ljava/nio/ByteBuffer;
    MethodParameters:
      Name  Flags
      size  

  static void releaseBuffer(java.nio.ByteBuffer);
    descriptor: (Ljava/nio/ByteBuffer;)V
    flags: (0x0008) ACC_STATIC
    Code:
      stack=5, locals=4, args_size=1
        start local 0 // java.nio.ByteBuffer buffer
         0: .line 95
            aload 0 /* buffer */
            invokevirtual java.nio.ByteBuffer.capacity:()I
            ldc 65536
            if_icmple 2
         1: .line 96
            return
         2: .line 99
      StackMap locals:
      StackMap stack:
            getstatic jdk.internal.jimage.ImageBufferCache.CACHE:Ljava/lang/ThreadLocal;
            invokevirtual java.lang.ThreadLocal.get:()Ljava/lang/Object;
            checkcast jdk.internal.jimage.ImageBufferCache$BufferReference[]
            astore 1 /* cache */
        start local 1 // jdk.internal.jimage.ImageBufferCache$BufferReference[] cache
         3: .line 102
            iconst_0
            istore 2 /* i */
        start local 2 // int i
         4: goto 9
         5: .line 103
      StackMap locals: jdk.internal.jimage.ImageBufferCache$BufferReference[] int
      StackMap stack:
            aload 1 /* cache */
            iload 2 /* i */
            aaload
            astore 3 /* reference */
        start local 3 // jdk.internal.jimage.ImageBufferCache$BufferReference reference
         6: .line 104
            aload 3 /* reference */
            ifnull 8
            aload 3 /* reference */
            invokevirtual jdk.internal.jimage.ImageBufferCache$BufferReference.get:()Ljava/lang/Object;
            ifnonnull 8
         7: .line 105
            aload 1 /* cache */
            iload 2 /* i */
            aconst_null
            aastore
        end local 3 // jdk.internal.jimage.ImageBufferCache$BufferReference reference
         8: .line 102
      StackMap locals:
      StackMap stack:
            iinc 2 /* i */ 1
      StackMap locals:
      StackMap stack:
         9: iload 2 /* i */
            iconst_3
            if_icmplt 5
        end local 2 // int i
        10: .line 110
            aload 1 /* cache */
            iconst_3
            new jdk.internal.jimage.ImageBufferCache$BufferReference
            dup
            aload 0 /* buffer */
            invokespecial jdk.internal.jimage.ImageBufferCache$BufferReference.<init>:(Ljava/nio/ByteBuffer;)V
            aastore
        11: .line 111
            aload 1 /* cache */
            getstatic jdk.internal.jimage.ImageBufferCache.DECREASING_CAPACITY_NULLS_LAST:Ljava/util/Comparator;
            invokestatic java.util.Arrays.sort:([Ljava/lang/Object;Ljava/util/Comparator;)V
        12: .line 113
            aload 1 /* cache */
            iconst_3
            aconst_null
            aastore
        13: .line 114
            return
        end local 1 // jdk.internal.jimage.ImageBufferCache$BufferReference[] cache
        end local 0 // java.nio.ByteBuffer buffer
      LocalVariableTable:
        Start  End  Slot       Name  Signature
            0   14     0     buffer  Ljava/nio/ByteBuffer;
            3   14     1      cache  [Ljdk/internal/jimage/ImageBufferCache$BufferReference;
            4   10     2          i  I
            6    8     3  reference  Ljdk/internal/jimage/ImageBufferCache$BufferReference;
    MethodParameters:
        Name  Flags
      buffer  
}
SourceFile: "ImageBufferCache.java"
NestMembers:
  jdk.internal.jimage.ImageBufferCache$1  jdk.internal.jimage.ImageBufferCache$2  jdk.internal.jimage.ImageBufferCache$BufferReference
InnerClasses:
  jdk.internal.jimage.ImageBufferCache$1
  jdk.internal.jimage.ImageBufferCache$2
  private BufferReference = jdk.internal.jimage.ImageBufferCache$BufferReference of jdk.internal.jimage.ImageBufferCache