#include <intrin.h>

unsigned char _bittest64(__int64 const *Base, __int64 Offset)
{
  int old = 0;
  __asm__ __volatile__("btq %2,%1\n\tsbbl %0,%0 "
    :"=r" (old),"=m" ((*(volatile long long *) Base))
    :"Ir" (Offset) : "memory");
  return (old != 0);
}

