// vim:fileencoding=utf-8:foldmethod=marker

#ifndef XORSHIFT_H
#define XORSHIFT_H

#include "../../common/aliases/aliases.h"
#include "../../common/platform/platform.h"

#ifdef WAPP_PLATFORM_CPP
BEGIN_C_LINKAGE
#endif // !WAPP_PLATFORM_CPP

typedef struct xor_256_state XOR256State;
struct xor_256_state {
  u64 x;
  u64 y;
  u64 z;
  u64 w;
};

XOR256State wapp_prng_xorshift_init_state(void);
u64 wapp_prng_xorshift_256(XOR256State *state);
u64 wapp_prng_xorshift_256ss(XOR256State *state);
u64 wapp_prng_xorshift_256p(XOR256State *state);

#ifdef WAPP_PLATFORM_CPP
END_C_LINKAGE
#endif // !WAPP_PLATFORM_CPP

#endif // !XORSHIFT_H
