void gf_mul(gf_s * RESTRICT cs, const gf as, const gf bs)
{
    const uint32_t *a = as->limb, *b = bs->limb;
    uint32_t *c = cs->limb;
    uint64_t accum0 = 0, accum1 = 0, accum2 = 0;
    uint32_t mask = (1 << 28) - 1;
    uint32_t aa[8], bb[8];
    int i, j;
    for (i = 0; i < 8; i++) {
        aa[i] = a[i] + a[i + 8];
        bb[i] = b[i] + b[i + 8];
    }
    FOR_LIMB(j, 0, 8, {
             accum2 = 0;
             FOR_LIMB(i, 0, j + 1, {
                      accum2 += widemul(a[j - i], b[i]);
                      accum1 += widemul(aa[j - i], bb[i]);
                      accum0 += widemul(a[8 + j - i], b[8 + i]);
                      }
             ); accum1 -= accum2; accum0 += accum2;
             accum2 = 0;
             FOR_LIMB(i, j + 1, 8, {
                      accum0 -=
                      widemul(a[8 + j - i], b[i]);
                      accum2 +=
                      widemul(aa[8 + j - i],
                              bb[i]);
                      accum1 += widemul(a[16 + j - i], b[8 + i]);
                      }
             );
             accum1 += accum2;
             accum0 += accum2;
             c[j] = ((uint32_t)(accum0)) & mask;
             c[j + 8] = ((uint32_t)(accum1)) & mask;
             accum0 >>= 28; accum1 >>= 28;
             });
    accum0 += accum1;
    accum0 += c[8];
    accum1 += c[0];
    c[8] = ((uint32_t)(accum0)) & mask;
    c[0] = ((uint32_t)(accum1)) & mask;
    accum0 >>= 28;
    accum1 >>= 28;
    c[9] += ((uint32_t)(accum0));
    c[1] += ((uint32_t)(accum1));
}
['void gf_mul(gf_s * RESTRICT cs, const gf as, const gf bs)\n{\n    const uint32_t *a = as->limb, *b = bs->limb;\n    uint32_t *c = cs->limb;\n    uint64_t accum0 = 0, accum1 = 0, accum2 = 0;\n    uint32_t mask = (1 << 28) - 1;\n    uint32_t aa[8], bb[8];\n    int i, j;\n    for (i = 0; i < 8; i++) {\n        aa[i] = a[i] + a[i + 8];\n        bb[i] = b[i] + b[i + 8];\n    }\n    FOR_LIMB(j, 0, 8, {\n             accum2 = 0;\n             FOR_LIMB(i, 0, j + 1, {\n                      accum2 += widemul(a[j - i], b[i]);\n                      accum1 += widemul(aa[j - i], bb[i]);\n                      accum0 += widemul(a[8 + j - i], b[8 + i]);\n                      }\n             ); accum1 -= accum2; accum0 += accum2;\n             accum2 = 0;\n             FOR_LIMB(i, j + 1, 8, {\n                      accum0 -=\n                      widemul(a[8 + j - i], b[i]);\n                      accum2 +=\n                      widemul(aa[8 + j - i],\n                              bb[i]);\n                      accum1 += widemul(a[16 + j - i], b[8 + i]);\n                      }\n             );\n             accum1 += accum2;\n             accum0 += accum2;\n             c[j] = ((uint32_t)(accum0)) & mask;\n             c[j + 8] = ((uint32_t)(accum1)) & mask;\n             accum0 >>= 28; accum1 >>= 28;\n             });\n    accum0 += accum1;\n    accum0 += c[8];\n    accum1 += c[0];\n    c[8] = ((uint32_t)(accum0)) & mask;\n    c[0] = ((uint32_t)(accum1)) & mask;\n    accum0 >>= 28;\n    accum1 >>= 28;\n    c[9] += ((uint32_t)(accum0));\n    c[1] += ((uint32_t)(accum1));\n}']