//currently not needed
//template<typename T> struct alignment_trick { char c; T member; };
//#define ALIGNOF(type) offsetof (alignment_trick<type>, member)
#ifdef _WIN32
#include <windows.h>
#define sleep_ms(x) Sleep(x)
#endif
#ifdef _MSC_VER
#define ALIGNOF(x) __alignof(x)
#define strtok_r(x, y, z) strtok_s(x, y, z)
#define strtof(x, y) (float)strtod(x, y)
#define strtoll(x, y, z) _strtoi64(x, y, z)
#define strtoull(x, y, z) _strtoui64(x, y, z)
#else
#include <unistd.h>
#include <stdint.h> //for uintptr_t
#define ALIGNOF(x) __alignof__(x)
#define sleep_ms(x) usleep(x*1000)
#endif
#ifdef __MINGW32__
#define strtok_r(s,d,p) strtok(s,d)
#endif
#define PADDING(x, y) ((ALIGNOF(y) - ((uintptr_t)(x) & (ALIGNOF(y) - 1))) & (ALIGNOF(y) - 1))
Ci8vY3VycmVudGx5IG5vdCBuZWVkZWQKLy90ZW1wbGF0ZTx0eXBlbmFtZSBUPiBzdHJ1Y3QgYWxpZ25tZW50X3RyaWNrIHsgY2hhciBjOyBUIG1lbWJlcjsgfTsKLy8jZGVmaW5lIEFMSUdOT0YodHlwZSkgb2Zmc2V0b2YgKGFsaWdubWVudF90cmljazx0eXBlPiwgbWVtYmVyKQoKI2lmZGVmIF9XSU4zMgogICAgI2luY2x1ZGUgPHdpbmRvd3MuaD4KCSNkZWZpbmUgc2xlZXBfbXMoeCkgU2xlZXAoeCkKI2VuZGlmCgojaWZkZWYgX01TQ19WRVIKCSNkZWZpbmUgQUxJR05PRih4KSBfX2FsaWdub2YoeCkKCSNkZWZpbmUgc3RydG9rX3IoeCwgeSwgeikgc3RydG9rX3MoeCwgeSwgeikKCSNkZWZpbmUgc3RydG9mKHgsIHkpIChmbG9hdClzdHJ0b2QoeCwgeSkKCSNkZWZpbmUgc3RydG9sbCh4LCB5LCB6KSBfc3RydG9pNjQoeCwgeSwgeikKCSNkZWZpbmUgc3RydG91bGwoeCwgeSwgeikgX3N0cnRvdWk2NCh4LCB5LCB6KQojZ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