data/full_repos/permissive/193439230/sbox.v
data/verilator_xmls/9e770880-de7d-4db0-ab4b-be45e1c0d585.xml
module Bottom(g, m, l, e);
    input[7:0] g;
    input[9:0] m;
    input[3:0] l;
    output[17:0] e;
    wire k4,
        k3,
        k2,
        k1,
        k0;
    XOR m1(k4, l[3], l[2]);
    XOR m2(k3, l[3], l[1]);
    XOR m3(k2, l[2], l[0]);
    XOR m4(k1, k3, k2);
    XOR m5(k0, l[1], l[0]);
    NAND m6(e[17], g[2], l[2]);
    NAND m7(e[16], g[3], l[3]);
    NAND m8(e[15], m[8], k4);
    NAND m9(e[14], m[2], k1);
    NAND m10(e[13], m[4], k2);
    NAND m11(e[12], m[6], k3);
    NAND m12(e[11], g[0], l[0]);
    NAND m13(e[10], g[1], l[1]);
    NAND m14(e[9], m[0], k0);
    NAND m15(e[8], g[6], l[2]);
    NAND m16(e[7], g[7], l[3]);
    NAND m17(e[6], m[9], k4);
    NAND m18(e[5], m[3], k1);
    NAND m19(e[4], m[5], k2);
    NAND m20(e[3], m[7], k3);
    NAND m21(e[2], g[4], l[0]);
    NAND m22(e[1], g[5], l[1]);

    NAND m23(e[0], m[1], k0);
endmodule
module Bottom(g, m, l, e);

    input[7:0] g;
    input[9:0] m;
    input[3:0] l;
    output[17:0] e;
    wire k4,
        k3,
        k2,
        k1,
        k0;
    XOR m1(k4, l[3], l[2]);
    XOR m2(k3, l[3], l[1]);
    XOR m3(k2, l[2], l[0]);
    XOR m4(k1, k3, k2);
    XOR m5(k0, l[1], l[0]);
    NAND m6(e[17], g[2], l[2]);
    NAND m7(e[16], g[3], l[3]);
    NAND m8(e[15], m[8], k4);
    NAND m9(e[14], m[2], k1);
    NAND m10(e[13], m[4], k2);
    NAND m11(e[12], m[6], k3);
    NAND m12(e[11], g[0], l[0]);
    NAND m13(e[10], g[1], l[1]);
    NAND m14(e[9], m[0], k0);
    NAND m15(e[8], g[6], l[2]);
    NAND m16(e[7], g[7], l[3]);
    NAND m17(e[6], m[9], k4);
    NAND m18(e[5], m[3], k1);
    NAND m19(e[4], m[5], k2);
    NAND m20(e[3], m[7], k3);
    NAND m21(e[2], g[4], l[0]);
    NAND m22(e[1], g[5], l[1]);

    NAND m23(e[0], m[1], k0);
endmodule