<|start_filename|>tests/ctests/ext-example/example.h<|end_filename|>
#ifndef EXT_EXAMPLE_H__
#define EXT_EXAMPLE_H__

#include "redisearch.h"

#define EXPANDER_NAME "EXAMPLE_EXPANDER"
#define SCORER_NAME "EXAMPLE_SCORER"

const char *extentionName = "EXAMPLE_EXTENSION";

int RS_ExtensionInit(RSExtensionCtx *ctx);

#endif

<|start_filename|>src/dep/libnu/utf32le.h<|end_filename|>
#ifndef NU_UTF32LE_H
#define NU_UTF32LE_H

#include <stdint.h>
#include <sys/types.h>

#include "config.h"
#include "defines.h"
#include "utf32_internal.h"

#if defined (__cplusplus) || defined (c_plusplus)
extern "C" {
#endif

#ifdef NU_WITH_UTF32LE_READER

/**
 * @ingroup utf32
 * @see nu_utf16le_read
 */
static inline
const char* nu_utf32le_read(const char *utf32, uint32_t *unicode) {
	if (unicode != 0) {
		*unicode = nu_letohl(utf32);
	}

	return utf32 + 4;
}

#ifdef NU_WITH_REVERSE_READ

/*
 * @ingroup utf32
 * @see nu_utf16le_revread
 */
static inline
const char* nu_utf32le_revread(uint32_t *unicode, const char *utf32) {
	const char *p = utf32 - 4;

	if (unicode != 0) {
		nu_utf32le_read(p, unicode);
	}

	return p;
}

#endif /* NU_WITH_REVERSE_READ */

#ifdef NU_WITH_VALIDATION

/**
 * @ingroup utf32
 * @see nu_utf16le_validread
 */
NU_EXPORT
int nu_utf32le_validread(const char *p, size_t max_len);

#endif /* NU_WITH_VALIDATION */
#endif /* NU_WITH_UTF32LE_READER */

#ifdef NU_WITH_UTF32LE_WRITER

/**
 * @ingroup utf32
 * @see nu_utf16le_write
 */
NU_EXPORT
char* nu_utf32le_write(uint32_t unicode, char *utf32);

#endif /* NU_WITH_UTF32LE_WRITER */

#if defined (__cplusplus) || defined (c_plusplus)
}
#endif

#endif /* NU_UTF32LE_H */


<|start_filename|>src/dep/libnu/utf16he.c<|end_filename|>
#include "utf16he.h"
#include "utf16_internal.h"

#ifdef NU_WITH_UTF16HE_READER
#ifdef NU_WITH_VALIDATION

int nu_utf16he_validread(const char *encoded, size_t max_len) {
	if (max_len < 2) {
		return 0;
	}

	char lead = (*(uint16_t *)(encoded) & 0xFF00) >> 8;

	if (utf16_valid_lead(lead) != 0) {
		if (max_len < 4) {
			return 0;
		}

		char trail = (*(uint16_t *)(encoded + 2) & 0xFF00) >> 8;

		if (utf16_valid_trail(trail) == 0) {
			return 0;
		}

		return 4;
	}

	if (utf16_valid_trail(lead) != 0) {
		return 0;
	}

	return 2;
}

#endif /* NU_WITH_VALIDATION */
#endif /* NU_WITH_UTF16HE_READER */

#ifdef NU_WITH_UTF16HE_WRITER

char* nu_utf16he_write(uint32_t unicode, char *utf16) {
	unsigned codepoint_len = utf16_codepoint_length(unicode);

	if (utf16 != 0) {
		switch (codepoint_len) {
			case 2: *(uint16_t *)(utf16) = (uint16_t)(unicode); break;
			default: { /* len == 4 */
				uint16_t c0 = 0, c1 = 0;
				b4_utf16(unicode, &c0, &c1);
				*(uint16_t *)(utf16) = c0;
				*(uint16_t *)(utf16 + 2) = c1;
				break;
			}
		}
	}

	return utf16 + codepoint_len;
}

#endif /* NU_WITH_UTF16HE_WRITER */


<|start_filename|>tests/ctests/ext-example/Makefile<|end_filename|>
#set environment variable RS_INCLUDE_DIR to the location of redismodule.h
ifndef RS_INCLUDE_DIR
	RS_INCLUDE_DIR=../../
endif

# find the OS
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
CFLAGS = -I$(RS_INCLUDE_DIR) -Wall -g -fPIC -O0 -std=gnu99  
CC:=$(shell sh -c 'type $(CC) >/dev/null 2>/dev/null && echo $(CC) || echo gcc')

# Compile flags for non-osx / osx
ifneq ($(uname_S),Darwin)
	SHOBJ_CFLAGS ?=  -fno-common -g -ggdb
	SHOBJ_LDFLAGS ?= -shared -Bsymbolic
else
	CFLAGS += -mmacosx-version-min=10.6
	SHOBJ_CFLAGS ?= -dynamic -fno-common -g -ggdb
	SHOBJ_LDFLAGS ?= -dylib -exported_symbol _RS_ExtensionInit -macosx_version_min 10.6
endif

all: example.so

example.so: example.o
	$(LD) -o $@ example.o $(SHOBJ_LDFLAGS) $(LIBS) -lc 

clean:
	rm -rf *.xo *.so *.o

FORCE:

<|start_filename|>src/dep/triemap/test/time_sample.h<|end_filename|>
#ifndef __RL_TIME_SAMPLE__
#define __RL_TIME_SAMPLE__

#include <sys/time.h>
#include <stdio.h>
#include <sys/time.h>
#include <time.h>

typedef struct {
  struct timespec startTime;
  struct timespec endTime;
  long long durationNS;
  int num;
} TimeSample;

static void TimeSampler_Reset(TimeSample *ts) {
  ts->num = 0;
  ts->durationNS = 0;
  ts->startTime.tv_nsec = 0;
  ts->startTime.tv_sec = 0;
}
static void TimeSampler_Start(TimeSample *ts) {
  clock_gettime(CLOCK_REALTIME, &ts->startTime);
  ts->num = 0;
  ts->durationNS = 0;
}

static void TimeSampler_StartSection(TimeSample *ts) {
  clock_gettime(CLOCK_REALTIME, &ts->startTime);
}

static void TimeSampler_EndSection(TimeSample *ts) {

  clock_gettime(CLOCK_REALTIME, &ts->endTime);

  ts->durationNS +=
      ((long long)1000000000 * ts->endTime.tv_sec + ts->endTime.tv_nsec) -
      ((long long)1000000000 * ts->startTime.tv_sec + ts->startTime.tv_nsec);
}

static void TimeSampler_Tick(TimeSample *ts) { ++ts->num; }
static void TimeSampler_End(TimeSample *ts) {

  clock_gettime(CLOCK_REALTIME, &ts->endTime);

  ts->durationNS =
      ((long long)1000000000 * ts->endTime.tv_sec + ts->endTime.tv_nsec) -
      ((long long)1000000000 * ts->startTime.tv_sec + ts->startTime.tv_nsec);
}

static long long TimeSampler_DurationNS(TimeSample *ts) {

  return ts->durationNS;
}

static long long TimeSampler_DurationMS(TimeSample *ts) {

  return ts->durationNS / 1000000;
}

static double TimeSampler_DurationSec(TimeSample *ts) {

  return (double)ts->durationNS / 1000000000.0;
}

static double TimeSampler_IterationSec(TimeSample *ts) {

  return ((double)ts->durationNS / 1000000000.0) /
         (double)(ts->num ? ts->num : 1.0);
}

static double TimeSampler_IterationMS(TimeSample *ts) {

  return ((double)ts->durationNS / 1000000.0) /
         (double)(ts->num ? ts->num : 1.0);
}

static double TimeSampler_IterationNS(TimeSample *ts) {

  return (double)ts->durationNS /
         (double)(ts->num ? ts->num : 1.0);
}

#define TIME_SAMPLE_RUN(blk)                                                   \
  {                                                                            \
    TimeSample ts;                                                             \
    TimeSampler_Start(&ts);                                                    \
    { blk; };                                                                  \
    TimeSampler_End(&ts);                                                      \
    printf("Execution time for " #blk ": %f seconds\n",                        \
           TimeSampler_DurationSec(&ts));                                      \
  }

#define TIME_SAMPLE_BLOCK(ts, blk) \
  {                                \
    TimeSampler_StartSection(&ts); \
    blk;\
    TimeSampler_EndSection(&ts);\
    TimeSampler_Tick(&ts);\
  }

  
#define TIME_SAMPLE_RUN_LOOP(N, blk)                                           \
  {                                                                            \
    TimeSample ts;                                                             \
    TimeSampler_Start(&ts);                                                    \
    for (int __ts_loop = 0; __ts_loop < N; __ts_loop++) {                      \
      blk;                                                                     \
      TimeSampler_Tick(&ts);                                                   \
    };                                                                         \
    TimeSampler_End(&ts);                                                      \
    printf("Execution time for %d iterations of " #blk                         \
           ": %f msec/iteration\n",                                         \
           ts.num, TimeSampler_IterationMS(&ts));                             \
  }

#endif

<|start_filename|>src/util/misc.h<|end_filename|>
#ifndef RS_MISC_H
#define RS_MISC_H

#include "redismodule.h"

/**
 * This handler crashes
 */
void GenericAofRewrite_DisabledHandler(RedisModuleIO *aof, RedisModuleString *key, void *value);

char *strtolower(char *str);

#endif

<|start_filename|>src/search_ctx.h<|end_filename|>
#ifndef __SEARCH_CTX_H
#define __SEARCH_CTX_H

#include <sched.h>

#include "redismodule.h"
#include "spec.h"
#include "concurrent_ctx.h"
#include "trie/trie_type.h"
#include <time.h>

#ifdef __cplusplus
extern "C" {
#endif

#if defined(__FreeBSD__)
#define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC
#endif

/** Context passed to all redis related search handling functions. */
typedef struct RedisSearchCtx {
  RedisModuleCtx *redisCtx;
  RedisModuleKey *key_;
  IndexSpec *spec;
  uint32_t refcount;
  int isStatic;
  uint64_t specId;  // Unique id of the spec; used when refreshing
} RedisSearchCtx;

#define SEARCH_CTX_STATIC(ctx, sp) \
  { ctx, NULL, sp, 0, 1 }

#define SEARCH_CTX_SORTABLES(ctx) ((ctx && ctx->spec) ? ctx->spec->sortables : NULL)
// Create a string context on the heap
RedisSearchCtx *NewSearchCtx(RedisModuleCtx *ctx, RedisModuleString *indexName, bool resetTTL);
RedisSearchCtx *NewSearchCtxDefault(RedisModuleCtx *ctx);

RedisSearchCtx *SearchCtx_Refresh(RedisSearchCtx *sctx, RedisModuleString *keyName);

// Same as above, only from c string (null terminated)
RedisSearchCtx *NewSearchCtxC(RedisModuleCtx *ctx, const char *indexName, bool resetTTL);

#define SearchCtx_Incref(sctx) \
  ({                           \
    (sctx)->refcount++;        \
    sctx;                      \
  })

#define SearchCtx_Decref(sctx) \
  if (!--((sctx)->refcount)) { \
    SearchCtx_Free(sctx);      \
  }

void SearchCtx_Free(RedisSearchCtx *sctx);
#ifdef __cplusplus
}
#endif
#endif


<|start_filename|>src/trie/sparse_vector.h<|end_filename|>
#ifndef __SPARSEVECTOR_H__
#define __SPARSEVECTOR_H__

#include <stdlib.h>

typedef struct { 
    int idx, val; 
} sparseVectorEntry;

// sparseVector is a crude implementation of a sparse vector for our needs
typedef struct {
    size_t len;
    size_t cap;
    sparseVectorEntry entries[];
} sparseVector;

size_t __sv_sizeof(size_t cap);

sparseVector *__sv_resize(sparseVector *v, size_t cap);
sparseVector *newSparseVectorCap(size_t cap);

// append appends another sparse vector entry with the given index and value.
// NOTE: We do not check
// that an entry with the same index is present in the vector
void sparseVector_append(sparseVector **v, int index, int value);

// newSparseVector creates a new sparse vector with the initial values of the
// dense int slice given to it
sparseVector *newSparseVector(int *values, int len);

void sparseVector_free(sparseVector *v);
#endif

<|start_filename|>src/util/bsearch.h<|end_filename|>
#ifndef RSBSEARCH_H
#define RSBSEARCH_H

#ifdef __cplusplus
extern "C" {
#endif

#include <stdlib.h>
#include <assert.h>

/**
 * Compare two elements; return <0, 0, or >0 if s is less than, equal to, or
 * greater than elem.
 *
 * `s` is the target to locate, and `elem` is an array element.
 */
typedef int (*rsbcompare)(const void *s, const void *elem);

/**
 * In order to locate a range between A and B, the proper indexes must be found.
 * The beginning index is going to be the first element which is >= A, and the
 * end index is going to be the first element which is >= B
 */

/**
 * Find the index of the first element in the sorted array which is greater than,
 * or equal to the provided item. The array must not have duplicate items.
 *
 * @param arr the array
 * @param narr the array to search for
 * @param elemsz element width/stride
 * @param begin the first element to search (usually 0)
 * @param end one after the last element to search (usually narr)
 * @param s the item to search for
 * @param cmp the comparison function
 * @return `end`
 */
static inline int rsb_gt(const void *arr, size_t narr, size_t elemsz, const void *s,
                         rsbcompare cmp) {
  size_t begin = 0;
  size_t end = narr - 1;

  while (begin < end) {
    size_t cur = (begin + end) / 2;
    size_t tmpidx = cur * elemsz;
    const void *p = ((const char *)arr) + tmpidx;
    int rc = cmp(s, p);
    if (rc == 0) {
      // Matches!
      begin = cur + 1;
    } else if (rc < 0) {
      end = cur;
    } else {
      begin = cur + 1;
    }
  }
  assert(begin == end);
  if (begin != narr - 1) {
    return begin;  // we found what we was looking for!
  }
  size_t tmpidx = begin * elemsz;
  const void *p = ((const char *)arr) + tmpidx;
  int rc = cmp(s, p);
  if (rc >= 0) {
    begin += 1;  // we could not find what we was looking for
  }
  return begin;
}

static inline int rsb_lt(const void *arr, size_t narr, size_t elemsz, const void *s,
                         rsbcompare cmp) {
  size_t begin = 0;
  size_t end = narr - 1;

  while (begin < end) {
    size_t cur = ((begin + end) / 2) + ((begin + end) % 2);
    size_t tmpidx = cur * elemsz;
    const void *p = ((const char *)arr) + tmpidx;
    int rc = cmp(s, p);
    if (rc == 0) {
      // Matches!
      end = cur - 1;
    } else if (rc < 0) {
      end = cur - 1;
    } else {
      begin = cur;
    }
  }
  assert(begin == end);
  if (begin != 0) {
    return begin;  // we found what we was looking for!
  }
  size_t tmpidx = begin * elemsz;
  const void *p = ((const char *)arr) + tmpidx;
  int rc = cmp(s, p);
  if (rc <= 0) {
    return begin -= 1;  // what we are looking for does not exists
  }
  return begin;
}

static inline int rsb_eq(const void *arr, size_t narr, size_t elemsz, const void *s,
                         rsbcompare cmp) {
  size_t begin = 0;
  size_t end = narr - 1;

  while (begin < end) {
    size_t cur = ((begin + end) / 2) + ((begin + end) % 2);
    size_t tmpidx = cur * elemsz;
    const void *p = ((const char *)arr) + tmpidx;
    int rc = cmp(s, p);
    if (rc == 0) {
      // Matches!
      return cur;
    } else if (rc < 0) {
      end = cur - 1;
    } else {
      begin = cur;
    }
  }
  assert(begin == end);
  size_t tmpidx = begin * elemsz;
  const void *p = ((const char *)arr) + tmpidx;
  return cmp(s, p) == 0 ? begin : -1;
}

#ifdef __cplusplus
}
#endif
#endif


<|start_filename|>src/byte_offsets.h<|end_filename|>
#ifndef BYTE_OFFSETS_H
#define BYTE_OFFSETS_H

#include "redisearch.h"
#include "varint.h"
#include "rmalloc.h"

typedef struct __attribute__((packed)) RSByteOffsetMap {
  // ID this belongs to.
  uint16_t fieldId;

  // The position of the first token for this field.
  uint32_t firstTokPos;

  // Position of last token for this field
  uint32_t lastTokPos;
} RSByteOffsetField;

typedef struct RSByteOffsets {
  // By-Byte offsets
  RSOffsetVector offsets;
  // List of field-id <-> position mapping
  RSByteOffsetField *fields;
  // How many fields
  uint8_t numFields;
} RSByteOffsets;

RSByteOffsets *NewByteOffsets();

void RSByteOffsets_Free(RSByteOffsets *offsets);

// Reserve memory for this many fields
void RSByteOffsets_ReserveFields(RSByteOffsets *offsets, size_t numFields);

// Add a field to the offset map. Note that you cannot add more fields than
// initially declared via ReserveFields
// The start position is the position of the first token in this field.
// The field info is returned, and the last position should be written to it
// when done.
RSByteOffsetField *RSByteOffsets_AddField(RSByteOffsets *offsets, uint32_t fieldId,
                                          uint32_t startPos);

void RSByteOffsets_Serialize(const RSByteOffsets *offsets, Buffer *b);
RSByteOffsets *LoadByteOffsets(Buffer *buf);

typedef VarintVectorWriter ByteOffsetWriter;

void ByteOffsetWriter_Move(ByteOffsetWriter *w, RSByteOffsets *offsets);

static inline void ByteOffsetWriter_Init(ByteOffsetWriter *w) {
  VVW_Init(w, 16);
}

static inline void ByteOffsetWriter_Cleanup(ByteOffsetWriter *w) {
  VVW_Cleanup(w);
}

static inline void ByteOffsetWriter_Write(ByteOffsetWriter *w, uint32_t offset) {
  VVW_Write(w, offset);
}

/**
 * Iterator which yields the byte offset for a given position
 */
typedef struct {
  BufferReader rdr;
  Buffer buf;
  uint32_t lastValue;
  uint32_t curPos;
  uint32_t endPos;
} RSByteOffsetIterator;

#define RSBYTEOFFSET_EOF ((uint32_t)-1)

/**
 * Begin iterating over the byte offsets for a given field. Returns REDISMODULE_ERR
 * if the field does not exist in the current byte offset
 */
int RSByteOffset_Iterate(const RSByteOffsets *offsets, uint32_t fieldId,
                         RSByteOffsetIterator *iter);

/**
 * Returns the next byte offset for the given position. The current position
 * can be obtained using the curPos variable. If this function returns
 * RSBYTEOFFSET_EOF then the iterator is at the end of the token stream.
 */
uint32_t RSByteOffsetIterator_Next(RSByteOffsetIterator *iter);

#endif

<|start_filename|>src/varint.h<|end_filename|>
#ifndef __VARINT_H__
#define __VARINT_H__

#include <stdlib.h>
#include <sys/types.h>
#include <stdint.h>
#include "buffer.h"
#include "redisearch.h"

#ifdef __cplusplus
extern "C" {
#endif
/* Read an encoded integer from the buffer. It is assumed that the buffer will not overflow */
static inline uint32_t ReadVarint(BufferReader *b) {

  unsigned char c = BUFFER_READ_BYTE(b);

  uint32_t val = c & 127;
  while (c >> 7) {
    ++val;
    c = BUFFER_READ_BYTE(b);
    val = (val << 7) | (c & 127);
  }

  return val;
}

static inline t_fieldMask ReadVarintFieldMask(BufferReader *b) {

  unsigned char c = BUFFER_READ_BYTE(b);

  t_fieldMask val = c & 127;
  while (c >> 7) {
    ++val;
    c = BUFFER_READ_BYTE(b);
    val = (val << 7) | (c & 127);
  }

  return val;
}

size_t WriteVarint(uint32_t value, BufferWriter *w);

size_t WriteVarintFieldMask(t_fieldMask value, BufferWriter *w);

typedef struct {
  Buffer buf;
  // how many members we've put in
  size_t nmemb;
  uint32_t lastValue;
} VarintVectorWriter;

#define MAX_VARINT_LEN 5

VarintVectorWriter *NewVarintVectorWriter(size_t cap);
size_t VVW_Write(VarintVectorWriter *w, uint32_t i);
size_t VVW_Truncate(VarintVectorWriter *w);
void VVW_Free(VarintVectorWriter *w);
void VVW_Init(VarintVectorWriter *w, size_t cap);

static inline void VVW_Cleanup(VarintVectorWriter *w) {
  Buffer_Free(&w->buf);
  memset(&w->buf, 0, sizeof w->buf);
}

static inline void VVW_Reset(VarintVectorWriter *w) {
  w->lastValue = 0;
  w->nmemb = 0;
  w->buf.offset = 0;
}

#define VVW_GetCount(vvw) ((vvw) ? (vvw)->nmemb : 0)
#define VVW_GetByteLength(vvw) ((vvw) ? (vvw)->buf.offset : 0)
#define VVW_GetByteData(vvw) ((vvw) ? (vvw)->buf.data : NULL)
#define VVW_OFFSETVECTOR_INIT(vvw) \
  { .data = VVW_GetByteData(vvw), .len = VVW_GetByteLength(vvw) }

#ifdef __cplusplus
}
#endif
#endif


<|start_filename|>src/suggest.h<|end_filename|>
#ifndef RS_SUGGEST_H
#define RS_SUGGEST_H
#include "redismodule.h"
#ifdef __cplusplus
extern "C" {
#endif

int RSSuggestAddCommand(RedisModuleCtx *, RedisModuleString **, int);
int RSSuggestDelCommand(RedisModuleCtx *, RedisModuleString **, int);
int RSSuggestLenCommand(RedisModuleCtx *, RedisModuleString **, int);
int RSSuggestGetCommand(RedisModuleCtx *, RedisModuleString **, int);

#ifdef __cplusplus
}
#endif
#endif

<|start_filename|>src/info_command.h<|end_filename|>
#include "redismodule.h"
#ifndef INFO_COMMAND_H
#define INFO_COMMAND_H

#ifdef __cplusplus
extern "C" {
#endif
int IndexInfoCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc);
#ifdef __cplusplus
}
#endif
#endif

<|start_filename|>src/fork_gc.h<|end_filename|>

#ifndef SRC_FORK_GC_H_
#define SRC_FORK_GC_H_

#include "redismodule.h"
#include "gc.h"

#ifdef __cplusplus
extern "C" {
#endif

struct IndexSpec;

typedef struct {
  // total bytes collected by the GC
  size_t totalCollected;
  // number of cycle ran
  size_t numCycles;

  long long totalMSRun;
  long long lastRunTimeMs;

  uint64_t gcNumericNodesMissed;
  uint64_t gcBlocksDenied;
} ForkGCStats;

typedef enum FGCType { FGC_TYPE_INKEYSPACE, FGC_TYPE_NOKEYSPACE } FGCType;

/* Internal definition of the garbage collector context (each index has one) */
typedef struct ForkGC {

  // inverted index key name for reopening the index
  union {
    const RedisModuleString *keyName;
    struct IndexSpec *sp;
  };

  RedisModuleCtx *ctx;

  FGCType type;

  uint64_t specUniqueId;

  // statistics for reporting
  ForkGCStats stats;

  // flag for rdb loading. Set to 1 initially, but unce it's set to 0 we don't need to check anymore
  int rdbPossiblyLoading;
  // Whether the gc has been requested for deletion
  volatile int deleting;
  int pipefd[2];
  volatile uint32_t pauseState;
  volatile uint32_t execState;

  struct timespec retryInterval;
  volatile size_t deletedDocsFromLastRun;
} ForkGC;

ForkGC *FGC_New(const RedisModuleString *k, uint64_t specUniqueId, GCCallbacks *callbacks);
ForkGC *FGC_NewFromSpec(struct IndexSpec *sp, uint64_t specUniqueId, GCCallbacks *callbacks);

typedef enum {
  // Normal "open" state. No pausing will happen
  FGC_PAUSED_UNPAUSED = 0x00,
  // Prevent invoking the child. The child is not invoked until this flag is
  // cleared
  FGC_PAUSED_CHILD = 0x01,
  // Prevent the parent reading from the child. The results from the child are
  // not read until this flag is cleared.
  FGC_PAUSED_PARENT = 0x02
} FGCPauseFlags;

typedef enum {
  // Idle, "normal" state
  FGC_STATE_IDLE = 0,

  // Set when the PAUSED_CHILD flag is set, indicates that we are
  // awaiting this flag to be cleared.
  FGC_STATE_WAIT_FORK,

  // Set when the child has been launched, but before the first results have
  // been applied.
  FGC_STATE_SCANNING,

  // Set when the PAUSED_PARENT flag is set. The results will not be
  // scanned until the PAUSED_PARENT flag is unset
  FGC_STATE_WAIT_APPLY,

  // Set when results are being applied from the child to the parent
  FGC_STATE_APPLYING
} FGCState;

/**
 * Indicate that the gc should wait immediately prior to
 * forking. This is in order to perform some commands which
 * may not be visible by the fork gc engine.
 *
 * This function will return before the fork is performed. You
 * must call WaitAtApply or WaitClear to allow the GC to
 * resume functioning
 */
void FGC_WaitAtFork(ForkGC *gc);

/**
 * Indicate that the GC should unpause from WaitAtFork, and
 * instead wait before the changes are applied. This is in order
 * to change the state of the index at the parent
 */
void FGC_WaitAtApply(ForkGC *gc);

/**
 * Don't perform diagnostic waits
 */
void FGC_WaitClear(ForkGC *gc);

#ifdef __cplusplus
}
#endif

#endif /* SRC_FORK_GC_H_ */


<|start_filename|>src/util/khtable.c<|end_filename|>
#include "khtable.h"
#include <stdlib.h>
#include <string.h>
#include "rmalloc.h"

static uint32_t primes[] = {5ul,         11ul,        23ul,      47ul,       97ul,       199ul,
                            409ul,       823ul,       1741ul,    3469ul,     6949ul,     14033ul,
                            28411ul,     57557ul,     116731ul,  236897ul,   480881ul,   976369ul,
                            1982627ul,   4026031ul,   8175383ul, 16601593ul, 33712729ul, 68460391ul,
                            139022417ul, 282312799ul, 0};

void KHTable_Init(KHTable *table, const KHTableProcs *procs, void *ctx, size_t estSize) {
  // Traverse a list of primes until we find one suitable
  uint32_t *p;
  for (p = primes; *p; p++) {
    if (*p > estSize) {
      table->numBuckets = *p;
      break;
    }
  }
  if (*p == 0) {
    p--;
    table->numBuckets = *p;
  }

  table->buckets = rm_calloc(sizeof(*table->buckets), table->numBuckets);
  table->numItems = 0;
  table->procs = *procs;
  table->alloc = ctx;
}

void KHTable_Free(KHTable *table) {
  rm_free(table->buckets);
}

void KHTable_Clear(KHTable *table) {
  memset(table->buckets, 0, sizeof(*table->buckets) * table->numBuckets);
  table->numItems = 0;
}

static int KHTable_Rehash(KHTable *table) {
  // Find new capacity
  size_t newCapacity = 0;
  for (uint32_t *p = primes; *p; p++) {
    if (*p > table->numItems) {
      newCapacity = *p;
      break;
    }
  }

  if (!newCapacity) {
    return 0;
  }

  // printf("Rehashing %lu -> %lu\n", table->numBuckets, newCapacity);

  KHTableEntry **newEntries = rm_calloc(newCapacity, sizeof(*table->buckets));
  for (size_t ii = 0; ii < table->numBuckets; ++ii) {

    KHTableEntry *cur = table->buckets[ii];
    while (cur) {
      uint32_t hash = table->procs.Hash(cur);
      KHTableEntry **newBucket = newEntries + (hash % newCapacity);
      KHTableEntry *next = cur->next;
      if (*newBucket) {
        cur->next = *newBucket;
      } else {
        cur->next = NULL;
      }
      *newBucket = cur;
      cur = next;
    }
  }

  rm_free(table->buckets);
  table->buckets = newEntries;
  table->numBuckets = newCapacity;

  return 1;
}

static KHTableEntry *KHTable_InsertNewEntry(KHTable *table, uint32_t hash,
                                            KHTableEntry **bucketHead) {
  if (++table->numItems == table->numBuckets) {
    KHTable_Rehash(table);
    bucketHead = table->buckets + (hash % table->numBuckets);
  }
  KHTableEntry *entry = table->procs.Alloc(table->alloc);
  if (*bucketHead) {
    entry->next = *bucketHead;
  } else {
    entry->next = NULL;
  }
  *bucketHead = entry;
  return entry;
}

/**
 * Return an entry for the given key, creating one if it does not already exist.
 */
KHTableEntry *KHTable_GetEntry(KHTable *table, const void *s, size_t n, uint32_t hash, int *isNew) {
  // Find the bucket
  uint32_t ix = hash % table->numBuckets;
  KHTableEntry **bucket = table->buckets + ix;

  if (*bucket == NULL) {
    if (!isNew) {
      return NULL;
    }
    *isNew = 1;
    // Most likely case - no need for rehashing
    if (++table->numItems != table->numBuckets) {
      *bucket = table->procs.Alloc(table->alloc);
      (*bucket)->next = NULL;
      return *bucket;
    } else {
      KHTable_Rehash(table);
      KHTableEntry *ret =
          KHTable_InsertNewEntry(table, hash, table->buckets + (hash % table->numBuckets));
      // Decrement the count again
      table->numItems--;
      return ret;
    }
  }

  for (KHTableEntry *cur = *bucket; cur; cur = cur->next) {
    if (table->procs.Compare(cur, s, n, hash) == 0) {
      return cur;
    }
  }

  if (!isNew) {
    return NULL;
  }

  *isNew = 1;
  return KHTable_InsertNewEntry(table, hash, bucket);
}

void KHTableIter_Init(KHTable *ht, KHTableIterator *iter) {
  iter->ht = ht;
  iter->curBucket = 0;
  iter->cur = ht->buckets[iter->curBucket];
}

KHTableEntry *KHtableIter_Next(KHTableIterator *iter) {
  KHTableEntry *ret = iter->cur;

  if (!iter->cur) {
    for (++iter->curBucket; iter->curBucket < iter->ht->numBuckets; ++iter->curBucket) {
      iter->cur = iter->ht->buckets[iter->curBucket];
      if (iter->cur) {
        ret = iter->cur;
        break;
      }
    }
  }

  if (iter->cur) {
    iter->cur = iter->cur->next;
  }
  return ret;
}

void KHTable_FreeEx(KHTable *table, void *arg,
                    void (*Free)(KHTableEntry *e, void *ctx, void *arg)) {
  KHTableIterator iter;
  KHTableIter_Init(table, &iter);
  KHTableEntry *ent;
  while ((ent = KHtableIter_Next(&iter))) {
    Free(ent, table->alloc, arg);
  }
  KHTable_Free(table);
}

static void khTable_Dump(const KHTable *table, FILE *fp) {
  printf("Table=%p\n", table);
  printf("NumEntries: %lu\n", table->numItems);
  printf("NumBuckets: %lu\n", table->numBuckets);
  for (size_t ii = 0; ii < table->numBuckets; ++ii) {
    KHTableEntry *baseEnt = table->buckets[ii];
    if (!baseEnt) {
      continue;
    }
    printf("Bucket[%lu]\n", ii);
    for (; baseEnt; baseEnt = baseEnt->next) {
      printf("   => ");
      if (table->procs.Print) {
        table->procs.Print(baseEnt, fp);
      } else {
        fprintf(fp, "%p", baseEnt);
      }
    }
  }
}


<|start_filename|>src/dep/libnu/strings.h<|end_filename|>
#ifndef NU_STRINGS_H
#define NU_STRINGS_H

/** @defgroup strings String functions
 *
 * Note on "n" functions variant: "n" is in bytes in all functions,
 * note though that those are not for memory overrun control.
 * They are just for strings not having terminating 0 byte and those
 * functions won't go further than m-th *codepoint* in string, but might go
 * further than n-th byte in case of multibyte sequence.
 *
 * E.g.: ``nu_strnlen("абв", 3, nu_utf8_read);``.
 * Since codepoints are 2-byte sequences, nu_strnlen() won't go further than 2nd
 * codepoint, but will go further than 3rd byte while reading "б".
 */

/** @defgroup transformations Codepoint transformations
 *
 * @example folding.c
 */

/** @defgroup transformations_internal Codepoint transformations (internal)
 *
 * @example special_casing.c
 */

#include <stdint.h>
#include <sys/types.h>

#include "config.h"
#include "defines.h"

#if defined (__cplusplus) || defined (c_plusplus)
extern "C" {
#endif

/** @defgroup iterators Iterators
 */

/** Read (decode) iterator
 *
 * @ingroup iterators
 * @see nu_utf8_read
 */
typedef const char* (*nu_read_iterator_t)(const char *encoded, uint32_t *unicode);

/** Read (decode) backwards iterator
 *
 * Arguments intentionally reversed to not mix this with nu_read_iterator_t.
 * Reverse read is not compatible with any of string functions.
 *
 * @ingroup iterators
 * @see nu_utf8_revread
 */
typedef const char* (*nu_revread_iterator_t)(uint32_t *unicode, const char *encoded);

/** Write (encode) iterator
 *
 * @ingroup iterators
 * @see nu_utf8_write
 */
typedef char* (*nu_write_iterator_t)(uint32_t unicode, char *encoded);

/** Transform codepoint
 *
 * @ingroup transformations
 * @see nu_toupper
 * @see nu_tolower
 */
typedef const char* (*nu_transformation_t)(uint32_t codepoint);

/** Transform codepoint (used internally). This kind of transformation
 * delegates iteration on string to transformation implementation.
 *
 * @ingroup transformations_internal
 * @see _nu_toupper
 * @see _nu_tolower
 */
typedef const char* (*nu_transform_read_t)(
	const char *encoded, const char *limit, nu_read_iterator_t read,
	uint32_t *u, const char **transformed,
	void *context);

#if (defined NU_WITH_Z_STRINGS) || (defined NU_WITH_N_STRINGS)

#endif /* NU_WITH_Z_STRINGS NU_WITH_N_STRINGS */

#ifdef NU_WITH_Z_STRINGS

/** Get decoded string codepoints length
 *
 * @ingroup strings
 * @param encoded encoded string
 * @param it decoding function
 * @return string length or negative error
 *
 * @see nu_strnlen
 */
NU_EXPORT
ssize_t nu_strlen(const char *encoded, nu_read_iterator_t it);

/** Get encoded string bytes length (encoding variant)
 *
 * @ingroup strings
 * @param unicode unicode codepoints
 * @param it encoding function
 * @return byte length or negative error
 *
 * @see nu_bytenlen
 */
NU_EXPORT
ssize_t nu_bytelen(const uint32_t *unicode, nu_write_iterator_t it);

/** Get encoded string bytes length
 *
 * @ingroup strings
 * @param encoded encoded string
 * @param it decoding function
 * @return string length or negative error
 */
NU_EXPORT
ssize_t nu_strbytelen(const char *encoded, nu_read_iterator_t it);

#endif /* NU_WITH_Z_STRINGS */

#ifdef NU_WITH_N_STRINGS

/**
 * @ingroup strings
 * @see nu_strlen
 */
NU_EXPORT
ssize_t nu_strnlen(const char *encoded, size_t max_len, nu_read_iterator_t it);

/**
 * @ingroup strings
 * @see nu_bytelen
 */
NU_EXPORT
ssize_t nu_bytenlen(const uint32_t *unicode, size_t max_len,
	nu_write_iterator_t it);

#endif /* NU_WITH_N_STRINGS */

#if defined (__cplusplus) || defined (c_plusplus)
}
#endif

#endif /* NU_STRINGS_H */


<|start_filename|>src/dep/libnu/utf16le.h<|end_filename|>
#ifndef NU_UTF16LE_H
#define NU_UTF16LE_H

#include <stdint.h>
#include <sys/types.h>

#include "config.h"
#include "defines.h"
#include "utf16_internal.h"

#if defined (__cplusplus) || defined (c_plusplus)
extern "C" {
#endif

#ifdef NU_WITH_UTF16LE_READER

/** Read codepoint from UTF-16 string
 *
 * @ingroup utf16
 * @param utf16 pointer to UTF-16 encoded string
 * @param unicode output unicode codepoint or 0
 * @return pointer to next codepoint in UTF-16 string
 */
static inline
const char* nu_utf16le_read(const char *utf16, uint32_t *unicode) {
	uint32_t c = nu_letohs(utf16);

	if (c >= 0xD800 && c <= 0xDBFF) {
		if (unicode != 0) {
			*unicode = ((c & 0x03FF) << 10 | (nu_letohs(utf16 + 2) & 0x03FF)) + 0x10000;
		}
		return utf16 + 4;
	}
	else if (unicode != 0) {
		*unicode = c;
	}

	return utf16 + 2;
}

#ifdef NU_WITH_REVERSE_READ

/** Read codepoint from UTF-16 string in backward direction
 *
 * Note that it is your responsibility to check that this call
 * is not going under beginning of encoded string. Normally you
 * shouldn't call it like this: nu_utf16_revread(&u, "\x67\x00"); which
 * will result in undefined behavior.
 *
 * Also don't mess with pointers, nu_utf16_revread(&u, "\x67\x00\x67\x00" + 3);
 * won't work correctly. You are supposed to pass pointer received from
 * nu_utf16le_read().
 *
 * @ingroup utf16
 * @param unicode output unicode codepoint or 0
 * @param utf16 pointer to UTF-8 encoded string
 * @return pointer to previous codepoint in UTF-16 string
 */
static inline
const char* nu_utf16le_revread(uint32_t *unicode, const char *utf16) {
	/* valid UTF-16 sequences are either 2 or 4 bytes long
	 * trail sequences are between 0xDC00 .. 0xDFFF */
	const char *p = utf16 - 2;
	uint16_t ec = nu_letohs(p);

	if (ec >= 0xDC00 && ec <= 0xDFFF) { /* trail surrogate */
		p -= 2;
	}

	if (unicode != 0) {
		nu_utf16le_read(p, unicode);
	}

	return p;
}

#endif /* NU_WITH_REVERSE_READ */

#ifdef NU_WITH_VALIDATION

/** Validate codepoint in string
 *
 * @ingroup utf16
 * @param encoded buffer with encoded string
 * @param max_len buffer length
 * @return codepoint length or 0 on error
 */
NU_EXPORT
int nu_utf16le_validread(const char *encoded, size_t max_len);

#endif /* NU_WITH_VALIDATION */
#endif /* NU_WITH_UTF16LE_READER */

#ifdef NU_WITH_UTF16LE_WRITER

/** Write unicode codepoints into UTF-16 encoded string
 *
 * Note that length of decoded UTF-16 string is not entirely strlen(encoded) / 2.
 * You need to use nu_strlen(encoded, nu_utf16_read) to find out exact value.
 *
 * @ingroup utf16
 * @param unicode unicode codepoint
 * @param utf16 pointer to buffer to write UTF-16 encoded text to,
 * should be large enough to hold encoded value
 * @return pointer to byte after last written
 */
NU_EXPORT
char* nu_utf16le_write(uint32_t unicode, char *utf16);

#endif /* NU_WITH_UTF16LE_WRITER */

#if defined (__cplusplus) || defined (c_plusplus)
}
#endif

#endif /* NU_UTF16LE_H */


<|start_filename|>src/rmutil/strings.c<|end_filename|>
#include <string.h>
#include <sys/param.h>
#include <ctype.h>
#include "strings.h"
#include "alloc.h"

#include "sds.h"

#include "rmalloc.h"

// RedisModuleString *RMUtil_CreateFormattedString(RedisModuleCtx *ctx, const char *fmt, ...) {
//     sds s = sdsempty();

//     va_list ap;
//     va_start(ap, fmt);
//     s = sdscatvprintf(s, fmt, ap);
//     va_end(ap);

//     RedisModuleString *ret = RedisModule_CreateString(ctx, (const char *)s, sdslen(s));
//     sdsfree(s);
//     return ret;
// }

int RMUtil_StringEquals(RedisModuleString *s1, RedisModuleString *s2) {

  const char *c1, *c2;
  size_t l1, l2;
  c1 = RedisModule_StringPtrLen(s1, &l1);
  c2 = RedisModule_StringPtrLen(s2, &l2);
  if (l1 != l2) return 0;

  return strncmp(c1, c2, l1) == 0;
}

int RMUtil_StringEqualsC(RedisModuleString *s1, const char *s2) {

  const char *c1;
  size_t l1, l2 = strlen(s2);
  c1 = RedisModule_StringPtrLen(s1, &l1);
  if (l1 != l2) return 0;

  return strncmp(c1, s2, l1) == 0;
}
int RMUtil_StringEqualsCaseC(RedisModuleString *s1, const char *s2) {

  const char *c1;
  size_t l1, l2 = strlen(s2);
  c1 = RedisModule_StringPtrLen(s1, &l1);
  if (l1 != l2) return 0;

  return strncasecmp(c1, s2, l1) == 0;
}

void RMUtil_StringToLower(RedisModuleString *s) {

  size_t l;
  char *c = (char *)RedisModule_StringPtrLen(s, &l);
  size_t i;
  for (i = 0; i < l; i++) {
    *c = tolower(*c);
    ++c;
  }
}

void RMUtil_StringToUpper(RedisModuleString *s) {
  size_t l;
  char *c = (char *)RedisModule_StringPtrLen(s, &l);
  size_t i;
  for (i = 0; i < l; i++) {
    *c = toupper(*c);
    ++c;
  }
}

void RMUtil_StringConvert(RedisModuleString **rs, const char **ss, size_t n, int options) {
  for (size_t ii = 0; ii < n; ++ii) {
    const char *p = RedisModule_StringPtrLen(rs[ii], NULL);
    if (options & RMUTIL_STRINGCONVERT_COPY) {
      p = rm_strdup(p);
    }
    ss[ii] = p;
  }
}


<|start_filename|>src/dep/libnu/tofold.c<|end_filename|>
#include "casemap.h"

#ifdef NU_WITH_TOFOLD

#include "casemap_internal.h"
#include "gen/_tofold.c"

const char* nu_tofold(uint32_t codepoint) {
	return _nu_to_something(codepoint, NU_TOFOLD_G, NU_TOFOLD_G_SIZE,
		NU_TOFOLD_VALUES_C, NU_TOFOLD_VALUES_I, NU_TOFOLD_COMBINED);
}

const char* _nu_tofold(const char *encoded, const char *limit, nu_read_iterator_t read,
	uint32_t *u, const char **transform,
	void *context) {

	(void)(limit);
	(void)(context);

	uint32_t _u = 0;
	const char *np = read(encoded, &_u);

	*transform = nu_tofold(_u);

	if (u != 0) {
		*u = _u;
	}

	return np;
}

#endif /* NU_WITH_TOFOLD */


<|start_filename|>srcutil/make-parser.mk<|end_filename|>
SRCUTIL ?= .
LEMON := $(SRCUTIL)/lemon
TEMPLATE := $(SRCUTIL)/lempar.c
RAGEL := ragel

all: $(LEMON) lexer.c parser.c

lexer.c: lexer.rl
	$(RAGEL) -L -s lexer.rl -o $@

parser.c: parser.y
	$(LEMON) -l -s -T$(TEMPLATE) parser.y

clean:
	rm -f  $(SRCUTIL)/lexer.c  $(SRCUTIL)/parser.c

$(LEMON):  $(SRCUTIL)/lemon.c  $(SRCUTIL)/lempar.c
	gcc -o $(LEMON) $(SRCUTIL)/lemon.c


<|start_filename|>src/dep/libnu/udb.h<|end_filename|>
#ifndef NU_UDB_H
#define NU_UDB_H

#include <stdint.h>
#include <sys/types.h>

#include "config.h"
#include "defines.h"
#include "mph.h"
#include "strings.h"
#include "utf8.h"

/** @defgroup udb Unicode database
 *
 * Note: never use it directly, it is subject to change in next releases
 */

#if defined (__cplusplus) || defined (c_plusplus)
extern "C" {
#endif

#ifdef NU_WITH_UDB

#define NU_UDB_DECODING_FUNCTION (nu_utf8_read)
#define nu_udb_read (nu_utf8_read)

/** Lookup value in UDB
 *
 * Similar to nu_udb_lookup(), but doesn't look into COMBINED
 *
 * @ingroup udb
 * @see nu_udb_lookup
 * @return raw value from VALUES_I or 0 if value wasn't found
 */
static inline
uint32_t nu_udb_lookup_value(uint32_t codepoint,
	const int16_t *G, size_t G_SIZE,
	const uint32_t *VALUES_C, const uint16_t *VALUES_I) {

	uint32_t hash = nu_mph_hash(G, G_SIZE, codepoint);
	uint32_t value = nu_mph_lookup(VALUES_C, VALUES_I, codepoint, hash);

	return value;
}

/** Lookup data in UDB
 *
 * Returned data is encoded, therefore you need to use p = it(p, &u) to
 * fetch it. Returned string might contain more than 1 codepoint.
 *
 * @ingroup udb
 * @param codepoint unicode codepoint
 * @param G first MPH table
 * @param G_SIZE first table number of elements (original MPH set size)
 * @param VALUES_C codepoints array
 * @param VALUES_I offsets array
 * @param COMBINED joined values addressed by index stored in VALUES
 * @return looked up data or 0
 */
static inline
const char* nu_udb_lookup(uint32_t codepoint,
	const int16_t *G, size_t G_SIZE,
	const uint32_t *VALUES_C, const uint16_t *VALUES_I, const uint8_t *COMBINED) {

	uint32_t combined_offset = nu_udb_lookup_value(codepoint,
		G, G_SIZE, VALUES_C, VALUES_I);

	if (combined_offset == 0) {
		return 0;
	}

	return (const char *)(COMBINED + combined_offset);
}

#endif /* NU_WITH_UDB */

#if defined (__cplusplus) || defined (c_plusplus)
}
#endif

#endif /* NU_UDB_H */


<|start_filename|>src/dep/miniz/Makefile<|end_filename|>
all: libminiz.a

libminiz.a: miniz.o
	$(AR) rcs $@ $^


<|start_filename|>src/dep/libnu/utf32le.c<|end_filename|>
#include "utf32le.h"

#ifdef NU_WITH_UTF32LE_READER
#ifdef NU_WITH_VALIDATION

int nu_utf32le_validread(const char *p, size_t max_len) {
	if (utf32_validread_basic(p, max_len) == 0) {
		return 0;
	}

	uint32_t u = 0;
	nu_utf32le_read(p, &u);

	if (u > NU_UTF32_MAX_CODEPOINT) {
		return 0;
	}

	return (u >= 0xD800 && u <= 0xDFFF ? 0 : 4);
}

#endif /* NU_WITH_VALIDATION */
#endif /* NU_WITH_UTF32LE_READER */

#ifdef NU_WITH_UTF32LE_WRITER

char* nu_utf32le_write(uint32_t unicode, char *utf32) {
	if (utf32 != 0) {
		nu_htolel(unicode, utf32);
	}

	return utf32 + 4;
}

#endif /* NU_WITH_UTF32LE_WRITER */


<|start_filename|>src/extension.h<|end_filename|>
#ifndef __REDISEARCH_EXTN_H__
#define __REDISEARCH_EXTN_H__

#include "redisearch.h"

#ifdef __cplusplus
extern "C" {
#endif
/* Initialize the extensions mechanism, create registries, etc */
void Extensions_Init();
/* clear the extensions list */
void Extensions_Free();

/* Context for saving a scoring function and its private data and free */
typedef struct {
  RSScoringFunction sf;
  RSFreeFunction ff;
  void *privdata;
} ExtScoringFunctionCtx;

/* Context for saving the a token expander and its free / privdata */
typedef struct {
  RSQueryTokenExpander exp;
  RSFreeFunction ff;
  void *privdata;
} ExtQueryExpanderCtx;

/* Get a scoring function by name. Returns NULL if no such scoring function exists */
ExtScoringFunctionCtx *Extensions_GetScoringFunction(ScoringFunctionArgs *fnargs, const char *name);

/* Get a query expander function by name. Returns NULL if no such function exists */
ExtQueryExpanderCtx *Extensions_GetQueryExpander(RSQueryExpanderCtx *ctx, const char *name);

/* Load an extension explicitly with its name and an init function */
int Extension_Load(const char *name, RSExtensionInitFunc func);

/* Dynamically load a RediSearch extension by .so file path. Returns REDISMODULE_OK or ERR. errMsg
 * is set to NULL on success or an error message on failure */
int Extension_LoadDynamic(const char *path, char **errMsg);

#ifdef __cplusplus
}
#endif
#endif

<|start_filename|>src/dep/libnu/extra.h<|end_filename|>
#ifndef NU_EXTRA_H
#define NU_EXTRA_H

/** @defgroup extra Extra string functions
 *
 * Note on "n" functions variant: those are not for memory overrun control.
 * They are just for strings not having terminating 0 byte and those
 * functions won't go further than n-th *codepoint* in string, not byte.
 */

#include <stdint.h>
#include <sys/types.h>

#include "config.h"
#include "strings.h"
#include "udb.h"

#if defined (__cplusplus) || defined (c_plusplus)
extern "C" {
#endif

#define NU_TRANSFORM_DECODING_FUNCTION NU_UDB_DECODING_FUNCTION

#ifdef NU_WITH_Z_EXTRA

/** Read 0-terminated string
 *
 * @ingroup extra
 * @param encoded source buffer
 * @param unicode destination buffer, should be large enough to hold
 * decoded string
 * @param it read (decode) function
 * @return 0
 *
 * @see nu_utf8_read
 * @see nu_readnstr
 */
NU_EXPORT
int nu_readstr(const char *encoded, uint32_t *unicode,
	nu_read_iterator_t it);

/** Write 0-terminated string
 *
 * @ingroup extra
 * @param unicode 0x0000-terminated codepoints
 * @param encoded destination buffer, should be large enough to hold
 * encoded string
 * @param it write (encode) function
 * @return 0
 *
 * @see nu_bytenlen
 * @see nu_utf8_write
 * @see nu_writenstr
 */
NU_EXPORT
int nu_writestr(const uint32_t *unicode, char *encoded,
	nu_write_iterator_t it);

/** Recode string
 *
 * @ingroup extra
 * @param source source encoded string
 * @param dest dest encoded string, should be large enough
 * @param read_it decoding function
 * @param write_it encoding function
 * @return 0
 *
 * @see nu_bytenlen
 * @see nu_utf8_read
 * @see nu_utf8_write
 * @see nu_transformnstr
 */
NU_EXPORT
int nu_transformstr(const char *source, char *dest,
	nu_read_iterator_t read_it, nu_write_iterator_t write_it);

/** Get decoded string codepoint length taking into account transformation
 *
 * @ingroup extra
 * @param encoded encoded string
 * @param read read (decode) function
 * @param transform transformation to take into account
 * @param transform_read transformation result decoding function
 * @return number of codepoints in transformed string
 *
 * @see nu_toupper
 * @see nu_tolower
 */
NU_EXPORT
ssize_t nu_strtransformlen(const char *encoded, nu_read_iterator_t read,
	nu_transformation_t transform, nu_read_iterator_t transform_read);

/** Get decoded string codepoint length taking into account transformation
 * (internal version)
 *
 * @ingroup extra
 * @param encoded encoded string
 * @param read read (decode) function
 * @param transform transformation to take into account
 * @param transform_read transformation result decoding function
 * @param context pointer passed to each call of transformation
 * @return number of codepoints in transformed string
 *
 * @see _nu_tolower
 * @see _nu_toupper
 */
NU_EXPORT
ssize_t _nu_strtransformlen(const char *encoded, nu_read_iterator_t read,
	nu_transform_read_t transform, nu_read_iterator_t transform_read,
	void *context);

#endif /* NU_WITH_Z_EXTRA */

#ifdef NU_WITH_N_EXTRA

/**
 * @ingroup extra
 * @see nu_readstr
 */
NU_EXPORT
int nu_readnstr(const char *encoded, size_t max_len, uint32_t *unicode,
	nu_read_iterator_t it);

/**
 * @ingroup extra
 * @see nu_writestr
 */
NU_EXPORT
int nu_writenstr(const uint32_t *unicode, size_t max_len, char *encoded,
	nu_write_iterator_t it);

/**
 * @ingroup extra
 * @see nu_transformstr
 */
NU_EXPORT
int nu_transformnstr(const char *source, size_t max_len, char *dest,
	nu_read_iterator_t read_it, nu_write_iterator_t write_it);

/**
 * @ingroup extra
 * @see nu_strtransformlen
 */
NU_EXPORT
ssize_t nu_strtransformnlen(const char *encoded, size_t max_len, nu_read_iterator_t read,
	nu_transformation_t transform, nu_read_iterator_t transform_read);

/**
 * @ingroup extra
 * @see _nu_strtransformlen
 */
NU_EXPORT
ssize_t _nu_strtransformnlen(const char *encoded, size_t max_len, nu_read_iterator_t read,
	nu_transform_read_t transform, nu_read_iterator_t transform_read,
	void *context);

#endif /* NU_WITH_N_EXTRA */

#if defined (__cplusplus) || defined (c_plusplus)
}
#endif

#endif /* NU_EXTRA_H */


<|start_filename|>src/aggregate/expr/lexer.c<|end_filename|>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <math.h>

#include "parser.h"
#include "expression.h"
#include "exprast.h"

#include "token.h"

/* forward declarations of stuff generated by lemon */
void RSExprParser_Parse(void *yyp, int yymajor, RSExprToken yyminor, RSExprParseCtx *ctx);
void *RSExprParser_ParseAlloc(void *(*mallocProc)(size_t));
void RSExprParser_ParseFree(void *p, void (*freeProc)(void *));




static const char _expr_actions[] = {
	0, 1, 0, 1, 1, 1, 2, 1,
	9, 1, 10, 1, 11, 1, 12, 1,
	13, 1, 14, 1, 15, 1, 16, 1,
	17, 1, 18, 1, 19, 1, 20, 1,
	21, 1, 22, 1, 23, 1, 24, 1,
	25, 1, 26, 1, 27, 1, 28, 1,
	29, 1, 30, 1, 31, 1, 32, 1,
	33, 1, 34, 1, 35, 1, 36, 1,
	37, 2, 2, 3, 2, 2, 4, 2,
	2, 5, 2, 2, 6, 2, 2, 7,
	2, 2, 8, 0
};

static const short _expr_key_offsets[] = {
	0, 0, 3, 5, 8, 10, 14, 18,
	19, 20, 22, 25, 27, 37, 78, 79,
	82, 83, 87, 90, 91, 94, 99, 103,
	105, 106, 107, 108, 118, 125, 133, 140,
	0
};

static const char _expr_trans_keys[] = {
	10, 34, 92, 34, 92, 10, 39, 92,
	39, 92, 10, 39, 92, 110, 10, 39,
	92, 102, 110, 102, 48, 57, 45, 48,
	57, 48, 57, 9, 13, 32, 47, 58,
	64, 91, 96, 123, 126, 32, 33, 34,
	37, 38, 39, 40, 41, 42, 43, 44,
	45, 47, 60, 61, 62, 64, 94, 105,
	124, 127, 0, 8, 9, 13, 14, 31,
	35, 46, 48, 57, 58, 63, 65, 90,
	91, 96, 97, 122, 123, 126, 61, 10,
	34, 92, 38, 10, 39, 92, 105, 10,
	39, 92, 105, 105, 48, 57, 46, 69,
	101, 48, 57, 69, 101, 48, 57, 48,
	57, 61, 61, 61, 92, 96, 0, 47,
	58, 64, 91, 94, 123, 127, 95, 48,
	57, 65, 90, 97, 122, 95, 110, 48,
	57, 65, 90, 97, 122, 95, 48, 57,
	65, 90, 97, 122, 124, 0
};

static const char _expr_single_lengths[] = {
	0, 3, 2, 3, 2, 4, 4, 1,
	1, 0, 1, 0, 0, 21, 1, 3,
	1, 4, 3, 1, 1, 3, 2, 0,
	1, 1, 1, 2, 1, 2, 1, 1,
	0
};

static const char _expr_range_lengths[] = {
	0, 0, 0, 0, 0, 0, 0, 0,
	0, 1, 1, 1, 5, 10, 0, 0,
	0, 0, 0, 0, 1, 1, 1, 1,
	0, 0, 0, 4, 3, 3, 3, 0,
	0
};

static const short _expr_index_offsets[] = {
	0, 0, 4, 7, 11, 14, 19, 24,
	26, 28, 30, 33, 35, 41, 73, 75,
	79, 81, 86, 90, 92, 95, 100, 104,
	106, 108, 110, 112, 119, 124, 130, 135,
	0
};

static const char _expr_trans_cond_spaces[] = {
	-1, -1, -1, -1, -1, -1, -1, -1,
	-1, -1, -1, -1, -1, -1, -1, -1,
	-1, -1, -1, -1, -1, -1, -1, -1,
	-1, -1, -1, -1, -1, -1, -1, -1,
	-1, -1, -1, -1, -1, -1, -1, -1,
	-1, -1, -1, -1, -1, -1, -1, -1,
	-1, -1, -1, -1, -1, -1, -1, -1,
	-1, -1, -1, -1, -1, -1, -1, -1,
	-1, -1, -1, -1, -1, -1, -1, -1,
	-1, -1, -1, -1, -1, -1, -1, -1,
	-1, -1, -1, -1, -1, -1, -1, -1,
	-1, -1, -1, -1, -1, -1, -1, -1,
	-1, -1, -1, -1, -1, -1, -1, -1,
	-1, -1, -1, -1, -1, -1, -1, -1,
	-1, -1, -1, -1, -1, -1, -1, -1,
	-1, -1, -1, -1, -1, -1, -1, -1,
	-1, -1, -1, -1, -1, -1, -1, -1,
	-1, -1, -1, -1, -1, -1, -1, -1,
	-1, -1, -1, -1, -1, -1, -1, -1,
	-1, -1, -1, -1, -1, -1, -1, -1,
	-1, -1, -1, -1, -1, -1, -1, 0
};

static const short _expr_trans_offsets[] = {
	0, 1, 2, 3, 4, 5, 6, 7,
	8, 9, 10, 11, 12, 13, 14, 15,
	16, 17, 18, 19, 20, 21, 22, 23,
	24, 25, 26, 27, 28, 29, 30, 31,
	32, 33, 34, 35, 36, 37, 38, 39,
	40, 41, 42, 43, 44, 45, 46, 47,
	48, 49, 50, 51, 52, 53, 54, 55,
	56, 57, 58, 59, 60, 61, 62, 63,
	64, 65, 66, 67, 68, 69, 70, 71,
	72, 73, 74, 75, 76, 77, 78, 79,
	80, 81, 82, 83, 84, 85, 86, 87,
	88, 89, 90, 91, 92, 93, 94, 95,
	96, 97, 98, 99, 100, 101, 102, 103,
	104, 105, 106, 107, 108, 109, 110, 111,
	112, 113, 114, 115, 116, 117, 118, 119,
	120, 121, 122, 123, 124, 125, 126, 127,
	128, 129, 130, 131, 132, 133, 134, 135,
	136, 137, 138, 139, 140, 141, 142, 143,
	144, 145, 146, 147, 148, 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 0, 0, 0, 0, 0, 0, 0,
	0, 0, 0, 0, 0, 0, 0, 0,
	0, 0, 0, 0, 0, 0, 0, 0,
	0, 0, 0, 0, 0, 0, 0, 0,
	0, 0, 0, 0, 0, 0, 0, 0
};

static const char _expr_cond_targs[] = {
	13, 13, 2, 1, 15, 2, 1, 13,
	13, 4, 3, 18, 4, 3, 13, 13,
	4, 6, 3, 13, 13, 4, 18, 3,
	8, 13, 13, 13, 22, 13, 11, 23,
	13, 23, 13, 27, 27, 27, 27, 27,
	13, 13, 14, 15, 13, 16, 17, 13,
	13, 13, 19, 13, 20, 13, 24, 25,
	26, 27, 13, 29, 31, 13, 13, 13,
	13, 13, 21, 13, 28, 13, 28, 13,
	0, 13, 13, 13, 13, 2, 1, 13,
	13, 13, 13, 4, 5, 3, 13, 13,
	4, 3, 7, 13, 7, 21, 13, 9,
	10, 10, 21, 13, 10, 10, 22, 13,
	23, 13, 13, 13, 13, 13, 13, 13,
	12, 13, 13, 13, 13, 13, 27, 28,
	28, 28, 28, 13, 28, 30, 28, 28,
	28, 13, 28, 28, 28, 28, 13, 13,
	13, 13, 13, 13, 13, 13, 13, 13,
	13, 13, 13, 13, 13, 13, 13, 13,
	13, 13, 13, 13, 13, 13, 13, 13,
	13, 13, 13, 13, 13, 13, 13, 0
};

static const char _expr_cond_actions[] = {
	63, 35, 0, 0, 77, 0, 0, 63,
	35, 0, 0, 77, 0, 0, 61, 35,
	0, 0, 0, 61, 35, 0, 68, 0,
	0, 63, 7, 63, 5, 59, 0, 0,
	59, 0, 59, 65, 65, 65, 65, 65,
	63, 37, 0, 80, 25, 0, 80, 9,
	11, 31, 74, 33, 71, 29, 0, 0,
	0, 80, 27, 0, 0, 41, 41, 37,
	41, 39, 5, 39, 0, 39, 0, 39,
	0, 19, 53, 63, 35, 0, 0, 21,
	57, 57, 35, 0, 0, 0, 63, 35,
	0, 0, 0, 55, 0, 5, 47, 0,
	0, 0, 5, 43, 0, 0, 5, 43,
	0, 43, 13, 49, 17, 57, 15, 51,
	0, 63, 63, 63, 63, 63, 65, 0,
	0, 0, 0, 45, 0, 0, 0, 0,
	0, 45, 0, 0, 0, 0, 45, 23,
	57, 63, 63, 63, 63, 61, 61, 63,
	63, 59, 59, 59, 63, 53, 63, 57,
	57, 63, 55, 47, 43, 43, 43, 49,
	57, 51, 63, 45, 45, 45, 57, 0
};

static const char _expr_to_state_actions[] = {
	0, 0, 0, 0, 0, 0, 0, 0,
	0, 0, 0, 0, 0, 1, 0, 0,
	0, 0, 0, 0, 0, 0, 0, 0,
	0, 0, 0, 0, 0, 0, 0, 0,
	0
};

static const char _expr_from_state_actions[] = {
	0, 0, 0, 0, 0, 0, 0, 0,
	0, 0, 0, 0, 0, 3, 0, 0,
	0, 0, 0, 0, 0, 0, 0, 0,
	0, 0, 0, 0, 0, 0, 0, 0,
	0
};

static const char _expr_eof_trans_indexed[] = {
	0, 14, 14, 14, 14, 16, 16, 14,
	14, 18, 18, 18, 14, 0, 29, 14,
	31, 31, 14, 33, 34, 35, 35, 35,
	36, 31, 39, 14, 41, 41, 41, 31,
	0
};

static const short _expr_eof_trans_direct[] = {
	0, 138, 139, 140, 141, 142, 143, 144,
	145, 146, 147, 148, 149, 0, 150, 151,
	152, 153, 154, 155, 156, 157, 158, 159,
	160, 161, 162, 163, 164, 165, 166, 167,
	0
};

static const char _expr_nfa_targs[] = {
	0, 0
};

static const char _expr_nfa_offsets[] = {
	0, 0, 0, 0, 0, 0, 0, 0,
	0, 0, 0, 0, 0, 0, 0, 0,
	0, 0, 0, 0, 0, 0, 0, 0,
	0, 0, 0, 0, 0, 0, 0, 0,
	0
};

static const char _expr_nfa_push_actions[] = {
	0, 0
};

static const char _expr_nfa_pop_trans[] = {
	0, 0
};

static const int expr_start = 13;
static const int expr_first_final = 13;
static const int expr_error = 0;

static const int expr_en_main = 13;





RSExpr *RSExpr_Parse(const char *expr, size_t len, char **err) {
	RSExprParseCtx ctx = {
		.raw = expr,
		.len = len, 
		.errorMsg = NULL,
		.root = NULL,
		.ok = 1,
	};
	void *pParser = RSExprParser_ParseAlloc(rm_malloc);
	
	
	int cs, act;
	const char* ts = ctx.raw;
	const char* te = ctx.raw + ctx.len;
	
	{
		cs = (int)expr_start;
		ts = 0;
		te = 0;
		act = 0;
	}
	
	RSExprToken tok = {.len = 0, .pos = 0, .s = 0, .numval = 0};
	
	//parseCtx ctx = {.root = NULL, .ok = 1, .errorMsg = NULL, .q = q};
	const char* p = ctx.raw;
	const char* pe = ctx.raw + ctx.len;
	const char* eof = pe;
	
	
	{
		int _klen;
		unsigned int _trans = 0;
		unsigned int _cond = 0;
		const char *_acts;
		unsigned int _nacts;
		const char *_keys;
		const char *_ckeys;
		int _cpc;
		{
			
			if ( p == pe )
			goto _test_eof;
			if ( cs == 0 )
			goto _out;
			_resume:  {
				_acts = ( _expr_actions + (_expr_from_state_actions[cs]));
				_nacts = (unsigned int)(*( _acts));
				_acts += 1;
				while ( _nacts > 0 ) {
					switch ( (*( _acts)) ) {
						case 1:  {
							{
								{ts = p;}}
							break; }
					}
					_nacts -= 1;
					_acts += 1;
				}
				
				_keys = ( _expr_trans_keys + (_expr_key_offsets[cs]));
				_trans = (unsigned int)_expr_index_offsets[cs];
				
				_klen = (int)_expr_single_lengths[cs];
				if ( _klen > 0 ) {
					const char *_lower;
					const char *_mid;
					const char *_upper;
					_lower = _keys;
					_upper = _keys + _klen - 1;
					while ( 1 ) {
						if ( _upper < _lower )
						break;
						
						_mid = _lower + ((_upper-_lower) >> 1);
						if ( ( (*( p))) < (*( _mid)) )
						_upper = _mid - 1;
						else if ( ( (*( p))) > (*( _mid)) )
						_lower = _mid + 1;
						else {
							_trans += (unsigned int)(_mid - _keys);
							goto _match;
						}
					}
					_keys += _klen;
					_trans += (unsigned int)_klen;
				}
				
				_klen = (int)_expr_range_lengths[cs];
				if ( _klen > 0 ) {
					const char *_lower;
					const char *_mid;
					const char *_upper;
					_lower = _keys;
					_upper = _keys + (_klen<<1) - 2;
					while ( 1 ) {
						if ( _upper < _lower )
						break;
						
						_mid = _lower + (((_upper-_lower) >> 1) & ~1);
						if ( ( (*( p))) < (*( _mid)) )
						_upper = _mid - 2;
						else if ( ( (*( p))) > (*( _mid + 1)) )
						_lower = _mid + 2;
						else {
							_trans += (unsigned int)((_mid - _keys)>>1);
							goto _match;
						}
					}
					_trans += (unsigned int)_klen;
				}
				
			}
			_match:  {
				_ckeys = ( _expr_cond_keys + (_expr_trans_offsets[_trans]));
				_klen = (int)_expr_trans_lengths[_trans];
				_cond = (unsigned int)_expr_trans_offsets[_trans];
				
				_cpc = 0;
				{
					const char *_lower;
					const char *_mid;
					const char *_upper;
					_lower = _ckeys;
					_upper = _ckeys + _klen - 1;
					while ( 1 ) {
						if ( _upper < _lower )
						break;
						
						_mid = _lower + ((_upper-_lower) >> 1);
						if ( _cpc < (int)(*( _mid)) )
						_upper = _mid - 1;
						else if ( _cpc > (int)(*( _mid)) )
						_lower = _mid + 1;
						else {
							_cond += (unsigned int)(_mid - _ckeys);
							goto _match_cond;
						}
					}
					cs = 0;
					goto _again;
				}
			}
			_match_cond:  {
				cs = (int)_expr_cond_targs[_cond];
				
				if ( _expr_cond_actions[_cond] == 0 )
				goto _again;
				
				_acts = ( _expr_actions + (_expr_cond_actions[_cond]));
				_nacts = (unsigned int)(*( _acts));
				_acts += 1;
				while ( _nacts > 0 )
				{
					switch ( (*( _acts)) )
					{
						case 2:  {
							{
								{te = p+1;}}
							break; }
						case 3:  {
							{
								{act = 2;}}
							break; }
						case 4:  {
							{
								{act = 4;}}
							break; }
						case 5:  {
							{
								{act = 7;}}
							break; }
						case 6:  {
							{
								{act = 17;}}
							break; }
						case 7:  {
							{
								{act = 23;}}
							break; }
						case 8:  {
							{
								{act = 25;}}
							break; }
						case 9:  {
							{
								{te = p+1;{
										
										tok.pos = ts-ctx.raw;
										tok.s = ts;
										tok.len = te-ts;
										
										tok.numval = *ts == '-' ? -INFINITY : INFINITY;
										RSExprParser_Parse(pParser, NUMBER, tok, &ctx);
										if (!ctx.ok) {
											{p+= 1; goto _out; }
										}
									}}}
							break; }
						case 10:  {
							{
								{te = p+1;{
										
										tok.pos = ts-ctx.raw;
										RSExprParser_Parse(pParser, LP, tok, &ctx);
										if (!ctx.ok) {
											{p+= 1; goto _out; }
										}
									}}}
							break; }
						case 11:  {
							{
								{te = p+1;{
										
										tok.pos = ts-ctx.raw;
										RSExprParser_Parse(pParser, RP, tok, &ctx);
										if (!ctx.ok) {
											{p+= 1; goto _out; }
										}
									}}}
							break; }
						case 12:  {
							{
								{te = p+1;{
										
										tok.pos = ts-ctx.raw;
										RSExprParser_Parse(pParser, LE, tok, &ctx);  
										if (!ctx.ok) {
											{p+= 1; goto _out; }
										}
									}}}
							break; }
						case 13:  {
							{
								{te = p+1;{
										
										tok.pos = ts-ctx.raw;
										RSExprParser_Parse(pParser, GE, tok, &ctx);  
										if (!ctx.ok) {
											{p+= 1; goto _out; }
										}
									}}}
							break; }
						case 14:  {
							{
								{te = p+1;{
										
										tok.pos = ts-ctx.raw;
										RSExprParser_Parse(pParser, EQ, tok, &ctx);  
										if (!ctx.ok) {
											{p+= 1; goto _out; }
										}
									}}}
							break; }
						case 15:  {
							{
								{te = p+1;{
										
										tok.pos = ts-ctx.raw;
										RSExprParser_Parse(pParser, NE, tok, &ctx);  
										if (!ctx.ok) {
											{p+= 1; goto _out; }
										}
									}}}
							break; }
						case 16:  {
							{
								{te = p+1;{
										
										tok.pos = ts-ctx.raw;
										RSExprParser_Parse(pParser, AND, tok, &ctx);  
										if (!ctx.ok) {
											{p+= 1; goto _out; }
										}
									}}}
							break; }
						case 17:  {
							{
								{te = p+1;{
										
										tok.pos = ts-ctx.raw;
										RSExprParser_Parse(pParser, OR, tok, &ctx);  
										if (!ctx.ok) {
											{p+= 1; goto _out; }
										}
									}}}
							break; }
						case 18:  {
							{
								{te = p+1;{
										
										tok.pos = ts-ctx.raw;
										RSExprParser_Parse(pParser, MOD, tok, &ctx);  
										if (!ctx.ok) {
											{p+= 1; goto _out; }
										}
									}}}
							break; }
						case 19:  {
							{
								{te = p+1;{
										
										tok.pos = ts-ctx.raw;
										RSExprParser_Parse(pParser, POW, tok, &ctx);  
										if (!ctx.ok) {
											{p+= 1; goto _out; }
										}
									}}}
							break; }
						case 20:  {
							{
								{te = p+1;{
										
										tok.pos = ts-ctx.raw;
										RSExprParser_Parse(pParser, DIVIDE, tok, &ctx);  
										if (!ctx.ok) {
											{p+= 1; goto _out; }
										}
									}}}
							break; }
						case 21:  {
							{
								{te = p+1;{
										
										tok.pos = ts-ctx.raw;
										RSExprParser_Parse(pParser, TIMES, tok, &ctx);    
										if (!ctx.ok) {
											{p+= 1; goto _out; }
										}
									}}}
							break; }
						case 22:  {
							{
								{te = p+1;{
										
										tok.pos = ts-ctx.raw;
										RSExprParser_Parse(pParser, COMMA, tok, &ctx);  
										if (!ctx.ok) {
											{p+= 1; goto _out; }
										}
									}}}
							break; }
						case 23:  {
							{
								{te = p+1;{
										
										
										tok.len = te-ts;
										tok.s = ts;
										tok.numval = 0;
										tok.pos = ts-ctx.raw;
										
										RSExprParser_Parse(pParser, STRING, tok, &ctx);
										if (!ctx.ok) {
											{p+= 1; goto _out; }
										}
									}}}
							break; }
						case 24:  {
							{
								{te = p+1;}}
							break; }
						case 25:  {
							{
								{te = p+1;}}
							break; }
						case 26:  {
							{
								{te = p+1;}}
							break; }
						case 27:  {
							{
								{te = p;p = p - 1;{
										
										tok.s = ts;
										tok.len = te-ts;
										char *ne = (char*)te;
										tok.numval = strtod(tok.s, &ne);
										tok.pos = ts-ctx.raw;
										RSExprParser_Parse(pParser, NUMBER, tok, &ctx);
										if (!ctx.ok) {
											{p+= 1; goto _out; }
										}
										
									}}}
							break; }
						case 28:  {
							{
								{te = p;p = p - 1;{
										
										tok.pos = ts-ctx.raw;
										tok.len = te - ts;
										tok.s = ts;
										RSExprParser_Parse(pParser, SYMBOL, tok, &ctx);
										if (!ctx.ok) {
											{p+= 1; goto _out; }
										}
									}}}
							break; }
						case 29:  {
							{
								{te = p;p = p - 1;{
										
										tok.pos = ts-ctx.raw;
										RSExprParser_Parse(pParser, MINUS, tok, &ctx);  
										if (!ctx.ok) {
											{p+= 1; goto _out; }
										}
									}}}
							break; }
						case 30:  {
							{
								{te = p;p = p - 1;{
										
										tok.pos = ts-ctx.raw;
										RSExprParser_Parse(pParser, LT, tok, &ctx);  
										if (!ctx.ok) {
											{p+= 1; goto _out; }
										}
									}}}
							break; }
						case 31:  {
							{
								{te = p;p = p - 1;{
										
										tok.pos = ts-ctx.raw;
										RSExprParser_Parse(pParser, GT, tok, &ctx);  
										if (!ctx.ok) {
											{p+= 1; goto _out; }
										}
									}}}
							break; }
						case 32:  {
							{
								{te = p;p = p - 1;{
										
										tok.pos = ts-ctx.raw;
										RSExprParser_Parse(pParser, NOT, tok, &ctx);  
										if (!ctx.ok) {
											{p+= 1; goto _out; }
										}
									}}}
							break; }
						case 33:  {
							{
								{te = p;p = p - 1;{
										
										tok.pos = ts-ctx.raw;
										RSExprParser_Parse(pParser, PLUS, tok, &ctx);  
										if (!ctx.ok) {
											{p+= 1; goto _out; }
										}
									}}}
							break; }
						case 34:  {
							{
								{te = p;p = p - 1;}}
							break; }
						case 35:  {
							{
								{p = ((te))-1;
									{
										
										tok.s = ts;
										tok.len = te-ts;
										char *ne = (char*)te;
										tok.numval = strtod(tok.s, &ne);
										tok.pos = ts-ctx.raw;
										RSExprParser_Parse(pParser, NUMBER, tok, &ctx);
										if (!ctx.ok) {
											{p+= 1; goto _out; }
										}
										
									}}}
							break; }
						case 36:  {
							{
								{p = ((te))-1;
								}}
							break; }
						case 37:  {
							{
								{switch( act ) {
										case 2:  {
											p = ((te))-1;
											{
												
												tok.pos = ts-ctx.raw;
												tok.len = te - (ts + 1);
												tok.s = ts+1;
												RSExprParser_Parse(pParser, PROPERTY, tok, &ctx);
												if (!ctx.ok) {
													{p+= 1; goto _out; }
												}
											} break; }
										case 4:  {
											p = ((te))-1;
											{
												
												tok.pos = ts-ctx.raw;
												tok.s = ts;
												tok.len = te-ts;
												
												tok.numval = *ts == '-' ? -INFINITY : INFINITY;
												RSExprParser_Parse(pParser, NUMBER, tok, &ctx);
												if (!ctx.ok) {
													{p+= 1; goto _out; }
												}
											} break; }
										case 7:  {
											p = ((te))-1;
											{
												
												tok.pos = ts-ctx.raw;
												RSExprParser_Parse(pParser, MINUS, tok, &ctx);  
												if (!ctx.ok) {
													{p+= 1; goto _out; }
												}
											} break; }
										case 17:  {
											p = ((te))-1;
											{
												
												tok.pos = ts-ctx.raw;
												RSExprParser_Parse(pParser, PLUS, tok, &ctx);  
												if (!ctx.ok) {
													{p+= 1; goto _out; }
												}
											} break; }
										case 23:  {
											p = ((te))-1;
											{
												
												
												tok.len = te-ts;
												tok.s = ts;
												tok.numval = 0;
												tok.pos = ts-ctx.raw;
												
												RSExprParser_Parse(pParser, STRING, tok, &ctx);
												if (!ctx.ok) {
													{p+= 1; goto _out; }
												}
											} break; }
										default: {
											p = ((te))-1;
											break; }
									}}
							}
							break; }
					}
					_nacts -= 1;
					_acts += 1;
				}
				
				
			}
			_again:  {
				_acts = ( _expr_actions + (_expr_to_state_actions[cs]));
				_nacts = (unsigned int)(*( _acts));
				_acts += 1;
				while ( _nacts > 0 ) {
					switch ( (*( _acts)) ) {
						case 0:  {
							{
								{ts = 0;}}
							break; }
					}
					_nacts -= 1;
					_acts += 1;
				}
				
				if ( cs == 0 )
				goto _out;
				p += 1;
				if ( p != pe )
				goto _resume;
			}
			_test_eof:  { {}
				if ( p == eof )
				{
					if ( _expr_eof_trans_direct[cs] > 0 ) {
						_trans = (unsigned int)_expr_eof_trans_direct[cs] - 1;
						_cond = (unsigned int)_expr_trans_offsets[_trans];
						goto _match_cond;
					}
				}
				
			}
			_out:  { {}
			}
		}
	}
	
	
	
	if (ctx.ok) {
		RSExprParser_Parse(pParser, 0, tok, &ctx);
	} else if (ctx.root) {
		RSExpr_Free(ctx.root);
		ctx.root = NULL;
	}
	RSExprParser_ParseFree(pParser, rm_free);
	if (err) {
		*err = ctx.errorMsg;
	}
	
	return ctx.root;
}



<|start_filename|>src/rmutil/test_periodic.c<|end_filename|>
#include <stdio.h>
#include <redismodule.h>
#include <unistd.h>
#include "periodic.h"
#include "assert.h"
#include "test.h"
#include "alloc.h"

int timerCb(RedisModuleCtx *ctx, void *p) {
  int *x = p;
  (*x)++;
  return 1;
}

int testPeriodic() {
  volatile int x = 0;
  struct RMUtilTimer *tm = RMUtil_NewPeriodicTimer(
      timerCb, NULL, (void *)&x, (struct timespec){.tv_sec = 0, .tv_nsec = 10000000});
  while (!x) {
    // spin
  }
  ASSERT_EQUAL(0, RMUtilTimer_Terminate(tm));
  ASSERT(x > 0);
  ASSERT(x <= 100);
  return 0;
}

TEST_MAIN({
  RMUTil_InitAlloc();
  TESTFUNC(testPeriodic);
});


<|start_filename|>src/rwlock.c<|end_filename|>
#include "rwlock.h"
#include "rmalloc.h"
#include "util/arr_rm_alloc.h"
#include <assert.h>

pthread_mutex_t rwLockMutex;
pthread_rwlock_t RWLock = PTHREAD_RWLOCK_INITIALIZER;
pthread_key_t _lockKey;

typedef enum lockType { lockType_None, lockType_Read, lockType_Write } lockType;

typedef struct rwlockThreadLocal {
  size_t locked;
  lockType type;
} rwlockThreadLocal;

rwlockThreadLocal** rwlocks;

int RediSearch_LockInit(RedisModuleCtx* ctx) {
  rwlocks = array_new(rwlockThreadLocal*, 10);
  pthread_mutex_init(&rwLockMutex, NULL);
  int err = pthread_key_create(&_lockKey, NULL);
  if (err) {
    if (ctx) {
      RedisModule_Log(ctx, "warning", "could not initialize rwlock thread local");
    }
    return REDISMODULE_ERR;
  }
  return REDISMODULE_OK;
}

static rwlockThreadLocal* RediSearch_GetLockThreadData() {
  rwlockThreadLocal* rwData = pthread_getspecific(_lockKey);
  if (!rwData) {
    rwData = rm_malloc(sizeof(*rwData));
    rwData->locked = 0;
    rwData->type = lockType_None;
    pthread_setspecific(_lockKey, rwData);
    pthread_mutex_lock(&rwLockMutex);
    rwlocks = array_append(rwlocks, rwData);
    pthread_mutex_unlock(&rwLockMutex);
  }
  return rwData;
}

void RediSearch_LockRead() {
  rwlockThreadLocal* rwData = RediSearch_GetLockThreadData();
  assert(rwData->type != lockType_Write);
  if (rwData->locked == 0) {
    pthread_rwlock_rdlock(&RWLock);
    rwData->type = lockType_Read;
  }
  assert(rwData->type == lockType_Read);
  ++rwData->locked;
}

void RediSearch_LockWrite() {
  rwlockThreadLocal* rwData = RediSearch_GetLockThreadData();
  assert(rwData->type != lockType_Read);
  if (rwData->locked == 0) {
    pthread_rwlock_wrlock(&RWLock);
    rwData->type = lockType_Write;
  }
  assert(rwData->type == lockType_Write);
  ++rwData->locked;
}

void RediSearch_LockRelease() {
  rwlockThreadLocal* rwData = RediSearch_GetLockThreadData();
  assert(rwData->locked > 0);
  if ((--rwData->locked) == 0) {
    pthread_rwlock_unlock(&RWLock);
    rwData->type = lockType_None;
  }
}

void RediSearch_LockDestory() {
  pthread_mutex_lock(&rwLockMutex);
  for (size_t i = 0; i < array_len(rwlocks); ++i) {
    rm_free(rwlocks[i]);
  }
  array_free(rwlocks);
  pthread_mutex_unlock(&rwLockMutex);
}


<|start_filename|>src/rmalloc.h<|end_filename|>
#ifndef __REDISEARCH_ALLOC__
#define __REDISEARCH_ALLOC__

#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include "redismodule.h"

#ifdef REDIS_MODULE_TARGET /* Set this when compiling your code as a module */

static inline void *rm_malloc(size_t n) {
  return RedisModule_Alloc(n);
}
static inline void *rm_calloc(size_t nelem, size_t elemsz) {
  return RedisModule_Calloc(nelem, elemsz);
}
static inline void *rm_realloc(void *p, size_t n) {
  if (n == 0) {
    RedisModule_Free(p);
    return NULL;
  }
  return RedisModule_Realloc(p, n);
}
static inline void rm_free(void *p) {
  RedisModule_Free(p);
}
static inline char *rm_strdup(const char *s) {
  return RedisModule_Strdup(s);
}

static char *rm_strndup(const char *s, size_t n) {
  char *ret = (char *)rm_malloc(n + 1);

  if (ret) {
    ret[n] = '\0';
    memcpy(ret, s, n);
  }
  return ret;
}

static int rm_vasprintf(char **__restrict __ptr, const char *__restrict __fmt, va_list __arg) {
  va_list args_copy;
  va_copy(args_copy, __arg);

  size_t needed = vsnprintf(NULL, 0, __fmt, __arg) + 1;
  *__ptr = (char *)rm_malloc(needed);

  int res = vsprintf(*__ptr, __fmt, args_copy);

  va_end(args_copy);

  return res;
}

static int rm_asprintf(char **__ptr, const char *__restrict __fmt, ...) {
  va_list ap;
  va_start(ap, __fmt);

  int res = rm_vasprintf(__ptr, __fmt, ap);

  va_end(ap);

  return res;
}
#endif
#ifndef REDIS_MODULE_TARGET
/* for non redis module targets */
#define rm_malloc malloc
#define rm_free free
#define rm_calloc calloc
#define rm_realloc realloc
#define rm_strdup strdup
#define rm_strndup strndup
#define rm_asprintf asprintf
#define rm_vasprintf vasprintf
#endif

#define rm_new(x) rm_malloc(sizeof(x))

#endif /* __RMUTIL_ALLOC__ */


<|start_filename|>src/util/misc.c<|end_filename|>
#include "misc.h"
#include <stdlib.h>
#include <ctype.h>

void GenericAofRewrite_DisabledHandler(RedisModuleIO *aof, RedisModuleString *key, void *value) {
  RedisModule_Log(RedisModule_GetContextFromIO(aof), "error",
                  "Requested AOF, but this is unsupported for this module");
  abort();
}

char *strtolower(char *str) {
  char *p = str;
  while (*p) {
    *p = tolower(*p);
    p++;
  }
  return str;
}


<|start_filename|>src/id_list.c<|end_filename|>
#include "index_result.h"
#include "index_iterator.h"
#include "rmalloc.h"

typedef struct {
  IndexIterator base;
  t_docId *docIds;
  t_docId lastDocId;
  t_offset size;
  t_offset offset;
} IdListIterator;

static inline void setEof(IdListIterator *it, int value) {
  it->base.isValid = !value;
}

static inline int isEof(const IdListIterator *it) {
  return !it->base.isValid;
}

typedef struct {
  IndexCriteriaTester base;
  t_docId *docIds;
  t_offset size;
} ILCriteriaTester;

static int cmp_docids(const void *p1, const void *p2);

static int IL_Test(struct IndexCriteriaTester *ct, t_docId id) {
  ILCriteriaTester *lct = (ILCriteriaTester *)ct;
  return bsearch((void *)id, lct->docIds, (size_t)lct->size, sizeof(t_docId), cmp_docids) != NULL;
}

static void IL_TesterFree(struct IndexCriteriaTester *ct) {
  ILCriteriaTester *lct = (ILCriteriaTester *)ct;
  rm_free(lct->docIds);
  rm_free(lct);
}

IndexCriteriaTester *IL_GetCriteriaTester(void *ctx) {
  IdListIterator *it = ctx;
  ILCriteriaTester *ct = rm_malloc(sizeof(*ct));
  ct->docIds = rm_malloc(sizeof(t_docId) * it->size);
  memcpy(ct->docIds, it->docIds, it->size);
  ct->size = it->size;
  ct->base.Test = IL_Test;
  ct->base.Free = IL_TesterFree;
  return &ct->base;
}

size_t IL_NumEstimated(void *ctx) {
  IdListIterator *it = ctx;
  return (size_t)it->size;
}

/* Read the next entry from the iterator, into hit *e.
 *  Returns INDEXREAD_EOF if at the end */
int IL_Read(void *ctx, RSIndexResult **r) {
  IdListIterator *it = ctx;
  if (isEof(it) || it->offset >= it->size) {
    setEof(it, 1);
    return INDEXREAD_EOF;
  }

  it->lastDocId = it->docIds[it->offset++];

  // TODO: Filter here
  it->base.current->docId = it->lastDocId;
  *r = it->base.current;
  return INDEXREAD_OK;
}

void IL_Abort(void *ctx) {
  ((IdListIterator *)ctx)->base.isValid = 0;
}

/* Skip to a docid, potentially reading the entry into hit, if the docId
 * matches */
int IL_SkipTo(void *ctx, t_docId docId, RSIndexResult **r) {
  IdListIterator *it = ctx;
  if (isEof(it) || it->offset >= it->size) {
    return INDEXREAD_EOF;
  }

  if (docId > it->docIds[it->size - 1]) {
    it->base.isValid = 0;
    return INDEXREAD_EOF;
  }

  t_offset top = it->size - 1, bottom = it->offset;
  t_offset i = bottom;

  while (bottom <= top) {

    t_docId did = it->docIds[i];

    if (did == docId) {
      break;
    }
    if (docId < did) {
      if (i == 0) break;
      top = i - 1;
    } else {
      bottom = i + 1;
    }
    i = (bottom + top) / 2;
  }
  it->offset = i + 1;
  if (it->offset >= it->size) {
    setEof(it, 1);
  }

  it->lastDocId = it->docIds[i];
  it->base.current->docId = it->lastDocId;

  *r = it->base.current;

  if (it->lastDocId == docId) {
    return INDEXREAD_OK;
  }
  return INDEXREAD_NOTFOUND;
}

/* the last docId read */
t_docId IL_LastDocId(void *ctx) {
  return ((IdListIterator *)ctx)->lastDocId;
}

/* release the iterator's context and free everything needed */
void IL_Free(struct indexIterator *self) {
  IdListIterator *it = self->ctx;
  IndexResult_Free(it->base.current);
  if (it->docIds) {
    rm_free(it->docIds);
  }
  rm_free(self);
}

/* Return the number of results in this iterator. Used by the query execution
 * on the top iterator */
size_t IL_Len(void *ctx) {
  return (size_t)((IdListIterator *)ctx)->size;
}

static int cmp_docids(const void *p1, const void *p2) {
  const t_docId *d1 = p1, *d2 = p2;

  return (int)(*d1 - *d2);
}

void IL_Rewind(void *p) {
  IdListIterator *il = p;
  setEof(il, 0);
  il->lastDocId = 0;
  il->base.current->docId = 0;
  il->offset = 0;
}

IndexIterator *NewIdListIterator(t_docId *ids, t_offset num, double weight) {

  // first sort the ids, so the caller will not have to deal with it
  qsort(ids, (size_t)num, sizeof(t_docId), cmp_docids);

  IdListIterator *it = rm_new(IdListIterator);

  it->size = num;
  it->docIds = rm_calloc(num, sizeof(t_docId));
  if (num > 0) memcpy(it->docIds, ids, num * sizeof(t_docId));
  setEof(it, 0);
  it->lastDocId = 0;
  it->base.current = NewVirtualResult(weight);
  it->base.current->fieldMask = RS_FIELDMASK_ALL;

  it->offset = 0;

  IndexIterator *ret = &it->base;
  ret->ctx = it;
  ret->type = ID_LIST_ITERATOR;
  ret->GetCriteriaTester = IL_GetCriteriaTester;
  ret->NumEstimated = IL_NumEstimated;
  ret->Free = IL_Free;
  ret->LastDocId = IL_LastDocId;
  ret->Len = IL_Len;
  ret->Read = IL_Read;
  ret->SkipTo = IL_SkipTo;
  ret->Abort = IL_Abort;
  ret->Rewind = IL_Rewind;
  ret->mode = MODE_SORTED;

  ret->HasNext = NULL;
  return ret;
}


<|start_filename|>src/aggregate/functions/math.c<|end_filename|>
#include "function.h"
#include <aggregate/expr/expression.h>
#include <math.h>
#include <err.h>

/* Template for single argument double to double math function */
#define NUMERIC_SIMPLE_FUNCTION(f)                                                               \
  static int mathfunc_##f(ExprEval *ctx, RSValue *result, RSValue **argv, size_t argc,           \
                          QueryError *error) {                                                   \
    if (argc != 1) {                                                                             \
      QueryError_SetErrorFmt(error, QUERY_EPARSEARGS, "Invalid number of arguments for %s", #f); \
      return EXPR_EVAL_ERR;                                                                      \
    }                                                                                            \
    double d;                                                                                    \
    if (!RSValue_ToNumber(argv[0], &d)) {                                                        \
      RSValue_SetNumber(result, NAN);                                                            \
      return EXPR_EVAL_OK;                                                                       \
    }                                                                                            \
    RSValue_SetNumber(result, f(d));                                                             \
    return EXPR_EVAL_OK;                                                                         \
  }

NUMERIC_SIMPLE_FUNCTION(log);
NUMERIC_SIMPLE_FUNCTION(floor);
NUMERIC_SIMPLE_FUNCTION(fabs);
NUMERIC_SIMPLE_FUNCTION(ceil);
NUMERIC_SIMPLE_FUNCTION(sqrt);
NUMERIC_SIMPLE_FUNCTION(log2);
NUMERIC_SIMPLE_FUNCTION(exp);

#define REGISTER_MATHFUNC(name, f) \
  RSFunctionRegistry_RegisterFunction(name, mathfunc_##f, RSValue_Number);

void RegisterMathFunctions() {
  REGISTER_MATHFUNC("log", log);
  REGISTER_MATHFUNC("floor", floor);
  REGISTER_MATHFUNC("abs", fabs);
  REGISTER_MATHFUNC("ceil", ceil);
  REGISTER_MATHFUNC("sqrt", sqrt);
  REGISTER_MATHFUNC("log2", log2);
  REGISTER_MATHFUNC("exp", exp);
}

<|start_filename|>src/dep/libnu/gen/_tofold.c<|end_filename|>
/* Automatically generated file (mph.py), 1466614855
 *
 * Tag             : NU_TOFOLD
 * Prime           : 01000193,
 * G size          : 1401,
 * Combined length : 5423,
 * Encoding        : UTF-8
 */

#include <stdint.h>

const int16_t NU_TOFOLD_G[] = {
	1, 1, -1401, -1400, -1399, -1398, -1397, -1396, -1395, -1394, -1393, -1392, 
	-1391, -1390, -1389, -1388, -1387, -1386, -1385, -1384, -1383, -1382, -1381, -1380, 
	1, -1379, 1, 0, -1378, -1377, -1376, -1375, -1374, -1373, -1372, -1371, 
	-1370, -1369, -1368, -1367, 0, -1366, 0, 1, 0, -1365, 0, -1364, 
	0, -1363, 0, -1362, 0, -1361, 0, -1360, -1359, -1358, -1357, -1356, 
	0, -1355, -1354, -1353, 0, 0, 0, 0, 0, 0, 0, 0, 
	-1352, -1351, -1350, -1349, -1348, -1347, -1346, -1345, -1344, -1343, -1342, -1341, 
	-1340, -1339, -1338, -1337, 0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
	0, -1336, 0, -1335, 0, -1334, 0, -1333, 0, -1332, 0, -1330, 
	0, -1328, 0, -1327, 0, 0, 0, -1326, 0, 0, 0, 0, 
	0, -1325, 0, 0, 0, -1324, 0, -1323, 0, -1322, 0, -1321, 
	0, -1320, 0, -1319, 0, -1318, 0, -1317, 0, -1316, 0, -1315, 
	0, -1313, 0, -1312, 0, -1311, 0, -1310, 0, -1309, 0, -1307, 
	0, -1306, 0, -1305, 0, -1304, 0, -1303, -1302, -1299, 0, -1297, 
	0, -1296, 0, -1294, 0, -1293, 0, -1292, -1291, 0, -1290, -1289, 
	-1288, 0, -1287, 0, 1, 0, -1286, -1285, -1284, 0, -1283, 0, 
	0, -1282, 0, -1281, 0, -1280, 0, -1279, 0, -1278, 0, -1277, 
	0, -1276, 0, -1275, 0, -1274, 0, -1273, 0, -1272, 0, -1271, 
	0, 1, 0, 1, -1270, 1, -1269, -1268, 5, -1267, -1266, -1265, 
	2, 1, -1263, 9, 4, -1262, 1, 1, -1261, 2, 7, -1259, 
	3, 1, 7, 1, 5, 1, 1, 1, 16, 1, 1, 1, 
	17, 1, 25, 1, -1257, -1256, -1255, 0, -1254, 0, 0, 0, 
	-1253, 0, -1252, 0, -1251, -1250, -1249, 0, 1, -1248, -1247, 1, 
	-1246, 1, 1, -1245, 1, 1, -1244, 4, -1243, 1, -1242, 1, 
	0, -1241, 0, -1240, 0, 0, -1239, 0, 0, 0, 0, 0, 
	0, -1238, 0, -1237, -1236, -1232, 1, -1231, 1, 7, -1230, 2, 
	-1229, -1228, 4, 2, 2, 9, 9, -1226, 8, 2, 1, 1, 
	1, 1, 3, 8, 9, 1, 2, 1, 6, 27, 32, 6, 
	32, 6, 64, 2, 65, 5, 66, 4, 71, 2, 1, 1, 
	1, 1, 1, 2, 2, -1224, 2, -1223, 6, -1221, 11, -1220, 
	12, -1219, 1, -1218, 1, -1217, 1, -1216, 6, -1211, -1210, 0, 
	-1209, 0, -1208, 0, -1207, 0, -1206, 0, -1205, 0, -1204, 0, 
	-1203, -1202, 0, -1201, 0, -1200, 0, -1199, 0, 0, -1198, 0, 
	-1197, 0, 1, -1196, 1, -1195, 1, -1194, 1, -1193, 1, -1192, 
	1, -1191, 1, -1190, 2, -1189, 1, -1188, 1, -1187, 1, -1186, 
	1, -1185, 1, -1184, 1, 3, -1183, 2, -1182, 1, 0, -1181, 
	-1180, -1179, 1, 1, -1178, -1177, 1, -1176, 2, -1175, 4, -1174, 
	4, -1173, 1, 4, 1, 1, 4, 7, 8, 12, -1172, 17, 
	-1169, -1168, 1, -1167, 17, -1166, 1, -1165, -1162, -1161, 1, -1159, 
	-1157, 0, -1154, 0, -1153, 0, 0, 0, 0, 0, 0, 0, 
	-1151, -1150, -1143, -1141, -1140, -1139, -1131, -1122, -1120, -1117, -1116, -1115, 
	-1113, -1112, -1111, -1109, 0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, -1108, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 7, -1107, 9, -1106, 8, -1105, 11, 14, 8, 16, 
	8, -1104, 8, 16, 8, 16, 1, -1099, 1, -1097, 1, -1095, 
	8, -1091, 56, -1089, 56, -1087, 56, -1085, 56, -1083, 3, -1081, 
	7, -1079, 8, -1077, 11, 0, -1073, 0, -1066, 0, -1063, 0, 
	-1062, 0, -1060, 0, -1057, 0, -1044, 0, 32, -1043, 32, -1021, 
	32, -1020, 37, -1019, 41, -996, 38, -992, 41, -991, 40, -990, 
	34, -989, 38, -988, 40, -987, 57, -986, 33, -984, 39, -983, 
	34, -982, 57, -980, -978, 0, -976, 0, -975, 0, -974, 0, 
	-973, 0, -972, 0, 0, 0, 0, 0, 0, 0, -971, -970, 
	0, 0, 0, 0, 0, 0, -967, 0, -962, 0, 0, 0, 
	0, -961, 0, 0, -960, -958, -957, 7, -956, 9, 16, 9, 
	-955, -954, -953, 30, -951, 27, 40, 40, 45, 41, 64, 64, 
	67, -949, 65, 65, 68, -948, -947, -945, -938, 64, 64, 64, 
	4, 65, 8, 64, 8, -935, -933, -932, 14, -857, 4, -856, 
	40, 0, -836, 0, -835, 0, -834, 0, -832, -827, 10, 12, 
	-825, -823, -821, -820, -818, 65, -817, 64, 67, -816, 64, -815, 
	64, 0, -814, 0, 0, 0, -813, -812, -811, 2, -809, -808, 
	2, 4, 1, 9, 1, 13, 1, 1, 1, 19, 1, 27, 
	1, 32, 32, -807, -806, -805, 28, -803, -801, -799, 1, 34, 
	1, 10, 33, 20, 32, -797, -783, -779, 17, 36, -776, 0, 
	0, -775, -773, 0, -769, -768, 0, 0, -767, 4, 0, 11, 
	-766, 9, 11, 16, -765, -763, -762, -758, -757, 0, 0, 0, 
	0, 0, 0, -756, -742, 0, -712, -710, 0, 0, -707, 0, 
	-706, 0, -705, 0, -704, 0, -703, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, -702, 0, 0, 0, 0, 0, -701, 
	-700, -698, 0, -697, -696, 0, -695, -694, 0, -693, -692, -690, 
	0, 0, -688, 0, 1, 0, -687, 0, 1, 0, 4, 0, 
	5, 0, 1, 0, 8, 0, -686, 0, -685, 0, 0, 0, 
	-683, 0, -681, 0, -680, 0, -678, 0, -676, 0, -675, 0, 
	-674, 0, -673, 0, -672, 0, -671, 0, -670, 0, -669, 0, 
	-668, 0, -667, 0, 1, -666, 1, -665, 1, -664, 1, -662, 
	1, -661, 1, -660, 1, -659, 1, -658, -657, -656, -655, -654, 
	-653, -652, -651, 1, -650, 1, -649, -648, 1, 1, -647, -646, 
	1, -645, -644, 0, 1, -643, -642, -641, 1, -639, 2, -638, 
	-637, -636, -635, -634, 1, -633, 1, 1, 1, -632, 1, -631, 
	1, -630, 1, -629, -628, -627, 6, 5, 1, 17, 8, -626, 
	2, 18, 22, 0, 4, 16, 5, -625, -624, 0, -623, -621, 
	33, 10, 0, -619, 32, 15, -617, 32, 35, 36, 38, 40, 
	-615, -611, -610, -607, -606, -605, 0, 0, -604, -602, 0, -601, 
	-600, -597, -596, -595, 0, 0, 0, -594, -593, -587, 0, 0, 
	-585, -581, 0, -579, -577, -574, -573, -572, 0, 0, 0, -568, 
	0, 0, 0, 0, 0, 0, 0, 0, -566, -565, -564, -451, 
	0, 0, -450, -449, 0, 0, 0, 0, 0, 0, 0, 0, 
	-448, -447, -446, -445, -444, -443, -442, -441, 0, 0, 0, 0, 
	0, 0, 0, 0, -440, -438, -434, -424, -423, -387, -384, -381, 
	0, 0, 0, 0, 0, 0, 0, 0, -380, -378, -377, -371, 
	-363, -361, -359, -358, 0, -357, 0, -355, 0, -354, 0, -353, 
	-351, 0, -349, 0, -347, 0, -345, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, -343, -341, -338, -337, 0, 0, 32, -334, 
	-333, 0, -331, 0, -330, 0, -328, 0, -326, 0, -325, 0, 
	-323, 0, -322, 0, 39, 0, 43, 0, 43, 0, 48, 0, 
	2, -320, 2, -319, 1, -318, 10, -317, 79, -316, -315, -308, 
	17, 2, 128, -295, 20, -293, 1, 3, -292, -290, 56, 0, 
	-289, -285, -284, -282, -277, -275, -272, -271, -270, -269, -268, -267, 
	-266, -265, 0, -263, -262, -261, -257, -256, -254, -252, -250, -246, 
	-245, -244, -243, -242, 0, 6, -241, 2, 0, -238, -236, 4, 
	-232, -231, -230, -229, -228, -227, -226, -225, -214, -212, 0, -211, 
	0, -209, 0, -191, 0, -187, -185, 57, -184, 58, -183, 37, 
	-181, 57, -180, 65, -179, 6, -178, 64, -177, 45, 0, -176, 
	0, -175, 0, -174, 0, -171, 0, -169, 0, -160, 0, -157, 
	0, -142, -138, 70, -137, 37, 0, -133, 0, -129, 0, -128, 
	0, 3, 0, -120, 0, -119, -55, 132, -53, 40, -52, 40, 
	-51, 77, -50, 133, -49, 17, -48, 17, -47, 16, 0, -46, 
	0, -45, 0, -44, 0, -43, 0, -42, 0, -41, 0, -40, 
	0, -39, 0, -38, -37, -36, 0, -35, -34, 1, -33, 1, 
	0, -32, 0, -31, 0, -30, -27, 4, 9, 1, 12, 1, 
	16, 4, 19, 4, 16, 1, 16, 1, 16, 1, 1, 1, 
	-26, 12, -21, 8, -20, 38, -19, 1, -18, 12, -17, 8, 
	-16, 37, 0, -15, 0, -14, 0, -13, 0, -11, 0, -10, 
	0, -9, 0, -8, 0, -5, -1, 4, 9, 1, 8, 1, 
	8, 4, 6, 24, 3, 3, 7, 26, 26, };

const size_t NU_TOFOLD_G_SIZE = sizeof(NU_TOFOLD_G) / sizeof(*NU_TOFOLD_G);

/* codepoints */
const uint32_t NU_TOFOLD_VALUES_C[] = {
	0x010423, 0x000041, 0x000042, 0x000043, 0x001E46, 0x000045, 0x000047, 0x001E40, 
	0x001E42, 0x001E5C, 0x001E5E, 0x000587, 0x001E58, 0x001E5A, 0x001E54, 0x01040D, 
	0x01040F, 0x010409, 0x01040B, 0x010405, 0x010407, 0x000055, 0x000056, 0x000054, 
	0x000059, 0x010401, 0x010413, 0x00005A, 0x000058, 0x001E36, 0x001E30, 0x001E32, 
	0x00FB15, 0x00FB17, 0x001E08, 0x001E0A, 0x00FB13, 0x001E04, 0x001E06, 0x001E00, 
	0x001E02, 0x001E1C, 0x001E1E, 0x001E18, 0x001E1A, 0x001E14, 0x0104CD, 0x0104CF, 
	0x0104C9, 0x0104CB, 0x0104C5, 0x0104C7, 0x0104C1, 0x0010A1, 0x0104C3, 0x0010A3, 
	0x002C1B, 0x0010A5, 0x002C12, 0x0010A7, 0x002C0C, 0x0010A9, 0x002C0E, 0x0010AB, 
	0x0010A8, 0x0010AE, 0x0010AC, 0x002C15, 0x002C08, 0x0010B1, 0x000048, 0x0010B3, 
	0x000053, 0x0010B5, 0x00004E, 0x0010B7, 0x000044, 0x0010B9, 0x000046, 0x0010BB, 
	0x002C11, 0x002126, 0x002C13, 0x0010BF, 0x0010BD, 0x0010C1, 0x0010C0, 0x0010C3, 
	0x0010C7, 0x010C83, 0x010C82, 0x0010C2, 0x010C81, 0x0010C4, 0x010C80, 0x010C89, 
	0x002C22, 0x010C86, 0x0010C5, 0x010C8D, 0x00004C, 0x002C21, 0x010C87, 0x010C91, 
	0x010C90, 0x002C19, 0x002C1A, 0x010C95, 0x010C84, 0x002C18, 0x002C1F, 0x010C9C, 
	0x010C9B, 0x0010CD, 0x010C9F, 0x010C9D, 0x010C99, 0x010C8F, 0x001EE6, 0x001EE0, 
	0x002C01, 0x000051, 0x000052, 0x002C02, 0x002C00, 0x000050, 0x000057, 0x001EFC, 
	0x001EFE, 0x002C09, 0x002C0A, 0x002C0B, 0x001EF8, 0x002C0D, 0x002C0F, 0x010CB1, 
	0x0104D1, 0x0104D3, 0x002161, 0x002160, 0x002163, 0x001EF6, 0x002165, 0x002164, 
	0x002167, 0x002162, 0x002169, 0x002C7F, 0x00216B, 0x002C1D, 0x002C1E, 0x002C1C, 
	0x00216F, 0x002C75, 0x002C69, 0x002168, 0x001EF0, 0x002C6E, 0x002C6F, 0x001EF2, 
	0x002166, 0x002C29, 0x002C2B, 0x002C28, 0x002C2C, 0x00216A, 0x002C2E, 0x002C6B, 
	0x001ECC, 0x002C70, 0x001ECE, 0x002C72, 0x002183, 0x001EC8, 0x001ECA, 0x001EC4, 
	0x0104BD, 0x0104BF, 0x0104B9, 0x0104BB, 0x0104B5, 0x002C6D, 0x0104B7, 0x0104B1, 
	0x0104B3, 0x002C80, 0x001ED6, 0x002C82, 0x002CA4, 0x002CAC, 0x001ED0, 0x002C86, 
	0x002CA8, 0x0000D1, 0x002CAA, 0x002CAE, 0x002C84, 0x0000D5, 0x0000CE, 0x0000CC, 
	0x002C98, 0x0000CA, 0x002C9A, 0x0000DB, 0x002C9C, 0x002C92, 0x002C9E, 0x0000C8, 
	0x001ED2, 0x002C90, 0x001EAC, 0x001EAE, 0x0000DC, 0x00024C, 0x002C96, 0x002C94, 
	0x0000D0, 0x0000D8, 0x0000D2, 0x0000DA, 0x0000D4, 0x0000D3, 0x0000D6, 0x0000DE, 
	0x001EA8, 0x00024E, 0x001EAA, 0x000248, 0x001EA4, 0x00024A, 0x001EA6, 0x000244, 
	0x002C88, 0x002CB2, 0x002C8A, 0x000246, 0x002C8C, 0x001EA2, 0x002C8E, 0x002CB0, 
	0x00A66C, 0x001EB8, 0x00A668, 0x001EBA, 0x00A66A, 0x001EB4, 0x002CB6, 0x002CB4, 
	0x0000C0, 0x00A664, 0x0000C2, 0x001EB6, 0x0000C4, 0x00A666, 0x0000C6, 0x001EB0, 
	0x00A660, 0x000100, 0x000104, 0x000102, 0x001EB2, 0x00A662, 0x001E8C, 0x000106, 
	0x001E8E, 0x00022C, 0x001E88, 0x00022E, 0x001E8A, 0x000228, 0x001E84, 0x00022A, 
	0x00011C, 0x000110, 0x001E86, 0x000112, 0x000224, 0x00011E, 0x000114, 0x000116, 
	0x00011A, 0x001E80, 0x002CC0, 0x000226, 0x001E82, 0x002CC2, 0x000118, 0x002CDE, 
	0x000220, 0x001E9E, 0x002CED, 0x00A64E, 0x001E9A, 0x000124, 0x001E94, 0x000126, 
	0x002CD8, 0x000128, 0x001C80, 0x00012A, 0x002CD2, 0x00012C, 0x002CD4, 0x00012E, 
	0x001C84, 0x002CD0, 0x001C86, 0x001E90, 0x002CDA, 0x002CDC, 0x002CD6, 0x002CC6, 
	0x001C85, 0x001C88, 0x00A640, 0x001E92, 0x001F6C, 0x001F6E, 0x001F68, 0x001F6A, 
	0x000143, 0x000202, 0x00021C, 0x000141, 0x00021E, 0x000218, 0x000147, 0x00021A, 
	0x000149, 0x000214, 0x000216, 0x00014A, 0x000210, 0x001F4C, 0x00014C, 0x00014E, 
	0x001F48, 0x001F49, 0x000150, 0x000152, 0x001F4A, 0x000154, 0x001F4B, 0x000156, 
	0x001F5D, 0x000158, 0x001F5F, 0x00015A, 0x001F59, 0x00015C, 0x001F5B, 0x00015E, 
	0x001F54, 0x001F56, 0x001F50, 0x000162, 0x001F52, 0x001F2C, 0x001F2D, 0x000166, 
	0x001F2E, 0x0118A6, 0x001F2F, 0x00016A, 0x00017D, 0x0118AC, 0x0118A9, 0x0118AB, 
	0x000178, 0x000160, 0x001F28, 0x00017F, 0x000170, 0x000174, 0x000172, 0x000176, 
	0x001F29, 0x001F2A, 0x00017B, 0x001F2B, 0x001F3C, 0x0118B8, 0x000179, 0x001F3D, 
	0x000181, 0x000186, 0x001F3E, 0x000182, 0x0118BF, 0x000187, 0x0118BA, 0x000184, 
	0x000189, 0x0118A5, 0x00018B, 0x0118A7, 0x0118B4, 0x00018A, 0x00018F, 0x00018E, 
	0x000191, 0x000194, 0x000193, 0x0118A4, 0x00019D, 0x0118B1, 0x000197, 0x0118B3, 
	0x00019C, 0x0118B5, 0x000198, 0x0118B7, 0x0118B6, 0x0118B9, 0x00019F, 0x0118BB, 
	0x0118B2, 0x0118AD, 0x0118B0, 0x0118AA, 0x0118A3, 0x0001A4, 0x001F3F, 0x001F38, 
	0x0001A9, 0x0001E8, 0x0001EA, 0x0001EC, 0x0001EE, 0x0001AC, 0x0001AF, 0x0001AE, 
	0x0001B1, 0x001F39, 0x0001B3, 0x0001B2, 0x0001B5, 0x001F3A, 0x0001B7, 0x001F3B, 
	0x001F0C, 0x001F0D, 0x001F0E, 0x001F0F, 0x001F08, 0x001F09, 0x001F0A, 0x001F0B, 
	0x001F1C, 0x001F1D, 0x001F18, 0x00AB7A, 0x0001E4, 0x00AB7C, 0x0001E6, 0x00AB7E, 
	0x0001CF, 0x0001C8, 0x00AB79, 0x0001CA, 0x00AB7B, 0x00AB73, 0x00AB7D, 0x0001CD, 
	0x00AB7F, 0x00AB71, 0x0001D3, 0x00AB74, 0x0001D5, 0x0001D1, 0x0001D7, 0x00AB75, 
	0x00AB77, 0x00AB81, 0x00AB80, 0x00AB83, 0x00AB82, 0x00AB87, 0x00AB84, 0x00A642, 
	0x0001E2, 0x00AB8E, 0x00AB8B, 0x00AB8C, 0x00AB8A, 0x00AB85, 0x0001E0, 0x00AB86, 
	0x00AB89, 0x00AB91, 0x00AB98, 0x00AB93, 0x00AB88, 0x00AB96, 0x00AB9D, 0x00AB9F, 
	0x00AB90, 0x00AB9A, 0x0001F0, 0x0001F1, 0x00AB99, 0x0001FC, 0x0001F2, 0x00AB9C, 
	0x00AB9B, 0x0001F8, 0x00ABA3, 0x0001FA, 0x0001F4, 0x0001FE, 0x0001F7, 0x0001F6, 
	0x00ABA1, 0x00ABA9, 0x00ABA5, 0x00ABAB, 0x00ABAD, 0x00ABA7, 0x00AB8D, 0x00ABAF, 
	0x00AB8F, 0x00ABB2, 0x000208, 0x00ABB6, 0x00020E, 0x00020C, 0x00ABB0, 0x00ABB4, 
	0x01E903, 0x00ABB9, 0x00ABB8, 0x00ABBB, 0x00ABBA, 0x00ABBE, 0x01E901, 0x00ABBF, 
	0x00ABBD, 0x01E90B, 0x000222, 0x00A648, 0x01E90F, 0x01E909, 0x01E907, 0x01E915, 
	0x01E911, 0x01E91B, 0x01E913, 0x01E90D, 0x01E91D, 0x01E91F, 0x01E917, 0x000200, 
	0x00A65C, 0x00A646, 0x00A65A, 0x01E905, 0x00A658, 0x000206, 0x01E919, 0x000204, 
	0x00A64A, 0x00A65E, 0x000212, 0x001F19, 0x001F1A, 0x001F1B, 0x00A654, 0x001FEC, 
	0x000232, 0x00023B, 0x00020A, 0x001FE8, 0x001FE9, 0x001FEA, 0x00023D, 0x00023E, 
	0x001FEB, 0x000245, 0x001FE4, 0x000241, 0x001FE6, 0x000243, 0x00A64C, 0x00A652, 
	0x001FE7, 0x00ABB1, 0x001FE2, 0x00ABB5, 0x00ABB3, 0x00A650, 0x00ABB7, 0x00A656, 
	0x001FE3, 0x001FFC, 0x001FF8, 0x001FF9, 0x001FFA, 0x00A682, 0x00A686, 0x001FFB, 
	0x001FF4, 0x001FF6, 0x00A680, 0x001FF7, 0x001FF2, 0x001FF3, 0x001FCC, 0x00A688, 
	0x00A68A, 0x00FF2C, 0x00FF2D, 0x00A690, 0x00A684, 0x00A692, 0x00FF2E, 0x00A694, 
	0x00FF24, 0x00A696, 0x00FF27, 0x00A698, 0x00FF23, 0x00A69A, 0x00A68C, 0x00A68E, 
	0x001FD8, 0x00FF37, 0x001FAE, 0x001FAF, 0x001FA8, 0x001FAA, 0x001FA4, 0x001FA6, 
	0x001FA2, 0x001FBC, 0x00A76C, 0x001FBE, 0x00A76E, 0x001FB8, 0x001FBA, 0x000230, 
	0x001FB4, 0x00A764, 0x001FB6, 0x00A760, 0x001FB2, 0x001F8C, 0x001F8D, 0x001F88, 
	0x001F89, 0x001F8B, 0x001F85, 0x001F86, 0x001F87, 0x001F80, 0x001F81, 0x001F82, 
	0x001F83, 0x001F9C, 0x001F9E, 0x001F98, 0x001F9A, 0x001F94, 0x00A644, 0x001F96, 
	0x001F90, 0x001F92, 0x00A75C, 0x00A75E, 0x00A758, 0x00A75A, 0x00A754, 0x00A756, 
	0x00A750, 0x00A752, 0x00A72C, 0x00A72E, 0x001E10, 0x00A728, 0x001E12, 0x00A72A, 
	0x00A724, 0x001E16, 0x00A726, 0x001E2E, 0x00A722, 0x00A73C, 0x0003E6, 0x0003E2, 
	0x001E0C, 0x0003FD, 0x001E0E, 0x0003FE, 0x0003FF, 0x0003F9, 0x0003FA, 0x0003F4, 
	0x0003F5, 0x0003F7, 0x00023A, 0x0003F0, 0x0003F1, 0x0003CF, 0x0003C2, 0x0003DC, 
	0x0003DE, 0x0003D8, 0x0003DA, 0x001E28, 0x001E20, 0x0003D5, 0x001E22, 0x0003D6, 
	0x001E24, 0x001E2A, 0x001E26, 0x010403, 0x010402, 0x010408, 0x010415, 0x01040E, 
	0x001E2C, 0x01041B, 0x010419, 0x001E34, 0x01040A, 0x010400, 0x01041D, 0x010406, 
	0x01041F, 0x010414, 0x010410, 0x001E3C, 0x001E38, 0x001E3E, 0x001E3A, 0x010412, 
	0x010416, 0x010411, 0x010418, 0x001E44, 0x010417, 0x0003D0, 0x01041C, 0x01041A, 
	0x01041E, 0x010424, 0x010420, 0x010404, 0x001E48, 0x001E4E, 0x001E4A, 0x010422, 
	0x010426, 0x010421, 0x01040C, 0x0003D1, 0x0003A8, 0x0003A9, 0x010425, 0x001E4C, 
	0x010427, 0x0003AA, 0x0003AB, 0x001E50, 0x0003A4, 0x0003A0, 0x002C64, 0x002C67, 
	0x002C60, 0x001E52, 0x00A734, 0x001EE4, 0x002C62, 0x00A732, 0x002C63, 0x002C7E, 
	0x00A73E, 0x00A736, 0x0118AE, 0x00A738, 0x001EEC, 0x001E70, 0x0118AF, 0x0104C2, 
	0x001E6C, 0x00A73A, 0x001E6E, 0x00A740, 0x001E72, 0x00A742, 0x001E56, 0x00A744, 
	0x0104CA, 0x00A746, 0x001E76, 0x00A748, 0x0118A8, 0x00A74A, 0x0118A0, 0x00A74C, 
	0x0118A1, 0x00A74E, 0x0118A2, 0x001EC0, 0x0118BC, 0x0118BD, 0x0118BE, 0x000391, 
	0x000392, 0x001E97, 0x0013F9, 0x0013FA, 0x0013FB, 0x00A7B4, 0x002C2D, 0x00A7B1, 
	0x002C2A, 0x002C24, 0x001E9B, 0x002C25, 0x002C26, 0x00A762, 0x002C27, 0x001E96, 
	0x002C20, 0x00A766, 0x002C23, 0x001E99, 0x00A768, 0x00A76A, 0x001E98, 0x00A786, 
	0x001EDC, 0x00A780, 0x00A782, 0x00A79C, 0x000345, 0x00FF22, 0x001EEE, 0x001EA0, 
	0x00FF26, 0x00FF2F, 0x00A779, 0x00FF2A, 0x00A77B, 0x00FF2B, 0x00A77D, 0x00FF29, 
	0x00FF28, 0x00A77E, 0x0104C4, 0x0104B0, 0x0104B2, 0x001EF4, 0x0104B4, 0x00004D, 
	0x00004F, 0x00A78B, 0x0104BC, 0x001EBE, 0x0104B6, 0x0104D2, 0x00A7AC, 0x00A7AD, 
	0x00A784, 0x001EBC, 0x00FF31, 0x001EE8, 0x00FF34, 0x001EEA, 0x00A79A, 0x001EC2, 
	0x00A792, 0x00FF35, 0x00A790, 0x00FF39, 0x00FF25, 0x00FF21, 0x00A798, 0x00037F, 
	0x00A796, 0x000370, 0x00A7A2, 0x00A7A0, 0x000372, 0x00FF32, 0x00FF36, 0x00A7A4, 
	0x00FF33, 0x00A7A6, 0x00FF30, 0x00A7A8, 0x00A7AB, 0x00A7AA, 0x000376, 0x00FF38, 
	0x00FF3A, 0x00A7AE, 0x001EFA, 0x001EDA, 0x001EE2, 0x00038F, 0x00039D, 0x0104B8, 
	0x00A79E, 0x000388, 0x001EDE, 0x00038A, 0x00039F, 0x0013FC, 0x001EC6, 0x0013F8, 
	0x001ED4, 0x000393, 0x000390, 0x000397, 0x0013FD, 0x000394, 0x00039B, 0x000396, 
	0x000399, 0x000398, 0x000386, 0x00039A, 0x000395, 0x00039C, 0x00A78D, 0x00039E, 
	0x001ED8, 0x0003B0, 0x0104C8, 0x000049, 0x00004A, 0x0104CC, 0x00004B, 0x0003A3, 
	0x0104CE, 0x002C04, 0x0003A1, 0x000389, 0x00038C, 0x0003A6, 0x0003A7, 0x00038E, 
	0x002C05, 0x0104C0, 0x002C06, 0x002C07, 0x002C03, 0x0003A5, 0x002C14, 0x0104C6, 
	0x002C16, 0x002C17, 0x002C10, 0x001C87, 0x001C81, 0x001C82, 0x0104D0, 0x001C83, 
	0x002CEB, 0x002CE0, 0x00A7B0, 0x00A7B2, 0x0104BA, 0x00A7B3, 0x002CE2, 0x0104BE, 
	0x00A7B6, 0x01E920, 0x01E921, 0x002CF2, 0x002CCC, 0x002CCE, 0x002CC8, 0x002CCA, 
	0x0024B6, 0x002CC4, 0x0024B8, 0x01E90C, 0x0024BA, 0x01E90E, 0x01E908, 0x01E90A, 
	0x0024BE, 0x01E904, 0x01E906, 0x01E900, 0x01E902, 0x01E91C, 0x01E91E, 0x01E918, 
	0x0024B7, 0x0003E0, 0x0024B9, 0x01E91A, 0x0003EC, 0x0003E4, 0x0024BD, 0x0024BC, 
	0x0024BF, 0x0024BB, 0x0024C1, 0x0024C5, 0x0024C4, 0x0003E8, 0x0003EA, 0x0003EE, 
	0x0024C7, 0x0024C3, 0x0024C0, 0x0024CA, 0x0024C9, 0x0024C2, 0x0024CD, 0x0024CC, 
	0x0024C6, 0x0024C8, 0x01E914, 0x01E916, 0x01E910, 0x0024CB, 0x0024CE, 0x0024CF, 
	0x000403, 0x000400, 0x000407, 0x000402, 0x000405, 0x000404, 0x000401, 0x000406, 
	0x000409, 0x000408, 0x001F6D, 0x00040A, 0x001F6B, 0x00040C, 0x001F69, 0x00040E, 
	0x001F4D, 0x001F6F, 0x01E912, 0x002CA6, 0x00040D, 0x000417, 0x000413, 0x000416, 
	0x000419, 0x000418, 0x00041D, 0x00040B, 0x00041E, 0x000414, 0x00040F, 0x00041B, 
	0x002CA0, 0x000420, 0x000423, 0x002CA2, 0x000425, 0x002CBC, 0x002CBE, 0x000426, 
	0x001F84, 0x002CB8, 0x00042B, 0x00042A, 0x000428, 0x00042C, 0x001F8A, 0x00042E, 
	0x002CBA, 0x001F8F, 0x001F8E, 0x001F91, 0x0000CD, 0x001F93, 0x0000CF, 0x001F95, 
	0x0000C9, 0x001F97, 0x0000CB, 0x001F99, 0x0000C5, 0x001F9B, 0x0000C7, 0x001F9D, 
	0x0000C1, 0x001F9F, 0x0000C3, 0x001FA1, 0x001FA0, 0x001FA3, 0x0000DD, 0x001FA5, 
	0x0000DF, 0x001FA7, 0x0000D9, 0x001FA9, 0x001FAC, 0x001FAB, 0x001FAD, 0x00AB78, 
	0x00AB76, 0x00AB70, 0x00AB72, 0x0000B5, 0x010CAC, 0x001FB3, 0x010CAD, 0x010CAE, 
	0x010CAF, 0x001FB7, 0x010CA8, 0x010CA9, 0x010CAA, 0x001FBB, 0x001FB9, 0x010CAB, 
	0x000464, 0x010CA4, 0x000460, 0x000466, 0x000462, 0x00047E, 0x001FD2, 0x001FD6, 
	0x00046A, 0x000468, 0x010CA5, 0x001FC2, 0x001FC6, 0x001FDA, 0x00046C, 0x00046E, 
	0x000472, 0x000470, 0x010CA6, 0x010CA7, 0x010CA0, 0x001FD3, 0x010CA1, 0x000476, 
	0x001FD7, 0x000478, 0x00047C, 0x00047A, 0x000474, 0x010CA2, 0x010CA3, 0x001FD9, 
	0x00016C, 0x00016E, 0x001FDB, 0x001FC8, 0x000168, 0x001FC3, 0x010CB0, 0x001FC4, 
	0x010CB2, 0x000164, 0x001FC7, 0x001FCB, 0x010C8C, 0x010C8E, 0x010C88, 0x010C8A, 
	0x010C8B, 0x001FCA, 0x001FC9, 0x010C85, 0x010C9E, 0x010C98, 0x010C9A, 0x010C94, 
	0x010C96, 0x010C97, 0x010C92, 0x010C93, 0x000145, 0x0010AD, 0x0010AF, 0x0010AA, 
	0x0010A4, 0x0010A6, 0x0010A0, 0x0010A2, 0x0010BC, 0x0010BE, 0x0010B8, 0x0010BA, 
	0x0010B4, 0x0010B6, 0x0010B0, 0x0010B2, 0x000120, 0x000122, 0x00013D, 0x00013F, 
	0x000139, 0x00013B, 0x000134, 0x000136, 0x000130, 0x000132, 0x00010C, 0x00010E, 
	0x000108, 0x00010A, 0x00ABAC, 0x00FB04, 0x00FB00, 0x00FB06, 0x00FB02, 0x00ABAE, 
	0x00ABA8, 0x00ABAA, 0x00ABA4, 0x00ABA6, 0x00ABA0, 0x00FB03, 0x00ABA2, 0x00ABBC, 
	0x00FB01, 0x00AB9E, 0x0004CB, 0x00AB94, 0x00AB95, 0x00AB97, 0x00AB92, 0x0001CB, 
	0x00FB14, 0x00FB05, 0x00FB16, 0x0001C4, 0x0001C5, 0x0001C7, 0x0001DE, 0x0001D9, 
	0x0001DB, 0x00042D, 0x00042F, 0x000429, 0x000424, 0x000427, 0x000421, 0x000422, 
	0x0001A6, 0x0001A7, 0x0001A0, 0x0001A2, 0x0001BC, 0x0001B8, 0x00216C, 0x00216D, 
	0x00216E, 0x0004E8, 0x00041C, 0x0004EA, 0x00041F, 0x00041A, 0x000415, 0x0004EE, 
	0x000410, 0x000411, 0x000412, 0x0004EC, 0x000196, 0x000190, 0x0004E4, 0x0004E6, 
	0x0004E0, 0x0004E2, 0x0004FC, 0x0004FE, 0x0004F8, 0x0004FA, 0x0004F4, 0x0004F6, 
	0x0004F0, 0x0004F2, 0x0004CD, 0x00212A, 0x00212B, 0x0004C9, 0x0004C5, 0x0004C7, 
	0x0004C0, 0x0004C1, 0x0004C3, 0x0004DC, 0x0004DE, 0x0004D8, 0x000514, 0x0004DA, 
	0x0004D4, 0x000516, 0x0004D6, 0x000510, 0x000512, 0x002132, 0x0004D0, 0x0004D2, 
	0x0004AC, 0x0004AE, 0x0004A8, 0x00051A, 0x0004AA, 0x0004A4, 0x0004A6, 0x0004A0, 
	0x0004A2, 0x000520, 0x0004BC, 0x0004BE, 0x0004B8, 0x0004BA, 0x0004B4, 0x0004B6, 
	0x0004B0, 0x0004B2, 0x00048C, 0x00048E, 0x00048A, 0x000480, 0x00049C, 0x00049E, 
	0x000531, 0x000498, 0x000533, 0x00049A, 0x000494, 0x000496, 0x000490, 0x000492, 
	0x00054C, 0x00054D, 0x00054E, 0x00054F, 0x000548, 0x000549, 0x00054A, 0x00054B, 
	0x000544, 0x000545, 0x000546, 0x000547, 0x000540, 0x000541, 0x000542, 0x000543, 
	0x000554, 0x000555, 0x000556, 0x000550, 0x000551, 0x000552, 0x000553, 0x00052C, 
	0x00052E, 0x000528, 0x00052A, 0x000524, 0x000526, 0x000522, 0x00053C, 0x00053D, 
	0x00053E, 0x00053F, 0x000538, 0x000539, 0x00053A, 0x00053B, 0x000534, 0x000535, 
	0x000536, 0x000537, 0x000532, 0x00050C, 0x001E68, 0x00050E, 0x001E6A, 0x000508, 
	0x001E64, 0x00050A, 0x001E66, 0x000504, 0x001E60, 0x000506, 0x001E62, 0x000500, 
	0x001E7C, 0x000502, 0x001E7E, 0x00051C, 0x001E78, 0x00051E, 0x001E7A, 0x000518, 
	0x001E74, };

/* indexes */
const uint16_t NU_TOFOLD_VALUES_I[] = {
	0x0656, 0x0001, 0x0003, 0x0005, 0x0A22, 0x0009, 0x000D, 0x0A16, 0x0A1A, 0x0A4E, 
	0x0A52, 0x05A2, 0x0A46, 0x0A4A, 0x0A3E, 0x05E8, 0x05F2, 0x05D4, 0x05DE, 0x05C0, 
	0x05CA, 0x0029, 0x002B, 0x0027, 0x0031, 0x05AC, 0x0606, 0x0033, 0x002F, 0x0A02, 
	0x09F6, 0x09FA, 0x14B8, 0x14C2, 0x09A6, 0x09AA, 0x14AE, 0x099E, 0x09A2, 0x0996, 
	0x099A, 0x09CE, 0x09D2, 0x09C6, 0x09CA, 0x09BE, 0x0700, 0x070A, 0x06EC, 0x06F6, 
	0x06D8, 0x06E2, 0x06C4, 0x0727, 0x06CE, 0x072F, 0x1058, 0x0737, 0x1034, 0x073F, 
	0x101C, 0x0747, 0x1024, 0x074F, 0x0743, 0x075B, 0x0753, 0x1040, 0x100C, 0x0767, 
	0x000F, 0x076F, 0x0025, 0x0777, 0x001B, 0x077F, 0x0007, 0x0787, 0x000B, 0x078F, 
	0x1030, 0x0F34, 0x1038, 0x079F, 0x0797, 0x07A7, 0x07A3, 0x07AF, 0x07BB, 0x07CE, 
	0x07C9, 0x07AB, 0x07C4, 0x07B3, 0x07BF, 0x07EC, 0x1074, 0x07DD, 0x07B7, 0x0800, 
	0x0017, 0x1070, 0x07E2, 0x0814, 0x080F, 0x1050, 0x1054, 0x0828, 0x07D3, 0x104C, 
	0x1068, 0x084B, 0x0846, 0x08BE, 0x085A, 0x0850, 0x083C, 0x080A, 0x0C13, 0x0C07, 
	0x0FF0, 0x0021, 0x0023, 0x0FF4, 0x0FEC, 0x001F, 0x002D, 0x0C3F, 0x0C43, 0x1010, 
	0x1014, 0x1018, 0x0C37, 0x1020, 0x1028, 0x08B4, 0x0714, 0x071E, 0x0F44, 0x0F40, 
	0x0F4C, 0x0C33, 0x0F54, 0x0F50, 0x0F5C, 0x0F48, 0x0F64, 0x10D9, 0x0F6C, 0x1060, 
	0x1064, 0x105C, 0x0F7C, 0x10D2, 0x10BA, 0x0F60, 0x0C27, 0x10C5, 0x10C8, 0x0C2B, 
	0x0F58, 0x1090, 0x1098, 0x108C, 0x109C, 0x0F68, 0x10A4, 0x10BE, 0x0BDF, 0x10CB, 
	0x0BE3, 0x10CE, 0x0F80, 0x0BD7, 0x0BDB, 0x0BCF, 0x06B0, 0x06BA, 0x069C, 0x06A6, 
	0x0688, 0x10C2, 0x0692, 0x0674, 0x067E, 0x10DC, 0x0BF3, 0x10E0, 0x1124, 0x1134, 
	0x0BE7, 0x10E8, 0x112C, 0x006B, 0x1130, 0x1138, 0x10E4, 0x0077, 0x0062, 0x005C, 
	0x110C, 0x0056, 0x1110, 0x0086, 0x1114, 0x1100, 0x1118, 0x0050, 0x0BEB, 0x10FC, 
	0x0B9F, 0x0BA3, 0x0089, 0x029A, 0x1108, 0x1104, 0x0068, 0x007D, 0x006E, 0x0083, 
	0x0074, 0x0071, 0x007A, 0x008F, 0x0B97, 0x029D, 0x0B9B, 0x0294, 0x0B8F, 0x0297, 
	0x0B93, 0x028B, 0x10EC, 0x1140, 0x10F0, 0x0291, 0x10F4, 0x0B8B, 0x10F8, 0x113C, 
	0x1208, 0x0BB7, 0x1200, 0x0BBB, 0x1204, 0x0BAF, 0x1148, 0x1144, 0x0038, 0x11F8, 
	0x003E, 0x0BB3, 0x0044, 0x11FC, 0x004A, 0x0BA7, 0x11F0, 0x0095, 0x009B, 0x0098, 
	0x0BAB, 0x11F4, 0x0AAE, 0x009E, 0x0AB2, 0x026B, 0x0AA6, 0x026E, 0x0AAA, 0x0265, 
	0x0A9E, 0x0268, 0x00BF, 0x00AD, 0x0AA2, 0x00B0, 0x025F, 0x00C2, 0x00B3, 0x00B6, 
	0x00BC, 0x0A96, 0x115C, 0x0262, 0x0A9A, 0x1160, 0x00B9, 0x1198, 0x0259, 0x0B84, 
	0x11A8, 0x11CC, 0x0B7C, 0x00CB, 0x0B68, 0x00CE, 0x118C, 0x00D1, 0x097A, 0x00D4, 
	0x1180, 0x00D7, 0x1184, 0x00DA, 0x0986, 0x117C, 0x098C, 0x0AB6, 0x1190, 0x1194, 
	0x1188, 0x1168, 0x0989, 0x0992, 0x11B0, 0x0B5A, 0x0D11, 0x0D19, 0x0D01, 0x0D09, 
	0x00F9, 0x022C, 0x0253, 0x00F6, 0x0256, 0x024D, 0x00FF, 0x0250, 0x0102, 0x0247, 
	0x024A, 0x0106, 0x0241, 0x0CCF, 0x0109, 0x010C, 0x0CBF, 0x0CC3, 0x010F, 0x0112, 
	0x0CC7, 0x0115, 0x0CCB, 0x0118, 0x0CF9, 0x011B, 0x0CFD, 0x011E, 0x0CF1, 0x0121, 
	0x0CF5, 0x0124, 0x0CE3, 0x0CEA, 0x0CD7, 0x012A, 0x0CDC, 0x0C8F, 0x0C93, 0x0130, 
	0x0C97, 0x08E0, 0x0C9B, 0x0136, 0x0154, 0x08FE, 0x08EF, 0x08F9, 0x014B, 0x0127, 
	0x0C7F, 0x0157, 0x013F, 0x0145, 0x0142, 0x0148, 0x0C83, 0x0C87, 0x0151, 0x0C8B, 
	0x0CAF, 0x093A, 0x014E, 0x0CB3, 0x0159, 0x0162, 0x0CB7, 0x015C, 0x095D, 0x0165, 
	0x0944, 0x015F, 0x0168, 0x08DB, 0x016E, 0x08E5, 0x0926, 0x016B, 0x0174, 0x0171, 
	0x017A, 0x0180, 0x017D, 0x08D6, 0x018F, 0x0917, 0x0186, 0x0921, 0x018C, 0x092B, 
	0x0189, 0x0935, 0x0930, 0x093F, 0x0192, 0x0949, 0x091C, 0x0903, 0x0912, 0x08F4, 
	0x08D1, 0x019B, 0x0CBB, 0x0C9F, 0x01A4, 0x01FE, 0x0201, 0x0204, 0x0207, 0x01A7, 
	0x01AD, 0x01AA, 0x01B0, 0x0CA3, 0x01B6, 0x01B3, 0x01B9, 0x0CA7, 0x01BC, 0x0CAB, 
	0x0C57, 0x0C5B, 0x0C5F, 0x0C63, 0x0C47, 0x0C4B, 0x0C4F, 0x0C53, 0x0C77, 0x0C7B, 
	0x0C67, 0x137F, 0x01F8, 0x1387, 0x01FB, 0x138F, 0x01DA, 0x01CE, 0x137B, 0x01D1, 
	0x1383, 0x1363, 0x138B, 0x01D7, 0x1393, 0x135B, 0x01E0, 0x1367, 0x01E3, 0x01DD, 
	0x01E6, 0x136B, 0x1373, 0x139B, 0x1397, 0x13A3, 0x139F, 0x13B3, 0x13A7, 0x11B4, 
	0x01F5, 0x13CF, 0x13C3, 0x13C7, 0x13BF, 0x13AB, 0x01F2, 0x13AF, 0x13BB, 0x13DB, 
	0x13F7, 0x13E3, 0x13B7, 0x13EF, 0x140B, 0x1413, 0x13D7, 0x13FF, 0x020A, 0x020E, 
	0x13FB, 0x0223, 0x0211, 0x1407, 0x1403, 0x021D, 0x1423, 0x0220, 0x0214, 0x0226, 
	0x021A, 0x0217, 0x141B, 0x143B, 0x142B, 0x1443, 0x144B, 0x1433, 0x13CB, 0x1453, 
	0x13D3, 0x145F, 0x0235, 0x146F, 0x023E, 0x023B, 0x1457, 0x1467, 0x0AC9, 0x147B, 
	0x1477, 0x1483, 0x147F, 0x148F, 0x0ABF, 0x1493, 0x148B, 0x0AF1, 0x025C, 0x11C0, 
	0x0B05, 0x0AE7, 0x0ADD, 0x0B23, 0x0B0F, 0x0B41, 0x0B19, 0x0AFB, 0x0B4B, 0x0B55, 
	0x0B2D, 0x0229, 0x11E8, 0x11BC, 0x11E4, 0x0AD3, 0x11E0, 0x0232, 0x0B37, 0x022F, 
	0x11C4, 0x11EC, 0x0244, 0x0C6B, 0x0C6F, 0x0C73, 0x11D8, 0x0EFF, 0x0274, 0x027B, 
	0x0238, 0x0EEF, 0x0EF3, 0x0EF7, 0x027E, 0x0281, 0x0EFB, 0x028E, 0x0EDE, 0x0285, 
	0x0EE3, 0x0288, 0x11C8, 0x11D4, 0x0EE8, 0x145B, 0x0ED0, 0x146B, 0x1463, 0x11D0, 
	0x1473, 0x11DC, 0x0ED7, 0x0F2F, 0x0F1F, 0x0F23, 0x0F27, 0x1210, 0x1218, 0x0F2B, 
	0x0F0E, 0x0F13, 0x120C, 0x0F18, 0x0F03, 0x0F09, 0x0EA1, 0x121C, 0x1220, 0x14F3, 
	0x14F7, 0x122C, 0x1214, 0x1230, 0x14FB, 0x1234, 0x14D3, 0x1238, 0x14DF, 0x123C, 
	0x14CF, 0x1240, 0x1224, 0x1228, 0x0EC0, 0x151F, 0x0E35, 0x0E3B, 0x0E11, 0x0E1D, 
	0x0DF9, 0x0E05, 0x0DED, 0x0E6D, 0x12D4, 0x0E72, 0x12D8, 0x0E5D, 0x0E65, 0x0271, 
	0x0E4C, 0x12C4, 0x0E51, 0x12BC, 0x0E41, 0x0D69, 0x0D6F, 0x0D51, 0x0D57, 0x0D63, 
	0x0D3F, 0x0D45, 0x0D4B, 0x0D21, 0x0D27, 0x0D2D, 0x0D33, 0x0DC9, 0x0DD5, 0x0DB1, 
	0x0DBD, 0x0D99, 0x11B8, 0x0DA5, 0x0D81, 0x0D8D, 0x12B4, 0x12B8, 0x12AC, 0x12B0, 
	0x12A4, 0x12A8, 0x129C, 0x12A0, 0x1258, 0x125C, 0x09B6, 0x1250, 0x09BA, 0x1254, 
	0x1248, 0x09C2, 0x124C, 0x09F2, 0x1244, 0x1274, 0x0347, 0x0341, 0x09AE, 0x036B, 
	0x09B2, 0x036E, 0x0371, 0x0365, 0x0368, 0x035C, 0x035F, 0x0362, 0x0277, 0x0356, 
	0x0359, 0x0323, 0x0320, 0x0338, 0x033B, 0x0332, 0x0335, 0x09E6, 0x09D6, 0x032C, 
	0x09DA, 0x032F, 0x09DE, 0x09EA, 0x09E2, 0x05B6, 0x05B1, 0x05CF, 0x0610, 0x05ED, 
	0x09EE, 0x062E, 0x0624, 0x09FE, 0x05D9, 0x05A7, 0x0638, 0x05C5, 0x0642, 0x060B, 
	0x05F7, 0x0A0E, 0x0A06, 0x0A12, 0x0A0A, 0x0601, 0x0615, 0x05FC, 0x061F, 0x0A1E, 
	0x061A, 0x0326, 0x0633, 0x0629, 0x063D, 0x065B, 0x0647, 0x05BB, 0x0A26, 0x0A32, 
	0x0A2A, 0x0651, 0x0665, 0x064C, 0x05E3, 0x0329, 0x030D, 0x0310, 0x0660, 0x0A2E, 
	0x066A, 0x0313, 0x0316, 0x0A36, 0x0301, 0x02F8, 0x10B3, 0x10B6, 0x10A8, 0x0A3A, 
	0x1264, 0x0C0F, 0x10AC, 0x1260, 0x10AF, 0x10D6, 0x1278, 0x1268, 0x0908, 0x126C, 
	0x0C1F, 0x0A76, 0x090D, 0x06C9, 0x0A6E, 0x1270, 0x0A72, 0x127C, 0x0A7A, 0x1280, 
	0x0A42, 0x1284, 0x06F1, 0x1288, 0x0A82, 0x128C, 0x08EA, 0x1290, 0x08C2, 0x1294, 
	0x08C7, 0x1298, 0x08CC, 0x0BC7, 0x094E, 0x0953, 0x0958, 0x02CB, 0x02CE, 0x0B70, 
	0x0966, 0x096A, 0x096E, 0x134F, 0x10A0, 0x1345, 0x1094, 0x107C, 0x0B80, 0x1080, 
	0x1084, 0x12C0, 0x1088, 0x0B6C, 0x106C, 0x12C8, 0x1078, 0x0B78, 0x12CC, 0x12D0, 
	0x0B74, 0x12F8, 0x0BFF, 0x12EC, 0x12F0, 0x1317, 0x02A0, 0x14CB, 0x0C23, 0x0B87, 
	0x14DB, 0x14FF, 0x12DC, 0x14EB, 0x12E0, 0x14EF, 0x12E4, 0x14E7, 0x14E3, 0x12E8, 
	0x06D3, 0x066F, 0x0679, 0x0C2F, 0x0683, 0x0019, 0x001D, 0x12FC, 0x06AB, 0x0BC3, 
	0x068D, 0x0719, 0x1339, 0x133C, 0x12F4, 0x0BBF, 0x1507, 0x0C17, 0x1513, 0x0C1B, 
	0x1313, 0x0BCB, 0x1307, 0x1517, 0x1303, 0x1527, 0x14D7, 0x14C7, 0x130F, 0x02AC, 
	0x130B, 0x02A3, 0x1323, 0x131F, 0x02A6, 0x150B, 0x151B, 0x1327, 0x150F, 0x132B, 
	0x1503, 0x132F, 0x1336, 0x1333, 0x02A9, 0x1523, 0x152B, 0x133F, 0x0C3B, 0x0BFB, 
	0x0C0B, 0x02C1, 0x02EF, 0x0697, 0x131B, 0x02B2, 0x0C03, 0x02B8, 0x02F5, 0x0972, 
	0x0BD3, 0x0962, 0x0BEF, 0x02D1, 0x02C4, 0x02DD, 0x0976, 0x02D4, 0x02E9, 0x02DA, 
	0x02E3, 0x02E0, 0x02AF, 0x02E6, 0x02D7, 0x02EC, 0x1300, 0x02F2, 0x0BF7, 0x0319, 
	0x06E7, 0x0011, 0x0013, 0x06FB, 0x0015, 0x02FE, 0x0705, 0x0FFC, 0x02FB, 0x02B5, 
	0x02BB, 0x0307, 0x030A, 0x02BE, 0x1000, 0x06BF, 0x1004, 0x1008, 0x0FF8, 0x0304, 
	0x103C, 0x06DD, 0x1044, 0x1048, 0x102C, 0x098F, 0x097D, 0x0980, 0x070F, 0x0983, 
	0x11A4, 0x119C, 0x1342, 0x1348, 0x06A1, 0x134B, 0x11A0, 0x06B5, 0x1353, 0x0B5E, 
	0x0B63, 0x11AC, 0x1174, 0x1178, 0x116C, 0x1170, 0x0F84, 0x1164, 0x0F8C, 0x0AF6, 
	0x0F94, 0x0B00, 0x0AE2, 0x0AEC, 0x0FA4, 0x0ACE, 0x0AD8, 0x0ABA, 0x0AC4, 0x0B46, 
	0x0B50, 0x0B32, 0x0F88, 0x033E, 0x0F90, 0x0B3C, 0x0350, 0x0344, 0x0FA0, 0x0F9C, 
	0x0FA8, 0x0F98, 0x0FB0, 0x0FC0, 0x0FBC, 0x034A, 0x034D, 0x0353, 0x0FC8, 0x0FB8, 
	0x0FAC, 0x0FD4, 0x0FD0, 0x0FB4, 0x0FE0, 0x0FDC, 0x0FC4, 0x0FCC, 0x0B1E, 0x0B28, 
	0x0B0A, 0x0FD8, 0x0FE4, 0x0FE8, 0x037D, 0x0374, 0x0389, 0x037A, 0x0383, 0x0380, 
	0x0377, 0x0386, 0x038F, 0x038C, 0x0D15, 0x0392, 0x0D0D, 0x0398, 0x0D05, 0x039E, 
	0x0CD3, 0x0D1D, 0x0B14, 0x1128, 0x039B, 0x03B9, 0x03AD, 0x03B6, 0x03BF, 0x03BC, 
	0x03CB, 0x0395, 0x03CE, 0x03B0, 0x03A1, 0x03C5, 0x111C, 0x03D4, 0x03DD, 0x1120, 
	0x03E3, 0x1154, 0x1158, 0x03E6, 0x0D39, 0x114C, 0x03F5, 0x03F2, 0x03EC, 0x03F8, 
	0x0D5D, 0x03FE, 0x1150, 0x0D7B, 0x0D75, 0x0D87, 0x005F, 0x0D93, 0x0065, 0x0D9F, 
	0x0053, 0x0DAB, 0x0059, 0x0DB7, 0x0047, 0x0DC3, 0x004D, 0x0DCF, 0x003B, 0x0DDB, 
	0x0041, 0x0DE7, 0x0DE1, 0x0DF3, 0x008C, 0x0DFF, 0x0092, 0x0E0B, 0x0080, 0x0E17, 
	0x0E29, 0x0E23, 0x0E2F, 0x1377, 0x136F, 0x1357, 0x135F, 0x0035, 0x089B, 0x0E47, 
	0x08A0, 0x08A5, 0x08AA, 0x0E56, 0x0887, 0x088C, 0x0891, 0x0E69, 0x0E61, 0x0896, 
	0x040A, 0x0873, 0x0404, 0x040D, 0x0407, 0x0431, 0x0EA6, 0x0EB4, 0x0413, 0x0410, 
	0x0878, 0x0E75, 0x0E85, 0x0EC8, 0x0416, 0x0419, 0x041F, 0x041C, 0x087D, 0x0882, 
	0x085F, 0x0EAD, 0x0864, 0x0425, 0x0EB9, 0x0428, 0x042E, 0x042B, 0x0422, 0x0869, 
	0x086E, 0x0EC4, 0x0139, 0x013C, 0x0ECC, 0x0E91, 0x0133, 0x0E7B, 0x08AF, 0x0E80, 
	0x08B9, 0x012D, 0x0E8A, 0x0E9D, 0x07FB, 0x0805, 0x07E7, 0x07F1, 0x07F6, 0x0E99, 
	0x0E95, 0x07D8, 0x0855, 0x0837, 0x0841, 0x0823, 0x082D, 0x0832, 0x0819, 0x081E, 
	0x00FC, 0x0757, 0x075F, 0x074B, 0x0733, 0x073B, 0x0723, 0x072B, 0x0793, 0x079B, 
	0x0783, 0x078B, 0x0773, 0x077B, 0x0763, 0x076B, 0x00C5, 0x00C8, 0x00F0, 0x00F3, 
	0x00EA, 0x00ED, 0x00E4, 0x00E7, 0x00DD, 0x00E1, 0x00A7, 0x00AA, 0x00A1, 0x00A4, 
	0x1447, 0x14A4, 0x1497, 0x14AB, 0x149D, 0x144F, 0x1437, 0x143F, 0x1427, 0x142F, 
	0x1417, 0x14A0, 0x141F, 0x1487, 0x149A, 0x140F, 0x049A, 0x13E7, 0x13EB, 0x13F3, 
	0x13DF, 0x01D4, 0x14B3, 0x14A8, 0x14BD, 0x01C5, 0x01C8, 0x01CB, 0x01EF, 0x01E9, 
	0x01EC, 0x03FB, 0x0401, 0x03EF, 0x03E0, 0x03E9, 0x03D7, 0x03DA, 0x019E, 0x01A1, 
	0x0195, 0x0198, 0x01C2, 0x01BF, 0x0F70, 0x0F74, 0x0F78, 0x04C4, 0x03C8, 0x04C7, 
	0x03D1, 0x03C2, 0x03B3, 0x04CD, 0x03A4, 0x03A7, 0x03AA, 0x04CA, 0x0183, 0x0177, 
	0x04BE, 0x04C1, 0x04B8, 0x04BB, 0x04E2, 0x04E5, 0x04DC, 0x04DF, 0x04D6, 0x04D9, 
	0x04D0, 0x04D3, 0x049D, 0x0F37, 0x0F39, 0x0497, 0x0491, 0x0494, 0x0488, 0x048B, 
	0x048E, 0x04B2, 0x04B5, 0x04AC, 0x0506, 0x04AF, 0x04A6, 0x0509, 0x04A9, 0x0500, 
	0x0503, 0x0F3C, 0x04A0, 0x04A3, 0x046A, 0x046D, 0x0464, 0x050F, 0x0467, 0x045E, 
	0x0461, 0x0458, 0x045B, 0x0518, 0x0482, 0x0485, 0x047C, 0x047F, 0x0476, 0x0479, 
	0x0470, 0x0473, 0x043A, 0x043D, 0x0437, 0x0434, 0x0452, 0x0455, 0x0530, 0x044C, 
	0x0536, 0x044F, 0x0446, 0x0449, 0x0440, 0x0443, 0x0581, 0x0584, 0x0587, 0x058A, 
	0x0575, 0x0578, 0x057B, 0x057E, 0x0569, 0x056C, 0x056F, 0x0572, 0x055D, 0x0560, 
	0x0563, 0x0566, 0x0599, 0x059C, 0x059F, 0x058D, 0x0590, 0x0593, 0x0596, 0x052A, 
	0x052D, 0x0524, 0x0527, 0x051E, 0x0521, 0x051B, 0x0551, 0x0554, 0x0557, 0x055A, 
	0x0545, 0x0548, 0x054B, 0x054E, 0x0539, 0x053C, 0x053F, 0x0542, 0x0533, 0x04FA, 
	0x0A66, 0x04FD, 0x0A6A, 0x04F4, 0x0A5E, 0x04F7, 0x0A62, 0x04EE, 0x0A56, 0x04F1, 
	0x0A5A, 0x04E8, 0x0A8E, 0x04EB, 0x0A92, 0x0512, 0x0A86, 0x0515, 0x0A8A, 0x050C, 
	0x0A7E, };

const uint8_t NU_TOFOLD_COMBINED[] = {
	0x00, 0x61, 0x00, 0x62, 0x00, 0x63, 0x00, 0x64, 0x00, 0x65, 0x00, 0x66,
	0x00, 0x67, 0x00, 0x68, 0x00, 0x69, 0x00, 0x6A, 0x00, 0x6B, 0x00, 0x6C,
	0x00, 0x6D, 0x00, 0x6E, 0x00, 0x6F, 0x00, 0x70, 0x00, 0x71, 0x00, 0x72,
	0x00, 0x73, 0x00, 0x74, 0x00, 0x75, 0x00, 0x76, 0x00, 0x77, 0x00, 0x78,
	0x00, 0x79, 0x00, 0x7A, 0x00, 0xCE, 0xBC, 0x00, 0xC3, 0xA0, 0x00, 0xC3,
	0xA1, 0x00, 0xC3, 0xA2, 0x00, 0xC3, 0xA3, 0x00, 0xC3, 0xA4, 0x00, 0xC3,
	0x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
	0x90, 0xB7, 0x00, 0xF0, 0x90, 0x90, 0xB8, 0x00, 0xF0, 0x90, 0x90, 0xB9,
	0x00, 0xF0, 0x90, 0x90, 0xBA, 0x00, 0xF0, 0x90, 0x90, 0xBB, 0x00, 0xF0,
	0x90, 0x90, 0xBC, 0x00, 0xF0, 0x90, 0x90, 0xBD, 0x00, 0xF0, 0x90, 0x90,
	0xBE, 0x00, 0xF0, 0x90, 0x90, 0xBF, 0x00, 0xF0, 0x90, 0x91, 0x80, 0x00,
	0xF0, 0x90, 0x91, 0x81, 0x00, 0xF0, 0x90, 0x91, 0x82, 0x00, 0xF0, 0x90,
	0x91, 0x83, 0x00, 0xF0, 0x90, 0x91, 0x84, 0x00, 0xF0, 0x90, 0x91, 0x85,
	0x00, 0xF0, 0x90, 0x91, 0x86, 0x00, 0xF0, 0x90, 0x91, 0x87, 0x00, 0xF0,
	0x90, 0x91, 0x88, 0x00, 0xF0, 0x90, 0x91, 0x89, 0x00, 0xF0, 0x90, 0x91,
	0x8A, 0x00, 0xF0, 0x90, 0x91, 0x8B, 0x00, 0xF0, 0x90, 0x91, 0x8C, 0x00,
	0xF0, 0x90, 0x91, 0x8D, 0x00, 0xF0, 0x90, 0x91, 0x8E, 0x00, 0xF0, 0x90,
	0x91, 0x8F, 0x00, 0xF0, 0x90, 0x93, 0x98, 0x00, 0xF0, 0x90, 0x93, 0x99,
	0x00, 0xF0, 0x90, 0x93, 0x9A, 0x00, 0xF0, 0x90, 0x93, 0x9B, 0x00, 0xF0,
	0x90, 0x93, 0x9C, 0x00, 0xF0, 0x90, 0x93, 0x9D, 0x00, 0xF0, 0x90, 0x93,
	0x9E, 0x00, 0xF0, 0x90, 0x93, 0x9F, 0x00, 0xF0, 0x90, 0x93, 0xA0, 0x00,
	0xF0, 0x90, 0x93, 0xA1, 0x00, 0xF0, 0x90, 0x93, 0xA2, 0x00, 0xF0, 0x90,
	0x93, 0xA3, 0x00, 0xF0, 0x90, 0x93, 0xA4, 0x00, 0xF0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0xA5, 0x00,
	0xD5, 0xB4, 0xD5, 0xAB, 0x00, 0xD5, 0xBE, 0xD5, 0xB6, 0x00, 0xD5, 0xB4,
	0xD5, 0xAD, 0x00, 0xEF, 0xBD, 0x81, 0x00, 0xEF, 0xBD, 0x82, 0x00, 0xEF,
	0xBD, 0x83, 0x00, 0xEF, 0xBD, 0x84, 0x00, 0xEF, 0xBD, 0x85, 0x00, 0xEF,
	0xBD, 0x86, 0x00, 0xEF, 0xBD, 0x87, 0x00, 0xEF, 0xBD, 0x88, 0x00, 0xEF,
	0xBD, 0x89, 0x00, 0xEF, 0xBD, 0x8A, 0x00, 0xEF, 0xBD, 0x8B, 0x00, 0xEF,
	0xBD, 0x8C, 0x00, 0xEF, 0xBD, 0x8D, 0x00, 0xEF, 0xBD, 0x8E, 0x00, 0xEF,
	0xBD, 0x8F, 0x00, 0xEF, 0xBD, 0x90, 0x00, 0xEF, 0xBD, 0x91, 0x00, 0xEF,
	0xBD, 0x92, 0x00, 0xEF, 0xBD, 0x93, 0x00, 0xEF, 0xBD, 0x94, 0x00, 0xEF,
	0xBD, 0x95, 0x00, 0xEF, 0xBD, 0x96, 0x00, 0xEF, 0xBD, 0x97, 0x00, 0xEF,
	0xBD, 0x98, 0x00, 0xEF, 0xBD, 0x99, 0x00, 0xEF, 0xBD, 0x9A, 0x00,
};



<|start_filename|>src/dep/cndict/Makefile<|end_filename|>
FRISO_INI 		:= friso.ini
FRISO_LEXDIR	:= lex
PYTHON			:= python

cndict_data.c: bundle_friso.py
	$(PYTHON) bundle_friso.py -i $(FRISO_INI) -d $(FRISO_LEXDIR) -o .

clean:
	rm -rf cndict_data.c


<|start_filename|>src/dep/libnu/utf8.c<|end_filename|>
#include "utf8.h"

#ifdef NU_WITH_UTF8_READER
#ifdef NU_WITH_VALIDATION

int nu_utf8_validread(const char *encoded, size_t max_len) {
	int len = utf8_validread_basic(encoded, max_len);

	if (len <= 0) {
		return 0;
	}

	/* Unicode core spec, D92, Table 3-7
	 */

	switch (len) {
	/* case 1: single byte sequence can't be > 0x7F and produce len == 1
	 */

	case 2: {
		uint8_t p1 = *(const unsigned char *)(encoded);

		if (p1 < 0xC2) { /* 2-byte sequences with p1 > 0xDF are 3-byte sequences */
			return 0;
		}

		/* the rest will be handled by utf8_validread_basic() */

		break;
	}

	case 3: {
		uint8_t p1 = *(const unsigned char *)(encoded);

		/* 3-byte sequences with p1 < 0xE0 are 2-byte sequences,
		 * 3-byte sequences with p1 > 0xEF are 4-byte sequences */

		uint8_t p2 = *(const unsigned char *)(encoded + 1);

		if (p1 == 0xE0 && p2 < 0xA0) {
			return 0;
		}
		else if (p1 == 0xED && p2 > 0x9F) {
			return 0;
		}

		/* (p2 < 0x80 || p2 > 0xBF) and p3 will be covered
		 * by utf8_validread_basic() */

		break;
	}

	case 4: {
		uint8_t p1 = *(const unsigned char *)(encoded);

		if (p1 > 0xF4) { /* 4-byte sequence with p1 < 0xF0 are 3-byte sequences */
			return 0;
		}

		uint8_t p2 = *(const unsigned char *)(encoded + 1);

		if (p1 == 0xF0 && p2 < 0x90) {
			return 0;
		}

		/* (p2 < 0x80 || p2 > 0xBF) and the rest (p3, p4)
		 * will be covered by utf8_validread_basic() */

		break;
	}

	} /* switch */

	return len;
}

#endif /* NU_WITH_VALIDATION */
#endif /* NU_WITH_UTF8_READER */

#ifdef NU_WITH_UTF8_WRITER

char* nu_utf8_write(uint32_t unicode, char *utf8) {
	unsigned codepoint_len = utf8_codepoint_length(unicode);

	if (utf8 != 0) {
		switch (codepoint_len) {
			case 1: *utf8 = (char)(unicode); break;
			case 2: b2_utf8(unicode, utf8); break;
			case 3: b3_utf8(unicode, utf8); break;
			default: b4_utf8(unicode, utf8); break; /* len == 4 */
		}
	}

	return utf8 + codepoint_len;
}

#endif /* NU_WITH_UTF8_WRITER */


<|start_filename|>src/dep/friso/friso_simptrad.h<|end_filename|>

/**
 * Generated by ./gen_simp_trad.py -f cn_t2s.json on 2017-12-05 09:02:20.311119
 *
 */
#include <stdint.h>

static const uint16_t Cn_T2S_MinChr = 175;
static const uint16_t Cn_T2S_MaxChr = 65131;

static uint16_t Cn_T2S[65132]={
 [0x8604]=0x8572, [0x8A87]=0x5938, [0x6C08]=0x6BE1, [0x6F0A]=0x6E87, [0x9810]=0x9884,
 [0x9F95]=0x9F9B, [0x8599]=0x5243, [0x8FAE]=0x8FAB, [0x7020]=0x6F46, [0x74A3]=0x7391,
 [0x9322]=0x94B1, [0x5AA7]=0x5A32, [0x7926]=0x77FF, [0x9DA9]=0x9E5C, [0x9C28]=0x9CCE,
 [0x8CB3]=0x8D30, [0x8E34]=0x8E0A, [0x92B7]=0x9500, [0x9136]=0x90D0, [0x95B9]=0x9609,
 [0x9438]=0x94CE, [0x58BB]=0x5899, [0x991A]=0x80B4, [0x8F0A]=0x8F7E, [0x8AC7]=0x8C08,
 [0x8C48]=0x5C82, [0x93CD]=0x9559, [0x99D1]=0x9A7D, [0x7E54]=0x7EC7, [0x8156]=0x80E8,
 [0x8EDF]=0x8F6F, [0x9060]=0x8FDC, [0x5DBA]=0x5CAD, [0x7664]=0x7596, [0x7DE9]=0x7F13,
 [0x5C68]=0x5C66, [0x9F6A]=0x9F8A, [0x98E9]=0x9968, [0x6B72]=0x5C81, [0x943F]=0x9571,
 [0x9BFD]=0x9CAB, [0x9EFF]=0x9F0B, [0x700B]=0x6C88, [0x80C7]=0x80BA, [0x528C]=0x523F,
 [0x558E]=0x359E, [0x9911]=0x997D, [0x9C13]=0x9CC3, [0x9B92]=0x9C8B, [0x9F15]=0x51AC,
 [0x7E94]=0x624D, [0x6519]=0x6400, [0x9832]=0x988B, [0x8B1D]=0x8C22, [0x6A9C]=0x6867,
 [0x4E1F]=0x4E22, [0x7121]=0x65E0, [0x93A2]=0x94A8, [0x7725]=0x7726, [0x96A4]=0x9893,
 [0x79A6]=0x5FA1, [0x6C33]=0x6C32, [0x6BB2]=0x6B7C, [0x6F35]=0x6E86, [0x9237]=0x94B4,
 [0x983B]=0x9891, [0x5ABC]=0x5AAA, [0xFE3F]=0x2227, [0x7DBE]=0x7EEB, [0x6443]=0x625B,
 [0x66C4]=0x6654, [0x8CC8]=0x8D3E, [0x904B]=0x8FD0, [0x934D]=0x9540, [0x92CC]=0x94E4,
 [0x964F]=0x968B, [0x55CE]=0x5417, [0x9951]=0x9965, [0x885B]=0x536B, [0x8ADC]=0x8C0D,
 [0x8E5F]=0x8FF9, [0x7463]=0x7410, [0x53E2]=0x4E1B, [0x76E4]=0x76D8, [0x59E6]=0x5978,
 [0x866F]=0x866C, [0x4F75]=0x5E76, [0x5277]=0x94F2, [0x6583]=0x6BD9, [0x8806]=0x867F,
 [0x8D08]=0x8D60, [0x528D]=0x5251, [0x978F]=0x5DE9, [0x540E]=0x540E, [0x5891]=0x5892,
 [0x9F59]=0x9F85, [0x7D93]=0x7ECF, [0x5F14]=0x540A, [0x6397]=0x631C, [0x499B]=0x49B6,
 [0x861A]=0x85D3, [0x925B]=0x94C5, [0x99B1]=0x9A6E, [0x95A3]=0x9601, [0x9DDA]=0x9E68,
 [0x56A5]=0x54BD, [0x9724]=0x6E9C, [0x9826]=0x988F, [0x9D28]=0x9E2D, [0x61AB]=0x60AF,
 [0x68B1]=0x6346, [0x5538]=0x5FF5, [0x763A]=0x7618, [0x5ABD]=0x5988, [0x9D72]=0x9E4A,
 [0x7C3E]=0x5E18, [0x8846]=0x4F17, [0x560D]=0x55BD, [0x91CB]=0x91CA, [0x6E4A]=0x51D1,
 [0x8E63]=0x8E52, [0x544E]=0x5C3A, [0x78D1]=0x7859, [0x5950]=0x5942, [0x9DD3]=0x9E67,
 [0x9F54]=0x9F80, [0x8056]=0x5723, [0x6558]=0x53D9, [0x6ADD]=0x691F, [0x8B5C]=0x8C31,
 [0x6FDF]=0x6D4E, [0x9262]=0x94B5, [0x5BE7]=0x5B81, [0x9D3F]=0x9E3D, [0x9CE9]=0x9E20,
 [0x7D68]=0x7ED2, [0x7E6A]=0x7ED8, [0x87EF]=0x86F2, [0x8A72]=0x8BE5, [0x93F7]=0x9564,
 [0x8A6B]=0x8BE7, [0x91C1]=0x8845, [0x8784]=0x86F3, [0x8E8A]=0x8E0C, [0x720D]=0x70C1,
 [0x938C]=0x9570, [0x570F]=0x5708, [0x9811]=0x987D, [0x7D13]=0x7EBE, [0x7E15]=0x7F0A,
 [0x9F94]=0x9F9A, [0x8A1D]=0x8BB6, [0x8B9C]=0x8C20, [0x8F1F]=0x8F8D, [0x8C9E]=0x8D1E,
 [0x7523]=0x4EA7, [0x72A2]=0x728A, [0x9B27]=0x95F9, [0x9C29]=0x9CD0, [0x5DA8]=0x5CC3,
 [0x812B]=0x8131, [0x8831]=0x86CA, [0x8AB2]=0x8BFE, [0x76BA]=0x76B1, [0x84F4]=0x83BC,
 [0x87C4]=0x86F0, [0x8ECA]=0x8F66, [0x924D]=0x94CB, [0x93CC]=0x9546, [0x774F]=0x56F0,
 [0x99D0]=0x9A7B, [0x9D42]=0x9E3A, [0x9AD2]=0x810F, [0x7E55]=0x7F2E, [0x8EF8]=0x8F74,
 [0x9225]=0x94AC, [0x6F5F]=0x8204, [0x8CDE]=0x8D4F, [0x5563]=0x8854, [0x52E2]=0x52BF,
 [0x5665]=0x54DD, [0x7B67]=0x7B15, [0x7C69]=0x7B3E, [0x7DE8]=0x7F16, [0x616B]=0x6002,
 [0x84EE]=0x83B2, [0x8FF4]=0x56DE, [0x7377]=0x72B7, [0x9479]=0x9569, [0x5F7F]=0x4F5B,
 [0x7CFE]=0x7EA0, [0x6200]=0x604B, [0x8D0A]=0x8D5E, [0x300C]=0x300C, [0x9B91]=0x9C8D,
 [0x7E93]=0x7F28, [0x9912]=0x9981, [0x932F]=0x9519, [0x8F1E]=0x8F8B, [0x93A1]=0x9543,
 [0x95A5]=0x9600, [0x5FA9]=0x590D, [0x802C]=0x8027, [0x672E]=0x672F, [0x6EB3]=0x6DA2,
 [0x8932]=0x88E4, [0x50B7]=0x4F24, [0x7336]=0x72B9, [0x5638]=0x5452, [0x7F3E]=0x74F6,
 [0x8B46]=0x563B, [0x51CD]=0x51BB, [0x74CF]=0x73D1, [0x9952]=0x9976, [0x9C54]=0x9CDD,
 [0x6ADB]=0x6809, [0x89DD]=0x62B5, [0x53E1]=0x777F, [0x7260]=0x5B83, [0x76E3]=0x76D1,
 [0x7162]=0x8315, [0x95E5]=0x95FC, [0x7464]=0x7476, [0x78E7]=0x789B, [0x9D6A]=0x9E4C,
 [0x64EF]=0x6448, [0x8A70]=0x8BD8, [0x8972]=0x88AD, [0x6DF5]=0x6E0A, [0x9376]=0x9536,
 [0x5678]=0x5428, [0x5AFB]=0x5A34, [0x8514]=0x535C, [0x6182]=0x5FE7, [0x8F09]=0x8F7D,
 [0x6E88]=0x6CA9, [0x7D15]=0x7EB0, [0x5D17]=0x5C97, [0x8396]=0x830E, [0x6698]=0x9633,
 [0x8A1B]=0x8BB9, [0x8B02]=0x8C13, [0x92A0]=0x94D1, [0x9BA6]=0x9C96, [0x9DAA]=0x4D17,
 [0x642F]=0x638F, [0x8AB0]=0x8C01, [0x89B2]=0x89D0, [0x8CB4]=0x8D35, [0x76B8]=0x76B2,
 [0x993D]=0x9988, [0x78BC]=0x7801, [0x64C4]=0x63B3, [0x6BC6]=0x6BB4, [0x8F49]=0x8F6C,
 [0x524B]=0x514B, [0x99D2]=0x9A79, [0x7D55]=0x7EDD, [0x8A5B]=0x8BC5, [0x895D]=0x88E3,
 [0x88DC]=0x8865, [0x9663]=0x9635, [0x9867]=0x987E, [0x5BE6]=0x5B9E, [0x9EE8]=0x515A,
 [0x826B]=0x823B, [0x646F]=0x631A, [0x9D52]=0x9E46, [0x8CF4]=0x8D56, [0x9077]=0x8FC1,
 [0x75FA]=0x75F9, [0x98FC]=0x9972, [0x6504]=0x6445, [0x8E89]=0x8DB8, [0x958F]=0x95F0,
 [0x992C]=0x7CCA, [0x9812]=0x9881, [0x7D14]=0x7EAF, [0x8216]=0x94FA, [0x689D]=0x6761,
 [0x9320]=0x952D, [0x9EA9]=0x9EB8, [0x9D09]=0x9E26, [0x9032]=0x8FDB, [0x8B5F]=0x566A,
 [0x743A]=0x73D0, [0x500B]=0x4E2A, [0x7DBF]=0x7EF5, [0x7E3E]=0x7EE9, [0x8A46]=0x8BCB,
 [0x4F48]=0x5E03, [0x9A36]=0x9A7A, [0x514C]=0x5151, [0x5852]=0x57D8, [0x8F38]=0x8F93,
 [0x958E]=0x95F3, [0x88DD]=0x88C5, [0x695C]=0x80E1, [0x6E5E]=0x6D48, [0x9D07]=0x9E28,
 [0x5A66]=0x5987, [0x5EE9]=0x5EEA, [0x83EB]=0x5807, [0x7C6A]=0x7C16, [0x8AF1]=0x8BB3,
 [0x8B70]=0x8BAE, [0x8CF5]=0x8D57, [0x95BF]=0x960C, [0x91F7]=0x948D, [0x9276]=0x94CF,
 [0x8F15]=0x8F7B, [0x58FD]=0x5BFF, [0x797C]=0x88F8, [0x5E7E]=0x51E0, [0x6703]=0x4F1A,
 [0x8907]=0x590D, [0x8A86]=0x8BD3, [0x530B]=0x9676, [0x300D]=0x300D, [0x968E]=0x9636,
 [0x9B90]=0x9C90, [0x5D94]=0x5D5A, [0x8B1B]=0x8BB2, [0x649A]=0x62C8, [0x899C]=0x773A,
 [0x6D1F]=0x6D95, [0x4E9E]=0x4E9A, [0x50A2]=0x5BB6, [0x9425]=0x4985, [0x95A4]=0x5408,
 [0x9DF0]=0x71D5, [0x7FA8]=0x7FA1, [0x9246]=0x94BB, [0x8A31]=0x8BB8, [0x8F33]=0x8F8F,
 [0x8EF2]=0x8F71, [0x5137]=0x4FEA, [0x7B3B]=0x7B47, [0x7D3F]=0x7ED0, [0x63C0]=0x62E3,
 [0x944A]=0x956C, [0x4947]=0x4982, [0x934B]=0x9505, [0x8CCA]=0x8D3C, [0x554F]=0x95EE,
 [0x5DD4]=0x5DC5, [0x99AE]=0x51AF, [0x64DA]=0x636E, [0x885D]=0x51B2, [0x9465]=0x9565,
 [0x5967]=0x5965, [0x7E69]=0x7EF3, [0x9E7D]=0x76D0, [0x636B]=0x626A, [0x89A6]=0x89CE,
 [0x97D3]=0x97E9, [0x8A71]=0x8BDD, [0x68F2]=0x6816, [0x92F6]=0x950D, [0x5679]=0x5F53,
 [0x6B0A]=0x6743, [0x9283]=0x94F3, [0x7D91]=0x6346, [0x5F12]=0x5F11, [0x962F]=0x5740,
 [0x6516]=0x6484, [0x6A9F]=0x69DA, [0x95A1]=0x9602, [0x9420]=0x9568, [0x846F]=0x836F,
 [0x9D26]=0x9E2F, [0x64AB]=0x629A, [0x5B2A]=0x5AD4, [0x6F32]=0x6DA8, [0x8A34]=0x8BC9,
 [0x95C6]=0x677F, [0x5ABF]=0x6127, [0x593E]=0x5939, [0x6440]=0x6342, [0x97CD]=0x97E8,
 [0x92CF]=0x94D7, [0x7C50]=0x85E4, [0x58D3]=0x538B, [0x9862]=0x989F, [0x9C68]=0x9CBF,
 [0x81D9]=0x80ED, [0x6ADF]=0x680E, [0x95E1]=0x9610, [0x9460]=0x94C4, [0x50E3]=0x50ED,
 [0x9264]=0x94A9, [0x7D66]=0x7ED9, [0x7868]=0x7817, [0x8266]=0x8230, [0x616E]=0x8651,
 [0x7576]=0x5F53, [0x91F9]=0x9495, [0x9078]=0x9009, [0x737A]=0x736D, [0x7E7C]=0x7EE7,
 [0x5AFF]=0x5A73, [0x9A2E]=0x9A9D, [0x946A]=0x7089, [0x540B]=0x5BF8, [0x8B8A]=0x53D8,
 [0x570D]=0x56F4, [0x568C]=0x54DC, [0x5D11]=0x6606, [0x9813]=0x987F, [0x9DEF]=0x9E69,
 [0x8617]=0x8616, [0x8F1D]=0x8F89, [0x8A1F]=0x8BBC, [0x92F1]=0x94FD, [0x5023]=0x4EFF,
 [0x9370]=0x953E, [0x98A8]=0x98CE, [0x9BAA]=0x9C94, [0x61AE]=0x6003, [0x8CB0]=0x8D33,
 [0x8FB2]=0x519C, [0x95B6]=0x960A, [0x9C3B]=0x9CD7, [0x7F3D]=0x94B5, [0x9EBC]=0x4E48,
 [0x8541]=0x8368, [0x84C0]=0x836A, [0x8345]=0x7B54, [0x8949]=0x88E5, [0x744B]=0x73AE,
 [0x56CC]=0x82CF, [0x9D51]=0x9E43, [0x9853]=0x989B, [0x7FD2]=0x4E60, [0x9AD4]=0x4F53,
 [0x63DA]=0x626C, [0x6A5F]=0x673A, [0x7063]=0x6E7E, [0x9365]=0x9532, [0x92E4]=0x9504,
 [0x7DE6]=0x7F0C, [0x5969]=0x5941, [0x9BEA]=0x9CAE, [0x66EC]=0x6652, [0x55F6]=0x54D4,
 [0x93FA]=0x497D, [0x8183]=0x817D, [0x8EFB]=0x8F72, [0x6F87]=0x6D9D, [0x8B80]=0x8BFB,
 [0x958B]=0x5F00, [0x8A0A]=0x8BAF, [0x300E]=0x2018, [0x7D10]=0x7EBD, [0x6416]=0x6447,
 [0x6E9D]=0x6C9F, [0x8F1C]=0x8F8E, [0x9D84]=0x4D16, [0x74A1]=0x740E, [0x92A5]=0x94F1,
 [0x78A9]=0x7855, [0x9928]=0x9986, [0x802E]=0x8022, [0xFE5F]=0xFF03, [0x5436]=0x5450,
 [0x5138]=0x7F57, [0x7DBB]=0x7EFD, [0x723A]=0x7237, [0x64C1]=0x62E5, [0x61C3]=0x52E4,
 [0x6642]=0x65F6, [0x95CB]=0x9615, [0x9463]=0x9573, [0x904E]=0x8FC7, [0x5D50]=0x5C9A,
 [0x7E52]=0x7F2F, [0x9AD5]=0x9ACC, [0x6158]=0x60E8, [0x54E1]=0x5458, [0x91E3]=0x9493,
 [0x7662]=0x75D2, [0x92E5]=0x9503, [0x9364]=0x9538, [0x58E9]=0x575D, [0x5DBD]=0x5CB3,
 [0x9A6A]=0x9A8A, [0x83EF]=0x534E, [0x69F3]=0x6868, [0x8B74]=0x8C34, [0x57F7]=0x6267,
 [0x50F9]=0x4EF7, [0x7DFB]=0x81F4, [0x927A]=0x94D2, [0x9EFD]=0x9EFE, [0x9BFF]=0x9CCA,
 [0x6384]=0x62A1, [0x8F07]=0x8F81, [0x8988]=0x6838, [0x760D]=0x75A1, [0x7C11]=0x84D1,
 [0x9913]=0x997F, [0x91C5]=0x917D, [0x8D1B]=0x8D63, [0x889E]=0x886E, [0x5225]=0x522B,
 [0x7AAA]=0x6D3C, [0x862D]=0x5170, [0x9BC9]=0x9CA4, [0x8933]=0x88E2, [0x9D3B]=0x9E3F,
 [0x7E3D]=0x603B, [0x58BE]=0x57A6, [0x4F47]=0x4F2B, [0x97CC]=0x97E7, [0x944C]=0x9554,
 [0x9B74]=0x9C82, [0x9A55]=0x9A84, [0x9BD4]=0x9CBB, [0x81D8]=0x814A, [0x6FDC]=0x6D55,
 [0x6B5F]=0x6B24, [0x75E0]=0x9178, [0x87FA]=0x87EE, [0x93E4]=0x9542, [0x9F67]=0x556E,
 [0x87EC]=0x8749, [0x6EF2]=0x6E17, [0x8A75]=0x8BDC, [0x7E7D]=0x7F24, [0x5B7F]=0x5B6A,
 [0x98FE]=0x9970, [0x8600]=0x841A, [0x6283]=0x62DA, [0x8A08]=0x8BA1, [0x908F]=0x903B,
 [0x5F91]=0x5F84, [0x7E10]=0x7EC9, [0x9D12]=0x9E30, [0x7995]=0x794E, [0x6399]=0x6323,
 [0x689F]=0x67AD, [0x6B1E]=0x68C2, [0x92A3]=0x94F7, [0x7522]=0x4EA7, [0x7CA7]=0x5986,
 [0x9F91]=0x4DAE, [0x7A28]=0x6241, [0x66AB]=0x6682, [0x792A]=0x783A, [0x842C]=0x4E07,
 [0xAF]=0x2C9, [0x5C5C]=0x5C49, [0x6FB1]=0x6DC0, [0x8E30]=0x903E, [0x6AB3]=0x69DF,
 [0x54B7]=0x5555, [0x9D08]=0x96C1, [0x9238]=0x94B9, [0x513A]=0x50A9, [0x7DBD]=0x7EF0,
 [0x9C3C]=0x9CDB, [0x9E0A]=0x4D19, [0x8CC7]=0x8D44, [0x8F46]=0x8F98, [0x6A48]=0x6861,
 [0x96CB]=0x96BD, [0x694A]=0x6768, [0x92E3]=0x94D8, [0x70CF]=0x4E4C, [0x734E]=0x5956,
 [0xFE50]=0xFF0C, [0x5D52]=0x5CA9, [0x99D5]=0x9A7E, [0x9854]=0x989C, [0x8EDB]=0x8F6D,
 [0x615A]=0x60ED, [0x68DF]=0x680B, [0x57E1]=0x57AD, [0x5660]=0x54D2, [0x52E3]=0x7EE9,
 [0x7562]=0x6BD5, [0x7064]=0x6EE6, [0x7CE7]=0x7CAE, [0x7F66]=0x7F58, [0x7BE9]=0x7B5B,
 [0x7A68]=0x9893, [0x92BB]=0x9511, [0x596A]=0x593A, [0x85ED]=0x44D6, [0x9D93]=0x9E4B,
 [0x6FF1]=0x6EE8, [0x5BE9]=0x5BA1, [0x6AF3]=0x680A, [0x93F9]=0x956A, [0x9278]=0x94F0,
 [0x98FF]=0x9973, [0x9A41]=0x9A9C, [0x6582]=0x655B, [0x8105]=0x80C1, [0x4F86]=0x6765,
 [0x760B]=0x75AF, [0x300F]=0x2019, [0x6417]=0x6363, [0x6E1B]=0x51CF, [0x619A]=0x60EE,
 [0x881F]=0x8721, [0x6B9E]=0x6B92, [0x9223]=0x9499, [0x70A4]=0x7167, [0x9C27]=0x4CA2,
 [0x9B29]=0x960B, [0x79AA]=0x7985, [0x852D]=0x836B, [0x8AF3]=0x8C19, [0x8DB2]=0x8DB1,
 [0x65C2]=0x65D7, [0x8FC6]=0x8FE4, [0x8B49]=0x8BC1, [0x5DD2]=0x5CE6, [0x8457]=0x7740,
 [0xFE63]=0xFF0D, [0x81DA]=0x80EA, [0x8CDC]=0x8D50, [0x95E2]=0x8F9F, [0x7165]=0x7115,
 [0x9C67]=0x9CE2, [0xFE33]=0xFF5C, [0x59EA]=0x4F84, [0x856D]=0x8427, [0x64EC]=0x62DF,
 [0x806F]=0x8054, [0x63EE]=0x6325, [0x8A73]=0x8BE6, [0x6975]=0x6781, [0x9477]=0x954A,
 [0x5379]=0x6064, [0x52F8]=0x529D, [0x91FA]=0x948E, [0x6383]=0x626B, [0x6085]=0x60A6,
 [0x6D87]=0x6CFE, [0x6A89]=0x67FD, [0x750C]=0x74EF, [0xFE59]=0xFF08, [0x9B93]=0x9C8A,
 [0x9C12]=0x9CC6, [0x7895]=0x5D0E, [0x9914]=0x54FA, [0x8C9D]=0x8D1D, [0x499F]=0x49B7,
 [0x6A1E]=0x67A2, [0x93A3]=0x84E5, [0x5DA7]=0x5CC4, [0x7AA9]=0x7A9D, [0x9B28]=0x54C4,
 [0x6F86]=0x6D47, [0x652C]=0x63FD, [0x71DC]=0x7116, [0x92B9]=0x9508, [0x9338]=0x94FC,
 [0x96DE]=0x9E21, [0x7D3C]=0x7ECB, [0x79BF]=0x79C3, [0x9A3E]=0x9AA1, [0x6144]=0x6817,
 [0x8AC9]=0x8BFF, [0x97CB]=0x97E6, [0x884A]=0x8511, [0x524E]=0x5239, [0x98E2]=0x9965,
 [0x700F]=0x6D4F, [0x8656]=0x547C, [0x6FDB]=0x8499, [0x6CDD]=0x6EAF, [0x8A5E]=0x8BCD,
 [0x76E1]=0x5C3D, [0x50E5]=0x4FA5, [0xFE66]=0xFF1D, [0x9B68]=0x8C5A, [0x92E6]=0x9514,
 [0x8A13]=0x8BAD, [0x6F70]=0x6E83, [0x72F9]=0x72ED, [0x7378]=0x517D, [0x507A]=0x54B1,
 [0x5CFD]=0x5CE1, [0x99FF]=0x9A8F, [0x6894]=0x6800, [0x570B]=0x56FD, [0x958C]=0x95F6,
 [0x7E11]=0x7F23, [0x9319]=0x9531, [0x8F1B]=0x8F86, [0x9E1B]=0x9E73, [0x8A9E]=0x8BED,
 [0x7621]=0x75AE, [0x8271]=0x8270, [0x819A]=0x80A4, [0x8B77]=0x62A4, [0x78AA]=0x7827,
 [0x65AC]=0x65A9, [0x8B33]=0x8BB4, [0x8CB2]=0x8D40, [0x56B6]=0x5624, [0x9239]=0x94CD,
 [0x70BA]=0x4E3A, [0x7C3D]=0x7B7E, [0x5DBC]=0x5C7F, [0x993F]=0x998A, [0x88CA]=0x8885,
 [0x95CC]=0x9611, [0xFE51]=0x3001, [0x7E79]=0x7ECE, [0x99D4]=0x9A75, [0x6557]=0x8D25,
 [0x66D6]=0x66A7, [0x8259]=0x8231, [0x6F5B]=0x6F5C, [0x737B]=0x732E, [0x6ADE]=0x6A7C,
 [0x7661]=0x75F4, [0x91E4]=0x9490, [0x7950]=0x4F51, [0x7A69]=0x7A33, [0x707D]=0x707E,
 [0x8FA6]=0x529E, [0x6FF0]=0x6F4D, [0x89F4]=0x89DE, [0x9577]=0x957F, [0x797F]=0x7984,
 [0x6F54]=0x6D01, [0x7D81]=0x7ED1, [0x89AA]=0x4EB2, [0x9B8D]=0x9C8F, [0xFA0C]=0x5140,
 [0x7E8F]=0x7F20, [0x5191]=0x80C4, [0x9312]=0x9515, [0x5614]=0x5455, [0x8558]=0x835B,
 [0x8D99]=0x8D75, [0x6F1A]=0x6CA4, [0x851E]=0x848C, [0x9B22]=0x9B13, [0x7FA5]=0x7F9F,
 [0x72A7]=0x727A, [0x95A9]=0x95FD, [0x8ADD]=0x8C1E, [0x8506]=0x83F1, [0x6BAD]=0x50F5,
 [0x64B3]=0x63FF, [0x8332]=0x5179, [0x9936]=0x9989, [0x7DB9]=0x7EFA, [0x9DD6]=0x9E65,
 [0x8CC3]=0x8D41, [0x7A4C]=0x7A23, [0x7D4E]=0x7ED7, [0x8AD7]=0x8C02, [0x8956]=0x8884,
 [0x990E]=0x9979, [0x9BE7]=0x9CB3, [0x9CF6]=0x9E22, [0x55E9]=0x5522, [0x776A]=0x777E,
 [0x8A6C]=0x8BDF, [0x6EEF]=0x6EDE, [0x8070]=0x806A, [0x6372]=0x5377, [0x67F5]=0x6805,
 [0x5DF9]=0x537A, [0x9C78]=0x9C88, [0x93FD]=0x9508, [0xFE6A]=0xFF05, [0x8F05]=0x8F82,
 [0x6207]=0x6206, [0x8186]=0x55C9, [0x6488]=0x635E, [0x9B0D]=0x80E1, [0x936C]=0x9539,
 [0x9090]=0x9026, [0x9413]=0x9566, [0x8A17]=0x6258, [0x8996]=0x89C6, [0x7E43]=0x7EF7,
 [0x4F9A]=0x5F87, [0x9257]=0x94B3, [0x7C23]=0x7BD1, [0x9227]=0x94AA, [0x8AAC]=0x8BF4,
 [0x9A37]=0x9A9A, [0x7D39]=0x7ECD, [0x92BC]=0x9509, [0x95BE]=0x9608, [0x8F45]=0x8F95,
 [0x6EC4]=0x6CA7, [0x584B]=0x8314, [0x7B4D]=0x7B0B, [0x8A57]=0x8BC7, [0x865F]=0x53F7,
 [0x9C63]=0x9CE3, [0x5BE2]=0x5BDD, [0x5F65]=0x5F66, [0x71E6]=0x707F, [0x9A62]=0x9A74,
 [0x8B6D]=0x6BC1, [0x6AEC]=0x6987, [0x6E6F]=0x6C64, [0x6473]=0x62A0, [0x7DD2]=0x7EEA,
 [0x7D79]=0x7EE2, [0x92FC]=0x94A2, [0x75FE]=0x75B4, [0x6A02]=0x4E50, [0x860A]=0x8574,
 [0x5B0C]=0x5A07, [0x5C0E]=0x5BFC, [0x5091]=0x6770, [0x5110]=0x50A7, [0x9593]=0x95F4,
 [0x5695]=0x565C, [0x5AAF]=0x59AB, [0x5920]=0x591F, [0x7DA3]=0x7EFB, [0x9EA5]=0x9EA6,
 [0x93A7]=0x94E0, [0x7026]=0x6F74, [0x9D5D]=0x9E45, [0x8B2C]=0x8C2C, [0x8FAF]=0x8FA9,
 [0x6232]=0x620F, [0x9234]=0x94C3, [0x6EC5]=0x706D, [0x8F44]=0x8F96, [0x6046]=0x6052,
 [0x920D]=0x949D, [0x5B4C]=0x5A08, [0x50D1]=0x4FA8, [0x95D3]=0x95FF, [0x8CD9]=0x8D52,
 [0x7DF9]=0x7F07, [0x7DE3]=0x7F18, [0x7A62]=0x79FD, [0x8AED]=0x8C15, [0x60F1]=0x607C,
 [0x9C3E]=0x9CD4, [0x9E15]=0x9E2C, [0x71FB]=0x718F, [0x9E7A]=0x9E7E, [0x72FD]=0x72C8,
 [0x737C]=0x7315, [0x97FF]=0x54CD, [0x947E]=0x92AE, [0x8588]=0x835F, [0x9A0D]=0x9A92,
 [0x5011]=0x4EEC, [0x8B17]=0x8C24, [0x611B]=0x7231, [0x8E9A]=0x8DF9, [0x9C0D]=0x9CC5,
 [0x849E]=0x8385, [0x9821]=0x9889, [0x9D23]=0x9E2A, [0x5E25]=0x5E05, [0x95A8]=0x95FA,
 [0x96AA]=0x9669, [0x8A2D]=0x8BBE, [0x8F2F]=0x8F91, [0x81C9]=0x8138, [0x9DF2]=0x9E6B,
 [0x67B4]=0x62D0, [0x98B6]=0x98D3, [0x9C39]=0x9CA3, [0x5DB8]=0x5D58, [0x513B]=0x50A5,
 [0x923D]=0x94B8, [0x89C0]=0x89C2, [0x6AC2]=0x68F9, [0x8449]=0x53F6, [0x994B]=0x9988,
 [0x7A4D]=0x79EF, [0x8523]=0x848B, [0x9F4F]=0x9F51, [0x7051]=0x6D12, [0x71D0]=0x78F7,
 [0x5553]=0x542F, [0x92D2]=0x950B, [0x68D6]=0x67A8, [0x6C59]=0x6C61, [0x875F]=0x732C,
 [0x81FA]=0x53F0, [0xFE65]=0xFF1E, [0x7469]=0x83B9, [0x56EA]=0x56F1, [0x8A6D]=0x8BE1,
 [0x6BEC]=0x7403, [0x6F6F]=0x6D54, [0x9B77]=0x9C7F, [0x9DF8]=0x9E6C, [0x727D]=0x7275,
 [0x798D]=0x7978, [0x980C]=0x9882, [0x7210]=0x7089, [0x9112]=0x90B9, [0x9414]=0x9561,
 [0x6B16]=0x6984, [0x8085]=0x8083, [0x649F]=0x6322, [0x5922]=0x68A6, [0x9DA5]=0x9E5B,
 [0x9D87]=0x9E2B, [0x9326]=0x9526, [0x9628]=0x5384, [0x752A]=0x89D2, [0x7D33]=0x7EC5,
 [0x8CAF]=0x8D2E, [0x43B1]=0x43AC, [0x6230]=0x6218, [0x5FB9]=0x5F7B, [0x52BB]=0x5321,
 [0x7D3A]=0x7EC0, [0x74BF]=0x7487, [0x773E]=0x4F17, [0x980A]=0x987C, [0x60C7]=0x6566,
 [0x9C60]=0x9C99, [0x5ACB]=0x8885, [0x9F66]=0x9F88, [0x59CD]=0x59D7, [0x984C]=0x9898,
 [0x5F4E]=0x5F2F, [0x93D1]=0x955D, [0x56D3]=0x556E, [0x5152]=0x513F, [0x95D5]=0x9619,
 [0x9454]=0x9572, [0x68D7]=0x67A3, [0x8B56]=0x8C2E, [0x9DF9]=0x9E70, [0x9BE1]=0x9CB1,
 [0x5EE3]=0x5E7F, [0x9DE5]=0x9E36, [0x5C64]=0x5C42, [0x6AEB]=0x6A65, [0x9D15]=0x9E35,
 [0x8F3F]=0x8206, [0x7FF9]=0x7FD8, [0x52FB]=0x5300, [0x907C]=0x8FBD, [0x8B01]=0x8C12,
 [0x9BC0]=0x9CA7, [0x8D05]=0x8D58, [0x6386]=0x39CF, [0x6688]=0x6655, [0x858A]=0x84DF,
 [0x7613]=0x75EA, [0x7192]=0x8367, [0x7515]=0x74EE, [0x8B96]=0x8C36, [0x396E]=0x3918,
 [0x641F]=0x64C0, [0x879E]=0x8682, [0x5B21]=0x5AD2, [0x7E23]=0x53BF, [0x7027]=0x6CF7,
 [0x93A6]=0x954F, [0x56A8]=0x5499, [0x55AA]=0x4E27, [0x6FAE]=0x6D4D, [0x61B2]=0x5BAA,
 [0x9837]=0x9894, [0x7DBA]=0x7EEE, [0x743F]=0x73F2, [0x5274]=0x5240, [0x8B41]=0x54D7,
 [0x8CC4]=0x8D3F, [0x9A4D]=0x9A81, [0x5653]=0x5618, [0x71D2]=0x70E7, [0x74D4]=0x748E,
 [0x6DDA]=0x6CEA, [0x9918]=0x4F59, [0x645F]=0x6402, [0x5E63]=0x5E01, [0x99E2]=0x9A88,
 [0x6A6B]=0x6A2A, [0x4E26]=0x5E76, [0x696D]=0x4E1A, [0x9D53]=0x9E41, [0x6673]=0x6670,
 [0x61F2]=0x60E9, [0x6575]=0x654C, [0x64F4]=0x6269, [0x5BF6]=0x5B9D, [0xFE55]=0xFF1A,
 [0x927B]=0x94EC, [0x9DFA]=0x9E6D, [0x947F]=0x51FF, [0x6A81]=0x6AA9, [0x8B00]=0x8C0B,
 [0x8D04]=0x8D3D, [0x6689]=0x6656, [0x7B8B]=0x7B3A, [0x840A]=0x83B1, [0x990C]=0x9975,
 [0x7D8F]=0x7EE5, [0x5291]=0x5242, [0x9310]=0x9525, [0x8A16]=0x8BAB, [0x4E99]=0x4E98,
 [0x639B]=0x6302, [0x611C]=0x60EC, [0x859F]=0x83B6, [0x861E]=0x8539, [0x8607]=0x82CF,
 [0x9226]=0x949B, [0x6BAB]=0x6B9A, [0x9109]=0x4E61, [0x8F5F]=0x8F70, [0x9670]=0x9634,
 [0x9C5D]=0x9CBC, [0x513C]=0x4FE8, [0x75BF]=0x75F1, [0x6FC3]=0x6D53, [0x938A]=0x9551,
 [0x8CC5]=0x8D45, [0x61C7]=0x6073, [0x9C23]=0x9CA5, [0x66C9]=0x6653, [0x9DAC]=0x9E27,
 [0x7BCB]=0x7BA7, [0x994C]=0x9994, [0x77D3]=0x772C, [0x7665]=0x75C7, [0x63DB]=0x6362,
 [0x665E]=0x66E6, [0x5862]=0x575E, [0x9CE5]=0x9E1F, [0x9D8F]=0x9E21, [0x91E7]=0x948F,
 [0x8490]=0x641C, [0x9768]=0x9765, [0x746A]=0x739B, [0x896C]=0x6446, [0x8072]=0x58F0,
 [0x2574]=0xFF3F, [0x9C7A]=0x9CA1, [0x816B]=0x80BF, [0x6A01]=0x6869, [0x6B80]=0x592D,
 [0x8F03]=0x8F83, [0x5B0B]=0x5A75, [0x93C3]=0x955E, [0x9211]=0x94A3, [0x5713]=0x5706,
 [0x9594]=0x95F5, [0x6E19]=0x6DA3, [0x7BA0]=0x68F0, [0x9C25]=0x9CCF, [0x9127]=0x9093,
 [0x92A6]=0x94DF, [0x5629]=0x54D7, [0x8B2B]=0x8C2A, [0x89AC]=0x89CA, [0x6EAE]=0x6D49,
 [0x8435]=0x83B4, [0x9937]=0x9987, [0x7AB6]=0x7AAD, [0x7E39]=0x7F25, [0x9E75]=0x5364,
 [0x733B]=0x72F2, [0x91BC]=0x5BB4, [0x8A41]=0x8BC2, [0x6BC0]=0x6BC1, [0x6147]=0x6BB7,
 [0x6649]=0x664B, [0x87C8]=0x8748, [0x64CA]=0x51FB, [0x984D]=0x989D, [0x5ECE]=0x5EBC,
 [0x9251]=0x94C2, [0x9455]=0x9527, [0x95D4]=0x9616, [0x8AD6]=0x8BBA, [0x6FD8]=0x6CDE,
 [0x8CDA]=0x8D49, [0x7A61]=0x7A51, [0x7BE0]=0x7B71, [0x9F63]=0x51FA, [0x58E2]=0x575C,
 [0x7C65]=0x9FA0, [0x5167]=0x5185, [0x52E6]=0x527F, [0x7669]=0x765E, [0x8B6B]=0x8C35,
 [0x6271]=0x63D2, [0x60F2]=0x607D, [0x7AF6]=0x7ADE, [0x5E79]=0x5E72, [0x537B]=0x5374,
 [0x9CFE]=0x4D13, [0x507D]=0x4F2A, [0x71FC]=0x70EC, [0x8B85]=0x8C09, [0x6506]=0x64B5,
 [0x9F8D]=0x9F99, [0x96E2]=0x79BB, [0x790E]=0x7840, [0x9591]=0x95F2, [0x9410]=0x9563,
 [0x5712]=0x56ED, [0x9214]=0x949E, [0x8D16]=0x8D4E, [0x8B1A]=0x8C25, [0x9DA1]=0x9E56,
 [0x9C20]=0x9CCB, [0x7526]=0x82CF, [0x7028]=0x6FD1, [0x8CAB]=0x8D2F, [0x8FAD]=0x8F9E,
 [0x6E2C]=0x6D4B, [0x6AAF]=0x53F0, [0x9838]=0x9888, [0x8F42]=0x6BC2, [0x9DBA]=0x9E61,
 [0x66C7]=0x6619, [0x8546]=0x8487, [0x61C9]=0x5E94, [0x834A]=0x8346, [0x9ACF]=0x9AC5,
 [0x98B8]=0x98D4, [0x8B5A]=0x8C2D, [0x865C]=0x864F, [0x7DE1]=0x7F17, [0x7C60]=0x7B3C,
 [0x78E3]=0x789C, [0x9A64]=0x9AA7, [0x76E7]=0x5362, [0x91E9]=0x9492, [0x736A]=0x72EF,
 [0x9266]=0x94B2, [0x9EF7]=0x9EE9, [0x767C]=0x53D1, [0x6F82]=0x6F84, [0x8B05]=0x8BCC,
 [0x8A84]=0x8BD4, [0x6607]=0x5347, [0x5C0B]=0x5BFB, [0x838A]=0x5E84, [0x7E8C]=0x7EED,
 [0x9A0F]=0x9A90, [0x798E]=0x796F, [0x9315]=0x951F, [0x6898]=0x67A7, [0x8B9A]=0x8D5E,
 [0x819E]=0x43DD, [0x7D21]=0x7EBA, [0x9B25]=0x6597, [0x7627]=0x759F, [0x6C2B]=0x6C22,
 [0x93AA]=0x953C, [0x69AE]=0x8363, [0x62B4]=0x66F3, [0x7E37]=0x7F15, [0x78B8]=0x781C,
 [0x9BBA]=0x9C9D, [0x973D]=0x9701, [0x923F]=0x94BF, [0x71BE]=0x70BD, [0x8CC0]=0x8D3A,
 [0x4FC2]=0x7CFB, [0x8AC4]=0x8C06, [0x9ECC]=0x9EC9, [0x9A4F]=0x9AA3, [0x8ECC]=0x8F68,
 [0x9D70]=0x96D5, [0x6959]=0x8302, [0x61DE]=0x8499, [0x7D61]=0x7EDC, [0x907A]=0x9057,
 [0x7667]=0x75AC, [0x5169]=0x4E24, [0x50E8]=0x507E, [0x73EA]=0x572D, [0x6EEC]=0x6CAA,
 [0x2571]=0xFF0F, [0x64F0]=0x62E7, [0x8073]=0x8038, [0x87F2]=0x866B, [0x5E77]=0x5E76,
 [0x7DF6]=0x7F0F, [0x9C52]=0x9CDF, [0x927F]=0x94EA, [0x71FE]=0x7118, [0x9D1D]=0x9E32,
 [0x8A85]=0x8BDB, [0x6B04]=0x680F, [0x6406]=0x6784, [0x8108]=0x8109, [0x820A]=0x65E7,
 [0x7E8D]=0x7D2F, [0x7B8F]=0x7B5D, [0x980E]=0x9880, [0x9E0C]=0x9E71, [0x6F97]=0x6DA7,
 [0x5CA1]=0x5188, [0x5D20]=0x5CBD, [0x5B24]=0x5B37, [0x9426]=0x950E, [0x522A]=0x5220,
 [0x6F2C]=0x6E0D, [0x6BAF]=0x6BA1, [0x96DC]=0x6742, [0x95BB]=0x960E, [0x93BF]=0x954E,
 [0x703E]=0x6F9C, [0x6CC1]=0x51B5, [0x9D61]=0x9E49, [0x69C3]=0x76D8, [0x7DCB]=0x7EEF,
 [0x9336]=0x8868, [0x5F4C]=0x5F25, [0x984E]=0x816D, [0x91D3]=0x9486, [0x7652]=0x6108,
 [0x52D5]=0x52A8, [0x5354]=0x534F, [0x8C56]=0x4E8D, [0x65DB]=0x5E61, [0x805E]=0x95FB,
 [0x9D60]=0x9E44, [0x7E62]=0x7F0B, [0x9F90]=0x5E9E, [0x686E]=0x676F, [0x64F1]=0x6401,
 [0x7169]=0x70E6, [0x4E82]=0x4E71, [0x6A05]=0x679E, [0x7D0B]=0x7EB9, [0x5F8C]=0x540E,
 [0x9215]=0x94AE, [0x9394]=0x9555, [0x6C96]=0x51B2, [0x8998]=0x89C7, [0x651B]=0x64BA,
 [0x8A9A]=0x8BEE, [0x7C21]=0x7B80, [0x7DA0]=0x7EFF, [0x9727]=0x96FE, [0x74A6]=0x7477,
 [0x92AA]=0x94D5, [0x5F37]=0x5F3A, [0x9839]=0x9893, [0x9375]=0x952E, [0x7ABA]=0x7AA5,
 [0x77BC]=0x7751, [0x50BE]=0x503E, [0x6747]=0x572C, [0x84C6]=0x5E2D, [0x924B]=0x5228,
 [0x81CD]=0x8110, [0x58CE]=0x57D9, [0x9451]=0x9274, [0x95D0]=0x9617, [0x9255]=0x94B7,
 [0x8A3A]=0x8BCA, [0x6ADA]=0x6988, [0x665D]=0x663C, [0x7DE0]=0x7F14, [0x5EE2]=0x5E9F,
 [0x9A65]=0x9AA5, [0x7BE4]=0x7B03, [0x7069]=0x6EDF, [0x92EA]=0x94FA, [0x6FEC]=0x6D5A,
 [0x8B6F]=0x8BD1, [0x6173]=0x60AD, [0x83F4]=0x5EB5, [0x7F77]=0x7F62, [0x7CF6]=0x7C9C,
 [0x5879]=0x5811, [0x99F8]=0x9A8E, [0x91FE]=0x497A, [0x967D]=0x9633, [0x57FC]=0x5D0E,
 [0x8706]=0x86AC, [0x8208]=0x5174, [0x9C0C]=0x4CA1, [0x95AC]=0x9606, [0x9293]=0x94E8,
 [0x9658]=0x9649, [0x8A18]=0x8BB0, [0x8ADB]=0x8C00, [0x8B04]=0x8A8A, [0xFE31]=0xFF5C,
 [0x5D22]=0x5CE5, [0x9824]=0x9890, [0x93A9]=0x94E9, [0x6EAB]=0x6E29, [0x512A]=0x4F18,
 [0x6C2C]=0x6C29, [0x9A38]=0x9A9F, [0x96BB]=0x53EA, [0x993A]=0x998E, [0x95BD]=0x960D,
 [0x6FC1]=0x6D4A, [0x93E1]=0x955C, [0x6AC3]=0x67DC, [0x64C7]=0x62E9, [0x7C4C]=0x7B79,
 [0x9B4E]=0x9B49, [0x91D5]=0x948C, [0x9054]=0x8FBE, [0x8A58]=0x8BCE, [0x7FA9]=0x4E49,
 [0x645C]=0x63BC, [0x9464]=0x5228, [0xFE60]=0xFF06, [0x9AE3]=0x4EFF, [0x7D62]=0x7EDA,
 [0x7864]=0x7856, [0x9766]=0x817C, [0x8EEB]=0x8F78, [0x8C6C]=0x732A, [0x9DBC]=0x9E63,
 [0x2572]=0xFF3C, [0x9F76]=0x816D, [0x96FB]=0x7535, [0x947C]=0x9523, [0x937E]=0x949F,
 [0x6F01]=0x6E14, [0x8A03]=0x8BA3, [0x8407]=0x82CC, [0x7E0B]=0x7F12, [0x618A]=0x60EB,
 [0x5D0D]=0x5D03, [0x9343]=0x952A, [0x980F]=0x9883, [0x5690]=0x5C1D, [0x9592]=0x95F2,
 [0x5115]=0x4FAA, [0x84EF]=0x82C1, [0x4F96]=0x4ED1, [0x8B19]=0x8C26, [0x8A98]=0x8BF1,
 [0x651D]=0x6444, [0x9A23]=0x9B03, [0x5DA2]=0x5CE3, [0x9427]=0x950F, [0x97A6]=0x79CB,
 [0x92A8]=0x94F5, [0x8E2B]=0x78B0, [0x51AA]=0x5E42, [0x8CAC]=0x8D23, [0x6BAE]=0x6B93,
 [0x7C37]=0x6A90, [0x7FB6]=0x81BB, [0x763B]=0x7618, [0x54BC]=0x5459, [0x6F41]=0x988D,
 [0x8EC0]=0x8EAF, [0x68C4]=0x5F03, [0x584F]=0x57B2, [0x9678]=0x9646, [0x8B59]=0x8C2F,
 [0x865B]=0x865A, [0x9F61]=0x9F84, [0x5EE0]=0x5382, [0x9369]=0x9518, [0x92E8]=0x9507,
 [0x8CEC]=0x8D26, [0x6771]=0x4E1C, [0x8CD2]=0x8D4A, [0x9C77]=0x9CC4, [0x73FE]=0x73B0,
 [0x8606]=0x82A6, [0x7F8B]=0x8288, [0x9A0E]=0x9A91, [0x9412]=0x94F9, [0x5114]=0x4FE6,
 [0x651C]=0x643A, [0x9BA3]=0x4C9F, [0x92A9]=0x94E5, [0x9328]=0x951A, [0x89AF]=0x89CF,
 [0x66B1]=0x6635, [0x60B5]=0x6005, [0x6134]=0x6006, [0x7E36]=0x7D77, [0x9BEB]=0x9CB0,
 [0x5B38]=0x5A76, [0x8B4E]=0x8C32, [0x8ADE]=0x8C1D, [0x74BD]=0x73BA, [0x723E]=0x5C14,
 [0x6944]=0x533E, [0x79CF]=0x8017, [0x7A4E]=0x9896, [0x56D1]=0x5631, [0x9452]=0x9274,
 [0x50D5]=0x4EC6, [0xFE69]=0xFF04, [0x8B58]=0x8BC6, [0x885A]=0x80E1, [0x61DF]=0x603C,
 [0x625E]=0x634D, [0x5EE1]=0x5E91, [0x9F60]=0x9F86, [0x5C62]=0x5C61, [0x98E5]=0x9966,
 [0x5666]=0x54D5, [0x52E9]=0x52DA, [0x7368]=0x72EC, [0x6FEB]=0x6EE5, [0x506A]=0x903C,
 [0x8CED]=0x8D4C, [0x6D6C]=0x91CC, [0x8A6E]=0x8BE0, [0x9BE8]=0x9CB8, [0x9D06]=0x9E29,
 [0x5B78]=0x5B66, [0x97FB]=0x97F5, [0x71FF]=0x8000, [0x6F80]=0x6DA9, [0x98EA]=0x996A,
 [0x8805]=0x8747, [0x6209]=0x94BA, [0x7C0D]=0x7BD3, [0x990F]=0x997B, [0x7015]=0x6FD2,
 [0x6E96]=0x51C6, [0x6A19]=0x6807, [0x6B98]=0x6B8B, [0x5FA0]=0x5F95, [0x56A6]=0x5456,
 [0x73A8]=0x73CF, [0x64B2]=0x6251, [0x2035]=0xFF40, [0x9D37]=0x4D15, [0x9148]=0x90E6,
 [0x78BA]=0x786E, [0x5DCB]=0x5CBF, [0x8CC2]=0x8D42, [0x66C6]=0x5386, [0x9F4B]=0x658B,
 [0x80CA]=0x6710, [0x5C4D]=0x5C38, [0x7F4C]=0x7F42, [0x5562]=0x5521, [0x7055]=0x6F13,
 [0x91D4]=0x9487, [0x6BD8]=0x6BD7, [0x615F]=0x6078, [0x7E61]=0x7EE3, [0x9865]=0x98A2,
 [0x93E8]=0x933E, [0x896F]=0x886C, [0x8AEE]=0x8C18, [0x8373]=0x8C46, [0x64F2]=0x63B7,
 [0x8075]=0x8069, [0x9EF6]=0x9EE1, [0x58FA]=0x58F6, [0x947D]=0x94BB, [0x9354]=0x9537,
 [0x5000]=0x4F25, [0x9D89]=0x9E51, [0x5C08]=0x4E13, [0x8810]=0x86F4, [0x8C93]=0x732B,
 [0x6B12]=0x683E, [0x9116]=0x90E7, [0x9418]=0x949F, [0x7A1C]=0x68F1, [0x9D1E]=0x9E2E,
 [0x92C1]=0x94DD, [0x64A3]=0x63B8, [0x8F2A]=0x8F6E, [0x53AD]=0x538C, [0x5E33]=0x5E10,
 [0x975C]=0x9759, [0x79B1]=0x7977, [0x9830]=0x988A, [0x5FB5]=0x5F81, [0x7E34]=0x7EA4,
 [0x873A]=0x9713, [0x6BBD]=0x80B4, [0x8A3C]=0x8BC1, [0x71C1]=0x70E8, [0x7AC7]=0x7AA6,
 [0x9DC9]=0x4D18, [0x9C48]=0x9CD5, [0x9F4A]=0x9F50, [0x66CF]=0x5411, [0x854E]=0x835E,
 [0x8CD3]=0x5BBE, [0xFE62]=0xFF0B, [0x6FD5]=0x6E7F, [0x52D7]=0x52D6, [0x7156]=0x6696,
 [0x75D9]=0x75C9, [0x98DB]=0x98DE, [0x975A]=0x9753, [0x9BDD]=0x9CB4, [0x5EDF]=0x5E99,
 [0x7D5E]=0x7EDE, [0x64E3]=0x6363, [0x6AE7]=0x69E0, [0x4F6A]=0x5F8A, [0x926C]=0x94BC,
 [0x98BC]=0x98D5, [0x99F1]=0x9A86, [0x9870]=0x98A6, [0x9CF3]=0x51E4, [0x6176]=0x5E86,
 [0x85F9]=0x853C, [0x8A7C]=0x8BD9, [0x6EFF]=0x6EE1, [0x9341]=0x9528, [0x9403]=0x94D9,
 [0x9382]=0x9541, [0x9684]=0x5824, [0x7D09]=0x7EAB, [0x830D]=0x82DF, [0x8B92]=0x8C17,
 [0x4F15]=0x592B, [0x96E3]=0x96BE, [0x5B1D]=0x8885, [0x7E1F]=0x7F1B, [0x7D9E]=0x7F0D,
 [0x83A2]=0x835A, [0x69A6]=0x5E72, [0x6D29]=0x6CC4, [0x8CA8]=0x8D27, [0x502B]=0x4F26,
 [0x532D]=0x5326, [0x92AC]=0x94D0, [0x562F]=0x5578, [0x55AE]=0x5355, [0x7931]=0x783B,
 [0x9C33]=0x9CD3, [0x7672]=0x766B, [0x5F35]=0x5F20, [0x61B6]=0x5FC6, [0x883B]=0x86EE,
 [0x6B3D]=0x94A6, [0x8ABC]=0x8C0A, [0x7A47]=0x415F, [0x85CE]=0x8369, [0x8ED4]=0x8F6B,
 [0x5257]=0x522C, [0x985B]=0x98A0, [0x77DA]=0x77A9, [0x5E5F]=0x5E1C, [0x7DDE]=0x7F0E,
 [0x8161]=0x8136, [0x98C6]=0x98D9, [0x566F]=0x55F3, [0x7BF2]=0x5F57, [0x7F75]=0x9A82,
 [0x9EF4]=0x9709, [0x8277]=0x8273, [0x61F6]=0x61D2, [0x67FA]=0x62D0, [0x8B7D]=0x8A89,
 [0x8AFC]=0x8C16, [0x9081]=0x8FC8, [0x5100]=0x4EEA, [0x9583]=0x95EA, [0x7B87]=0x4E2A,
 [0x9806]=0x987A, [0x7D08]=0x7EA8, [0x7E0A]=0x7F22, [0x630C]=0x683C, [0x8E95]=0x8E70,
 [0x8F14]=0x8F85, [0x9397]=0x67AA, [0x5016]=0x5E78, [0x9A05]=0x9A93, [0x361A]=0x360E,
 [0x7C1E]=0x7BAA, [0x91B1]=0x53D1, [0x9DB4]=0x9E64, [0x8CA9]=0x8D29, [0x91AB]=0x533B,
 [0x942E]=0x9570, [0x98B1]=0x53F0, [0x5009]=0x4ED3, [0x9EB5]=0x9762, [0x9C5F]=0x9C8E,
 [0x863A]=0x84E0, [0x8B3C]=0x547C, [0x6C3E]=0x6CDB, [0x9E1E]=0x9E3E, [0x95C3]=0x9612,
 [0x56C5]=0x5181, [0x9744]=0x972D, [0x9BC7]=0x9CA9, [0x9846]=0x9897, [0x9AAF]=0x80AE,
 [0x96B8]=0x96B6, [0x8A52]=0x8BD2, [0x4F54]=0x5360, [0x93D7]=0x94FF, [0x99DB]=0x9A76,
 [0x60E1]=0x6076, [0x536C]=0x6602, [0x77EF]=0x77EB, [0x9DF3]=0x9E47, [0x9E79]=0x54B8,
 [0x8076]=0x8042, [0x6578]=0x6570, [0x8AE7]=0x8C10, [0x7001]=0x6F3E, [0x9C09]=0x9CC7,
 [0x7D88]=0x7EE8, [0x7E8A]=0x7EA9, [0x8811]=0x877E, [0x8D13]=0x8D43, [0x8A92]=0x8BF6,
 [0x6F94]=0x6D69, [0x5096]=0x4F27, [0x9419]=0x956B, [0x9598]=0x95F8, [0x991B]=0x9984,
 [0x769A]=0x7691, [0x8021]=0x52A9, [0x81A0]=0x80F6, [0x6523]=0x631B, [0x8DA8]=0x8D8B,
 [0x8EAA]=0x8E8F, [0x722D]=0x4E89, [0x93AC]=0x9550, [0x5831]=0x62A5, [0x5D33]=0x5D5B,
 [0x7E35]=0x7F26, [0x60B6]=0x95F7, [0x893B]=0x4EB5, [0x6BBC]=0x58F3, [0x6F3F]=0x6D46,
 [0x7CF4]=0x7C74, [0x91C0]=0x917F, [0x5DA0]=0x5CE4, [0x9C49]=0x9CD6, [0x614B]=0x6001,
 [0x8AD2]=0x8C05, [0x8E55]=0x8DF8, [0x9249]=0x94C9, [0x9470]=0x94A5, [0x9F5F]=0x9F83,
 [0x7CDE]=0x7CAA, [0x81E0]=0x8114, [0x6DE8]=0x51C0, [0x926D]=0x94BD, [0x9871]=0x9885,
 [0x7D73]=0x7EDB, [0x5E75]=0x5F00, [0x86FA]=0x86F1, [0x6F7F]=0x6DA0, [0x8CFE]=0x8D5C,
 [0x9200]=0x94AF, [0x5102]=0x4FAC, [0x9B06]=0x677E, [0x7E08]=0x8426, [0x648F]=0x6326,
 [0x8A10]=0x8BA6, [0x8E93]=0x8E2C, [0x8D95]=0x8D76, [0x9428]=0x9544, [0x98AE]=0x98D1,
 [0x599D]=0x5986, [0x981C]=0x988C, [0x63A1]=0x91C7, [0x6FA9]=0x6CF6, [0x92AB]=0x94EF,
 [0x9A30]=0x817E, [0x7DB5]=0x5F69, [0x6336]=0x5C40, [0x6ABB]=0x69DB, [0x89BD]=0x89C8,
 [0x8CBF]=0x8D38, [0x8F3E]=0x8F97, [0x9240]=0x94BE, [0x76C3]=0x676F, [0x9444]=0x94F8,
 [0x58C7]=0x575B, [0x7B46]=0x7B14, [0x7E48]=0x8941, [0x62CB]=0x629B, [0x61CD]=0x61D4,
 [0x8A50]=0x8BC8, [0x8C54]=0x8273, [0x97D9]=0x97EA, [0x7658]=0x75A0, [0x99DD]=0x9A7C,
 [0xFE64]=0xFF1C, [0x85E5]=0x836F, [0x8464]=0x836E, [0x68E7]=0x6808, [0x71ED]=0x70DB,
 [0x5EF3]=0x5385, [0x60F7]=0x8822, [0x6AFB]=0x6A31, [0x9301]=0x951E, [0x9280]=0x94F6,
 [0x9807]=0x9878, [0x9F09]=0x9F0D, [0x7E88]=0x7F2C, [0x820B]=0x8845, [0x9D8A]=0x9E52,
 [0x9396]=0x9501, [0x5A1B]=0x5A31, [0x559A]=0x5524, [0x589C]=0x5760, [0x9C1F]=0x9CD1,
 [0x5F9E]=0x4ECE, [0x8525]=0x8471, [0x8F64]=0x8F73, [0x8F29]=0x8F88, [0x912D]=0x90D1,
 [0x942F]=0x4983, [0x9B31]=0x90C1, [0x7E33]=0x7F1A, [0x71C8]=0x706F, [0x66B8]=0x4E86,
 [0x8A3B]=0x6CE8, [0x85BA]=0x8360, [0x8C3F]=0x6EAA, [0x6FBE]=0x3CE0, [0x7341]=0x72B8,
 [0x72C0]=0x72B6, [0x9F34]=0x9F39, [0x5EC8]=0x53A6, [0x7DCA]=0x7D27, [0x614D]=0x6120,
 [0x87CE]=0x87A8, [0x6AD0]=0x7D2F, [0x9A5B]=0x9A7F, [0x55DA]=0x545C, [0x7C5F]=0x7C41,
 [0x81E2]=0x81DC, [0x6DEA]=0x6CA6, [0x746F]=0x7405, [0x7E73]=0x7F34, [0x5CF4]=0x5C98,
 [0x8077]=0x804C, [0x66F8]=0x4E66, [0x8A7B]=0x54AF, [0x85FA]=0x853A, [0x8207]=0x4E0E,
 [0x6FFE]=0x6EE4, [0x5504]=0x5457, [0x8A91]=0x8BF3, [0x8B10]=0x8C27, [0x6812]=0x65EC,
 [0x7197]=0x709D, [0x5699]=0x556E, [0x5718]=0x56E2, [0x991C]=0x9983, [0x7E1E]=0x7F1F,
 [0x64A5]=0x62E8, [0x6524]=0x644A, [0x965D]=0x9655, [0x50AD]=0x4F63, [0x562E]=0x5520,
 [0x5B30]=0x5A74, [0x7832]=0x70AE, [0x7CB5]=0x7CA4, [0x9D34]=0x9E3B, [0x6236]=0x6237,
 [0x6E3E]=0x6D51, [0x52C1]=0x52B2, [0x5340]=0x533A, [0x97C3]=0x9791, [0x5F48]=0x5F39,
 [0x8AD1]=0x8BFC, [0x6B50]=0x6B27, [0x8852]=0x70AB, [0x8CD5]=0x8D47, [0x91D7]=0x948A,
 [0x96D9]=0x53CC, [0x7BDB]=0x7BAC, [0x995C]=0x990D, [0x7E5E]=0x7ED5, [0x87E3]=0x866E,
 [0x943A]=0x94DB, [0x69E7]=0x6920, [0x6A66]=0x5E62, [0x716C]=0x7080, [0x766E]=0x763E,
 [0x9069]=0x9002, [0x9DBF]=0x9E5A, [0x61F7]=0x6000, [0x81E8]=0x4E34, [0x8778]=0x8717,
 [0x88FD]=0x5236, [0x4E7E]=0x5E72, [0x9201]=0x94AB, [0x7380]=0x7321, [0x9340]=0x951D,
 [0x7E09]=0x7F19, [0x7F88]=0x7F81, [0x650F]=0x62E2, [0x6A11]=0x6881, [0x7D19]=0x7EB8,
 [0x8F13]=0x633D, [0x7296]=0x8366, [0x7798]=0x770D, [0x581D]=0x57DA, [0x9D1F]=0x9E31,
 [0x6425]=0x6376, [0x8AA6]=0x8BF5, [0x932B]=0x9521, [0x8CAA]=0x8D2A, [0x8173]=0x811A,
 [0x56AE]=0x5411, [0x7A31]=0x79F0, [0x5F33]=0x5F2A, [0x96F2]=0x4E91, [0x9C35]=0x9CD8,
 [0x7DB4]=0x7F00, [0x6137]=0x607A, [0x7F48]=0x575B, [0x9921]=0x9985, [0x50C2]=0x507B,
 [0x9F77]=0x9F8C, [0x7947]=0x53EA, [0xFE54]=0xFF1B, [0x5CF6]=0x5C9B, [0x61CC]=0x603F,
 [0x9291]=0x94E3, [0x5157]=0x5156, [0x9B5B]=0x9C7D, [0x74DA]=0x74D2, [0x9EDE]=0x70B9,
 [0x8AFA]=0x8C1A, [0x8AE6]=0x8C1B, [0x736B]=0x7303, [0x8CEA]=0x8D28, [0x71EC]=0x6BC1,
 [0x8CC1]=0x8D32, [0x9BF0]=0x9C87, [0x9852]=0x9899, [0x7DF4]=0x7EC3, [0x64FA]=0x6446,
 [0x6EFE]=0x6EDA, [0x7385]=0x5999, [0x9204]=0x94AD, [0x7D06]=0x7EA1, [0x9808]=0x987B,
 [0x8F12]=0x8F84, [0x8B95]=0x8C30, [0x7018]=0x6CF8, [0x931A]=0x94EE, [0x9BDB]=0x9CB7,
 [0x991E]=0x996F, [0x6722]=0x671B, [0x8828]=0x87CF, [0x9433]=0x956D, [0x7DB1]=0x7EB2,
 [0x58B3]=0x575F, [0x8CBB]=0x8D39, [0xFE5E]=0xFF3D, [0x4E3C]=0x4E95, [0x8ABF]=0x8C03,
 [0x96B4]=0x9647, [0x9742]=0x96F3, [0x5244]=0x522D, [0x7D46]=0x7ECA, [0x64CB]=0x6321,
 [0x814E]=0x80BE, [0x8C50]=0x4E30, [0x8A54]=0x8BCF, [0x71D9]=0x70EB, [0x7058]=0x6EE9,
 [0x935A]=0x9496, [0xFE5C]=0xFF5D, [0x995E]=0x998B, [0x8264]=0x8223, [0x8A66]=0x8BD5,
 [0x766C]=0x7663, [0x92EF]=0x9506, [0x7DF1]=0x7F11, [0x9F72]=0x9F8B, [0x5BF5]=0x5BA0,
 [0x8CFB]=0x8D59, [0x897E]=0x897F, [0x5284]=0x672D, [0x9E07]=0x9E6F, [0x7D86]=0x7EE0,
 [0x9909]=0x9977, [0x6A94]=0x6863, [0x5617]=0x5C1D, [0x5098]=0x4F1E, [0x9C1B]=0x9CC1,
 [0x939A]=0x9524, [0x7E9C]=0x7F06, [0x7A1F]=0x7980, [0x87A2]=0x8424, [0x9580]=0x95E8,
 [0x942B]=0x954C, [0x7D31]=0x7EC2, [0x8139]=0x80C0, [0x6EBC]=0x6E7F, [0x7043]=0x6CA3,
 [0x7345]=0x72EE, [0x9949]=0x9991, [0x98C8]=0x98DA, [0x9BCA]=0x9CA8, [0x8AA3]=0x8BEC,
 [0x8853]=0x672F, [0x95D6]=0x95EF, [0x7159]=0x70DF, [0x9A5F]=0x9AA4, [0x64E0]=0x6324,
 [0x6E67]=0x6D8C, [0x78FD]=0x7857, [0x7D71]=0x7EDF, [0x7CF0]=0x56E2, [0x9873]=0x989E,
 [0x85F6]=0x82C8, [0x7E7E]=0x7F31, [0x9CF4]=0x9E23, [0x8EFC]=0x8F76, [0x8A7F]=0x8BD6,
 [0x9481]=0x4986, [0x9183]=0x814C, [0x7602]=0x75D6, [0x9285]=0x94DC, [0x9304]=0x5F55,
 [0x9908]=0x7CCD, [0x8D10]=0x8D46, [0x8993]=0x89C5, [0x8A95]=0x8BDE, [0x8B14]=0x8C11,
 [0x5099]=0x5907, [0x5118]=0x5C3D, [0x8622]=0x830F, [0x55AB]=0x5403, [0x8A2A]=0x8BBF,
 [0x7D30]=0x7EC6, [0x99B3]=0x9A70, [0x7E32]=0x7F27, [0x7AB5]=0x7A8E, [0x6436]=0x62A2,
 [0x91C3]=0x917E, [0x7642]=0x7597, [0x92C5]=0x950C, [0x5344]=0x5EFF, [0x5C46]=0x5C4A,
 [0x9948]=0x9990, [0x9A4A]=0x9A85, [0x8CD1]=0x8D48, [0x69D3]=0x6760, [0x9BE2]=0x9CB5,
 [0x8B54]=0x64B0, [0x925A]=0x94C6, [0x5EDD]=0x53AE, [0x9F5C]=0x9F87, [0x985E]=0x7C7B,
 [0x64E1]=0x62AC, [0x61E3]=0x61D1, [0x6662]=0x6670, [0x6968]=0x6862, [0x91E6]=0x6263,
 [0x7D70]=0x7ED6, [0x5AF5]=0x59A9, [0x7B74]=0x7B56, [0x6476]=0x629F, [0x8178]=0x80A0,
 [0x627A]=0x62B5, [0x6BFF]=0x6BF5, [0x4FC1]=0x4FE3, [0x9384]=0x953F, [0x9F07]=0x9CCC,
 [0xFE40]=0x2228, [0x9296]=0x94E2, [0x8E92]=0x8DDE, [0x8A15]=0x8BAA, [0x9019]=0x8FD9,
 [0x7D1B]=0x7EB7, [0x929A]=0x94EB, [0x7E1D]=0x7F1C, [0x9F9C]=0x9F9F, [0x8123]=0x5507,
 [0x66A2]=0x7545, [0x8AAA]=0x8BF4, [0x532F]=0x6C47, [0x9C31]=0x9CA2, [0x7DB0]=0x7EFE,
 [0x9933]=0x9967, [0x56C2]=0x56A3, [0x9245]=0x949C, [0x79C8]=0x7C7C, [0x7ACA]=0x7A83,
 [0x6953]=0x67AB, [0x8ED2]=0x8F69, [0x8A55]=0x8BC4, [0x74D6]=0x9576, [0x9059]=0x9065,
 [0x91D8]=0x9489, [0x7D5B]=0x7EE6, [0x72DA]=0x65E6, [0xFE5D]=0xFF3B, [0x58DE]=0x574F,
 [0x923E]=0x94C0, [0x6163]=0x60EF, [0x8FFA]=0x4E43, [0x8CE6]=0x8D4B, [0x69E8]=0x6901,
 [0x756B]=0x753B, [0x6AEA]=0x67A5, [0x766D]=0x763F, [0x5DF0]=0x5DEF, [0x9EF2]=0x9EEA,
 [0x9BF4]=0x9CBA, [0x8079]=0x804D, [0x61F8]=0x60AC, [0x82FA]=0x8393, [0x6FFC]=0x6CFA,
 [0x6B7F]=0x6B81, [0x92DD]=0x950A, [0x5283]=0x5212, [0x7A08]=0x79C6, [0x990A]=0x517B,
 [0x808F]=0x64CD, [0x91AC]=0x9171, [0x8E10]=0x8DF5, [0x8A02]=0x8BA2, [0x8814]=0x869D,
 [0x5716]=0x56FE, [0x5399]=0x538D, [0x9C1C]=0x9CD2, [0x6522]=0x6512, [0x8024]=0x85C9,
 [0x8CA7]=0x8D2B, [0x8F26]=0x8F87, [0x85DD]=0x827A, [0x7006]=0x6E0E, [0x95AD]=0x95FE,
 [0x50AF]=0x506C, [0x932E]=0x9522, [0xFE30]=0x2236, [0x7D32]=0x7EC1, [0x5834]=0x573A,
 [0x8B3E]=0x8C29, [0x97C1]=0x7F30, [0x92C3]=0x9512, [0x51C5]=0x6DB8, [0x7044]=0x6EE0,
 [0x5F46]=0x522B, [0x7BC9]=0x7B51, [0x994A]=0x9993, [0x85CD]=0x84DD, [0x6AD3]=0x6A79,
 [0x7258]=0x724D, [0x7DDD]=0x7F09, [0x7C5C]=0x7BA8, [0x58DF]=0x5784, [0x5864]=0x57D9,
 [0x8562]=0x8489, [0x81E5]=0x5367, [0x8CE7]=0x8D55, [0x896A]=0x889C, [0x736E]=0x72DD,
 [0x7E70]=0x7F32, [0x7D72]=0x4E1D, [0x9874]=0x98A7, [0x64F7]=0x64B7, [0x63F9]=0x80CC,
 [0x8278]=0x8279, [0x6EFB]=0x6D50, [0x8B7E]=0x8C2B, [0x5680]=0x549B, [0x9203]=0x9498,
 [0x9582]=0x95E9, [0x5105]=0x5F53, [0x9084]=0x8FD8, [0x5C07]=0x5C06, [0x7F86]=0x7F74,
 [0x860B]=0x82F9, [0x89BF]=0x89CC, [0x7C6C]=0x7BF1, [0x6A13]=0x697C, [0x58EF]=0x58EE,
 [0x7319]=0x72F0, [0x9298]=0x94ED, [0x7E1B]=0x7F1A, [0x7D1D]=0x7EB4, [0x9B9E]=0x9C95,
 [0x9E1A]=0x9E66, [0x6FA6]=0x6EEA, [0x8AA8]=0x8BF2, [0x69AA]=0x6769, [0x93AE]=0x9547,
 [0x7DB2]=0x7F51, [0x9935]=0x5582, [0x8CBC]=0x8D34, [0x56C0]=0x556D, [0x6F51]=0x6CFC,
 [0x6DD2]=0x51C4, [0xFE5B]=0xFF5B, [0x7D5D]=0x7ED4, [0x66E0]=0x65F7, [0x8263]=0x6A79,
 [0x6AE8]=0x680C, [0x73EE]=0x4F69, [0x3A73]=0x39D0, [0x7DF2]=0x7F08, [0x98F4]=0x9974,
 [0x8477]=0x8364, [0x87F6]=0x86CF, [0x61FA]=0x5FCF, [0x8CFC]=0x8D2D, [0x687F]=0x6746,
 [0x7DD4]=0x7EF1, [0x7681]=0x7682, [0x5104]=0x4EBF, [0x5D87]=0x5C96, [0x5B08]=0x5A06,
 [0x580A]=0x57A9, [0x8E91]=0x8E2F, [0x8B93]=0x8BA9, [0x5616]=0x5567, [0x9318]=0x9524,
 [0x7D1C]=0x7EAD, [0x913A]=0x909D, [0x6E26]=0x6DA1, [0x8B28]=0x8C1F, [0x922E]=0x94CC,
 [0x9C32]=0x9CCC, [0x65B7]=0x65AD, [0x8CBD]=0x8D3B, [0x69BF]=0x6864, [0x56C1]=0x55EB,
 [0x53C3]=0x53C2, [0x5442]=0x5415, [0x50C5]=0x4EC5, [0x7DC7]=0x7F01, [0x7E46]=0x7F2A,
 [0x7D0D]=0x7EB3, [0x584A]=0x5757, [0x81CF]=0x8191, [0x52D9]=0x52A1, [0x9358]=0x94E1,
 [0x7CDD]=0x7CC1, [0x9D5C]=0x9E48, [0x99DF]=0x9A77, [0xFE6B]=0xFF20, [0x8DFC]=0x5C40,
 [0x756C]=0x7572, [0x526E]=0x5250, [0x5EF1]=0x75C8, [0x7F70]=0x7F5A, [0x7BF3]=0x7B5A,
 [0x7C72]=0x5401, [0x85F7]=0x85AF, [0x8CFD]=0x8D5B, [0x9482]=0x954B, [0x7005]=0x6EE2,
 [0x7D07]=0x7EA5, [0x993E]=0x998F, [0x588A]=0x57AB, [0x640D]=0x635F, [0x858C]=0x8297,
 [0x6C92]=0x6CA1, [0x9398]=0x9549, [0x509A]=0x6548, [0x7D9C]=0x7EFC, [0x8AC2]=0x8C04,
 [0x64A2]=0x63B8, [0x2025]=0xA8, [0x61A4]=0x6124, [0x8EA6]=0x8E9C, [0x8A29]=0x8BBB,
 [0x88AA]=0x795B, [0x55AC]=0x4E54, [0x7E31]=0x7EB5, [0x98F2]=0x996E, [0x99B4]=0x9A6F,
 [0x6537]=0x8003, [0x8F3B]=0x8F90, [0x6DBC]=0x51C9, [0x9DF4]=0x9E47, [0x5641]=0x6076,
 [0x7343]=0x5446, [0x71C4]=0x7130, [0x8A23]=0x8BC0, [0x7DA2]=0x7EF8, [0x89D4]=0x7B4B,
 [0x5557]=0x5556, [0x96D6]=0x867D, [0x93D8]=0x9535, [0x8C4E]=0x7AD6, [0x5C5D]=0x6249,
 [0x995F]=0x9995, [0x4661]=0x464C, [0x6065]=0x803B, [0x8A69]=0x8BD7, [0x946D]=0x9567,
 [0x92EE]=0x94D6, [0x7CF2]=0x7C9D, [0x5875]=0x5C18, [0x8577]=0x84E3, [0x8EFE]=0x8F7C,
 [0x7E2B]=0x7F1D, [0x8AFE]=0x8BFA, [0x7F85]=0x7F57, [0x5287]=0x5267, [0x9106]=0x90D3,
 [0x9589]=0x95ED, [0x8A0C]=0x8BA7, [0x6191]=0x51ED, [0x6493]=0x6320, [0x9BAE]=0x9C9C,
 [0x89A1]=0x89CB, [0xFE5A]=0xFF09, [0x85A9]=0x8428, [0x6428]=0x6253, [0x58AB]=0x6A3D,
 [0x9931]=0x7CC7, [0x9BAD]=0x9C91, [0x7D2E]=0x624E, [0x71B1]=0x70ED, [0x7030]=0x5F25,
 [0x99C1]=0x9A73, [0x88E1]=0x91CC, [0x8B0A]=0x8C0E, [0x5C37]=0x5C34, [0x92C7]=0x94A1,
 [0x64D3]=0x39DF, [0x8A62]=0x8BE2, [0x5AD7]=0x59AA, [0x7DD9]=0x7F02, [0x9C58]=0x9C9F,
 [0x5F5A]=0x6C47, [0x93DD]=0x9558, [0x555E]=0x54D1, [0x8CE3]=0x5356, [0x8E64]=0x8E2A,
 [0x82E7]=0x82CE, [0x8166]=0x8111, [0x98EB]=0x996B, [0x5A6C]=0x6DEB, [0x9D6E]=0x9E50,
 [0x51F1]=0x51EF, [0x7372]=0x83B7, [0x5674]=0x55B7, [0x8AF7]=0x8BBD, [0x60FB]=0x607B,
 [0x9186]=0x76CF, [0x8A8C]=0x5FD7, [0x8090]=0x80F3, [0x5D19]=0x4ED1, [0x9945]=0x9992,
 [0x929C]=0x8854, [0x9436]=0x956E, [0x6C23]=0x6C14, [0x8F25]=0x8F8A, [0x6227]=0x6217,
 [0x982B]=0x4FEF, [0x5B2D]=0x5976, [0x7E2F]=0x6F14, [0x70B0]=0x70AE, [0x5433]=0x5434,
 [0x53B2]=0x5389, [0x56B4]=0x4E25, [0x8CB8]=0x8D37, [0x863F]=0x841D, [0x98C0]=0x98D7,
 [0x7C43]=0x7BEE, [0x5EC4]=0x53A9, [0x5247]=0x5219, [0x91C6]=0x91C7, [0x8755]=0x8680,
 [0x984F]=0x989C, [0x9A57]=0x9A8C, [0x765F]=0x762A, [0x95DE]=0x961A, [0x8EE4]=0x8F77,
 [0x2267]=0x2265, [0x8569]=0x8361, [0x986B]=0x98A4, [0x7E6F]=0x7F33, [0x937C]=0x9488,
 [0x3473]=0x3447, [0x5775]=0x4E18, [0x89F6]=0x89EF, [0x6D79]=0x6D43, [0x8CF8]=0x5269,
 [0x6FFA]=0x6E85, [0x7D83]=0x7EE1, [0x9387]=0x9545, [0x5006]=0x4FE9, [0x7489]=0x740F,
 [0x898B]=0x89C1, [0x8A8D]=0x8BA4, [0x962C]=0x5751, [0x5816]=0x57B4, [0x7D18]=0x7EAE,
 [0x7E1A]=0x7EE6, [0x9DB1]=0x9A9E, [0x8A22]=0x6B23, [0x8EA5]=0x8E7F, [0x83A7]=0x82CB,
 [0x98B3]=0x522E, [0x9130]=0x90BB, [0x7232]=0x4E3A, [0x8836]=0x8695, [0x643E]=0x69A8,
 [0x9A42]=0x9A96, [0x93C7]=0x955F, [0x69CB]=0x6784, [0x8ACD]=0x8BE4, [0x6C4E]=0x6CDB,
 [0x2252]=0x2248, [0x9BD7]=0x9C9E, [0x7E5A]=0x7F2D, [0x52DD]=0x80DC, [0x945E]=0x9574,
 [0x68E1]=0x3B4E, [0x8960]=0x88C6, [0x6A62]=0x692D, [0x6F64]=0x6DA6, [0x9BE4]=0x9CB2,
 [0x7C6E]=0x7BA9, [0x50F1]=0x96C7, [0x75F3]=0x9EBB, [0x8E7A]=0x8DF7, [0x7E6B]=0x7CFB,
 [0x9801]=0x9875, [0x9307]=0x952B, [0x9409]=0x94E3, [0x968A]=0x961F, [0x8B8C]=0x5BB4,
 [0x8011]=0x7AEF, [0x6190]=0x601C, [0x986F]=0x663E, [0x9D98]=0x9E55, [0x811B]=0x80EB,
 [0x6AA2]=0x68C0, [0x6FA4]=0x6CFD, [0x792B]=0x783E, [0x9A2D]=0x9A98, [0x9031]=0x5468,
 [0x92B2]=0x710A, [0x5635]=0x54D3, [0x84CB]=0x76D6, [0x64BE]=0x631D, [0x7D43]=0x5F26,
 [0x7E45]=0x7F2B, [0x9347]=0x9534, [0x95C8]=0x95F1, [0x6BCC]=0x6BCB, [0x8655]=0x5904,
 [0x8AF8]=0x8BF8, [0x7C59]=0x7B93, [0x7DD8]=0x7F04, [0x5EDA]=0x53A8, [0x525D]=0x5265,
 [0x93DC]=0x9557, [0x8AE2]=0x8BE8, [0x6FE4]=0x6D9B, [0x5A6D]=0x5A05, [0x5BEC]=0x5BBD,
 [0x9F52]=0x9F7F, [0x6B77]=0x5386, [0x8EFA]=0x8F7A, [0x64FE]=0x6270, [0x9B81]=0x9C85,
 [0x9087]=0x8FE9, [0x9306]=0x9516, [0x91D9]=0x948B, [0x6595]=0x6593, [0x729B]=0x7266,
 [0x7D1A]=0x7EA7, [0x9904]=0x9978, [0x652A]=0x6405, [0x99AD]=0x9A6D, [0x9230]=0x94C8,
 [0x56B3]=0x55BE, [0x5132]=0x50A8, [0x9E1D]=0x9E42, [0x82BB]=0x520D, [0x81BD]=0x80C6,
 [0x64BF]=0x6361, [0x9BC1]=0x9CA0, [0x7A40]=0x8C37, [0x9EC3]=0x9EC4, [0x7942]=0x4ED6,
 [0x9346]=0x9494, [0x97C9]=0x97AF, [0x8C8D]=0x72F8, [0x8ACB]=0x8BF7, [0x69CD]=0x67AA,
 [0x8F4E]=0x8F7F, [0x6250]=0x4EC2, [0x7DB8]=0x7EB6, [0x5E58]=0x5E3B, [0x52DB]=0x52CB,
 [0x91DD]=0x9488, [0x905C]=0x900A, [0x775E]=0x7750, [0x8A60]=0x548F, [0x6DE5]=0x6E0C,
 [0x856A]=0x829C, [0x99ED]=0x9A87, [0x986C]=0x98A5, [0x9114]=0x90AC, [0x7D05]=0x7EA2,
 [0x7386]=0x5179, [0x758A]=0x53E0, [0x9D43]=0x9E3C, [0x6192]=0x6126, [0x8494]=0x83B3,
 [0x9817]=0x9887, [0x7E98]=0x7F35, [0x721B]=0x70C2, [0x9D9A]=0x9E57, [0x779E]=0x7792,
 [0x8AA0]=0x8BDA, [0x2027]=0xB7, [0x9A2B]=0x9A9E, [0x5331]=0x532E, [0x8837]=0x883C,
 [0x5E43]=0x5E0F, [0x9749]=0x53C6, [0x56C8]=0x5453, [0x6A4B]=0x6865, [0x95CA]=0x9614,
 [0x8555]=0x83B8, [0x64D4]=0x62C5, [0x5857]=0x6D82, [0x9BD6]=0x9CAD, [0x5F59]=0x6C47,
 [0x525B]=0x521A, [0x7DDA]=0x7EBF, [0x97DE]=0x97EB, [0x6B61]=0x6B22, [0x8AE0]=0x55A7,
 [0x6E63]=0x95F5, [0x937A]=0x9517, [0x8CE4]=0x8D31, [0x91D0]=0x5398, [0x66E8]=0x663D,
 [0x7A6B]=0x83B7, [0x85EA]=0x85AE, [0x9E7C]=0x7877, [0x92F0]=0x9502, [0x9673]=0x9648,
 [0x6EF8]=0x6D52, [0x6DFA]=0x6D45, [0x9802]=0x9876, [0x7D04]=0x7EA6, [0x9689]=0x9667,
 [0x6514]=0x62E6, [0x9A16]=0x9A9B, [0x8F54]=0x8F9A, [0x761E]=0x7617, [0x8AA1]=0x8BEB,
 [0x8B20]=0x8C23, [0x9BAB]=0x9C9B, [0x78AD]=0x7800, [0x792C]=0x77FE, [0x9DAF]=0x83BA,
 [0x7E2E]=0x7F29, [0x92B1]=0x94DE, [0x7032]=0x6F4B, [0x89B7]=0x89D1, [0x8A36]=0x8BC3,
 [0x6F38]=0x6E10, [0x60BD]=0x51C4, [0x940B]=0x94F4, [0x7D44]=0x7EC4, [0x7246]=0x5899,
 [0x56C9]=0x5570, [0x9748]=0x7075, [0x5E36]=0x5E26, [0x62D1]=0x94B3, [0x965E]=0x5347,
 [0x2266]=0x2264, [0x8768]=0x8671, [0x5BEB]=0x5199, [0x98ED]=0x996C, [0x7DEF]=0x7EAC,
 [0x52F1]=0x52A2, [0x7370]=0x72DE, [0x9072]=0x8FDF, [0x8A76]=0x916C, [0x8EF9]=0x8F75,
 [0x6C7A]=0x51B3, [0x617C]=0x621A, [0x9A01]=0x9A8B, [0x76EA]=0x8361, [0x5D84]=0x5D2D,
 [0x7609]=0x6108, [0x880D]=0x874E, [0x8D0F]=0x8D62, [0x8594]=0x8537, [0x931B]=0x951B,
 [0x701D]=0x6CA5, [0x919C]=0x4E11, [0x6F23]=0x6D9F, [0x95C7]=0x6697, [0x982D]=0x5934,
 [0x99AC]=0x9A6C, [0x9D2F]=0x9E38, [0x93B0]=0x9552, [0x9435]=0x94C1, [0x8AB6]=0x8C07,
 [0x8CBA]=0x8D36, [0x5A41]=0x5A04, [0x7BC0]=0x8282, [0x9C45]=0x9CD9, [0x7DC4]=0x7EF2,
 [0x5147]=0x51F6, [0x7649]=0x7605, [0x74CA]=0x743C, [0x9023]=0x8FDE, [0x6ECE]=0x8365,
 [0x9957]=0x98E8, [0x9AD6]=0x9ACB, [0x7E59]=0x7FFB, [0x935B]=0x953B, [0x705D]=0x704F,
 [0x51DC]=0x51DB, [0x555F]=0x542F, [0x76DE]=0x76CF, [0x8A61]=0x8BE9, [0x5B6B]=0x5B59,
 [0x9D6F]=0x9E4E, [0x93F0]=0x955A, [0x9475]=0x7F50, [0x8AF6]=0x8C0C, [0x8CFA]=0x8D5A,
 [0x807D]=0x542C, [0x61FC]=0x60E7, [0x5D81]=0x5D5D, [0x7C00]=0x7BA6, [0x9DD7]=0x9E25,
 [0x5687]=0x5413, [0x98EF]=0x996D, [0x890E]=0x8896, [0x8591]=0x59DC, [0x6214]=0x620B,
 [0x9E97]=0x4E3D, [0x7D16]=0x7EBC, [0x9818]=0x9886, [0x9B1A]=0x987B, [0x561C]=0x551B,
 [0x6F22]=0x6C49, [0x8526]=0x8311, [0x81A9]=0x817B, [0x7AAF]=0x7A91, [0x95B1]=0x9605,
 [0x50B3]=0x4F20, [0x93B5]=0x9553, [0x81DF]=0x810F, [0x8B9E]=0x8C33, [0x6D36]=0x6C79,
 [0x64BB]=0x631E, [0x613E]=0x5FFE, [0x9A44]=0x9AA2, [0x71C9]=0x7096, [0x934A]=0x70BC,
 [0x8E4C]=0x8DC4, [0x8ACF]=0x8BF9, [0x99D9]=0x9A78, [0x9858]=0x613F, [0x9B5A]=0x9C7C,
 [0x92DF]=0x9513, [0x8DE1]=0x8FF9, [0x8F62]=0x8F79, [0x9210]=0x94A4, [0x5E6C]=0x5E31,
 [0x596E]=0x594B, [0x92E9]=0x94D3, [0x93F5]=0x94E7, [0x7274]=0x62B5, [0x6EF7]=0x5364,
 [0x64FB]=0x64DE, [0x617E]=0x6B32, [0x9803]=0x9877, [0x9586]=0x95EB, [0x5109]=0x4FED,
 [0x8B16]=0x8C21, [0x898E]=0x89C3, [0x6490]=0x6491, [0x6294]=0x62B1, [0x7E17]=0x7F1E,
 [0x9D96]=0x9E59, [0x7919]=0x788D, [0x9B9A]=0x9C92, [0x919E]=0x915D, [0x8CA0]=0x8D1F,
 [0x8823]=0x86CE, [0x8AA4]=0x8BEF, [0x85A6]=0x8350, [0x8129]=0x4FEE, [0x98FD]=0x9971,
 [0x7C2B]=0x7BAB, [0x79AE]=0x793C, [0x74B0]=0x73AF, [0x9472]=0x9576, [0x9156]=0x9E29,
 [0x6BBA]=0x6740, [0x9D1B]=0x9E33, [0x81BE]=0x810D, [0x9D41]=0x4D14, [0x7843]=0x6731,
 [0x7AC4]=0x7A9C, [0x7647]=0x75EB, [0x55C6]=0x545B, [0x7149]=0x70BC, [0x8F4D]=0x8F99,
 [0x6ECC]=0x6DA4, [0x5E57]=0x5E3C, [0x5DD6]=0x5CA9, [0x58D8]=0x5792, [0x76DC]=0x76D7,
 [0x8CE0]=0x8D54, [0x8AE4]=0x8C14, [0x8667]=0x4E8F, [0x5EEC]=0x5E90, [0x99EE]=0x9A73,
 [0x7375]=0x730E, [0x6DF6]=0x6D9E, [0x647B]=0x63BA, [0x61FE]=0x6151, [0x7D00]=0x7EAA,
 [0x7787]=0x772F, [0x5108]=0x4FA9, [0x8E8D]=0x8DC3, [0x9805]=0x9879, [0x8CA1]=0x8D22,
 [0x6E22]=0x6CA8, [0x8AA5]=0x8BF0, [0x6128]=0x60AB, [0x7DAB]=0x7EBF, [0x9CE7]=0x51EB,
 [0x8209]=0x4E3E, [0x9132]=0x90F8, [0x4FB7]=0x5C40, [0x8938]=0x891B, [0x6A3A]=0x6866,
 [0x7D40]=0x7ECC, [0x7AC5]=0x7A8D, [0x77C7]=0x8499, [0x50C9]=0x4F65, [0x5C0D]=0x5BF9,
 [0x8ECD]=0x519B, [0x9C56]=0x9CDC, [0x58D9]=0x5739, [0x9A5A]=0x60CA, [0x775C]=0x7741,
 [0x93DF]=0x94F2, [0x905E]=0x9012, [0x8CE1]=0x8D53, [0x6AE5]=0x6A71, [0x8E67]=0x7CDF,
 [0x8466]=0x82C7, [0x9DE6]=0x9E6A, [0x9F6C]=0x9F89, [0x7570]=0x5F02, [0x5672]=0x54D9,
 [0x52F5]=0x52B1, [0x8C76]=0x8C6E, [0x9015]=0x8FF3, [0x477C]=0x478D, [0x807E]=0x804B,
 [0x9903]=0x997A, [0x5E82]=0x4EC4, [0x7A05]=0x7A0E, [0x7B84]=0x7B85, [0x5707]=0x56F5,
 [0x9A40]=0x84E6, [0x7009]=0x6CFB, [0x8D0B]=0x8D5D, [0x528A]=0x523D, [0x6B0F]=0x6924,
 [0x9C08]=0x9CBD, [0x779C]=0x4056, [0x931F]=0x952C, [0x8A25]=0x8BB7, [0x6BA4]=0x6B87,
 [0x6727]=0x80E7, [0x64A6]=0x626F, [0x7E2D]=0x7F21, [0x5FAC]=0x65C1, [0x58AE]=0x5815,
 [0x7431]=0x96D5, [0x53B4]=0x53A3, [0x8CB6]=0x8D2C, [0x9943]=0x998D, [0x5EC2]=0x53A2,
 [0x9A45]=0x9A71, [0x7BC4]=0x8303, [0x5049]=0x4F1F, [0x51C8]=0x51C0, [0x8B4F]=0x8BA5,
 [0x6451]=0x63B4, [0x9859]=0x98A1, [0x99D8]=0x9A80, [0x9F4E]=0x8D4D, [0x565D]=0x549D,
 [0x57DC]=0x91CE, [0x50DE]=0x4F2A, [0x61E8]=0x6079, [0x7E6D]=0x8327, [0x7FEC]=0x7FDA,
 [0x9B6F]=0x9C81, [0x7152]=0x709C, [0x5275]=0x521B, [0x6F77]=0x6ED7, [0x8879]=0x53EA,
 [0x89F8]=0x89E6, [0x6AFA]=0x68C2, [0xFE57]=0xFF01, [0x7D02]=0x7EA3, [0x9208]=0x949A,
 [0x8E8B]=0x8DFB, [0x6C0C]=0x6C07, [0x8B0E]=0x8C1C, [0x8195]=0x8158, [0x9DD9]=0x9E37,
 [0x969B]=0x9645, [0x5AAE]=0x5077, [0x6AA3]=0x6A2F, [0x5EAB]=0x5E93, [0x7DAD]=0x7EF4,
 [0x98AF]=0x98D2, [0x9B2E]=0x9604, [0x5630]=0x53FD, [0x92B3]=0x9510, [0x8CB7]=0x4E70,
 [0x6A38]=0x6734, [0x633E]=0x631F, [0x5E40]=0x5E27, [0x7D42]=0x7EC8, [0x9746]=0x53C7,
 [0x9248]=0x94CA, [0x8ECB]=0x8F67, [0x88CF]=0x91CC, [0x6B4E]=0x53F9, [0x8552]=0x836C,
 [0x81D5]=0x8198, [0x96DB]=0x96CF, [0x90DF]=0x90CF, [0x7C64]=0x7B7E, [0x8E60]=0x8DD6,
 [0x98BA]=0x626C, [0x8766]=0x867E, [0x616A]=0x6004, [0x5C6C]=0x5C5E, [0x78EF]=0x77F6,
 [0x95BC]=0x960F, [0x7670]=0x75C8, [0x52F3]=0x52CB, [0x91F5]=0x9497, [0x5074]=0x4FA7,
 [0x86FB]=0x8715, [0x8AEB]=0x8C0F, [0x9A03]=0x5446, [0x9905]=0x997C, [0x518A]=0x518C,
 [0x8D0D]=0x8D61, [0x8B8E]=0x96E0, [0x5B19]=0x5AF1, [0x95AB]=0x9603, [0x551D]=0x55CA,
 [0x701F]=0x6F47, [0x6A23]=0x6837, [0x93E2]=0x9556, [0x5E2B]=0x5E08, [0x582F]=0x5C27,
 [0x5BAE]=0x5BAB, [0x76B0]=0x75B1, [0x9233]=0x94B6, [0x55B2]=0x54DF, [0x50B4]=0x4F1B,
 [0x4FB6]=0x4FA3, [0x8B39]=0x8C28, [0x6AB8]=0x67E0, [0x89BA]=0x89C9, [0x84BC]=0x82CD,
 [0x9A43]=0x9AA0, [0x9DC2]=0x9E5E, [0x7945]=0x7946, [0x98C4]=0x98D8, [0x97C6]=0x5343,
 [0x993C]=0x9969, [0x9C37]=0x9CA6, [0x9C57]=0x9CDE, [0x97DC]=0x97EC, [0x755D]=0x4EA9,
 [0x92FB]=0x9274, [0x93DE]=0x955B, [0x8F61]=0x8F94, [0x8A63]=0x8BE3, [0x5E6B]=0x5E2E,
 [0x786F]=0x781A, [0x75F2]=0x9EBB, [0x70F4]=0x70C3, [0x4C77]=0x4CA3, [0x6AF8]=0x6989,
 [0x667B]=0x6697, [0x64FC]=0x64B8, [0x9B83]=0x9C86, [0x9C02]=0x9C97, [0x7904]=0x785A,
 [0x7587]=0x7574, [0x5606]=0x53F9, [0x5289]=0x5218, [0x9308]=0x9529, [0x6C8D]=0x51B1,
 [0x898F]=0x89C4, [0x8A0E]=0x8BA8, [0x92F8]=0x952F, [0x5D97]=0x5D02, [0x921E]=0x94A7,
 [0x8EA1]=0x8E51, [0x58DA]=0x5786, [0x9D30]=0x9E39, [0x7D2C]=0x4337, [0x7A2E]=0x79CD,
 [0x96B1]=0x9690, [0x93B3]=0x954D, [0x9432]=0x956F, [0x50B5]=0x503A, [0x9134]=0x90BA,
 [0x8AB9]=0x8BFD, [0x6B38]=0x5509, [0x87BB]=0x877C, [0x81BF]=0x8113, [0x5EC1]=0x5395,
 [0xFE61]=0xFF0A, [0x55C7]=0x556C, [0x7646]=0x75E8, [0x904A]=0x6E38, [0x8A4E]=0x8BB5,
 [0x8452]=0x836D, [0x7DD7]=0x7F03, [0xFE56]=0xFF1F, [0x9B58]=0x9B47, [0x585A]=0x51A2,
 [0x9055]=0x8FDD, [0x9DBB]=0x9E58, [0x71DF]=0x8425, [0x925E]=0x94BA, [0x923A]=0x94B0,
 [0x8964]=0x8934, [0x6368]=0x820D, [0x9D6C]=0x9E4F, [0x7472]=0x73B1, [0x90F5]=0x90AE,
 [0x6B78]=0x5F52, [0x87FB]=0x8681, [0x84FD]=0x835C, [0x5805]=0x575A, [0x9209]=0x94A0,
 [0x908A]=0x8FB9, [0x690F]=0x6860, [0x7D17]=0x7EB1, [0x7E96]=0x7EA4, [0x9A19]=0x9A97,
 [0x941D]=0x9562, [0x511F]=0x507F, [0x7344]=0x72F1, [0x8E21]=0x8737, [0x6FA0]=0x6E11,
 [0x8CA2]=0x8D21, [0x9695]=0x9668, [0x6229]=0x622C, [0x9C2D]=0x9CCD, [0x7DAC]=0x7EF6,
 [0x7AAE]=0x7A77, [0x9333]=0x9530, [0x6A39]=0x6811, [0x65BC]=0x4E8E, [0x5B43]=0x5A18,
 [0x5249]=0x9509, [0x93C8]=0x94FE, [0x50CA]=0x4ED9, [0x6C4D]=0x4E38, [0x5BD8]=0x7F6E,
 [0x78DA]=0x7816, [0x95DC]=0x5173, [0x52DE]=0x52B3, [0x4FE0]=0x4FA0, [0x8CE2]=0x8D24,
 [0x7D50]=0x7ED3, [0x5F6B]=0x96D5, [0x9C6D]=0x9C9A, [0x7DEC]=0x7F05, [0x9AEE]=0x53D1,
 [0x7671]=0x762B, [0xFE52]=0xFF0E, [0x5075]=0x4FA6, [0x71F4]=0x70E9, [0x96A8]=0x968F,
};


<|start_filename|>src/trie/levenshtein.c<|end_filename|>
#include <stdlib.h>
#include <stdio.h>
#include <sys/param.h>
#include <string.h>
#include "levenshtein.h"
#include "rune_util.h"
#include "rmalloc.h"

// NewSparseAutomaton creates a new automaton for the string s, with a given max
// edit distance check
SparseAutomaton NewSparseAutomaton(const rune *s, size_t len, int maxEdits) {
  return (SparseAutomaton){s, len, maxEdits};
}

// Start initializes the automaton's state vector and returns it for further
// iteration
sparseVector *SparseAutomaton_Start(SparseAutomaton *a) {
  int vals[a->max + 1];
  for (int i = 0; i < a->max + 1; i++) {
    vals[i] = i;
  }

  return newSparseVector(vals, a->max + 1);
}

// Step returns the next state of the automaton given a previous state and a
// character to check
sparseVector *SparseAutomaton_Step(SparseAutomaton *a, sparseVector *state, rune c) {
  sparseVector *newVec = newSparseVectorCap(state->len);

  if (state->len) {
    sparseVectorEntry e = state->entries[0];
    if (e.idx == 0 && e.val < a->max) {
      sparseVector_append(&newVec, 0, e.val + 1);
    }
  }

  for (int j = 0; j < state->len; j++) {
    sparseVectorEntry *entry = &state->entries[j];

    if (entry->idx == a->len) {
      break;
    }

    register int val = state->entries[j].val;
    // increase the cost by 1
    if (a->string[entry->idx] != c) ++val;

    if (newVec->len && newVec->entries[newVec->len - 1].idx == entry->idx) {
      val = MIN(val, newVec->entries[newVec->len - 1].val + 1);
    }

    if (j + 1 < state->len && state->entries[j + 1].idx == entry->idx + 1) {
      val = MIN(val, state->entries[j + 1].val + 1);
    }

    if (val <= a->max) {
      sparseVector_append(&newVec, entry->idx + 1, val);
    }
  }
  return newVec;
}

// IsMatch returns true if the current state vector represents a string that is
// within the max
// edit distance from the initial automaton string
inline int SparseAutomaton_IsMatch(SparseAutomaton *a, sparseVector *v) {
  return v->len && v->entries[v->len - 1].idx == a->len;
}

// CanMatch returns true if there is a possibility that feeding the automaton
// with more steps will
// yield a match. Once CanMatch is false there is no point in continuing
// iteration
inline int SparseAutomaton_CanMatch(SparseAutomaton *a, sparseVector *v) {
  return v->len > 0;
}

dfaNode *__newDfaNode(int distance, sparseVector *state) {
  dfaNode *ret = rm_calloc(1, sizeof(dfaNode));
  ret->fallback = NULL;
  ret->distance = distance;
  ret->v = state;
  ret->edges = NULL;
  ret->numEdges = 0;

  return ret;
}

void __dfaNode_free(dfaNode *d) {
  sparseVector_free(d->v);
  if (d->edges) rm_free(d->edges);
  rm_free(d);
}

int __sv_equals(sparseVector *sv1, sparseVector *sv2) {
  if (sv1->len != sv2->len) return 0;

  for (int i = 0; i < sv1->len; i++) {
    if (sv1->entries[i].idx != sv2->entries[i].idx || sv1->entries[i].val != sv2->entries[i].val) {
      return 0;
    }
  }

  return 1;
}

dfaNode *__dfn_getCache(Vector *cache, sparseVector *v) {
  size_t n = Vector_Size(cache);
  for (int i = 0; i < n; i++) {
    dfaNode *dfn;
    Vector_Get(cache, i, &dfn);

    if (__sv_equals(v, dfn->v)) {
      return dfn;
    }
  }
  return NULL;
}

void __dfn_putCache(Vector *cache, dfaNode *dfn) {
  Vector_Push(cache, dfn);
}

inline dfaNode *__dfn_getEdge(dfaNode *n, rune r) {
  for (int i = 0; i < n->numEdges; i++) {
    if (n->edges[i].r == r) {
      return n->edges[i].n;
    }
  }
  return NULL;
}

void __dfn_addEdge(dfaNode *n, rune r, dfaNode *child) {
  n->edges = rm_realloc(n->edges, sizeof(dfaEdge) * (n->numEdges + 1));
  n->edges[n->numEdges++] = (dfaEdge){.r = r, .n = child};
}

void dfa_build(dfaNode *parent, SparseAutomaton *a, Vector *cache) {
  parent->match = SparseAutomaton_IsMatch(a, parent->v);

  for (int i = 0; i < parent->v->len; i++) {
    if (parent->v->entries[i].idx < a->len) {
      rune c = a->string[parent->v->entries[i].idx];
      // printf("%c ---> ", c);
      dfaNode *edge = __dfn_getEdge(parent, c);
      if (edge == NULL) {
        sparseVector *nv = SparseAutomaton_Step(a, parent->v, c);

        if (nv->len > 0) {
          dfaNode *dfn = __dfn_getCache(cache, nv);
          if (dfn == NULL) {
            int dist = nv->entries[nv->len - 1].val;
            edge = __newDfaNode(dist, nv);
            __dfn_addEdge(parent, c, edge);
            __dfn_putCache(cache, edge);
            dfa_build(edge, a, cache);
            continue;
          } else {
            __dfn_addEdge(parent, c, dfn);
          }
        }
        sparseVector_free(nv);
      }
    }
  }

  // if (parent->distance < a->max) {
  sparseVector *nv = SparseAutomaton_Step(a, parent->v, 1);
  if (nv->len > 0) {
    dfaNode *dfn = __dfn_getCache(cache, nv);
    if (dfn) {
      parent->fallback = dfn;
    } else {
      int dist = nv->entries[nv->len - 1].val;
      // printf("DEFAULT EDGE! edge %s - dist %d\n", a->string, dist);
      parent->fallback = __newDfaNode(dist, nv);
      __dfn_putCache(cache, parent->fallback);
      dfa_build(parent->fallback, a, cache);
      return;
    }
  }
  sparseVector_free(nv);

  //}
}

DFAFilter NewDFAFilter(rune *str, size_t len, int maxDist, int prefixMode) {
  Vector *cache = NewVector(dfaNode *, 8);

  SparseAutomaton a = NewSparseAutomaton(str, len, maxDist);

  sparseVector *v = SparseAutomaton_Start(&a);
  dfaNode *dr = __newDfaNode(0, v);
  __dfn_putCache(cache, dr);
  dfa_build(dr, &a, cache);

  DFAFilter ret;
  ret.cache = cache;
  ret.stack = NewVector(dfaNode *, 8);
  ret.distStack = NewVector(int, 8);
  ret.a = a;
  ret.prefixMode = prefixMode;
  Vector_Push(ret.stack, dr);
  Vector_Push(ret.distStack, (maxDist + 1));

  return ret;
}

void DFAFilter_Free(DFAFilter *fc) {
  for (int i = 0; i < Vector_Size(fc->cache); i++) {
    dfaNode *dn;
    Vector_Get(fc->cache, i, &dn);

    if (dn) __dfaNode_free(dn);
  }

  Vector_Free(fc->cache);
  Vector_Free(fc->stack);
  Vector_Free(fc->distStack);
}

FilterCode FilterFunc(rune b, void *ctx, int *matched, void *matchCtx) {
  DFAFilter *fc = ctx;
  dfaNode *dn;
  int minDist;

  Vector_Get(fc->stack, Vector_Size(fc->stack) - 1, &dn);
  Vector_Get(fc->distStack, Vector_Size(fc->distStack) - 1, &minDist);

  // a null node means we're in prefix mode, and we're done matching our prefix
  if (dn == NULL) {
    *matched = 1;
    Vector_Push(fc->stack, NULL);
    Vector_Push(fc->distStack, minDist);
    return F_CONTINUE;
  }

  *matched = dn->match;

  if (*matched) {
    // printf("MATCH %c, dist %d\n", b, dn->distance);
    int *pdist = matchCtx;
    if (pdist) {
      *pdist = MIN(dn->distance, minDist);
    }
  }

  rune foldedRune = runeFold(b);

  // get the next state change
  dfaNode *next = __dfn_getEdge(dn, foldedRune);
  if (!next) next = dn->fallback;

  // we can continue - push the state on the stack
  if (next) {
    if (next->match) {
      // printf("MATCH NEXT %c, dist %d\n", b, next->distance);
      *matched = 1;
      int *pdist = matchCtx;
      if (pdist) {
        *pdist = MIN(next->distance, minDist);
      }
      //    if (fc->prefixMode) next = NULL;
    }
    Vector_Push(fc->stack, next);
    Vector_Push(fc->distStack, MIN(next->distance, minDist));
    return F_CONTINUE;
  } else if (fc->prefixMode && *matched) {
    Vector_Push(fc->stack, NULL);
    Vector_Push(fc->distStack, minDist);
    return F_CONTINUE;
  }

  return F_STOP;
}

void StackPop(void *ctx, int numLevels) {
  DFAFilter *fc = ctx;

  for (int i = 0; i < numLevels; i++) {
    Vector_Pop(fc->stack, NULL);
    Vector_Pop(fc->distStack, NULL);
  }
}


<|start_filename|>src/dep/friso/friso_lexicon.c<|end_filename|>
/*
 * friso lexicon implemented functions.
 *         used to deal with the friso lexicon, like: load,remove,match...
 * 
 * @author    chenxin <<EMAIL>>
 */
#include <stdlib.h>
#include <string.h>
#include "friso_API.h"
#include "friso.h"

#define __SPLIT_MAX_TOKENS__     5
#define __LEX_FILE_DELIME__     '#'
#define __FRISO_LEX_IFILE__    "friso.lex.ini"

//create a new lexicon
FRISO_API friso_dic_t friso_dic_new() 
{
    register uint_t t;
    friso_dic_t dic = ( friso_dic_t ) FRISO_CALLOC( 
            sizeof( friso_hash_t ), __FRISO_LEXICON_LENGTH__ );
    if ( dic == NULL ) {
        ___ALLOCATION_ERROR___
    }

    for ( t = 0; t < __FRISO_LEXICON_LENGTH__; t++ ) {
        dic[t] = new_hash_table();
    }

    return dic;
}

/**
 * default callback function to invoke
 *     when free the friso dictionary . 
 *
 * @date 2013-06-12
 */
__STATIC_API__ void default_fdic_callback( hash_entry_t e ) 
{
    register uint_t i;
    friso_array_t syn;
    lex_entry_t lex = ( lex_entry_t ) e->_val;
    //free the lex->word
    FRISO_FREE( lex->word );    
    //free the lex->syn if it is not NULL
    if ( lex->syn != NULL ) {
        syn = lex->syn;
        for ( i = 0; i < syn->length; i++ ) {
            FRISO_FREE( syn->items[i] );
        }
        free_array_list( syn );
    }

    //free the e->_val
    //@date 2014-01-28 posted by <EMAIL>
    FRISO_FREE(lex);
}

FRISO_API void friso_dic_free( friso_dic_t dic ) 
{
    register uint_t t;
    for ( t = 0; t < __FRISO_LEXICON_LENGTH__; t++ ) {
        //free the hash table
        free_hash_table( dic[t], default_fdic_callback );
    }

    FRISO_FREE( dic );
}


//create a new lexicon entry
FRISO_API lex_entry_t new_lex_entry( 
        fstring word, 
        friso_array_t syn, 
        uint_t fre, 
        uint_t length, 
        uint_t type ) 
{
    lex_entry_t e = ( lex_entry_t ) 
        FRISO_MALLOC( sizeof( lex_entry_cdt ) );
    if ( e == NULL ) {
        ___ALLOCATION_ERROR___
    }

    //initialize.
    e->word   = word;
    e->syn    = syn;            //synoyum words array list.
    e->pos    = NULL;            //part of speech array list.
    //e->py    = NULL; //set to NULL first.
    e->fre    = fre;
    e->length = (uchar_t) length;    //length
    e->rlen   = (uchar_t) length;    //set to length by default.
    e->type   = (uchar_t) type;    //type
    e->ctrlMask = 0;            //control mask.
    e->offset = -1;

    return e;
}

/**
 * free the given lexicon entry.
 * you have to do three thing maybe:
 * 1. free where its syn items points to. (not implemented)
 * 2. free its syn. (friso_array_t)
 * 3. free its pos. (friso_array_t)
 * 4. free the lex_entry_t.
 */
FRISO_API void free_lex_entry_full( lex_entry_t e ) 
{
    register uint_t i;
    friso_array_t syn;

    //free the lex->word
    FRISO_FREE( e->word );
    //free the lex->syn if it is not NULL
    if ( e->syn != NULL ) {
        syn = e->syn;
        for ( i = 0; i < syn->length; i++ ) {
            FRISO_FREE( syn->items[i] );
        }
        free_array_list( syn );
    }

    //free the e->_val
    //@date 2014-01-28 posted by <EMAIL>
    FRISO_FREE(e);
}

FRISO_API void free_lex_entry( lex_entry_t e ) 
{
    //if ( e->syn != NULL ) {
    //    if ( flag == 1 ) free_array_list( e->syn);
    //    else free_array_list( e->syn );
    //}

    FRISO_FREE(e);
}


//add a new entry to the dictionary.
FRISO_API void friso_dic_add( 
        friso_dic_t dic, 
        friso_lex_t lex,
        fstring word, 
        friso_array_t syn ) 
{
    void *olex = NULL;
    if ( lex >= 0 && lex < __FRISO_LEXICON_LENGTH__ ) {
        //printf("lex=%d, word=%s, syn=%s\n", lex, word, syn);
        olex = hash_put_mapping( dic[lex], word, 
                new_lex_entry( word, syn, 0, 
                    (uint_t) strlen(word),  (uint_t) lex ) );
        if ( olex != NULL ) {
            free_lex_entry_full((lex_entry_t)olex);
        }
    }
}

FRISO_API void friso_dic_add_with_fre( 
        friso_dic_t dic,
        friso_lex_t lex,
        fstring word, 
        friso_array_t syn, 
        uint_t frequency ) 
{
    void *olex = NULL;
    if ( lex >= 0 && lex < __FRISO_LEXICON_LENGTH__ ) {
        olex = hash_put_mapping( dic[lex], word, 
                new_lex_entry( word, syn, frequency, 
                    ( uint_t ) strlen(word), ( uint_t ) lex ) );
        if ( olex != NULL ) {
            free_lex_entry_full((lex_entry_t)olex);
        }
    }
}

/*
 * read a line from a specified stream.
 *         the newline will be cleared.
 * 
 * @date    2012-11-24 
 */
FRISO_API fstring file_get_line( fstring __dst, FILE * _stream ) 
{
    register int c;
    fstring cs;

    cs = __dst;
    while ( ( c = fgetc( _stream ) ) != EOF ) {
        if ( c == '\n' ) break;
        *cs++ = c; 
    }
    *cs = '\0';

    return ( c == EOF && cs == __dst ) ? NULL : __dst;
}

/*
 * static function to copy a string. 
 */
///instead of memcpy
__STATIC_API__ fstring string_copy( 
        fstring _src, 
        fstring __dst, 
        uint_t blocks ) 
{

    register fstring __src = _src;
    register uint_t t;

    for ( t = 0; t < blocks; t++ ) {
        if ( *__src == '\0' ) break; 
        __dst[t] = *__src++;
    }
    __dst[t] = '\0';

    return __dst;
}

/**
 * make a heap allocation, and copy the 
 *     source fstring to the new allocation, and 
 *     you should free it after use it . 
 *
 * @param _src      source fstring
 * @param blocks    number of bytes to copy
 */
__STATIC_API__ fstring string_copy_heap( 
        fstring _src, uint_t blocks ) 
{
    register uint_t t;

    fstring str = ( fstring ) FRISO_MALLOC( blocks + 1 );
    if ( str == NULL ) {
        ___ALLOCATION_ERROR___;
    }

    for ( t = 0; t < blocks; t++ ) {
        //if ( *_src == '\0' ) break;
        str[t] = *_src++;
    }

    str[t] = '\0';
    return str;
}

/*
 * find the postion of the first appear of the given char.
 *    address of the char in the fstring will be return .
 *    if not found NULL will be return . 
 */
__STATIC_API__ fstring indexOf( fstring __str, char delimiter ) 
{
    uint_t i, __length__;

    __length__ = strlen( __str );
    for ( i = 0; i < __length__; i++ ) {
        if ( __str[i] == delimiter ) {
            return __str + i;
        }
    }

    return NULL;
}

/**
 * load all the valid wors from a specified lexicon file . 
 *
 * @param dic        friso dictionary instance (A hash array)
 * @param lex        the lexicon type
 * @param lex_file    the path of the lexicon file
 * @param length    the maximum length of the word item
 */
FRISO_API void friso_dic_load( 
        friso_t friso,
        friso_config_t config,
        friso_lex_t lex,
        fstring lex_file,
        uint_t length ) 
{

    FILE * _stream;
    char __char[1024], _buffer[512];
    fstring _line;
    string_split_entry sse;

    fstring _word;
    char _sbuffer[512];
    fstring _syn;
    friso_array_t sywords;
    uint_t _fre;

    if ( ( _stream = fopen( lex_file, "rb" ) ) != NULL ) {
        while ( ( _line = file_get_line( __char, _stream ) ) != NULL ) {
            //clear up the notes
            //make sure the length of the line is greater than 1.
            //like the single '#' mark in stopwords dictionary.
            if ( _line[0] == '#' && strlen(_line) > 1 ) continue;

            //handle the stopwords.
            if ( lex == __LEX_STOPWORDS__ ) {
                //clean the chinese words that its length is greater than max length.
                if ( ((int)_line[0]) < 0 && strlen( _line ) > length ) continue;
                friso_dic_add( friso->dic, __LEX_STOPWORDS__, 
                        string_copy_heap( _line, strlen(_line) ), NULL ); 
                continue;
            }

            //split the fstring with '/'.
            string_split_reset( &sse, "/", _line); 
            if ( string_split_next( &sse, _buffer ) == NULL ) {
                continue;
            }

            //1. get the word.
            _word = string_copy_heap( _buffer, strlen(_buffer) );

            if ( string_split_next( &sse, _buffer ) == NULL ) {
                //normal lexicon type, 
                //add them to the dictionary directly
                friso_dic_add( friso->dic, lex, _word, NULL ); 
                continue;
            }

            /*
             * filter out the words that its length is larger
             *     than the specified limit.
             * but not for __LEX_ECM_WORDS__ and english __LEX_STOPWORDS__
             *     and __LEX_CEM_WORDS__.
             */
            if ( ! ( lex == __LEX_ECM_WORDS__ || lex == __LEX_CEM_WORDS__ )
                    && strlen( _word ) > length ) {
                FRISO_FREE(_word);
                continue;
            }

            //2. get the synonyms words.
            _syn = NULL;
            if ( strcmp( _buffer, "null" ) != 0 ) {
                _syn = string_copy( _buffer, _sbuffer, strlen(_buffer) );
            }

            //3. get the word frequency if it available.
            _fre = 0;
            if ( string_split_next( &sse, _buffer ) != NULL ) {
                _fre = atoi( _buffer );
            }

            /**
             * Here:
             * split the synonyms words with mark "," 
             *     and put them in a array list if the synonyms is not NULL
             */
            sywords = NULL;
            if ( config->add_syn && _syn != NULL ) {
                string_split_reset( &sse, ",", _sbuffer );
                sywords = new_array_list_with_opacity(5);
                while ( string_split_next( &sse, _buffer ) != NULL ) {
                    if ( strlen(_buffer) > length ) continue;
                    array_list_add( sywords, 
                            string_copy_heap(_buffer, strlen(_buffer)) );
                }
                sywords = array_list_trim( sywords );
            }

            //4. add the word item
            friso_dic_add_with_fre( 
                    friso->dic, lex, _word, sywords, _fre );
        } 

        fclose( _stream );
    } else {
        fprintf(stderr, "Warning: Fail to open lexicon file %s\n", lex_file);
        fprintf(stderr, "Warning: Without lexicon file, segment results will not correct \n");
    } 
}


/**
 * get the lexicon type index with the specified 
 *     type keywords . 
 *
 * @see        friso.h#friso_lex_t
 * @param     _key
 * @return     int
 */
__STATIC_API__ friso_lex_t get_lexicon_type_with_constant( fstring _key ) 
{
    if ( strcmp( _key, "__LEX_CJK_WORDS__" ) == 0 ) {
        return __LEX_CJK_WORDS__;
    } else if ( strcmp( _key, "__LEX_CJK_UNITS__" ) == 0 ) {
        return __LEX_CJK_UNITS__;
    } else if ( strcmp( _key, "__LEX_ECM_WORDS__" ) == 0 ) {
        return __LEX_ECM_WORDS__;
    } else if ( strcmp( _key, "__LEX_CEM_WORDS__" ) == 0 ) {
        return __LEX_CEM_WORDS__;
    } else if ( strcmp( _key, "__LEX_CN_LNAME__" ) == 0 ) {
        return __LEX_CN_LNAME__;
    } else if ( strcmp( _key, "__LEX_CN_SNAME__" ) == 0 ) {
        return __LEX_CN_SNAME__;
    } else if ( strcmp( _key, "__LEX_CN_DNAME1__" ) == 0 ) {
        return __LEX_CN_DNAME1__;
    } else if ( strcmp( _key, "__LEX_CN_DNAME2__" ) == 0 ) {
        return __LEX_CN_DNAME2__;
    } else if ( strcmp( _key, "__LEX_CN_LNA__" ) == 0 ) {
        return __LEX_CN_LNA__;
    } else if ( strcmp( _key, "__LEX_STOPWORDS__" ) == 0 ) {
        return __LEX_STOPWORDS__;
    } else if ( strcmp( _key, "__LEX_ENPUN_WORDS__" ) == 0 ) {
        return __LEX_ENPUN_WORDS__;
    } else if ( strcmp( _key, "__LEX_EN_WORDS__" ) == 0 ) {
        return __LEX_EN_WORDS__;
    }

    return -1;
}

/*
 * load the lexicon configuration file.
 *        and load all the valid lexicon from the configuration file.
 *
 * @param friso        friso instance
 * @param    config    friso_config instance
 * @param _path        dictionary directory
 * @param _limitts    words length limit    
 */
FRISO_API void friso_dic_load_from_ifile( 
        friso_t friso, 
        friso_config_t config,
        fstring _path,
        uint_t _limits  ) 
{

    //1.parse the configuration file.
    FILE *__stream;
    char __chars__[1024], __key__[30], *__line__;
    uint_t __length__, i, t;
    friso_lex_t lex_t;
    string_buffer_t sb;

    //get the lexicon configruation file path
    sb = new_string_buffer();

    string_buffer_append( sb, _path );
    string_buffer_append( sb, __FRISO_LEX_IFILE__ );
    //printf("%s\n", sb->buffer);

    if ( ( __stream = fopen( sb->buffer, "rb" ) ) != NULL ) {
        while ( ( __line__ = 
                    file_get_line( __chars__, __stream ) ) != NULL ) {
            //comment filter.
            if ( __line__[0] == '#' )  continue;
            if ( __line__[0] == '\0' ) continue;

            __length__ = strlen( __line__ );
            //item start
            if ( __line__[ __length__ - 1 ] == '[' ) {
                //get the type key
                for ( i = 0; i < __length__
                        && ( __line__[i] == ' ' || __line__[i] == '\t' ); i++ ); 
                for ( t = 0; i < __length__; i++,t++ ) {
                    if ( __line__[i] == ' ' 
                            || __line__[i] == '\t' || __line__[i] == ':' ) break;
                    __key__[t] = __line__[i];
                }
                __key__[t] = '\0';

                //get the lexicon type
                lex_t = get_lexicon_type_with_constant(__key__);
                if ( lex_t == -1 ) continue; 

                //printf("key=%s, type=%d\n", __key__, lex_t );
                while ( ( __line__ = file_get_line( __chars__, __stream ) ) != NULL ) {
                    //comments filter.
                    if ( __line__[0] == '#' ) continue;
                    if ( __line__[0] == '\0' ) continue; 

                    __length__ = strlen( __line__ );
                    if ( __line__[ __length__ - 1 ] == ']' ) break;

                    for ( i = 0; i < __length__ 
                            && ( __line__[i] == ' ' || __line__[i] == '\t' ); i++ );
                    for ( t = 0; i < __length__; i++,t++ ) {
                        if ( __line__[i] == ' ' 
                                || __line__[i] == '\t' || __line__[i] == ';' ) break;
                        __key__[t] = __line__[i]; 
                    }
                    __key__[t] = '\0';

                    //load the lexicon item from the lexicon file.
                    string_buffer_clear( sb );
                    string_buffer_append( sb, _path );
                    string_buffer_append( sb, __key__ );
                    //printf("key=%s, type=%d\n", __key__, lex_t);
                    friso_dic_load( friso, config, lex_t, sb->buffer, _limits );
                }

            } 

        } //end while

        fclose( __stream );
    } else {
        fprintf(stderr, "Warning: Fail to open the lexicon configuration file %s\n", sb->buffer);
        fprintf(stderr, "Warning: Without lexicon file, segment results will not correct \n");
    }

    free_string_buffer(sb);    
}

//match the item.
FRISO_API int friso_dic_match( 
        friso_dic_t dic, 
        friso_lex_t lex, 
        fstring word ) 
{
    if ( lex >= 0 && lex < __FRISO_LEXICON_LENGTH__ ) {
        return hash_exist_mapping( dic[lex], word );
    }
    return 0;
}

//get the lex_entry_t associated with the word.
FRISO_API lex_entry_t friso_dic_get( 
        friso_dic_t dic, 
        friso_lex_t lex, 
        fstring word ) 
{
    if ( lex >= 0 && lex < __FRISO_LEXICON_LENGTH__ ) {
        return ( lex_entry_t ) hash_get_value( dic[lex], word );
    }
    return NULL;
}

//get the size of the specified type dictionary.
FRISO_API uint_t friso_spec_dic_size( 
        friso_dic_t dic, 
        friso_lex_t lex ) 
{
    if ( lex >= 0 && lex < __FRISO_LEXICON_LENGTH__ ) {
        return hash_get_size( dic[lex] );
    }
    return 0;
}

//get size of the whole dictionary.
FRISO_API uint_t friso_all_dic_size( 
        friso_dic_t dic ) 
{
    register uint_t size = 0, t;

    for ( t = 0; t < __FRISO_LEXICON_LENGTH__; t++ ) {
        size += hash_get_size( dic[t] );
    }

    return size;
}


<|start_filename|>src/dep/libnu/strcoll.h<|end_filename|>
#ifndef NU_STRCOLL_H
#define NU_STRCOLL_H

/** @defgroup collation Collation functions
 *
 * All functions in this group are following full Unicode collation rules,
 * i.e. nu_strstr(haystack, "Æ") will find "AE" in haystack and
 * nu_strstr(haystack, "ß") will find "ss".
 *
 * Same applies for *every* function, nu_strchr(str, 0x00DF), as you would
 * guess, will also find "ss" in str.
 *
 * Please expect this.
 *
 * Note on "n" functions variant: please see comment on this topic
 * in strings.h
 */

#include <sys/types.h>

#include "config.h"
#include "casemap.h"
#include "defines.h"
#include "strings.h"

#if defined (__cplusplus) || defined (c_plusplus)
extern "C" {
#endif

#ifdef NU_WITH_TOFOLD
# define NU_FOLDING_FUNCTION nu_tofold
#else
# define NU_FOLDING_FUNCTION nu_toupper
#endif /* NU_WITH_TOFOLD */

#ifdef NU_WITH_Z_COLLATION

/** Locate codepoint in string
 *
 * @ingroup collation
 * @param encoded encoded string
 * @param c charater  to locate
 * @param read read (decode) function for encoded string
 * @return pointer to codepoint in string or 0
 */
NU_EXPORT
const char* nu_strchr(const char *encoded, uint32_t c, nu_read_iterator_t read);

/** Locate codepoint in string ignoring case
 *
 * @ingroup collation
 * @see nu_strchr
 */
NU_EXPORT
const char* nu_strcasechr(const char *encoded, uint32_t c, nu_read_iterator_t read);

/** Locate codepoint in string in reverse direction
 *
 * @ingroup collation
 * @param encoded encoded string
 * @param c charater  to locate
 * @param read read (decode) function for encoded string
 * @return pointer to codepoint in string or 0
 */
NU_EXPORT
const char* nu_strrchr(const char *encoded, uint32_t c, nu_read_iterator_t read);

/** Locate codepoint in string in reverse direction, case-insensitive
 *
 * @ingroup collation
 * @see nu_strrchr
 */
NU_EXPORT
const char* nu_strrcasechr(const char *encoded, uint32_t c, nu_read_iterator_t read);

/** Compare strings in case-sensitive manner.
 *
 * @ingroup collation
 * @param s1 first encoded strings
 * @param s2 second encoded strings
 * @param s1_read read (decode) function for first string
 * @param s2_read read (decode) function for second string
 * @return -1, 0, 1
 */
NU_EXPORT
int nu_strcoll(const char *s1, const char *s2,
	nu_read_iterator_t s1_read, nu_read_iterator_t s2_read);

/** Compare strings in case-insensitive manner.
 *
 * @ingroup collation
 * @see nu_strcoll
 */
NU_EXPORT
int nu_strcasecoll(const char *s1, const char *s2,
	nu_read_iterator_t s1_read, nu_read_iterator_t s2_read);

/** Find needle in haystack
 *
 * @ingroup collation
 * @param haystack encoded haystack
 * @param needle encoded needle
 * @param haystack_read haystack read (decode) function
 * @param needle_read needle read (decode) function
 * @return pointer to found string or 0, will return
 * haystack if needle is empty string
 */
NU_EXPORT
const char* nu_strstr(const char *haystack, const char *needle,
	nu_read_iterator_t haystack_read, nu_read_iterator_t needle_read);

/** Find needle in haystack (case-insensitive)
 *
 * @ingroup collation
 * @see nu_strstr
 */
NU_EXPORT
const char* nu_strcasestr(const char *haystack, const char *needle,
	nu_read_iterator_t haystack_read, nu_read_iterator_t needle_read);

#endif /* NU_WITH_Z_COLLATION */

#ifdef NU_WITH_N_COLLATION

/**
 * @ingroup collation
 * @see nu_strchr
 */
NU_EXPORT
const char* nu_strnchr(const char *encoded, size_t max_len, uint32_t c,
	nu_read_iterator_t read);

/**
 * @ingroup collation
 * @see nu_strcasechr
 */
NU_EXPORT
const char* nu_strcasenchr(const char *encoded, size_t max_len, uint32_t c,
	nu_read_iterator_t read);

/**
 * @ingroup collation
 * @see nu_strrchr
 */
NU_EXPORT
const char* nu_strrnchr(const char *encoded, size_t max_len, uint32_t c,
	nu_read_iterator_t read);

/**
 * @ingroup collation
 * @see nu_strrcasechr
 */
NU_EXPORT
const char* nu_strrcasenchr(const char *encoded, size_t max_len, uint32_t c,
	nu_read_iterator_t read);

/**
 * @ingroup collation
 * @see nu_strcoll
 */
NU_EXPORT
int nu_strncoll(const char *s1, size_t s1_max_len,
	const char *s2, size_t s2_max_len,
	nu_read_iterator_t s1_read, nu_read_iterator_t s2_read);

/**
 * @ingroup collation
 * @see nu_strncoll
 */
NU_EXPORT
int nu_strcasencoll(const char *s1, size_t s1_max_len,
	const char *s2, size_t s2_max_len,
	nu_read_iterator_t s1_read, nu_read_iterator_t s2_read);

/**
 * @ingroup collation
 * @see nu_strstr
 */
NU_EXPORT
const char* nu_strnstr(const char *haystack, size_t haystack_max_len,
	const char *needle, size_t needle_max_len,
	nu_read_iterator_t haystack_read, nu_read_iterator_t needle_read);

/**
 * @ingroup collation
 * @see nu_strcasestr
 */
NU_EXPORT
const char* nu_strcasenstr(const char *haystack, size_t haystack_max_len,
	const char *needle, size_t needle_max_len,
	nu_read_iterator_t haystack_read, nu_read_iterator_t needle_read);

#endif /* NU_WITH_N_COLLATION */

#if defined (__cplusplus) || defined (c_plusplus)
}
#endif

#endif /* NU_STRCOLL_H */


<|start_filename|>src/dep/libnu/tolower.c<|end_filename|>
#include <assert.h>

#include "casemap.h"

#ifdef NU_WITH_TOLOWER

#include "casemap_internal.h"
#include "gen/_tolower.c"

/* in nu_casemap_read (UTF-8), zero-terminated */
static const char *__nu_final_sigma = "ς";

const char* nu_tolower(uint32_t codepoint) {
	return _nu_to_something(codepoint, NU_TOLOWER_G, NU_TOLOWER_G_SIZE,
		NU_TOLOWER_VALUES_C, NU_TOLOWER_VALUES_I, NU_TOLOWER_COMBINED);
}

const char* _nu_tolower(const char *encoded, const char *limit, nu_read_iterator_t read,
	uint32_t *u, const char **transform,
	void *context) {

	(void)(context);

	uint32_t _u = 0;
	const char *np = read(encoded, &_u);

	if (u != 0) {
		*u = _u;
	}

	/* handling of 0x03A3 ('Σ')
	 *
	 * this is the only language-independent exception described in
	 * SpecialCasing.txt (Unicode 7.0) */

	assert(nu_casemap_read == nu_utf8_read);

	if (_u == 0x03A3) {
		if (np >= limit) {
			*transform = __nu_final_sigma;
			return np;
		}

		uint32_t nu = 0;
		read(np, &nu);

		if (nu == 0) {
			*transform = __nu_final_sigma;
			return np;
		}
	}

	*transform = nu_tolower(_u);

	return np;
}

#endif /* NU_WITH_TOLOWER */


<|start_filename|>src/dep/libnu/version.h<|end_filename|>
#ifndef NU_VERSION_H
#define NU_VERSION_H

#include "defines.h"

/** @defgroup other Other
 */

#if defined (__cplusplus) || defined (c_plusplus)
extern "C" {
#endif

/** This define holds human-readable version of nunicode
 *
 * @ingroup defines
 */
#define NU_VERSION "custom"

/** Human-readable version of nunicode
 *
 * @ingroup other
 * @return version string
 */
NU_EXPORT
const char* nu_version(void);

#if defined (__cplusplus) || defined (c_plusplus)
}
#endif

#endif /* NU_VERSION_H */


<|start_filename|>src/rmutil/periodic.c<|end_filename|>
#include "periodic.h"
#include "rmalloc.h"
#include <pthread.h>
#include <stdlib.h>
#include <errno.h>

typedef struct RMUtilTimer {
  RMutilTimerFunc cb;
  RMUtilTimerTerminationFunc onTerm;
  void *privdata;
  struct timespec interval;
  pthread_t thread;
  pthread_mutex_t lock;
  pthread_cond_t cond;
  volatile bool isCanceled;
} RMUtilTimer;

static struct timespec timespecAdd(struct timespec *a, struct timespec *b) {
  struct timespec ret;
  ret.tv_sec = a->tv_sec + b->tv_sec;

  long long ns = a->tv_nsec + b->tv_nsec;
  ret.tv_sec += ns / 1000000000;
  ret.tv_nsec = ns % 1000000000;
  return ret;
}

static void *rmutilTimer_Loop(void *ctx) {
  RMUtilTimer *tm = ctx;

  int rc = ETIMEDOUT;
  struct timespec ts;

  pthread_mutex_lock(&tm->lock);
  while (true) {
    clock_gettime(CLOCK_REALTIME, &ts);
    struct timespec timeout = timespecAdd(&ts, &tm->interval);
    rc = pthread_cond_timedwait(&tm->cond, &tm->lock, &timeout);
    if (rc == EINVAL) {
      perror("Error waiting for condition");
      break;
    }

    if (tm->isCanceled) {
      break;
    }

    // Create a thread safe context if we're running inside redis
    RedisModuleCtx *rctx = NULL;
    if (RedisModule_GetThreadSafeContext) rctx = RedisModule_GetThreadSafeContext(NULL);

    // call our callback...
    if (!tm->cb(rctx, tm->privdata)) {
      if (rctx) RedisModule_FreeThreadSafeContext(rctx);
      break;
    }

    // If needed - free the thread safe context.
    // It's up to the user to decide whether automemory is active there
    if (rctx) RedisModule_FreeThreadSafeContext(rctx);
  }

  // call the termination callback if needed
  if (tm->onTerm != NULL) {
    tm->onTerm(tm->privdata);
  }

  // free resources associated with the timer
  pthread_cond_destroy(&tm->cond);
  pthread_mutex_unlock(&tm->lock);
  rm_free(tm);

  return NULL;
}

/* set a new frequency for the timer. This will take effect AFTER the next trigger */
void RMUtilTimer_SetInterval(struct RMUtilTimer *t, struct timespec newInterval) {
  t->interval = newInterval;
}

RMUtilTimer *RMUtil_NewPeriodicTimer(RMutilTimerFunc cb, RMUtilTimerTerminationFunc onTerm,
                                     void *privdata, struct timespec interval) {
  RMUtilTimer *ret = rm_malloc(sizeof(*ret));
  *ret = (RMUtilTimer){
      .privdata = privdata,
      .interval = interval,
      .cb = cb,
      .onTerm = onTerm,
      .isCanceled = false,
  };
  pthread_cond_init(&ret->cond, NULL);
  pthread_mutex_init(&ret->lock, NULL);

  pthread_create(&ret->thread, NULL, rmutilTimer_Loop, ret);
  pthread_detach(ret->thread);
  return ret;
}

void RMUtilTimer_ForceInvoke(struct RMUtilTimer *t) {
  RMUtilTimer_Signal(t);
}

int RMUtilTimer_Signal(struct RMUtilTimer *t) {
  return pthread_cond_signal(&t->cond);
}

int RMUtilTimer_Terminate(struct RMUtilTimer *t) {
  t->isCanceled = true;
  return RMUtilTimer_Signal(t);
}


<|start_filename|>src/rmutil/test_args.c<|end_filename|>
#include <stdio.h>
#include <redismodule.h>
#include <unistd.h>
#include <string.h>
#include "assert.h"
#include "test.h"
#include "args.h"

int testCArgs() {
  ArgsCursor ac;
  const char *args[] = {"hello",  "stringArg",   "goodbye",        "666", "cute", "3.14",
                        "toobig", "99999999999", "negative_nancy", "-1"};
  size_t argc = sizeof(args) / sizeof(args[0]);
  ArgsCursor_InitCString(&ac, args, argc);
  ASSERT(ac.offset == 0);
  ASSERT(ac.argc == argc);

  // Get the string
  const char *arg;
  ASSERT(!AC_GetString(&ac, &arg, NULL, 0));
  ASSERT(!strcmp(arg, "hello"));

  // Get the next string
  ASSERT(!AC_GetString(&ac, &arg, NULL, 0));
  ASSERT(!strcmp(arg, "stringArg"));

  // Get the goodbye arg
  ASSERT(!AC_GetString(&ac, &arg, NULL, 0));
  ASSERT(!strcmp("goodbye", arg));

  int intArg = 0;
  ASSERT(!AC_GetInt(&ac, &intArg, 0));
  ASSERT(666 == intArg);

  double dArg = 0.0;
  ASSERT(!AC_GetString(&ac, &arg, NULL, 0));
  ASSERT(!strcmp("cute", arg));

  ASSERT(!AC_GetDouble(&ac, &dArg, 0));
  ASSERT(3.14 == dArg);

  // Now let's work on errors
  ASSERT(!AC_GetString(&ac, &arg, NULL, 0));
  ASSERT(!strcmp("toobig", arg));

  ASSERT(AC_ERR_ELIMIT == AC_GetInt(&ac, &intArg, 0));

  AC_Advance(&ac);  // skip anyway

  ASSERT(!AC_GetString(&ac, &arg, NULL, 0));
  ASSERT(!strcmp("negative_nancy", arg));

  // Negative args
  ASSERT(AC_ERR_ELIMIT == AC_GetInt(&ac, &intArg, AC_F_GE0));
  ASSERT(AC_ERR_ELIMIT == AC_GetInt(&ac, &intArg, AC_F_GE1));

  // Parse args[1] as a number
  ac.offset = 1;
  ASSERT(AC_ERR_PARSE == AC_GetInt(&ac, &intArg, 0));
  ASSERT(AC_ERR_PARSE == AC_GetDouble(&ac, &dArg, 0));
  return 0;
}

static int testTypeConversion() {
  const char *objs[] = {NULL};
  ArgsCursor ac;
  ArgsCursor_InitCString(&ac, objs, 1);
#define PREP_ARG(arg) \
  ac.objs[0] = arg;   \
  ac.offset = 0;      \
  ac.argc = 1;

  int intArg;
  PREP_ARG("3.14");
  // Try to parse the double as an int
  ASSERT(AC_ERR_PARSE == AC_GetInt(&ac, &intArg, 0));
  // Same, but with coalesce
  ASSERT(0 == AC_GetInt(&ac, &intArg, AC_F_COALESCE));

  unsigned uArg;
  PREP_ARG("0");
  ASSERT(AC_ERR_ELIMIT == AC_GetUnsigned(&ac, &uArg, AC_F_GE1));
  ASSERT(0 == AC_GetUnsigned(&ac, &uArg, AC_F_GE0));

  // negative arguments fail by default on unsigned conversions. no overflow
  PREP_ARG("-1");
  ASSERT(AC_ERR_ELIMIT == AC_GetUnsigned(&ac, &uArg, 0));
  return 0;
}

TEST_MAIN({
  TESTFUNC(testCArgs);
  TESTFUNC(testTypeConversion);
})

<|start_filename|>src/util/fnv.h<|end_filename|>
#ifndef __FT_FNV_H__
#define __FT_FNV_H__

#include <stdint.h>
#include <stdlib.h>

#define FNV_32_PRIME ((Fnv32_t)0x01000193)

uint32_t rs_fnv_32a_buf(const void *buf, size_t len, uint32_t hval);

uint64_t fnv_64a_buf(const void *buf, size_t len, uint64_t hval);

#endif


<|start_filename|>src/dep/phonetics/Makefile<|end_filename|>
default: dmtest

CXXFLAGS=-fPIC -fno-rtti -fno-exceptions

double_metaphone.o: double_metaphone.cpp
dmtest: dmtest.cpp double_metaphone.o 

clean:
	rm dmtest dmtest.o double_metaphone.o 


<|start_filename|>src/util/arr.c<|end_filename|>
#include "arr.h"

void array_debug(void *pp) {
  const array_hdr_t *hdr = array_hdr(pp);
  printf("Array: %p, hdr@%p", pp, hdr);
  printf("Len: %u. Cap: %u. ElemSize: %u\n", hdr->len, hdr->cap, hdr->elem_sz);
}


<|start_filename|>src/query_parser/parser.h<|end_filename|>
#define LOWEST                           1
#define TILDE                            2
#define TAGLIST                          3
#define QUOTE                            4
#define COLON                            5
#define MINUS                            6
#define NUMBER                           7
#define STOPWORD                         8
#define TERMLIST                         9
#define TERM                            10
#define PREFIX                          11
#define PERCENT                         12
#define ATTRIBUTE                       13
#define LP                              14
#define RP                              15
#define MODIFIER                        16
#define AND                             17
#define OR                              18
#define ORX                             19
#define ARROW                           20
#define STAR                            21
#define SEMICOLON                       22
#define LB                              23
#define RB                              24
#define LSQB                            25
#define RSQB                            26


<|start_filename|>src/aggregate/expr/parser.h<|end_filename|>
#define AND                              1
#define OR                               2
#define NOT                              3
#define EQ                               4
#define NE                               5
#define LT                               6
#define LE                               7
#define GT                               8
#define GE                               9
#define PLUS                            10
#define MINUS                           11
#define DIVIDE                          12
#define TIMES                           13
#define MOD                             14
#define POW                             15
#define LP                              16
#define RP                              17
#define PROPERTY                        18
#define SYMBOL                          19
#define STRING                          20
#define NUMBER                          21
#define ARGLIST                         22
#define COMMA                           23


<|start_filename|>src/fragmenter.h<|end_filename|>
#ifndef FRAGMENTER_H
#define FRAGMENTER_H

#include <stdlib.h>
#include <stdint.h>
#include <sys/uio.h>
#include "util/array.h"
#include "stemmer.h"
#include "redisearch.h"
#include "stopwords.h"
#include "byte_offsets.h"

/**
 *
 ## Implementation
The summarization/highlight subsystem is implemented using an environment-agnostic
highlighter/fragmenter, and a higher level which is integrated with RediSearch and
the query keyword parser.

The summarization process begins by tokenizing the requested field, and splitting
the document into *fragments*.

When a matching token (or its stemmed variant) is found, a distance counter begins.
This counts the number of tokens following the matched token. If another matching
token occurs before the maximum token distance has been exceeded, the counter is
reset to 0 and the fragment is extended.

Each time a token is found in a fragment, the fragment's score increases. The
score increase is dependent on the base token score (this is provided as
input to the fragmenter), and whether this term is being repeated, or if it is
a new occurrence (within the same fragment). New terms get higher scores; which
helps eliminate forms like "I said to Abraham: Abraham, why...".

The input score for each term is calculated based on the term's overall frequency
in the DB (lower frequency means higher score), but this is consider out of bounds
for the fragmenter.

Once all fragments are scored, they are then *contextualized*. The fragment's
context is determined to be X amount of tokens surrounding the given matched
tokens. Words in between the tokens are considered as well, ensuring that every
fragment is more or less the same size.
 */

typedef struct {
  uint32_t tokPos;
  uint32_t bytePos;
  uint32_t termId;
  uint32_t len;
  float score;
} FragmentTerm;

typedef struct {
  RSByteOffsetIterator *byteIter;
  RSOffsetIterator *offsetIter;
  RSQueryTerm *curMatchRec;
  uint32_t curTokPos;
  uint32_t curByteOffset;
  FragmentTerm tmpTerm;
} FragmentTermIterator;

int FragmentTermIterator_Next(FragmentTermIterator *iter, FragmentTerm **termInfo);
void FragmentTermIterator_InitOffsets(FragmentTermIterator *iter, RSByteOffsetIterator *bytesIter,
                                      RSOffsetIterator *offIter);

typedef struct {
  // Position in current fragment (bytes)
  uint32_t offset;

  // Length of the token. This might be a stem, so not necessarily similar to termId
  uint16_t len;

  // Index into FragmentList::terms
  uint16_t termId;
} TermLoc;

typedef struct Fragment {
  const char *buf;
  uint32_t len;

  // (token-wise) position of the last matched token
  uint32_t lastMatchPos;

  // How many tokens are in this fragment
  uint32_t totalTokens;

  // How many _matched_ tokens are in this fragment
  uint32_t numMatches;

  // Inverted ranking (from 0..n) in the score array. A lower number means a higher score
  uint32_t scoreRank;

  // Position within the array of fragments
  uint32_t fragPos;

  // Score calculated from the number of matches
  float score;
  Array termLocs;  // TermLoc
} Fragment;

typedef struct {
  // Array of fragments
  Array frags;

  // Array of indexes (in frags), sorted by score
  const Fragment **sortedFrags;

  // Scratch space, used internally
  const Fragment **scratchFrags;

  // Number of fragments
  uint32_t numFrags;

  // Number of tokens since last match. Used in determining 'context ratio'
  uint32_t numToksSinceLastMatch;

  const char *doc;
  uint32_t docLen;

  // Maximum allowable distance between relevant terms to be called a 'fragment'
  uint16_t maxDistance;

  // Average word size. Used when determining context.
  uint8_t estAvgWordSize;
} FragmentList;

static inline void FragmentList_Init(FragmentList *fragList, uint16_t maxDistance,
                                     uint8_t estWordSize) {
  fragList->doc = NULL;
  fragList->docLen = 0;
  fragList->numFrags = 0;
  fragList->maxDistance = maxDistance;
  fragList->estAvgWordSize = estWordSize;
  fragList->sortedFrags = NULL;
  fragList->scratchFrags = NULL;
  Array_Init(&fragList->frags);
}

static inline size_t FragmentList_GetNumFrags(const FragmentList *fragList) {
  return ARRAY_GETSIZE_AS(&fragList->frags, Fragment);
}

static const Fragment *FragmentList_GetFragments(const FragmentList *fragList) {
  return ARRAY_GETARRAY_AS(&fragList->frags, const Fragment *);
}

#define FRAGMENT_TERM(buf_, len_, score_) \
  { .tok = buf_, .len = len_, .score = score_ }
/**
 * A single term to use for searching. Used when fragmenting a buffer
 */
typedef struct {
  const char *tok;
  size_t len;
  float score;
} FragmentSearchTerm;

#define DOCLEN_NULTERM ((size_t)-1)

/**
 * Split a document into a list of fragments.
 * - doc is the document to split
 * - numTerms is the number of terms to search for. The terms themselves are
 *   not searched, but each Fragment needs to have this memory made available.
 *
 * Returns a list of fragments.
 */
void FragmentList_FragmentizeBuffer(FragmentList *fragList, const char *doc, Stemmer *stemmer,
                                    StopWordList *stopwords, const FragmentSearchTerm *terms,
                                    size_t numTerms);

#define FRAGMENTIZE_TOKLEN_EXACT 0x01
void FragmentList_FragmentizeIter(FragmentList *fragList, const char *doc, size_t docLen,
                                  FragmentTermIterator *iter, int options);

typedef struct {
  const char *openTag;
  const char *closeTag;
} HighlightTags;

void FragmentList_Free(FragmentList *frags);

/** Highlight matches the entire document, returning a series of IOVs */
void FragmentList_HighlightWholeDocV(const FragmentList *fragList, const HighlightTags *tags,
                                     Array *iovs);

/** Highlight matches the entire document, returning it as a freeable NUL-terminated buffer */
char *FragmentList_HighlightWholeDocS(const FragmentList *fragList, const HighlightTags *tags);

/**
 * Return fragments by their score. The highest ranked fragment is returned fist
 */
#define HIGHLIGHT_ORDER_SCORE 0x01

/**
 * Return fragments by their order in the document. The fragment with the lowest
 * position is returned first.
 */
#define HIGHLIGHT_ORDER_POS 0x02

/**
 * First select the highest scoring elements and then sort them by position
 */
#define HIGHLIGHT_ORDER_SCOREPOS 0x03
/**
 * Highlight fragments for each document.
 *
 * - contextSize is the size of the surrounding context, in estimated words,
 * for each returned fragment. The function will use this as a hint.
 *
 * - iovBufList is an array of buffers. Each element corresponds to a fragment,
 * and the fragments are always returned in order.
 *
 * - niovs If niovs is less than the number of fragments, then only the first
 * <niov> fragments are returned.
 *
 * - order is one of the HIGHLIGHT_ORDER_ constants. See their documentation
 * for more details
 *
 */
void FragmentList_HighlightFragments(FragmentList *fragList, const HighlightTags *tags,
                                     size_t contextSize, Array *iovBufList, size_t niovs,
                                     int order);

void FragmentList_Dump(const FragmentList *fragList);

#endif

<|start_filename|>src/dep/libnu/version.c<|end_filename|>
#include "version.h"

static const char *__nu_version_string = NU_VERSION;

const char* nu_version(void) {
	return __nu_version_string;
}


<|start_filename|>src/aggregate/functions/date.c<|end_filename|>
#include <util/minmax.h>
#include <util/array.h>
#include <util/block_alloc.h>
#include <aggregate/expr/expression.h>
#include <ctype.h>

#include "function.h"

#define ISOFMT "%FT%TZ"
#define ISOFMT_LEN sizeof(ISOFMT) - 1

// TIME(propert, [fmt_string])
static int timeFormat(ExprEval *ctx, RSValue *result, RSValue **argv, size_t argc,
                      QueryError *err) {
  VALIDATE_ARGS("time", 1, 2, err);
  const char *fmt = ISOFMT;
  if (argc == 2) {
    VALIDATE_ARG_TYPE("time", argv, 1, RSValue_String);
    fmt = RSValue_StringPtrLen(argv[1], NULL);
  }
  // Get the format
  char timebuf[1024] = {0};  // Should be enough for any human time string
  double n;
  // value is not a number
  if (!RSValue_ToNumber(argv[0], &n)) {
    goto err;
  }
  time_t tt = (time_t)n;
  struct tm tm;
  if (!gmtime_r(&tt, &tm)) {
    // could not convert value to timestamp
    goto err;
  }

  size_t rv = strftime(timebuf, sizeof timebuf, fmt, &tm);
  if (rv == 0) {
    // invalid format
    goto err;
  }

  // Finally, allocate a buffer to store the time!
  char *buf = ExprEval_Strndup(ctx, timebuf, rv);

  // It will be released by the block allocator destruction, so we refer to it is a static string so
  // the value ref counter will not release it
  RSValue_SetConstString(result, buf, rv);
  return EXPR_EVAL_OK;
err:
  // on runtime error (bad formatting, etc) we just set the result to null

  RSValue_MakeReference(result, RS_NullVal());
  return EXPR_EVAL_OK;
}

/* Fast alternative to mktime which is dog slow. From:
https://gmbabar.wordpress.com/2010/12/01/mktime-slow-use-custom-function/ */
time_t fast_timegm(const struct tm *ltm) {
  // elapsed days until the beginning of every month
  const int mon_days[] = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334};
  long tyears, tdays, leaps, utc_hrs;

  tyears = ltm->tm_year - 70;  // tm->tm_year is from 1900.
  leaps = (tyears + 2) / 4;    // no of next two lines until year 2100.
  // i = (ltm->tm_year – 100) / 100;
  // leaps -= ( (i/4)*3 + i%4 );
  tdays = mon_days[ltm->tm_mon];

  tdays += ltm->tm_mday - 1;  // days of month passed.
  tdays = tdays + (tyears * 365) + leaps;

  return (tdays * 86400) + (ltm->tm_hour * 3600) + (ltm->tm_min * 60) + ltm->tm_sec;
}

static int func_hour(ExprEval *ctx, RSValue *result, RSValue **argv, size_t argc, QueryError *err) {
  VALIDATE_ARGS("hour", 1, 1, err);

  double d;
  if (!RSValue_ToNumber(argv[0], &d) || d < 0) {
    goto err;
  }
  time_t ts = (time_t)d;
  struct tm tmm;

  gmtime_r(&ts, &tmm);
  tmm.tm_sec = 0;
  tmm.tm_min = 0;
  ts = fast_timegm(&tmm);
  RSValue_SetNumber(result, (double)ts);

  return EXPR_EVAL_OK;
err:
  // on runtime error (bad formatting, etc) we just set the result to null

  RSValue_MakeReference(result, RS_NullVal());
  return EXPR_EVAL_OK;
}

static int func_minute(ExprEval *ctx, RSValue *result, RSValue **argv, size_t argc,
                       QueryError *err) {
  VALIDATE_ARGS("minute", 1, 1, err);

  double d;
  if (!RSValue_ToNumber(argv[0], &d) || d < 0) {
    goto err;
  }
  RSValue_SetNumber(result, floor(d - fmod(d, 60)));
  return EXPR_EVAL_OK;
err:
  // on runtime error (bad formatting, etc) we just set the result to null

  RSValue_MakeReference(result, RS_NullVal());
  return EXPR_EVAL_OK;
}

/* Round timestamp to its day start */
static int func_day(ExprEval *ctx, RSValue *result, RSValue **argv, size_t argc, QueryError *err) {
  VALIDATE_ARGS("day", 1, 1, err);

  double d;
  if (!RSValue_ToNumber(argv[0], &d) || d < 0) {
    goto err;
  }
  time_t ts = (time_t)d;
  struct tm tmm;

  gmtime_r(&ts, &tmm);
  tmm.tm_sec = 0;
  tmm.tm_hour = 0;
  tmm.tm_min = 0;
  ts = fast_timegm(&tmm);
  RSValue_SetNumber(result, (double)ts);
  return EXPR_EVAL_OK;
err:
  // on runtime error (bad formatting, etc) we just set the result to null

  RSValue_MakeReference(result, RS_NullVal());
  return EXPR_EVAL_OK;
}

static int func_dayofmonth(ExprEval *ctx, RSValue *result, RSValue **argv, size_t argc,
                           QueryError *err) {
  VALIDATE_ARGS("dayofmonth", 1, 1, err);

  double d;
  if (!RSValue_ToNumber(argv[0], &d) || d < 0) {
    goto err;
  }
  time_t ts = (time_t)d;
  struct tm tmm;
  gmtime_r(&ts, &tmm);

  RSValue_SetNumber(result, (double)tmm.tm_mday);
  return EXPR_EVAL_OK;
err:
  // on runtime error (bad formatting, etc) we just set the result to null

  RSValue_MakeReference(result, RS_NullVal());
  return EXPR_EVAL_OK;
}

static int func_dayofweek(ExprEval *ctx, RSValue *result, RSValue **argv, size_t argc,
                          QueryError *err) {
  VALIDATE_ARGS("dayofweek", 1, 1, err);

  double d;
  if (!RSValue_ToNumber(argv[0], &d) || d < 0) {
    goto err;
  }
  time_t ts = (time_t)d;
  struct tm tmm;
  gmtime_r(&ts, &tmm);

  RSValue_SetNumber(result, (double)tmm.tm_wday);
  return EXPR_EVAL_OK;
err:
  // on runtime error (bad formatting, etc) we just set the result to null

  RSValue_MakeReference(result, RS_NullVal());
  return EXPR_EVAL_OK;
}

static int func_dayofyear(ExprEval *ctx, RSValue *result, RSValue **argv, size_t argc,
                          QueryError *err) {
  VALIDATE_ARGS("dayofyear", 1, 1, err);

  double d;
  if (!RSValue_ToNumber(argv[0], &d) || d < 0) {
    goto err;
  }
  time_t ts = (time_t)d;
  struct tm tmm;
  gmtime_r(&ts, &tmm);

  RSValue_SetNumber(result, (double)tmm.tm_yday);
  return EXPR_EVAL_OK;
err:
  // on runtime error (bad formatting, etc) we just set the result to null

  RSValue_MakeReference(result, RS_NullVal());
  return EXPR_EVAL_OK;
}

static int func_year(ExprEval *ctx, RSValue *result, RSValue **argv, size_t argc, QueryError *err) {
  VALIDATE_ARGS("year", 1, 1, err);

  double d;
  if (!RSValue_ToNumber(argv[0], &d) || d < 0) {
    goto err;
  }
  time_t ts = (time_t)d;
  struct tm tmm;
  gmtime_r(&ts, &tmm);

  RSValue_SetNumber(result, (double)tmm.tm_year + 1900);
  return EXPR_EVAL_OK;
err:
  // on runtime error (bad formatting, etc) we just set the result to null
  RSValue_MakeReference(result, RS_NullVal());
  return EXPR_EVAL_OK;
}

/* Round a timestamp to the beginning of the month */
static int func_month(ExprEval *ctx, RSValue *result, RSValue **argv, size_t argc,
                      QueryError *err) {
  VALIDATE_ARGS("month", 1, 1, err);

  double d;
  if (!RSValue_ToNumber(argv[0], &d) || d < 0) {
    goto err;
  }
  time_t ts = (time_t)d;
  struct tm tmm;
  gmtime_r(&ts, &tmm);
  tmm.tm_sec = 0;
  tmm.tm_hour = 0;
  tmm.tm_min = 0;
  tmm.tm_mday = 1;
  ts = fast_timegm(&tmm);
  RSValue_SetNumber(result, (double)ts);
  return EXPR_EVAL_OK;
err:
  // on runtime error (bad formatting, etc) we just set the result to null

  RSValue_MakeReference(result, RS_NullVal());
  return EXPR_EVAL_OK;
}

static int func_monthofyear(ExprEval *ctx, RSValue *result, RSValue **argv, size_t argc,
                            QueryError *err) {
  VALIDATE_ARGS("monthofyear", 1, 1, err);

  double d;
  if (!RSValue_ToNumber(argv[0], &d) || d < 0) {
    goto err;
  }
  time_t ts = (time_t)d;
  struct tm tmm;
  gmtime_r(&ts, &tmm);
  RSValue_SetNumber(result, (double)tmm.tm_mon);
  return EXPR_EVAL_OK;
err:
  // on runtime error (bad formatting, etc) we just set the result to null

  RSValue_MakeReference(result, RS_NullVal());
  return EXPR_EVAL_OK;
}

static int parseTime(ExprEval *ctx, RSValue *result, RSValue **argv, size_t argc, QueryError *err) {
  VALIDATE_ARGS("parsetime", 2, 2, err);
  VALIDATE_ARG_ISSTRING("parsetime", argv, 0);
  VALIDATE_ARG_ISSTRING("parsetime", argv, 1);

  const char *val = RSValue_StringPtrLen(argv[0], NULL);
  const char *fmt = RSValue_StringPtrLen(argv[1], NULL);
 
  struct tm tm = {0};
  char *rc = strptime(val, fmt, &tm);
  if (rc == NULL) {
    goto err;
  }
  time_t rv = timegm(&tm);
  RSValue_SetNumber(result, rv);
  return EXPR_EVAL_OK;

err:
  RSValue_MakeReference(result, RS_NullVal());
  return EXPR_EVAL_OK;
}

void RegisterDateFunctions() {
  RSFunctionRegistry_RegisterFunction("timefmt", timeFormat, RSValue_String);
  RSFunctionRegistry_RegisterFunction("parsetime", parseTime, RSValue_Number);
  RSFunctionRegistry_RegisterFunction("hour", func_hour, RSValue_Number);
  RSFunctionRegistry_RegisterFunction("minute", func_minute, RSValue_Number);
  RSFunctionRegistry_RegisterFunction("day", func_day, RSValue_Number);
  RSFunctionRegistry_RegisterFunction("month", func_month, RSValue_Number);
  RSFunctionRegistry_RegisterFunction("monthofyear", func_monthofyear, RSValue_Number);

  RSFunctionRegistry_RegisterFunction("year", func_year, RSValue_Number);
  RSFunctionRegistry_RegisterFunction("dayofmonth", func_dayofmonth, RSValue_Number);
  RSFunctionRegistry_RegisterFunction("dayofweek", func_dayofweek, RSValue_Number);
  RSFunctionRegistry_RegisterFunction("dayofyear", func_dayofyear, RSValue_Number);
}

<|start_filename|>src/dep/libnu/utf16be.c<|end_filename|>
#include "utf16be.h"

#ifdef NU_WITH_UTF16BE_READER
#ifdef NU_WITH_VALIDATION

int nu_utf16be_validread(const char *encoded, size_t max_len) {
	if (max_len < 2) {
		return 0;
	}

	return utf16_validread(encoded, max_len);
}

#endif /* NU_WITH_VALIDATION */
#endif /* NU_WITH_UTF16BE_READER */

#ifdef NU_WITH_UTF16BE_WRITER

char* nu_utf16be_write(uint32_t unicode, char *utf16) {
	unsigned codepoint_len = utf16_codepoint_length(unicode);

	if (utf16 != 0) {
		switch (codepoint_len) {
			case 2: nu_htobes((uint16_t)(unicode), utf16); break;
			default: { /* len == 4 */
				uint16_t c0 = 0, c1 = 0;
				b4_utf16(unicode, &c0, &c1);
				nu_htobes(c0, utf16);
				nu_htobes(c1, utf16 + 2);
				break;
			}
		}
	}

	return utf16 + codepoint_len;
}

#endif /* NU_WITH_UTF16BE_WRITER */


<|start_filename|>src/err.h<|end_filename|>
#ifndef RS_ERR_H_
#define RS_ERR_H_
#include <stdio.h>

#define FMT_ERR(e, fmt, ...)          \
  ({                                  \
    rm_asprintf(e, fmt, __VA_ARGS__); \
    NULL;                             \
  })

#define SET_ERR(e, msg)                \
  ({                                   \
    if (e && !*e) *e = rm_strdup(msg); \
    NULL;                              \
  })

#define ERR_FREE(e) \
  if (e) {          \
    rm_free(e);     \
  }

#endif


<|start_filename|>src/dep/phonetics/double_metaphone.h<|end_filename|>
/* COPYRIGHT NOTICE
 *
 * This code was pulled directly from the Text-DoubleMetaphone perl package,
 * version 0.07
 *
 * The README mentions that the copyright is:
 *
 *  Copyright 2000, <NAME> <<EMAIL>>.
 *  All rights reserved.

 *  This code is based heavily on the C++ implementation by
 *  <NAME> and incorporates several bug fixes courtesy
 *  of <NAME> <<EMAIL>>.
 *
 *  This module is free software; you may redistribute it and/or
 *  modify it under the same terms as Perl itself.
 */

#ifndef DOUBLE_METAPHONE__H
#define DOUBLE_METAPHONE__H

#ifdef __cplusplus
extern "C" {
#endif

typedef struct {
  char *str;
  int length;
  int bufsize;
  int free_string_on_destroy;
} metastring;

void DoubleMetaphone(const char *str, char **primary_pp, char **secondary_pp);

#ifdef __cplusplus
}
#endif
#endif /* DOUBLE_METAPHONE__H */

<|start_filename|>src/byte_offsets.c<|end_filename|>
#include "byte_offsets.h"
#include <arpa/inet.h>

RSByteOffsets *NewByteOffsets() {
  RSByteOffsets *ret = rm_calloc(1, sizeof(*ret));
  return ret;
}

void RSByteOffsets_Free(RSByteOffsets *offsets) {
  rm_free(offsets->offsets.data);
  rm_free(offsets->fields);
  rm_free(offsets);
}

void RSByteOffsets_ReserveFields(RSByteOffsets *offsets, size_t numFields) {
  offsets->fields = rm_realloc(offsets->fields, sizeof(*offsets->fields) * numFields);
}

RSByteOffsetField *RSByteOffsets_AddField(RSByteOffsets *offsets, uint32_t fieldId,
                                          uint32_t startPos) {
  RSByteOffsetField *field = &(offsets->fields[offsets->numFields++]);
  field->fieldId = fieldId;
  field->firstTokPos = startPos;
  return field;
}

void ByteOffsetWriter_Move(ByteOffsetWriter *w, RSByteOffsets *offsets) {
  offsets->offsets.data = w->buf.data;
  offsets->offsets.len = w->buf.offset;
  memset(&w->buf, 0, sizeof w->buf);
}

void RSByteOffsets_Serialize(const RSByteOffsets *offsets, Buffer *b) {
  BufferWriter w = NewBufferWriter(b);

  Buffer_WriteU8(&w, offsets->numFields);

  for (size_t ii = 0; ii < offsets->numFields; ++ii) {
    Buffer_WriteU8(&w, offsets->fields[ii].fieldId);
    Buffer_WriteU32(&w, offsets->fields[ii].firstTokPos);
    Buffer_WriteU32(&w, offsets->fields[ii].lastTokPos);
  }

  Buffer_WriteU32(&w, offsets->offsets.len);
  Buffer_Write(&w, offsets->offsets.data, offsets->offsets.len);
}

RSByteOffsets *LoadByteOffsets(Buffer *buf) {
  BufferReader r = NewBufferReader(buf);

  RSByteOffsets *offsets = NewByteOffsets();
  uint8_t numFields = Buffer_ReadU8(&r);
  RSByteOffsets_ReserveFields(offsets, numFields);

  for (size_t ii = 0; ii < numFields; ++ii) {
    uint8_t fieldId = Buffer_ReadU8(&r);
    uint32_t firstTok = Buffer_ReadU32(&r);
    uint32_t lastTok = Buffer_ReadU32(&r);
    RSByteOffsetField *fieldInfo = RSByteOffsets_AddField(offsets, fieldId, firstTok);
    fieldInfo->lastTokPos = lastTok;
  }

  uint32_t offsetsLen = Buffer_ReadU32(&r);
  offsets->offsets.len = offsetsLen;
  if (offsetsLen) {
    offsets->offsets.data = rm_malloc(offsetsLen);
    Buffer_Read(&r, offsets->offsets.data, offsetsLen);
  } else {
    offsets->offsets.data = NULL;
  }

  return offsets;
}

int RSByteOffset_Iterate(const RSByteOffsets *offsets, uint32_t fieldId,
                         RSByteOffsetIterator *iter) {
  const RSByteOffsetField *offField = NULL;
  for (size_t ii = 0; ii < offsets->numFields; ++ii) {
    if (offsets->fields[ii].fieldId == fieldId) {
      offField = offsets->fields + ii;
      break;
    }
  }
  if (!offField) {
    return REDISMODULE_ERR;
  }

  // printf("Generating iterator for fieldId=%lu. BeginPos=%lu. EndPos=%lu\n", fieldId,
  //        offField->firstTokPos, offField->lastTokPos);

  iter->buf.cap = 0;
  iter->buf.data = offsets->offsets.data;
  iter->buf.offset = offsets->offsets.len;
  iter->rdr = NewBufferReader(&iter->buf);
  iter->curPos = 1;
  iter->endPos = offField->lastTokPos;

  iter->lastValue = 0;

  while (iter->curPos < offField->firstTokPos && !BufferReader_AtEnd(&iter->rdr)) {
    // printf("Seeking & incrementing\n");
    iter->lastValue = ReadVarint(&iter->rdr) + iter->lastValue;
    iter->curPos++;
  }

  // printf("Iterator is now at %lu\n", iter->curPos);
  iter->curPos--;
  return REDISMODULE_OK;
}

uint32_t RSByteOffsetIterator_Next(RSByteOffsetIterator *iter) {
  if (BufferReader_AtEnd(&iter->rdr) || ++iter->curPos > iter->endPos) {
    return RSBYTEOFFSET_EOF;
  }

  iter->lastValue = ReadVarint(&iter->rdr) + iter->lastValue;
  return iter->lastValue;
}

<|start_filename|>src/gc.h<|end_filename|>

#ifndef SRC_GC_H_
#define SRC_GC_H_

#include "redismodule.h"
#include "util/dllist.h"
#include <time.h>

#ifdef __cplusplus
extern "C" {
#endif

struct IndexSpec;

typedef struct GCCallbacks {
  int (*periodicCallback)(RedisModuleCtx* ctx, void* gcCtx);
  void (*renderStats)(RedisModuleCtx* ctx, void* gc);
  void (*onDelete)(void* ctx);
  void (*onTerm)(void* ctx);

  // Send a "kill signal" to the GC, requesting it to terminate asynchronously
  void (*kill)(void* ctx);
  struct timespec (*getInterval)(void* ctx);
} GCCallbacks;

typedef struct GCContext {
  void* gcCtx;
  RedisModuleTimerID timerID;
  GCCallbacks callbacks;
  int stopped;
} GCContext;

typedef struct GCTask {
  GCContext* gc;
  RedisModuleBlockedClient* bClient;
  int debug;
} GCTask;

GCContext* GCContext_CreateGCFromSpec(struct IndexSpec* sp, float initialHZ, uint64_t uniqueId,
                                      uint32_t gcPolicy);
GCContext* GCContext_CreateGC(RedisModuleString* keyName, float initialHZ, uint64_t uniqueId);
void GCContext_Start(GCContext* gc);
void GCContext_Stop(GCContext* gc);
void GCContext_RenderStats(GCContext* gc, RedisModuleCtx* ctx);
void GCContext_OnDelete(GCContext* gc);
void GCContext_ForceInvoke(GCContext* gc, RedisModuleBlockedClient* bc);
void GCContext_ForceBGInvoke(GCContext* gc);

void GC_ThreadPoolStart();
void GC_ThreadPoolDestroy();

#ifdef __cplusplus
}
#endif
#endif /* SRC_GC_H_ */


<|start_filename|>src/dep/libnu/ducet.c<|end_filename|>
#include <assert.h>

#include "ducet.h"
#include "udb.h"

#ifdef NU_WITH_DUCET

#include "gen/_ducet.c"

#ifndef NU_DISABLE_CONTRACTIONS
#	include "gen/_ducet_switch.c"
#else
	const size_t _NU_DUCET_CONTRACTIONS = 0;
#endif

static size_t _nu_ducet_weights_count() {
	return NU_DUCET_G_SIZE + _NU_DUCET_CONTRACTIONS;
}

int32_t nu_ducet_weight(uint32_t codepoint, int32_t *weight, void *context) {
	(void)(weight);
	(void)(context);

	assert(_nu_ducet_weights_count() < 0x7FFFFFFF - 0x10FFFF);

#ifndef NU_DISABLE_CONTRACTIONS
	int32_t switch_value = _nu_ducet_weight_switch(codepoint, weight, context);
	/* weight switch should return weight (if any) and fill value of *weight
	 * with fallback (if needed). returned value of 0 is impossible result - this
	 * special case is already handled above, this return value indicates that switch
	 * couldn't find weight for a codepoint */
	if (switch_value != 0) {
		return switch_value;
	}
#endif

	/* special case switch after contractions switch
	 * to let state-machine figure out its state on abort */
	if (codepoint == 0) {
		return 0;
	}

	uint32_t mph_value = nu_udb_lookup_value(codepoint, NU_DUCET_G, NU_DUCET_G_SIZE,
		NU_DUCET_VALUES_C, NU_DUCET_VALUES_I);

	return (mph_value != 0
		? (int32_t)(mph_value)
		: (int32_t)(codepoint + _nu_ducet_weights_count()));

	/* ISO/IEC 14651 requests that codepoints with undefined weight should be
	 * sorted before max weight in collation table. This way all codepoints
	 * defined in ducet would have weight under a value of _nu_ducet_weights_count(),
	 * all undefined codepoints would have weight under
	 * 0x10FFFF + _nu_ducet_weights_count() - 1, max weight will be
	 * 0x10FFFF + _nu_ducet_weights_count() */

	/* Regarding integer overflow:
	 *
	 * int32_t can hold 0xFFFFFFFF / 2 = 0x7FFFFFFF positive numbers, this
	 * function can safely offset codepoint value up to +2146369536 without
	 * risk of overflow. Thus max collation table size supported is
	 * 2146369536 (0x7FFFFFFF - 0x10FFFF) */
}

#endif /* NU_WITH_DUCET */


<|start_filename|>tests/benchmark/Makefile<|end_filename|>
CFLAGS = -g -O3 -std=gnu99 -I/usr/local/include -Wall -Wno-unused-function
LDFLAGS= -L/usr/local/lib -lhiredis -lev -lc -lm -static
CC=gcc

benchmark: benchmark.o
	$(CC) -o ./benchmark benchmark.o $(LDFLAGS)

all: benchmark
