#ifndef FDR_COMPILE_INTERNAL_H
#define FDR_COMPILE_INTERNAL_H
#include "ue2common.h"
#include "hwlm/hwlm_literal.h"
#include "util/bytecode_ptr.h"
#include <map>
#include <utility>
#include <vector>
struct FDRConfirm;
struct LitInfo;
namespace ue2 {
typedef u32 LiteralIndex;
typedef u32 SuffixPositionInString; typedef u32 BucketIndex;
typedef u32 SchemeBitIndex;
typedef u32 PositionInBucket;
class EngineDescription;
class FDREngineDescription;
struct hwlmStreamingControl;
struct Grey;
bytecode_ptr<u8> setupFullConfs(
const std::vector<hwlmLiteral> &lits,
const EngineDescription &eng,
const std::map<BucketIndex, std::vector<LiteralIndex>> &bucketToLits,
bool make_small);
bytecode_ptr<u8> setupFDRFloodControl(const std::vector<hwlmLiteral> &lits,
const EngineDescription &eng,
const Grey &grey);
bytecode_ptr<u8>
fdrBuildTableStreaming(const std::vector<hwlmLiteral> &lits,
hwlmStreamingControl &stream_control);
static constexpr u32 HINT_INVALID = 0xffffffff;
size_t maxLen(const std::vector<hwlmLiteral> &lits);
size_t minLenCount(const std::vector<hwlmLiteral> &lits, size_t *count);
u32 absdiff(u32 i, u32 j);
}
#endif