Ternary functions

0x00 — 0

f(A, B, C) = 0

const __m128i c0 = _mm_setzero_si128();
return c0;

0x01 — (A nor (B or C))

f(A, B, C) = ((A or (B or C)) xor 1)

const __m128i t0 = _mm_or_si128(B, C);
const __m128i t1 = _mm_or_si128(A, t0);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t2 = _mm_xor_si128(t1, c1);
return t2;

0x02 — (C and (B nor A))

f(A, B, C) = ((B or A) notand C)

const __m128i t0 = _mm_or_si128(B, A);
const __m128i t1 = _mm_andnot_si128(t0, C);
return t1;

0x03 — (B nor A)

f(A, B, C) = ((B or A) xor 1)

const __m128i t0 = _mm_or_si128(B, A);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(t0, c1);
return t1;

0x04 — (B and (A nor C))

f(A, B, C) = ((A or C) notand B)

const __m128i t0 = _mm_or_si128(A, C);
const __m128i t1 = _mm_andnot_si128(t0, B);
return t1;

0x05 — (C nor A)

f(A, B, C) = ((C or A) xor 1)

const __m128i t0 = _mm_or_si128(C, A);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(t0, c1);
return t1;

0x06 — (A ? 0 : (B xor C))

f(A, B, C) = (A notand (B xor C))

const __m128i t0 = _mm_xor_si128(B, C);
const __m128i t1 = _mm_andnot_si128(A, t0);
return t1;

0x07 — (A nor (B and C))

f(A, B, C) = ((A or (B and C)) xor 1)

const __m128i t0 = _mm_and_si128(B, C);
const __m128i t1 = _mm_or_si128(A, t0);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t2 = _mm_xor_si128(t1, c1);
return t2;

0x08 — (B ? (not (A) and C) : B)

f(A, B, C) = (A notand (B and C))

const __m128i t0 = _mm_and_si128(B, C);
const __m128i t1 = _mm_andnot_si128(A, t0);
return t1;

0x09 — (A nor (B xor C))

f(A, B, C) = ((A or (B xor C)) xor 1)

const __m128i t0 = _mm_xor_si128(B, C);
const __m128i t1 = _mm_or_si128(A, t0);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t2 = _mm_xor_si128(t1, c1);
return t2;

0x0a — (C and not (A))

f(A, B, C) = (A notand C)

const __m128i t0 = _mm_andnot_si128(A, C);
return t0;

0x0b — (B ? (not (A) and C) : (A xor 1))

f(A, B, C) = (A notand ((B xor 1) or C))

const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t0 = _mm_xor_si128(B, c1);
const __m128i t1 = _mm_or_si128(t0, C);
const __m128i t2 = _mm_andnot_si128(A, t1);
return t2;

0x0c — (B and not (A))

f(A, B, C) = (A notand B)

const __m128i t0 = _mm_andnot_si128(A, B);
return t0;

0x0d — (C ? (not (A) and B) : (A xor 1))

f(A, B, C) = (A notand (B or (C xor 1)))

const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t0 = _mm_xor_si128(C, c1);
const __m128i t1 = _mm_or_si128(B, t0);
const __m128i t2 = _mm_andnot_si128(A, t1);
return t2;

0x0e — (A ? 0 : (B or C))

f(A, B, C) = (A notand (B or C))

const __m128i t0 = _mm_or_si128(B, C);
const __m128i t1 = _mm_andnot_si128(A, t0);
return t1;

0x0f — not (A)

f(A, B, C) = (A xor 1)

const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t0 = _mm_xor_si128(A, c1);
return t0;

0x10 — (A and (B nor C))

f(A, B, C) = ((B or C) notand A)

const __m128i t0 = _mm_or_si128(B, C);
const __m128i t1 = _mm_andnot_si128(t0, A);
return t1;

0x11 — (C nor B)

f(A, B, C) = ((C or B) xor 1)

const __m128i t0 = _mm_or_si128(C, B);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(t0, c1);
return t1;

0x12 — (B ? 0 : (A xor C))

f(A, B, C) = (B notand (A xor C))

const __m128i t0 = _mm_xor_si128(A, C);
const __m128i t1 = _mm_andnot_si128(B, t0);
return t1;

0x13 — (B nor (A and C))

f(A, B, C) = ((B or (A and C)) xor 1)

const __m128i t0 = _mm_and_si128(A, C);
const __m128i t1 = _mm_or_si128(B, t0);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t2 = _mm_xor_si128(t1, c1);
return t2;

0x14 — (C ? 0 : (A xor B))

f(A, B, C) = (C notand (A xor B))

const __m128i t0 = _mm_xor_si128(A, B);
const __m128i t1 = _mm_andnot_si128(C, t0);
return t1;

0x15 — (C nor (B and A))

f(A, B, C) = ((C or (B and A)) xor 1)

const __m128i t0 = _mm_and_si128(B, A);
const __m128i t1 = _mm_or_si128(C, t0);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t2 = _mm_xor_si128(t1, c1);
return t2;

0x16 — (A ? (not (C) and (A xor B)) : (B xor C))

f(A, B, C) = (((B or C) notand A) or (A notand (B xor C)))

const __m128i t0 = _mm_or_si128(B, C);
const __m128i t1 = _mm_andnot_si128(t0, A);
const __m128i t2 = _mm_xor_si128(B, C);
const __m128i t3 = _mm_andnot_si128(A, t2);
const __m128i t4 = _mm_or_si128(t1, t3);
return t4;

0x17 — ((B nor C) or (not (A) and (B xor C)))

f(A, B, C) = (((B or C) xor 1) or (A notand (B xor C)))

const __m128i t0 = _mm_or_si128(B, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(t0, c1);
const __m128i t2 = _mm_xor_si128(B, C);
const __m128i t3 = _mm_andnot_si128(A, t2);
const __m128i t4 = _mm_or_si128(t1, t3);
return t4;

0x18 — (B ? (not (A) and C) : (not (C) and A))

f(A, B, C) = ((A xor B) and (A xor C))

const __m128i t0 = _mm_xor_si128(A, B);
const __m128i t1 = _mm_xor_si128(A, C);
const __m128i t2 = _mm_and_si128(t0, t1);
return t2;

0x19 — (B ? (not (A) and C) : (C xor 1))

f(A, B, C) = ((A and B) notand (B xor (C xor 1)))

const __m128i t0 = _mm_and_si128(A, B);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(C, c1);
const __m128i t2 = _mm_xor_si128(B, t1);
const __m128i t3 = _mm_andnot_si128(t0, t2);
return t3;

0x1a — (A ? (not (C) and (A xor B)) : C)

f(A, B, C) = ((A and B) notand (A xor C))

const __m128i t0 = _mm_and_si128(A, B);
const __m128i t1 = _mm_xor_si128(A, C);
const __m128i t2 = _mm_andnot_si128(t0, t1);
return t2;

0x1b — (C ? not (A) : not (B))

f(A, B, C) = ((A notand C) or (C notand (B xor 1)))

const __m128i t0 = _mm_andnot_si128(A, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(B, c1);
const __m128i t2 = _mm_andnot_si128(C, t1);
const __m128i t3 = _mm_or_si128(t0, t2);
return t3;

0x1c — (A ? (not (C) and (A xor B)) : B)

f(A, B, C) = ((A and C) notand (A xor B))

const __m128i t0 = _mm_and_si128(A, C);
const __m128i t1 = _mm_xor_si128(A, B);
const __m128i t2 = _mm_andnot_si128(t0, t1);
return t2;

0x1d — (B ? not (A) : not (C))

f(A, B, C) = ((A notand B) or (B notand (C xor 1)))

const __m128i t0 = _mm_andnot_si128(A, B);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(C, c1);
const __m128i t2 = _mm_andnot_si128(B, t1);
const __m128i t3 = _mm_or_si128(t0, t2);
return t3;

0x1e — (A xor (B or C))

f(A, B, C) = (A xor (B or C))

const __m128i t0 = _mm_or_si128(B, C);
const __m128i t1 = _mm_xor_si128(A, t0);
return t1;

0x1f — (A nand (B or C))

f(A, B, C) = ((A and (B or C)) xor 1)

const __m128i t0 = _mm_or_si128(B, C);
const __m128i t1 = _mm_and_si128(A, t0);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t2 = _mm_xor_si128(t1, c1);
return t2;

0x20 — (A ? (not (B) and C) : A)

f(A, B, C) = (A and (B notand C))

const __m128i t0 = _mm_andnot_si128(B, C);
const __m128i t1 = _mm_and_si128(A, t0);
return t1;

0x21 — (B nor (A xor C))

f(A, B, C) = ((B or (A xor C)) xor 1)

const __m128i t0 = _mm_xor_si128(A, C);
const __m128i t1 = _mm_or_si128(B, t0);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t2 = _mm_xor_si128(t1, c1);
return t2;

0x22 — (C and not (B))

f(A, B, C) = (B notand C)

const __m128i t0 = _mm_andnot_si128(B, C);
return t0;

0x23 — (A ? (not (B) and C) : (B xor 1))

f(A, B, C) = (B notand ((A xor 1) or C))

const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t0 = _mm_xor_si128(A, c1);
const __m128i t1 = _mm_or_si128(t0, C);
const __m128i t2 = _mm_andnot_si128(B, t1);
return t2;

0x24 — (A ? (not (B) and C) : (not (C) and B))

f(A, B, C) = ((B xor C) and (A xor B))

const __m128i t0 = _mm_xor_si128(B, C);
const __m128i t1 = _mm_xor_si128(A, B);
const __m128i t2 = _mm_and_si128(t0, t1);
return t2;

0x25 — (A ? (not (B) and C) : (C xor 1))

f(A, B, C) = ((A and B) notand (A xor (C xor 1)))

const __m128i t0 = _mm_and_si128(A, B);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(C, c1);
const __m128i t2 = _mm_xor_si128(A, t1);
const __m128i t3 = _mm_andnot_si128(t0, t2);
return t3;

0x26 — (A ? (not (B) and C) : (B xor C))

f(A, B, C) = ((A and B) notand (B xor C))

const __m128i t0 = _mm_and_si128(A, B);
const __m128i t1 = _mm_xor_si128(B, C);
const __m128i t2 = _mm_andnot_si128(t0, t1);
return t2;

0x27 — (C ? not (B) : not (A))

f(A, B, C) = ((B notand C) or (C notand (A xor 1)))

const __m128i t0 = _mm_andnot_si128(B, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(A, c1);
const __m128i t2 = _mm_andnot_si128(C, t1);
const __m128i t3 = _mm_or_si128(t0, t2);
return t3;

0x28 — (C and (B xor A))

f(A, B, C) = (C and (B xor A))

const __m128i t0 = _mm_xor_si128(B, A);
const __m128i t1 = _mm_and_si128(C, t0);
return t1;

0x29 — (C ? (B xor A) : (B nor A))

f(A, B, C) = ((C and (B xor A)) or (C notand ((B or A) xor 1)))

const __m128i t0 = _mm_xor_si128(B, A);
const __m128i t1 = _mm_and_si128(C, t0);
const __m128i t2 = _mm_or_si128(B, A);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t3 = _mm_xor_si128(t2, c1);
const __m128i t4 = _mm_andnot_si128(C, t3);
const __m128i t5 = _mm_or_si128(t1, t4);
return t5;

0x2a — (C and (B nand A))

f(A, B, C) = ((B and A) notand C)

const __m128i t0 = _mm_and_si128(B, A);
const __m128i t1 = _mm_andnot_si128(t0, C);
return t1;

0x2b — (A ? (not (B) and C) : ((B xor 1) or C))

f(A, B, C) = (((B and A) notand C) or (C notand ((B or A) xor 1)))

const __m128i t0 = _mm_and_si128(B, A);
const __m128i t1 = _mm_andnot_si128(t0, C);
const __m128i t2 = _mm_or_si128(B, A);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t3 = _mm_xor_si128(t2, c1);
const __m128i t4 = _mm_andnot_si128(C, t3);
const __m128i t5 = _mm_or_si128(t1, t4);
return t5;

0x2c — (A ? (not (B) and C) : B)

f(A, B, C) = ((B or C) and (A xor B))

const __m128i t0 = _mm_or_si128(B, C);
const __m128i t1 = _mm_xor_si128(A, B);
const __m128i t2 = _mm_and_si128(t0, t1);
return t2;

0x2d — (C ? (A xor B) : (A xor 1))

f(A, B, C) = (A xor (B or (C xor 1)))

const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t0 = _mm_xor_si128(C, c1);
const __m128i t1 = _mm_or_si128(B, t0);
const __m128i t2 = _mm_xor_si128(A, t1);
return t2;

0x2e — (B ? (not (A) and B) : C)

f(A, B, C) = ((A notand B) or (B notand C))

const __m128i t0 = _mm_andnot_si128(A, B);
const __m128i t1 = _mm_andnot_si128(B, C);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0x2f — (A ? (not (B) and C) : 1)

f(A, B, C) = ((A xor 1) or (B notand C))

const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t0 = _mm_xor_si128(A, c1);
const __m128i t1 = _mm_andnot_si128(B, C);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0x30 — (A and not (B))

f(A, B, C) = (B notand A)

const __m128i t0 = _mm_andnot_si128(B, A);
return t0;

0x31 — (C ? (not (B) and A) : (B xor 1))

f(A, B, C) = (B notand (A or (C xor 1)))

const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t0 = _mm_xor_si128(C, c1);
const __m128i t1 = _mm_or_si128(A, t0);
const __m128i t2 = _mm_andnot_si128(B, t1);
return t2;

0x32 — (A ? (not (B) and A) : (not (B) and C))

f(A, B, C) = (B notand (A or C))

const __m128i t0 = _mm_or_si128(A, C);
const __m128i t1 = _mm_andnot_si128(B, t0);
return t1;

0x33 — not (B)

f(A, B, C) = (B xor 1)

const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t0 = _mm_xor_si128(B, c1);
return t0;

0x34 — (A ? (not (B) and A) : (not (C) and B))

f(A, B, C) = ((B and C) notand (A xor B))

const __m128i t0 = _mm_and_si128(B, C);
const __m128i t1 = _mm_xor_si128(A, B);
const __m128i t2 = _mm_andnot_si128(t0, t1);
return t2;

0x35 — (A ? not (B) : not (C))

f(A, B, C) = ((B notand A) or (A notand (C xor 1)))

const __m128i t0 = _mm_andnot_si128(B, A);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(C, c1);
const __m128i t2 = _mm_andnot_si128(A, t1);
const __m128i t3 = _mm_or_si128(t0, t2);
return t3;

0x36 — (B xor (A or C))

f(A, B, C) = (B xor (A or C))

const __m128i t0 = _mm_or_si128(A, C);
const __m128i t1 = _mm_xor_si128(B, t0);
return t1;

0x37 — (B nand (A or C))

f(A, B, C) = ((B and (A or C)) xor 1)

const __m128i t0 = _mm_or_si128(A, C);
const __m128i t1 = _mm_and_si128(B, t0);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t2 = _mm_xor_si128(t1, c1);
return t2;

0x38 — (B ? (not (A) and C) : A)

f(A, B, C) = ((A or C) and (A xor B))

const __m128i t0 = _mm_or_si128(A, C);
const __m128i t1 = _mm_xor_si128(A, B);
const __m128i t2 = _mm_and_si128(t0, t1);
return t2;

0x39 — (C ? (A xor B) : (B xor 1))

f(A, B, C) = (B xor (A or (C xor 1)))

const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t0 = _mm_xor_si128(C, c1);
const __m128i t1 = _mm_or_si128(A, t0);
const __m128i t2 = _mm_xor_si128(B, t1);
return t2;

0x3a — (A ? (not (B) and A) : C)

f(A, B, C) = ((B notand A) or (A notand C))

const __m128i t0 = _mm_andnot_si128(B, A);
const __m128i t1 = _mm_andnot_si128(A, C);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0x3b — (B ? (not (A) and C) : 1)

f(A, B, C) = ((A notand C) or (B xor 1))

const __m128i t0 = _mm_andnot_si128(A, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(B, c1);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0x3c — (B xor A)

f(A, B, C) = (B xor A)

const __m128i t0 = _mm_xor_si128(B, A);
return t0;

0x3d — ((A xor B) or ((A or C) xor 1))

f(A, B, C) = ((A xor B) or ((A or C) xor 1))

const __m128i t0 = _mm_xor_si128(A, B);
const __m128i t1 = _mm_or_si128(A, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t2 = _mm_xor_si128(t1, c1);
const __m128i t3 = _mm_or_si128(t0, t2);
return t3;

0x3e — (A ? (not (B) and A) : (B or C))

f(A, B, C) = ((A notand C) or (A xor B))

const __m128i t0 = _mm_andnot_si128(A, C);
const __m128i t1 = _mm_xor_si128(A, B);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0x3f — (B nand A)

f(A, B, C) = ((B and A) xor 1)

const __m128i t0 = _mm_and_si128(B, A);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(t0, c1);
return t1;

0x40 — (A ? (not (C) and B) : A)

f(A, B, C) = (C notand (B and A))

const __m128i t0 = _mm_and_si128(B, A);
const __m128i t1 = _mm_andnot_si128(C, t0);
return t1;

0x41 — (C nor (B xor A))

f(A, B, C) = ((C or (B xor A)) xor 1)

const __m128i t0 = _mm_xor_si128(B, A);
const __m128i t1 = _mm_or_si128(C, t0);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t2 = _mm_xor_si128(t1, c1);
return t2;

0x42 — (A ? (not (C) and B) : (not (B) and C))

f(A, B, C) = ((A xor B) notand (B xor C))

const __m128i t0 = _mm_xor_si128(A, B);
const __m128i t1 = _mm_xor_si128(B, C);
const __m128i t2 = _mm_andnot_si128(t0, t1);
return t2;

0x43 — (A ? (not (C) and B) : (B xor 1))

f(A, B, C) = ((A and C) notand (A xor (B xor 1)))

const __m128i t0 = _mm_and_si128(A, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(B, c1);
const __m128i t2 = _mm_xor_si128(A, t1);
const __m128i t3 = _mm_andnot_si128(t0, t2);
return t3;

0x44 — (B and not (C))

f(A, B, C) = (C notand B)

const __m128i t0 = _mm_andnot_si128(C, B);
return t0;

0x45 — (A ? (not (C) and B) : (C xor 1))

f(A, B, C) = (C notand ((A xor 1) or B))

const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t0 = _mm_xor_si128(A, c1);
const __m128i t1 = _mm_or_si128(t0, B);
const __m128i t2 = _mm_andnot_si128(C, t1);
return t2;

0x46 — (A ? (not (C) and B) : (B xor C))

f(A, B, C) = ((A and C) notand (B xor C))

const __m128i t0 = _mm_and_si128(A, C);
const __m128i t1 = _mm_xor_si128(B, C);
const __m128i t2 = _mm_andnot_si128(t0, t1);
return t2;

0x47 — (B ? not (C) : not (A))

f(A, B, C) = ((C notand B) or (B notand (A xor 1)))

const __m128i t0 = _mm_andnot_si128(C, B);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(A, c1);
const __m128i t2 = _mm_andnot_si128(B, t1);
const __m128i t3 = _mm_or_si128(t0, t2);
return t3;

0x48 — (B and (A xor C))

f(A, B, C) = (B and (A xor C))

const __m128i t0 = _mm_xor_si128(A, C);
const __m128i t1 = _mm_and_si128(B, t0);
return t1;

0x49 — (B ? (A xor C) : (A nor C))

f(A, B, C) = ((B and (A xor C)) or (B notand ((A or C) xor 1)))

const __m128i t0 = _mm_xor_si128(A, C);
const __m128i t1 = _mm_and_si128(B, t0);
const __m128i t2 = _mm_or_si128(A, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t3 = _mm_xor_si128(t2, c1);
const __m128i t4 = _mm_andnot_si128(B, t3);
const __m128i t5 = _mm_or_si128(t1, t4);
return t5;

0x4a — (A ? (not (C) and B) : C)

f(A, B, C) = ((B or C) and (A xor C))

const __m128i t0 = _mm_or_si128(B, C);
const __m128i t1 = _mm_xor_si128(A, C);
const __m128i t2 = _mm_and_si128(t0, t1);
return t2;

0x4b — (A xor ((B xor 1) or C))

f(A, B, C) = (A xor ((B xor 1) or C))

const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t0 = _mm_xor_si128(B, c1);
const __m128i t1 = _mm_or_si128(t0, C);
const __m128i t2 = _mm_xor_si128(A, t1);
return t2;

0x4c — (B and (A nand C))

f(A, B, C) = ((A and C) notand B)

const __m128i t0 = _mm_and_si128(A, C);
const __m128i t1 = _mm_andnot_si128(t0, B);
return t1;

0x4d — (A ? (not (C) and B) : (B or (C xor 1)))

f(A, B, C) = (((A and C) notand B) or (B notand ((A or C) xor 1)))

const __m128i t0 = _mm_and_si128(A, C);
const __m128i t1 = _mm_andnot_si128(t0, B);
const __m128i t2 = _mm_or_si128(A, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t3 = _mm_xor_si128(t2, c1);
const __m128i t4 = _mm_andnot_si128(B, t3);
const __m128i t5 = _mm_or_si128(t1, t4);
return t5;

0x4e — (C ? (not (A) and C) : B)

f(A, B, C) = ((A notand C) or (C notand B))

const __m128i t0 = _mm_andnot_si128(A, C);
const __m128i t1 = _mm_andnot_si128(C, B);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0x4f — (A ? (not (C) and B) : 1)

f(A, B, C) = ((A xor 1) or (C notand B))

const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t0 = _mm_xor_si128(A, c1);
const __m128i t1 = _mm_andnot_si128(C, B);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0x50 — (A and not (C))

f(A, B, C) = (C notand A)

const __m128i t0 = _mm_andnot_si128(C, A);
return t0;

0x51 — (B ? (not (C) and A) : (C xor 1))

f(A, B, C) = (C notand (A or (B xor 1)))

const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t0 = _mm_xor_si128(B, c1);
const __m128i t1 = _mm_or_si128(A, t0);
const __m128i t2 = _mm_andnot_si128(C, t1);
return t2;

0x52 — (A ? (not (C) and A) : (not (B) and C))

f(A, B, C) = ((B and C) notand (A xor C))

const __m128i t0 = _mm_and_si128(B, C);
const __m128i t1 = _mm_xor_si128(A, C);
const __m128i t2 = _mm_andnot_si128(t0, t1);
return t2;

0x53 — (A ? not (C) : not (B))

f(A, B, C) = ((C notand A) or (A notand (B xor 1)))

const __m128i t0 = _mm_andnot_si128(C, A);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(B, c1);
const __m128i t2 = _mm_andnot_si128(A, t1);
const __m128i t3 = _mm_or_si128(t0, t2);
return t3;

0x54 — (A ? (not (C) and A) : (not (C) and B))

f(A, B, C) = (C notand (A or B))

const __m128i t0 = _mm_or_si128(A, B);
const __m128i t1 = _mm_andnot_si128(C, t0);
return t1;

0x55 — not (C)

f(A, B, C) = (C xor 1)

const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t0 = _mm_xor_si128(C, c1);
return t0;

0x56 — (C xor (B or A))

f(A, B, C) = (C xor (B or A))

const __m128i t0 = _mm_or_si128(B, A);
const __m128i t1 = _mm_xor_si128(C, t0);
return t1;

0x57 — (C nand (B or A))

f(A, B, C) = ((C and (B or A)) xor 1)

const __m128i t0 = _mm_or_si128(B, A);
const __m128i t1 = _mm_and_si128(C, t0);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t2 = _mm_xor_si128(t1, c1);
return t2;

0x58 — (C ? (not (A) and B) : A)

f(A, B, C) = ((A or B) and (A xor C))

const __m128i t0 = _mm_or_si128(A, B);
const __m128i t1 = _mm_xor_si128(A, C);
const __m128i t2 = _mm_and_si128(t0, t1);
return t2;

0x59 — (B ? (A xor C) : (C xor 1))

f(A, B, C) = (C xor (A or (B xor 1)))

const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t0 = _mm_xor_si128(B, c1);
const __m128i t1 = _mm_or_si128(A, t0);
const __m128i t2 = _mm_xor_si128(C, t1);
return t2;

0x5a — (C xor A)

f(A, B, C) = (C xor A)

const __m128i t0 = _mm_xor_si128(C, A);
return t0;

0x5b — ((A xor C) or ((A or B) xor 1))

f(A, B, C) = ((A xor C) or ((A or B) xor 1))

const __m128i t0 = _mm_xor_si128(A, C);
const __m128i t1 = _mm_or_si128(A, B);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t2 = _mm_xor_si128(t1, c1);
const __m128i t3 = _mm_or_si128(t0, t2);
return t3;

0x5c — (A ? (not (C) and A) : B)

f(A, B, C) = ((C notand A) or (A notand B))

const __m128i t0 = _mm_andnot_si128(C, A);
const __m128i t1 = _mm_andnot_si128(A, B);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0x5d — (C ? (not (A) and B) : 1)

f(A, B, C) = ((C xor 1) or (A notand B))

const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t0 = _mm_xor_si128(C, c1);
const __m128i t1 = _mm_andnot_si128(A, B);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0x5e — (A ? (not (C) and A) : (B or C))

f(A, B, C) = ((C notand B) or (A xor C))

const __m128i t0 = _mm_andnot_si128(C, B);
const __m128i t1 = _mm_xor_si128(A, C);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0x5f — (C nand A)

f(A, B, C) = ((C and A) xor 1)

const __m128i t0 = _mm_and_si128(C, A);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(t0, c1);
return t1;

0x60 — (A and (B xor C))

f(A, B, C) = (A and (B xor C))

const __m128i t0 = _mm_xor_si128(B, C);
const __m128i t1 = _mm_and_si128(A, t0);
return t1;

0x61 — (A ? (B xor C) : (B nor C))

f(A, B, C) = ((A and (B xor C)) or (A notand ((B or C) xor 1)))

const __m128i t0 = _mm_xor_si128(B, C);
const __m128i t1 = _mm_and_si128(A, t0);
const __m128i t2 = _mm_or_si128(B, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t3 = _mm_xor_si128(t2, c1);
const __m128i t4 = _mm_andnot_si128(A, t3);
const __m128i t5 = _mm_or_si128(t1, t4);
return t5;

0x62 — (B ? (not (C) and A) : C)

f(A, B, C) = ((A or C) and (B xor C))

const __m128i t0 = _mm_or_si128(A, C);
const __m128i t1 = _mm_xor_si128(B, C);
const __m128i t2 = _mm_and_si128(t0, t1);
return t2;

0x63 — (B xor ((A xor 1) or C))

f(A, B, C) = (B xor ((A xor 1) or C))

const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t0 = _mm_xor_si128(A, c1);
const __m128i t1 = _mm_or_si128(t0, C);
const __m128i t2 = _mm_xor_si128(B, t1);
return t2;

0x64 — (C ? (not (B) and A) : B)

f(A, B, C) = ((B xor C) and (A or B))

const __m128i t0 = _mm_xor_si128(B, C);
const __m128i t1 = _mm_or_si128(A, B);
const __m128i t2 = _mm_and_si128(t0, t1);
return t2;

0x65 — (C xor ((A xor 1) or B))

f(A, B, C) = (C xor ((A xor 1) or B))

const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t0 = _mm_xor_si128(A, c1);
const __m128i t1 = _mm_or_si128(t0, B);
const __m128i t2 = _mm_xor_si128(C, t1);
return t2;

0x66 — (C xor B)

f(A, B, C) = (C xor B)

const __m128i t0 = _mm_xor_si128(C, B);
return t0;

0x67 — ((B xor C) or ((A or B) xor 1))

f(A, B, C) = ((B xor C) or ((A or B) xor 1))

const __m128i t0 = _mm_xor_si128(B, C);
const __m128i t1 = _mm_or_si128(A, B);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t2 = _mm_xor_si128(t1, c1);
const __m128i t3 = _mm_or_si128(t0, t2);
return t3;

0x68 — (A ? (B xor C) : (B and C))

f(A, B, C) = ((A and (B xor C)) or (A notand (B and C)))

const __m128i t0 = _mm_xor_si128(B, C);
const __m128i t1 = _mm_and_si128(A, t0);
const __m128i t2 = _mm_and_si128(B, C);
const __m128i t3 = _mm_andnot_si128(A, t2);
const __m128i t4 = _mm_or_si128(t1, t3);
return t4;

0x69 — (A xnor (B xor C))

f(A, B, C) = ((A xor (B xor C)) xor 1)

const __m128i t0 = _mm_xor_si128(B, C);
const __m128i t1 = _mm_xor_si128(A, t0);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t2 = _mm_xor_si128(t1, c1);
return t2;

0x6a — (C xor (B and A))

f(A, B, C) = (C xor (B and A))

const __m128i t0 = _mm_and_si128(B, A);
const __m128i t1 = _mm_xor_si128(C, t0);
return t1;

0x6b — (A ? (B xor C) : ((B xor 1) or C))

f(A, B, C) = ((A notand C) or ((A xor 1) xor (B xor C)))

const __m128i t0 = _mm_andnot_si128(A, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(A, c1);
const __m128i t2 = _mm_xor_si128(B, C);
const __m128i t3 = _mm_xor_si128(t1, t2);
const __m128i t4 = _mm_or_si128(t0, t3);
return t4;

0x6c — (B xor (A and C))

f(A, B, C) = (B xor (A and C))

const __m128i t0 = _mm_and_si128(A, C);
const __m128i t1 = _mm_xor_si128(B, t0);
return t1;

0x6d — (A ? (B xor C) : (B or (C xor 1)))

f(A, B, C) = ((A notand B) or ((A xor 1) xor (B xor C)))

const __m128i t0 = _mm_andnot_si128(A, B);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(A, c1);
const __m128i t2 = _mm_xor_si128(B, C);
const __m128i t3 = _mm_xor_si128(t1, t2);
const __m128i t4 = _mm_or_si128(t0, t3);
return t4;

0x6e — (A ? (B xor C) : (B or C))

f(A, B, C) = ((A notand B) or (B xor C))

const __m128i t0 = _mm_andnot_si128(A, B);
const __m128i t1 = _mm_xor_si128(B, C);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0x6f — (A ? (B xor C) : 1)

f(A, B, C) = ((B xor C) or (A xor 1))

const __m128i t0 = _mm_xor_si128(B, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(A, c1);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0x70 — (A and (B nand C))

f(A, B, C) = ((B and C) notand A)

const __m128i t0 = _mm_and_si128(B, C);
const __m128i t1 = _mm_andnot_si128(t0, A);
return t1;

0x71 — (B ? (not (C) and A) : (A or (C xor 1)))

f(A, B, C) = (((B or C) xor 1) or (A and (B xor C)))

const __m128i t0 = _mm_or_si128(B, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(t0, c1);
const __m128i t2 = _mm_xor_si128(B, C);
const __m128i t3 = _mm_and_si128(A, t2);
const __m128i t4 = _mm_or_si128(t1, t3);
return t4;

0x72 — (C ? (not (B) and C) : A)

f(A, B, C) = ((B notand C) or (C notand A))

const __m128i t0 = _mm_andnot_si128(B, C);
const __m128i t1 = _mm_andnot_si128(C, A);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0x73 — (B ? (not (C) and A) : 1)

f(A, B, C) = ((B xor 1) or (C notand A))

const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t0 = _mm_xor_si128(B, c1);
const __m128i t1 = _mm_andnot_si128(C, A);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0x74 — (B ? (not (C) and B) : A)

f(A, B, C) = ((C notand B) or (B notand A))

const __m128i t0 = _mm_andnot_si128(C, B);
const __m128i t1 = _mm_andnot_si128(B, A);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0x75 — (C ? (not (B) and A) : 1)

f(A, B, C) = ((C xor 1) or (B notand A))

const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t0 = _mm_xor_si128(C, c1);
const __m128i t1 = _mm_andnot_si128(B, A);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0x76 — (B ? (not (C) and B) : (A or C))

f(A, B, C) = ((B notand A) or (B xor C))

const __m128i t0 = _mm_andnot_si128(B, A);
const __m128i t1 = _mm_xor_si128(B, C);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0x77 — (C nand B)

f(A, B, C) = ((C and B) xor 1)

const __m128i t0 = _mm_and_si128(C, B);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(t0, c1);
return t1;

0x78 — (A xor (B and C))

f(A, B, C) = (A xor (B and C))

const __m128i t0 = _mm_and_si128(B, C);
const __m128i t1 = _mm_xor_si128(A, t0);
return t1;

0x79 — (B ? (A xor C) : (A or (C xor 1)))

f(A, B, C) = ((B notand A) or ((B xor 1) xor (A xor C)))

const __m128i t0 = _mm_andnot_si128(B, A);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(B, c1);
const __m128i t2 = _mm_xor_si128(A, C);
const __m128i t3 = _mm_xor_si128(t1, t2);
const __m128i t4 = _mm_or_si128(t0, t3);
return t4;

0x7a — (A ? ((B and C) xor A) : C)

f(A, B, C) = ((B notand A) or (A xor C))

const __m128i t0 = _mm_andnot_si128(B, A);
const __m128i t1 = _mm_xor_si128(A, C);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0x7b — (B ? (A xor C) : 1)

f(A, B, C) = ((B xor 1) or (A xor C))

const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t0 = _mm_xor_si128(B, c1);
const __m128i t1 = _mm_xor_si128(A, C);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0x7c — (A ? ((B and C) xor A) : B)

f(A, B, C) = ((A xor B) or (C notand A))

const __m128i t0 = _mm_xor_si128(A, B);
const __m128i t1 = _mm_andnot_si128(C, A);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0x7d — (C ? (A xor B) : 1)

f(A, B, C) = ((A xor B) or (C xor 1))

const __m128i t0 = _mm_xor_si128(A, B);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(C, c1);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0x7e — (A ? ((B and C) xor A) : (B or C))

f(A, B, C) = ((A xor B) or (A xor C))

const __m128i t0 = _mm_xor_si128(A, B);
const __m128i t1 = _mm_xor_si128(A, C);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0x7f — (A ? ((B and C) xor A) : 1)

f(A, B, C) = (((A and B) and C) xor 1)

const __m128i t0 = _mm_and_si128(A, B);
const __m128i t1 = _mm_and_si128(t0, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t2 = _mm_xor_si128(t1, c1);
return t2;

0x80 — (A and (B and C))

f(A, B, C) = (A and (B and C))

const __m128i t0 = _mm_and_si128(B, C);
const __m128i t1 = _mm_and_si128(A, t0);
return t1;

0x81 — (not ((A xor C)) and (A xor (B xor 1)))

f(A, B, C) = ((A xor C) notand (A xor (B xor 1)))

const __m128i t0 = _mm_xor_si128(A, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(B, c1);
const __m128i t2 = _mm_xor_si128(A, t1);
const __m128i t3 = _mm_andnot_si128(t0, t2);
return t3;

0x82 — (C and (B xnor A))

f(A, B, C) = ((B xor A) notand C)

const __m128i t0 = _mm_xor_si128(B, A);
const __m128i t1 = _mm_andnot_si128(t0, C);
return t1;

0x83 — (not ((A xor B)) and ((A xor 1) or C))

f(A, B, C) = ((A xor B) notand ((A xor 1) or C))

const __m128i t0 = _mm_xor_si128(A, B);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(A, c1);
const __m128i t2 = _mm_or_si128(t1, C);
const __m128i t3 = _mm_andnot_si128(t0, t2);
return t3;

0x84 — (B and (A xnor C))

f(A, B, C) = ((A xor C) notand B)

const __m128i t0 = _mm_xor_si128(A, C);
const __m128i t1 = _mm_andnot_si128(t0, B);
return t1;

0x85 — (not ((A xor C)) and (B or (C xor 1)))

f(A, B, C) = ((A xor C) notand (B or (C xor 1)))

const __m128i t0 = _mm_xor_si128(A, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(C, c1);
const __m128i t2 = _mm_or_si128(B, t1);
const __m128i t3 = _mm_andnot_si128(t0, t2);
return t3;

0x86 — ((B or C) and (C xor (A xor B)))

f(A, B, C) = ((B or C) and (C xor (A xor B)))

const __m128i t0 = _mm_or_si128(B, C);
const __m128i t1 = _mm_xor_si128(A, B);
const __m128i t2 = _mm_xor_si128(C, t1);
const __m128i t3 = _mm_and_si128(t0, t2);
return t3;

0x87 — (A xnor (B and C))

f(A, B, C) = ((A xor (B and C)) xor 1)

const __m128i t0 = _mm_and_si128(B, C);
const __m128i t1 = _mm_xor_si128(A, t0);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t2 = _mm_xor_si128(t1, c1);
return t2;

0x88 — (C and B)

f(A, B, C) = (C and B)

const __m128i t0 = _mm_and_si128(C, B);
return t0;

0x89 — (not ((B xor C)) and ((A xor 1) or B))

f(A, B, C) = ((B xor C) notand ((A xor 1) or B))

const __m128i t0 = _mm_xor_si128(B, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(A, c1);
const __m128i t2 = _mm_or_si128(t1, B);
const __m128i t3 = _mm_andnot_si128(t0, t2);
return t3;

0x8a — (not ((not (B) and A)) and C)

f(A, B, C) = ((B notand A) notand C)

const __m128i t0 = _mm_andnot_si128(B, A);
const __m128i t1 = _mm_andnot_si128(t0, C);
return t1;

0x8b — (B ? C : not (A))

f(A, B, C) = ((B and C) or (B notand (A xor 1)))

const __m128i t0 = _mm_and_si128(B, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(A, c1);
const __m128i t2 = _mm_andnot_si128(B, t1);
const __m128i t3 = _mm_or_si128(t0, t2);
return t3;

0x8c — (not ((not (C) and A)) and B)

f(A, B, C) = ((C notand A) notand B)

const __m128i t0 = _mm_andnot_si128(C, A);
const __m128i t1 = _mm_andnot_si128(t0, B);
return t1;

0x8d — (C ? B : not (A))

f(A, B, C) = ((C and B) or (C notand (A xor 1)))

const __m128i t0 = _mm_and_si128(C, B);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(A, c1);
const __m128i t2 = _mm_andnot_si128(C, t1);
const __m128i t3 = _mm_or_si128(t0, t2);
return t3;

0x8e — ((B and C) or (not (A) and (B xor C)))

f(A, B, C) = ((B and C) or (A notand (B xor C)))

const __m128i t0 = _mm_and_si128(B, C);
const __m128i t1 = _mm_xor_si128(B, C);
const __m128i t2 = _mm_andnot_si128(A, t1);
const __m128i t3 = _mm_or_si128(t0, t2);
return t3;

0x8f — (A ? (B and C) : 1)

f(A, B, C) = ((A xor 1) or (B and C))

const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t0 = _mm_xor_si128(A, c1);
const __m128i t1 = _mm_and_si128(B, C);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0x90 — (A and (B xnor C))

f(A, B, C) = ((B xor C) notand A)

const __m128i t0 = _mm_xor_si128(B, C);
const __m128i t1 = _mm_andnot_si128(t0, A);
return t1;

0x91 — (not ((B xor C)) and (A or (B xor 1)))

f(A, B, C) = ((B xor C) notand (A or (B xor 1)))

const __m128i t0 = _mm_xor_si128(B, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(B, c1);
const __m128i t2 = _mm_or_si128(A, t1);
const __m128i t3 = _mm_andnot_si128(t0, t2);
return t3;

0x92 — ((A or C) and (C xor (A xor B)))

f(A, B, C) = ((A or C) and (C xor (A xor B)))

const __m128i t0 = _mm_or_si128(A, C);
const __m128i t1 = _mm_xor_si128(A, B);
const __m128i t2 = _mm_xor_si128(C, t1);
const __m128i t3 = _mm_and_si128(t0, t2);
return t3;

0x93 — (B xnor (A and C))

f(A, B, C) = ((B xor (A and C)) xor 1)

const __m128i t0 = _mm_and_si128(A, C);
const __m128i t1 = _mm_xor_si128(B, t0);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t2 = _mm_xor_si128(t1, c1);
return t2;

0x94 — ((A or B) and (B xor (A xor C)))

f(A, B, C) = ((A or B) and (B xor (A xor C)))

const __m128i t0 = _mm_or_si128(A, B);
const __m128i t1 = _mm_xor_si128(A, C);
const __m128i t2 = _mm_xor_si128(B, t1);
const __m128i t3 = _mm_and_si128(t0, t2);
return t3;

0x95 — (C xnor (B and A))

f(A, B, C) = ((C xor (B and A)) xor 1)

const __m128i t0 = _mm_and_si128(B, A);
const __m128i t1 = _mm_xor_si128(C, t0);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t2 = _mm_xor_si128(t1, c1);
return t2;

0x96 — (A xor (B xor C))

f(A, B, C) = (A xor (B xor C))

const __m128i t0 = _mm_xor_si128(B, C);
const __m128i t1 = _mm_xor_si128(A, t0);
return t1;

0x97 — (A ? (B xnor C) : (B nand C))

f(A, B, C) = (((B xor C) notand A) or (A notand ((B and C) xor 1)))

const __m128i t0 = _mm_xor_si128(B, C);
const __m128i t1 = _mm_andnot_si128(t0, A);
const __m128i t2 = _mm_and_si128(B, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t3 = _mm_xor_si128(t2, c1);
const __m128i t4 = _mm_andnot_si128(A, t3);
const __m128i t5 = _mm_or_si128(t1, t4);
return t5;

0x98 — (B ? C : (not (C) and A))

f(A, B, C) = ((B xor C) notand (A or B))

const __m128i t0 = _mm_xor_si128(B, C);
const __m128i t1 = _mm_or_si128(A, B);
const __m128i t2 = _mm_andnot_si128(t0, t1);
return t2;

0x99 — (C xnor B)

f(A, B, C) = ((C xor B) xor 1)

const __m128i t0 = _mm_xor_si128(C, B);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(t0, c1);
return t1;

0x9a — (B ? C : (A xor C))

f(A, B, C) = ((B notand A) xor C)

const __m128i t0 = _mm_andnot_si128(B, A);
const __m128i t1 = _mm_xor_si128(t0, C);
return t1;

0x9b — ((not (A) and C) or (B xor (C xor 1)))

f(A, B, C) = ((A notand C) or (B xor (C xor 1)))

const __m128i t0 = _mm_andnot_si128(A, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(C, c1);
const __m128i t2 = _mm_xor_si128(B, t1);
const __m128i t3 = _mm_or_si128(t0, t2);
return t3;

0x9c — (C ? B : (A xor B))

f(A, B, C) = ((C notand A) xor B)

const __m128i t0 = _mm_andnot_si128(C, A);
const __m128i t1 = _mm_xor_si128(t0, B);
return t1;

0x9d — ((not (A) and B) or (B xor (C xor 1)))

f(A, B, C) = ((A notand B) or (B xor (C xor 1)))

const __m128i t0 = _mm_andnot_si128(A, B);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(C, c1);
const __m128i t2 = _mm_xor_si128(B, t1);
const __m128i t3 = _mm_or_si128(t0, t2);
return t3;

0x9e — (A ? ((not (B) and A) xor C) : (B or C))

f(A, B, C) = ((B and C) or (C xor (A xor B)))

const __m128i t0 = _mm_and_si128(B, C);
const __m128i t1 = _mm_xor_si128(A, B);
const __m128i t2 = _mm_xor_si128(C, t1);
const __m128i t3 = _mm_or_si128(t0, t2);
return t3;

0x9f — (A nand (B xor C))

f(A, B, C) = ((A and (B xor C)) xor 1)

const __m128i t0 = _mm_xor_si128(B, C);
const __m128i t1 = _mm_and_si128(A, t0);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t2 = _mm_xor_si128(t1, c1);
return t2;

0xa0 — (C and A)

f(A, B, C) = (C and A)

const __m128i t0 = _mm_and_si128(C, A);
return t0;

0xa1 — (not ((A xor C)) and (A or (B xor 1)))

f(A, B, C) = ((A xor C) notand (A or (B xor 1)))

const __m128i t0 = _mm_xor_si128(A, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(B, c1);
const __m128i t2 = _mm_or_si128(A, t1);
const __m128i t3 = _mm_andnot_si128(t0, t2);
return t3;

0xa2 — (not ((not (A) and B)) and C)

f(A, B, C) = ((A notand B) notand C)

const __m128i t0 = _mm_andnot_si128(A, B);
const __m128i t1 = _mm_andnot_si128(t0, C);
return t1;

0xa3 — (A ? C : not (B))

f(A, B, C) = ((A and C) or (A notand (B xor 1)))

const __m128i t0 = _mm_and_si128(A, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(B, c1);
const __m128i t2 = _mm_andnot_si128(A, t1);
const __m128i t3 = _mm_or_si128(t0, t2);
return t3;

0xa4 — (A ? C : (not (C) and B))

f(A, B, C) = ((A xor C) notand (A or B))

const __m128i t0 = _mm_xor_si128(A, C);
const __m128i t1 = _mm_or_si128(A, B);
const __m128i t2 = _mm_andnot_si128(t0, t1);
return t2;

0xa5 — (C xnor A)

f(A, B, C) = ((C xor A) xor 1)

const __m128i t0 = _mm_xor_si128(C, A);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(t0, c1);
return t1;

0xa6 — ((not (A) and B) xor C)

f(A, B, C) = ((A notand B) xor C)

const __m128i t0 = _mm_andnot_si128(A, B);
const __m128i t1 = _mm_xor_si128(t0, C);
return t1;

0xa7 — ((not (B) and C) or (A xor (C xor 1)))

f(A, B, C) = ((B notand C) or (A xor (C xor 1)))

const __m128i t0 = _mm_andnot_si128(B, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(C, c1);
const __m128i t2 = _mm_xor_si128(A, t1);
const __m128i t3 = _mm_or_si128(t0, t2);
return t3;

0xa8 — (C and (A or B))

f(A, B, C) = (C and (A or B))

const __m128i t0 = _mm_or_si128(A, B);
const __m128i t1 = _mm_and_si128(C, t0);
return t1;

0xa9 — (C xnor (B or A))

f(A, B, C) = ((C xor (B or A)) xor 1)

const __m128i t0 = _mm_or_si128(B, A);
const __m128i t1 = _mm_xor_si128(C, t0);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t2 = _mm_xor_si128(t1, c1);
return t2;

0xaa — C

f(A, B, C) = C

return C;

0xab — (C or (B nor A))

f(A, B, C) = (C or ((B or A) xor 1))

const __m128i t0 = _mm_or_si128(B, A);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(t0, c1);
const __m128i t2 = _mm_or_si128(C, t1);
return t2;

0xac — (A ? C : B)

f(A, B, C) = ((A and C) or (A notand B))

const __m128i t0 = _mm_and_si128(A, C);
const __m128i t1 = _mm_andnot_si128(A, B);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0xad — ((B and C) or (A xor (C xor 1)))

f(A, B, C) = ((B and C) or (A xor (C xor 1)))

const __m128i t0 = _mm_and_si128(B, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(C, c1);
const __m128i t2 = _mm_xor_si128(A, t1);
const __m128i t3 = _mm_or_si128(t0, t2);
return t3;

0xae — ((not (A) and B) or C)

f(A, B, C) = ((A notand B) or C)

const __m128i t0 = _mm_andnot_si128(A, B);
const __m128i t1 = _mm_or_si128(t0, C);
return t1;

0xaf — (A ? C : 1)

f(A, B, C) = (C or (A xor 1))

const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t0 = _mm_xor_si128(A, c1);
const __m128i t1 = _mm_or_si128(C, t0);
return t1;

0xb0 — (not ((not (C) and B)) and A)

f(A, B, C) = ((C notand B) notand A)

const __m128i t0 = _mm_andnot_si128(C, B);
const __m128i t1 = _mm_andnot_si128(t0, A);
return t1;

0xb1 — (C ? A : not (B))

f(A, B, C) = ((C and A) or (C notand (B xor 1)))

const __m128i t0 = _mm_and_si128(C, A);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(B, c1);
const __m128i t2 = _mm_andnot_si128(C, t1);
const __m128i t3 = _mm_or_si128(t0, t2);
return t3;

0xb2 — (B ? (A and C) : (A or C))

f(A, B, C) = ((B and (A and C)) or (B notand (A or C)))

const __m128i t0 = _mm_and_si128(A, C);
const __m128i t1 = _mm_and_si128(B, t0);
const __m128i t2 = _mm_or_si128(A, C);
const __m128i t3 = _mm_andnot_si128(B, t2);
const __m128i t4 = _mm_or_si128(t1, t3);
return t4;

0xb3 — (B ? (A and C) : 1)

f(A, B, C) = ((B xor 1) or (A and C))

const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t0 = _mm_xor_si128(B, c1);
const __m128i t1 = _mm_and_si128(A, C);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0xb4 — (C ? A : (A xor B))

f(A, B, C) = (A xor (C notand B))

const __m128i t0 = _mm_andnot_si128(C, B);
const __m128i t1 = _mm_xor_si128(A, t0);
return t1;

0xb5 — ((not (B) and A) or (A xor (C xor 1)))

f(A, B, C) = ((B notand A) or (A xor (C xor 1)))

const __m128i t0 = _mm_andnot_si128(B, A);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(C, c1);
const __m128i t2 = _mm_xor_si128(A, t1);
const __m128i t3 = _mm_or_si128(t0, t2);
return t3;

0xb6 — (A ? (C or (A xor B)) : (B xor C))

f(A, B, C) = ((A and C) or (C xor (A xor B)))

const __m128i t0 = _mm_and_si128(A, C);
const __m128i t1 = _mm_xor_si128(A, B);
const __m128i t2 = _mm_xor_si128(C, t1);
const __m128i t3 = _mm_or_si128(t0, t2);
return t3;

0xb7 — (B nand (A xor C))

f(A, B, C) = ((B and (A xor C)) xor 1)

const __m128i t0 = _mm_xor_si128(A, C);
const __m128i t1 = _mm_and_si128(B, t0);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t2 = _mm_xor_si128(t1, c1);
return t2;

0xb8 — (B ? C : A)

f(A, B, C) = ((B and C) or (B notand A))

const __m128i t0 = _mm_and_si128(B, C);
const __m128i t1 = _mm_andnot_si128(B, A);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0xb9 — ((A and C) or (B xor (C xor 1)))

f(A, B, C) = (((B xor C) xor 1) or (B notand A))

const __m128i t0 = _mm_xor_si128(B, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(t0, c1);
const __m128i t2 = _mm_andnot_si128(B, A);
const __m128i t3 = _mm_or_si128(t1, t2);
return t3;

0xba — ((not (B) and A) or C)

f(A, B, C) = (C or (B notand A))

const __m128i t0 = _mm_andnot_si128(B, A);
const __m128i t1 = _mm_or_si128(C, t0);
return t1;

0xbb — (B ? C : 1)

f(A, B, C) = (C or (B xor 1))

const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t0 = _mm_xor_si128(B, c1);
const __m128i t1 = _mm_or_si128(C, t0);
return t1;

0xbc — ((A and C) or (A xor B))

f(A, B, C) = ((A and C) or (A xor B))

const __m128i t0 = _mm_and_si128(A, C);
const __m128i t1 = _mm_xor_si128(A, B);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0xbd — ((A xor B) or (A xor (C xor 1)))

f(A, B, C) = ((A xor B) or (A xor (C xor 1)))

const __m128i t0 = _mm_xor_si128(A, B);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(C, c1);
const __m128i t2 = _mm_xor_si128(A, t1);
const __m128i t3 = _mm_or_si128(t0, t2);
return t3;

0xbe — (C or (B xor A))

f(A, B, C) = (C or (B xor A))

const __m128i t0 = _mm_xor_si128(B, A);
const __m128i t1 = _mm_or_si128(C, t0);
return t1;

0xbf — (C or (B nand A))

f(A, B, C) = (C or ((B and A) xor 1))

const __m128i t0 = _mm_and_si128(B, A);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(t0, c1);
const __m128i t2 = _mm_or_si128(C, t1);
return t2;

0xc0 — (B and A)

f(A, B, C) = (B and A)

const __m128i t0 = _mm_and_si128(B, A);
return t0;

0xc1 — (not ((A xor B)) and (A or (C xor 1)))

f(A, B, C) = ((A xor B) notand (A or (C xor 1)))

const __m128i t0 = _mm_xor_si128(A, B);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(C, c1);
const __m128i t2 = _mm_or_si128(A, t1);
const __m128i t3 = _mm_andnot_si128(t0, t2);
return t3;

0xc2 — (A ? B : (not (B) and C))

f(A, B, C) = ((A xor B) notand (A or C))

const __m128i t0 = _mm_xor_si128(A, B);
const __m128i t1 = _mm_or_si128(A, C);
const __m128i t2 = _mm_andnot_si128(t0, t1);
return t2;

0xc3 — (B xnor A)

f(A, B, C) = ((B xor A) xor 1)

const __m128i t0 = _mm_xor_si128(B, A);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(t0, c1);
return t1;

0xc4 — (not ((not (A) and C)) and B)

f(A, B, C) = ((A notand C) notand B)

const __m128i t0 = _mm_andnot_si128(A, C);
const __m128i t1 = _mm_andnot_si128(t0, B);
return t1;

0xc5 — (A ? B : not (C))

f(A, B, C) = ((A and B) or (A notand (C xor 1)))

const __m128i t0 = _mm_and_si128(A, B);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(C, c1);
const __m128i t2 = _mm_andnot_si128(A, t1);
const __m128i t3 = _mm_or_si128(t0, t2);
return t3;

0xc6 — ((not (A) and C) xor B)

f(A, B, C) = ((A notand C) xor B)

const __m128i t0 = _mm_andnot_si128(A, C);
const __m128i t1 = _mm_xor_si128(t0, B);
return t1;

0xc7 — ((not (C) and B) or (A xor (B xor 1)))

f(A, B, C) = ((C notand B) or (A xor (B xor 1)))

const __m128i t0 = _mm_andnot_si128(C, B);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(B, c1);
const __m128i t2 = _mm_xor_si128(A, t1);
const __m128i t3 = _mm_or_si128(t0, t2);
return t3;

0xc8 — (B and (A or C))

f(A, B, C) = (B and (A or C))

const __m128i t0 = _mm_or_si128(A, C);
const __m128i t1 = _mm_and_si128(B, t0);
return t1;

0xc9 — (B xnor (A or C))

f(A, B, C) = ((B xor (A or C)) xor 1)

const __m128i t0 = _mm_or_si128(A, C);
const __m128i t1 = _mm_xor_si128(B, t0);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t2 = _mm_xor_si128(t1, c1);
return t2;

0xca — (A ? B : C)

f(A, B, C) = ((A and B) or (A notand C))

const __m128i t0 = _mm_and_si128(A, B);
const __m128i t1 = _mm_andnot_si128(A, C);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0xcb — ((B and C) or (A xor (B xor 1)))

f(A, B, C) = ((B and C) or (A xor (B xor 1)))

const __m128i t0 = _mm_and_si128(B, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(B, c1);
const __m128i t2 = _mm_xor_si128(A, t1);
const __m128i t3 = _mm_or_si128(t0, t2);
return t3;

0xcc — B

f(A, B, C) = B

return B;

0xcd — (B or (A nor C))

f(A, B, C) = (B or ((A or C) xor 1))

const __m128i t0 = _mm_or_si128(A, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(t0, c1);
const __m128i t2 = _mm_or_si128(B, t1);
return t2;

0xce — ((not (A) and C) or B)

f(A, B, C) = ((A notand C) or B)

const __m128i t0 = _mm_andnot_si128(A, C);
const __m128i t1 = _mm_or_si128(t0, B);
return t1;

0xcf — (A ? B : 1)

f(A, B, C) = (B or (A xor 1))

const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t0 = _mm_xor_si128(A, c1);
const __m128i t1 = _mm_or_si128(B, t0);
return t1;

0xd0 — (not ((not (B) and C)) and A)

f(A, B, C) = ((B notand C) notand A)

const __m128i t0 = _mm_andnot_si128(B, C);
const __m128i t1 = _mm_andnot_si128(t0, A);
return t1;

0xd1 — ((B nor C) or (A and B))

f(A, B, C) = ((B and A) or (B notand (C xor 1)))

const __m128i t0 = _mm_and_si128(B, A);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(C, c1);
const __m128i t2 = _mm_andnot_si128(B, t1);
const __m128i t3 = _mm_or_si128(t0, t2);
return t3;

0xd2 — ((not (B) and C) xor A)

f(A, B, C) = (A xor (B notand C))

const __m128i t0 = _mm_andnot_si128(B, C);
const __m128i t1 = _mm_xor_si128(A, t0);
return t1;

0xd3 — ((not (C) and A) or (A xor (B xor 1)))

f(A, B, C) = ((C notand A) or (A xor (B xor 1)))

const __m128i t0 = _mm_andnot_si128(C, A);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(B, c1);
const __m128i t2 = _mm_xor_si128(A, t1);
const __m128i t3 = _mm_or_si128(t0, t2);
return t3;

0xd4 — ((B and not (C)) or (A and (B xnor C)))

f(A, B, C) = ((C notand B) or ((B xor C) notand A))

const __m128i t0 = _mm_andnot_si128(C, B);
const __m128i t1 = _mm_xor_si128(B, C);
const __m128i t2 = _mm_andnot_si128(t1, A);
const __m128i t3 = _mm_or_si128(t0, t2);
return t3;

0xd5 — (C ? (A and B) : 1)

f(A, B, C) = ((C xor 1) or (A and B))

const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t0 = _mm_xor_si128(C, c1);
const __m128i t1 = _mm_and_si128(A, B);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0xd6 — (A ? (B or (A xor C)) : (B xor C))

f(A, B, C) = ((A and B) or (B xor (A xor C)))

const __m128i t0 = _mm_and_si128(A, B);
const __m128i t1 = _mm_xor_si128(A, C);
const __m128i t2 = _mm_xor_si128(B, t1);
const __m128i t3 = _mm_or_si128(t0, t2);
return t3;

0xd7 — (C nand (B xor A))

f(A, B, C) = ((C and (B xor A)) xor 1)

const __m128i t0 = _mm_xor_si128(B, A);
const __m128i t1 = _mm_and_si128(C, t0);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t2 = _mm_xor_si128(t1, c1);
return t2;

0xd8 — (C ? B : A)

f(A, B, C) = ((C and B) or (C notand A))

const __m128i t0 = _mm_and_si128(C, B);
const __m128i t1 = _mm_andnot_si128(C, A);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0xd9 — ((A and B) or (B xor (C xor 1)))

f(A, B, C) = (((B xor C) xor 1) or (A and B))

const __m128i t0 = _mm_xor_si128(B, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(t0, c1);
const __m128i t2 = _mm_and_si128(A, B);
const __m128i t3 = _mm_or_si128(t1, t2);
return t3;

0xda — ((A and B) or (A xor C))

f(A, B, C) = ((A and B) or (A xor C))

const __m128i t0 = _mm_and_si128(A, B);
const __m128i t1 = _mm_xor_si128(A, C);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0xdb — ((A xor C) or (A xor (B xor 1)))

f(A, B, C) = ((A xor C) or (A xor (B xor 1)))

const __m128i t0 = _mm_xor_si128(A, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(B, c1);
const __m128i t2 = _mm_xor_si128(A, t1);
const __m128i t3 = _mm_or_si128(t0, t2);
return t3;

0xdc — ((not (C) and A) or B)

f(A, B, C) = (B or (C notand A))

const __m128i t0 = _mm_andnot_si128(C, A);
const __m128i t1 = _mm_or_si128(B, t0);
return t1;

0xdd — (C ? B : 1)

f(A, B, C) = (B or (C xor 1))

const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t0 = _mm_xor_si128(C, c1);
const __m128i t1 = _mm_or_si128(B, t0);
return t1;

0xde — (B or (A xor C))

f(A, B, C) = (B or (A xor C))

const __m128i t0 = _mm_xor_si128(A, C);
const __m128i t1 = _mm_or_si128(B, t0);
return t1;

0xdf — (B or (A nand C))

f(A, B, C) = (B or ((A and C) xor 1))

const __m128i t0 = _mm_and_si128(A, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(t0, c1);
const __m128i t2 = _mm_or_si128(B, t1);
return t2;

0xe0 — (A and (B or C))

f(A, B, C) = (A and (B or C))

const __m128i t0 = _mm_or_si128(B, C);
const __m128i t1 = _mm_and_si128(A, t0);
return t1;

0xe1 — (A xnor (B or C))

f(A, B, C) = ((A xor (B or C)) xor 1)

const __m128i t0 = _mm_or_si128(B, C);
const __m128i t1 = _mm_xor_si128(A, t0);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t2 = _mm_xor_si128(t1, c1);
return t2;

0xe2 — (B ? A : C)

f(A, B, C) = ((B and A) or (B notand C))

const __m128i t0 = _mm_and_si128(B, A);
const __m128i t1 = _mm_andnot_si128(B, C);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0xe3 — ((A and C) or (A xor (B xor 1)))

f(A, B, C) = ((A and C) or (A xor (B xor 1)))

const __m128i t0 = _mm_and_si128(A, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(B, c1);
const __m128i t2 = _mm_xor_si128(A, t1);
const __m128i t3 = _mm_or_si128(t0, t2);
return t3;

0xe4 — (C ? A : B)

f(A, B, C) = ((C and A) or (C notand B))

const __m128i t0 = _mm_and_si128(C, A);
const __m128i t1 = _mm_andnot_si128(C, B);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0xe5 — ((A and B) or (A xor (C xor 1)))

f(A, B, C) = ((A and B) or (A xor (C xor 1)))

const __m128i t0 = _mm_and_si128(A, B);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(C, c1);
const __m128i t2 = _mm_xor_si128(A, t1);
const __m128i t3 = _mm_or_si128(t0, t2);
return t3;

0xe6 — ((A and B) or (B xor C))

f(A, B, C) = ((B xor C) or (A and B))

const __m128i t0 = _mm_xor_si128(B, C);
const __m128i t1 = _mm_and_si128(A, B);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0xe7 — ((B xor C) or (A xor (B xor 1)))

f(A, B, C) = ((B xor C) or ((A xor 1) xor C))

const __m128i t0 = _mm_xor_si128(B, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(A, c1);
const __m128i t2 = _mm_xor_si128(t1, C);
const __m128i t3 = _mm_or_si128(t0, t2);
return t3;

0xe8 — ((B and C) or (A and (B xor C)))

f(A, B, C) = ((B and C) or (A and (B xor C)))

const __m128i t0 = _mm_and_si128(B, C);
const __m128i t1 = _mm_xor_si128(B, C);
const __m128i t2 = _mm_and_si128(A, t1);
const __m128i t3 = _mm_or_si128(t0, t2);
return t3;

0xe9 — ((A and B) or (B xor (A xor (C xor 1))))

f(A, B, C) = (((A xor 1) xor (B xor C)) or (A and B))

const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t0 = _mm_xor_si128(A, c1);
const __m128i t1 = _mm_xor_si128(B, C);
const __m128i t2 = _mm_xor_si128(t0, t1);
const __m128i t3 = _mm_and_si128(A, B);
const __m128i t4 = _mm_or_si128(t2, t3);
return t4;

0xea — (C or (B and A))

f(A, B, C) = (C or (B and A))

const __m128i t0 = _mm_and_si128(B, A);
const __m128i t1 = _mm_or_si128(C, t0);
return t1;

0xeb — (C or (B xnor A))

f(A, B, C) = (C or ((B xor A) xor 1))

const __m128i t0 = _mm_xor_si128(B, A);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(t0, c1);
const __m128i t2 = _mm_or_si128(C, t1);
return t2;

0xec — (B or (A and C))

f(A, B, C) = (B or (A and C))

const __m128i t0 = _mm_and_si128(A, C);
const __m128i t1 = _mm_or_si128(B, t0);
return t1;

0xed — (B or (A xnor C))

f(A, B, C) = (B or ((A xor C) xor 1))

const __m128i t0 = _mm_xor_si128(A, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(t0, c1);
const __m128i t2 = _mm_or_si128(B, t1);
return t2;

0xee — (C or B)

f(A, B, C) = (C or B)

const __m128i t0 = _mm_or_si128(C, B);
return t0;

0xef — (A ? (B or C) : 1)

f(A, B, C) = ((A xor 1) or (B or C))

const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t0 = _mm_xor_si128(A, c1);
const __m128i t1 = _mm_or_si128(B, C);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0xf0 — A

f(A, B, C) = A

return A;

0xf1 — (A or (B nor C))

f(A, B, C) = (A or ((B or C) xor 1))

const __m128i t0 = _mm_or_si128(B, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(t0, c1);
const __m128i t2 = _mm_or_si128(A, t1);
return t2;

0xf2 — ((not (B) and C) or A)

f(A, B, C) = (A or (B notand C))

const __m128i t0 = _mm_andnot_si128(B, C);
const __m128i t1 = _mm_or_si128(A, t0);
return t1;

0xf3 — (B ? A : 1)

f(A, B, C) = (A or (B xor 1))

const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t0 = _mm_xor_si128(B, c1);
const __m128i t1 = _mm_or_si128(A, t0);
return t1;

0xf4 — ((not (C) and B) or A)

f(A, B, C) = (A or (C notand B))

const __m128i t0 = _mm_andnot_si128(C, B);
const __m128i t1 = _mm_or_si128(A, t0);
return t1;

0xf5 — (C ? A : 1)

f(A, B, C) = (A or (C xor 1))

const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t0 = _mm_xor_si128(C, c1);
const __m128i t1 = _mm_or_si128(A, t0);
return t1;

0xf6 — (A or (B xor C))

f(A, B, C) = (A or (B xor C))

const __m128i t0 = _mm_xor_si128(B, C);
const __m128i t1 = _mm_or_si128(A, t0);
return t1;

0xf7 — (A or (B nand C))

f(A, B, C) = (A or ((B and C) xor 1))

const __m128i t0 = _mm_and_si128(B, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(t0, c1);
const __m128i t2 = _mm_or_si128(A, t1);
return t2;

0xf8 — (A or (B and C))

f(A, B, C) = (A or (B and C))

const __m128i t0 = _mm_and_si128(B, C);
const __m128i t1 = _mm_or_si128(A, t0);
return t1;

0xf9 — (A or (B xnor C))

f(A, B, C) = (A or ((B xor C) xor 1))

const __m128i t0 = _mm_xor_si128(B, C);
const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t1 = _mm_xor_si128(t0, c1);
const __m128i t2 = _mm_or_si128(A, t1);
return t2;

0xfa — (C or A)

f(A, B, C) = (C or A)

const __m128i t0 = _mm_or_si128(C, A);
return t0;

0xfb — (B ? (A or C) : 1)

f(A, B, C) = (A or ((B xor 1) or C))

const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t0 = _mm_xor_si128(B, c1);
const __m128i t1 = _mm_or_si128(t0, C);
const __m128i t2 = _mm_or_si128(A, t1);
return t2;

0xfc — (B or A)

f(A, B, C) = (B or A)

const __m128i t0 = _mm_or_si128(B, A);
return t0;

0xfd — (C ? (A or B) : 1)

f(A, B, C) = ((C xor 1) or (A or B))

const __m128i c1 = _mm_set1_epi32(-1);
const __m128i t0 = _mm_xor_si128(C, c1);
const __m128i t1 = _mm_or_si128(A, B);
const __m128i t2 = _mm_or_si128(t0, t1);
return t2;

0xfe — (A or (B or C))

f(A, B, C) = (A or (B or C))

const __m128i t0 = _mm_or_si128(B, C);
const __m128i t1 = _mm_or_si128(A, t0);
return t1;

0xff — 1

f(A, B, C) = 1

const __m128i c1 = _mm_set1_epi32(-1);
return c1;

Number of instructions

code function SSE AVX2 AVX512 x86 (64 bit) x86 (32 bit) AMD XOP ARM Neon
0001111111
01(A nor (B or C))4443343
02(C and (B nor A))2223322
03(B nor A)3332232
04(B and (A nor C))2223322
05(C nor A)3332232
06(A ? 0 : (B xor C))2223322
07(A nor (B and C))4443343
08(B ? (not (A) and C) : B)2223322
09(A nor (B xor C))4443343
0a(C and not (A))1112211
0b(B ? (not (A) and C) : (A xor 1))4445544
0c(B and not (A))1112211
0d(C ? (not (A) and B) : (A xor 1))4445544
0e(A ? 0 : (B or C))2223322
0fnot (A)2221121
10(A and (B nor C))2223322
11(C nor B)3332232
12(B ? 0 : (A xor C))2223322
13(B nor (A and C))4443343
14(C ? 0 : (A xor B))2223322
15(C nor (B and A))4443343
16(A ? (not (C) and (A xor B)) : (B xor C))5557745
17((B nor C) or (not (A) and (B xor C)))6664454
18(B ? (not (A) and C) : (not (C) and A))3333333
19(B ? (not (A) and C) : (C xor 1))5555545
1a(A ? (not (C) and (A xor B)) : C)3334433
1b(C ? not (A) : not (B))5556644
1c(A ? (not (C) and (A xor B)) : B)3334433
1d(B ? not (A) : not (C))5556644
1e(A xor (B or C))2222222
1f(A nand (B or C))4443343
20(A ? (not (B) and C) : A)2223322
21(B nor (A xor C))4443343
22(C and not (B))1112211
23(A ? (not (B) and C) : (B xor 1))4445543
24(A ? (not (B) and C) : (not (C) and B))3333333
25(A ? (not (B) and C) : (C xor 1))5556645
26(A ? (not (B) and C) : (B xor C))3334433
27(C ? not (B) : not (A))5556644
28(C and (B xor A))2222222
29(C ? (B xor A) : (B nor A))7777756
2a(C and (B nand A))2223322
2b(A ? (not (B) and C) : ((B xor 1) or C))7778856
2c(A ? (not (B) and C) : B)3333323
2d(C ? (A xor B) : (A xor 1))4443342
2e(B ? (not (A) and B) : C)3333323
2f(A ? (not (B) and C) : 1)4444432
30(A and not (B))1112211
31(C ? (not (B) and A) : (B xor 1))4445543
32(A ? (not (B) and A) : (not (B) and C))2223322
33not (B)2221121
34(A ? (not (B) and A) : (not (C) and B))3334433
35(A ? not (B) : not (C))5556644
36(B xor (A or C))2222222
37(B nand (A or C))4443343
38(B ? (not (A) and C) : A)3333323
39(C ? (A xor B) : (B xor 1))4444444
3a(A ? (not (B) and A) : C)3335523
3b(B ? (not (A) and C) : 1)4445533
3c(B xor A)1111111
3d((A xor B) or ((A or C) xor 1))5554453
3e(A ? (not (B) and A) : (B or C))3334433
3f(B nand A)3332232
40(A ? (not (C) and B) : A)2223322
41(C nor (B xor A))4443343
42(A ? (not (C) and B) : (not (B) and C))3333333
43(A ? (not (C) and B) : (B xor 1))5556645
44(B and not (C))1112211
45(A ? (not (C) and B) : (C xor 1))4445543
46(A ? (not (C) and B) : (B xor C))3334433
47(B ? not (C) : not (A))5556644
48(B and (A xor C))2222222
49(B ? (A xor C) : (A nor C))7777756
4a(A ? (not (C) and B) : C)3333323
4b(A xor ((B xor 1) or C))4443342
4c(B and (A nand C))2223322
4d(A ? (not (C) and B) : (B or (C xor 1)))7778856
4e(C ? (not (A) and C) : B)3335523
4f(A ? (not (C) and B) : 1)4444432
50(A and not (C))1112211
51(B ? (not (C) and A) : (C xor 1))4445543
52(A ? (not (C) and A) : (not (B) and C))3334433
53(A ? not (C) : not (B))5556644
54(A ? (not (C) and A) : (not (C) and B))2223322
55not (C)2221121
56(C xor (B or A))2222222
57(C nand (B or A))4443343
58(C ? (not (A) and B) : A)3333323
59(B ? (A xor C) : (C xor 1))4444444
5a(C xor A)1111111
5b((A xor C) or ((A or B) xor 1))5555554
5c(A ? (not (C) and A) : B)3335523
5d(C ? (not (A) and B) : 1)4444432
5e(A ? (not (C) and A) : (B or C))3334433
5f(C nand A)3332232
60(A and (B xor C))2222222
61(A ? (B xor C) : (B nor C))7777756
62(B ? (not (C) and A) : C)3333323
63(B xor ((A xor 1) or C))4444444
64(C ? (not (B) and A) : B)3333323
65(C xor ((A xor 1) or B))4444444
66(C xor B)1111111
67((B xor C) or ((A or B) xor 1))5554453
68(A ? (B xor C) : (B and C))5556635
69(A xnor (B xor C))4443343
6a(C xor (B and A))2222222
6b(A ? (B xor C) : ((B xor 1) or C))6667756
6c(B xor (A and C))2222222
6d(A ? (B xor C) : (B or (C xor 1)))6667756
6e(A ? (B xor C) : (B or C))3334433
6f(A ? (B xor C) : 1)4444434
70(A and (B nand C))2223322
71(B ? (not (C) and A) : (A or (C xor 1)))6665554
72(C ? (not (B) and C) : A)3335523
73(B ? (not (C) and A) : 1)4444432
74(B ? (not (C) and B) : A)3335523
75(C ? (not (B) and A) : 1)4444432
76(B ? (not (C) and B) : (A or C))3334433
77(C nand B)3332232
78(A xor (B and C))2222222
79(B ? (A xor C) : (A or (C xor 1)))6667756
7a(A ? ((B and C) xor A) : C)3334433
7b(B ? (A xor C) : 1)4443332
7c(A ? ((B and C) xor A) : B)3334433
7d(C ? (A xor B) : 1)4444434
7e(A ? ((B and C) xor A) : (B or C))3333333
7f(A ? ((B and C) xor A) : 1)4444444
80(A and (B and C))2222222
81(not ((A xor C)) and (A xor (B xor 1)))5556655
82(C and (B xnor A))2223322
83(not ((A xor B)) and ((A xor 1) or C))5556645
84(B and (A xnor C))2223322
85(not ((A xor C)) and (B or (C xor 1)))5556645
86((B or C) and (C xor (A xor B)))4444434
87(A xnor (B and C))4443343
88(C and B)1111111
89(not ((B xor C)) and ((A xor 1) or B))5556645
8a(not ((not (B) and A)) and C)2224422
8b(B ? C : not (A))5555534
8c(not ((not (C) and A)) and B)2224422
8d(C ? B : not (A))5555534
8e((B and C) or (not (A) and (B xor C)))4445534
8f(A ? (B and C) : 1)4443332
90(A and (B xnor C))2223322
91(not ((B xor C)) and (A or (B xor 1)))5556645
92((A or C) and (C xor (A xor B)))4444434
93(B xnor (A and C))4443343
94((A or B) and (B xor (A xor C)))4444434
95(C xnor (B and A))4443343
96(A xor (B xor C))2222222
97(A ? (B xnor C) : (B nand C))7778866
98(B ? C : (not (C) and A))3334423
99(C xnor B)3332232
9a(B ? C : (A xor C))2223322
9b((not (A) and C) or (B xor (C xor 1)))5556645
9c(C ? B : (A xor B))2223322
9d((not (A) and B) or (B xor (C xor 1)))5556645
9e(A ? ((not (B) and A) xor C) : (B or C))4444444
9f(A nand (B xor C))4443343
a0(C and A)1111111
a1(not ((A xor C)) and (A or (B xor 1)))5556645
a2(not ((not (A) and B)) and C)2223322
a3(A ? C : not (B))5555534
a4(A ? C : (not (C) and B))3334423
a5(C xnor A)3332232
a6((not (A) and B) xor C)2223322
a7((not (B) and C) or (A xor (C xor 1)))5556645
a8(C and (A or B))2222222
a9(C xnor (B or A))4443343
aaC0000000
ab(C or (B nor A))4443342
ac(A ? C : B)3334413
ad((B and C) or (A xor (C xor 1)))5555545
ae((not (A) and B) or C)2223322
af(A ? C : 1)3332221
b0(not ((not (C) and B)) and A)2224422
b1(C ? A : not (B))5555534
b2(B ? (A and C) : (A or C))5556635
b3(B ? (A and C) : 1)4443332
b4(C ? A : (A xor B))2223322
b5((not (B) and A) or (A xor (C xor 1)))5556645
b6(A ? (C or (A xor B)) : (B xor C))4444444
b7(B nand (A xor C))4443343
b8(B ? C : A)3334413
b9((A and C) or (B xor (C xor 1)))5555543
ba((not (B) and A) or C)2223322
bb(B ? C : 1)3332221
bc((A and C) or (A xor B))3333333
bd((A xor B) or (A xor (C xor 1)))5555555
be(C or (B xor A))2222222
bf(C or (B nand A))4443342
c0(B and A)1111111
c1(not ((A xor B)) and (A or (C xor 1)))5556645
c2(A ? B : (not (B) and C))3334423
c3(B xnor A)3332232
c4(not ((not (A) and C)) and B)2224422
c5(A ? B : not (C))5555534
c6((not (A) and C) xor B)2223322
c7((not (C) and B) or (A xor (B xor 1)))5556645
c8(B and (A or C))2222222
c9(B xnor (A or C))4443343
ca(A ? B : C)3334413
cb((B and C) or (A xor (B xor 1)))5555545
ccB0000000
cd(B or (A nor C))4443342
ce((not (A) and C) or B)2223322
cf(A ? B : 1)3332221
d0(not ((not (B) and C)) and A)2223322
d1((B nor C) or (A and B))5554433
d2((not (B) and C) xor A)2223322
d3((not (C) and A) or (A xor (B xor 1)))5556645
d4((B and not (C)) or (A and (B xnor C)))4446634
d5(C ? (A and B) : 1)4443332
d6(A ? (B or (A xor C)) : (B xor C))4444444
d7(C nand (B xor A))4443343
d8(C ? B : A)3334413
d9((A and B) or (B xor (C xor 1)))5554443
da((A and B) or (A xor C))3333333
db((A xor C) or (A xor (B xor 1)))5555555
dc((not (C) and A) or B)2223322
dd(C ? B : 1)3332221
de(B or (A xor C))2222222
df(B or (A nand C))4443342
e0(A and (B or C))2222222
e1(A xnor (B or C))4443343
e2(B ? A : C)3334413
e3((A and C) or (A xor (B xor 1)))5555545
e4(C ? A : B)3334413
e5((A and B) or (A xor (C xor 1)))5555545
e6((A and B) or (B xor C))3333333
e7((B xor C) or (A xor (B xor 1)))5554454
e8((B and C) or (A and (B xor C)))4444434
e9((A and B) or (B xor (A xor (C xor 1))))6665555
ea(C or (B and A))2222222
eb(C or (B xnor A))4443342
ec(B or (A and C))2222222
ed(B or (A xnor C))4443342
ee(C or B)1111111
ef(A ? (B or C) : 1)4443332
f0A0000000
f1(A or (B nor C))4443342
f2((not (B) and C) or A)2223322
f3(B ? A : 1)3332221
f4((not (C) and B) or A)2223322
f5(C ? A : 1)3332221
f6(A or (B xor C))2222222
f7(A or (B nand C))4443342
f8(A or (B and C))2222222
f9(A or (B xnor C))4443342
fa(C or A)1111111
fb(B ? (A or C) : 1)4443332
fc(B or A)1111111
fd(C ? (A or B) : 1)4443332
fe(A or (B or C))2222222
ff11111111