public final class jdk.incubator.http.internal.websocket.CooperativeHandler
  minor version: 0
  major version: 59
  flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
  this_class: jdk.incubator.http.internal.websocket.CooperativeHandler
  super_class: java.lang.Object
{
  private static final int OFFLOAD;
    descriptor: I
    flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
    ConstantValue: 1

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

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

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

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

  private final java.util.concurrent.atomic.AtomicInteger state;
    descriptor: Ljava/util/concurrent/atomic/AtomicInteger;
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL

  private final java.util.function.Consumer<java.lang.Runnable> begin;
    descriptor: Ljava/util/function/Consumer;
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL
    Signature: Ljava/util/function/Consumer<Ljava/lang/Runnable;>;

  public void <init>(java.lang.Runnable);
    descriptor: (Ljava/lang/Runnable;)V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=2, locals=2, args_size=2
        start local 0 // jdk.incubator.http.internal.websocket.CooperativeHandler this
        start local 1 // java.lang.Runnable task
         0: .line 110
            aload 0 /* this */
            aload 1 /* task */
            invokestatic jdk.incubator.http.internal.websocket.CooperativeHandler.asyncOf:(Ljava/lang/Runnable;)Ljava/util/function/Consumer;
            invokespecial jdk.incubator.http.internal.websocket.CooperativeHandler.<init>:(Ljava/util/function/Consumer;)V
         1: .line 111
            return
        end local 1 // java.lang.Runnable task
        end local 0 // jdk.incubator.http.internal.websocket.CooperativeHandler this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    2     0  this  Ljdk/incubator/http/internal/websocket/CooperativeHandler;
            0    2     1  task  Ljava/lang/Runnable;
    MethodParameters:
      Name  Flags
      task  

  public void <init>(java.util.function.Consumer<java.lang.Runnable>);
    descriptor: (Ljava/util/function/Consumer;)V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=4, locals=2, args_size=2
        start local 0 // jdk.incubator.http.internal.websocket.CooperativeHandler this
        start local 1 // java.util.function.Consumer begin
         0: .line 113
            aload 0 /* this */
            invokespecial java.lang.Object.<init>:()V
         1: .line 106
            aload 0 /* this */
            new java.util.concurrent.atomic.AtomicInteger
            dup
            bipush 16
            invokespecial java.util.concurrent.atomic.AtomicInteger.<init>:(I)V
            putfield jdk.incubator.http.internal.websocket.CooperativeHandler.state:Ljava/util/concurrent/atomic/AtomicInteger;
         2: .line 114
            aload 0 /* this */
            aload 1 /* begin */
            invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
            checkcast java.util.function.Consumer
            putfield jdk.incubator.http.internal.websocket.CooperativeHandler.begin:Ljava/util/function/Consumer;
         3: .line 115
            return
        end local 1 // java.util.function.Consumer begin
        end local 0 // jdk.incubator.http.internal.websocket.CooperativeHandler this
      LocalVariableTable:
        Start  End  Slot   Name  Signature
            0    4     0   this  Ljdk/incubator/http/internal/websocket/CooperativeHandler;
            0    4     1  begin  Ljava/util/function/Consumer<Ljava/lang/Runnable;>;
    Signature: (Ljava/util/function/Consumer<Ljava/lang/Runnable;>;)V
    MethodParameters:
       Name  Flags
      begin  

  public void handle();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=5, locals=2, args_size=1
        start local 0 // jdk.incubator.http.internal.websocket.CooperativeHandler this
         0: .line 128
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield jdk.incubator.http.internal.websocket.CooperativeHandler.state:Ljava/util/concurrent/atomic/AtomicInteger;
            invokevirtual java.util.concurrent.atomic.AtomicInteger.get:()I
            istore 1 /* s */
        start local 1 // int s
         1: .line 129
            iload 1 /* s */
            bipush 16
            if_icmpne 4
         2: .line 130
            aload 0 /* this */
            getfield jdk.incubator.http.internal.websocket.CooperativeHandler.state:Ljava/util/concurrent/atomic/AtomicInteger;
            bipush 16
            iconst_4
            invokevirtual java.util.concurrent.atomic.AtomicInteger.compareAndSet:(II)Z
            ifeq 0
         3: .line 131
            goto 10
         4: .line 133
      StackMap locals: int
      StackMap stack:
            iload 1 /* s */
            iconst_4
            iand
            ifeq 7
         5: .line 135
            aload 0 /* this */
            getfield jdk.incubator.http.internal.websocket.CooperativeHandler.state:Ljava/util/concurrent/atomic/AtomicInteger;
            iload 1 /* s */
            iconst_2
            iload 1 /* s */
            iconst_1
            iand
            ior
            invokevirtual java.util.concurrent.atomic.AtomicInteger.compareAndSet:(II)Z
            ifeq 0
         6: .line 136
            return
         7: .line 138
      StackMap locals:
      StackMap stack:
            iload 1 /* s */
            iconst_2
            iand
            ifne 8
            iload 1 /* s */
            bipush 8
            if_icmpne 9
         8: .line 139
      StackMap locals:
      StackMap stack:
            return
         9: .line 141
      StackMap locals:
      StackMap stack:
            new java.lang.InternalError
            dup
            iload 1 /* s */
            invokestatic java.lang.String.valueOf:(I)Ljava/lang/String;
            invokespecial java.lang.InternalError.<init>:(Ljava/lang/String;)V
            athrow
        end local 1 // int s
        10: .line 144
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield jdk.incubator.http.internal.websocket.CooperativeHandler.begin:Ljava/util/function/Consumer;
            aload 0 /* this */
            invokedynamic run(Ljdk/incubator/http/internal/websocket/CooperativeHandler;)Ljava/lang/Runnable;
              Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
                Method arguments:
                  ()V
                  jdk/incubator/http/internal/websocket/CooperativeHandler.tryEnd()V (7)
                  ()V
            invokeinterface java.util.function.Consumer.accept:(Ljava/lang/Object;)V
        11: .line 145
            return
        end local 0 // jdk.incubator.http.internal.websocket.CooperativeHandler this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0   12     0  this  Ljdk/incubator/http/internal/websocket/CooperativeHandler;
            1   10     1     s  I

  private void tryEnd();
    descriptor: ()V
    flags: (0x0002) ACC_PRIVATE
    Code:
      stack=4, locals=2, args_size=1
        start local 0 // jdk.incubator.http.internal.websocket.CooperativeHandler this
         0: .line 150
            goto 3
        start local 1 // int s
         1: .line 152
      StackMap locals: int
      StackMap stack:
            aload 0 /* this */
            getfield jdk.incubator.http.internal.websocket.CooperativeHandler.state:Ljava/util/concurrent/atomic/AtomicInteger;
            iload 1 /* s */
            iload 1 /* s */
            bipush -2
            iand
            invokevirtual java.util.concurrent.atomic.AtomicInteger.compareAndSet:(II)Z
            ifeq 3
         2: .line 153
            return
        end local 1 // int s
         3: .line 150
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield jdk.incubator.http.internal.websocket.CooperativeHandler.state:Ljava/util/concurrent/atomic/AtomicInteger;
            invokevirtual java.util.concurrent.atomic.AtomicInteger.get:()I
            dup
            istore 1 /* s */
        start local 1 // int s
         4: iconst_1
            iand
            ifne 1
         5: .line 157
      StackMap locals: int
      StackMap stack:
            iload 1 /* s */
            iconst_4
            if_icmpne 8
         6: .line 158
            aload 0 /* this */
            getfield jdk.incubator.http.internal.websocket.CooperativeHandler.state:Ljava/util/concurrent/atomic/AtomicInteger;
            iconst_4
            bipush 16
            invokevirtual java.util.concurrent.atomic.AtomicInteger.compareAndSet:(II)Z
            ifeq 14
         7: .line 159
            return
         8: .line 161
      StackMap locals:
      StackMap stack:
            iload 1 /* s */
            iconst_2
            if_icmpne 11
         9: .line 162
            aload 0 /* this */
            getfield jdk.incubator.http.internal.websocket.CooperativeHandler.state:Ljava/util/concurrent/atomic/AtomicInteger;
            iconst_2
            iconst_5
            invokevirtual java.util.concurrent.atomic.AtomicInteger.compareAndSet:(II)Z
            ifeq 14
        10: .line 163
            goto 16
        11: .line 165
      StackMap locals:
      StackMap stack:
            iload 1 /* s */
            bipush 8
            if_icmpne 13
        12: .line 166
            return
        13: .line 168
      StackMap locals:
      StackMap stack:
            new java.lang.InternalError
            dup
            iload 1 /* s */
            invokestatic java.lang.String.valueOf:(I)Ljava/lang/String;
            invokespecial java.lang.InternalError.<init>:(Ljava/lang/String;)V
            athrow
        14: .line 170
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield jdk.incubator.http.internal.websocket.CooperativeHandler.state:Ljava/util/concurrent/atomic/AtomicInteger;
            invokevirtual java.util.concurrent.atomic.AtomicInteger.get:()I
            istore 1 /* s */
        15: .line 156
            goto 5
        16: .line 172
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield jdk.incubator.http.internal.websocket.CooperativeHandler.begin:Ljava/util/function/Consumer;
            aload 0 /* this */
            invokedynamic run(Ljdk/incubator/http/internal/websocket/CooperativeHandler;)Ljava/lang/Runnable;
              Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
                Method arguments:
                  ()V
                  jdk/incubator/http/internal/websocket/CooperativeHandler.tryEnd()V (7)
                  ()V
            invokeinterface java.util.function.Consumer.accept:(Ljava/lang/Object;)V
        end local 1 // int s
        17: .line 148
            goto 3
        end local 0 // jdk.incubator.http.internal.websocket.CooperativeHandler this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0   18     0  this  Ljdk/incubator/http/internal/websocket/CooperativeHandler;
            1    3     1     s  I
            4   17     1     s  I

  public boolean isStopped();
    descriptor: ()Z
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=2, locals=1, args_size=1
        start local 0 // jdk.incubator.http.internal.websocket.CooperativeHandler this
         0: .line 187
            aload 0 /* this */
            getfield jdk.incubator.http.internal.websocket.CooperativeHandler.state:Ljava/util/concurrent/atomic/AtomicInteger;
            invokevirtual java.util.concurrent.atomic.AtomicInteger.get:()I
            bipush 8
            if_icmpne 1
            iconst_1
            ireturn
      StackMap locals:
      StackMap stack:
         1: iconst_0
            ireturn
        end local 0 // jdk.incubator.http.internal.websocket.CooperativeHandler this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    2     0  this  Ljdk/incubator/http/internal/websocket/CooperativeHandler;

  public void stop();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=2, locals=1, args_size=1
        start local 0 // jdk.incubator.http.internal.websocket.CooperativeHandler this
         0: .line 198
            aload 0 /* this */
            getfield jdk.incubator.http.internal.websocket.CooperativeHandler.state:Ljava/util/concurrent/atomic/AtomicInteger;
            bipush 8
            invokevirtual java.util.concurrent.atomic.AtomicInteger.set:(I)V
         1: .line 199
            return
        end local 0 // jdk.incubator.http.internal.websocket.CooperativeHandler this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    2     0  this  Ljdk/incubator/http/internal/websocket/CooperativeHandler;

  private static java.util.function.Consumer<java.lang.Runnable> asyncOf(java.lang.Runnable);
    descriptor: (Ljava/lang/Runnable;)Ljava/util/function/Consumer;
    flags: (0x000a) ACC_PRIVATE, ACC_STATIC
    Code:
      stack=1, locals=1, args_size=1
        start local 0 // java.lang.Runnable task
         0: .line 202
            aload 0 /* task */
            invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
            pop
         1: .line 203
            aload 0 /* task */
            invokedynamic accept(Ljava/lang/Runnable;)Ljava/util/function/Consumer;
              Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
                Method arguments:
                  (Ljava/lang/Object;)V
                  jdk/incubator/http/internal/websocket/CooperativeHandler.lambda$2(Ljava/lang/Runnable;Ljava/lang/Runnable;)V (6)
                  (Ljava/lang/Runnable;)V
            areturn
        end local 0 // java.lang.Runnable task
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    2     0  task  Ljava/lang/Runnable;
    Signature: (Ljava/lang/Runnable;)Ljava/util/function/Consumer<Ljava/lang/Runnable;>;
    MethodParameters:
      Name  Flags
      task  

  private static void lambda$2(java.lang.Runnable, java.lang.Runnable);
    descriptor: (Ljava/lang/Runnable;Ljava/lang/Runnable;)V
    flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
    Code:
      stack=1, locals=2, args_size=2
        start local 1 // java.lang.Runnable ender
         0: .line 204
            aload 0
            invokeinterface java.lang.Runnable.run:()V
         1: .line 205
            aload 1 /* ender */
            invokeinterface java.lang.Runnable.run:()V
         2: .line 206
            return
        end local 1 // java.lang.Runnable ender
      LocalVariableTable:
        Start  End  Slot   Name  Signature
            0    3     1  ender  Ljava/lang/Runnable;
}
SourceFile: "CooperativeHandler.java"
InnerClasses:
  public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles