class jdk.internal.foreign.MemoryScope$SharedScope extends jdk.internal.foreign.MemoryScope
  minor version: 0
  major version: 59
  flags: flags: (0x0020) ACC_SUPER
  this_class: jdk.internal.foreign.MemoryScope$SharedScope
  super_class: jdk.internal.foreign.MemoryScope
{
  static jdk.internal.misc.ScopedMemoryAccess SCOPED_MEMORY_ACCESS;
    descriptor: Ljdk/internal/misc/ScopedMemoryAccess;
    flags: (0x0008) ACC_STATIC

  static final int ALIVE;
    descriptor: I
    flags: (0x0018) ACC_STATIC, ACC_FINAL
    ConstantValue: 0

  static final int CLOSING;
    descriptor: I
    flags: (0x0018) ACC_STATIC, ACC_FINAL
    ConstantValue: 1

  static final int CLOSED;
    descriptor: I
    flags: (0x0018) ACC_STATIC, ACC_FINAL
    ConstantValue: 2

  int state;
    descriptor: I
    flags: (0x0000) 

  private static final java.lang.invoke.VarHandle STATE;
    descriptor: Ljava/lang/invoke/VarHandle;
    flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL

  static void <clinit>();
    descriptor: ()V
    flags: (0x0008) ACC_STATIC
    Code:
      stack=4, locals=1, args_size=0
         0: .line 241
            invokestatic jdk.internal.misc.ScopedMemoryAccess.getScopedMemoryAccess:()Ljdk/internal/misc/ScopedMemoryAccess;
            putstatic jdk.internal.foreign.MemoryScope$SharedScope.SCOPED_MEMORY_ACCESS:Ljdk/internal/misc/ScopedMemoryAccess;
         1: .line 253
            invokestatic java.lang.invoke.MethodHandles.lookup:()Ljava/lang/invoke/MethodHandles$Lookup;
            ldc Ljdk/internal/foreign/MemoryScope$SharedScope;
            ldc "state"
            getstatic java.lang.Integer.TYPE:Ljava/lang/Class;
            invokevirtual java.lang.invoke.MethodHandles$Lookup.findVarHandle:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/invoke/VarHandle;
            putstatic jdk.internal.foreign.MemoryScope$SharedScope.STATE:Ljava/lang/invoke/VarHandle;
         2: .line 254
            goto 5
      StackMap locals:
      StackMap stack: java.lang.Throwable
         3: astore 0 /* ex */
        start local 0 // java.lang.Throwable ex
         4: .line 255
            new java.lang.ExceptionInInitializerError
            dup
            aload 0 /* ex */
            invokespecial java.lang.ExceptionInInitializerError.<init>:(Ljava/lang/Throwable;)V
            athrow
        end local 0 // java.lang.Throwable ex
         5: .line 257
      StackMap locals:
      StackMap stack:
            return
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            4    5     0    ex  Ljava/lang/Throwable;
      Exception table:
        from    to  target  type
           1     2       3  Class java.lang.Throwable

  void <init>(java.lang.Object, java.lang.Runnable, java.lang.ref.Cleaner);
    descriptor: (Ljava/lang/Object;Ljava/lang/Runnable;Ljava/lang/ref/Cleaner;)V
    flags: (0x0000) 
    Code:
      stack=4, locals=4, args_size=4
        start local 0 // jdk.internal.foreign.MemoryScope$SharedScope this
        start local 1 // java.lang.Object ref
        start local 2 // java.lang.Runnable cleanupAction
        start local 3 // java.lang.ref.Cleaner cleaner
         0: .line 260
            aload 0 /* this */
            aload 1 /* ref */
            aload 2 /* cleanupAction */
            aload 3 /* cleaner */
            invokespecial jdk.internal.foreign.MemoryScope.<init>:(Ljava/lang/Object;Ljava/lang/Runnable;Ljava/lang/ref/Cleaner;)V
         1: .line 247
            aload 0 /* this */
            iconst_0
            putfield jdk.internal.foreign.MemoryScope$SharedScope.state:I
         2: .line 261
            return
        end local 3 // java.lang.ref.Cleaner cleaner
        end local 2 // java.lang.Runnable cleanupAction
        end local 1 // java.lang.Object ref
        end local 0 // jdk.internal.foreign.MemoryScope$SharedScope this
      LocalVariableTable:
        Start  End  Slot           Name  Signature
            0    3     0           this  Ljdk/internal/foreign/MemoryScope$SharedScope;
            0    3     1            ref  Ljava/lang/Object;
            0    3     2  cleanupAction  Ljava/lang/Runnable;
            0    3     3        cleaner  Ljava/lang/ref/Cleaner;
    MethodParameters:
               Name  Flags
      ref            
      cleanupAction  
      cleaner        

  public java.lang.Thread ownerThread();
    descriptor: ()Ljava/lang/Thread;
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=1, locals=1, args_size=1
        start local 0 // jdk.internal.foreign.MemoryScope$SharedScope this
         0: .line 265
            aconst_null
            areturn
        end local 0 // jdk.internal.foreign.MemoryScope$SharedScope this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0  this  Ljdk/internal/foreign/MemoryScope$SharedScope;

  public void checkValidState();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=1, locals=1, args_size=1
        start local 0 // jdk.internal.foreign.MemoryScope$SharedScope this
         0: .line 270
            aload 0 /* this */
            getfield jdk.internal.foreign.MemoryScope$SharedScope.state:I
            ifeq 2
         1: .line 271
            getstatic jdk.internal.misc.ScopedMemoryAccess$Scope$ScopedAccessError.INSTANCE:Ljdk/internal/misc/ScopedMemoryAccess$Scope$ScopedAccessError;
            athrow
         2: .line 273
      StackMap locals:
      StackMap stack:
            return
        end local 0 // jdk.internal.foreign.MemoryScope$SharedScope this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    3     0  this  Ljdk/internal/foreign/MemoryScope$SharedScope;

  void justClose();
    descriptor: ()V
    flags: (0x0000) 
    Code:
      stack=4, locals=2, args_size=1
        start local 0 // jdk.internal.foreign.MemoryScope$SharedScope this
         0: .line 276
            getstatic jdk.internal.foreign.MemoryScope$SharedScope.STATE:Ljava/lang/invoke/VarHandle;
            aload 0 /* this */
            iconst_0
            iconst_1
            invokevirtual java.lang.invoke.VarHandle.compareAndSet:(Ljdk/internal/foreign/MemoryScope$SharedScope;II)Z
            ifne 2
         1: .line 277
            new java.lang.IllegalStateException
            dup
            ldc "Already closed"
            invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
            athrow
         2: .line 279
      StackMap locals:
      StackMap stack:
            getstatic jdk.internal.foreign.MemoryScope$SharedScope.SCOPED_MEMORY_ACCESS:Ljdk/internal/misc/ScopedMemoryAccess;
            aload 0 /* this */
            invokevirtual jdk.internal.misc.ScopedMemoryAccess.closeScope:(Ljdk/internal/misc/ScopedMemoryAccess$Scope;)Z
            istore 1 /* success */
        start local 1 // boolean success
         3: .line 280
            getstatic jdk.internal.foreign.MemoryScope$SharedScope.STATE:Ljava/lang/invoke/VarHandle;
            aload 0 /* this */
            iload 1 /* success */
            ifeq 4
            iconst_2
            goto 5
      StackMap locals: jdk.internal.foreign.MemoryScope$SharedScope int
      StackMap stack: java.lang.invoke.VarHandle jdk.internal.foreign.MemoryScope$SharedScope
         4: iconst_0
      StackMap locals: jdk.internal.foreign.MemoryScope$SharedScope int
      StackMap stack: java.lang.invoke.VarHandle jdk.internal.foreign.MemoryScope$SharedScope int
         5: invokevirtual java.lang.invoke.VarHandle.setVolatile:(Ljdk/internal/foreign/MemoryScope$SharedScope;I)V
         6: .line 281
            iload 1 /* success */
            ifne 8
         7: .line 282
            new java.lang.IllegalStateException
            dup
            ldc "Cannot close while another thread is accessing the segment"
            invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
            athrow
         8: .line 284
      StackMap locals:
      StackMap stack:
            return
        end local 1 // boolean success
        end local 0 // jdk.internal.foreign.MemoryScope$SharedScope this
      LocalVariableTable:
        Start  End  Slot     Name  Signature
            0    9     0     this  Ljdk/internal/foreign/MemoryScope$SharedScope;
            3    9     1  success  Z

  public boolean isAlive();
    descriptor: ()Z
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=2, locals=1, args_size=1
        start local 0 // jdk.internal.foreign.MemoryScope$SharedScope this
         0: .line 288
            getstatic jdk.internal.foreign.MemoryScope$SharedScope.STATE:Ljava/lang/invoke/VarHandle;
            aload 0 /* this */
            invokevirtual java.lang.invoke.VarHandle.getVolatile:(Ljdk/internal/foreign/MemoryScope$SharedScope;)I
            iconst_2
            if_icmpeq 1
            iconst_1
            ireturn
      StackMap locals:
      StackMap stack:
         1: iconst_0
            ireturn
        end local 0 // jdk.internal.foreign.MemoryScope$SharedScope this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    2     0  this  Ljdk/internal/foreign/MemoryScope$SharedScope;
}
SourceFile: "MemoryScope.java"
NestHost: jdk.internal.foreign.MemoryScope
InnerClasses:
  public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles
  SharedScope = jdk.internal.foreign.MemoryScope$SharedScope of jdk.internal.foreign.MemoryScope
  public abstract Scope = jdk.internal.misc.ScopedMemoryAccess$Scope of jdk.internal.misc.ScopedMemoryAccess
  public final ScopedAccessError = jdk.internal.misc.ScopedMemoryAccess$Scope$ScopedAccessError of jdk.internal.misc.ScopedMemoryAccess$Scope