#define AES4_zero(s, rci)\
s = aes2(aes2(s,rc0[rci]),rc0[rci+1])
-#define AES4_4x(s0, s1, s2, s3, rci) \
+#define AES4_4x(s, rci) \
AES4(s[0], rci); \
AES4(s[1], rci); \
AES4(s[2], rci); \
s0 = tmp;
-#define MIX4(s) s = _mm512_permutexvar_epi32 (MIX_4, s);
-#define TRUNCSTORE(out, s0, s1, s2, s3) \
+#define MIX4(s) \
+ s = _mm512_permutexvar_epi32 (MIX_4, s);
+
+#define TRUNCSTORE(out, s) \
*(u64*)(out) = *(((u64*)&s + 1)); \
*(u64*)(out + 8) = *(((u64*)&s + 3)); \
*(u64*)(out + 16) = *(((u64*)&s + 4)); \
*(u64*)(out + 24) = *(((u64*)&s + 6));
void load_constants();
-void test_implementations();
+int test_implementations();
/*
void haraka256(unsigned char *out, const unsigned char *in);
void haraka512(unsigned char *out, const unsigned char *in);
void haraka512_zero(unsigned char *out, const unsigned char *in);
//void haraka512_keyed(unsigned char *out, const unsigned char *in, const u128 *rc);
-//void haraka512_4x(unsigned char *out, const unsigned char *in);
-//void haraka512_8x(unsigned char *out, const unsigned char *in);
+void haraka512_4x(unsigned char *out, const unsigned char *in);
+void haraka512_8x(unsigned char *out, const unsigned char *in);
#endif