/* The stream current position is rewound according to the stream direction (forward, backward). A stream going forward will be rewound backward. */
EFI_STATUS EFIAPI AmlStreamRewind(IN AML_STREAM *Stream, IN UINT32 Offset)
/* The stream current position is rewound according to the stream direction (forward, backward). A stream going forward will be rewound backward. */
EFI_STATUS EFIAPI AmlStreamRewind(IN AML_STREAM *Stream, IN UINT32 Offset)
{
  if (!IS_STREAM (Stream) ||
      (Offset == 0))
  {
    ASSERT (0);
    return EFI_INVALID_PARAMETER;
  }
  if (AmlStreamGetIndex (Stream) < Offset) {
    ASSERT (0);
    return EFI_BUFFER_TOO_SMALL;
  }
  Stream->Index -= Offset;
  return EFI_SUCCESS;
}