// Path: src/main/java/org/lmdbjava/UnsafeAccess.java
// static final Unsafe UNSAFE;


import org.agrona.MutableDirectBuffer;
import org.agrona.concurrent.OneToOneConcurrentArrayQueue;
import org.agrona.concurrent.UnsafeBuffer;
import static java.lang.ThreadLocal.withInitial;
import static java.nio.ByteBuffer.allocateDirect;
import static java.nio.ByteOrder.BIG_ENDIAN;
import static java.util.Objects.requireNonNull;
import static org.lmdbjava.UnsafeAccess.UNSAFE;
import java.nio.ByteBuffer;
import jnr.ffi.Pointer;
import org.agrona.DirectBuffer;
    return compareBuff(o1, o2);
  }

  @Override
  protected void deallocate(final DirectBuffer buff) {
    final OneToOneConcurrentArrayQueue<DirectBuffer> q = BUFFERS.get();
    q.offer(buff);
  }

  @Override
  protected byte[] getBytes(final DirectBuffer buffer) {
    final byte[] dest = new byte[buffer.capacity()];
    buffer.getBytes(0, dest, 0, buffer.capacity());
    return dest;
  }

  @Override
  protected void in(final DirectBuffer buffer, final Pointer ptr,
                    final long ptrAddr) {
    final long addr = buffer.addressOffset();
    final long size = buffer.capacity();
    UNSAFE.putLong(ptrAddr + STRUCT_FIELD_OFFSET_DATA, addr);
    UNSAFE.putLong(ptrAddr + STRUCT_FIELD_OFFSET_SIZE, size);
  }

  @Override
  protected void in(final DirectBuffer buffer, final int size, final Pointer ptr,
                    final long ptrAddr) {
    final long addr = buffer.addressOffset();
    UNSAFE.putLong(ptrAddr + STRUCT_FIELD_OFFSET_DATA, addr);
// Path: src/main/java/org/lmdbjava/UnsafeAccess.java
// static final Unsafe UNSAFE;


// Path: src/main/java/org/lmdbjava/DirectBufferProxy.java
import org.agrona.MutableDirectBuffer;
import org.agrona.concurrent.OneToOneConcurrentArrayQueue;
import org.agrona.concurrent.UnsafeBuffer;
import static java.lang.ThreadLocal.withInitial;
import static java.nio.ByteBuffer.allocateDirect;
import static java.nio.ByteOrder.BIG_ENDIAN;
import static java.util.Objects.requireNonNull;
import static org.lmdbjava.UnsafeAccess.UNSAFE;
import java.nio.ByteBuffer;
import jnr.ffi.Pointer;
import org.agrona.DirectBuffer;

    return compareBuff(o1, o2);
  }

  @Override
  protected void deallocate(final DirectBuffer buff) {
    final OneToOneConcurrentArrayQueue<DirectBuffer> q = BUFFERS.get();
    q.offer(buff);
  }

  @Override
  protected byte[] getBytes(final DirectBuffer buffer) {
    final byte[] dest = new byte[buffer.capacity()];
    buffer.getBytes(0, dest, 0, buffer.capacity());
    return dest;
  }

  @Override
  protected void in(final DirectBuffer buffer, final Pointer ptr,
                    final long ptrAddr) {
    final long addr = buffer.addressOffset();
    final long size = buffer.capacity();
    UNSAFE.putLong(ptrAddr + STRUCT_FIELD_OFFSET_DATA, addr);
    UNSAFE.putLong(ptrAddr + STRUCT_FIELD_OFFSET_SIZE, size);
  }

  @Override
  protected void in(final DirectBuffer buffer, final int size, final Pointer ptr,
                    final long ptrAddr) {
    final long addr = buffer.addressOffset();
    UNSAFE.putLong(ptrAddr + STRUCT_FIELD_OFFSET_DATA, addr);
    UNSAFE.putLong(ptrAddr + STRUCT_FIELD_OFFSET_SIZE, size);