# Mutants for video/c_mv16tt.h, the colour-maths pixel writers shared by the
# 16t tile drawers. Checked by test/difftest_t8t.c.
# Format: name<TAB>old<TAB>new   (\n for a newline)
px zero test	    r->ax = eax;\n    if (eax == 0) {	    r->ax = eax;\n    if ((eax & 0x0Fu) == 0) {
px ax on skip	    r->ax = eax;\n    if (eax == 0) {	    if (eax == 0) {
px win test	    if (win != 0 && win[w] != 0) {	    if (win != 0 && win[w] == 0) {
px win always	    if (win != 0 && win[w] != 0) {	    if (win[w] != 0) {
px win index	    if (win != 0 && win[w] != 0) {	    if (win != 0 && win[n] != 0) {
px win index k	    if (win != 0 && win[w] != 0) {	    if (win != 0 && win[k] != 0) {
px pal wrap	    eax = (u1)(eax + adder);	    eax = eax + adder;
px pal add	    eax = (u1)(eax + adder);	    eax = (u1)(eax - adder);
half transp read	        memcpy(&ecx, ebp + n * 2, 4);\n        eax = pal16b[eax];	        memcpy(&ecx, ebp + n * 2, 2);\n        eax = pal16b[eax];
half transp index	        memcpy(&ecx, ebp + n * 2, 4);\n        eax = pal16b[eax];	        memcpy(&ecx, ebp + k * 2, 4);\n        eax = pal16b[eax];
half pal table	        memcpy(&ecx, ebp + n * 2, 4);\n        eax = pal16b[eax];	        memcpy(&ecx, ebp + n * 2, 4);\n        eax = pal16bcl[eax];
half transp test	        if ((u2)ecx != 0) {	        if (ecx != 0) {
half transp sense	        if ((u2)ecx != 0) {	        if ((u2)ecx == 0) {
half transp always	        if ((u2)ecx != 0) {	        if (1) {
half cx mask	            ecx &= TT_CLBIT;\n            eax = ((eax & TT_CLBIT) + ecx) >> 1;	            eax = ((eax & TT_CLBIT) + ecx) >> 1;
half ax mask	            ecx &= TT_CLBIT;\n            eax = ((eax & TT_CLBIT) + ecx) >> 1;	            ecx &= TT_CLBIT;\n            eax = (eax + ecx) >> 1;
half shift	            eax = ((eax & TT_CLBIT) + ecx) >> 1;	            eax = ((eax & TT_CLBIT) + ecx);
half cx out	        r->cx = ecx;\n        *(u2*)(esi + n * 2) = (u2)eax;	        *(u2*)(esi + n * 2) = (u2)eax;
half store	        *(u2*)(esi + n * 2) = (u2)eax;\n        r->ax = 0;	        *(u2*)(esi + n * 2 + 2) = (u2)eax;\n        r->ax = 0;
half ax clear	        *(u2*)(esi + n * 2) = (u2)eax;\n        r->ax = 0;	        *(u2*)(esi + n * 2) = (u2)eax;
fa pal choice	        u4 const* const pal = mode == T_ADD ? pal16bcl : pal16bxcl;	        u4 const* const pal = mode == T_ADD ? pal16bxcl : pal16bcl;
fa pal plain	        u4 const* const pal = mode == T_ADD ? pal16bcl : pal16bxcl;	        u4 const* const pal = pal16b;
fa bx mask	        ebx &= TT_CLBIT;\n        ecx = (ecx + ebx) >> 1;	        ecx = (ecx + ebx) >> 1;
fa cx mask	        ebx &= TT_CLBIT;\n        ecx = (ecx + ebx) >> 1;	        ebx &= TT_CLBIT;\n        ecx = ((ecx & TT_CLBIT) + ebx) >> 1;
fa shift	        ecx = (ecx + ebx) >> 1;	        ecx = (ecx + ebx);
fa table	        memcpy(&ecx, fulladdtab + ecx, 4);	        ecx = fulladdtab[ecx];
fa table index	        memcpy(&ecx, fulladdtab + ecx, 4);	        memcpy(&ecx, fulladdtab + ecx * 2, 4);
fa sub xor	        if (mode == T_SUB) {\n            ecx ^= 0xFFFFu;\n        }	        /* mutant: no invert */
fa sub always	        if (mode == T_SUB) {\n            ecx ^= 0xFFFFu;\n        }	        ecx ^= 0xFFFFu;
fa bx out	        r->bx = ebx;\n        r->cx = ecx;	        r->cx = ecx;
fa cx out	        r->bx = ebx;\n        r->cx = ecx;	        r->bx = ebx;
fa store	        *(u2*)(esi + n * 2) = (u2)ecx;	        *(u2*)(esi + n * 2 + 2) = (u2)ecx;
fa transp index	        memcpy(&ebx, ebp + n * 2, 4);	        memcpy(&ebx, ebp + k * 2, 4);
fa ax keep	        ecx = pal[eax];\n        ebx &= TT_CLBIT;	        ecx = pal[eax];\n        r->ax = 0;\n        ebx &= TT_CLBIT;
row group test	        if (*(u4 const*)(tile + (k & 4u)) == 0) {	        if (*(u4 const*)(tile + (k & 4u)) != 0) {
row group half	        if (*(u4 const*)(tile + (k & 4u)) == 0) {	        if (*(u4 const*)(tile + (4u - (k & 4u))) == 0) {
row group none	        if (*(u4 const*)(tile + (k & 4u)) == 0) {	        if (0) {
row group width	        if (*(u4 const*)(tile + (k & 4u)) == 0) {	        if (*(u2 const*)(tile + (k & 4u)) == 0) {
row group order	        u4 const k = flip ? 7 - g : g;	        u4 const k = g;
row flip	            tt_px(r, tile, win, adder, esi, ebp, flip ? 7 - n : n, n, n,\n                mode);	            tt_px(r, tile, win, adder, esi, ebp, n, n, n,\n                mode);
row flip screen	            tt_px(r, tile, win, adder, esi, ebp, flip ? 7 - n : n, n, n,\n                mode);	            tt_px(r, tile, win, adder, esi, ebp, n, flip ? 7 - n : n, n,\n                mode);
