/* Scans a target buffer for a 64-bit value, and returns a pointer to the matching 64-bit value in the target buffer. */
CONST VOID* EFIAPI InternalMemScanMem64(IN CONST VOID *Buffer, IN UINTN Length, IN UINT64 Value)
/* Scans a target buffer for a 64-bit value, and returns a pointer to the matching 64-bit value in the target buffer. */
CONST VOID* EFIAPI InternalMemScanMem64(IN CONST VOID *Buffer, IN UINTN Length, IN UINT64 Value)
{
  CONST UINT64  *Pointer;
  Pointer = (CONST UINT64 *)Buffer;
  do {
    if (*(Pointer++) == Value) {
      return --Pointer;
    }
  } while (--Length != 0);
  return NULL;
}