uint_xlen_t cmix(uint_xlen_t rs1, uint_xlen_t rs2, uint_xlen_t rs3) { return (rs1 & rs2) | (rs3 & ~rs2);
}
```
+
+# carryless mul
+
+```
+uint_xlen_t clmul(uint_xlen_t rs1, uint_xlen_t rs2) { uint_xlen_t x = 0;
+}
+for (int i = 0; i < XLEN; i++) if ((rs2 >> i) & 1)
+x ^= rs1 << i; return x;
+uint_xlen_t clmulh(uint_xlen_t rs1, uint_xlen_t rs2) { uint_xlen_t x = 0;
+}
+for (int i = 1; i < XLEN; i++) if ((rs2 >> i) & 1)
+x ^= rs1 >> (XLEN-i); return x;
+uint_xlen_t clmulr(uint_xlen_t rs1, uint_xlen_t rs2) { uint_xlen_t x = 0;
+}
+for (int i = 0; i < XLEN; i++) if ((rs2 >> i) & 1)
+x ^= rs1 >> (XLEN-i-1); return x;
+```