public interface jdk.incubator.foreign.NativeScope extends java.lang.AutoCloseable
  minor version: 0
  major version: 59
  flags: flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT
  this_class: jdk.incubator.foreign.NativeScope
  super_class: java.lang.Object
{
  public abstract java.util.OptionalLong byteSize();
    descriptor: ()Ljava/util/OptionalLong;
    flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT

  public abstract java.lang.Thread ownerThread();
    descriptor: ()Ljava/lang/Thread;
    flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT

  public abstract long allocatedBytes();
    descriptor: ()J
    flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT

  public jdk.incubator.foreign.MemorySegment allocate(jdk.incubator.foreign.ValueLayout, byte);
    descriptor: (Ljdk/incubator/foreign/ValueLayout;B)Ljdk/incubator/foreign/MemorySegment;
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=3, locals=5, args_size=3
        start local 0 // jdk.incubator.foreign.NativeScope this
        start local 1 // jdk.incubator.foreign.ValueLayout layout
        start local 2 // byte value
         0: .line 97
            aload 1 /* layout */
            invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
            pop
         1: .line 98
            aload 1 /* layout */
            getstatic java.lang.Byte.TYPE:Ljava/lang/Class;
            iconst_0
            anewarray jdk.incubator.foreign.MemoryLayout$PathElement
            invokevirtual jdk.incubator.foreign.ValueLayout.varHandle:(Ljava/lang/Class;[Ljdk/incubator/foreign/MemoryLayout$PathElement;)Ljava/lang/invoke/VarHandle;
            astore 3 /* handle */
        start local 3 // java.lang.invoke.VarHandle handle
         2: .line 99
            aload 0 /* this */
            aload 1 /* layout */
            invokeinterface jdk.incubator.foreign.NativeScope.allocate:(Ljdk/incubator/foreign/MemoryLayout;)Ljdk/incubator/foreign/MemorySegment;
            astore 4 /* addr */
        start local 4 // jdk.incubator.foreign.MemorySegment addr
         3: .line 100
            aload 3 /* handle */
            aload 4 /* addr */
            iload 2 /* value */
            invokevirtual java.lang.invoke.VarHandle.set:(Ljdk/incubator/foreign/MemorySegment;B)V
         4: .line 101
            aload 4 /* addr */
            areturn
        end local 4 // jdk.incubator.foreign.MemorySegment addr
        end local 3 // java.lang.invoke.VarHandle handle
        end local 2 // byte value
        end local 1 // jdk.incubator.foreign.ValueLayout layout
        end local 0 // jdk.incubator.foreign.NativeScope this
      LocalVariableTable:
        Start  End  Slot    Name  Signature
            0    5     0    this  Ljdk/incubator/foreign/NativeScope;
            0    5     1  layout  Ljdk/incubator/foreign/ValueLayout;
            0    5     2   value  B
            2    5     3  handle  Ljava/lang/invoke/VarHandle;
            3    5     4    addr  Ljdk/incubator/foreign/MemorySegment;
    MethodParameters:
        Name  Flags
      layout  
      value   

  public jdk.incubator.foreign.MemorySegment allocate(jdk.incubator.foreign.ValueLayout, char);
    descriptor: (Ljdk/incubator/foreign/ValueLayout;C)Ljdk/incubator/foreign/MemorySegment;
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=3, locals=5, args_size=3
        start local 0 // jdk.incubator.foreign.NativeScope this
        start local 1 // jdk.incubator.foreign.ValueLayout layout
        start local 2 // char value
         0: .line 116
            aload 1 /* layout */
            invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
            pop
         1: .line 117
            aload 1 /* layout */
            getstatic java.lang.Character.TYPE:Ljava/lang/Class;
            iconst_0
            anewarray jdk.incubator.foreign.MemoryLayout$PathElement
            invokevirtual jdk.incubator.foreign.ValueLayout.varHandle:(Ljava/lang/Class;[Ljdk/incubator/foreign/MemoryLayout$PathElement;)Ljava/lang/invoke/VarHandle;
            astore 3 /* handle */
        start local 3 // java.lang.invoke.VarHandle handle
         2: .line 118
            aload 0 /* this */
            aload 1 /* layout */
            invokeinterface jdk.incubator.foreign.NativeScope.allocate:(Ljdk/incubator/foreign/MemoryLayout;)Ljdk/incubator/foreign/MemorySegment;
            astore 4 /* addr */
        start local 4 // jdk.incubator.foreign.MemorySegment addr
         3: .line 119
            aload 3 /* handle */
            aload 4 /* addr */
            iload 2 /* value */
            invokevirtual java.lang.invoke.VarHandle.set:(Ljdk/incubator/foreign/MemorySegment;C)V
         4: .line 120
            aload 4 /* addr */
            areturn
        end local 4 // jdk.incubator.foreign.MemorySegment addr
        end local 3 // java.lang.invoke.VarHandle handle
        end local 2 // char value
        end local 1 // jdk.incubator.foreign.ValueLayout layout
        end local 0 // jdk.incubator.foreign.NativeScope this
      LocalVariableTable:
        Start  End  Slot    Name  Signature
            0    5     0    this  Ljdk/incubator/foreign/NativeScope;
            0    5     1  layout  Ljdk/incubator/foreign/ValueLayout;
            0    5     2   value  C
            2    5     3  handle  Ljava/lang/invoke/VarHandle;
            3    5     4    addr  Ljdk/incubator/foreign/MemorySegment;
    MethodParameters:
        Name  Flags
      layout  
      value   

  public jdk.incubator.foreign.MemorySegment allocate(jdk.incubator.foreign.ValueLayout, short);
    descriptor: (Ljdk/incubator/foreign/ValueLayout;S)Ljdk/incubator/foreign/MemorySegment;
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=3, locals=5, args_size=3
        start local 0 // jdk.incubator.foreign.NativeScope this
        start local 1 // jdk.incubator.foreign.ValueLayout layout
        start local 2 // short value
         0: .line 135
            aload 1 /* layout */
            invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
            pop
         1: .line 136
            aload 1 /* layout */
            getstatic java.lang.Short.TYPE:Ljava/lang/Class;
            iconst_0
            anewarray jdk.incubator.foreign.MemoryLayout$PathElement
            invokevirtual jdk.incubator.foreign.ValueLayout.varHandle:(Ljava/lang/Class;[Ljdk/incubator/foreign/MemoryLayout$PathElement;)Ljava/lang/invoke/VarHandle;
            astore 3 /* handle */
        start local 3 // java.lang.invoke.VarHandle handle
         2: .line 137
            aload 0 /* this */
            aload 1 /* layout */
            invokeinterface jdk.incubator.foreign.NativeScope.allocate:(Ljdk/incubator/foreign/MemoryLayout;)Ljdk/incubator/foreign/MemorySegment;
            astore 4 /* addr */
        start local 4 // jdk.incubator.foreign.MemorySegment addr
         3: .line 138
            aload 3 /* handle */
            aload 4 /* addr */
            iload 2 /* value */
            invokevirtual java.lang.invoke.VarHandle.set:(Ljdk/incubator/foreign/MemorySegment;S)V
         4: .line 139
            aload 4 /* addr */
            areturn
        end local 4 // jdk.incubator.foreign.MemorySegment addr
        end local 3 // java.lang.invoke.VarHandle handle
        end local 2 // short value
        end local 1 // jdk.incubator.foreign.ValueLayout layout
        end local 0 // jdk.incubator.foreign.NativeScope this
      LocalVariableTable:
        Start  End  Slot    Name  Signature
            0    5     0    this  Ljdk/incubator/foreign/NativeScope;
            0    5     1  layout  Ljdk/incubator/foreign/ValueLayout;
            0    5     2   value  S
            2    5     3  handle  Ljava/lang/invoke/VarHandle;
            3    5     4    addr  Ljdk/incubator/foreign/MemorySegment;
    MethodParameters:
        Name  Flags
      layout  
      value   

  public jdk.incubator.foreign.MemorySegment allocate(jdk.incubator.foreign.ValueLayout, int);
    descriptor: (Ljdk/incubator/foreign/ValueLayout;I)Ljdk/incubator/foreign/MemorySegment;
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=3, locals=5, args_size=3
        start local 0 // jdk.incubator.foreign.NativeScope this
        start local 1 // jdk.incubator.foreign.ValueLayout layout
        start local 2 // int value
         0: .line 154
            aload 1 /* layout */
            invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
            pop
         1: .line 155
            aload 1 /* layout */
            getstatic java.lang.Integer.TYPE:Ljava/lang/Class;
            iconst_0
            anewarray jdk.incubator.foreign.MemoryLayout$PathElement
            invokevirtual jdk.incubator.foreign.ValueLayout.varHandle:(Ljava/lang/Class;[Ljdk/incubator/foreign/MemoryLayout$PathElement;)Ljava/lang/invoke/VarHandle;
            astore 3 /* handle */
        start local 3 // java.lang.invoke.VarHandle handle
         2: .line 156
            aload 0 /* this */
            aload 1 /* layout */
            invokeinterface jdk.incubator.foreign.NativeScope.allocate:(Ljdk/incubator/foreign/MemoryLayout;)Ljdk/incubator/foreign/MemorySegment;
            astore 4 /* addr */
        start local 4 // jdk.incubator.foreign.MemorySegment addr
         3: .line 157
            aload 3 /* handle */
            aload 4 /* addr */
            iload 2 /* value */
            invokevirtual java.lang.invoke.VarHandle.set:(Ljdk/incubator/foreign/MemorySegment;I)V
         4: .line 158
            aload 4 /* addr */
            areturn
        end local 4 // jdk.incubator.foreign.MemorySegment addr
        end local 3 // java.lang.invoke.VarHandle handle
        end local 2 // int value
        end local 1 // jdk.incubator.foreign.ValueLayout layout
        end local 0 // jdk.incubator.foreign.NativeScope this
      LocalVariableTable:
        Start  End  Slot    Name  Signature
            0    5     0    this  Ljdk/incubator/foreign/NativeScope;
            0    5     1  layout  Ljdk/incubator/foreign/ValueLayout;
            0    5     2   value  I
            2    5     3  handle  Ljava/lang/invoke/VarHandle;
            3    5     4    addr  Ljdk/incubator/foreign/MemorySegment;
    MethodParameters:
        Name  Flags
      layout  
      value   

  public jdk.incubator.foreign.MemorySegment allocate(jdk.incubator.foreign.ValueLayout, float);
    descriptor: (Ljdk/incubator/foreign/ValueLayout;F)Ljdk/incubator/foreign/MemorySegment;
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=3, locals=5, args_size=3
        start local 0 // jdk.incubator.foreign.NativeScope this
        start local 1 // jdk.incubator.foreign.ValueLayout layout
        start local 2 // float value
         0: .line 173
            aload 1 /* layout */
            invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
            pop
         1: .line 174
            aload 1 /* layout */
            getstatic java.lang.Float.TYPE:Ljava/lang/Class;
            iconst_0
            anewarray jdk.incubator.foreign.MemoryLayout$PathElement
            invokevirtual jdk.incubator.foreign.ValueLayout.varHandle:(Ljava/lang/Class;[Ljdk/incubator/foreign/MemoryLayout$PathElement;)Ljava/lang/invoke/VarHandle;
            astore 3 /* handle */
        start local 3 // java.lang.invoke.VarHandle handle
         2: .line 175
            aload 0 /* this */
            aload 1 /* layout */
            invokeinterface jdk.incubator.foreign.NativeScope.allocate:(Ljdk/incubator/foreign/MemoryLayout;)Ljdk/incubator/foreign/MemorySegment;
            astore 4 /* addr */
        start local 4 // jdk.incubator.foreign.MemorySegment addr
         3: .line 176
            aload 3 /* handle */
            aload 4 /* addr */
            fload 2 /* value */
            invokevirtual java.lang.invoke.VarHandle.set:(Ljdk/incubator/foreign/MemorySegment;F)V
         4: .line 177
            aload 4 /* addr */
            areturn
        end local 4 // jdk.incubator.foreign.MemorySegment addr
        end local 3 // java.lang.invoke.VarHandle handle
        end local 2 // float value
        end local 1 // jdk.incubator.foreign.ValueLayout layout
        end local 0 // jdk.incubator.foreign.NativeScope this
      LocalVariableTable:
        Start  End  Slot    Name  Signature
            0    5     0    this  Ljdk/incubator/foreign/NativeScope;
            0    5     1  layout  Ljdk/incubator/foreign/ValueLayout;
            0    5     2   value  F
            2    5     3  handle  Ljava/lang/invoke/VarHandle;
            3    5     4    addr  Ljdk/incubator/foreign/MemorySegment;
    MethodParameters:
        Name  Flags
      layout  
      value   

  public jdk.incubator.foreign.MemorySegment allocate(jdk.incubator.foreign.ValueLayout, long);
    descriptor: (Ljdk/incubator/foreign/ValueLayout;J)Ljdk/incubator/foreign/MemorySegment;
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=4, locals=6, args_size=3
        start local 0 // jdk.incubator.foreign.NativeScope this
        start local 1 // jdk.incubator.foreign.ValueLayout layout
        start local 2 // long value
         0: .line 192
            aload 1 /* layout */
            invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
            pop
         1: .line 193
            aload 1 /* layout */
            getstatic java.lang.Long.TYPE:Ljava/lang/Class;
            iconst_0
            anewarray jdk.incubator.foreign.MemoryLayout$PathElement
            invokevirtual jdk.incubator.foreign.ValueLayout.varHandle:(Ljava/lang/Class;[Ljdk/incubator/foreign/MemoryLayout$PathElement;)Ljava/lang/invoke/VarHandle;
            astore 4 /* handle */
        start local 4 // java.lang.invoke.VarHandle handle
         2: .line 194
            aload 0 /* this */
            aload 1 /* layout */
            invokeinterface jdk.incubator.foreign.NativeScope.allocate:(Ljdk/incubator/foreign/MemoryLayout;)Ljdk/incubator/foreign/MemorySegment;
            astore 5 /* addr */
        start local 5 // jdk.incubator.foreign.MemorySegment addr
         3: .line 195
            aload 4 /* handle */
            aload 5 /* addr */
            lload 2 /* value */
            invokevirtual java.lang.invoke.VarHandle.set:(Ljdk/incubator/foreign/MemorySegment;J)V
         4: .line 196
            aload 5 /* addr */
            areturn
        end local 5 // jdk.incubator.foreign.MemorySegment addr
        end local 4 // java.lang.invoke.VarHandle handle
        end local 2 // long value
        end local 1 // jdk.incubator.foreign.ValueLayout layout
        end local 0 // jdk.incubator.foreign.NativeScope this
      LocalVariableTable:
        Start  End  Slot    Name  Signature
            0    5     0    this  Ljdk/incubator/foreign/NativeScope;
            0    5     1  layout  Ljdk/incubator/foreign/ValueLayout;
            0    5     2   value  J
            2    5     4  handle  Ljava/lang/invoke/VarHandle;
            3    5     5    addr  Ljdk/incubator/foreign/MemorySegment;
    MethodParameters:
        Name  Flags
      layout  
      value   

  public jdk.incubator.foreign.MemorySegment allocate(jdk.incubator.foreign.ValueLayout, double);
    descriptor: (Ljdk/incubator/foreign/ValueLayout;D)Ljdk/incubator/foreign/MemorySegment;
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=4, locals=6, args_size=3
        start local 0 // jdk.incubator.foreign.NativeScope this
        start local 1 // jdk.incubator.foreign.ValueLayout layout
        start local 2 // double value
         0: .line 211
            aload 1 /* layout */
            invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
            pop
         1: .line 212
            aload 1 /* layout */
            getstatic java.lang.Double.TYPE:Ljava/lang/Class;
            iconst_0
            anewarray jdk.incubator.foreign.MemoryLayout$PathElement
            invokevirtual jdk.incubator.foreign.ValueLayout.varHandle:(Ljava/lang/Class;[Ljdk/incubator/foreign/MemoryLayout$PathElement;)Ljava/lang/invoke/VarHandle;
            astore 4 /* handle */
        start local 4 // java.lang.invoke.VarHandle handle
         2: .line 213
            aload 0 /* this */
            aload 1 /* layout */
            invokeinterface jdk.incubator.foreign.NativeScope.allocate:(Ljdk/incubator/foreign/MemoryLayout;)Ljdk/incubator/foreign/MemorySegment;
            astore 5 /* addr */
        start local 5 // jdk.incubator.foreign.MemorySegment addr
         3: .line 214
            aload 4 /* handle */
            aload 5 /* addr */
            dload 2 /* value */
            invokevirtual java.lang.invoke.VarHandle.set:(Ljdk/incubator/foreign/MemorySegment;D)V
         4: .line 215
            aload 5 /* addr */
            areturn
        end local 5 // jdk.incubator.foreign.MemorySegment addr
        end local 4 // java.lang.invoke.VarHandle handle
        end local 2 // double value
        end local 1 // jdk.incubator.foreign.ValueLayout layout
        end local 0 // jdk.incubator.foreign.NativeScope this
      LocalVariableTable:
        Start  End  Slot    Name  Signature
            0    5     0    this  Ljdk/incubator/foreign/NativeScope;
            0    5     1  layout  Ljdk/incubator/foreign/ValueLayout;
            0    5     2   value  D
            2    5     4  handle  Ljava/lang/invoke/VarHandle;
            3    5     5    addr  Ljdk/incubator/foreign/MemorySegment;
    MethodParameters:
        Name  Flags
      layout  
      value   

  public jdk.incubator.foreign.MemorySegment allocate(jdk.incubator.foreign.ValueLayout, jdk.incubator.foreign.Addressable);
    descriptor: (Ljdk/incubator/foreign/ValueLayout;Ljdk/incubator/foreign/Addressable;)Ljdk/incubator/foreign/MemorySegment;
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=5, locals=3, args_size=3
        start local 0 // jdk.incubator.foreign.NativeScope this
        start local 1 // jdk.incubator.foreign.ValueLayout layout
        start local 2 // jdk.incubator.foreign.Addressable value
         0: .line 232
            aload 2 /* value */
            invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
            pop
         1: .line 233
            aload 1 /* layout */
            invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
            pop
         2: .line 234
            getstatic jdk.incubator.foreign.MemoryLayouts.ADDRESS:Ljdk/incubator/foreign/ValueLayout;
            invokevirtual jdk.incubator.foreign.ValueLayout.byteSize:()J
            aload 1 /* layout */
            invokevirtual jdk.incubator.foreign.ValueLayout.byteSize:()J
            lcmp
            ifeq 4
         3: .line 235
            new java.lang.IllegalArgumentException
            dup
            new java.lang.StringBuilder
            dup
            ldc "Layout size mismatch - "
            invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
            aload 1 /* layout */
            invokevirtual jdk.incubator.foreign.ValueLayout.byteSize:()J
            invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
            ldc " != "
            invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
            getstatic jdk.incubator.foreign.MemoryLayouts.ADDRESS:Ljdk/incubator/foreign/ValueLayout;
            invokevirtual jdk.incubator.foreign.ValueLayout.byteSize:()J
            invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
            invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
            invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
            athrow
         4: .line 237
      StackMap locals:
      StackMap stack:
            aload 1 /* layout */
            invokevirtual jdk.incubator.foreign.ValueLayout.byteSize:()J
            l2i
            tableswitch { // 4 - 8
                    4: 5
                    5: 7
                    6: 7
                    7: 7
                    8: 6
              default: 7
          }
         5: .line 238
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            aload 1 /* layout */
            aload 2 /* value */
            invokeinterface jdk.incubator.foreign.Addressable.address:()Ljdk/incubator/foreign/MemoryAddress;
            invokeinterface jdk.incubator.foreign.MemoryAddress.toRawLongValue:()J
            l2i
            invokeinterface jdk.incubator.foreign.NativeScope.allocate:(Ljdk/incubator/foreign/ValueLayout;I)Ljdk/incubator/foreign/MemorySegment;
            areturn
         6: .line 239
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            aload 1 /* layout */
            aload 2 /* value */
            invokeinterface jdk.incubator.foreign.Addressable.address:()Ljdk/incubator/foreign/MemoryAddress;
            invokeinterface jdk.incubator.foreign.MemoryAddress.toRawLongValue:()J
            invokeinterface jdk.incubator.foreign.NativeScope.allocate:(Ljdk/incubator/foreign/ValueLayout;J)Ljdk/incubator/foreign/MemorySegment;
            areturn
         7: .line 240
      StackMap locals:
      StackMap stack:
            new java.lang.UnsupportedOperationException
            dup
            ldc "Unsupported pointer size"
            invokespecial java.lang.UnsupportedOperationException.<init>:(Ljava/lang/String;)V
            athrow
        end local 2 // jdk.incubator.foreign.Addressable value
        end local 1 // jdk.incubator.foreign.ValueLayout layout
        end local 0 // jdk.incubator.foreign.NativeScope this
      LocalVariableTable:
        Start  End  Slot    Name  Signature
            0    8     0    this  Ljdk/incubator/foreign/NativeScope;
            0    8     1  layout  Ljdk/incubator/foreign/ValueLayout;
            0    8     2   value  Ljdk/incubator/foreign/Addressable;
    MethodParameters:
        Name  Flags
      layout  
      value   

  public jdk.incubator.foreign.MemorySegment allocateArray(jdk.incubator.foreign.ValueLayout, byte[]);
    descriptor: (Ljdk/incubator/foreign/ValueLayout;[B)Ljdk/incubator/foreign/MemorySegment;
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=4, locals=3, args_size=3
        start local 0 // jdk.incubator.foreign.NativeScope this
        start local 1 // jdk.incubator.foreign.ValueLayout elementLayout
        start local 2 // byte[] array
         0: .line 256
            aload 0 /* this */
            aload 2 /* array */
            aload 1 /* elementLayout */
            invokedynamic apply()Ljava/util/function/Function;
              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;)Ljava/lang/Object;
                  jdk/incubator/foreign/MemorySegment.ofArray([B)Ljdk/incubator/foreign/MemorySegment; (6 itf)
                  ([B)Ljdk/incubator/foreign/MemorySegment;
            invokeinterface jdk.incubator.foreign.NativeScope.copyArrayWithSwapIfNeeded:(Ljava/lang/Object;Ljdk/incubator/foreign/ValueLayout;Ljava/util/function/Function;)Ljdk/incubator/foreign/MemorySegment;
            areturn
        end local 2 // byte[] array
        end local 1 // jdk.incubator.foreign.ValueLayout elementLayout
        end local 0 // jdk.incubator.foreign.NativeScope this
      LocalVariableTable:
        Start  End  Slot           Name  Signature
            0    1     0           this  Ljdk/incubator/foreign/NativeScope;
            0    1     1  elementLayout  Ljdk/incubator/foreign/ValueLayout;
            0    1     2          array  [B
    MethodParameters:
               Name  Flags
      elementLayout  
      array          

  public jdk.incubator.foreign.MemorySegment allocateArray(jdk.incubator.foreign.ValueLayout, short[]);
    descriptor: (Ljdk/incubator/foreign/ValueLayout;[S)Ljdk/incubator/foreign/MemorySegment;
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=4, locals=3, args_size=3
        start local 0 // jdk.incubator.foreign.NativeScope this
        start local 1 // jdk.incubator.foreign.ValueLayout elementLayout
        start local 2 // short[] array
         0: .line 271
            aload 0 /* this */
            aload 2 /* array */
            aload 1 /* elementLayout */
            invokedynamic apply()Ljava/util/function/Function;
              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;)Ljava/lang/Object;
                  jdk/incubator/foreign/MemorySegment.ofArray([S)Ljdk/incubator/foreign/MemorySegment; (6 itf)
                  ([S)Ljdk/incubator/foreign/MemorySegment;
            invokeinterface jdk.incubator.foreign.NativeScope.copyArrayWithSwapIfNeeded:(Ljava/lang/Object;Ljdk/incubator/foreign/ValueLayout;Ljava/util/function/Function;)Ljdk/incubator/foreign/MemorySegment;
            areturn
        end local 2 // short[] array
        end local 1 // jdk.incubator.foreign.ValueLayout elementLayout
        end local 0 // jdk.incubator.foreign.NativeScope this
      LocalVariableTable:
        Start  End  Slot           Name  Signature
            0    1     0           this  Ljdk/incubator/foreign/NativeScope;
            0    1     1  elementLayout  Ljdk/incubator/foreign/ValueLayout;
            0    1     2          array  [S
    MethodParameters:
               Name  Flags
      elementLayout  
      array          

  public jdk.incubator.foreign.MemorySegment allocateArray(jdk.incubator.foreign.ValueLayout, char[]);
    descriptor: (Ljdk/incubator/foreign/ValueLayout;[C)Ljdk/incubator/foreign/MemorySegment;
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=4, locals=3, args_size=3
        start local 0 // jdk.incubator.foreign.NativeScope this
        start local 1 // jdk.incubator.foreign.ValueLayout elementLayout
        start local 2 // char[] array
         0: .line 286
            aload 0 /* this */
            aload 2 /* array */
            aload 1 /* elementLayout */
            invokedynamic apply()Ljava/util/function/Function;
              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;)Ljava/lang/Object;
                  jdk/incubator/foreign/MemorySegment.ofArray([C)Ljdk/incubator/foreign/MemorySegment; (6 itf)
                  ([C)Ljdk/incubator/foreign/MemorySegment;
            invokeinterface jdk.incubator.foreign.NativeScope.copyArrayWithSwapIfNeeded:(Ljava/lang/Object;Ljdk/incubator/foreign/ValueLayout;Ljava/util/function/Function;)Ljdk/incubator/foreign/MemorySegment;
            areturn
        end local 2 // char[] array
        end local 1 // jdk.incubator.foreign.ValueLayout elementLayout
        end local 0 // jdk.incubator.foreign.NativeScope this
      LocalVariableTable:
        Start  End  Slot           Name  Signature
            0    1     0           this  Ljdk/incubator/foreign/NativeScope;
            0    1     1  elementLayout  Ljdk/incubator/foreign/ValueLayout;
            0    1     2          array  [C
    MethodParameters:
               Name  Flags
      elementLayout  
      array          

  public jdk.incubator.foreign.MemorySegment allocateArray(jdk.incubator.foreign.ValueLayout, int[]);
    descriptor: (Ljdk/incubator/foreign/ValueLayout;[I)Ljdk/incubator/foreign/MemorySegment;
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=4, locals=3, args_size=3
        start local 0 // jdk.incubator.foreign.NativeScope this
        start local 1 // jdk.incubator.foreign.ValueLayout elementLayout
        start local 2 // int[] array
         0: .line 301
            aload 0 /* this */
            aload 2 /* array */
            aload 1 /* elementLayout */
            invokedynamic apply()Ljava/util/function/Function;
              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;)Ljava/lang/Object;
                  jdk/incubator/foreign/MemorySegment.ofArray([I)Ljdk/incubator/foreign/MemorySegment; (6 itf)
                  ([I)Ljdk/incubator/foreign/MemorySegment;
            invokeinterface jdk.incubator.foreign.NativeScope.copyArrayWithSwapIfNeeded:(Ljava/lang/Object;Ljdk/incubator/foreign/ValueLayout;Ljava/util/function/Function;)Ljdk/incubator/foreign/MemorySegment;
            areturn
        end local 2 // int[] array
        end local 1 // jdk.incubator.foreign.ValueLayout elementLayout
        end local 0 // jdk.incubator.foreign.NativeScope this
      LocalVariableTable:
        Start  End  Slot           Name  Signature
            0    1     0           this  Ljdk/incubator/foreign/NativeScope;
            0    1     1  elementLayout  Ljdk/incubator/foreign/ValueLayout;
            0    1     2          array  [I
    MethodParameters:
               Name  Flags
      elementLayout  
      array          

  public jdk.incubator.foreign.MemorySegment allocateArray(jdk.incubator.foreign.ValueLayout, float[]);
    descriptor: (Ljdk/incubator/foreign/ValueLayout;[F)Ljdk/incubator/foreign/MemorySegment;
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=4, locals=3, args_size=3
        start local 0 // jdk.incubator.foreign.NativeScope this
        start local 1 // jdk.incubator.foreign.ValueLayout elementLayout
        start local 2 // float[] array
         0: .line 316
            aload 0 /* this */
            aload 2 /* array */
            aload 1 /* elementLayout */
            invokedynamic apply()Ljava/util/function/Function;
              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;)Ljava/lang/Object;
                  jdk/incubator/foreign/MemorySegment.ofArray([F)Ljdk/incubator/foreign/MemorySegment; (6 itf)
                  ([F)Ljdk/incubator/foreign/MemorySegment;
            invokeinterface jdk.incubator.foreign.NativeScope.copyArrayWithSwapIfNeeded:(Ljava/lang/Object;Ljdk/incubator/foreign/ValueLayout;Ljava/util/function/Function;)Ljdk/incubator/foreign/MemorySegment;
            areturn
        end local 2 // float[] array
        end local 1 // jdk.incubator.foreign.ValueLayout elementLayout
        end local 0 // jdk.incubator.foreign.NativeScope this
      LocalVariableTable:
        Start  End  Slot           Name  Signature
            0    1     0           this  Ljdk/incubator/foreign/NativeScope;
            0    1     1  elementLayout  Ljdk/incubator/foreign/ValueLayout;
            0    1     2          array  [F
    MethodParameters:
               Name  Flags
      elementLayout  
      array          

  public jdk.incubator.foreign.MemorySegment allocateArray(jdk.incubator.foreign.ValueLayout, long[]);
    descriptor: (Ljdk/incubator/foreign/ValueLayout;[J)Ljdk/incubator/foreign/MemorySegment;
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=4, locals=3, args_size=3
        start local 0 // jdk.incubator.foreign.NativeScope this
        start local 1 // jdk.incubator.foreign.ValueLayout elementLayout
        start local 2 // long[] array
         0: .line 331
            aload 0 /* this */
            aload 2 /* array */
            aload 1 /* elementLayout */
            invokedynamic apply()Ljava/util/function/Function;
              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;)Ljava/lang/Object;
                  jdk/incubator/foreign/MemorySegment.ofArray([J)Ljdk/incubator/foreign/MemorySegment; (6 itf)
                  ([J)Ljdk/incubator/foreign/MemorySegment;
            invokeinterface jdk.incubator.foreign.NativeScope.copyArrayWithSwapIfNeeded:(Ljava/lang/Object;Ljdk/incubator/foreign/ValueLayout;Ljava/util/function/Function;)Ljdk/incubator/foreign/MemorySegment;
            areturn
        end local 2 // long[] array
        end local 1 // jdk.incubator.foreign.ValueLayout elementLayout
        end local 0 // jdk.incubator.foreign.NativeScope this
      LocalVariableTable:
        Start  End  Slot           Name  Signature
            0    1     0           this  Ljdk/incubator/foreign/NativeScope;
            0    1     1  elementLayout  Ljdk/incubator/foreign/ValueLayout;
            0    1     2          array  [J
    MethodParameters:
               Name  Flags
      elementLayout  
      array          

  public jdk.incubator.foreign.MemorySegment allocateArray(jdk.incubator.foreign.ValueLayout, double[]);
    descriptor: (Ljdk/incubator/foreign/ValueLayout;[D)Ljdk/incubator/foreign/MemorySegment;
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=4, locals=3, args_size=3
        start local 0 // jdk.incubator.foreign.NativeScope this
        start local 1 // jdk.incubator.foreign.ValueLayout elementLayout
        start local 2 // double[] array
         0: .line 346
            aload 0 /* this */
            aload 2 /* array */
            aload 1 /* elementLayout */
            invokedynamic apply()Ljava/util/function/Function;
              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;)Ljava/lang/Object;
                  jdk/incubator/foreign/MemorySegment.ofArray([D)Ljdk/incubator/foreign/MemorySegment; (6 itf)
                  ([D)Ljdk/incubator/foreign/MemorySegment;
            invokeinterface jdk.incubator.foreign.NativeScope.copyArrayWithSwapIfNeeded:(Ljava/lang/Object;Ljdk/incubator/foreign/ValueLayout;Ljava/util/function/Function;)Ljdk/incubator/foreign/MemorySegment;
            areturn
        end local 2 // double[] array
        end local 1 // jdk.incubator.foreign.ValueLayout elementLayout
        end local 0 // jdk.incubator.foreign.NativeScope this
      LocalVariableTable:
        Start  End  Slot           Name  Signature
            0    1     0           this  Ljdk/incubator/foreign/NativeScope;
            0    1     1  elementLayout  Ljdk/incubator/foreign/ValueLayout;
            0    1     2          array  [D
    MethodParameters:
               Name  Flags
      elementLayout  
      array          

  public jdk.incubator.foreign.MemorySegment allocateArray(jdk.incubator.foreign.ValueLayout, jdk.incubator.foreign.Addressable[]);
    descriptor: (Ljdk/incubator/foreign/ValueLayout;[Ljdk/incubator/foreign/Addressable;)Ljdk/incubator/foreign/MemorySegment;
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=5, locals=3, args_size=3
        start local 0 // jdk.incubator.foreign.NativeScope this
        start local 1 // jdk.incubator.foreign.ValueLayout elementLayout
        start local 2 // jdk.incubator.foreign.Addressable[] array
         0: .line 362
            aload 1 /* elementLayout */
            invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
            pop
         1: .line 363
            aload 2 /* array */
            invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
            pop
         2: .line 364
            aload 2 /* array */
            invokestatic java.util.stream.Stream.of:([Ljava/lang/Object;)Ljava/util/stream/Stream;
            invokedynamic accept()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
                  java/util/Objects.requireNonNull(Ljava/lang/Object;)Ljava/lang/Object; (6)
                  (Ljdk/incubator/foreign/Addressable;)V
            invokeinterface java.util.stream.Stream.forEach:(Ljava/util/function/Consumer;)V
         3: .line 365
            getstatic jdk.incubator.foreign.MemoryLayouts.ADDRESS:Ljdk/incubator/foreign/ValueLayout;
            invokevirtual jdk.incubator.foreign.ValueLayout.byteSize:()J
            aload 1 /* elementLayout */
            invokevirtual jdk.incubator.foreign.ValueLayout.byteSize:()J
            lcmp
            ifeq 5
         4: .line 366
            new java.lang.IllegalArgumentException
            dup
            new java.lang.StringBuilder
            dup
            ldc "Layout size mismatch - "
            invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
            aload 1 /* elementLayout */
            invokevirtual jdk.incubator.foreign.ValueLayout.byteSize:()J
            invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
            ldc " != "
            invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
            getstatic jdk.incubator.foreign.MemoryLayouts.ADDRESS:Ljdk/incubator/foreign/ValueLayout;
            invokevirtual jdk.incubator.foreign.ValueLayout.byteSize:()J
            invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
            invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
            invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
            athrow
         5: .line 368
      StackMap locals:
      StackMap stack:
            aload 1 /* elementLayout */
            invokevirtual jdk.incubator.foreign.ValueLayout.byteSize:()J
            l2i
            tableswitch { // 4 - 8
                    4: 6
                    5: 14
                    6: 14
                    7: 14
                    8: 10
              default: 14
          }
         6: .line 369
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            aload 2 /* array */
            invokestatic java.util.stream.Stream.of:([Ljava/lang/Object;)Ljava/util/stream/Stream;
         7: .line 370
            invokedynamic applyAsInt()Ljava/util/function/ToIntFunction;
              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;)I
                  jdk/incubator/foreign/NativeScope.lambda$8(Ljdk/incubator/foreign/Addressable;)I (6 itf)
                  (Ljdk/incubator/foreign/Addressable;)I
            invokeinterface java.util.stream.Stream.mapToInt:(Ljava/util/function/ToIntFunction;)Ljava/util/stream/IntStream;
            invokeinterface java.util.stream.IntStream.toArray:()[I
         8: .line 371
            aload 1 /* elementLayout */
            invokedynamic apply()Ljava/util/function/Function;
              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;)Ljava/lang/Object;
                  jdk/incubator/foreign/MemorySegment.ofArray([I)Ljdk/incubator/foreign/MemorySegment; (6 itf)
                  ([I)Ljdk/incubator/foreign/MemorySegment;
         9: .line 369
            invokeinterface jdk.incubator.foreign.NativeScope.copyArrayWithSwapIfNeeded:(Ljava/lang/Object;Ljdk/incubator/foreign/ValueLayout;Ljava/util/function/Function;)Ljdk/incubator/foreign/MemorySegment;
            areturn
        10: .line 372
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            aload 2 /* array */
            invokestatic java.util.stream.Stream.of:([Ljava/lang/Object;)Ljava/util/stream/Stream;
        11: .line 373
            invokedynamic applyAsLong()Ljava/util/function/ToLongFunction;
              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;)J
                  jdk/incubator/foreign/NativeScope.lambda$10(Ljdk/incubator/foreign/Addressable;)J (6 itf)
                  (Ljdk/incubator/foreign/Addressable;)J
            invokeinterface java.util.stream.Stream.mapToLong:(Ljava/util/function/ToLongFunction;)Ljava/util/stream/LongStream;
            invokeinterface java.util.stream.LongStream.toArray:()[J
        12: .line 374
            aload 1 /* elementLayout */
            invokedynamic apply()Ljava/util/function/Function;
              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;)Ljava/lang/Object;
                  jdk/incubator/foreign/MemorySegment.ofArray([J)Ljdk/incubator/foreign/MemorySegment; (6 itf)
                  ([J)Ljdk/incubator/foreign/MemorySegment;
        13: .line 372
            invokeinterface jdk.incubator.foreign.NativeScope.copyArrayWithSwapIfNeeded:(Ljava/lang/Object;Ljdk/incubator/foreign/ValueLayout;Ljava/util/function/Function;)Ljdk/incubator/foreign/MemorySegment;
            areturn
        14: .line 375
      StackMap locals:
      StackMap stack:
            new java.lang.UnsupportedOperationException
            dup
            ldc "Unsupported pointer size"
            invokespecial java.lang.UnsupportedOperationException.<init>:(Ljava/lang/String;)V
            athrow
        end local 2 // jdk.incubator.foreign.Addressable[] array
        end local 1 // jdk.incubator.foreign.ValueLayout elementLayout
        end local 0 // jdk.incubator.foreign.NativeScope this
      LocalVariableTable:
        Start  End  Slot           Name  Signature
            0   15     0           this  Ljdk/incubator/foreign/NativeScope;
            0   15     1  elementLayout  Ljdk/incubator/foreign/ValueLayout;
            0   15     2          array  [Ljdk/incubator/foreign/Addressable;
    MethodParameters:
               Name  Flags
      elementLayout  
      array          

  private <Z> jdk.incubator.foreign.MemorySegment copyArrayWithSwapIfNeeded(Z, jdk.incubator.foreign.ValueLayout, java.util.function.Function<Z, jdk.incubator.foreign.MemorySegment>);
    descriptor: (Ljava/lang/Object;Ljdk/incubator/foreign/ValueLayout;Ljava/util/function/Function;)Ljdk/incubator/foreign/MemorySegment;
    flags: (0x0002) ACC_PRIVATE
    Code:
      stack=4, locals=5, args_size=4
        start local 0 // jdk.incubator.foreign.NativeScope this
        start local 1 // java.lang.Object array
        start local 2 // jdk.incubator.foreign.ValueLayout elementLayout
        start local 3 // java.util.function.Function heapSegmentFactory
         0: .line 381
            aload 1 /* array */
            invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
            pop
         1: .line 382
            aload 2 /* elementLayout */
            invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
            pop
         2: .line 383
            aload 1 /* array */
            invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
            invokevirtual java.lang.Class.componentType:()Ljava/lang/Class;
            aload 2 /* elementLayout */
            invokestatic jdk.internal.foreign.Utils.checkPrimitiveCarrierCompat:(Ljava/lang/Class;Ljdk/incubator/foreign/MemoryLayout;)V
         3: .line 384
            aload 0 /* this */
            aload 1 /* array */
            invokestatic java.lang.reflect.Array.getLength:(Ljava/lang/Object;)I
            i2l
            aload 2 /* elementLayout */
            invokestatic jdk.incubator.foreign.MemoryLayout.ofSequence:(JLjdk/incubator/foreign/MemoryLayout;)Ljdk/incubator/foreign/SequenceLayout;
            invokeinterface jdk.incubator.foreign.NativeScope.allocate:(Ljdk/incubator/foreign/MemoryLayout;)Ljdk/incubator/foreign/MemorySegment;
            astore 4 /* addr */
        start local 4 // jdk.incubator.foreign.MemorySegment addr
         4: .line 385
            aload 2 /* elementLayout */
            invokevirtual jdk.incubator.foreign.ValueLayout.byteSize:()J
            lconst_1
            lcmp
            ifeq 5
            aload 2 /* elementLayout */
            invokevirtual jdk.incubator.foreign.ValueLayout.order:()Ljava/nio/ByteOrder;
            invokestatic java.nio.ByteOrder.nativeOrder:()Ljava/nio/ByteOrder;
            if_acmpne 7
         5: .line 386
      StackMap locals: jdk.incubator.foreign.MemorySegment
      StackMap stack:
            aload 4 /* addr */
            aload 3 /* heapSegmentFactory */
            aload 1 /* array */
            invokeinterface java.util.function.Function.apply:(Ljava/lang/Object;)Ljava/lang/Object;
            checkcast jdk.incubator.foreign.MemorySegment
            invokeinterface jdk.incubator.foreign.MemorySegment.copyFrom:(Ljdk/incubator/foreign/MemorySegment;)V
         6: .line 387
            goto 8
         7: .line 388
      StackMap locals:
      StackMap stack:
            aload 4 /* addr */
            checkcast jdk.internal.foreign.AbstractMemorySegmentImpl
            aload 3 /* heapSegmentFactory */
            aload 1 /* array */
            invokeinterface java.util.function.Function.apply:(Ljava/lang/Object;)Ljava/lang/Object;
            checkcast jdk.incubator.foreign.MemorySegment
            aload 2 /* elementLayout */
            invokevirtual jdk.incubator.foreign.ValueLayout.byteSize:()J
            invokevirtual jdk.internal.foreign.AbstractMemorySegmentImpl.copyFromSwap:(Ljdk/incubator/foreign/MemorySegment;J)V
         8: .line 390
      StackMap locals:
      StackMap stack:
            aload 4 /* addr */
            areturn
        end local 4 // jdk.incubator.foreign.MemorySegment addr
        end local 3 // java.util.function.Function heapSegmentFactory
        end local 2 // jdk.incubator.foreign.ValueLayout elementLayout
        end local 1 // java.lang.Object array
        end local 0 // jdk.incubator.foreign.NativeScope this
      LocalVariableTable:
        Start  End  Slot                Name  Signature
            0    9     0                this  Ljdk/incubator/foreign/NativeScope;
            0    9     1               array  TZ;
            0    9     2       elementLayout  Ljdk/incubator/foreign/ValueLayout;
            0    9     3  heapSegmentFactory  Ljava/util/function/Function<TZ;Ljdk/incubator/foreign/MemorySegment;>;
            4    9     4                addr  Ljdk/incubator/foreign/MemorySegment;
    Signature: <Z:Ljava/lang/Object;>(TZ;Ljdk/incubator/foreign/ValueLayout;Ljava/util/function/Function<TZ;Ljdk/incubator/foreign/MemorySegment;>;)Ljdk/incubator/foreign/MemorySegment;
    MethodParameters:
                    Name  Flags
      array               
      elementLayout       
      heapSegmentFactory  

  public jdk.incubator.foreign.MemorySegment allocate(jdk.incubator.foreign.MemoryLayout);
    descriptor: (Ljdk/incubator/foreign/MemoryLayout;)Ljdk/incubator/foreign/MemorySegment;
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=5, locals=2, args_size=2
        start local 0 // jdk.incubator.foreign.NativeScope this
        start local 1 // jdk.incubator.foreign.MemoryLayout layout
         0: .line 402
            aload 1 /* layout */
            invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
            pop
         1: .line 403
            aload 0 /* this */
            aload 1 /* layout */
            invokeinterface jdk.incubator.foreign.MemoryLayout.byteSize:()J
            aload 1 /* layout */
            invokeinterface jdk.incubator.foreign.MemoryLayout.byteAlignment:()J
            invokeinterface jdk.incubator.foreign.NativeScope.allocate:(JJ)Ljdk/incubator/foreign/MemorySegment;
            areturn
        end local 1 // jdk.incubator.foreign.MemoryLayout layout
        end local 0 // jdk.incubator.foreign.NativeScope this
      LocalVariableTable:
        Start  End  Slot    Name  Signature
            0    2     0    this  Ljdk/incubator/foreign/NativeScope;
            0    2     1  layout  Ljdk/incubator/foreign/MemoryLayout;
    MethodParameters:
        Name  Flags
      layout  

  public jdk.incubator.foreign.MemorySegment allocateArray(jdk.incubator.foreign.MemoryLayout, long);
    descriptor: (Ljdk/incubator/foreign/MemoryLayout;J)Ljdk/incubator/foreign/MemorySegment;
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=4, locals=4, args_size=3
        start local 0 // jdk.incubator.foreign.NativeScope this
        start local 1 // jdk.incubator.foreign.MemoryLayout elementLayout
        start local 2 // long count
         0: .line 421
            aload 1 /* elementLayout */
            invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
            pop
         1: .line 422
            aload 0 /* this */
            lload 2 /* count */
            aload 1 /* elementLayout */
            invokestatic jdk.incubator.foreign.MemoryLayout.ofSequence:(JLjdk/incubator/foreign/MemoryLayout;)Ljdk/incubator/foreign/SequenceLayout;
            invokeinterface jdk.incubator.foreign.NativeScope.allocate:(Ljdk/incubator/foreign/MemoryLayout;)Ljdk/incubator/foreign/MemorySegment;
            areturn
        end local 2 // long count
        end local 1 // jdk.incubator.foreign.MemoryLayout elementLayout
        end local 0 // jdk.incubator.foreign.NativeScope this
      LocalVariableTable:
        Start  End  Slot           Name  Signature
            0    2     0           this  Ljdk/incubator/foreign/NativeScope;
            0    2     1  elementLayout  Ljdk/incubator/foreign/MemoryLayout;
            0    2     2          count  J
    MethodParameters:
               Name  Flags
      elementLayout  
      count          

  public jdk.incubator.foreign.MemorySegment allocate(long);
    descriptor: (J)Ljdk/incubator/foreign/MemorySegment;
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=5, locals=3, args_size=2
        start local 0 // jdk.incubator.foreign.NativeScope this
        start local 1 // long bytesSize
         0: .line 434
            aload 0 /* this */
            lload 1 /* bytesSize */
            lload 1 /* bytesSize */
            invokeinterface jdk.incubator.foreign.NativeScope.allocate:(JJ)Ljdk/incubator/foreign/MemorySegment;
            areturn
        end local 1 // long bytesSize
        end local 0 // jdk.incubator.foreign.NativeScope this
      LocalVariableTable:
        Start  End  Slot       Name  Signature
            0    1     0       this  Ljdk/incubator/foreign/NativeScope;
            0    1     1  bytesSize  J
    MethodParameters:
           Name  Flags
      bytesSize  

  public abstract jdk.incubator.foreign.MemorySegment allocate(long, long);
    descriptor: (JJ)Ljdk/incubator/foreign/MemorySegment;
    flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
    MethodParameters:
                Name  Flags
      bytesSize       
      bytesAlignment  

  public abstract void close();
    descriptor: ()V
    flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT

  public static jdk.incubator.foreign.NativeScope boundedScope(long);
    descriptor: (J)Ljdk/incubator/foreign/NativeScope;
    flags: (0x0009) ACC_PUBLIC, ACC_STATIC
    Code:
      stack=4, locals=2, args_size=1
        start local 0 // long size
         0: .line 462
            new jdk.internal.foreign.AbstractNativeScope$BoundedNativeScope
            dup
            lload 0 /* size */
            invokespecial jdk.internal.foreign.AbstractNativeScope$BoundedNativeScope.<init>:(J)V
            areturn
        end local 0 // long size
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0  size  J
    MethodParameters:
      Name  Flags
      size  

  public static jdk.incubator.foreign.NativeScope unboundedScope();
    descriptor: ()Ljdk/incubator/foreign/NativeScope;
    flags: (0x0009) ACC_PUBLIC, ACC_STATIC
    Code:
      stack=2, locals=0, args_size=0
         0: .line 470
            new jdk.internal.foreign.AbstractNativeScope$UnboundedNativeScope
            dup
            invokespecial jdk.internal.foreign.AbstractNativeScope$UnboundedNativeScope.<init>:()V
            areturn
      LocalVariableTable:
        Start  End  Slot  Name  Signature

  private static int lambda$8(jdk.incubator.foreign.Addressable);
    descriptor: (Ljdk/incubator/foreign/Addressable;)I
    flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
    Code:
      stack=2, locals=1, args_size=1
        start local 0 // jdk.incubator.foreign.Addressable a
         0: .line 370
            aload 0 /* a */
            invokeinterface jdk.incubator.foreign.Addressable.address:()Ljdk/incubator/foreign/MemoryAddress;
            invokeinterface jdk.incubator.foreign.MemoryAddress.toRawLongValue:()J
            l2i
            ireturn
        end local 0 // jdk.incubator.foreign.Addressable a
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0     a  Ljdk/incubator/foreign/Addressable;

  private static long lambda$10(jdk.incubator.foreign.Addressable);
    descriptor: (Ljdk/incubator/foreign/Addressable;)J
    flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
    Code:
      stack=2, locals=1, args_size=1
        start local 0 // jdk.incubator.foreign.Addressable a
         0: .line 373
            aload 0 /* a */
            invokeinterface jdk.incubator.foreign.Addressable.address:()Ljdk/incubator/foreign/MemoryAddress;
            invokeinterface jdk.incubator.foreign.MemoryAddress.toRawLongValue:()J
            lreturn
        end local 0 // jdk.incubator.foreign.Addressable a
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0     a  Ljdk/incubator/foreign/Addressable;
}
SourceFile: "NativeScope.java"
InnerClasses:
  public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles
  public abstract PathElement = jdk.incubator.foreign.MemoryLayout$PathElement of jdk.incubator.foreign.MemoryLayout
  public BoundedNativeScope = jdk.internal.foreign.AbstractNativeScope$BoundedNativeScope of jdk.internal.foreign.AbstractNativeScope
  public UnboundedNativeScope = jdk.internal.foreign.AbstractNativeScope$UnboundedNativeScope of jdk.internal.foreign.AbstractNativeScope