crypto/serpent-avx-x86_64-asm_64.S [370:553]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#define K2(x0, x1, x2, x3, x4, i) \
	get_key(i, 0, RK0); \
	get_key(i, 1, RK1); \
	get_key(i, 2, RK2); \
	get_key(i, 3, RK3); \
	vpxor RK0,	x0 ## 1, x0 ## 1; \
	vpxor RK1,	x1 ## 1, x1 ## 1; \
	vpxor RK2,	x2 ## 1, x2 ## 1; \
	vpxor RK3,	x3 ## 1, x3 ## 1; \
		vpxor RK0,	x0 ## 2, x0 ## 2; \
		vpxor RK1,	x1 ## 2, x1 ## 2; \
		vpxor RK2,	x2 ## 2, x2 ## 2; \
		vpxor RK3,	x3 ## 2, x3 ## 2;

#define LK2(x0, x1, x2, x3, x4, i) \
	vpslld $13,		x0 ## 1, x4 ## 1;          \
	vpsrld $(32 - 13),	x0 ## 1, x0 ## 1;          \
	vpor			x4 ## 1, x0 ## 1, x0 ## 1; \
	vpxor			x0 ## 1, x1 ## 1, x1 ## 1; \
	vpslld $3,		x2 ## 1, x4 ## 1;          \
	vpsrld $(32 - 3),	x2 ## 1, x2 ## 1;          \
	vpor			x4 ## 1, x2 ## 1, x2 ## 1; \
	vpxor			x2 ## 1, x1 ## 1, x1 ## 1; \
		vpslld $13,		x0 ## 2, x4 ## 2;          \
		vpsrld $(32 - 13),	x0 ## 2, x0 ## 2;          \
		vpor			x4 ## 2, x0 ## 2, x0 ## 2; \
		vpxor			x0 ## 2, x1 ## 2, x1 ## 2; \
		vpslld $3,		x2 ## 2, x4 ## 2;          \
		vpsrld $(32 - 3),	x2 ## 2, x2 ## 2;          \
		vpor			x4 ## 2, x2 ## 2, x2 ## 2; \
		vpxor			x2 ## 2, x1 ## 2, x1 ## 2; \
	vpslld $1,		x1 ## 1, x4 ## 1;          \
	vpsrld $(32 - 1),	x1 ## 1, x1 ## 1;          \
	vpor			x4 ## 1, x1 ## 1, x1 ## 1; \
	vpslld $3,		x0 ## 1, x4 ## 1;          \
	vpxor			x2 ## 1, x3 ## 1, x3 ## 1; \
	vpxor			x4 ## 1, x3 ## 1, x3 ## 1; \
	get_key(i, 1, RK1); \
		vpslld $1,		x1 ## 2, x4 ## 2;          \
		vpsrld $(32 - 1),	x1 ## 2, x1 ## 2;          \
		vpor			x4 ## 2, x1 ## 2, x1 ## 2; \
		vpslld $3,		x0 ## 2, x4 ## 2;          \
		vpxor			x2 ## 2, x3 ## 2, x3 ## 2; \
		vpxor			x4 ## 2, x3 ## 2, x3 ## 2; \
		get_key(i, 3, RK3); \
	vpslld $7,		x3 ## 1, x4 ## 1;          \
	vpsrld $(32 - 7),	x3 ## 1, x3 ## 1;          \
	vpor			x4 ## 1, x3 ## 1, x3 ## 1; \
	vpslld $7,		x1 ## 1, x4 ## 1;          \
	vpxor			x1 ## 1, x0 ## 1, x0 ## 1; \
	vpxor			x3 ## 1, x0 ## 1, x0 ## 1; \
	vpxor			x3 ## 1, x2 ## 1, x2 ## 1; \
	vpxor			x4 ## 1, x2 ## 1, x2 ## 1; \
	get_key(i, 0, RK0); \
		vpslld $7,		x3 ## 2, x4 ## 2;          \
		vpsrld $(32 - 7),	x3 ## 2, x3 ## 2;          \
		vpor			x4 ## 2, x3 ## 2, x3 ## 2; \
		vpslld $7,		x1 ## 2, x4 ## 2;          \
		vpxor			x1 ## 2, x0 ## 2, x0 ## 2; \
		vpxor			x3 ## 2, x0 ## 2, x0 ## 2; \
		vpxor			x3 ## 2, x2 ## 2, x2 ## 2; \
		vpxor			x4 ## 2, x2 ## 2, x2 ## 2; \
		get_key(i, 2, RK2); \
	vpxor			RK1, x1 ## 1, x1 ## 1;     \
	vpxor			RK3, x3 ## 1, x3 ## 1;     \
	vpslld $5,		x0 ## 1, x4 ## 1;          \
	vpsrld $(32 - 5),	x0 ## 1, x0 ## 1;          \
	vpor			x4 ## 1, x0 ## 1, x0 ## 1; \
	vpslld $22,		x2 ## 1, x4 ## 1;          \
	vpsrld $(32 - 22),	x2 ## 1, x2 ## 1;          \
	vpor			x4 ## 1, x2 ## 1, x2 ## 1; \
	vpxor			RK0, x0 ## 1, x0 ## 1;     \
	vpxor			RK2, x2 ## 1, x2 ## 1;     \
		vpxor			RK1, x1 ## 2, x1 ## 2;     \
		vpxor			RK3, x3 ## 2, x3 ## 2;     \
		vpslld $5,		x0 ## 2, x4 ## 2;          \
		vpsrld $(32 - 5),	x0 ## 2, x0 ## 2;          \
		vpor			x4 ## 2, x0 ## 2, x0 ## 2; \
		vpslld $22,		x2 ## 2, x4 ## 2;          \
		vpsrld $(32 - 22),	x2 ## 2, x2 ## 2;          \
		vpor			x4 ## 2, x2 ## 2, x2 ## 2; \
		vpxor			RK0, x0 ## 2, x0 ## 2;     \
		vpxor			RK2, x2 ## 2, x2 ## 2;

#define KL2(x0, x1, x2, x3, x4, i) \
	vpxor			RK0, x0 ## 1, x0 ## 1;     \
	vpxor			RK2, x2 ## 1, x2 ## 1;     \
	vpsrld $5,		x0 ## 1, x4 ## 1;          \
	vpslld $(32 - 5),	x0 ## 1, x0 ## 1;          \
	vpor			x4 ## 1, x0 ## 1, x0 ## 1; \
	vpxor			RK3, x3 ## 1, x3 ## 1;     \
	vpxor			RK1, x1 ## 1, x1 ## 1;     \
	vpsrld $22,		x2 ## 1, x4 ## 1;          \
	vpslld $(32 - 22),	x2 ## 1, x2 ## 1;          \
	vpor			x4 ## 1, x2 ## 1, x2 ## 1; \
	vpxor			x3 ## 1, x2 ## 1, x2 ## 1; \
		vpxor			RK0, x0 ## 2, x0 ## 2;     \
		vpxor			RK2, x2 ## 2, x2 ## 2;     \
		vpsrld $5,		x0 ## 2, x4 ## 2;          \
		vpslld $(32 - 5),	x0 ## 2, x0 ## 2;          \
		vpor			x4 ## 2, x0 ## 2, x0 ## 2; \
		vpxor			RK3, x3 ## 2, x3 ## 2;     \
		vpxor			RK1, x1 ## 2, x1 ## 2;     \
		vpsrld $22,		x2 ## 2, x4 ## 2;          \
		vpslld $(32 - 22),	x2 ## 2, x2 ## 2;          \
		vpor			x4 ## 2, x2 ## 2, x2 ## 2; \
		vpxor			x3 ## 2, x2 ## 2, x2 ## 2; \
	vpxor			x3 ## 1, x0 ## 1, x0 ## 1; \
	vpslld $7,		x1 ## 1, x4 ## 1;          \
	vpxor			x1 ## 1, x0 ## 1, x0 ## 1; \
	vpxor			x4 ## 1, x2 ## 1, x2 ## 1; \
	vpsrld $1,		x1 ## 1, x4 ## 1;          \
	vpslld $(32 - 1),	x1 ## 1, x1 ## 1;          \
	vpor			x4 ## 1, x1 ## 1, x1 ## 1; \
		vpxor			x3 ## 2, x0 ## 2, x0 ## 2; \
		vpslld $7,		x1 ## 2, x4 ## 2;          \
		vpxor			x1 ## 2, x0 ## 2, x0 ## 2; \
		vpxor			x4 ## 2, x2 ## 2, x2 ## 2; \
		vpsrld $1,		x1 ## 2, x4 ## 2;          \
		vpslld $(32 - 1),	x1 ## 2, x1 ## 2;          \
		vpor			x4 ## 2, x1 ## 2, x1 ## 2; \
	vpsrld $7,		x3 ## 1, x4 ## 1;          \
	vpslld $(32 - 7),	x3 ## 1, x3 ## 1;          \
	vpor			x4 ## 1, x3 ## 1, x3 ## 1; \
	vpxor			x0 ## 1, x1 ## 1, x1 ## 1; \
	vpslld $3,		x0 ## 1, x4 ## 1;          \
	vpxor			x4 ## 1, x3 ## 1, x3 ## 1; \
		vpsrld $7,		x3 ## 2, x4 ## 2;          \
		vpslld $(32 - 7),	x3 ## 2, x3 ## 2;          \
		vpor			x4 ## 2, x3 ## 2, x3 ## 2; \
		vpxor			x0 ## 2, x1 ## 2, x1 ## 2; \
		vpslld $3,		x0 ## 2, x4 ## 2;          \
		vpxor			x4 ## 2, x3 ## 2, x3 ## 2; \
	vpsrld $13,		x0 ## 1, x4 ## 1;          \
	vpslld $(32 - 13),	x0 ## 1, x0 ## 1;          \
	vpor			x4 ## 1, x0 ## 1, x0 ## 1; \
	vpxor			x2 ## 1, x1 ## 1, x1 ## 1; \
	vpxor			x2 ## 1, x3 ## 1, x3 ## 1; \
	vpsrld $3,		x2 ## 1, x4 ## 1;          \
	vpslld $(32 - 3),	x2 ## 1, x2 ## 1;          \
	vpor			x4 ## 1, x2 ## 1, x2 ## 1; \
		vpsrld $13,		x0 ## 2, x4 ## 2;          \
		vpslld $(32 - 13),	x0 ## 2, x0 ## 2;          \
		vpor			x4 ## 2, x0 ## 2, x0 ## 2; \
		vpxor			x2 ## 2, x1 ## 2, x1 ## 2; \
		vpxor			x2 ## 2, x3 ## 2, x3 ## 2; \
		vpsrld $3,		x2 ## 2, x4 ## 2;          \
		vpslld $(32 - 3),	x2 ## 2, x2 ## 2;          \
		vpor			x4 ## 2, x2 ## 2, x2 ## 2;

#define S(SBOX, x0, x1, x2, x3, x4) \
	SBOX ## _1(x0 ## 1, x1 ## 1, x2 ## 1, x3 ## 1, x4 ## 1); \
	SBOX ## _2(x0 ## 1, x1 ## 1, x2 ## 1, x3 ## 1, x4 ## 1); \
	SBOX ## _1(x0 ## 2, x1 ## 2, x2 ## 2, x3 ## 2, x4 ## 2); \
	SBOX ## _2(x0 ## 2, x1 ## 2, x2 ## 2, x3 ## 2, x4 ## 2);

#define SP(SBOX, x0, x1, x2, x3, x4, i) \
	get_key(i, 0, RK0); \
	SBOX ## _1(x0 ## 1, x1 ## 1, x2 ## 1, x3 ## 1, x4 ## 1); \
	get_key(i, 2, RK2); \
	SBOX ## _2(x0 ## 1, x1 ## 1, x2 ## 1, x3 ## 1, x4 ## 1); \
	get_key(i, 3, RK3); \
	SBOX ## _1(x0 ## 2, x1 ## 2, x2 ## 2, x3 ## 2, x4 ## 2); \
	get_key(i, 1, RK1); \
	SBOX ## _2(x0 ## 2, x1 ## 2, x2 ## 2, x3 ## 2, x4 ## 2); \

#define transpose_4x4(x0, x1, x2, x3, t0, t1, t2) \
	vpunpckldq		x1, x0, t0; \
	vpunpckhdq		x1, x0, t2; \
	vpunpckldq		x3, x2, t1; \
	vpunpckhdq		x3, x2, x3; \
	\
	vpunpcklqdq		t1, t0, x0; \
	vpunpckhqdq		t1, t0, x1; \
	vpunpcklqdq		x3, t2, x2; \
	vpunpckhqdq		x3, t2, x3;

#define read_blocks(x0, x1, x2, x3, t0, t1, t2) \
	transpose_4x4(x0, x1, x2, x3, t0, t1, t2)

#define write_blocks(x0, x1, x2, x3, t0, t1, t2) \
	transpose_4x4(x0, x1, x2, x3, t0, t1, t2)

.align 8
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



crypto/serpent-avx2-asm_64.S [370:553]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#define K2(x0, x1, x2, x3, x4, i) \
	get_key(i, 0, RK0); \
	get_key(i, 1, RK1); \
	get_key(i, 2, RK2); \
	get_key(i, 3, RK3); \
	vpxor RK0,	x0 ## 1, x0 ## 1; \
	vpxor RK1,	x1 ## 1, x1 ## 1; \
	vpxor RK2,	x2 ## 1, x2 ## 1; \
	vpxor RK3,	x3 ## 1, x3 ## 1; \
		vpxor RK0,	x0 ## 2, x0 ## 2; \
		vpxor RK1,	x1 ## 2, x1 ## 2; \
		vpxor RK2,	x2 ## 2, x2 ## 2; \
		vpxor RK3,	x3 ## 2, x3 ## 2;

#define LK2(x0, x1, x2, x3, x4, i) \
	vpslld $13,		x0 ## 1, x4 ## 1;          \
	vpsrld $(32 - 13),	x0 ## 1, x0 ## 1;          \
	vpor			x4 ## 1, x0 ## 1, x0 ## 1; \
	vpxor			x0 ## 1, x1 ## 1, x1 ## 1; \
	vpslld $3,		x2 ## 1, x4 ## 1;          \
	vpsrld $(32 - 3),	x2 ## 1, x2 ## 1;          \
	vpor			x4 ## 1, x2 ## 1, x2 ## 1; \
	vpxor			x2 ## 1, x1 ## 1, x1 ## 1; \
		vpslld $13,		x0 ## 2, x4 ## 2;          \
		vpsrld $(32 - 13),	x0 ## 2, x0 ## 2;          \
		vpor			x4 ## 2, x0 ## 2, x0 ## 2; \
		vpxor			x0 ## 2, x1 ## 2, x1 ## 2; \
		vpslld $3,		x2 ## 2, x4 ## 2;          \
		vpsrld $(32 - 3),	x2 ## 2, x2 ## 2;          \
		vpor			x4 ## 2, x2 ## 2, x2 ## 2; \
		vpxor			x2 ## 2, x1 ## 2, x1 ## 2; \
	vpslld $1,		x1 ## 1, x4 ## 1;          \
	vpsrld $(32 - 1),	x1 ## 1, x1 ## 1;          \
	vpor			x4 ## 1, x1 ## 1, x1 ## 1; \
	vpslld $3,		x0 ## 1, x4 ## 1;          \
	vpxor			x2 ## 1, x3 ## 1, x3 ## 1; \
	vpxor			x4 ## 1, x3 ## 1, x3 ## 1; \
	get_key(i, 1, RK1); \
		vpslld $1,		x1 ## 2, x4 ## 2;          \
		vpsrld $(32 - 1),	x1 ## 2, x1 ## 2;          \
		vpor			x4 ## 2, x1 ## 2, x1 ## 2; \
		vpslld $3,		x0 ## 2, x4 ## 2;          \
		vpxor			x2 ## 2, x3 ## 2, x3 ## 2; \
		vpxor			x4 ## 2, x3 ## 2, x3 ## 2; \
		get_key(i, 3, RK3); \
	vpslld $7,		x3 ## 1, x4 ## 1;          \
	vpsrld $(32 - 7),	x3 ## 1, x3 ## 1;          \
	vpor			x4 ## 1, x3 ## 1, x3 ## 1; \
	vpslld $7,		x1 ## 1, x4 ## 1;          \
	vpxor			x1 ## 1, x0 ## 1, x0 ## 1; \
	vpxor			x3 ## 1, x0 ## 1, x0 ## 1; \
	vpxor			x3 ## 1, x2 ## 1, x2 ## 1; \
	vpxor			x4 ## 1, x2 ## 1, x2 ## 1; \
	get_key(i, 0, RK0); \
		vpslld $7,		x3 ## 2, x4 ## 2;          \
		vpsrld $(32 - 7),	x3 ## 2, x3 ## 2;          \
		vpor			x4 ## 2, x3 ## 2, x3 ## 2; \
		vpslld $7,		x1 ## 2, x4 ## 2;          \
		vpxor			x1 ## 2, x0 ## 2, x0 ## 2; \
		vpxor			x3 ## 2, x0 ## 2, x0 ## 2; \
		vpxor			x3 ## 2, x2 ## 2, x2 ## 2; \
		vpxor			x4 ## 2, x2 ## 2, x2 ## 2; \
		get_key(i, 2, RK2); \
	vpxor			RK1, x1 ## 1, x1 ## 1;     \
	vpxor			RK3, x3 ## 1, x3 ## 1;     \
	vpslld $5,		x0 ## 1, x4 ## 1;          \
	vpsrld $(32 - 5),	x0 ## 1, x0 ## 1;          \
	vpor			x4 ## 1, x0 ## 1, x0 ## 1; \
	vpslld $22,		x2 ## 1, x4 ## 1;          \
	vpsrld $(32 - 22),	x2 ## 1, x2 ## 1;          \
	vpor			x4 ## 1, x2 ## 1, x2 ## 1; \
	vpxor			RK0, x0 ## 1, x0 ## 1;     \
	vpxor			RK2, x2 ## 1, x2 ## 1;     \
		vpxor			RK1, x1 ## 2, x1 ## 2;     \
		vpxor			RK3, x3 ## 2, x3 ## 2;     \
		vpslld $5,		x0 ## 2, x4 ## 2;          \
		vpsrld $(32 - 5),	x0 ## 2, x0 ## 2;          \
		vpor			x4 ## 2, x0 ## 2, x0 ## 2; \
		vpslld $22,		x2 ## 2, x4 ## 2;          \
		vpsrld $(32 - 22),	x2 ## 2, x2 ## 2;          \
		vpor			x4 ## 2, x2 ## 2, x2 ## 2; \
		vpxor			RK0, x0 ## 2, x0 ## 2;     \
		vpxor			RK2, x2 ## 2, x2 ## 2;

#define KL2(x0, x1, x2, x3, x4, i) \
	vpxor			RK0, x0 ## 1, x0 ## 1;     \
	vpxor			RK2, x2 ## 1, x2 ## 1;     \
	vpsrld $5,		x0 ## 1, x4 ## 1;          \
	vpslld $(32 - 5),	x0 ## 1, x0 ## 1;          \
	vpor			x4 ## 1, x0 ## 1, x0 ## 1; \
	vpxor			RK3, x3 ## 1, x3 ## 1;     \
	vpxor			RK1, x1 ## 1, x1 ## 1;     \
	vpsrld $22,		x2 ## 1, x4 ## 1;          \
	vpslld $(32 - 22),	x2 ## 1, x2 ## 1;          \
	vpor			x4 ## 1, x2 ## 1, x2 ## 1; \
	vpxor			x3 ## 1, x2 ## 1, x2 ## 1; \
		vpxor			RK0, x0 ## 2, x0 ## 2;     \
		vpxor			RK2, x2 ## 2, x2 ## 2;     \
		vpsrld $5,		x0 ## 2, x4 ## 2;          \
		vpslld $(32 - 5),	x0 ## 2, x0 ## 2;          \
		vpor			x4 ## 2, x0 ## 2, x0 ## 2; \
		vpxor			RK3, x3 ## 2, x3 ## 2;     \
		vpxor			RK1, x1 ## 2, x1 ## 2;     \
		vpsrld $22,		x2 ## 2, x4 ## 2;          \
		vpslld $(32 - 22),	x2 ## 2, x2 ## 2;          \
		vpor			x4 ## 2, x2 ## 2, x2 ## 2; \
		vpxor			x3 ## 2, x2 ## 2, x2 ## 2; \
	vpxor			x3 ## 1, x0 ## 1, x0 ## 1; \
	vpslld $7,		x1 ## 1, x4 ## 1;          \
	vpxor			x1 ## 1, x0 ## 1, x0 ## 1; \
	vpxor			x4 ## 1, x2 ## 1, x2 ## 1; \
	vpsrld $1,		x1 ## 1, x4 ## 1;          \
	vpslld $(32 - 1),	x1 ## 1, x1 ## 1;          \
	vpor			x4 ## 1, x1 ## 1, x1 ## 1; \
		vpxor			x3 ## 2, x0 ## 2, x0 ## 2; \
		vpslld $7,		x1 ## 2, x4 ## 2;          \
		vpxor			x1 ## 2, x0 ## 2, x0 ## 2; \
		vpxor			x4 ## 2, x2 ## 2, x2 ## 2; \
		vpsrld $1,		x1 ## 2, x4 ## 2;          \
		vpslld $(32 - 1),	x1 ## 2, x1 ## 2;          \
		vpor			x4 ## 2, x1 ## 2, x1 ## 2; \
	vpsrld $7,		x3 ## 1, x4 ## 1;          \
	vpslld $(32 - 7),	x3 ## 1, x3 ## 1;          \
	vpor			x4 ## 1, x3 ## 1, x3 ## 1; \
	vpxor			x0 ## 1, x1 ## 1, x1 ## 1; \
	vpslld $3,		x0 ## 1, x4 ## 1;          \
	vpxor			x4 ## 1, x3 ## 1, x3 ## 1; \
		vpsrld $7,		x3 ## 2, x4 ## 2;          \
		vpslld $(32 - 7),	x3 ## 2, x3 ## 2;          \
		vpor			x4 ## 2, x3 ## 2, x3 ## 2; \
		vpxor			x0 ## 2, x1 ## 2, x1 ## 2; \
		vpslld $3,		x0 ## 2, x4 ## 2;          \
		vpxor			x4 ## 2, x3 ## 2, x3 ## 2; \
	vpsrld $13,		x0 ## 1, x4 ## 1;          \
	vpslld $(32 - 13),	x0 ## 1, x0 ## 1;          \
	vpor			x4 ## 1, x0 ## 1, x0 ## 1; \
	vpxor			x2 ## 1, x1 ## 1, x1 ## 1; \
	vpxor			x2 ## 1, x3 ## 1, x3 ## 1; \
	vpsrld $3,		x2 ## 1, x4 ## 1;          \
	vpslld $(32 - 3),	x2 ## 1, x2 ## 1;          \
	vpor			x4 ## 1, x2 ## 1, x2 ## 1; \
		vpsrld $13,		x0 ## 2, x4 ## 2;          \
		vpslld $(32 - 13),	x0 ## 2, x0 ## 2;          \
		vpor			x4 ## 2, x0 ## 2, x0 ## 2; \
		vpxor			x2 ## 2, x1 ## 2, x1 ## 2; \
		vpxor			x2 ## 2, x3 ## 2, x3 ## 2; \
		vpsrld $3,		x2 ## 2, x4 ## 2;          \
		vpslld $(32 - 3),	x2 ## 2, x2 ## 2;          \
		vpor			x4 ## 2, x2 ## 2, x2 ## 2;

#define S(SBOX, x0, x1, x2, x3, x4) \
	SBOX ## _1(x0 ## 1, x1 ## 1, x2 ## 1, x3 ## 1, x4 ## 1); \
	SBOX ## _2(x0 ## 1, x1 ## 1, x2 ## 1, x3 ## 1, x4 ## 1); \
	SBOX ## _1(x0 ## 2, x1 ## 2, x2 ## 2, x3 ## 2, x4 ## 2); \
	SBOX ## _2(x0 ## 2, x1 ## 2, x2 ## 2, x3 ## 2, x4 ## 2);

#define SP(SBOX, x0, x1, x2, x3, x4, i) \
	get_key(i, 0, RK0); \
	SBOX ## _1(x0 ## 1, x1 ## 1, x2 ## 1, x3 ## 1, x4 ## 1); \
	get_key(i, 2, RK2); \
	SBOX ## _2(x0 ## 1, x1 ## 1, x2 ## 1, x3 ## 1, x4 ## 1); \
	get_key(i, 3, RK3); \
	SBOX ## _1(x0 ## 2, x1 ## 2, x2 ## 2, x3 ## 2, x4 ## 2); \
	get_key(i, 1, RK1); \
	SBOX ## _2(x0 ## 2, x1 ## 2, x2 ## 2, x3 ## 2, x4 ## 2); \

#define transpose_4x4(x0, x1, x2, x3, t0, t1, t2) \
	vpunpckldq		x1, x0, t0; \
	vpunpckhdq		x1, x0, t2; \
	vpunpckldq		x3, x2, t1; \
	vpunpckhdq		x3, x2, x3; \
	\
	vpunpcklqdq		t1, t0, x0; \
	vpunpckhqdq		t1, t0, x1; \
	vpunpcklqdq		x3, t2, x2; \
	vpunpckhqdq		x3, t2, x3;

#define read_blocks(x0, x1, x2, x3, t0, t1, t2) \
	transpose_4x4(x0, x1, x2, x3, t0, t1, t2)

#define write_blocks(x0, x1, x2, x3, t0, t1, t2) \
	transpose_4x4(x0, x1, x2, x3, t0, t1, t2)

.align 8
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



