github.com/freddyisaac/sicortex-golang@v0.0.0-20231019035217-e03519e66f60/src/cmd/compile/internal/ssa/rewrite386.go (about)

     1  // autogenerated from gen/386.rules: do not edit!
     2  // generated with: cd gen; go run *.go
     3  
     4  package ssa
     5  
     6  import "math"
     7  
     8  var _ = math.MinInt8 // in case not otherwise used
     9  func rewriteValue386(v *Value, config *Config) bool {
    10  	switch v.Op {
    11  	case Op386ADCL:
    12  		return rewriteValue386_Op386ADCL(v, config)
    13  	case Op386ADDL:
    14  		return rewriteValue386_Op386ADDL(v, config)
    15  	case Op386ADDLcarry:
    16  		return rewriteValue386_Op386ADDLcarry(v, config)
    17  	case Op386ADDLconst:
    18  		return rewriteValue386_Op386ADDLconst(v, config)
    19  	case Op386ANDL:
    20  		return rewriteValue386_Op386ANDL(v, config)
    21  	case Op386ANDLconst:
    22  		return rewriteValue386_Op386ANDLconst(v, config)
    23  	case Op386CMPB:
    24  		return rewriteValue386_Op386CMPB(v, config)
    25  	case Op386CMPBconst:
    26  		return rewriteValue386_Op386CMPBconst(v, config)
    27  	case Op386CMPL:
    28  		return rewriteValue386_Op386CMPL(v, config)
    29  	case Op386CMPLconst:
    30  		return rewriteValue386_Op386CMPLconst(v, config)
    31  	case Op386CMPW:
    32  		return rewriteValue386_Op386CMPW(v, config)
    33  	case Op386CMPWconst:
    34  		return rewriteValue386_Op386CMPWconst(v, config)
    35  	case Op386LEAL:
    36  		return rewriteValue386_Op386LEAL(v, config)
    37  	case Op386LEAL1:
    38  		return rewriteValue386_Op386LEAL1(v, config)
    39  	case Op386LEAL2:
    40  		return rewriteValue386_Op386LEAL2(v, config)
    41  	case Op386LEAL4:
    42  		return rewriteValue386_Op386LEAL4(v, config)
    43  	case Op386LEAL8:
    44  		return rewriteValue386_Op386LEAL8(v, config)
    45  	case Op386MOVBLSX:
    46  		return rewriteValue386_Op386MOVBLSX(v, config)
    47  	case Op386MOVBLSXload:
    48  		return rewriteValue386_Op386MOVBLSXload(v, config)
    49  	case Op386MOVBLZX:
    50  		return rewriteValue386_Op386MOVBLZX(v, config)
    51  	case Op386MOVBload:
    52  		return rewriteValue386_Op386MOVBload(v, config)
    53  	case Op386MOVBloadidx1:
    54  		return rewriteValue386_Op386MOVBloadidx1(v, config)
    55  	case Op386MOVBstore:
    56  		return rewriteValue386_Op386MOVBstore(v, config)
    57  	case Op386MOVBstoreconst:
    58  		return rewriteValue386_Op386MOVBstoreconst(v, config)
    59  	case Op386MOVBstoreconstidx1:
    60  		return rewriteValue386_Op386MOVBstoreconstidx1(v, config)
    61  	case Op386MOVBstoreidx1:
    62  		return rewriteValue386_Op386MOVBstoreidx1(v, config)
    63  	case Op386MOVLload:
    64  		return rewriteValue386_Op386MOVLload(v, config)
    65  	case Op386MOVLloadidx1:
    66  		return rewriteValue386_Op386MOVLloadidx1(v, config)
    67  	case Op386MOVLloadidx4:
    68  		return rewriteValue386_Op386MOVLloadidx4(v, config)
    69  	case Op386MOVLstore:
    70  		return rewriteValue386_Op386MOVLstore(v, config)
    71  	case Op386MOVLstoreconst:
    72  		return rewriteValue386_Op386MOVLstoreconst(v, config)
    73  	case Op386MOVLstoreconstidx1:
    74  		return rewriteValue386_Op386MOVLstoreconstidx1(v, config)
    75  	case Op386MOVLstoreconstidx4:
    76  		return rewriteValue386_Op386MOVLstoreconstidx4(v, config)
    77  	case Op386MOVLstoreidx1:
    78  		return rewriteValue386_Op386MOVLstoreidx1(v, config)
    79  	case Op386MOVLstoreidx4:
    80  		return rewriteValue386_Op386MOVLstoreidx4(v, config)
    81  	case Op386MOVSDconst:
    82  		return rewriteValue386_Op386MOVSDconst(v, config)
    83  	case Op386MOVSDload:
    84  		return rewriteValue386_Op386MOVSDload(v, config)
    85  	case Op386MOVSDloadidx1:
    86  		return rewriteValue386_Op386MOVSDloadidx1(v, config)
    87  	case Op386MOVSDloadidx8:
    88  		return rewriteValue386_Op386MOVSDloadidx8(v, config)
    89  	case Op386MOVSDstore:
    90  		return rewriteValue386_Op386MOVSDstore(v, config)
    91  	case Op386MOVSDstoreidx1:
    92  		return rewriteValue386_Op386MOVSDstoreidx1(v, config)
    93  	case Op386MOVSDstoreidx8:
    94  		return rewriteValue386_Op386MOVSDstoreidx8(v, config)
    95  	case Op386MOVSSconst:
    96  		return rewriteValue386_Op386MOVSSconst(v, config)
    97  	case Op386MOVSSload:
    98  		return rewriteValue386_Op386MOVSSload(v, config)
    99  	case Op386MOVSSloadidx1:
   100  		return rewriteValue386_Op386MOVSSloadidx1(v, config)
   101  	case Op386MOVSSloadidx4:
   102  		return rewriteValue386_Op386MOVSSloadidx4(v, config)
   103  	case Op386MOVSSstore:
   104  		return rewriteValue386_Op386MOVSSstore(v, config)
   105  	case Op386MOVSSstoreidx1:
   106  		return rewriteValue386_Op386MOVSSstoreidx1(v, config)
   107  	case Op386MOVSSstoreidx4:
   108  		return rewriteValue386_Op386MOVSSstoreidx4(v, config)
   109  	case Op386MOVWLSX:
   110  		return rewriteValue386_Op386MOVWLSX(v, config)
   111  	case Op386MOVWLSXload:
   112  		return rewriteValue386_Op386MOVWLSXload(v, config)
   113  	case Op386MOVWLZX:
   114  		return rewriteValue386_Op386MOVWLZX(v, config)
   115  	case Op386MOVWload:
   116  		return rewriteValue386_Op386MOVWload(v, config)
   117  	case Op386MOVWloadidx1:
   118  		return rewriteValue386_Op386MOVWloadidx1(v, config)
   119  	case Op386MOVWloadidx2:
   120  		return rewriteValue386_Op386MOVWloadidx2(v, config)
   121  	case Op386MOVWstore:
   122  		return rewriteValue386_Op386MOVWstore(v, config)
   123  	case Op386MOVWstoreconst:
   124  		return rewriteValue386_Op386MOVWstoreconst(v, config)
   125  	case Op386MOVWstoreconstidx1:
   126  		return rewriteValue386_Op386MOVWstoreconstidx1(v, config)
   127  	case Op386MOVWstoreconstidx2:
   128  		return rewriteValue386_Op386MOVWstoreconstidx2(v, config)
   129  	case Op386MOVWstoreidx1:
   130  		return rewriteValue386_Op386MOVWstoreidx1(v, config)
   131  	case Op386MOVWstoreidx2:
   132  		return rewriteValue386_Op386MOVWstoreidx2(v, config)
   133  	case Op386MULL:
   134  		return rewriteValue386_Op386MULL(v, config)
   135  	case Op386MULLconst:
   136  		return rewriteValue386_Op386MULLconst(v, config)
   137  	case Op386NEGL:
   138  		return rewriteValue386_Op386NEGL(v, config)
   139  	case Op386NOTL:
   140  		return rewriteValue386_Op386NOTL(v, config)
   141  	case Op386ORL:
   142  		return rewriteValue386_Op386ORL(v, config)
   143  	case Op386ORLconst:
   144  		return rewriteValue386_Op386ORLconst(v, config)
   145  	case Op386ROLBconst:
   146  		return rewriteValue386_Op386ROLBconst(v, config)
   147  	case Op386ROLLconst:
   148  		return rewriteValue386_Op386ROLLconst(v, config)
   149  	case Op386ROLWconst:
   150  		return rewriteValue386_Op386ROLWconst(v, config)
   151  	case Op386SARB:
   152  		return rewriteValue386_Op386SARB(v, config)
   153  	case Op386SARBconst:
   154  		return rewriteValue386_Op386SARBconst(v, config)
   155  	case Op386SARL:
   156  		return rewriteValue386_Op386SARL(v, config)
   157  	case Op386SARLconst:
   158  		return rewriteValue386_Op386SARLconst(v, config)
   159  	case Op386SARW:
   160  		return rewriteValue386_Op386SARW(v, config)
   161  	case Op386SARWconst:
   162  		return rewriteValue386_Op386SARWconst(v, config)
   163  	case Op386SBBL:
   164  		return rewriteValue386_Op386SBBL(v, config)
   165  	case Op386SBBLcarrymask:
   166  		return rewriteValue386_Op386SBBLcarrymask(v, config)
   167  	case Op386SETA:
   168  		return rewriteValue386_Op386SETA(v, config)
   169  	case Op386SETAE:
   170  		return rewriteValue386_Op386SETAE(v, config)
   171  	case Op386SETB:
   172  		return rewriteValue386_Op386SETB(v, config)
   173  	case Op386SETBE:
   174  		return rewriteValue386_Op386SETBE(v, config)
   175  	case Op386SETEQ:
   176  		return rewriteValue386_Op386SETEQ(v, config)
   177  	case Op386SETG:
   178  		return rewriteValue386_Op386SETG(v, config)
   179  	case Op386SETGE:
   180  		return rewriteValue386_Op386SETGE(v, config)
   181  	case Op386SETL:
   182  		return rewriteValue386_Op386SETL(v, config)
   183  	case Op386SETLE:
   184  		return rewriteValue386_Op386SETLE(v, config)
   185  	case Op386SETNE:
   186  		return rewriteValue386_Op386SETNE(v, config)
   187  	case Op386SHLL:
   188  		return rewriteValue386_Op386SHLL(v, config)
   189  	case Op386SHRB:
   190  		return rewriteValue386_Op386SHRB(v, config)
   191  	case Op386SHRL:
   192  		return rewriteValue386_Op386SHRL(v, config)
   193  	case Op386SHRW:
   194  		return rewriteValue386_Op386SHRW(v, config)
   195  	case Op386SUBL:
   196  		return rewriteValue386_Op386SUBL(v, config)
   197  	case Op386SUBLcarry:
   198  		return rewriteValue386_Op386SUBLcarry(v, config)
   199  	case Op386SUBLconst:
   200  		return rewriteValue386_Op386SUBLconst(v, config)
   201  	case Op386XORL:
   202  		return rewriteValue386_Op386XORL(v, config)
   203  	case Op386XORLconst:
   204  		return rewriteValue386_Op386XORLconst(v, config)
   205  	case OpAdd16:
   206  		return rewriteValue386_OpAdd16(v, config)
   207  	case OpAdd32:
   208  		return rewriteValue386_OpAdd32(v, config)
   209  	case OpAdd32F:
   210  		return rewriteValue386_OpAdd32F(v, config)
   211  	case OpAdd32carry:
   212  		return rewriteValue386_OpAdd32carry(v, config)
   213  	case OpAdd32withcarry:
   214  		return rewriteValue386_OpAdd32withcarry(v, config)
   215  	case OpAdd64F:
   216  		return rewriteValue386_OpAdd64F(v, config)
   217  	case OpAdd8:
   218  		return rewriteValue386_OpAdd8(v, config)
   219  	case OpAddPtr:
   220  		return rewriteValue386_OpAddPtr(v, config)
   221  	case OpAddr:
   222  		return rewriteValue386_OpAddr(v, config)
   223  	case OpAnd16:
   224  		return rewriteValue386_OpAnd16(v, config)
   225  	case OpAnd32:
   226  		return rewriteValue386_OpAnd32(v, config)
   227  	case OpAnd8:
   228  		return rewriteValue386_OpAnd8(v, config)
   229  	case OpAndB:
   230  		return rewriteValue386_OpAndB(v, config)
   231  	case OpBswap32:
   232  		return rewriteValue386_OpBswap32(v, config)
   233  	case OpClosureCall:
   234  		return rewriteValue386_OpClosureCall(v, config)
   235  	case OpCom16:
   236  		return rewriteValue386_OpCom16(v, config)
   237  	case OpCom32:
   238  		return rewriteValue386_OpCom32(v, config)
   239  	case OpCom8:
   240  		return rewriteValue386_OpCom8(v, config)
   241  	case OpConst16:
   242  		return rewriteValue386_OpConst16(v, config)
   243  	case OpConst32:
   244  		return rewriteValue386_OpConst32(v, config)
   245  	case OpConst32F:
   246  		return rewriteValue386_OpConst32F(v, config)
   247  	case OpConst64F:
   248  		return rewriteValue386_OpConst64F(v, config)
   249  	case OpConst8:
   250  		return rewriteValue386_OpConst8(v, config)
   251  	case OpConstBool:
   252  		return rewriteValue386_OpConstBool(v, config)
   253  	case OpConstNil:
   254  		return rewriteValue386_OpConstNil(v, config)
   255  	case OpConvert:
   256  		return rewriteValue386_OpConvert(v, config)
   257  	case OpCvt32Fto32:
   258  		return rewriteValue386_OpCvt32Fto32(v, config)
   259  	case OpCvt32Fto64F:
   260  		return rewriteValue386_OpCvt32Fto64F(v, config)
   261  	case OpCvt32to32F:
   262  		return rewriteValue386_OpCvt32to32F(v, config)
   263  	case OpCvt32to64F:
   264  		return rewriteValue386_OpCvt32to64F(v, config)
   265  	case OpCvt64Fto32:
   266  		return rewriteValue386_OpCvt64Fto32(v, config)
   267  	case OpCvt64Fto32F:
   268  		return rewriteValue386_OpCvt64Fto32F(v, config)
   269  	case OpDeferCall:
   270  		return rewriteValue386_OpDeferCall(v, config)
   271  	case OpDiv16:
   272  		return rewriteValue386_OpDiv16(v, config)
   273  	case OpDiv16u:
   274  		return rewriteValue386_OpDiv16u(v, config)
   275  	case OpDiv32:
   276  		return rewriteValue386_OpDiv32(v, config)
   277  	case OpDiv32F:
   278  		return rewriteValue386_OpDiv32F(v, config)
   279  	case OpDiv32u:
   280  		return rewriteValue386_OpDiv32u(v, config)
   281  	case OpDiv64F:
   282  		return rewriteValue386_OpDiv64F(v, config)
   283  	case OpDiv8:
   284  		return rewriteValue386_OpDiv8(v, config)
   285  	case OpDiv8u:
   286  		return rewriteValue386_OpDiv8u(v, config)
   287  	case OpEq16:
   288  		return rewriteValue386_OpEq16(v, config)
   289  	case OpEq32:
   290  		return rewriteValue386_OpEq32(v, config)
   291  	case OpEq32F:
   292  		return rewriteValue386_OpEq32F(v, config)
   293  	case OpEq64F:
   294  		return rewriteValue386_OpEq64F(v, config)
   295  	case OpEq8:
   296  		return rewriteValue386_OpEq8(v, config)
   297  	case OpEqB:
   298  		return rewriteValue386_OpEqB(v, config)
   299  	case OpEqPtr:
   300  		return rewriteValue386_OpEqPtr(v, config)
   301  	case OpGeq16:
   302  		return rewriteValue386_OpGeq16(v, config)
   303  	case OpGeq16U:
   304  		return rewriteValue386_OpGeq16U(v, config)
   305  	case OpGeq32:
   306  		return rewriteValue386_OpGeq32(v, config)
   307  	case OpGeq32F:
   308  		return rewriteValue386_OpGeq32F(v, config)
   309  	case OpGeq32U:
   310  		return rewriteValue386_OpGeq32U(v, config)
   311  	case OpGeq64F:
   312  		return rewriteValue386_OpGeq64F(v, config)
   313  	case OpGeq8:
   314  		return rewriteValue386_OpGeq8(v, config)
   315  	case OpGeq8U:
   316  		return rewriteValue386_OpGeq8U(v, config)
   317  	case OpGetClosurePtr:
   318  		return rewriteValue386_OpGetClosurePtr(v, config)
   319  	case OpGetG:
   320  		return rewriteValue386_OpGetG(v, config)
   321  	case OpGoCall:
   322  		return rewriteValue386_OpGoCall(v, config)
   323  	case OpGreater16:
   324  		return rewriteValue386_OpGreater16(v, config)
   325  	case OpGreater16U:
   326  		return rewriteValue386_OpGreater16U(v, config)
   327  	case OpGreater32:
   328  		return rewriteValue386_OpGreater32(v, config)
   329  	case OpGreater32F:
   330  		return rewriteValue386_OpGreater32F(v, config)
   331  	case OpGreater32U:
   332  		return rewriteValue386_OpGreater32U(v, config)
   333  	case OpGreater64F:
   334  		return rewriteValue386_OpGreater64F(v, config)
   335  	case OpGreater8:
   336  		return rewriteValue386_OpGreater8(v, config)
   337  	case OpGreater8U:
   338  		return rewriteValue386_OpGreater8U(v, config)
   339  	case OpHmul16:
   340  		return rewriteValue386_OpHmul16(v, config)
   341  	case OpHmul16u:
   342  		return rewriteValue386_OpHmul16u(v, config)
   343  	case OpHmul32:
   344  		return rewriteValue386_OpHmul32(v, config)
   345  	case OpHmul32u:
   346  		return rewriteValue386_OpHmul32u(v, config)
   347  	case OpHmul8:
   348  		return rewriteValue386_OpHmul8(v, config)
   349  	case OpHmul8u:
   350  		return rewriteValue386_OpHmul8u(v, config)
   351  	case OpInterCall:
   352  		return rewriteValue386_OpInterCall(v, config)
   353  	case OpIsInBounds:
   354  		return rewriteValue386_OpIsInBounds(v, config)
   355  	case OpIsNonNil:
   356  		return rewriteValue386_OpIsNonNil(v, config)
   357  	case OpIsSliceInBounds:
   358  		return rewriteValue386_OpIsSliceInBounds(v, config)
   359  	case OpLeq16:
   360  		return rewriteValue386_OpLeq16(v, config)
   361  	case OpLeq16U:
   362  		return rewriteValue386_OpLeq16U(v, config)
   363  	case OpLeq32:
   364  		return rewriteValue386_OpLeq32(v, config)
   365  	case OpLeq32F:
   366  		return rewriteValue386_OpLeq32F(v, config)
   367  	case OpLeq32U:
   368  		return rewriteValue386_OpLeq32U(v, config)
   369  	case OpLeq64F:
   370  		return rewriteValue386_OpLeq64F(v, config)
   371  	case OpLeq8:
   372  		return rewriteValue386_OpLeq8(v, config)
   373  	case OpLeq8U:
   374  		return rewriteValue386_OpLeq8U(v, config)
   375  	case OpLess16:
   376  		return rewriteValue386_OpLess16(v, config)
   377  	case OpLess16U:
   378  		return rewriteValue386_OpLess16U(v, config)
   379  	case OpLess32:
   380  		return rewriteValue386_OpLess32(v, config)
   381  	case OpLess32F:
   382  		return rewriteValue386_OpLess32F(v, config)
   383  	case OpLess32U:
   384  		return rewriteValue386_OpLess32U(v, config)
   385  	case OpLess64F:
   386  		return rewriteValue386_OpLess64F(v, config)
   387  	case OpLess8:
   388  		return rewriteValue386_OpLess8(v, config)
   389  	case OpLess8U:
   390  		return rewriteValue386_OpLess8U(v, config)
   391  	case OpLoad:
   392  		return rewriteValue386_OpLoad(v, config)
   393  	case OpLrot16:
   394  		return rewriteValue386_OpLrot16(v, config)
   395  	case OpLrot32:
   396  		return rewriteValue386_OpLrot32(v, config)
   397  	case OpLrot8:
   398  		return rewriteValue386_OpLrot8(v, config)
   399  	case OpLsh16x16:
   400  		return rewriteValue386_OpLsh16x16(v, config)
   401  	case OpLsh16x32:
   402  		return rewriteValue386_OpLsh16x32(v, config)
   403  	case OpLsh16x64:
   404  		return rewriteValue386_OpLsh16x64(v, config)
   405  	case OpLsh16x8:
   406  		return rewriteValue386_OpLsh16x8(v, config)
   407  	case OpLsh32x16:
   408  		return rewriteValue386_OpLsh32x16(v, config)
   409  	case OpLsh32x32:
   410  		return rewriteValue386_OpLsh32x32(v, config)
   411  	case OpLsh32x64:
   412  		return rewriteValue386_OpLsh32x64(v, config)
   413  	case OpLsh32x8:
   414  		return rewriteValue386_OpLsh32x8(v, config)
   415  	case OpLsh8x16:
   416  		return rewriteValue386_OpLsh8x16(v, config)
   417  	case OpLsh8x32:
   418  		return rewriteValue386_OpLsh8x32(v, config)
   419  	case OpLsh8x64:
   420  		return rewriteValue386_OpLsh8x64(v, config)
   421  	case OpLsh8x8:
   422  		return rewriteValue386_OpLsh8x8(v, config)
   423  	case OpMod16:
   424  		return rewriteValue386_OpMod16(v, config)
   425  	case OpMod16u:
   426  		return rewriteValue386_OpMod16u(v, config)
   427  	case OpMod32:
   428  		return rewriteValue386_OpMod32(v, config)
   429  	case OpMod32u:
   430  		return rewriteValue386_OpMod32u(v, config)
   431  	case OpMod8:
   432  		return rewriteValue386_OpMod8(v, config)
   433  	case OpMod8u:
   434  		return rewriteValue386_OpMod8u(v, config)
   435  	case OpMove:
   436  		return rewriteValue386_OpMove(v, config)
   437  	case OpMul16:
   438  		return rewriteValue386_OpMul16(v, config)
   439  	case OpMul32:
   440  		return rewriteValue386_OpMul32(v, config)
   441  	case OpMul32F:
   442  		return rewriteValue386_OpMul32F(v, config)
   443  	case OpMul32uhilo:
   444  		return rewriteValue386_OpMul32uhilo(v, config)
   445  	case OpMul64F:
   446  		return rewriteValue386_OpMul64F(v, config)
   447  	case OpMul8:
   448  		return rewriteValue386_OpMul8(v, config)
   449  	case OpNeg16:
   450  		return rewriteValue386_OpNeg16(v, config)
   451  	case OpNeg32:
   452  		return rewriteValue386_OpNeg32(v, config)
   453  	case OpNeg32F:
   454  		return rewriteValue386_OpNeg32F(v, config)
   455  	case OpNeg64F:
   456  		return rewriteValue386_OpNeg64F(v, config)
   457  	case OpNeg8:
   458  		return rewriteValue386_OpNeg8(v, config)
   459  	case OpNeq16:
   460  		return rewriteValue386_OpNeq16(v, config)
   461  	case OpNeq32:
   462  		return rewriteValue386_OpNeq32(v, config)
   463  	case OpNeq32F:
   464  		return rewriteValue386_OpNeq32F(v, config)
   465  	case OpNeq64F:
   466  		return rewriteValue386_OpNeq64F(v, config)
   467  	case OpNeq8:
   468  		return rewriteValue386_OpNeq8(v, config)
   469  	case OpNeqB:
   470  		return rewriteValue386_OpNeqB(v, config)
   471  	case OpNeqPtr:
   472  		return rewriteValue386_OpNeqPtr(v, config)
   473  	case OpNilCheck:
   474  		return rewriteValue386_OpNilCheck(v, config)
   475  	case OpNot:
   476  		return rewriteValue386_OpNot(v, config)
   477  	case OpOffPtr:
   478  		return rewriteValue386_OpOffPtr(v, config)
   479  	case OpOr16:
   480  		return rewriteValue386_OpOr16(v, config)
   481  	case OpOr32:
   482  		return rewriteValue386_OpOr32(v, config)
   483  	case OpOr8:
   484  		return rewriteValue386_OpOr8(v, config)
   485  	case OpOrB:
   486  		return rewriteValue386_OpOrB(v, config)
   487  	case OpRsh16Ux16:
   488  		return rewriteValue386_OpRsh16Ux16(v, config)
   489  	case OpRsh16Ux32:
   490  		return rewriteValue386_OpRsh16Ux32(v, config)
   491  	case OpRsh16Ux64:
   492  		return rewriteValue386_OpRsh16Ux64(v, config)
   493  	case OpRsh16Ux8:
   494  		return rewriteValue386_OpRsh16Ux8(v, config)
   495  	case OpRsh16x16:
   496  		return rewriteValue386_OpRsh16x16(v, config)
   497  	case OpRsh16x32:
   498  		return rewriteValue386_OpRsh16x32(v, config)
   499  	case OpRsh16x64:
   500  		return rewriteValue386_OpRsh16x64(v, config)
   501  	case OpRsh16x8:
   502  		return rewriteValue386_OpRsh16x8(v, config)
   503  	case OpRsh32Ux16:
   504  		return rewriteValue386_OpRsh32Ux16(v, config)
   505  	case OpRsh32Ux32:
   506  		return rewriteValue386_OpRsh32Ux32(v, config)
   507  	case OpRsh32Ux64:
   508  		return rewriteValue386_OpRsh32Ux64(v, config)
   509  	case OpRsh32Ux8:
   510  		return rewriteValue386_OpRsh32Ux8(v, config)
   511  	case OpRsh32x16:
   512  		return rewriteValue386_OpRsh32x16(v, config)
   513  	case OpRsh32x32:
   514  		return rewriteValue386_OpRsh32x32(v, config)
   515  	case OpRsh32x64:
   516  		return rewriteValue386_OpRsh32x64(v, config)
   517  	case OpRsh32x8:
   518  		return rewriteValue386_OpRsh32x8(v, config)
   519  	case OpRsh8Ux16:
   520  		return rewriteValue386_OpRsh8Ux16(v, config)
   521  	case OpRsh8Ux32:
   522  		return rewriteValue386_OpRsh8Ux32(v, config)
   523  	case OpRsh8Ux64:
   524  		return rewriteValue386_OpRsh8Ux64(v, config)
   525  	case OpRsh8Ux8:
   526  		return rewriteValue386_OpRsh8Ux8(v, config)
   527  	case OpRsh8x16:
   528  		return rewriteValue386_OpRsh8x16(v, config)
   529  	case OpRsh8x32:
   530  		return rewriteValue386_OpRsh8x32(v, config)
   531  	case OpRsh8x64:
   532  		return rewriteValue386_OpRsh8x64(v, config)
   533  	case OpRsh8x8:
   534  		return rewriteValue386_OpRsh8x8(v, config)
   535  	case OpSignExt16to32:
   536  		return rewriteValue386_OpSignExt16to32(v, config)
   537  	case OpSignExt8to16:
   538  		return rewriteValue386_OpSignExt8to16(v, config)
   539  	case OpSignExt8to32:
   540  		return rewriteValue386_OpSignExt8to32(v, config)
   541  	case OpSignmask:
   542  		return rewriteValue386_OpSignmask(v, config)
   543  	case OpSlicemask:
   544  		return rewriteValue386_OpSlicemask(v, config)
   545  	case OpSqrt:
   546  		return rewriteValue386_OpSqrt(v, config)
   547  	case OpStaticCall:
   548  		return rewriteValue386_OpStaticCall(v, config)
   549  	case OpStore:
   550  		return rewriteValue386_OpStore(v, config)
   551  	case OpSub16:
   552  		return rewriteValue386_OpSub16(v, config)
   553  	case OpSub32:
   554  		return rewriteValue386_OpSub32(v, config)
   555  	case OpSub32F:
   556  		return rewriteValue386_OpSub32F(v, config)
   557  	case OpSub32carry:
   558  		return rewriteValue386_OpSub32carry(v, config)
   559  	case OpSub32withcarry:
   560  		return rewriteValue386_OpSub32withcarry(v, config)
   561  	case OpSub64F:
   562  		return rewriteValue386_OpSub64F(v, config)
   563  	case OpSub8:
   564  		return rewriteValue386_OpSub8(v, config)
   565  	case OpSubPtr:
   566  		return rewriteValue386_OpSubPtr(v, config)
   567  	case OpTrunc16to8:
   568  		return rewriteValue386_OpTrunc16to8(v, config)
   569  	case OpTrunc32to16:
   570  		return rewriteValue386_OpTrunc32to16(v, config)
   571  	case OpTrunc32to8:
   572  		return rewriteValue386_OpTrunc32to8(v, config)
   573  	case OpXor16:
   574  		return rewriteValue386_OpXor16(v, config)
   575  	case OpXor32:
   576  		return rewriteValue386_OpXor32(v, config)
   577  	case OpXor8:
   578  		return rewriteValue386_OpXor8(v, config)
   579  	case OpZero:
   580  		return rewriteValue386_OpZero(v, config)
   581  	case OpZeroExt16to32:
   582  		return rewriteValue386_OpZeroExt16to32(v, config)
   583  	case OpZeroExt8to16:
   584  		return rewriteValue386_OpZeroExt8to16(v, config)
   585  	case OpZeroExt8to32:
   586  		return rewriteValue386_OpZeroExt8to32(v, config)
   587  	case OpZeromask:
   588  		return rewriteValue386_OpZeromask(v, config)
   589  	}
   590  	return false
   591  }
   592  func rewriteValue386_Op386ADCL(v *Value, config *Config) bool {
   593  	b := v.Block
   594  	_ = b
   595  	// match: (ADCL x (MOVLconst [c]) f)
   596  	// cond:
   597  	// result: (ADCLconst [c] x f)
   598  	for {
   599  		x := v.Args[0]
   600  		v_1 := v.Args[1]
   601  		if v_1.Op != Op386MOVLconst {
   602  			break
   603  		}
   604  		c := v_1.AuxInt
   605  		f := v.Args[2]
   606  		v.reset(Op386ADCLconst)
   607  		v.AuxInt = c
   608  		v.AddArg(x)
   609  		v.AddArg(f)
   610  		return true
   611  	}
   612  	// match: (ADCL (MOVLconst [c]) x f)
   613  	// cond:
   614  	// result: (ADCLconst [c] x f)
   615  	for {
   616  		v_0 := v.Args[0]
   617  		if v_0.Op != Op386MOVLconst {
   618  			break
   619  		}
   620  		c := v_0.AuxInt
   621  		x := v.Args[1]
   622  		f := v.Args[2]
   623  		v.reset(Op386ADCLconst)
   624  		v.AuxInt = c
   625  		v.AddArg(x)
   626  		v.AddArg(f)
   627  		return true
   628  	}
   629  	return false
   630  }
   631  func rewriteValue386_Op386ADDL(v *Value, config *Config) bool {
   632  	b := v.Block
   633  	_ = b
   634  	// match: (ADDL x (MOVLconst [c]))
   635  	// cond:
   636  	// result: (ADDLconst [c] x)
   637  	for {
   638  		x := v.Args[0]
   639  		v_1 := v.Args[1]
   640  		if v_1.Op != Op386MOVLconst {
   641  			break
   642  		}
   643  		c := v_1.AuxInt
   644  		v.reset(Op386ADDLconst)
   645  		v.AuxInt = c
   646  		v.AddArg(x)
   647  		return true
   648  	}
   649  	// match: (ADDL (MOVLconst [c]) x)
   650  	// cond:
   651  	// result: (ADDLconst [c] x)
   652  	for {
   653  		v_0 := v.Args[0]
   654  		if v_0.Op != Op386MOVLconst {
   655  			break
   656  		}
   657  		c := v_0.AuxInt
   658  		x := v.Args[1]
   659  		v.reset(Op386ADDLconst)
   660  		v.AuxInt = c
   661  		v.AddArg(x)
   662  		return true
   663  	}
   664  	// match: (ADDL x (SHLLconst [3] y))
   665  	// cond:
   666  	// result: (LEAL8 x y)
   667  	for {
   668  		x := v.Args[0]
   669  		v_1 := v.Args[1]
   670  		if v_1.Op != Op386SHLLconst {
   671  			break
   672  		}
   673  		if v_1.AuxInt != 3 {
   674  			break
   675  		}
   676  		y := v_1.Args[0]
   677  		v.reset(Op386LEAL8)
   678  		v.AddArg(x)
   679  		v.AddArg(y)
   680  		return true
   681  	}
   682  	// match: (ADDL x (SHLLconst [2] y))
   683  	// cond:
   684  	// result: (LEAL4 x y)
   685  	for {
   686  		x := v.Args[0]
   687  		v_1 := v.Args[1]
   688  		if v_1.Op != Op386SHLLconst {
   689  			break
   690  		}
   691  		if v_1.AuxInt != 2 {
   692  			break
   693  		}
   694  		y := v_1.Args[0]
   695  		v.reset(Op386LEAL4)
   696  		v.AddArg(x)
   697  		v.AddArg(y)
   698  		return true
   699  	}
   700  	// match: (ADDL x (SHLLconst [1] y))
   701  	// cond:
   702  	// result: (LEAL2 x y)
   703  	for {
   704  		x := v.Args[0]
   705  		v_1 := v.Args[1]
   706  		if v_1.Op != Op386SHLLconst {
   707  			break
   708  		}
   709  		if v_1.AuxInt != 1 {
   710  			break
   711  		}
   712  		y := v_1.Args[0]
   713  		v.reset(Op386LEAL2)
   714  		v.AddArg(x)
   715  		v.AddArg(y)
   716  		return true
   717  	}
   718  	// match: (ADDL x (ADDL y y))
   719  	// cond:
   720  	// result: (LEAL2 x y)
   721  	for {
   722  		x := v.Args[0]
   723  		v_1 := v.Args[1]
   724  		if v_1.Op != Op386ADDL {
   725  			break
   726  		}
   727  		y := v_1.Args[0]
   728  		if y != v_1.Args[1] {
   729  			break
   730  		}
   731  		v.reset(Op386LEAL2)
   732  		v.AddArg(x)
   733  		v.AddArg(y)
   734  		return true
   735  	}
   736  	// match: (ADDL x (ADDL x y))
   737  	// cond:
   738  	// result: (LEAL2 y x)
   739  	for {
   740  		x := v.Args[0]
   741  		v_1 := v.Args[1]
   742  		if v_1.Op != Op386ADDL {
   743  			break
   744  		}
   745  		if x != v_1.Args[0] {
   746  			break
   747  		}
   748  		y := v_1.Args[1]
   749  		v.reset(Op386LEAL2)
   750  		v.AddArg(y)
   751  		v.AddArg(x)
   752  		return true
   753  	}
   754  	// match: (ADDL x (ADDL y x))
   755  	// cond:
   756  	// result: (LEAL2 y x)
   757  	for {
   758  		x := v.Args[0]
   759  		v_1 := v.Args[1]
   760  		if v_1.Op != Op386ADDL {
   761  			break
   762  		}
   763  		y := v_1.Args[0]
   764  		if x != v_1.Args[1] {
   765  			break
   766  		}
   767  		v.reset(Op386LEAL2)
   768  		v.AddArg(y)
   769  		v.AddArg(x)
   770  		return true
   771  	}
   772  	// match: (ADDL (ADDLconst [c] x) y)
   773  	// cond:
   774  	// result: (LEAL1 [c] x y)
   775  	for {
   776  		v_0 := v.Args[0]
   777  		if v_0.Op != Op386ADDLconst {
   778  			break
   779  		}
   780  		c := v_0.AuxInt
   781  		x := v_0.Args[0]
   782  		y := v.Args[1]
   783  		v.reset(Op386LEAL1)
   784  		v.AuxInt = c
   785  		v.AddArg(x)
   786  		v.AddArg(y)
   787  		return true
   788  	}
   789  	// match: (ADDL x (ADDLconst [c] y))
   790  	// cond:
   791  	// result: (LEAL1 [c] x y)
   792  	for {
   793  		x := v.Args[0]
   794  		v_1 := v.Args[1]
   795  		if v_1.Op != Op386ADDLconst {
   796  			break
   797  		}
   798  		c := v_1.AuxInt
   799  		y := v_1.Args[0]
   800  		v.reset(Op386LEAL1)
   801  		v.AuxInt = c
   802  		v.AddArg(x)
   803  		v.AddArg(y)
   804  		return true
   805  	}
   806  	// match: (ADDL x (LEAL [c] {s} y))
   807  	// cond: x.Op != OpSB && y.Op != OpSB
   808  	// result: (LEAL1 [c] {s} x y)
   809  	for {
   810  		x := v.Args[0]
   811  		v_1 := v.Args[1]
   812  		if v_1.Op != Op386LEAL {
   813  			break
   814  		}
   815  		c := v_1.AuxInt
   816  		s := v_1.Aux
   817  		y := v_1.Args[0]
   818  		if !(x.Op != OpSB && y.Op != OpSB) {
   819  			break
   820  		}
   821  		v.reset(Op386LEAL1)
   822  		v.AuxInt = c
   823  		v.Aux = s
   824  		v.AddArg(x)
   825  		v.AddArg(y)
   826  		return true
   827  	}
   828  	// match: (ADDL (LEAL [c] {s} x) y)
   829  	// cond: x.Op != OpSB && y.Op != OpSB
   830  	// result: (LEAL1 [c] {s} x y)
   831  	for {
   832  		v_0 := v.Args[0]
   833  		if v_0.Op != Op386LEAL {
   834  			break
   835  		}
   836  		c := v_0.AuxInt
   837  		s := v_0.Aux
   838  		x := v_0.Args[0]
   839  		y := v.Args[1]
   840  		if !(x.Op != OpSB && y.Op != OpSB) {
   841  			break
   842  		}
   843  		v.reset(Op386LEAL1)
   844  		v.AuxInt = c
   845  		v.Aux = s
   846  		v.AddArg(x)
   847  		v.AddArg(y)
   848  		return true
   849  	}
   850  	// match: (ADDL x (NEGL y))
   851  	// cond:
   852  	// result: (SUBL x y)
   853  	for {
   854  		x := v.Args[0]
   855  		v_1 := v.Args[1]
   856  		if v_1.Op != Op386NEGL {
   857  			break
   858  		}
   859  		y := v_1.Args[0]
   860  		v.reset(Op386SUBL)
   861  		v.AddArg(x)
   862  		v.AddArg(y)
   863  		return true
   864  	}
   865  	return false
   866  }
   867  func rewriteValue386_Op386ADDLcarry(v *Value, config *Config) bool {
   868  	b := v.Block
   869  	_ = b
   870  	// match: (ADDLcarry x (MOVLconst [c]))
   871  	// cond:
   872  	// result: (ADDLconstcarry [c] x)
   873  	for {
   874  		x := v.Args[0]
   875  		v_1 := v.Args[1]
   876  		if v_1.Op != Op386MOVLconst {
   877  			break
   878  		}
   879  		c := v_1.AuxInt
   880  		v.reset(Op386ADDLconstcarry)
   881  		v.AuxInt = c
   882  		v.AddArg(x)
   883  		return true
   884  	}
   885  	// match: (ADDLcarry (MOVLconst [c]) x)
   886  	// cond:
   887  	// result: (ADDLconstcarry [c] x)
   888  	for {
   889  		v_0 := v.Args[0]
   890  		if v_0.Op != Op386MOVLconst {
   891  			break
   892  		}
   893  		c := v_0.AuxInt
   894  		x := v.Args[1]
   895  		v.reset(Op386ADDLconstcarry)
   896  		v.AuxInt = c
   897  		v.AddArg(x)
   898  		return true
   899  	}
   900  	return false
   901  }
   902  func rewriteValue386_Op386ADDLconst(v *Value, config *Config) bool {
   903  	b := v.Block
   904  	_ = b
   905  	// match: (ADDLconst [c] (ADDL x y))
   906  	// cond:
   907  	// result: (LEAL1 [c] x y)
   908  	for {
   909  		c := v.AuxInt
   910  		v_0 := v.Args[0]
   911  		if v_0.Op != Op386ADDL {
   912  			break
   913  		}
   914  		x := v_0.Args[0]
   915  		y := v_0.Args[1]
   916  		v.reset(Op386LEAL1)
   917  		v.AuxInt = c
   918  		v.AddArg(x)
   919  		v.AddArg(y)
   920  		return true
   921  	}
   922  	// match: (ADDLconst [c] (LEAL [d] {s} x))
   923  	// cond: is32Bit(c+d)
   924  	// result: (LEAL [c+d] {s} x)
   925  	for {
   926  		c := v.AuxInt
   927  		v_0 := v.Args[0]
   928  		if v_0.Op != Op386LEAL {
   929  			break
   930  		}
   931  		d := v_0.AuxInt
   932  		s := v_0.Aux
   933  		x := v_0.Args[0]
   934  		if !(is32Bit(c + d)) {
   935  			break
   936  		}
   937  		v.reset(Op386LEAL)
   938  		v.AuxInt = c + d
   939  		v.Aux = s
   940  		v.AddArg(x)
   941  		return true
   942  	}
   943  	// match: (ADDLconst [c] (LEAL1 [d] {s} x y))
   944  	// cond: is32Bit(c+d)
   945  	// result: (LEAL1 [c+d] {s} x y)
   946  	for {
   947  		c := v.AuxInt
   948  		v_0 := v.Args[0]
   949  		if v_0.Op != Op386LEAL1 {
   950  			break
   951  		}
   952  		d := v_0.AuxInt
   953  		s := v_0.Aux
   954  		x := v_0.Args[0]
   955  		y := v_0.Args[1]
   956  		if !(is32Bit(c + d)) {
   957  			break
   958  		}
   959  		v.reset(Op386LEAL1)
   960  		v.AuxInt = c + d
   961  		v.Aux = s
   962  		v.AddArg(x)
   963  		v.AddArg(y)
   964  		return true
   965  	}
   966  	// match: (ADDLconst [c] (LEAL2 [d] {s} x y))
   967  	// cond: is32Bit(c+d)
   968  	// result: (LEAL2 [c+d] {s} x y)
   969  	for {
   970  		c := v.AuxInt
   971  		v_0 := v.Args[0]
   972  		if v_0.Op != Op386LEAL2 {
   973  			break
   974  		}
   975  		d := v_0.AuxInt
   976  		s := v_0.Aux
   977  		x := v_0.Args[0]
   978  		y := v_0.Args[1]
   979  		if !(is32Bit(c + d)) {
   980  			break
   981  		}
   982  		v.reset(Op386LEAL2)
   983  		v.AuxInt = c + d
   984  		v.Aux = s
   985  		v.AddArg(x)
   986  		v.AddArg(y)
   987  		return true
   988  	}
   989  	// match: (ADDLconst [c] (LEAL4 [d] {s} x y))
   990  	// cond: is32Bit(c+d)
   991  	// result: (LEAL4 [c+d] {s} x y)
   992  	for {
   993  		c := v.AuxInt
   994  		v_0 := v.Args[0]
   995  		if v_0.Op != Op386LEAL4 {
   996  			break
   997  		}
   998  		d := v_0.AuxInt
   999  		s := v_0.Aux
  1000  		x := v_0.Args[0]
  1001  		y := v_0.Args[1]
  1002  		if !(is32Bit(c + d)) {
  1003  			break
  1004  		}
  1005  		v.reset(Op386LEAL4)
  1006  		v.AuxInt = c + d
  1007  		v.Aux = s
  1008  		v.AddArg(x)
  1009  		v.AddArg(y)
  1010  		return true
  1011  	}
  1012  	// match: (ADDLconst [c] (LEAL8 [d] {s} x y))
  1013  	// cond: is32Bit(c+d)
  1014  	// result: (LEAL8 [c+d] {s} x y)
  1015  	for {
  1016  		c := v.AuxInt
  1017  		v_0 := v.Args[0]
  1018  		if v_0.Op != Op386LEAL8 {
  1019  			break
  1020  		}
  1021  		d := v_0.AuxInt
  1022  		s := v_0.Aux
  1023  		x := v_0.Args[0]
  1024  		y := v_0.Args[1]
  1025  		if !(is32Bit(c + d)) {
  1026  			break
  1027  		}
  1028  		v.reset(Op386LEAL8)
  1029  		v.AuxInt = c + d
  1030  		v.Aux = s
  1031  		v.AddArg(x)
  1032  		v.AddArg(y)
  1033  		return true
  1034  	}
  1035  	// match: (ADDLconst [c] x)
  1036  	// cond: int32(c)==0
  1037  	// result: x
  1038  	for {
  1039  		c := v.AuxInt
  1040  		x := v.Args[0]
  1041  		if !(int32(c) == 0) {
  1042  			break
  1043  		}
  1044  		v.reset(OpCopy)
  1045  		v.Type = x.Type
  1046  		v.AddArg(x)
  1047  		return true
  1048  	}
  1049  	// match: (ADDLconst [c] (MOVLconst [d]))
  1050  	// cond:
  1051  	// result: (MOVLconst [int64(int32(c+d))])
  1052  	for {
  1053  		c := v.AuxInt
  1054  		v_0 := v.Args[0]
  1055  		if v_0.Op != Op386MOVLconst {
  1056  			break
  1057  		}
  1058  		d := v_0.AuxInt
  1059  		v.reset(Op386MOVLconst)
  1060  		v.AuxInt = int64(int32(c + d))
  1061  		return true
  1062  	}
  1063  	// match: (ADDLconst [c] (ADDLconst [d] x))
  1064  	// cond:
  1065  	// result: (ADDLconst [int64(int32(c+d))] x)
  1066  	for {
  1067  		c := v.AuxInt
  1068  		v_0 := v.Args[0]
  1069  		if v_0.Op != Op386ADDLconst {
  1070  			break
  1071  		}
  1072  		d := v_0.AuxInt
  1073  		x := v_0.Args[0]
  1074  		v.reset(Op386ADDLconst)
  1075  		v.AuxInt = int64(int32(c + d))
  1076  		v.AddArg(x)
  1077  		return true
  1078  	}
  1079  	return false
  1080  }
  1081  func rewriteValue386_Op386ANDL(v *Value, config *Config) bool {
  1082  	b := v.Block
  1083  	_ = b
  1084  	// match: (ANDL x (MOVLconst [c]))
  1085  	// cond:
  1086  	// result: (ANDLconst [c] x)
  1087  	for {
  1088  		x := v.Args[0]
  1089  		v_1 := v.Args[1]
  1090  		if v_1.Op != Op386MOVLconst {
  1091  			break
  1092  		}
  1093  		c := v_1.AuxInt
  1094  		v.reset(Op386ANDLconst)
  1095  		v.AuxInt = c
  1096  		v.AddArg(x)
  1097  		return true
  1098  	}
  1099  	// match: (ANDL (MOVLconst [c]) x)
  1100  	// cond:
  1101  	// result: (ANDLconst [c] x)
  1102  	for {
  1103  		v_0 := v.Args[0]
  1104  		if v_0.Op != Op386MOVLconst {
  1105  			break
  1106  		}
  1107  		c := v_0.AuxInt
  1108  		x := v.Args[1]
  1109  		v.reset(Op386ANDLconst)
  1110  		v.AuxInt = c
  1111  		v.AddArg(x)
  1112  		return true
  1113  	}
  1114  	// match: (ANDL x x)
  1115  	// cond:
  1116  	// result: x
  1117  	for {
  1118  		x := v.Args[0]
  1119  		if x != v.Args[1] {
  1120  			break
  1121  		}
  1122  		v.reset(OpCopy)
  1123  		v.Type = x.Type
  1124  		v.AddArg(x)
  1125  		return true
  1126  	}
  1127  	return false
  1128  }
  1129  func rewriteValue386_Op386ANDLconst(v *Value, config *Config) bool {
  1130  	b := v.Block
  1131  	_ = b
  1132  	// match: (ANDLconst [c] (ANDLconst [d] x))
  1133  	// cond:
  1134  	// result: (ANDLconst [c & d] x)
  1135  	for {
  1136  		c := v.AuxInt
  1137  		v_0 := v.Args[0]
  1138  		if v_0.Op != Op386ANDLconst {
  1139  			break
  1140  		}
  1141  		d := v_0.AuxInt
  1142  		x := v_0.Args[0]
  1143  		v.reset(Op386ANDLconst)
  1144  		v.AuxInt = c & d
  1145  		v.AddArg(x)
  1146  		return true
  1147  	}
  1148  	// match: (ANDLconst [c] _)
  1149  	// cond: int32(c)==0
  1150  	// result: (MOVLconst [0])
  1151  	for {
  1152  		c := v.AuxInt
  1153  		if !(int32(c) == 0) {
  1154  			break
  1155  		}
  1156  		v.reset(Op386MOVLconst)
  1157  		v.AuxInt = 0
  1158  		return true
  1159  	}
  1160  	// match: (ANDLconst [c] x)
  1161  	// cond: int32(c)==-1
  1162  	// result: x
  1163  	for {
  1164  		c := v.AuxInt
  1165  		x := v.Args[0]
  1166  		if !(int32(c) == -1) {
  1167  			break
  1168  		}
  1169  		v.reset(OpCopy)
  1170  		v.Type = x.Type
  1171  		v.AddArg(x)
  1172  		return true
  1173  	}
  1174  	// match: (ANDLconst [c] (MOVLconst [d]))
  1175  	// cond:
  1176  	// result: (MOVLconst [c&d])
  1177  	for {
  1178  		c := v.AuxInt
  1179  		v_0 := v.Args[0]
  1180  		if v_0.Op != Op386MOVLconst {
  1181  			break
  1182  		}
  1183  		d := v_0.AuxInt
  1184  		v.reset(Op386MOVLconst)
  1185  		v.AuxInt = c & d
  1186  		return true
  1187  	}
  1188  	return false
  1189  }
  1190  func rewriteValue386_Op386CMPB(v *Value, config *Config) bool {
  1191  	b := v.Block
  1192  	_ = b
  1193  	// match: (CMPB x (MOVLconst [c]))
  1194  	// cond:
  1195  	// result: (CMPBconst x [int64(int8(c))])
  1196  	for {
  1197  		x := v.Args[0]
  1198  		v_1 := v.Args[1]
  1199  		if v_1.Op != Op386MOVLconst {
  1200  			break
  1201  		}
  1202  		c := v_1.AuxInt
  1203  		v.reset(Op386CMPBconst)
  1204  		v.AuxInt = int64(int8(c))
  1205  		v.AddArg(x)
  1206  		return true
  1207  	}
  1208  	// match: (CMPB (MOVLconst [c]) x)
  1209  	// cond:
  1210  	// result: (InvertFlags (CMPBconst x [int64(int8(c))]))
  1211  	for {
  1212  		v_0 := v.Args[0]
  1213  		if v_0.Op != Op386MOVLconst {
  1214  			break
  1215  		}
  1216  		c := v_0.AuxInt
  1217  		x := v.Args[1]
  1218  		v.reset(Op386InvertFlags)
  1219  		v0 := b.NewValue0(v.Line, Op386CMPBconst, TypeFlags)
  1220  		v0.AuxInt = int64(int8(c))
  1221  		v0.AddArg(x)
  1222  		v.AddArg(v0)
  1223  		return true
  1224  	}
  1225  	return false
  1226  }
  1227  func rewriteValue386_Op386CMPBconst(v *Value, config *Config) bool {
  1228  	b := v.Block
  1229  	_ = b
  1230  	// match: (CMPBconst (MOVLconst [x]) [y])
  1231  	// cond: int8(x)==int8(y)
  1232  	// result: (FlagEQ)
  1233  	for {
  1234  		y := v.AuxInt
  1235  		v_0 := v.Args[0]
  1236  		if v_0.Op != Op386MOVLconst {
  1237  			break
  1238  		}
  1239  		x := v_0.AuxInt
  1240  		if !(int8(x) == int8(y)) {
  1241  			break
  1242  		}
  1243  		v.reset(Op386FlagEQ)
  1244  		return true
  1245  	}
  1246  	// match: (CMPBconst (MOVLconst [x]) [y])
  1247  	// cond: int8(x)<int8(y) && uint8(x)<uint8(y)
  1248  	// result: (FlagLT_ULT)
  1249  	for {
  1250  		y := v.AuxInt
  1251  		v_0 := v.Args[0]
  1252  		if v_0.Op != Op386MOVLconst {
  1253  			break
  1254  		}
  1255  		x := v_0.AuxInt
  1256  		if !(int8(x) < int8(y) && uint8(x) < uint8(y)) {
  1257  			break
  1258  		}
  1259  		v.reset(Op386FlagLT_ULT)
  1260  		return true
  1261  	}
  1262  	// match: (CMPBconst (MOVLconst [x]) [y])
  1263  	// cond: int8(x)<int8(y) && uint8(x)>uint8(y)
  1264  	// result: (FlagLT_UGT)
  1265  	for {
  1266  		y := v.AuxInt
  1267  		v_0 := v.Args[0]
  1268  		if v_0.Op != Op386MOVLconst {
  1269  			break
  1270  		}
  1271  		x := v_0.AuxInt
  1272  		if !(int8(x) < int8(y) && uint8(x) > uint8(y)) {
  1273  			break
  1274  		}
  1275  		v.reset(Op386FlagLT_UGT)
  1276  		return true
  1277  	}
  1278  	// match: (CMPBconst (MOVLconst [x]) [y])
  1279  	// cond: int8(x)>int8(y) && uint8(x)<uint8(y)
  1280  	// result: (FlagGT_ULT)
  1281  	for {
  1282  		y := v.AuxInt
  1283  		v_0 := v.Args[0]
  1284  		if v_0.Op != Op386MOVLconst {
  1285  			break
  1286  		}
  1287  		x := v_0.AuxInt
  1288  		if !(int8(x) > int8(y) && uint8(x) < uint8(y)) {
  1289  			break
  1290  		}
  1291  		v.reset(Op386FlagGT_ULT)
  1292  		return true
  1293  	}
  1294  	// match: (CMPBconst (MOVLconst [x]) [y])
  1295  	// cond: int8(x)>int8(y) && uint8(x)>uint8(y)
  1296  	// result: (FlagGT_UGT)
  1297  	for {
  1298  		y := v.AuxInt
  1299  		v_0 := v.Args[0]
  1300  		if v_0.Op != Op386MOVLconst {
  1301  			break
  1302  		}
  1303  		x := v_0.AuxInt
  1304  		if !(int8(x) > int8(y) && uint8(x) > uint8(y)) {
  1305  			break
  1306  		}
  1307  		v.reset(Op386FlagGT_UGT)
  1308  		return true
  1309  	}
  1310  	// match: (CMPBconst (ANDLconst _ [m]) [n])
  1311  	// cond: 0 <= int8(m) && int8(m) < int8(n)
  1312  	// result: (FlagLT_ULT)
  1313  	for {
  1314  		n := v.AuxInt
  1315  		v_0 := v.Args[0]
  1316  		if v_0.Op != Op386ANDLconst {
  1317  			break
  1318  		}
  1319  		m := v_0.AuxInt
  1320  		if !(0 <= int8(m) && int8(m) < int8(n)) {
  1321  			break
  1322  		}
  1323  		v.reset(Op386FlagLT_ULT)
  1324  		return true
  1325  	}
  1326  	// match: (CMPBconst (ANDL x y) [0])
  1327  	// cond:
  1328  	// result: (TESTB x y)
  1329  	for {
  1330  		if v.AuxInt != 0 {
  1331  			break
  1332  		}
  1333  		v_0 := v.Args[0]
  1334  		if v_0.Op != Op386ANDL {
  1335  			break
  1336  		}
  1337  		x := v_0.Args[0]
  1338  		y := v_0.Args[1]
  1339  		v.reset(Op386TESTB)
  1340  		v.AddArg(x)
  1341  		v.AddArg(y)
  1342  		return true
  1343  	}
  1344  	// match: (CMPBconst (ANDLconst [c] x) [0])
  1345  	// cond:
  1346  	// result: (TESTBconst [int64(int8(c))] x)
  1347  	for {
  1348  		if v.AuxInt != 0 {
  1349  			break
  1350  		}
  1351  		v_0 := v.Args[0]
  1352  		if v_0.Op != Op386ANDLconst {
  1353  			break
  1354  		}
  1355  		c := v_0.AuxInt
  1356  		x := v_0.Args[0]
  1357  		v.reset(Op386TESTBconst)
  1358  		v.AuxInt = int64(int8(c))
  1359  		v.AddArg(x)
  1360  		return true
  1361  	}
  1362  	// match: (CMPBconst x [0])
  1363  	// cond:
  1364  	// result: (TESTB x x)
  1365  	for {
  1366  		if v.AuxInt != 0 {
  1367  			break
  1368  		}
  1369  		x := v.Args[0]
  1370  		v.reset(Op386TESTB)
  1371  		v.AddArg(x)
  1372  		v.AddArg(x)
  1373  		return true
  1374  	}
  1375  	return false
  1376  }
  1377  func rewriteValue386_Op386CMPL(v *Value, config *Config) bool {
  1378  	b := v.Block
  1379  	_ = b
  1380  	// match: (CMPL x (MOVLconst [c]))
  1381  	// cond:
  1382  	// result: (CMPLconst x [c])
  1383  	for {
  1384  		x := v.Args[0]
  1385  		v_1 := v.Args[1]
  1386  		if v_1.Op != Op386MOVLconst {
  1387  			break
  1388  		}
  1389  		c := v_1.AuxInt
  1390  		v.reset(Op386CMPLconst)
  1391  		v.AuxInt = c
  1392  		v.AddArg(x)
  1393  		return true
  1394  	}
  1395  	// match: (CMPL (MOVLconst [c]) x)
  1396  	// cond:
  1397  	// result: (InvertFlags (CMPLconst x [c]))
  1398  	for {
  1399  		v_0 := v.Args[0]
  1400  		if v_0.Op != Op386MOVLconst {
  1401  			break
  1402  		}
  1403  		c := v_0.AuxInt
  1404  		x := v.Args[1]
  1405  		v.reset(Op386InvertFlags)
  1406  		v0 := b.NewValue0(v.Line, Op386CMPLconst, TypeFlags)
  1407  		v0.AuxInt = c
  1408  		v0.AddArg(x)
  1409  		v.AddArg(v0)
  1410  		return true
  1411  	}
  1412  	return false
  1413  }
  1414  func rewriteValue386_Op386CMPLconst(v *Value, config *Config) bool {
  1415  	b := v.Block
  1416  	_ = b
  1417  	// match: (CMPLconst (MOVLconst [x]) [y])
  1418  	// cond: int32(x)==int32(y)
  1419  	// result: (FlagEQ)
  1420  	for {
  1421  		y := v.AuxInt
  1422  		v_0 := v.Args[0]
  1423  		if v_0.Op != Op386MOVLconst {
  1424  			break
  1425  		}
  1426  		x := v_0.AuxInt
  1427  		if !(int32(x) == int32(y)) {
  1428  			break
  1429  		}
  1430  		v.reset(Op386FlagEQ)
  1431  		return true
  1432  	}
  1433  	// match: (CMPLconst (MOVLconst [x]) [y])
  1434  	// cond: int32(x)<int32(y) && uint32(x)<uint32(y)
  1435  	// result: (FlagLT_ULT)
  1436  	for {
  1437  		y := v.AuxInt
  1438  		v_0 := v.Args[0]
  1439  		if v_0.Op != Op386MOVLconst {
  1440  			break
  1441  		}
  1442  		x := v_0.AuxInt
  1443  		if !(int32(x) < int32(y) && uint32(x) < uint32(y)) {
  1444  			break
  1445  		}
  1446  		v.reset(Op386FlagLT_ULT)
  1447  		return true
  1448  	}
  1449  	// match: (CMPLconst (MOVLconst [x]) [y])
  1450  	// cond: int32(x)<int32(y) && uint32(x)>uint32(y)
  1451  	// result: (FlagLT_UGT)
  1452  	for {
  1453  		y := v.AuxInt
  1454  		v_0 := v.Args[0]
  1455  		if v_0.Op != Op386MOVLconst {
  1456  			break
  1457  		}
  1458  		x := v_0.AuxInt
  1459  		if !(int32(x) < int32(y) && uint32(x) > uint32(y)) {
  1460  			break
  1461  		}
  1462  		v.reset(Op386FlagLT_UGT)
  1463  		return true
  1464  	}
  1465  	// match: (CMPLconst (MOVLconst [x]) [y])
  1466  	// cond: int32(x)>int32(y) && uint32(x)<uint32(y)
  1467  	// result: (FlagGT_ULT)
  1468  	for {
  1469  		y := v.AuxInt
  1470  		v_0 := v.Args[0]
  1471  		if v_0.Op != Op386MOVLconst {
  1472  			break
  1473  		}
  1474  		x := v_0.AuxInt
  1475  		if !(int32(x) > int32(y) && uint32(x) < uint32(y)) {
  1476  			break
  1477  		}
  1478  		v.reset(Op386FlagGT_ULT)
  1479  		return true
  1480  	}
  1481  	// match: (CMPLconst (MOVLconst [x]) [y])
  1482  	// cond: int32(x)>int32(y) && uint32(x)>uint32(y)
  1483  	// result: (FlagGT_UGT)
  1484  	for {
  1485  		y := v.AuxInt
  1486  		v_0 := v.Args[0]
  1487  		if v_0.Op != Op386MOVLconst {
  1488  			break
  1489  		}
  1490  		x := v_0.AuxInt
  1491  		if !(int32(x) > int32(y) && uint32(x) > uint32(y)) {
  1492  			break
  1493  		}
  1494  		v.reset(Op386FlagGT_UGT)
  1495  		return true
  1496  	}
  1497  	// match: (CMPLconst (SHRLconst _ [c]) [n])
  1498  	// cond: 0 <= n && 0 < c && c <= 32 && (1<<uint64(32-c)) <= uint64(n)
  1499  	// result: (FlagLT_ULT)
  1500  	for {
  1501  		n := v.AuxInt
  1502  		v_0 := v.Args[0]
  1503  		if v_0.Op != Op386SHRLconst {
  1504  			break
  1505  		}
  1506  		c := v_0.AuxInt
  1507  		if !(0 <= n && 0 < c && c <= 32 && (1<<uint64(32-c)) <= uint64(n)) {
  1508  			break
  1509  		}
  1510  		v.reset(Op386FlagLT_ULT)
  1511  		return true
  1512  	}
  1513  	// match: (CMPLconst (ANDLconst _ [m]) [n])
  1514  	// cond: 0 <= int32(m) && int32(m) < int32(n)
  1515  	// result: (FlagLT_ULT)
  1516  	for {
  1517  		n := v.AuxInt
  1518  		v_0 := v.Args[0]
  1519  		if v_0.Op != Op386ANDLconst {
  1520  			break
  1521  		}
  1522  		m := v_0.AuxInt
  1523  		if !(0 <= int32(m) && int32(m) < int32(n)) {
  1524  			break
  1525  		}
  1526  		v.reset(Op386FlagLT_ULT)
  1527  		return true
  1528  	}
  1529  	// match: (CMPLconst (ANDL x y) [0])
  1530  	// cond:
  1531  	// result: (TESTL x y)
  1532  	for {
  1533  		if v.AuxInt != 0 {
  1534  			break
  1535  		}
  1536  		v_0 := v.Args[0]
  1537  		if v_0.Op != Op386ANDL {
  1538  			break
  1539  		}
  1540  		x := v_0.Args[0]
  1541  		y := v_0.Args[1]
  1542  		v.reset(Op386TESTL)
  1543  		v.AddArg(x)
  1544  		v.AddArg(y)
  1545  		return true
  1546  	}
  1547  	// match: (CMPLconst (ANDLconst [c] x) [0])
  1548  	// cond:
  1549  	// result: (TESTLconst [c] x)
  1550  	for {
  1551  		if v.AuxInt != 0 {
  1552  			break
  1553  		}
  1554  		v_0 := v.Args[0]
  1555  		if v_0.Op != Op386ANDLconst {
  1556  			break
  1557  		}
  1558  		c := v_0.AuxInt
  1559  		x := v_0.Args[0]
  1560  		v.reset(Op386TESTLconst)
  1561  		v.AuxInt = c
  1562  		v.AddArg(x)
  1563  		return true
  1564  	}
  1565  	// match: (CMPLconst x [0])
  1566  	// cond:
  1567  	// result: (TESTL x x)
  1568  	for {
  1569  		if v.AuxInt != 0 {
  1570  			break
  1571  		}
  1572  		x := v.Args[0]
  1573  		v.reset(Op386TESTL)
  1574  		v.AddArg(x)
  1575  		v.AddArg(x)
  1576  		return true
  1577  	}
  1578  	return false
  1579  }
  1580  func rewriteValue386_Op386CMPW(v *Value, config *Config) bool {
  1581  	b := v.Block
  1582  	_ = b
  1583  	// match: (CMPW x (MOVLconst [c]))
  1584  	// cond:
  1585  	// result: (CMPWconst x [int64(int16(c))])
  1586  	for {
  1587  		x := v.Args[0]
  1588  		v_1 := v.Args[1]
  1589  		if v_1.Op != Op386MOVLconst {
  1590  			break
  1591  		}
  1592  		c := v_1.AuxInt
  1593  		v.reset(Op386CMPWconst)
  1594  		v.AuxInt = int64(int16(c))
  1595  		v.AddArg(x)
  1596  		return true
  1597  	}
  1598  	// match: (CMPW (MOVLconst [c]) x)
  1599  	// cond:
  1600  	// result: (InvertFlags (CMPWconst x [int64(int16(c))]))
  1601  	for {
  1602  		v_0 := v.Args[0]
  1603  		if v_0.Op != Op386MOVLconst {
  1604  			break
  1605  		}
  1606  		c := v_0.AuxInt
  1607  		x := v.Args[1]
  1608  		v.reset(Op386InvertFlags)
  1609  		v0 := b.NewValue0(v.Line, Op386CMPWconst, TypeFlags)
  1610  		v0.AuxInt = int64(int16(c))
  1611  		v0.AddArg(x)
  1612  		v.AddArg(v0)
  1613  		return true
  1614  	}
  1615  	return false
  1616  }
  1617  func rewriteValue386_Op386CMPWconst(v *Value, config *Config) bool {
  1618  	b := v.Block
  1619  	_ = b
  1620  	// match: (CMPWconst (MOVLconst [x]) [y])
  1621  	// cond: int16(x)==int16(y)
  1622  	// result: (FlagEQ)
  1623  	for {
  1624  		y := v.AuxInt
  1625  		v_0 := v.Args[0]
  1626  		if v_0.Op != Op386MOVLconst {
  1627  			break
  1628  		}
  1629  		x := v_0.AuxInt
  1630  		if !(int16(x) == int16(y)) {
  1631  			break
  1632  		}
  1633  		v.reset(Op386FlagEQ)
  1634  		return true
  1635  	}
  1636  	// match: (CMPWconst (MOVLconst [x]) [y])
  1637  	// cond: int16(x)<int16(y) && uint16(x)<uint16(y)
  1638  	// result: (FlagLT_ULT)
  1639  	for {
  1640  		y := v.AuxInt
  1641  		v_0 := v.Args[0]
  1642  		if v_0.Op != Op386MOVLconst {
  1643  			break
  1644  		}
  1645  		x := v_0.AuxInt
  1646  		if !(int16(x) < int16(y) && uint16(x) < uint16(y)) {
  1647  			break
  1648  		}
  1649  		v.reset(Op386FlagLT_ULT)
  1650  		return true
  1651  	}
  1652  	// match: (CMPWconst (MOVLconst [x]) [y])
  1653  	// cond: int16(x)<int16(y) && uint16(x)>uint16(y)
  1654  	// result: (FlagLT_UGT)
  1655  	for {
  1656  		y := v.AuxInt
  1657  		v_0 := v.Args[0]
  1658  		if v_0.Op != Op386MOVLconst {
  1659  			break
  1660  		}
  1661  		x := v_0.AuxInt
  1662  		if !(int16(x) < int16(y) && uint16(x) > uint16(y)) {
  1663  			break
  1664  		}
  1665  		v.reset(Op386FlagLT_UGT)
  1666  		return true
  1667  	}
  1668  	// match: (CMPWconst (MOVLconst [x]) [y])
  1669  	// cond: int16(x)>int16(y) && uint16(x)<uint16(y)
  1670  	// result: (FlagGT_ULT)
  1671  	for {
  1672  		y := v.AuxInt
  1673  		v_0 := v.Args[0]
  1674  		if v_0.Op != Op386MOVLconst {
  1675  			break
  1676  		}
  1677  		x := v_0.AuxInt
  1678  		if !(int16(x) > int16(y) && uint16(x) < uint16(y)) {
  1679  			break
  1680  		}
  1681  		v.reset(Op386FlagGT_ULT)
  1682  		return true
  1683  	}
  1684  	// match: (CMPWconst (MOVLconst [x]) [y])
  1685  	// cond: int16(x)>int16(y) && uint16(x)>uint16(y)
  1686  	// result: (FlagGT_UGT)
  1687  	for {
  1688  		y := v.AuxInt
  1689  		v_0 := v.Args[0]
  1690  		if v_0.Op != Op386MOVLconst {
  1691  			break
  1692  		}
  1693  		x := v_0.AuxInt
  1694  		if !(int16(x) > int16(y) && uint16(x) > uint16(y)) {
  1695  			break
  1696  		}
  1697  		v.reset(Op386FlagGT_UGT)
  1698  		return true
  1699  	}
  1700  	// match: (CMPWconst (ANDLconst _ [m]) [n])
  1701  	// cond: 0 <= int16(m) && int16(m) < int16(n)
  1702  	// result: (FlagLT_ULT)
  1703  	for {
  1704  		n := v.AuxInt
  1705  		v_0 := v.Args[0]
  1706  		if v_0.Op != Op386ANDLconst {
  1707  			break
  1708  		}
  1709  		m := v_0.AuxInt
  1710  		if !(0 <= int16(m) && int16(m) < int16(n)) {
  1711  			break
  1712  		}
  1713  		v.reset(Op386FlagLT_ULT)
  1714  		return true
  1715  	}
  1716  	// match: (CMPWconst (ANDL x y) [0])
  1717  	// cond:
  1718  	// result: (TESTW x y)
  1719  	for {
  1720  		if v.AuxInt != 0 {
  1721  			break
  1722  		}
  1723  		v_0 := v.Args[0]
  1724  		if v_0.Op != Op386ANDL {
  1725  			break
  1726  		}
  1727  		x := v_0.Args[0]
  1728  		y := v_0.Args[1]
  1729  		v.reset(Op386TESTW)
  1730  		v.AddArg(x)
  1731  		v.AddArg(y)
  1732  		return true
  1733  	}
  1734  	// match: (CMPWconst (ANDLconst [c] x) [0])
  1735  	// cond:
  1736  	// result: (TESTWconst [int64(int16(c))] x)
  1737  	for {
  1738  		if v.AuxInt != 0 {
  1739  			break
  1740  		}
  1741  		v_0 := v.Args[0]
  1742  		if v_0.Op != Op386ANDLconst {
  1743  			break
  1744  		}
  1745  		c := v_0.AuxInt
  1746  		x := v_0.Args[0]
  1747  		v.reset(Op386TESTWconst)
  1748  		v.AuxInt = int64(int16(c))
  1749  		v.AddArg(x)
  1750  		return true
  1751  	}
  1752  	// match: (CMPWconst x [0])
  1753  	// cond:
  1754  	// result: (TESTW x x)
  1755  	for {
  1756  		if v.AuxInt != 0 {
  1757  			break
  1758  		}
  1759  		x := v.Args[0]
  1760  		v.reset(Op386TESTW)
  1761  		v.AddArg(x)
  1762  		v.AddArg(x)
  1763  		return true
  1764  	}
  1765  	return false
  1766  }
  1767  func rewriteValue386_Op386LEAL(v *Value, config *Config) bool {
  1768  	b := v.Block
  1769  	_ = b
  1770  	// match: (LEAL [c] {s} (ADDLconst [d] x))
  1771  	// cond: is32Bit(c+d)
  1772  	// result: (LEAL [c+d] {s} x)
  1773  	for {
  1774  		c := v.AuxInt
  1775  		s := v.Aux
  1776  		v_0 := v.Args[0]
  1777  		if v_0.Op != Op386ADDLconst {
  1778  			break
  1779  		}
  1780  		d := v_0.AuxInt
  1781  		x := v_0.Args[0]
  1782  		if !(is32Bit(c + d)) {
  1783  			break
  1784  		}
  1785  		v.reset(Op386LEAL)
  1786  		v.AuxInt = c + d
  1787  		v.Aux = s
  1788  		v.AddArg(x)
  1789  		return true
  1790  	}
  1791  	// match: (LEAL [c] {s} (ADDL x y))
  1792  	// cond: x.Op != OpSB && y.Op != OpSB
  1793  	// result: (LEAL1 [c] {s} x y)
  1794  	for {
  1795  		c := v.AuxInt
  1796  		s := v.Aux
  1797  		v_0 := v.Args[0]
  1798  		if v_0.Op != Op386ADDL {
  1799  			break
  1800  		}
  1801  		x := v_0.Args[0]
  1802  		y := v_0.Args[1]
  1803  		if !(x.Op != OpSB && y.Op != OpSB) {
  1804  			break
  1805  		}
  1806  		v.reset(Op386LEAL1)
  1807  		v.AuxInt = c
  1808  		v.Aux = s
  1809  		v.AddArg(x)
  1810  		v.AddArg(y)
  1811  		return true
  1812  	}
  1813  	// match: (LEAL [off1] {sym1} (LEAL [off2] {sym2} x))
  1814  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  1815  	// result: (LEAL [off1+off2] {mergeSym(sym1,sym2)} x)
  1816  	for {
  1817  		off1 := v.AuxInt
  1818  		sym1 := v.Aux
  1819  		v_0 := v.Args[0]
  1820  		if v_0.Op != Op386LEAL {
  1821  			break
  1822  		}
  1823  		off2 := v_0.AuxInt
  1824  		sym2 := v_0.Aux
  1825  		x := v_0.Args[0]
  1826  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  1827  			break
  1828  		}
  1829  		v.reset(Op386LEAL)
  1830  		v.AuxInt = off1 + off2
  1831  		v.Aux = mergeSym(sym1, sym2)
  1832  		v.AddArg(x)
  1833  		return true
  1834  	}
  1835  	// match: (LEAL [off1] {sym1} (LEAL1 [off2] {sym2} x y))
  1836  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  1837  	// result: (LEAL1 [off1+off2] {mergeSym(sym1,sym2)} x y)
  1838  	for {
  1839  		off1 := v.AuxInt
  1840  		sym1 := v.Aux
  1841  		v_0 := v.Args[0]
  1842  		if v_0.Op != Op386LEAL1 {
  1843  			break
  1844  		}
  1845  		off2 := v_0.AuxInt
  1846  		sym2 := v_0.Aux
  1847  		x := v_0.Args[0]
  1848  		y := v_0.Args[1]
  1849  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  1850  			break
  1851  		}
  1852  		v.reset(Op386LEAL1)
  1853  		v.AuxInt = off1 + off2
  1854  		v.Aux = mergeSym(sym1, sym2)
  1855  		v.AddArg(x)
  1856  		v.AddArg(y)
  1857  		return true
  1858  	}
  1859  	// match: (LEAL [off1] {sym1} (LEAL2 [off2] {sym2} x y))
  1860  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  1861  	// result: (LEAL2 [off1+off2] {mergeSym(sym1,sym2)} x y)
  1862  	for {
  1863  		off1 := v.AuxInt
  1864  		sym1 := v.Aux
  1865  		v_0 := v.Args[0]
  1866  		if v_0.Op != Op386LEAL2 {
  1867  			break
  1868  		}
  1869  		off2 := v_0.AuxInt
  1870  		sym2 := v_0.Aux
  1871  		x := v_0.Args[0]
  1872  		y := v_0.Args[1]
  1873  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  1874  			break
  1875  		}
  1876  		v.reset(Op386LEAL2)
  1877  		v.AuxInt = off1 + off2
  1878  		v.Aux = mergeSym(sym1, sym2)
  1879  		v.AddArg(x)
  1880  		v.AddArg(y)
  1881  		return true
  1882  	}
  1883  	// match: (LEAL [off1] {sym1} (LEAL4 [off2] {sym2} x y))
  1884  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  1885  	// result: (LEAL4 [off1+off2] {mergeSym(sym1,sym2)} x y)
  1886  	for {
  1887  		off1 := v.AuxInt
  1888  		sym1 := v.Aux
  1889  		v_0 := v.Args[0]
  1890  		if v_0.Op != Op386LEAL4 {
  1891  			break
  1892  		}
  1893  		off2 := v_0.AuxInt
  1894  		sym2 := v_0.Aux
  1895  		x := v_0.Args[0]
  1896  		y := v_0.Args[1]
  1897  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  1898  			break
  1899  		}
  1900  		v.reset(Op386LEAL4)
  1901  		v.AuxInt = off1 + off2
  1902  		v.Aux = mergeSym(sym1, sym2)
  1903  		v.AddArg(x)
  1904  		v.AddArg(y)
  1905  		return true
  1906  	}
  1907  	// match: (LEAL [off1] {sym1} (LEAL8 [off2] {sym2} x y))
  1908  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  1909  	// result: (LEAL8 [off1+off2] {mergeSym(sym1,sym2)} x y)
  1910  	for {
  1911  		off1 := v.AuxInt
  1912  		sym1 := v.Aux
  1913  		v_0 := v.Args[0]
  1914  		if v_0.Op != Op386LEAL8 {
  1915  			break
  1916  		}
  1917  		off2 := v_0.AuxInt
  1918  		sym2 := v_0.Aux
  1919  		x := v_0.Args[0]
  1920  		y := v_0.Args[1]
  1921  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  1922  			break
  1923  		}
  1924  		v.reset(Op386LEAL8)
  1925  		v.AuxInt = off1 + off2
  1926  		v.Aux = mergeSym(sym1, sym2)
  1927  		v.AddArg(x)
  1928  		v.AddArg(y)
  1929  		return true
  1930  	}
  1931  	return false
  1932  }
  1933  func rewriteValue386_Op386LEAL1(v *Value, config *Config) bool {
  1934  	b := v.Block
  1935  	_ = b
  1936  	// match: (LEAL1 [c] {s} (ADDLconst [d] x) y)
  1937  	// cond: is32Bit(c+d)   && x.Op != OpSB
  1938  	// result: (LEAL1 [c+d] {s} x y)
  1939  	for {
  1940  		c := v.AuxInt
  1941  		s := v.Aux
  1942  		v_0 := v.Args[0]
  1943  		if v_0.Op != Op386ADDLconst {
  1944  			break
  1945  		}
  1946  		d := v_0.AuxInt
  1947  		x := v_0.Args[0]
  1948  		y := v.Args[1]
  1949  		if !(is32Bit(c+d) && x.Op != OpSB) {
  1950  			break
  1951  		}
  1952  		v.reset(Op386LEAL1)
  1953  		v.AuxInt = c + d
  1954  		v.Aux = s
  1955  		v.AddArg(x)
  1956  		v.AddArg(y)
  1957  		return true
  1958  	}
  1959  	// match: (LEAL1 [c] {s} x (ADDLconst [d] y))
  1960  	// cond: is32Bit(c+d)   && y.Op != OpSB
  1961  	// result: (LEAL1 [c+d] {s} x y)
  1962  	for {
  1963  		c := v.AuxInt
  1964  		s := v.Aux
  1965  		x := v.Args[0]
  1966  		v_1 := v.Args[1]
  1967  		if v_1.Op != Op386ADDLconst {
  1968  			break
  1969  		}
  1970  		d := v_1.AuxInt
  1971  		y := v_1.Args[0]
  1972  		if !(is32Bit(c+d) && y.Op != OpSB) {
  1973  			break
  1974  		}
  1975  		v.reset(Op386LEAL1)
  1976  		v.AuxInt = c + d
  1977  		v.Aux = s
  1978  		v.AddArg(x)
  1979  		v.AddArg(y)
  1980  		return true
  1981  	}
  1982  	// match: (LEAL1 [c] {s} x (SHLLconst [1] y))
  1983  	// cond:
  1984  	// result: (LEAL2 [c] {s} x y)
  1985  	for {
  1986  		c := v.AuxInt
  1987  		s := v.Aux
  1988  		x := v.Args[0]
  1989  		v_1 := v.Args[1]
  1990  		if v_1.Op != Op386SHLLconst {
  1991  			break
  1992  		}
  1993  		if v_1.AuxInt != 1 {
  1994  			break
  1995  		}
  1996  		y := v_1.Args[0]
  1997  		v.reset(Op386LEAL2)
  1998  		v.AuxInt = c
  1999  		v.Aux = s
  2000  		v.AddArg(x)
  2001  		v.AddArg(y)
  2002  		return true
  2003  	}
  2004  	// match: (LEAL1 [c] {s} (SHLLconst [1] x) y)
  2005  	// cond:
  2006  	// result: (LEAL2 [c] {s} y x)
  2007  	for {
  2008  		c := v.AuxInt
  2009  		s := v.Aux
  2010  		v_0 := v.Args[0]
  2011  		if v_0.Op != Op386SHLLconst {
  2012  			break
  2013  		}
  2014  		if v_0.AuxInt != 1 {
  2015  			break
  2016  		}
  2017  		x := v_0.Args[0]
  2018  		y := v.Args[1]
  2019  		v.reset(Op386LEAL2)
  2020  		v.AuxInt = c
  2021  		v.Aux = s
  2022  		v.AddArg(y)
  2023  		v.AddArg(x)
  2024  		return true
  2025  	}
  2026  	// match: (LEAL1 [c] {s} x (SHLLconst [2] y))
  2027  	// cond:
  2028  	// result: (LEAL4 [c] {s} x y)
  2029  	for {
  2030  		c := v.AuxInt
  2031  		s := v.Aux
  2032  		x := v.Args[0]
  2033  		v_1 := v.Args[1]
  2034  		if v_1.Op != Op386SHLLconst {
  2035  			break
  2036  		}
  2037  		if v_1.AuxInt != 2 {
  2038  			break
  2039  		}
  2040  		y := v_1.Args[0]
  2041  		v.reset(Op386LEAL4)
  2042  		v.AuxInt = c
  2043  		v.Aux = s
  2044  		v.AddArg(x)
  2045  		v.AddArg(y)
  2046  		return true
  2047  	}
  2048  	// match: (LEAL1 [c] {s} (SHLLconst [2] x) y)
  2049  	// cond:
  2050  	// result: (LEAL4 [c] {s} y x)
  2051  	for {
  2052  		c := v.AuxInt
  2053  		s := v.Aux
  2054  		v_0 := v.Args[0]
  2055  		if v_0.Op != Op386SHLLconst {
  2056  			break
  2057  		}
  2058  		if v_0.AuxInt != 2 {
  2059  			break
  2060  		}
  2061  		x := v_0.Args[0]
  2062  		y := v.Args[1]
  2063  		v.reset(Op386LEAL4)
  2064  		v.AuxInt = c
  2065  		v.Aux = s
  2066  		v.AddArg(y)
  2067  		v.AddArg(x)
  2068  		return true
  2069  	}
  2070  	// match: (LEAL1 [c] {s} x (SHLLconst [3] y))
  2071  	// cond:
  2072  	// result: (LEAL8 [c] {s} x y)
  2073  	for {
  2074  		c := v.AuxInt
  2075  		s := v.Aux
  2076  		x := v.Args[0]
  2077  		v_1 := v.Args[1]
  2078  		if v_1.Op != Op386SHLLconst {
  2079  			break
  2080  		}
  2081  		if v_1.AuxInt != 3 {
  2082  			break
  2083  		}
  2084  		y := v_1.Args[0]
  2085  		v.reset(Op386LEAL8)
  2086  		v.AuxInt = c
  2087  		v.Aux = s
  2088  		v.AddArg(x)
  2089  		v.AddArg(y)
  2090  		return true
  2091  	}
  2092  	// match: (LEAL1 [c] {s} (SHLLconst [3] x) y)
  2093  	// cond:
  2094  	// result: (LEAL8 [c] {s} y x)
  2095  	for {
  2096  		c := v.AuxInt
  2097  		s := v.Aux
  2098  		v_0 := v.Args[0]
  2099  		if v_0.Op != Op386SHLLconst {
  2100  			break
  2101  		}
  2102  		if v_0.AuxInt != 3 {
  2103  			break
  2104  		}
  2105  		x := v_0.Args[0]
  2106  		y := v.Args[1]
  2107  		v.reset(Op386LEAL8)
  2108  		v.AuxInt = c
  2109  		v.Aux = s
  2110  		v.AddArg(y)
  2111  		v.AddArg(x)
  2112  		return true
  2113  	}
  2114  	// match: (LEAL1 [off1] {sym1} (LEAL [off2] {sym2} x) y)
  2115  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2) && x.Op != OpSB
  2116  	// result: (LEAL1 [off1+off2] {mergeSym(sym1,sym2)} x y)
  2117  	for {
  2118  		off1 := v.AuxInt
  2119  		sym1 := v.Aux
  2120  		v_0 := v.Args[0]
  2121  		if v_0.Op != Op386LEAL {
  2122  			break
  2123  		}
  2124  		off2 := v_0.AuxInt
  2125  		sym2 := v_0.Aux
  2126  		x := v_0.Args[0]
  2127  		y := v.Args[1]
  2128  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && x.Op != OpSB) {
  2129  			break
  2130  		}
  2131  		v.reset(Op386LEAL1)
  2132  		v.AuxInt = off1 + off2
  2133  		v.Aux = mergeSym(sym1, sym2)
  2134  		v.AddArg(x)
  2135  		v.AddArg(y)
  2136  		return true
  2137  	}
  2138  	// match: (LEAL1 [off1] {sym1} x (LEAL [off2] {sym2} y))
  2139  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2) && y.Op != OpSB
  2140  	// result: (LEAL1 [off1+off2] {mergeSym(sym1,sym2)} x y)
  2141  	for {
  2142  		off1 := v.AuxInt
  2143  		sym1 := v.Aux
  2144  		x := v.Args[0]
  2145  		v_1 := v.Args[1]
  2146  		if v_1.Op != Op386LEAL {
  2147  			break
  2148  		}
  2149  		off2 := v_1.AuxInt
  2150  		sym2 := v_1.Aux
  2151  		y := v_1.Args[0]
  2152  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && y.Op != OpSB) {
  2153  			break
  2154  		}
  2155  		v.reset(Op386LEAL1)
  2156  		v.AuxInt = off1 + off2
  2157  		v.Aux = mergeSym(sym1, sym2)
  2158  		v.AddArg(x)
  2159  		v.AddArg(y)
  2160  		return true
  2161  	}
  2162  	return false
  2163  }
  2164  func rewriteValue386_Op386LEAL2(v *Value, config *Config) bool {
  2165  	b := v.Block
  2166  	_ = b
  2167  	// match: (LEAL2 [c] {s} (ADDLconst [d] x) y)
  2168  	// cond: is32Bit(c+d)   && x.Op != OpSB
  2169  	// result: (LEAL2 [c+d] {s} x y)
  2170  	for {
  2171  		c := v.AuxInt
  2172  		s := v.Aux
  2173  		v_0 := v.Args[0]
  2174  		if v_0.Op != Op386ADDLconst {
  2175  			break
  2176  		}
  2177  		d := v_0.AuxInt
  2178  		x := v_0.Args[0]
  2179  		y := v.Args[1]
  2180  		if !(is32Bit(c+d) && x.Op != OpSB) {
  2181  			break
  2182  		}
  2183  		v.reset(Op386LEAL2)
  2184  		v.AuxInt = c + d
  2185  		v.Aux = s
  2186  		v.AddArg(x)
  2187  		v.AddArg(y)
  2188  		return true
  2189  	}
  2190  	// match: (LEAL2 [c] {s} x (ADDLconst [d] y))
  2191  	// cond: is32Bit(c+2*d) && y.Op != OpSB
  2192  	// result: (LEAL2 [c+2*d] {s} x y)
  2193  	for {
  2194  		c := v.AuxInt
  2195  		s := v.Aux
  2196  		x := v.Args[0]
  2197  		v_1 := v.Args[1]
  2198  		if v_1.Op != Op386ADDLconst {
  2199  			break
  2200  		}
  2201  		d := v_1.AuxInt
  2202  		y := v_1.Args[0]
  2203  		if !(is32Bit(c+2*d) && y.Op != OpSB) {
  2204  			break
  2205  		}
  2206  		v.reset(Op386LEAL2)
  2207  		v.AuxInt = c + 2*d
  2208  		v.Aux = s
  2209  		v.AddArg(x)
  2210  		v.AddArg(y)
  2211  		return true
  2212  	}
  2213  	// match: (LEAL2 [c] {s} x (SHLLconst [1] y))
  2214  	// cond:
  2215  	// result: (LEAL4 [c] {s} x y)
  2216  	for {
  2217  		c := v.AuxInt
  2218  		s := v.Aux
  2219  		x := v.Args[0]
  2220  		v_1 := v.Args[1]
  2221  		if v_1.Op != Op386SHLLconst {
  2222  			break
  2223  		}
  2224  		if v_1.AuxInt != 1 {
  2225  			break
  2226  		}
  2227  		y := v_1.Args[0]
  2228  		v.reset(Op386LEAL4)
  2229  		v.AuxInt = c
  2230  		v.Aux = s
  2231  		v.AddArg(x)
  2232  		v.AddArg(y)
  2233  		return true
  2234  	}
  2235  	// match: (LEAL2 [c] {s} x (SHLLconst [2] y))
  2236  	// cond:
  2237  	// result: (LEAL8 [c] {s} x y)
  2238  	for {
  2239  		c := v.AuxInt
  2240  		s := v.Aux
  2241  		x := v.Args[0]
  2242  		v_1 := v.Args[1]
  2243  		if v_1.Op != Op386SHLLconst {
  2244  			break
  2245  		}
  2246  		if v_1.AuxInt != 2 {
  2247  			break
  2248  		}
  2249  		y := v_1.Args[0]
  2250  		v.reset(Op386LEAL8)
  2251  		v.AuxInt = c
  2252  		v.Aux = s
  2253  		v.AddArg(x)
  2254  		v.AddArg(y)
  2255  		return true
  2256  	}
  2257  	// match: (LEAL2 [off1] {sym1} (LEAL [off2] {sym2} x) y)
  2258  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2) && x.Op != OpSB
  2259  	// result: (LEAL2 [off1+off2] {mergeSym(sym1,sym2)} x y)
  2260  	for {
  2261  		off1 := v.AuxInt
  2262  		sym1 := v.Aux
  2263  		v_0 := v.Args[0]
  2264  		if v_0.Op != Op386LEAL {
  2265  			break
  2266  		}
  2267  		off2 := v_0.AuxInt
  2268  		sym2 := v_0.Aux
  2269  		x := v_0.Args[0]
  2270  		y := v.Args[1]
  2271  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && x.Op != OpSB) {
  2272  			break
  2273  		}
  2274  		v.reset(Op386LEAL2)
  2275  		v.AuxInt = off1 + off2
  2276  		v.Aux = mergeSym(sym1, sym2)
  2277  		v.AddArg(x)
  2278  		v.AddArg(y)
  2279  		return true
  2280  	}
  2281  	return false
  2282  }
  2283  func rewriteValue386_Op386LEAL4(v *Value, config *Config) bool {
  2284  	b := v.Block
  2285  	_ = b
  2286  	// match: (LEAL4 [c] {s} (ADDLconst [d] x) y)
  2287  	// cond: is32Bit(c+d)   && x.Op != OpSB
  2288  	// result: (LEAL4 [c+d] {s} x y)
  2289  	for {
  2290  		c := v.AuxInt
  2291  		s := v.Aux
  2292  		v_0 := v.Args[0]
  2293  		if v_0.Op != Op386ADDLconst {
  2294  			break
  2295  		}
  2296  		d := v_0.AuxInt
  2297  		x := v_0.Args[0]
  2298  		y := v.Args[1]
  2299  		if !(is32Bit(c+d) && x.Op != OpSB) {
  2300  			break
  2301  		}
  2302  		v.reset(Op386LEAL4)
  2303  		v.AuxInt = c + d
  2304  		v.Aux = s
  2305  		v.AddArg(x)
  2306  		v.AddArg(y)
  2307  		return true
  2308  	}
  2309  	// match: (LEAL4 [c] {s} x (ADDLconst [d] y))
  2310  	// cond: is32Bit(c+4*d) && y.Op != OpSB
  2311  	// result: (LEAL4 [c+4*d] {s} x y)
  2312  	for {
  2313  		c := v.AuxInt
  2314  		s := v.Aux
  2315  		x := v.Args[0]
  2316  		v_1 := v.Args[1]
  2317  		if v_1.Op != Op386ADDLconst {
  2318  			break
  2319  		}
  2320  		d := v_1.AuxInt
  2321  		y := v_1.Args[0]
  2322  		if !(is32Bit(c+4*d) && y.Op != OpSB) {
  2323  			break
  2324  		}
  2325  		v.reset(Op386LEAL4)
  2326  		v.AuxInt = c + 4*d
  2327  		v.Aux = s
  2328  		v.AddArg(x)
  2329  		v.AddArg(y)
  2330  		return true
  2331  	}
  2332  	// match: (LEAL4 [c] {s} x (SHLLconst [1] y))
  2333  	// cond:
  2334  	// result: (LEAL8 [c] {s} x y)
  2335  	for {
  2336  		c := v.AuxInt
  2337  		s := v.Aux
  2338  		x := v.Args[0]
  2339  		v_1 := v.Args[1]
  2340  		if v_1.Op != Op386SHLLconst {
  2341  			break
  2342  		}
  2343  		if v_1.AuxInt != 1 {
  2344  			break
  2345  		}
  2346  		y := v_1.Args[0]
  2347  		v.reset(Op386LEAL8)
  2348  		v.AuxInt = c
  2349  		v.Aux = s
  2350  		v.AddArg(x)
  2351  		v.AddArg(y)
  2352  		return true
  2353  	}
  2354  	// match: (LEAL4 [off1] {sym1} (LEAL [off2] {sym2} x) y)
  2355  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2) && x.Op != OpSB
  2356  	// result: (LEAL4 [off1+off2] {mergeSym(sym1,sym2)} x y)
  2357  	for {
  2358  		off1 := v.AuxInt
  2359  		sym1 := v.Aux
  2360  		v_0 := v.Args[0]
  2361  		if v_0.Op != Op386LEAL {
  2362  			break
  2363  		}
  2364  		off2 := v_0.AuxInt
  2365  		sym2 := v_0.Aux
  2366  		x := v_0.Args[0]
  2367  		y := v.Args[1]
  2368  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && x.Op != OpSB) {
  2369  			break
  2370  		}
  2371  		v.reset(Op386LEAL4)
  2372  		v.AuxInt = off1 + off2
  2373  		v.Aux = mergeSym(sym1, sym2)
  2374  		v.AddArg(x)
  2375  		v.AddArg(y)
  2376  		return true
  2377  	}
  2378  	return false
  2379  }
  2380  func rewriteValue386_Op386LEAL8(v *Value, config *Config) bool {
  2381  	b := v.Block
  2382  	_ = b
  2383  	// match: (LEAL8 [c] {s} (ADDLconst [d] x) y)
  2384  	// cond: is32Bit(c+d)   && x.Op != OpSB
  2385  	// result: (LEAL8 [c+d] {s} x y)
  2386  	for {
  2387  		c := v.AuxInt
  2388  		s := v.Aux
  2389  		v_0 := v.Args[0]
  2390  		if v_0.Op != Op386ADDLconst {
  2391  			break
  2392  		}
  2393  		d := v_0.AuxInt
  2394  		x := v_0.Args[0]
  2395  		y := v.Args[1]
  2396  		if !(is32Bit(c+d) && x.Op != OpSB) {
  2397  			break
  2398  		}
  2399  		v.reset(Op386LEAL8)
  2400  		v.AuxInt = c + d
  2401  		v.Aux = s
  2402  		v.AddArg(x)
  2403  		v.AddArg(y)
  2404  		return true
  2405  	}
  2406  	// match: (LEAL8 [c] {s} x (ADDLconst [d] y))
  2407  	// cond: is32Bit(c+8*d) && y.Op != OpSB
  2408  	// result: (LEAL8 [c+8*d] {s} x y)
  2409  	for {
  2410  		c := v.AuxInt
  2411  		s := v.Aux
  2412  		x := v.Args[0]
  2413  		v_1 := v.Args[1]
  2414  		if v_1.Op != Op386ADDLconst {
  2415  			break
  2416  		}
  2417  		d := v_1.AuxInt
  2418  		y := v_1.Args[0]
  2419  		if !(is32Bit(c+8*d) && y.Op != OpSB) {
  2420  			break
  2421  		}
  2422  		v.reset(Op386LEAL8)
  2423  		v.AuxInt = c + 8*d
  2424  		v.Aux = s
  2425  		v.AddArg(x)
  2426  		v.AddArg(y)
  2427  		return true
  2428  	}
  2429  	// match: (LEAL8 [off1] {sym1} (LEAL [off2] {sym2} x) y)
  2430  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2) && x.Op != OpSB
  2431  	// result: (LEAL8 [off1+off2] {mergeSym(sym1,sym2)} x y)
  2432  	for {
  2433  		off1 := v.AuxInt
  2434  		sym1 := v.Aux
  2435  		v_0 := v.Args[0]
  2436  		if v_0.Op != Op386LEAL {
  2437  			break
  2438  		}
  2439  		off2 := v_0.AuxInt
  2440  		sym2 := v_0.Aux
  2441  		x := v_0.Args[0]
  2442  		y := v.Args[1]
  2443  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && x.Op != OpSB) {
  2444  			break
  2445  		}
  2446  		v.reset(Op386LEAL8)
  2447  		v.AuxInt = off1 + off2
  2448  		v.Aux = mergeSym(sym1, sym2)
  2449  		v.AddArg(x)
  2450  		v.AddArg(y)
  2451  		return true
  2452  	}
  2453  	return false
  2454  }
  2455  func rewriteValue386_Op386MOVBLSX(v *Value, config *Config) bool {
  2456  	b := v.Block
  2457  	_ = b
  2458  	// match: (MOVBLSX x:(MOVBload [off] {sym} ptr mem))
  2459  	// cond: x.Uses == 1 && clobber(x)
  2460  	// result: @x.Block (MOVBLSXload <v.Type> [off] {sym} ptr mem)
  2461  	for {
  2462  		x := v.Args[0]
  2463  		if x.Op != Op386MOVBload {
  2464  			break
  2465  		}
  2466  		off := x.AuxInt
  2467  		sym := x.Aux
  2468  		ptr := x.Args[0]
  2469  		mem := x.Args[1]
  2470  		if !(x.Uses == 1 && clobber(x)) {
  2471  			break
  2472  		}
  2473  		b = x.Block
  2474  		v0 := b.NewValue0(v.Line, Op386MOVBLSXload, v.Type)
  2475  		v.reset(OpCopy)
  2476  		v.AddArg(v0)
  2477  		v0.AuxInt = off
  2478  		v0.Aux = sym
  2479  		v0.AddArg(ptr)
  2480  		v0.AddArg(mem)
  2481  		return true
  2482  	}
  2483  	// match: (MOVBLSX (ANDLconst [c] x))
  2484  	// cond: c & 0x80 == 0
  2485  	// result: (ANDLconst [c & 0x7f] x)
  2486  	for {
  2487  		v_0 := v.Args[0]
  2488  		if v_0.Op != Op386ANDLconst {
  2489  			break
  2490  		}
  2491  		c := v_0.AuxInt
  2492  		x := v_0.Args[0]
  2493  		if !(c&0x80 == 0) {
  2494  			break
  2495  		}
  2496  		v.reset(Op386ANDLconst)
  2497  		v.AuxInt = c & 0x7f
  2498  		v.AddArg(x)
  2499  		return true
  2500  	}
  2501  	return false
  2502  }
  2503  func rewriteValue386_Op386MOVBLSXload(v *Value, config *Config) bool {
  2504  	b := v.Block
  2505  	_ = b
  2506  	// match: (MOVBLSXload [off] {sym} ptr (MOVBstore [off2] {sym2} ptr2 x _))
  2507  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  2508  	// result: (MOVBLSX x)
  2509  	for {
  2510  		off := v.AuxInt
  2511  		sym := v.Aux
  2512  		ptr := v.Args[0]
  2513  		v_1 := v.Args[1]
  2514  		if v_1.Op != Op386MOVBstore {
  2515  			break
  2516  		}
  2517  		off2 := v_1.AuxInt
  2518  		sym2 := v_1.Aux
  2519  		ptr2 := v_1.Args[0]
  2520  		x := v_1.Args[1]
  2521  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  2522  			break
  2523  		}
  2524  		v.reset(Op386MOVBLSX)
  2525  		v.AddArg(x)
  2526  		return true
  2527  	}
  2528  	// match: (MOVBLSXload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  2529  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  2530  	// result: (MOVBLSXload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  2531  	for {
  2532  		off1 := v.AuxInt
  2533  		sym1 := v.Aux
  2534  		v_0 := v.Args[0]
  2535  		if v_0.Op != Op386LEAL {
  2536  			break
  2537  		}
  2538  		off2 := v_0.AuxInt
  2539  		sym2 := v_0.Aux
  2540  		base := v_0.Args[0]
  2541  		mem := v.Args[1]
  2542  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  2543  			break
  2544  		}
  2545  		v.reset(Op386MOVBLSXload)
  2546  		v.AuxInt = off1 + off2
  2547  		v.Aux = mergeSym(sym1, sym2)
  2548  		v.AddArg(base)
  2549  		v.AddArg(mem)
  2550  		return true
  2551  	}
  2552  	return false
  2553  }
  2554  func rewriteValue386_Op386MOVBLZX(v *Value, config *Config) bool {
  2555  	b := v.Block
  2556  	_ = b
  2557  	// match: (MOVBLZX x:(MOVBload [off] {sym} ptr mem))
  2558  	// cond: x.Uses == 1 && clobber(x)
  2559  	// result: @x.Block (MOVBload <v.Type> [off] {sym} ptr mem)
  2560  	for {
  2561  		x := v.Args[0]
  2562  		if x.Op != Op386MOVBload {
  2563  			break
  2564  		}
  2565  		off := x.AuxInt
  2566  		sym := x.Aux
  2567  		ptr := x.Args[0]
  2568  		mem := x.Args[1]
  2569  		if !(x.Uses == 1 && clobber(x)) {
  2570  			break
  2571  		}
  2572  		b = x.Block
  2573  		v0 := b.NewValue0(v.Line, Op386MOVBload, v.Type)
  2574  		v.reset(OpCopy)
  2575  		v.AddArg(v0)
  2576  		v0.AuxInt = off
  2577  		v0.Aux = sym
  2578  		v0.AddArg(ptr)
  2579  		v0.AddArg(mem)
  2580  		return true
  2581  	}
  2582  	// match: (MOVBLZX x:(MOVBloadidx1 [off] {sym} ptr idx mem))
  2583  	// cond: x.Uses == 1 && clobber(x)
  2584  	// result: @x.Block (MOVBloadidx1 <v.Type> [off] {sym} ptr idx mem)
  2585  	for {
  2586  		x := v.Args[0]
  2587  		if x.Op != Op386MOVBloadidx1 {
  2588  			break
  2589  		}
  2590  		off := x.AuxInt
  2591  		sym := x.Aux
  2592  		ptr := x.Args[0]
  2593  		idx := x.Args[1]
  2594  		mem := x.Args[2]
  2595  		if !(x.Uses == 1 && clobber(x)) {
  2596  			break
  2597  		}
  2598  		b = x.Block
  2599  		v0 := b.NewValue0(v.Line, Op386MOVBloadidx1, v.Type)
  2600  		v.reset(OpCopy)
  2601  		v.AddArg(v0)
  2602  		v0.AuxInt = off
  2603  		v0.Aux = sym
  2604  		v0.AddArg(ptr)
  2605  		v0.AddArg(idx)
  2606  		v0.AddArg(mem)
  2607  		return true
  2608  	}
  2609  	// match: (MOVBLZX (ANDLconst [c] x))
  2610  	// cond:
  2611  	// result: (ANDLconst [c & 0xff] x)
  2612  	for {
  2613  		v_0 := v.Args[0]
  2614  		if v_0.Op != Op386ANDLconst {
  2615  			break
  2616  		}
  2617  		c := v_0.AuxInt
  2618  		x := v_0.Args[0]
  2619  		v.reset(Op386ANDLconst)
  2620  		v.AuxInt = c & 0xff
  2621  		v.AddArg(x)
  2622  		return true
  2623  	}
  2624  	return false
  2625  }
  2626  func rewriteValue386_Op386MOVBload(v *Value, config *Config) bool {
  2627  	b := v.Block
  2628  	_ = b
  2629  	// match: (MOVBload [off] {sym} ptr (MOVBstore [off2] {sym2} ptr2 x _))
  2630  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  2631  	// result: (MOVBLZX x)
  2632  	for {
  2633  		off := v.AuxInt
  2634  		sym := v.Aux
  2635  		ptr := v.Args[0]
  2636  		v_1 := v.Args[1]
  2637  		if v_1.Op != Op386MOVBstore {
  2638  			break
  2639  		}
  2640  		off2 := v_1.AuxInt
  2641  		sym2 := v_1.Aux
  2642  		ptr2 := v_1.Args[0]
  2643  		x := v_1.Args[1]
  2644  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  2645  			break
  2646  		}
  2647  		v.reset(Op386MOVBLZX)
  2648  		v.AddArg(x)
  2649  		return true
  2650  	}
  2651  	// match: (MOVBload  [off1] {sym} (ADDLconst [off2] ptr) mem)
  2652  	// cond: is32Bit(off1+off2)
  2653  	// result: (MOVBload  [off1+off2] {sym} ptr mem)
  2654  	for {
  2655  		off1 := v.AuxInt
  2656  		sym := v.Aux
  2657  		v_0 := v.Args[0]
  2658  		if v_0.Op != Op386ADDLconst {
  2659  			break
  2660  		}
  2661  		off2 := v_0.AuxInt
  2662  		ptr := v_0.Args[0]
  2663  		mem := v.Args[1]
  2664  		if !(is32Bit(off1 + off2)) {
  2665  			break
  2666  		}
  2667  		v.reset(Op386MOVBload)
  2668  		v.AuxInt = off1 + off2
  2669  		v.Aux = sym
  2670  		v.AddArg(ptr)
  2671  		v.AddArg(mem)
  2672  		return true
  2673  	}
  2674  	// match: (MOVBload  [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  2675  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  2676  	// result: (MOVBload  [off1+off2] {mergeSym(sym1,sym2)} base mem)
  2677  	for {
  2678  		off1 := v.AuxInt
  2679  		sym1 := v.Aux
  2680  		v_0 := v.Args[0]
  2681  		if v_0.Op != Op386LEAL {
  2682  			break
  2683  		}
  2684  		off2 := v_0.AuxInt
  2685  		sym2 := v_0.Aux
  2686  		base := v_0.Args[0]
  2687  		mem := v.Args[1]
  2688  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  2689  			break
  2690  		}
  2691  		v.reset(Op386MOVBload)
  2692  		v.AuxInt = off1 + off2
  2693  		v.Aux = mergeSym(sym1, sym2)
  2694  		v.AddArg(base)
  2695  		v.AddArg(mem)
  2696  		return true
  2697  	}
  2698  	// match: (MOVBload [off1] {sym1} (LEAL1 [off2] {sym2} ptr idx) mem)
  2699  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  2700  	// result: (MOVBloadidx1 [off1+off2] {mergeSym(sym1,sym2)} ptr idx mem)
  2701  	for {
  2702  		off1 := v.AuxInt
  2703  		sym1 := v.Aux
  2704  		v_0 := v.Args[0]
  2705  		if v_0.Op != Op386LEAL1 {
  2706  			break
  2707  		}
  2708  		off2 := v_0.AuxInt
  2709  		sym2 := v_0.Aux
  2710  		ptr := v_0.Args[0]
  2711  		idx := v_0.Args[1]
  2712  		mem := v.Args[1]
  2713  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  2714  			break
  2715  		}
  2716  		v.reset(Op386MOVBloadidx1)
  2717  		v.AuxInt = off1 + off2
  2718  		v.Aux = mergeSym(sym1, sym2)
  2719  		v.AddArg(ptr)
  2720  		v.AddArg(idx)
  2721  		v.AddArg(mem)
  2722  		return true
  2723  	}
  2724  	// match: (MOVBload [off] {sym} (ADDL ptr idx) mem)
  2725  	// cond: ptr.Op != OpSB
  2726  	// result: (MOVBloadidx1 [off] {sym} ptr idx mem)
  2727  	for {
  2728  		off := v.AuxInt
  2729  		sym := v.Aux
  2730  		v_0 := v.Args[0]
  2731  		if v_0.Op != Op386ADDL {
  2732  			break
  2733  		}
  2734  		ptr := v_0.Args[0]
  2735  		idx := v_0.Args[1]
  2736  		mem := v.Args[1]
  2737  		if !(ptr.Op != OpSB) {
  2738  			break
  2739  		}
  2740  		v.reset(Op386MOVBloadidx1)
  2741  		v.AuxInt = off
  2742  		v.Aux = sym
  2743  		v.AddArg(ptr)
  2744  		v.AddArg(idx)
  2745  		v.AddArg(mem)
  2746  		return true
  2747  	}
  2748  	return false
  2749  }
  2750  func rewriteValue386_Op386MOVBloadidx1(v *Value, config *Config) bool {
  2751  	b := v.Block
  2752  	_ = b
  2753  	// match: (MOVBloadidx1 [c] {sym} (ADDLconst [d] ptr) idx mem)
  2754  	// cond:
  2755  	// result: (MOVBloadidx1 [c+d] {sym} ptr idx mem)
  2756  	for {
  2757  		c := v.AuxInt
  2758  		sym := v.Aux
  2759  		v_0 := v.Args[0]
  2760  		if v_0.Op != Op386ADDLconst {
  2761  			break
  2762  		}
  2763  		d := v_0.AuxInt
  2764  		ptr := v_0.Args[0]
  2765  		idx := v.Args[1]
  2766  		mem := v.Args[2]
  2767  		v.reset(Op386MOVBloadidx1)
  2768  		v.AuxInt = c + d
  2769  		v.Aux = sym
  2770  		v.AddArg(ptr)
  2771  		v.AddArg(idx)
  2772  		v.AddArg(mem)
  2773  		return true
  2774  	}
  2775  	// match: (MOVBloadidx1 [c] {sym} ptr (ADDLconst [d] idx) mem)
  2776  	// cond:
  2777  	// result: (MOVBloadidx1 [c+d] {sym} ptr idx mem)
  2778  	for {
  2779  		c := v.AuxInt
  2780  		sym := v.Aux
  2781  		ptr := v.Args[0]
  2782  		v_1 := v.Args[1]
  2783  		if v_1.Op != Op386ADDLconst {
  2784  			break
  2785  		}
  2786  		d := v_1.AuxInt
  2787  		idx := v_1.Args[0]
  2788  		mem := v.Args[2]
  2789  		v.reset(Op386MOVBloadidx1)
  2790  		v.AuxInt = c + d
  2791  		v.Aux = sym
  2792  		v.AddArg(ptr)
  2793  		v.AddArg(idx)
  2794  		v.AddArg(mem)
  2795  		return true
  2796  	}
  2797  	return false
  2798  }
  2799  func rewriteValue386_Op386MOVBstore(v *Value, config *Config) bool {
  2800  	b := v.Block
  2801  	_ = b
  2802  	// match: (MOVBstore [off] {sym} ptr (MOVBLSX x) mem)
  2803  	// cond:
  2804  	// result: (MOVBstore [off] {sym} ptr x mem)
  2805  	for {
  2806  		off := v.AuxInt
  2807  		sym := v.Aux
  2808  		ptr := v.Args[0]
  2809  		v_1 := v.Args[1]
  2810  		if v_1.Op != Op386MOVBLSX {
  2811  			break
  2812  		}
  2813  		x := v_1.Args[0]
  2814  		mem := v.Args[2]
  2815  		v.reset(Op386MOVBstore)
  2816  		v.AuxInt = off
  2817  		v.Aux = sym
  2818  		v.AddArg(ptr)
  2819  		v.AddArg(x)
  2820  		v.AddArg(mem)
  2821  		return true
  2822  	}
  2823  	// match: (MOVBstore [off] {sym} ptr (MOVBLZX x) mem)
  2824  	// cond:
  2825  	// result: (MOVBstore [off] {sym} ptr x mem)
  2826  	for {
  2827  		off := v.AuxInt
  2828  		sym := v.Aux
  2829  		ptr := v.Args[0]
  2830  		v_1 := v.Args[1]
  2831  		if v_1.Op != Op386MOVBLZX {
  2832  			break
  2833  		}
  2834  		x := v_1.Args[0]
  2835  		mem := v.Args[2]
  2836  		v.reset(Op386MOVBstore)
  2837  		v.AuxInt = off
  2838  		v.Aux = sym
  2839  		v.AddArg(ptr)
  2840  		v.AddArg(x)
  2841  		v.AddArg(mem)
  2842  		return true
  2843  	}
  2844  	// match: (MOVBstore  [off1] {sym} (ADDLconst [off2] ptr) val mem)
  2845  	// cond: is32Bit(off1+off2)
  2846  	// result: (MOVBstore  [off1+off2] {sym} ptr val mem)
  2847  	for {
  2848  		off1 := v.AuxInt
  2849  		sym := v.Aux
  2850  		v_0 := v.Args[0]
  2851  		if v_0.Op != Op386ADDLconst {
  2852  			break
  2853  		}
  2854  		off2 := v_0.AuxInt
  2855  		ptr := v_0.Args[0]
  2856  		val := v.Args[1]
  2857  		mem := v.Args[2]
  2858  		if !(is32Bit(off1 + off2)) {
  2859  			break
  2860  		}
  2861  		v.reset(Op386MOVBstore)
  2862  		v.AuxInt = off1 + off2
  2863  		v.Aux = sym
  2864  		v.AddArg(ptr)
  2865  		v.AddArg(val)
  2866  		v.AddArg(mem)
  2867  		return true
  2868  	}
  2869  	// match: (MOVBstore [off] {sym} ptr (MOVLconst [c]) mem)
  2870  	// cond: validOff(off)
  2871  	// result: (MOVBstoreconst [makeValAndOff(int64(int8(c)),off)] {sym} ptr mem)
  2872  	for {
  2873  		off := v.AuxInt
  2874  		sym := v.Aux
  2875  		ptr := v.Args[0]
  2876  		v_1 := v.Args[1]
  2877  		if v_1.Op != Op386MOVLconst {
  2878  			break
  2879  		}
  2880  		c := v_1.AuxInt
  2881  		mem := v.Args[2]
  2882  		if !(validOff(off)) {
  2883  			break
  2884  		}
  2885  		v.reset(Op386MOVBstoreconst)
  2886  		v.AuxInt = makeValAndOff(int64(int8(c)), off)
  2887  		v.Aux = sym
  2888  		v.AddArg(ptr)
  2889  		v.AddArg(mem)
  2890  		return true
  2891  	}
  2892  	// match: (MOVBstore  [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  2893  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  2894  	// result: (MOVBstore  [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  2895  	for {
  2896  		off1 := v.AuxInt
  2897  		sym1 := v.Aux
  2898  		v_0 := v.Args[0]
  2899  		if v_0.Op != Op386LEAL {
  2900  			break
  2901  		}
  2902  		off2 := v_0.AuxInt
  2903  		sym2 := v_0.Aux
  2904  		base := v_0.Args[0]
  2905  		val := v.Args[1]
  2906  		mem := v.Args[2]
  2907  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  2908  			break
  2909  		}
  2910  		v.reset(Op386MOVBstore)
  2911  		v.AuxInt = off1 + off2
  2912  		v.Aux = mergeSym(sym1, sym2)
  2913  		v.AddArg(base)
  2914  		v.AddArg(val)
  2915  		v.AddArg(mem)
  2916  		return true
  2917  	}
  2918  	// match: (MOVBstore [off1] {sym1} (LEAL1 [off2] {sym2} ptr idx) val mem)
  2919  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  2920  	// result: (MOVBstoreidx1 [off1+off2] {mergeSym(sym1,sym2)} ptr idx val mem)
  2921  	for {
  2922  		off1 := v.AuxInt
  2923  		sym1 := v.Aux
  2924  		v_0 := v.Args[0]
  2925  		if v_0.Op != Op386LEAL1 {
  2926  			break
  2927  		}
  2928  		off2 := v_0.AuxInt
  2929  		sym2 := v_0.Aux
  2930  		ptr := v_0.Args[0]
  2931  		idx := v_0.Args[1]
  2932  		val := v.Args[1]
  2933  		mem := v.Args[2]
  2934  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  2935  			break
  2936  		}
  2937  		v.reset(Op386MOVBstoreidx1)
  2938  		v.AuxInt = off1 + off2
  2939  		v.Aux = mergeSym(sym1, sym2)
  2940  		v.AddArg(ptr)
  2941  		v.AddArg(idx)
  2942  		v.AddArg(val)
  2943  		v.AddArg(mem)
  2944  		return true
  2945  	}
  2946  	// match: (MOVBstore [off] {sym} (ADDL ptr idx) val mem)
  2947  	// cond: ptr.Op != OpSB
  2948  	// result: (MOVBstoreidx1 [off] {sym} ptr idx val mem)
  2949  	for {
  2950  		off := v.AuxInt
  2951  		sym := v.Aux
  2952  		v_0 := v.Args[0]
  2953  		if v_0.Op != Op386ADDL {
  2954  			break
  2955  		}
  2956  		ptr := v_0.Args[0]
  2957  		idx := v_0.Args[1]
  2958  		val := v.Args[1]
  2959  		mem := v.Args[2]
  2960  		if !(ptr.Op != OpSB) {
  2961  			break
  2962  		}
  2963  		v.reset(Op386MOVBstoreidx1)
  2964  		v.AuxInt = off
  2965  		v.Aux = sym
  2966  		v.AddArg(ptr)
  2967  		v.AddArg(idx)
  2968  		v.AddArg(val)
  2969  		v.AddArg(mem)
  2970  		return true
  2971  	}
  2972  	// match: (MOVBstore [i] {s} p (SHRLconst [8] w) x:(MOVBstore [i-1] {s} p w mem))
  2973  	// cond: x.Uses == 1   && clobber(x)
  2974  	// result: (MOVWstore [i-1] {s} p w mem)
  2975  	for {
  2976  		i := v.AuxInt
  2977  		s := v.Aux
  2978  		p := v.Args[0]
  2979  		v_1 := v.Args[1]
  2980  		if v_1.Op != Op386SHRLconst {
  2981  			break
  2982  		}
  2983  		if v_1.AuxInt != 8 {
  2984  			break
  2985  		}
  2986  		w := v_1.Args[0]
  2987  		x := v.Args[2]
  2988  		if x.Op != Op386MOVBstore {
  2989  			break
  2990  		}
  2991  		if x.AuxInt != i-1 {
  2992  			break
  2993  		}
  2994  		if x.Aux != s {
  2995  			break
  2996  		}
  2997  		if p != x.Args[0] {
  2998  			break
  2999  		}
  3000  		if w != x.Args[1] {
  3001  			break
  3002  		}
  3003  		mem := x.Args[2]
  3004  		if !(x.Uses == 1 && clobber(x)) {
  3005  			break
  3006  		}
  3007  		v.reset(Op386MOVWstore)
  3008  		v.AuxInt = i - 1
  3009  		v.Aux = s
  3010  		v.AddArg(p)
  3011  		v.AddArg(w)
  3012  		v.AddArg(mem)
  3013  		return true
  3014  	}
  3015  	// match: (MOVBstore [i] {s} p (SHRLconst [j] w) x:(MOVBstore [i-1] {s} p w0:(SHRLconst [j-8] w) mem))
  3016  	// cond: x.Uses == 1   && clobber(x)
  3017  	// result: (MOVWstore [i-1] {s} p w0 mem)
  3018  	for {
  3019  		i := v.AuxInt
  3020  		s := v.Aux
  3021  		p := v.Args[0]
  3022  		v_1 := v.Args[1]
  3023  		if v_1.Op != Op386SHRLconst {
  3024  			break
  3025  		}
  3026  		j := v_1.AuxInt
  3027  		w := v_1.Args[0]
  3028  		x := v.Args[2]
  3029  		if x.Op != Op386MOVBstore {
  3030  			break
  3031  		}
  3032  		if x.AuxInt != i-1 {
  3033  			break
  3034  		}
  3035  		if x.Aux != s {
  3036  			break
  3037  		}
  3038  		if p != x.Args[0] {
  3039  			break
  3040  		}
  3041  		w0 := x.Args[1]
  3042  		if w0.Op != Op386SHRLconst {
  3043  			break
  3044  		}
  3045  		if w0.AuxInt != j-8 {
  3046  			break
  3047  		}
  3048  		if w != w0.Args[0] {
  3049  			break
  3050  		}
  3051  		mem := x.Args[2]
  3052  		if !(x.Uses == 1 && clobber(x)) {
  3053  			break
  3054  		}
  3055  		v.reset(Op386MOVWstore)
  3056  		v.AuxInt = i - 1
  3057  		v.Aux = s
  3058  		v.AddArg(p)
  3059  		v.AddArg(w0)
  3060  		v.AddArg(mem)
  3061  		return true
  3062  	}
  3063  	return false
  3064  }
  3065  func rewriteValue386_Op386MOVBstoreconst(v *Value, config *Config) bool {
  3066  	b := v.Block
  3067  	_ = b
  3068  	// match: (MOVBstoreconst [sc] {s} (ADDLconst [off] ptr) mem)
  3069  	// cond: ValAndOff(sc).canAdd(off)
  3070  	// result: (MOVBstoreconst [ValAndOff(sc).add(off)] {s} ptr mem)
  3071  	for {
  3072  		sc := v.AuxInt
  3073  		s := v.Aux
  3074  		v_0 := v.Args[0]
  3075  		if v_0.Op != Op386ADDLconst {
  3076  			break
  3077  		}
  3078  		off := v_0.AuxInt
  3079  		ptr := v_0.Args[0]
  3080  		mem := v.Args[1]
  3081  		if !(ValAndOff(sc).canAdd(off)) {
  3082  			break
  3083  		}
  3084  		v.reset(Op386MOVBstoreconst)
  3085  		v.AuxInt = ValAndOff(sc).add(off)
  3086  		v.Aux = s
  3087  		v.AddArg(ptr)
  3088  		v.AddArg(mem)
  3089  		return true
  3090  	}
  3091  	// match: (MOVBstoreconst [sc] {sym1} (LEAL [off] {sym2} ptr) mem)
  3092  	// cond: canMergeSym(sym1, sym2) && ValAndOff(sc).canAdd(off)   && (ptr.Op != OpSB || !config.ctxt.Flag_shared)
  3093  	// result: (MOVBstoreconst [ValAndOff(sc).add(off)] {mergeSym(sym1, sym2)} ptr mem)
  3094  	for {
  3095  		sc := v.AuxInt
  3096  		sym1 := v.Aux
  3097  		v_0 := v.Args[0]
  3098  		if v_0.Op != Op386LEAL {
  3099  			break
  3100  		}
  3101  		off := v_0.AuxInt
  3102  		sym2 := v_0.Aux
  3103  		ptr := v_0.Args[0]
  3104  		mem := v.Args[1]
  3105  		if !(canMergeSym(sym1, sym2) && ValAndOff(sc).canAdd(off) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
  3106  			break
  3107  		}
  3108  		v.reset(Op386MOVBstoreconst)
  3109  		v.AuxInt = ValAndOff(sc).add(off)
  3110  		v.Aux = mergeSym(sym1, sym2)
  3111  		v.AddArg(ptr)
  3112  		v.AddArg(mem)
  3113  		return true
  3114  	}
  3115  	// match: (MOVBstoreconst [x] {sym1} (LEAL1 [off] {sym2} ptr idx) mem)
  3116  	// cond: canMergeSym(sym1, sym2)
  3117  	// result: (MOVBstoreconstidx1 [ValAndOff(x).add(off)] {mergeSym(sym1,sym2)} ptr idx mem)
  3118  	for {
  3119  		x := v.AuxInt
  3120  		sym1 := v.Aux
  3121  		v_0 := v.Args[0]
  3122  		if v_0.Op != Op386LEAL1 {
  3123  			break
  3124  		}
  3125  		off := v_0.AuxInt
  3126  		sym2 := v_0.Aux
  3127  		ptr := v_0.Args[0]
  3128  		idx := v_0.Args[1]
  3129  		mem := v.Args[1]
  3130  		if !(canMergeSym(sym1, sym2)) {
  3131  			break
  3132  		}
  3133  		v.reset(Op386MOVBstoreconstidx1)
  3134  		v.AuxInt = ValAndOff(x).add(off)
  3135  		v.Aux = mergeSym(sym1, sym2)
  3136  		v.AddArg(ptr)
  3137  		v.AddArg(idx)
  3138  		v.AddArg(mem)
  3139  		return true
  3140  	}
  3141  	// match: (MOVBstoreconst [x] {sym} (ADDL ptr idx) mem)
  3142  	// cond:
  3143  	// result: (MOVBstoreconstidx1 [x] {sym} ptr idx mem)
  3144  	for {
  3145  		x := v.AuxInt
  3146  		sym := v.Aux
  3147  		v_0 := v.Args[0]
  3148  		if v_0.Op != Op386ADDL {
  3149  			break
  3150  		}
  3151  		ptr := v_0.Args[0]
  3152  		idx := v_0.Args[1]
  3153  		mem := v.Args[1]
  3154  		v.reset(Op386MOVBstoreconstidx1)
  3155  		v.AuxInt = x
  3156  		v.Aux = sym
  3157  		v.AddArg(ptr)
  3158  		v.AddArg(idx)
  3159  		v.AddArg(mem)
  3160  		return true
  3161  	}
  3162  	// match: (MOVBstoreconst [c] {s} p x:(MOVBstoreconst [a] {s} p mem))
  3163  	// cond: x.Uses == 1   && ValAndOff(a).Off() + 1 == ValAndOff(c).Off()   && clobber(x)
  3164  	// result: (MOVWstoreconst [makeValAndOff(ValAndOff(a).Val()&0xff | ValAndOff(c).Val()<<8, ValAndOff(a).Off())] {s} p mem)
  3165  	for {
  3166  		c := v.AuxInt
  3167  		s := v.Aux
  3168  		p := v.Args[0]
  3169  		x := v.Args[1]
  3170  		if x.Op != Op386MOVBstoreconst {
  3171  			break
  3172  		}
  3173  		a := x.AuxInt
  3174  		if x.Aux != s {
  3175  			break
  3176  		}
  3177  		if p != x.Args[0] {
  3178  			break
  3179  		}
  3180  		mem := x.Args[1]
  3181  		if !(x.Uses == 1 && ValAndOff(a).Off()+1 == ValAndOff(c).Off() && clobber(x)) {
  3182  			break
  3183  		}
  3184  		v.reset(Op386MOVWstoreconst)
  3185  		v.AuxInt = makeValAndOff(ValAndOff(a).Val()&0xff|ValAndOff(c).Val()<<8, ValAndOff(a).Off())
  3186  		v.Aux = s
  3187  		v.AddArg(p)
  3188  		v.AddArg(mem)
  3189  		return true
  3190  	}
  3191  	return false
  3192  }
  3193  func rewriteValue386_Op386MOVBstoreconstidx1(v *Value, config *Config) bool {
  3194  	b := v.Block
  3195  	_ = b
  3196  	// match: (MOVBstoreconstidx1 [x] {sym} (ADDLconst [c] ptr) idx mem)
  3197  	// cond:
  3198  	// result: (MOVBstoreconstidx1 [ValAndOff(x).add(c)] {sym} ptr idx mem)
  3199  	for {
  3200  		x := v.AuxInt
  3201  		sym := v.Aux
  3202  		v_0 := v.Args[0]
  3203  		if v_0.Op != Op386ADDLconst {
  3204  			break
  3205  		}
  3206  		c := v_0.AuxInt
  3207  		ptr := v_0.Args[0]
  3208  		idx := v.Args[1]
  3209  		mem := v.Args[2]
  3210  		v.reset(Op386MOVBstoreconstidx1)
  3211  		v.AuxInt = ValAndOff(x).add(c)
  3212  		v.Aux = sym
  3213  		v.AddArg(ptr)
  3214  		v.AddArg(idx)
  3215  		v.AddArg(mem)
  3216  		return true
  3217  	}
  3218  	// match: (MOVBstoreconstidx1 [x] {sym} ptr (ADDLconst [c] idx) mem)
  3219  	// cond:
  3220  	// result: (MOVBstoreconstidx1 [ValAndOff(x).add(c)] {sym} ptr idx mem)
  3221  	for {
  3222  		x := v.AuxInt
  3223  		sym := v.Aux
  3224  		ptr := v.Args[0]
  3225  		v_1 := v.Args[1]
  3226  		if v_1.Op != Op386ADDLconst {
  3227  			break
  3228  		}
  3229  		c := v_1.AuxInt
  3230  		idx := v_1.Args[0]
  3231  		mem := v.Args[2]
  3232  		v.reset(Op386MOVBstoreconstidx1)
  3233  		v.AuxInt = ValAndOff(x).add(c)
  3234  		v.Aux = sym
  3235  		v.AddArg(ptr)
  3236  		v.AddArg(idx)
  3237  		v.AddArg(mem)
  3238  		return true
  3239  	}
  3240  	// match: (MOVBstoreconstidx1 [c] {s} p i x:(MOVBstoreconstidx1 [a] {s} p i mem))
  3241  	// cond: x.Uses == 1   && ValAndOff(a).Off() + 1 == ValAndOff(c).Off()   && clobber(x)
  3242  	// result: (MOVWstoreconstidx1 [makeValAndOff(ValAndOff(a).Val()&0xff | ValAndOff(c).Val()<<8, ValAndOff(a).Off())] {s} p i mem)
  3243  	for {
  3244  		c := v.AuxInt
  3245  		s := v.Aux
  3246  		p := v.Args[0]
  3247  		i := v.Args[1]
  3248  		x := v.Args[2]
  3249  		if x.Op != Op386MOVBstoreconstidx1 {
  3250  			break
  3251  		}
  3252  		a := x.AuxInt
  3253  		if x.Aux != s {
  3254  			break
  3255  		}
  3256  		if p != x.Args[0] {
  3257  			break
  3258  		}
  3259  		if i != x.Args[1] {
  3260  			break
  3261  		}
  3262  		mem := x.Args[2]
  3263  		if !(x.Uses == 1 && ValAndOff(a).Off()+1 == ValAndOff(c).Off() && clobber(x)) {
  3264  			break
  3265  		}
  3266  		v.reset(Op386MOVWstoreconstidx1)
  3267  		v.AuxInt = makeValAndOff(ValAndOff(a).Val()&0xff|ValAndOff(c).Val()<<8, ValAndOff(a).Off())
  3268  		v.Aux = s
  3269  		v.AddArg(p)
  3270  		v.AddArg(i)
  3271  		v.AddArg(mem)
  3272  		return true
  3273  	}
  3274  	return false
  3275  }
  3276  func rewriteValue386_Op386MOVBstoreidx1(v *Value, config *Config) bool {
  3277  	b := v.Block
  3278  	_ = b
  3279  	// match: (MOVBstoreidx1 [c] {sym} (ADDLconst [d] ptr) idx val mem)
  3280  	// cond:
  3281  	// result: (MOVBstoreidx1 [c+d] {sym} ptr idx val mem)
  3282  	for {
  3283  		c := v.AuxInt
  3284  		sym := v.Aux
  3285  		v_0 := v.Args[0]
  3286  		if v_0.Op != Op386ADDLconst {
  3287  			break
  3288  		}
  3289  		d := v_0.AuxInt
  3290  		ptr := v_0.Args[0]
  3291  		idx := v.Args[1]
  3292  		val := v.Args[2]
  3293  		mem := v.Args[3]
  3294  		v.reset(Op386MOVBstoreidx1)
  3295  		v.AuxInt = c + d
  3296  		v.Aux = sym
  3297  		v.AddArg(ptr)
  3298  		v.AddArg(idx)
  3299  		v.AddArg(val)
  3300  		v.AddArg(mem)
  3301  		return true
  3302  	}
  3303  	// match: (MOVBstoreidx1 [c] {sym} ptr (ADDLconst [d] idx) val mem)
  3304  	// cond:
  3305  	// result: (MOVBstoreidx1 [c+d] {sym} ptr idx val mem)
  3306  	for {
  3307  		c := v.AuxInt
  3308  		sym := v.Aux
  3309  		ptr := v.Args[0]
  3310  		v_1 := v.Args[1]
  3311  		if v_1.Op != Op386ADDLconst {
  3312  			break
  3313  		}
  3314  		d := v_1.AuxInt
  3315  		idx := v_1.Args[0]
  3316  		val := v.Args[2]
  3317  		mem := v.Args[3]
  3318  		v.reset(Op386MOVBstoreidx1)
  3319  		v.AuxInt = c + d
  3320  		v.Aux = sym
  3321  		v.AddArg(ptr)
  3322  		v.AddArg(idx)
  3323  		v.AddArg(val)
  3324  		v.AddArg(mem)
  3325  		return true
  3326  	}
  3327  	// match: (MOVBstoreidx1 [i] {s} p idx (SHRLconst [8] w) x:(MOVBstoreidx1 [i-1] {s} p idx w mem))
  3328  	// cond: x.Uses == 1   && clobber(x)
  3329  	// result: (MOVWstoreidx1 [i-1] {s} p idx w mem)
  3330  	for {
  3331  		i := v.AuxInt
  3332  		s := v.Aux
  3333  		p := v.Args[0]
  3334  		idx := v.Args[1]
  3335  		v_2 := v.Args[2]
  3336  		if v_2.Op != Op386SHRLconst {
  3337  			break
  3338  		}
  3339  		if v_2.AuxInt != 8 {
  3340  			break
  3341  		}
  3342  		w := v_2.Args[0]
  3343  		x := v.Args[3]
  3344  		if x.Op != Op386MOVBstoreidx1 {
  3345  			break
  3346  		}
  3347  		if x.AuxInt != i-1 {
  3348  			break
  3349  		}
  3350  		if x.Aux != s {
  3351  			break
  3352  		}
  3353  		if p != x.Args[0] {
  3354  			break
  3355  		}
  3356  		if idx != x.Args[1] {
  3357  			break
  3358  		}
  3359  		if w != x.Args[2] {
  3360  			break
  3361  		}
  3362  		mem := x.Args[3]
  3363  		if !(x.Uses == 1 && clobber(x)) {
  3364  			break
  3365  		}
  3366  		v.reset(Op386MOVWstoreidx1)
  3367  		v.AuxInt = i - 1
  3368  		v.Aux = s
  3369  		v.AddArg(p)
  3370  		v.AddArg(idx)
  3371  		v.AddArg(w)
  3372  		v.AddArg(mem)
  3373  		return true
  3374  	}
  3375  	// match: (MOVBstoreidx1 [i] {s} p idx (SHRLconst [j] w) x:(MOVBstoreidx1 [i-1] {s} p idx w0:(SHRLconst [j-8] w) mem))
  3376  	// cond: x.Uses == 1   && clobber(x)
  3377  	// result: (MOVWstoreidx1 [i-1] {s} p idx w0 mem)
  3378  	for {
  3379  		i := v.AuxInt
  3380  		s := v.Aux
  3381  		p := v.Args[0]
  3382  		idx := v.Args[1]
  3383  		v_2 := v.Args[2]
  3384  		if v_2.Op != Op386SHRLconst {
  3385  			break
  3386  		}
  3387  		j := v_2.AuxInt
  3388  		w := v_2.Args[0]
  3389  		x := v.Args[3]
  3390  		if x.Op != Op386MOVBstoreidx1 {
  3391  			break
  3392  		}
  3393  		if x.AuxInt != i-1 {
  3394  			break
  3395  		}
  3396  		if x.Aux != s {
  3397  			break
  3398  		}
  3399  		if p != x.Args[0] {
  3400  			break
  3401  		}
  3402  		if idx != x.Args[1] {
  3403  			break
  3404  		}
  3405  		w0 := x.Args[2]
  3406  		if w0.Op != Op386SHRLconst {
  3407  			break
  3408  		}
  3409  		if w0.AuxInt != j-8 {
  3410  			break
  3411  		}
  3412  		if w != w0.Args[0] {
  3413  			break
  3414  		}
  3415  		mem := x.Args[3]
  3416  		if !(x.Uses == 1 && clobber(x)) {
  3417  			break
  3418  		}
  3419  		v.reset(Op386MOVWstoreidx1)
  3420  		v.AuxInt = i - 1
  3421  		v.Aux = s
  3422  		v.AddArg(p)
  3423  		v.AddArg(idx)
  3424  		v.AddArg(w0)
  3425  		v.AddArg(mem)
  3426  		return true
  3427  	}
  3428  	return false
  3429  }
  3430  func rewriteValue386_Op386MOVLload(v *Value, config *Config) bool {
  3431  	b := v.Block
  3432  	_ = b
  3433  	// match: (MOVLload [off] {sym} ptr (MOVLstore [off2] {sym2} ptr2 x _))
  3434  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  3435  	// result: x
  3436  	for {
  3437  		off := v.AuxInt
  3438  		sym := v.Aux
  3439  		ptr := v.Args[0]
  3440  		v_1 := v.Args[1]
  3441  		if v_1.Op != Op386MOVLstore {
  3442  			break
  3443  		}
  3444  		off2 := v_1.AuxInt
  3445  		sym2 := v_1.Aux
  3446  		ptr2 := v_1.Args[0]
  3447  		x := v_1.Args[1]
  3448  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  3449  			break
  3450  		}
  3451  		v.reset(OpCopy)
  3452  		v.Type = x.Type
  3453  		v.AddArg(x)
  3454  		return true
  3455  	}
  3456  	// match: (MOVLload  [off1] {sym} (ADDLconst [off2] ptr) mem)
  3457  	// cond: is32Bit(off1+off2)
  3458  	// result: (MOVLload  [off1+off2] {sym} ptr mem)
  3459  	for {
  3460  		off1 := v.AuxInt
  3461  		sym := v.Aux
  3462  		v_0 := v.Args[0]
  3463  		if v_0.Op != Op386ADDLconst {
  3464  			break
  3465  		}
  3466  		off2 := v_0.AuxInt
  3467  		ptr := v_0.Args[0]
  3468  		mem := v.Args[1]
  3469  		if !(is32Bit(off1 + off2)) {
  3470  			break
  3471  		}
  3472  		v.reset(Op386MOVLload)
  3473  		v.AuxInt = off1 + off2
  3474  		v.Aux = sym
  3475  		v.AddArg(ptr)
  3476  		v.AddArg(mem)
  3477  		return true
  3478  	}
  3479  	// match: (MOVLload  [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  3480  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  3481  	// result: (MOVLload  [off1+off2] {mergeSym(sym1,sym2)} base mem)
  3482  	for {
  3483  		off1 := v.AuxInt
  3484  		sym1 := v.Aux
  3485  		v_0 := v.Args[0]
  3486  		if v_0.Op != Op386LEAL {
  3487  			break
  3488  		}
  3489  		off2 := v_0.AuxInt
  3490  		sym2 := v_0.Aux
  3491  		base := v_0.Args[0]
  3492  		mem := v.Args[1]
  3493  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  3494  			break
  3495  		}
  3496  		v.reset(Op386MOVLload)
  3497  		v.AuxInt = off1 + off2
  3498  		v.Aux = mergeSym(sym1, sym2)
  3499  		v.AddArg(base)
  3500  		v.AddArg(mem)
  3501  		return true
  3502  	}
  3503  	// match: (MOVLload [off1] {sym1} (LEAL1 [off2] {sym2} ptr idx) mem)
  3504  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  3505  	// result: (MOVLloadidx1 [off1+off2] {mergeSym(sym1,sym2)} ptr idx mem)
  3506  	for {
  3507  		off1 := v.AuxInt
  3508  		sym1 := v.Aux
  3509  		v_0 := v.Args[0]
  3510  		if v_0.Op != Op386LEAL1 {
  3511  			break
  3512  		}
  3513  		off2 := v_0.AuxInt
  3514  		sym2 := v_0.Aux
  3515  		ptr := v_0.Args[0]
  3516  		idx := v_0.Args[1]
  3517  		mem := v.Args[1]
  3518  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  3519  			break
  3520  		}
  3521  		v.reset(Op386MOVLloadidx1)
  3522  		v.AuxInt = off1 + off2
  3523  		v.Aux = mergeSym(sym1, sym2)
  3524  		v.AddArg(ptr)
  3525  		v.AddArg(idx)
  3526  		v.AddArg(mem)
  3527  		return true
  3528  	}
  3529  	// match: (MOVLload [off1] {sym1} (LEAL4 [off2] {sym2} ptr idx) mem)
  3530  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  3531  	// result: (MOVLloadidx4 [off1+off2] {mergeSym(sym1,sym2)} ptr idx mem)
  3532  	for {
  3533  		off1 := v.AuxInt
  3534  		sym1 := v.Aux
  3535  		v_0 := v.Args[0]
  3536  		if v_0.Op != Op386LEAL4 {
  3537  			break
  3538  		}
  3539  		off2 := v_0.AuxInt
  3540  		sym2 := v_0.Aux
  3541  		ptr := v_0.Args[0]
  3542  		idx := v_0.Args[1]
  3543  		mem := v.Args[1]
  3544  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  3545  			break
  3546  		}
  3547  		v.reset(Op386MOVLloadidx4)
  3548  		v.AuxInt = off1 + off2
  3549  		v.Aux = mergeSym(sym1, sym2)
  3550  		v.AddArg(ptr)
  3551  		v.AddArg(idx)
  3552  		v.AddArg(mem)
  3553  		return true
  3554  	}
  3555  	// match: (MOVLload [off] {sym} (ADDL ptr idx) mem)
  3556  	// cond: ptr.Op != OpSB
  3557  	// result: (MOVLloadidx1 [off] {sym} ptr idx mem)
  3558  	for {
  3559  		off := v.AuxInt
  3560  		sym := v.Aux
  3561  		v_0 := v.Args[0]
  3562  		if v_0.Op != Op386ADDL {
  3563  			break
  3564  		}
  3565  		ptr := v_0.Args[0]
  3566  		idx := v_0.Args[1]
  3567  		mem := v.Args[1]
  3568  		if !(ptr.Op != OpSB) {
  3569  			break
  3570  		}
  3571  		v.reset(Op386MOVLloadidx1)
  3572  		v.AuxInt = off
  3573  		v.Aux = sym
  3574  		v.AddArg(ptr)
  3575  		v.AddArg(idx)
  3576  		v.AddArg(mem)
  3577  		return true
  3578  	}
  3579  	return false
  3580  }
  3581  func rewriteValue386_Op386MOVLloadidx1(v *Value, config *Config) bool {
  3582  	b := v.Block
  3583  	_ = b
  3584  	// match: (MOVLloadidx1 [c] {sym} ptr (SHLLconst [2] idx) mem)
  3585  	// cond:
  3586  	// result: (MOVLloadidx4 [c] {sym} ptr idx mem)
  3587  	for {
  3588  		c := v.AuxInt
  3589  		sym := v.Aux
  3590  		ptr := v.Args[0]
  3591  		v_1 := v.Args[1]
  3592  		if v_1.Op != Op386SHLLconst {
  3593  			break
  3594  		}
  3595  		if v_1.AuxInt != 2 {
  3596  			break
  3597  		}
  3598  		idx := v_1.Args[0]
  3599  		mem := v.Args[2]
  3600  		v.reset(Op386MOVLloadidx4)
  3601  		v.AuxInt = c
  3602  		v.Aux = sym
  3603  		v.AddArg(ptr)
  3604  		v.AddArg(idx)
  3605  		v.AddArg(mem)
  3606  		return true
  3607  	}
  3608  	// match: (MOVLloadidx1 [c] {sym} (ADDLconst [d] ptr) idx mem)
  3609  	// cond:
  3610  	// result: (MOVLloadidx1 [c+d] {sym} ptr idx mem)
  3611  	for {
  3612  		c := v.AuxInt
  3613  		sym := v.Aux
  3614  		v_0 := v.Args[0]
  3615  		if v_0.Op != Op386ADDLconst {
  3616  			break
  3617  		}
  3618  		d := v_0.AuxInt
  3619  		ptr := v_0.Args[0]
  3620  		idx := v.Args[1]
  3621  		mem := v.Args[2]
  3622  		v.reset(Op386MOVLloadidx1)
  3623  		v.AuxInt = c + d
  3624  		v.Aux = sym
  3625  		v.AddArg(ptr)
  3626  		v.AddArg(idx)
  3627  		v.AddArg(mem)
  3628  		return true
  3629  	}
  3630  	// match: (MOVLloadidx1 [c] {sym} ptr (ADDLconst [d] idx) mem)
  3631  	// cond:
  3632  	// result: (MOVLloadidx1 [c+d] {sym} ptr idx mem)
  3633  	for {
  3634  		c := v.AuxInt
  3635  		sym := v.Aux
  3636  		ptr := v.Args[0]
  3637  		v_1 := v.Args[1]
  3638  		if v_1.Op != Op386ADDLconst {
  3639  			break
  3640  		}
  3641  		d := v_1.AuxInt
  3642  		idx := v_1.Args[0]
  3643  		mem := v.Args[2]
  3644  		v.reset(Op386MOVLloadidx1)
  3645  		v.AuxInt = c + d
  3646  		v.Aux = sym
  3647  		v.AddArg(ptr)
  3648  		v.AddArg(idx)
  3649  		v.AddArg(mem)
  3650  		return true
  3651  	}
  3652  	return false
  3653  }
  3654  func rewriteValue386_Op386MOVLloadidx4(v *Value, config *Config) bool {
  3655  	b := v.Block
  3656  	_ = b
  3657  	// match: (MOVLloadidx4 [c] {sym} (ADDLconst [d] ptr) idx mem)
  3658  	// cond:
  3659  	// result: (MOVLloadidx4 [c+d] {sym} ptr idx mem)
  3660  	for {
  3661  		c := v.AuxInt
  3662  		sym := v.Aux
  3663  		v_0 := v.Args[0]
  3664  		if v_0.Op != Op386ADDLconst {
  3665  			break
  3666  		}
  3667  		d := v_0.AuxInt
  3668  		ptr := v_0.Args[0]
  3669  		idx := v.Args[1]
  3670  		mem := v.Args[2]
  3671  		v.reset(Op386MOVLloadidx4)
  3672  		v.AuxInt = c + d
  3673  		v.Aux = sym
  3674  		v.AddArg(ptr)
  3675  		v.AddArg(idx)
  3676  		v.AddArg(mem)
  3677  		return true
  3678  	}
  3679  	// match: (MOVLloadidx4 [c] {sym} ptr (ADDLconst [d] idx) mem)
  3680  	// cond:
  3681  	// result: (MOVLloadidx4 [c+4*d] {sym} ptr idx mem)
  3682  	for {
  3683  		c := v.AuxInt
  3684  		sym := v.Aux
  3685  		ptr := v.Args[0]
  3686  		v_1 := v.Args[1]
  3687  		if v_1.Op != Op386ADDLconst {
  3688  			break
  3689  		}
  3690  		d := v_1.AuxInt
  3691  		idx := v_1.Args[0]
  3692  		mem := v.Args[2]
  3693  		v.reset(Op386MOVLloadidx4)
  3694  		v.AuxInt = c + 4*d
  3695  		v.Aux = sym
  3696  		v.AddArg(ptr)
  3697  		v.AddArg(idx)
  3698  		v.AddArg(mem)
  3699  		return true
  3700  	}
  3701  	return false
  3702  }
  3703  func rewriteValue386_Op386MOVLstore(v *Value, config *Config) bool {
  3704  	b := v.Block
  3705  	_ = b
  3706  	// match: (MOVLstore  [off1] {sym} (ADDLconst [off2] ptr) val mem)
  3707  	// cond: is32Bit(off1+off2)
  3708  	// result: (MOVLstore  [off1+off2] {sym} ptr val mem)
  3709  	for {
  3710  		off1 := v.AuxInt
  3711  		sym := v.Aux
  3712  		v_0 := v.Args[0]
  3713  		if v_0.Op != Op386ADDLconst {
  3714  			break
  3715  		}
  3716  		off2 := v_0.AuxInt
  3717  		ptr := v_0.Args[0]
  3718  		val := v.Args[1]
  3719  		mem := v.Args[2]
  3720  		if !(is32Bit(off1 + off2)) {
  3721  			break
  3722  		}
  3723  		v.reset(Op386MOVLstore)
  3724  		v.AuxInt = off1 + off2
  3725  		v.Aux = sym
  3726  		v.AddArg(ptr)
  3727  		v.AddArg(val)
  3728  		v.AddArg(mem)
  3729  		return true
  3730  	}
  3731  	// match: (MOVLstore [off] {sym} ptr (MOVLconst [c]) mem)
  3732  	// cond: validOff(off)
  3733  	// result: (MOVLstoreconst [makeValAndOff(int64(int32(c)),off)] {sym} ptr mem)
  3734  	for {
  3735  		off := v.AuxInt
  3736  		sym := v.Aux
  3737  		ptr := v.Args[0]
  3738  		v_1 := v.Args[1]
  3739  		if v_1.Op != Op386MOVLconst {
  3740  			break
  3741  		}
  3742  		c := v_1.AuxInt
  3743  		mem := v.Args[2]
  3744  		if !(validOff(off)) {
  3745  			break
  3746  		}
  3747  		v.reset(Op386MOVLstoreconst)
  3748  		v.AuxInt = makeValAndOff(int64(int32(c)), off)
  3749  		v.Aux = sym
  3750  		v.AddArg(ptr)
  3751  		v.AddArg(mem)
  3752  		return true
  3753  	}
  3754  	// match: (MOVLstore  [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  3755  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  3756  	// result: (MOVLstore  [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  3757  	for {
  3758  		off1 := v.AuxInt
  3759  		sym1 := v.Aux
  3760  		v_0 := v.Args[0]
  3761  		if v_0.Op != Op386LEAL {
  3762  			break
  3763  		}
  3764  		off2 := v_0.AuxInt
  3765  		sym2 := v_0.Aux
  3766  		base := v_0.Args[0]
  3767  		val := v.Args[1]
  3768  		mem := v.Args[2]
  3769  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  3770  			break
  3771  		}
  3772  		v.reset(Op386MOVLstore)
  3773  		v.AuxInt = off1 + off2
  3774  		v.Aux = mergeSym(sym1, sym2)
  3775  		v.AddArg(base)
  3776  		v.AddArg(val)
  3777  		v.AddArg(mem)
  3778  		return true
  3779  	}
  3780  	// match: (MOVLstore [off1] {sym1} (LEAL1 [off2] {sym2} ptr idx) val mem)
  3781  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  3782  	// result: (MOVLstoreidx1 [off1+off2] {mergeSym(sym1,sym2)} ptr idx val mem)
  3783  	for {
  3784  		off1 := v.AuxInt
  3785  		sym1 := v.Aux
  3786  		v_0 := v.Args[0]
  3787  		if v_0.Op != Op386LEAL1 {
  3788  			break
  3789  		}
  3790  		off2 := v_0.AuxInt
  3791  		sym2 := v_0.Aux
  3792  		ptr := v_0.Args[0]
  3793  		idx := v_0.Args[1]
  3794  		val := v.Args[1]
  3795  		mem := v.Args[2]
  3796  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  3797  			break
  3798  		}
  3799  		v.reset(Op386MOVLstoreidx1)
  3800  		v.AuxInt = off1 + off2
  3801  		v.Aux = mergeSym(sym1, sym2)
  3802  		v.AddArg(ptr)
  3803  		v.AddArg(idx)
  3804  		v.AddArg(val)
  3805  		v.AddArg(mem)
  3806  		return true
  3807  	}
  3808  	// match: (MOVLstore [off1] {sym1} (LEAL4 [off2] {sym2} ptr idx) val mem)
  3809  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  3810  	// result: (MOVLstoreidx4 [off1+off2] {mergeSym(sym1,sym2)} ptr idx val mem)
  3811  	for {
  3812  		off1 := v.AuxInt
  3813  		sym1 := v.Aux
  3814  		v_0 := v.Args[0]
  3815  		if v_0.Op != Op386LEAL4 {
  3816  			break
  3817  		}
  3818  		off2 := v_0.AuxInt
  3819  		sym2 := v_0.Aux
  3820  		ptr := v_0.Args[0]
  3821  		idx := v_0.Args[1]
  3822  		val := v.Args[1]
  3823  		mem := v.Args[2]
  3824  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  3825  			break
  3826  		}
  3827  		v.reset(Op386MOVLstoreidx4)
  3828  		v.AuxInt = off1 + off2
  3829  		v.Aux = mergeSym(sym1, sym2)
  3830  		v.AddArg(ptr)
  3831  		v.AddArg(idx)
  3832  		v.AddArg(val)
  3833  		v.AddArg(mem)
  3834  		return true
  3835  	}
  3836  	// match: (MOVLstore [off] {sym} (ADDL ptr idx) val mem)
  3837  	// cond: ptr.Op != OpSB
  3838  	// result: (MOVLstoreidx1 [off] {sym} ptr idx val mem)
  3839  	for {
  3840  		off := v.AuxInt
  3841  		sym := v.Aux
  3842  		v_0 := v.Args[0]
  3843  		if v_0.Op != Op386ADDL {
  3844  			break
  3845  		}
  3846  		ptr := v_0.Args[0]
  3847  		idx := v_0.Args[1]
  3848  		val := v.Args[1]
  3849  		mem := v.Args[2]
  3850  		if !(ptr.Op != OpSB) {
  3851  			break
  3852  		}
  3853  		v.reset(Op386MOVLstoreidx1)
  3854  		v.AuxInt = off
  3855  		v.Aux = sym
  3856  		v.AddArg(ptr)
  3857  		v.AddArg(idx)
  3858  		v.AddArg(val)
  3859  		v.AddArg(mem)
  3860  		return true
  3861  	}
  3862  	return false
  3863  }
  3864  func rewriteValue386_Op386MOVLstoreconst(v *Value, config *Config) bool {
  3865  	b := v.Block
  3866  	_ = b
  3867  	// match: (MOVLstoreconst [sc] {s} (ADDLconst [off] ptr) mem)
  3868  	// cond: ValAndOff(sc).canAdd(off)
  3869  	// result: (MOVLstoreconst [ValAndOff(sc).add(off)] {s} ptr mem)
  3870  	for {
  3871  		sc := v.AuxInt
  3872  		s := v.Aux
  3873  		v_0 := v.Args[0]
  3874  		if v_0.Op != Op386ADDLconst {
  3875  			break
  3876  		}
  3877  		off := v_0.AuxInt
  3878  		ptr := v_0.Args[0]
  3879  		mem := v.Args[1]
  3880  		if !(ValAndOff(sc).canAdd(off)) {
  3881  			break
  3882  		}
  3883  		v.reset(Op386MOVLstoreconst)
  3884  		v.AuxInt = ValAndOff(sc).add(off)
  3885  		v.Aux = s
  3886  		v.AddArg(ptr)
  3887  		v.AddArg(mem)
  3888  		return true
  3889  	}
  3890  	// match: (MOVLstoreconst [sc] {sym1} (LEAL [off] {sym2} ptr) mem)
  3891  	// cond: canMergeSym(sym1, sym2) && ValAndOff(sc).canAdd(off)   && (ptr.Op != OpSB || !config.ctxt.Flag_shared)
  3892  	// result: (MOVLstoreconst [ValAndOff(sc).add(off)] {mergeSym(sym1, sym2)} ptr mem)
  3893  	for {
  3894  		sc := v.AuxInt
  3895  		sym1 := v.Aux
  3896  		v_0 := v.Args[0]
  3897  		if v_0.Op != Op386LEAL {
  3898  			break
  3899  		}
  3900  		off := v_0.AuxInt
  3901  		sym2 := v_0.Aux
  3902  		ptr := v_0.Args[0]
  3903  		mem := v.Args[1]
  3904  		if !(canMergeSym(sym1, sym2) && ValAndOff(sc).canAdd(off) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
  3905  			break
  3906  		}
  3907  		v.reset(Op386MOVLstoreconst)
  3908  		v.AuxInt = ValAndOff(sc).add(off)
  3909  		v.Aux = mergeSym(sym1, sym2)
  3910  		v.AddArg(ptr)
  3911  		v.AddArg(mem)
  3912  		return true
  3913  	}
  3914  	// match: (MOVLstoreconst [x] {sym1} (LEAL1 [off] {sym2} ptr idx) mem)
  3915  	// cond: canMergeSym(sym1, sym2)
  3916  	// result: (MOVLstoreconstidx1 [ValAndOff(x).add(off)] {mergeSym(sym1,sym2)} ptr idx mem)
  3917  	for {
  3918  		x := v.AuxInt
  3919  		sym1 := v.Aux
  3920  		v_0 := v.Args[0]
  3921  		if v_0.Op != Op386LEAL1 {
  3922  			break
  3923  		}
  3924  		off := v_0.AuxInt
  3925  		sym2 := v_0.Aux
  3926  		ptr := v_0.Args[0]
  3927  		idx := v_0.Args[1]
  3928  		mem := v.Args[1]
  3929  		if !(canMergeSym(sym1, sym2)) {
  3930  			break
  3931  		}
  3932  		v.reset(Op386MOVLstoreconstidx1)
  3933  		v.AuxInt = ValAndOff(x).add(off)
  3934  		v.Aux = mergeSym(sym1, sym2)
  3935  		v.AddArg(ptr)
  3936  		v.AddArg(idx)
  3937  		v.AddArg(mem)
  3938  		return true
  3939  	}
  3940  	// match: (MOVLstoreconst [x] {sym1} (LEAL4 [off] {sym2} ptr idx) mem)
  3941  	// cond: canMergeSym(sym1, sym2)
  3942  	// result: (MOVLstoreconstidx4 [ValAndOff(x).add(off)] {mergeSym(sym1,sym2)} ptr idx mem)
  3943  	for {
  3944  		x := v.AuxInt
  3945  		sym1 := v.Aux
  3946  		v_0 := v.Args[0]
  3947  		if v_0.Op != Op386LEAL4 {
  3948  			break
  3949  		}
  3950  		off := v_0.AuxInt
  3951  		sym2 := v_0.Aux
  3952  		ptr := v_0.Args[0]
  3953  		idx := v_0.Args[1]
  3954  		mem := v.Args[1]
  3955  		if !(canMergeSym(sym1, sym2)) {
  3956  			break
  3957  		}
  3958  		v.reset(Op386MOVLstoreconstidx4)
  3959  		v.AuxInt = ValAndOff(x).add(off)
  3960  		v.Aux = mergeSym(sym1, sym2)
  3961  		v.AddArg(ptr)
  3962  		v.AddArg(idx)
  3963  		v.AddArg(mem)
  3964  		return true
  3965  	}
  3966  	// match: (MOVLstoreconst [x] {sym} (ADDL ptr idx) mem)
  3967  	// cond:
  3968  	// result: (MOVLstoreconstidx1 [x] {sym} ptr idx mem)
  3969  	for {
  3970  		x := v.AuxInt
  3971  		sym := v.Aux
  3972  		v_0 := v.Args[0]
  3973  		if v_0.Op != Op386ADDL {
  3974  			break
  3975  		}
  3976  		ptr := v_0.Args[0]
  3977  		idx := v_0.Args[1]
  3978  		mem := v.Args[1]
  3979  		v.reset(Op386MOVLstoreconstidx1)
  3980  		v.AuxInt = x
  3981  		v.Aux = sym
  3982  		v.AddArg(ptr)
  3983  		v.AddArg(idx)
  3984  		v.AddArg(mem)
  3985  		return true
  3986  	}
  3987  	return false
  3988  }
  3989  func rewriteValue386_Op386MOVLstoreconstidx1(v *Value, config *Config) bool {
  3990  	b := v.Block
  3991  	_ = b
  3992  	// match: (MOVLstoreconstidx1 [c] {sym} ptr (SHLLconst [2] idx) mem)
  3993  	// cond:
  3994  	// result: (MOVLstoreconstidx4 [c] {sym} ptr idx mem)
  3995  	for {
  3996  		c := v.AuxInt
  3997  		sym := v.Aux
  3998  		ptr := v.Args[0]
  3999  		v_1 := v.Args[1]
  4000  		if v_1.Op != Op386SHLLconst {
  4001  			break
  4002  		}
  4003  		if v_1.AuxInt != 2 {
  4004  			break
  4005  		}
  4006  		idx := v_1.Args[0]
  4007  		mem := v.Args[2]
  4008  		v.reset(Op386MOVLstoreconstidx4)
  4009  		v.AuxInt = c
  4010  		v.Aux = sym
  4011  		v.AddArg(ptr)
  4012  		v.AddArg(idx)
  4013  		v.AddArg(mem)
  4014  		return true
  4015  	}
  4016  	// match: (MOVLstoreconstidx1 [x] {sym} (ADDLconst [c] ptr) idx mem)
  4017  	// cond:
  4018  	// result: (MOVLstoreconstidx1 [ValAndOff(x).add(c)] {sym} ptr idx mem)
  4019  	for {
  4020  		x := v.AuxInt
  4021  		sym := v.Aux
  4022  		v_0 := v.Args[0]
  4023  		if v_0.Op != Op386ADDLconst {
  4024  			break
  4025  		}
  4026  		c := v_0.AuxInt
  4027  		ptr := v_0.Args[0]
  4028  		idx := v.Args[1]
  4029  		mem := v.Args[2]
  4030  		v.reset(Op386MOVLstoreconstidx1)
  4031  		v.AuxInt = ValAndOff(x).add(c)
  4032  		v.Aux = sym
  4033  		v.AddArg(ptr)
  4034  		v.AddArg(idx)
  4035  		v.AddArg(mem)
  4036  		return true
  4037  	}
  4038  	// match: (MOVLstoreconstidx1 [x] {sym} ptr (ADDLconst [c] idx) mem)
  4039  	// cond:
  4040  	// result: (MOVLstoreconstidx1 [ValAndOff(x).add(c)] {sym} ptr idx mem)
  4041  	for {
  4042  		x := v.AuxInt
  4043  		sym := v.Aux
  4044  		ptr := v.Args[0]
  4045  		v_1 := v.Args[1]
  4046  		if v_1.Op != Op386ADDLconst {
  4047  			break
  4048  		}
  4049  		c := v_1.AuxInt
  4050  		idx := v_1.Args[0]
  4051  		mem := v.Args[2]
  4052  		v.reset(Op386MOVLstoreconstidx1)
  4053  		v.AuxInt = ValAndOff(x).add(c)
  4054  		v.Aux = sym
  4055  		v.AddArg(ptr)
  4056  		v.AddArg(idx)
  4057  		v.AddArg(mem)
  4058  		return true
  4059  	}
  4060  	return false
  4061  }
  4062  func rewriteValue386_Op386MOVLstoreconstidx4(v *Value, config *Config) bool {
  4063  	b := v.Block
  4064  	_ = b
  4065  	// match: (MOVLstoreconstidx4 [x] {sym} (ADDLconst [c] ptr) idx mem)
  4066  	// cond:
  4067  	// result: (MOVLstoreconstidx4 [ValAndOff(x).add(c)] {sym} ptr idx mem)
  4068  	for {
  4069  		x := v.AuxInt
  4070  		sym := v.Aux
  4071  		v_0 := v.Args[0]
  4072  		if v_0.Op != Op386ADDLconst {
  4073  			break
  4074  		}
  4075  		c := v_0.AuxInt
  4076  		ptr := v_0.Args[0]
  4077  		idx := v.Args[1]
  4078  		mem := v.Args[2]
  4079  		v.reset(Op386MOVLstoreconstidx4)
  4080  		v.AuxInt = ValAndOff(x).add(c)
  4081  		v.Aux = sym
  4082  		v.AddArg(ptr)
  4083  		v.AddArg(idx)
  4084  		v.AddArg(mem)
  4085  		return true
  4086  	}
  4087  	// match: (MOVLstoreconstidx4 [x] {sym} ptr (ADDLconst [c] idx) mem)
  4088  	// cond:
  4089  	// result: (MOVLstoreconstidx4 [ValAndOff(x).add(4*c)] {sym} ptr idx mem)
  4090  	for {
  4091  		x := v.AuxInt
  4092  		sym := v.Aux
  4093  		ptr := v.Args[0]
  4094  		v_1 := v.Args[1]
  4095  		if v_1.Op != Op386ADDLconst {
  4096  			break
  4097  		}
  4098  		c := v_1.AuxInt
  4099  		idx := v_1.Args[0]
  4100  		mem := v.Args[2]
  4101  		v.reset(Op386MOVLstoreconstidx4)
  4102  		v.AuxInt = ValAndOff(x).add(4 * c)
  4103  		v.Aux = sym
  4104  		v.AddArg(ptr)
  4105  		v.AddArg(idx)
  4106  		v.AddArg(mem)
  4107  		return true
  4108  	}
  4109  	return false
  4110  }
  4111  func rewriteValue386_Op386MOVLstoreidx1(v *Value, config *Config) bool {
  4112  	b := v.Block
  4113  	_ = b
  4114  	// match: (MOVLstoreidx1 [c] {sym} ptr (SHLLconst [2] idx) val mem)
  4115  	// cond:
  4116  	// result: (MOVLstoreidx4 [c] {sym} ptr idx val mem)
  4117  	for {
  4118  		c := v.AuxInt
  4119  		sym := v.Aux
  4120  		ptr := v.Args[0]
  4121  		v_1 := v.Args[1]
  4122  		if v_1.Op != Op386SHLLconst {
  4123  			break
  4124  		}
  4125  		if v_1.AuxInt != 2 {
  4126  			break
  4127  		}
  4128  		idx := v_1.Args[0]
  4129  		val := v.Args[2]
  4130  		mem := v.Args[3]
  4131  		v.reset(Op386MOVLstoreidx4)
  4132  		v.AuxInt = c
  4133  		v.Aux = sym
  4134  		v.AddArg(ptr)
  4135  		v.AddArg(idx)
  4136  		v.AddArg(val)
  4137  		v.AddArg(mem)
  4138  		return true
  4139  	}
  4140  	// match: (MOVLstoreidx1 [c] {sym} (ADDLconst [d] ptr) idx val mem)
  4141  	// cond:
  4142  	// result: (MOVLstoreidx1 [c+d] {sym} ptr idx val mem)
  4143  	for {
  4144  		c := v.AuxInt
  4145  		sym := v.Aux
  4146  		v_0 := v.Args[0]
  4147  		if v_0.Op != Op386ADDLconst {
  4148  			break
  4149  		}
  4150  		d := v_0.AuxInt
  4151  		ptr := v_0.Args[0]
  4152  		idx := v.Args[1]
  4153  		val := v.Args[2]
  4154  		mem := v.Args[3]
  4155  		v.reset(Op386MOVLstoreidx1)
  4156  		v.AuxInt = c + d
  4157  		v.Aux = sym
  4158  		v.AddArg(ptr)
  4159  		v.AddArg(idx)
  4160  		v.AddArg(val)
  4161  		v.AddArg(mem)
  4162  		return true
  4163  	}
  4164  	// match: (MOVLstoreidx1 [c] {sym} ptr (ADDLconst [d] idx) val mem)
  4165  	// cond:
  4166  	// result: (MOVLstoreidx1 [c+d] {sym} ptr idx val mem)
  4167  	for {
  4168  		c := v.AuxInt
  4169  		sym := v.Aux
  4170  		ptr := v.Args[0]
  4171  		v_1 := v.Args[1]
  4172  		if v_1.Op != Op386ADDLconst {
  4173  			break
  4174  		}
  4175  		d := v_1.AuxInt
  4176  		idx := v_1.Args[0]
  4177  		val := v.Args[2]
  4178  		mem := v.Args[3]
  4179  		v.reset(Op386MOVLstoreidx1)
  4180  		v.AuxInt = c + d
  4181  		v.Aux = sym
  4182  		v.AddArg(ptr)
  4183  		v.AddArg(idx)
  4184  		v.AddArg(val)
  4185  		v.AddArg(mem)
  4186  		return true
  4187  	}
  4188  	return false
  4189  }
  4190  func rewriteValue386_Op386MOVLstoreidx4(v *Value, config *Config) bool {
  4191  	b := v.Block
  4192  	_ = b
  4193  	// match: (MOVLstoreidx4 [c] {sym} (ADDLconst [d] ptr) idx val mem)
  4194  	// cond:
  4195  	// result: (MOVLstoreidx4 [c+d] {sym} ptr idx val mem)
  4196  	for {
  4197  		c := v.AuxInt
  4198  		sym := v.Aux
  4199  		v_0 := v.Args[0]
  4200  		if v_0.Op != Op386ADDLconst {
  4201  			break
  4202  		}
  4203  		d := v_0.AuxInt
  4204  		ptr := v_0.Args[0]
  4205  		idx := v.Args[1]
  4206  		val := v.Args[2]
  4207  		mem := v.Args[3]
  4208  		v.reset(Op386MOVLstoreidx4)
  4209  		v.AuxInt = c + d
  4210  		v.Aux = sym
  4211  		v.AddArg(ptr)
  4212  		v.AddArg(idx)
  4213  		v.AddArg(val)
  4214  		v.AddArg(mem)
  4215  		return true
  4216  	}
  4217  	// match: (MOVLstoreidx4 [c] {sym} ptr (ADDLconst [d] idx) val mem)
  4218  	// cond:
  4219  	// result: (MOVLstoreidx4 [c+4*d] {sym} ptr idx val mem)
  4220  	for {
  4221  		c := v.AuxInt
  4222  		sym := v.Aux
  4223  		ptr := v.Args[0]
  4224  		v_1 := v.Args[1]
  4225  		if v_1.Op != Op386ADDLconst {
  4226  			break
  4227  		}
  4228  		d := v_1.AuxInt
  4229  		idx := v_1.Args[0]
  4230  		val := v.Args[2]
  4231  		mem := v.Args[3]
  4232  		v.reset(Op386MOVLstoreidx4)
  4233  		v.AuxInt = c + 4*d
  4234  		v.Aux = sym
  4235  		v.AddArg(ptr)
  4236  		v.AddArg(idx)
  4237  		v.AddArg(val)
  4238  		v.AddArg(mem)
  4239  		return true
  4240  	}
  4241  	return false
  4242  }
  4243  func rewriteValue386_Op386MOVSDconst(v *Value, config *Config) bool {
  4244  	b := v.Block
  4245  	_ = b
  4246  	// match: (MOVSDconst [c])
  4247  	// cond: config.ctxt.Flag_shared
  4248  	// result: (MOVSDconst2 (MOVSDconst1 [c]))
  4249  	for {
  4250  		c := v.AuxInt
  4251  		if !(config.ctxt.Flag_shared) {
  4252  			break
  4253  		}
  4254  		v.reset(Op386MOVSDconst2)
  4255  		v0 := b.NewValue0(v.Line, Op386MOVSDconst1, config.fe.TypeUInt32())
  4256  		v0.AuxInt = c
  4257  		v.AddArg(v0)
  4258  		return true
  4259  	}
  4260  	return false
  4261  }
  4262  func rewriteValue386_Op386MOVSDload(v *Value, config *Config) bool {
  4263  	b := v.Block
  4264  	_ = b
  4265  	// match: (MOVSDload [off1] {sym} (ADDLconst [off2] ptr) mem)
  4266  	// cond: is32Bit(off1+off2)
  4267  	// result: (MOVSDload [off1+off2] {sym} ptr mem)
  4268  	for {
  4269  		off1 := v.AuxInt
  4270  		sym := v.Aux
  4271  		v_0 := v.Args[0]
  4272  		if v_0.Op != Op386ADDLconst {
  4273  			break
  4274  		}
  4275  		off2 := v_0.AuxInt
  4276  		ptr := v_0.Args[0]
  4277  		mem := v.Args[1]
  4278  		if !(is32Bit(off1 + off2)) {
  4279  			break
  4280  		}
  4281  		v.reset(Op386MOVSDload)
  4282  		v.AuxInt = off1 + off2
  4283  		v.Aux = sym
  4284  		v.AddArg(ptr)
  4285  		v.AddArg(mem)
  4286  		return true
  4287  	}
  4288  	// match: (MOVSDload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  4289  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  4290  	// result: (MOVSDload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  4291  	for {
  4292  		off1 := v.AuxInt
  4293  		sym1 := v.Aux
  4294  		v_0 := v.Args[0]
  4295  		if v_0.Op != Op386LEAL {
  4296  			break
  4297  		}
  4298  		off2 := v_0.AuxInt
  4299  		sym2 := v_0.Aux
  4300  		base := v_0.Args[0]
  4301  		mem := v.Args[1]
  4302  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  4303  			break
  4304  		}
  4305  		v.reset(Op386MOVSDload)
  4306  		v.AuxInt = off1 + off2
  4307  		v.Aux = mergeSym(sym1, sym2)
  4308  		v.AddArg(base)
  4309  		v.AddArg(mem)
  4310  		return true
  4311  	}
  4312  	// match: (MOVSDload [off1] {sym1} (LEAL1 [off2] {sym2} ptr idx) mem)
  4313  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  4314  	// result: (MOVSDloadidx1 [off1+off2] {mergeSym(sym1,sym2)} ptr idx mem)
  4315  	for {
  4316  		off1 := v.AuxInt
  4317  		sym1 := v.Aux
  4318  		v_0 := v.Args[0]
  4319  		if v_0.Op != Op386LEAL1 {
  4320  			break
  4321  		}
  4322  		off2 := v_0.AuxInt
  4323  		sym2 := v_0.Aux
  4324  		ptr := v_0.Args[0]
  4325  		idx := v_0.Args[1]
  4326  		mem := v.Args[1]
  4327  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  4328  			break
  4329  		}
  4330  		v.reset(Op386MOVSDloadidx1)
  4331  		v.AuxInt = off1 + off2
  4332  		v.Aux = mergeSym(sym1, sym2)
  4333  		v.AddArg(ptr)
  4334  		v.AddArg(idx)
  4335  		v.AddArg(mem)
  4336  		return true
  4337  	}
  4338  	// match: (MOVSDload [off1] {sym1} (LEAL8 [off2] {sym2} ptr idx) mem)
  4339  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  4340  	// result: (MOVSDloadidx8 [off1+off2] {mergeSym(sym1,sym2)} ptr idx mem)
  4341  	for {
  4342  		off1 := v.AuxInt
  4343  		sym1 := v.Aux
  4344  		v_0 := v.Args[0]
  4345  		if v_0.Op != Op386LEAL8 {
  4346  			break
  4347  		}
  4348  		off2 := v_0.AuxInt
  4349  		sym2 := v_0.Aux
  4350  		ptr := v_0.Args[0]
  4351  		idx := v_0.Args[1]
  4352  		mem := v.Args[1]
  4353  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  4354  			break
  4355  		}
  4356  		v.reset(Op386MOVSDloadidx8)
  4357  		v.AuxInt = off1 + off2
  4358  		v.Aux = mergeSym(sym1, sym2)
  4359  		v.AddArg(ptr)
  4360  		v.AddArg(idx)
  4361  		v.AddArg(mem)
  4362  		return true
  4363  	}
  4364  	// match: (MOVSDload [off] {sym} (ADDL ptr idx) mem)
  4365  	// cond: ptr.Op != OpSB
  4366  	// result: (MOVSDloadidx1 [off] {sym} ptr idx mem)
  4367  	for {
  4368  		off := v.AuxInt
  4369  		sym := v.Aux
  4370  		v_0 := v.Args[0]
  4371  		if v_0.Op != Op386ADDL {
  4372  			break
  4373  		}
  4374  		ptr := v_0.Args[0]
  4375  		idx := v_0.Args[1]
  4376  		mem := v.Args[1]
  4377  		if !(ptr.Op != OpSB) {
  4378  			break
  4379  		}
  4380  		v.reset(Op386MOVSDloadidx1)
  4381  		v.AuxInt = off
  4382  		v.Aux = sym
  4383  		v.AddArg(ptr)
  4384  		v.AddArg(idx)
  4385  		v.AddArg(mem)
  4386  		return true
  4387  	}
  4388  	return false
  4389  }
  4390  func rewriteValue386_Op386MOVSDloadidx1(v *Value, config *Config) bool {
  4391  	b := v.Block
  4392  	_ = b
  4393  	// match: (MOVSDloadidx1 [c] {sym} (ADDLconst [d] ptr) idx mem)
  4394  	// cond:
  4395  	// result: (MOVSDloadidx1 [c+d] {sym} ptr idx mem)
  4396  	for {
  4397  		c := v.AuxInt
  4398  		sym := v.Aux
  4399  		v_0 := v.Args[0]
  4400  		if v_0.Op != Op386ADDLconst {
  4401  			break
  4402  		}
  4403  		d := v_0.AuxInt
  4404  		ptr := v_0.Args[0]
  4405  		idx := v.Args[1]
  4406  		mem := v.Args[2]
  4407  		v.reset(Op386MOVSDloadidx1)
  4408  		v.AuxInt = c + d
  4409  		v.Aux = sym
  4410  		v.AddArg(ptr)
  4411  		v.AddArg(idx)
  4412  		v.AddArg(mem)
  4413  		return true
  4414  	}
  4415  	// match: (MOVSDloadidx1 [c] {sym} ptr (ADDLconst [d] idx) mem)
  4416  	// cond:
  4417  	// result: (MOVSDloadidx1 [c+d] {sym} ptr idx mem)
  4418  	for {
  4419  		c := v.AuxInt
  4420  		sym := v.Aux
  4421  		ptr := v.Args[0]
  4422  		v_1 := v.Args[1]
  4423  		if v_1.Op != Op386ADDLconst {
  4424  			break
  4425  		}
  4426  		d := v_1.AuxInt
  4427  		idx := v_1.Args[0]
  4428  		mem := v.Args[2]
  4429  		v.reset(Op386MOVSDloadidx1)
  4430  		v.AuxInt = c + d
  4431  		v.Aux = sym
  4432  		v.AddArg(ptr)
  4433  		v.AddArg(idx)
  4434  		v.AddArg(mem)
  4435  		return true
  4436  	}
  4437  	return false
  4438  }
  4439  func rewriteValue386_Op386MOVSDloadidx8(v *Value, config *Config) bool {
  4440  	b := v.Block
  4441  	_ = b
  4442  	// match: (MOVSDloadidx8 [c] {sym} (ADDLconst [d] ptr) idx mem)
  4443  	// cond:
  4444  	// result: (MOVSDloadidx8 [c+d] {sym} ptr idx mem)
  4445  	for {
  4446  		c := v.AuxInt
  4447  		sym := v.Aux
  4448  		v_0 := v.Args[0]
  4449  		if v_0.Op != Op386ADDLconst {
  4450  			break
  4451  		}
  4452  		d := v_0.AuxInt
  4453  		ptr := v_0.Args[0]
  4454  		idx := v.Args[1]
  4455  		mem := v.Args[2]
  4456  		v.reset(Op386MOVSDloadidx8)
  4457  		v.AuxInt = c + d
  4458  		v.Aux = sym
  4459  		v.AddArg(ptr)
  4460  		v.AddArg(idx)
  4461  		v.AddArg(mem)
  4462  		return true
  4463  	}
  4464  	// match: (MOVSDloadidx8 [c] {sym} ptr (ADDLconst [d] idx) mem)
  4465  	// cond:
  4466  	// result: (MOVSDloadidx8 [c+8*d] {sym} ptr idx mem)
  4467  	for {
  4468  		c := v.AuxInt
  4469  		sym := v.Aux
  4470  		ptr := v.Args[0]
  4471  		v_1 := v.Args[1]
  4472  		if v_1.Op != Op386ADDLconst {
  4473  			break
  4474  		}
  4475  		d := v_1.AuxInt
  4476  		idx := v_1.Args[0]
  4477  		mem := v.Args[2]
  4478  		v.reset(Op386MOVSDloadidx8)
  4479  		v.AuxInt = c + 8*d
  4480  		v.Aux = sym
  4481  		v.AddArg(ptr)
  4482  		v.AddArg(idx)
  4483  		v.AddArg(mem)
  4484  		return true
  4485  	}
  4486  	return false
  4487  }
  4488  func rewriteValue386_Op386MOVSDstore(v *Value, config *Config) bool {
  4489  	b := v.Block
  4490  	_ = b
  4491  	// match: (MOVSDstore [off1] {sym} (ADDLconst [off2] ptr) val mem)
  4492  	// cond: is32Bit(off1+off2)
  4493  	// result: (MOVSDstore [off1+off2] {sym} ptr val mem)
  4494  	for {
  4495  		off1 := v.AuxInt
  4496  		sym := v.Aux
  4497  		v_0 := v.Args[0]
  4498  		if v_0.Op != Op386ADDLconst {
  4499  			break
  4500  		}
  4501  		off2 := v_0.AuxInt
  4502  		ptr := v_0.Args[0]
  4503  		val := v.Args[1]
  4504  		mem := v.Args[2]
  4505  		if !(is32Bit(off1 + off2)) {
  4506  			break
  4507  		}
  4508  		v.reset(Op386MOVSDstore)
  4509  		v.AuxInt = off1 + off2
  4510  		v.Aux = sym
  4511  		v.AddArg(ptr)
  4512  		v.AddArg(val)
  4513  		v.AddArg(mem)
  4514  		return true
  4515  	}
  4516  	// match: (MOVSDstore [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  4517  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  4518  	// result: (MOVSDstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  4519  	for {
  4520  		off1 := v.AuxInt
  4521  		sym1 := v.Aux
  4522  		v_0 := v.Args[0]
  4523  		if v_0.Op != Op386LEAL {
  4524  			break
  4525  		}
  4526  		off2 := v_0.AuxInt
  4527  		sym2 := v_0.Aux
  4528  		base := v_0.Args[0]
  4529  		val := v.Args[1]
  4530  		mem := v.Args[2]
  4531  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  4532  			break
  4533  		}
  4534  		v.reset(Op386MOVSDstore)
  4535  		v.AuxInt = off1 + off2
  4536  		v.Aux = mergeSym(sym1, sym2)
  4537  		v.AddArg(base)
  4538  		v.AddArg(val)
  4539  		v.AddArg(mem)
  4540  		return true
  4541  	}
  4542  	// match: (MOVSDstore [off1] {sym1} (LEAL1 [off2] {sym2} ptr idx) val mem)
  4543  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  4544  	// result: (MOVSDstoreidx1 [off1+off2] {mergeSym(sym1,sym2)} ptr idx val mem)
  4545  	for {
  4546  		off1 := v.AuxInt
  4547  		sym1 := v.Aux
  4548  		v_0 := v.Args[0]
  4549  		if v_0.Op != Op386LEAL1 {
  4550  			break
  4551  		}
  4552  		off2 := v_0.AuxInt
  4553  		sym2 := v_0.Aux
  4554  		ptr := v_0.Args[0]
  4555  		idx := v_0.Args[1]
  4556  		val := v.Args[1]
  4557  		mem := v.Args[2]
  4558  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  4559  			break
  4560  		}
  4561  		v.reset(Op386MOVSDstoreidx1)
  4562  		v.AuxInt = off1 + off2
  4563  		v.Aux = mergeSym(sym1, sym2)
  4564  		v.AddArg(ptr)
  4565  		v.AddArg(idx)
  4566  		v.AddArg(val)
  4567  		v.AddArg(mem)
  4568  		return true
  4569  	}
  4570  	// match: (MOVSDstore [off1] {sym1} (LEAL8 [off2] {sym2} ptr idx) val mem)
  4571  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  4572  	// result: (MOVSDstoreidx8 [off1+off2] {mergeSym(sym1,sym2)} ptr idx val mem)
  4573  	for {
  4574  		off1 := v.AuxInt
  4575  		sym1 := v.Aux
  4576  		v_0 := v.Args[0]
  4577  		if v_0.Op != Op386LEAL8 {
  4578  			break
  4579  		}
  4580  		off2 := v_0.AuxInt
  4581  		sym2 := v_0.Aux
  4582  		ptr := v_0.Args[0]
  4583  		idx := v_0.Args[1]
  4584  		val := v.Args[1]
  4585  		mem := v.Args[2]
  4586  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  4587  			break
  4588  		}
  4589  		v.reset(Op386MOVSDstoreidx8)
  4590  		v.AuxInt = off1 + off2
  4591  		v.Aux = mergeSym(sym1, sym2)
  4592  		v.AddArg(ptr)
  4593  		v.AddArg(idx)
  4594  		v.AddArg(val)
  4595  		v.AddArg(mem)
  4596  		return true
  4597  	}
  4598  	// match: (MOVSDstore [off] {sym} (ADDL ptr idx) val mem)
  4599  	// cond: ptr.Op != OpSB
  4600  	// result: (MOVSDstoreidx1 [off] {sym} ptr idx val mem)
  4601  	for {
  4602  		off := v.AuxInt
  4603  		sym := v.Aux
  4604  		v_0 := v.Args[0]
  4605  		if v_0.Op != Op386ADDL {
  4606  			break
  4607  		}
  4608  		ptr := v_0.Args[0]
  4609  		idx := v_0.Args[1]
  4610  		val := v.Args[1]
  4611  		mem := v.Args[2]
  4612  		if !(ptr.Op != OpSB) {
  4613  			break
  4614  		}
  4615  		v.reset(Op386MOVSDstoreidx1)
  4616  		v.AuxInt = off
  4617  		v.Aux = sym
  4618  		v.AddArg(ptr)
  4619  		v.AddArg(idx)
  4620  		v.AddArg(val)
  4621  		v.AddArg(mem)
  4622  		return true
  4623  	}
  4624  	return false
  4625  }
  4626  func rewriteValue386_Op386MOVSDstoreidx1(v *Value, config *Config) bool {
  4627  	b := v.Block
  4628  	_ = b
  4629  	// match: (MOVSDstoreidx1 [c] {sym} (ADDLconst [d] ptr) idx val mem)
  4630  	// cond:
  4631  	// result: (MOVSDstoreidx1 [c+d] {sym} ptr idx val mem)
  4632  	for {
  4633  		c := v.AuxInt
  4634  		sym := v.Aux
  4635  		v_0 := v.Args[0]
  4636  		if v_0.Op != Op386ADDLconst {
  4637  			break
  4638  		}
  4639  		d := v_0.AuxInt
  4640  		ptr := v_0.Args[0]
  4641  		idx := v.Args[1]
  4642  		val := v.Args[2]
  4643  		mem := v.Args[3]
  4644  		v.reset(Op386MOVSDstoreidx1)
  4645  		v.AuxInt = c + d
  4646  		v.Aux = sym
  4647  		v.AddArg(ptr)
  4648  		v.AddArg(idx)
  4649  		v.AddArg(val)
  4650  		v.AddArg(mem)
  4651  		return true
  4652  	}
  4653  	// match: (MOVSDstoreidx1 [c] {sym} ptr (ADDLconst [d] idx) val mem)
  4654  	// cond:
  4655  	// result: (MOVSDstoreidx1 [c+d] {sym} ptr idx val mem)
  4656  	for {
  4657  		c := v.AuxInt
  4658  		sym := v.Aux
  4659  		ptr := v.Args[0]
  4660  		v_1 := v.Args[1]
  4661  		if v_1.Op != Op386ADDLconst {
  4662  			break
  4663  		}
  4664  		d := v_1.AuxInt
  4665  		idx := v_1.Args[0]
  4666  		val := v.Args[2]
  4667  		mem := v.Args[3]
  4668  		v.reset(Op386MOVSDstoreidx1)
  4669  		v.AuxInt = c + d
  4670  		v.Aux = sym
  4671  		v.AddArg(ptr)
  4672  		v.AddArg(idx)
  4673  		v.AddArg(val)
  4674  		v.AddArg(mem)
  4675  		return true
  4676  	}
  4677  	return false
  4678  }
  4679  func rewriteValue386_Op386MOVSDstoreidx8(v *Value, config *Config) bool {
  4680  	b := v.Block
  4681  	_ = b
  4682  	// match: (MOVSDstoreidx8 [c] {sym} (ADDLconst [d] ptr) idx val mem)
  4683  	// cond:
  4684  	// result: (MOVSDstoreidx8 [c+d] {sym} ptr idx val mem)
  4685  	for {
  4686  		c := v.AuxInt
  4687  		sym := v.Aux
  4688  		v_0 := v.Args[0]
  4689  		if v_0.Op != Op386ADDLconst {
  4690  			break
  4691  		}
  4692  		d := v_0.AuxInt
  4693  		ptr := v_0.Args[0]
  4694  		idx := v.Args[1]
  4695  		val := v.Args[2]
  4696  		mem := v.Args[3]
  4697  		v.reset(Op386MOVSDstoreidx8)
  4698  		v.AuxInt = c + d
  4699  		v.Aux = sym
  4700  		v.AddArg(ptr)
  4701  		v.AddArg(idx)
  4702  		v.AddArg(val)
  4703  		v.AddArg(mem)
  4704  		return true
  4705  	}
  4706  	// match: (MOVSDstoreidx8 [c] {sym} ptr (ADDLconst [d] idx) val mem)
  4707  	// cond:
  4708  	// result: (MOVSDstoreidx8 [c+8*d] {sym} ptr idx val mem)
  4709  	for {
  4710  		c := v.AuxInt
  4711  		sym := v.Aux
  4712  		ptr := v.Args[0]
  4713  		v_1 := v.Args[1]
  4714  		if v_1.Op != Op386ADDLconst {
  4715  			break
  4716  		}
  4717  		d := v_1.AuxInt
  4718  		idx := v_1.Args[0]
  4719  		val := v.Args[2]
  4720  		mem := v.Args[3]
  4721  		v.reset(Op386MOVSDstoreidx8)
  4722  		v.AuxInt = c + 8*d
  4723  		v.Aux = sym
  4724  		v.AddArg(ptr)
  4725  		v.AddArg(idx)
  4726  		v.AddArg(val)
  4727  		v.AddArg(mem)
  4728  		return true
  4729  	}
  4730  	return false
  4731  }
  4732  func rewriteValue386_Op386MOVSSconst(v *Value, config *Config) bool {
  4733  	b := v.Block
  4734  	_ = b
  4735  	// match: (MOVSSconst [c])
  4736  	// cond: config.ctxt.Flag_shared
  4737  	// result: (MOVSSconst2 (MOVSSconst1 [c]))
  4738  	for {
  4739  		c := v.AuxInt
  4740  		if !(config.ctxt.Flag_shared) {
  4741  			break
  4742  		}
  4743  		v.reset(Op386MOVSSconst2)
  4744  		v0 := b.NewValue0(v.Line, Op386MOVSSconst1, config.fe.TypeUInt32())
  4745  		v0.AuxInt = c
  4746  		v.AddArg(v0)
  4747  		return true
  4748  	}
  4749  	return false
  4750  }
  4751  func rewriteValue386_Op386MOVSSload(v *Value, config *Config) bool {
  4752  	b := v.Block
  4753  	_ = b
  4754  	// match: (MOVSSload [off1] {sym} (ADDLconst [off2] ptr) mem)
  4755  	// cond: is32Bit(off1+off2)
  4756  	// result: (MOVSSload [off1+off2] {sym} ptr mem)
  4757  	for {
  4758  		off1 := v.AuxInt
  4759  		sym := v.Aux
  4760  		v_0 := v.Args[0]
  4761  		if v_0.Op != Op386ADDLconst {
  4762  			break
  4763  		}
  4764  		off2 := v_0.AuxInt
  4765  		ptr := v_0.Args[0]
  4766  		mem := v.Args[1]
  4767  		if !(is32Bit(off1 + off2)) {
  4768  			break
  4769  		}
  4770  		v.reset(Op386MOVSSload)
  4771  		v.AuxInt = off1 + off2
  4772  		v.Aux = sym
  4773  		v.AddArg(ptr)
  4774  		v.AddArg(mem)
  4775  		return true
  4776  	}
  4777  	// match: (MOVSSload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  4778  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  4779  	// result: (MOVSSload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  4780  	for {
  4781  		off1 := v.AuxInt
  4782  		sym1 := v.Aux
  4783  		v_0 := v.Args[0]
  4784  		if v_0.Op != Op386LEAL {
  4785  			break
  4786  		}
  4787  		off2 := v_0.AuxInt
  4788  		sym2 := v_0.Aux
  4789  		base := v_0.Args[0]
  4790  		mem := v.Args[1]
  4791  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  4792  			break
  4793  		}
  4794  		v.reset(Op386MOVSSload)
  4795  		v.AuxInt = off1 + off2
  4796  		v.Aux = mergeSym(sym1, sym2)
  4797  		v.AddArg(base)
  4798  		v.AddArg(mem)
  4799  		return true
  4800  	}
  4801  	// match: (MOVSSload [off1] {sym1} (LEAL1 [off2] {sym2} ptr idx) mem)
  4802  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  4803  	// result: (MOVSSloadidx1 [off1+off2] {mergeSym(sym1,sym2)} ptr idx mem)
  4804  	for {
  4805  		off1 := v.AuxInt
  4806  		sym1 := v.Aux
  4807  		v_0 := v.Args[0]
  4808  		if v_0.Op != Op386LEAL1 {
  4809  			break
  4810  		}
  4811  		off2 := v_0.AuxInt
  4812  		sym2 := v_0.Aux
  4813  		ptr := v_0.Args[0]
  4814  		idx := v_0.Args[1]
  4815  		mem := v.Args[1]
  4816  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  4817  			break
  4818  		}
  4819  		v.reset(Op386MOVSSloadidx1)
  4820  		v.AuxInt = off1 + off2
  4821  		v.Aux = mergeSym(sym1, sym2)
  4822  		v.AddArg(ptr)
  4823  		v.AddArg(idx)
  4824  		v.AddArg(mem)
  4825  		return true
  4826  	}
  4827  	// match: (MOVSSload [off1] {sym1} (LEAL4 [off2] {sym2} ptr idx) mem)
  4828  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  4829  	// result: (MOVSSloadidx4 [off1+off2] {mergeSym(sym1,sym2)} ptr idx mem)
  4830  	for {
  4831  		off1 := v.AuxInt
  4832  		sym1 := v.Aux
  4833  		v_0 := v.Args[0]
  4834  		if v_0.Op != Op386LEAL4 {
  4835  			break
  4836  		}
  4837  		off2 := v_0.AuxInt
  4838  		sym2 := v_0.Aux
  4839  		ptr := v_0.Args[0]
  4840  		idx := v_0.Args[1]
  4841  		mem := v.Args[1]
  4842  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  4843  			break
  4844  		}
  4845  		v.reset(Op386MOVSSloadidx4)
  4846  		v.AuxInt = off1 + off2
  4847  		v.Aux = mergeSym(sym1, sym2)
  4848  		v.AddArg(ptr)
  4849  		v.AddArg(idx)
  4850  		v.AddArg(mem)
  4851  		return true
  4852  	}
  4853  	// match: (MOVSSload [off] {sym} (ADDL ptr idx) mem)
  4854  	// cond: ptr.Op != OpSB
  4855  	// result: (MOVSSloadidx1 [off] {sym} ptr idx mem)
  4856  	for {
  4857  		off := v.AuxInt
  4858  		sym := v.Aux
  4859  		v_0 := v.Args[0]
  4860  		if v_0.Op != Op386ADDL {
  4861  			break
  4862  		}
  4863  		ptr := v_0.Args[0]
  4864  		idx := v_0.Args[1]
  4865  		mem := v.Args[1]
  4866  		if !(ptr.Op != OpSB) {
  4867  			break
  4868  		}
  4869  		v.reset(Op386MOVSSloadidx1)
  4870  		v.AuxInt = off
  4871  		v.Aux = sym
  4872  		v.AddArg(ptr)
  4873  		v.AddArg(idx)
  4874  		v.AddArg(mem)
  4875  		return true
  4876  	}
  4877  	return false
  4878  }
  4879  func rewriteValue386_Op386MOVSSloadidx1(v *Value, config *Config) bool {
  4880  	b := v.Block
  4881  	_ = b
  4882  	// match: (MOVSSloadidx1 [c] {sym} (ADDLconst [d] ptr) idx mem)
  4883  	// cond:
  4884  	// result: (MOVSSloadidx1 [c+d] {sym} ptr idx mem)
  4885  	for {
  4886  		c := v.AuxInt
  4887  		sym := v.Aux
  4888  		v_0 := v.Args[0]
  4889  		if v_0.Op != Op386ADDLconst {
  4890  			break
  4891  		}
  4892  		d := v_0.AuxInt
  4893  		ptr := v_0.Args[0]
  4894  		idx := v.Args[1]
  4895  		mem := v.Args[2]
  4896  		v.reset(Op386MOVSSloadidx1)
  4897  		v.AuxInt = c + d
  4898  		v.Aux = sym
  4899  		v.AddArg(ptr)
  4900  		v.AddArg(idx)
  4901  		v.AddArg(mem)
  4902  		return true
  4903  	}
  4904  	// match: (MOVSSloadidx1 [c] {sym} ptr (ADDLconst [d] idx) mem)
  4905  	// cond:
  4906  	// result: (MOVSSloadidx1 [c+d] {sym} ptr idx mem)
  4907  	for {
  4908  		c := v.AuxInt
  4909  		sym := v.Aux
  4910  		ptr := v.Args[0]
  4911  		v_1 := v.Args[1]
  4912  		if v_1.Op != Op386ADDLconst {
  4913  			break
  4914  		}
  4915  		d := v_1.AuxInt
  4916  		idx := v_1.Args[0]
  4917  		mem := v.Args[2]
  4918  		v.reset(Op386MOVSSloadidx1)
  4919  		v.AuxInt = c + d
  4920  		v.Aux = sym
  4921  		v.AddArg(ptr)
  4922  		v.AddArg(idx)
  4923  		v.AddArg(mem)
  4924  		return true
  4925  	}
  4926  	return false
  4927  }
  4928  func rewriteValue386_Op386MOVSSloadidx4(v *Value, config *Config) bool {
  4929  	b := v.Block
  4930  	_ = b
  4931  	// match: (MOVSSloadidx4 [c] {sym} (ADDLconst [d] ptr) idx mem)
  4932  	// cond:
  4933  	// result: (MOVSSloadidx4 [c+d] {sym} ptr idx mem)
  4934  	for {
  4935  		c := v.AuxInt
  4936  		sym := v.Aux
  4937  		v_0 := v.Args[0]
  4938  		if v_0.Op != Op386ADDLconst {
  4939  			break
  4940  		}
  4941  		d := v_0.AuxInt
  4942  		ptr := v_0.Args[0]
  4943  		idx := v.Args[1]
  4944  		mem := v.Args[2]
  4945  		v.reset(Op386MOVSSloadidx4)
  4946  		v.AuxInt = c + d
  4947  		v.Aux = sym
  4948  		v.AddArg(ptr)
  4949  		v.AddArg(idx)
  4950  		v.AddArg(mem)
  4951  		return true
  4952  	}
  4953  	// match: (MOVSSloadidx4 [c] {sym} ptr (ADDLconst [d] idx) mem)
  4954  	// cond:
  4955  	// result: (MOVSSloadidx4 [c+4*d] {sym} ptr idx mem)
  4956  	for {
  4957  		c := v.AuxInt
  4958  		sym := v.Aux
  4959  		ptr := v.Args[0]
  4960  		v_1 := v.Args[1]
  4961  		if v_1.Op != Op386ADDLconst {
  4962  			break
  4963  		}
  4964  		d := v_1.AuxInt
  4965  		idx := v_1.Args[0]
  4966  		mem := v.Args[2]
  4967  		v.reset(Op386MOVSSloadidx4)
  4968  		v.AuxInt = c + 4*d
  4969  		v.Aux = sym
  4970  		v.AddArg(ptr)
  4971  		v.AddArg(idx)
  4972  		v.AddArg(mem)
  4973  		return true
  4974  	}
  4975  	return false
  4976  }
  4977  func rewriteValue386_Op386MOVSSstore(v *Value, config *Config) bool {
  4978  	b := v.Block
  4979  	_ = b
  4980  	// match: (MOVSSstore [off1] {sym} (ADDLconst [off2] ptr) val mem)
  4981  	// cond: is32Bit(off1+off2)
  4982  	// result: (MOVSSstore [off1+off2] {sym} ptr val mem)
  4983  	for {
  4984  		off1 := v.AuxInt
  4985  		sym := v.Aux
  4986  		v_0 := v.Args[0]
  4987  		if v_0.Op != Op386ADDLconst {
  4988  			break
  4989  		}
  4990  		off2 := v_0.AuxInt
  4991  		ptr := v_0.Args[0]
  4992  		val := v.Args[1]
  4993  		mem := v.Args[2]
  4994  		if !(is32Bit(off1 + off2)) {
  4995  			break
  4996  		}
  4997  		v.reset(Op386MOVSSstore)
  4998  		v.AuxInt = off1 + off2
  4999  		v.Aux = sym
  5000  		v.AddArg(ptr)
  5001  		v.AddArg(val)
  5002  		v.AddArg(mem)
  5003  		return true
  5004  	}
  5005  	// match: (MOVSSstore [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  5006  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  5007  	// result: (MOVSSstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  5008  	for {
  5009  		off1 := v.AuxInt
  5010  		sym1 := v.Aux
  5011  		v_0 := v.Args[0]
  5012  		if v_0.Op != Op386LEAL {
  5013  			break
  5014  		}
  5015  		off2 := v_0.AuxInt
  5016  		sym2 := v_0.Aux
  5017  		base := v_0.Args[0]
  5018  		val := v.Args[1]
  5019  		mem := v.Args[2]
  5020  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  5021  			break
  5022  		}
  5023  		v.reset(Op386MOVSSstore)
  5024  		v.AuxInt = off1 + off2
  5025  		v.Aux = mergeSym(sym1, sym2)
  5026  		v.AddArg(base)
  5027  		v.AddArg(val)
  5028  		v.AddArg(mem)
  5029  		return true
  5030  	}
  5031  	// match: (MOVSSstore [off1] {sym1} (LEAL1 [off2] {sym2} ptr idx) val mem)
  5032  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  5033  	// result: (MOVSSstoreidx1 [off1+off2] {mergeSym(sym1,sym2)} ptr idx val mem)
  5034  	for {
  5035  		off1 := v.AuxInt
  5036  		sym1 := v.Aux
  5037  		v_0 := v.Args[0]
  5038  		if v_0.Op != Op386LEAL1 {
  5039  			break
  5040  		}
  5041  		off2 := v_0.AuxInt
  5042  		sym2 := v_0.Aux
  5043  		ptr := v_0.Args[0]
  5044  		idx := v_0.Args[1]
  5045  		val := v.Args[1]
  5046  		mem := v.Args[2]
  5047  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  5048  			break
  5049  		}
  5050  		v.reset(Op386MOVSSstoreidx1)
  5051  		v.AuxInt = off1 + off2
  5052  		v.Aux = mergeSym(sym1, sym2)
  5053  		v.AddArg(ptr)
  5054  		v.AddArg(idx)
  5055  		v.AddArg(val)
  5056  		v.AddArg(mem)
  5057  		return true
  5058  	}
  5059  	// match: (MOVSSstore [off1] {sym1} (LEAL4 [off2] {sym2} ptr idx) val mem)
  5060  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  5061  	// result: (MOVSSstoreidx4 [off1+off2] {mergeSym(sym1,sym2)} ptr idx val mem)
  5062  	for {
  5063  		off1 := v.AuxInt
  5064  		sym1 := v.Aux
  5065  		v_0 := v.Args[0]
  5066  		if v_0.Op != Op386LEAL4 {
  5067  			break
  5068  		}
  5069  		off2 := v_0.AuxInt
  5070  		sym2 := v_0.Aux
  5071  		ptr := v_0.Args[0]
  5072  		idx := v_0.Args[1]
  5073  		val := v.Args[1]
  5074  		mem := v.Args[2]
  5075  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  5076  			break
  5077  		}
  5078  		v.reset(Op386MOVSSstoreidx4)
  5079  		v.AuxInt = off1 + off2
  5080  		v.Aux = mergeSym(sym1, sym2)
  5081  		v.AddArg(ptr)
  5082  		v.AddArg(idx)
  5083  		v.AddArg(val)
  5084  		v.AddArg(mem)
  5085  		return true
  5086  	}
  5087  	// match: (MOVSSstore [off] {sym} (ADDL ptr idx) val mem)
  5088  	// cond: ptr.Op != OpSB
  5089  	// result: (MOVSSstoreidx1 [off] {sym} ptr idx val mem)
  5090  	for {
  5091  		off := v.AuxInt
  5092  		sym := v.Aux
  5093  		v_0 := v.Args[0]
  5094  		if v_0.Op != Op386ADDL {
  5095  			break
  5096  		}
  5097  		ptr := v_0.Args[0]
  5098  		idx := v_0.Args[1]
  5099  		val := v.Args[1]
  5100  		mem := v.Args[2]
  5101  		if !(ptr.Op != OpSB) {
  5102  			break
  5103  		}
  5104  		v.reset(Op386MOVSSstoreidx1)
  5105  		v.AuxInt = off
  5106  		v.Aux = sym
  5107  		v.AddArg(ptr)
  5108  		v.AddArg(idx)
  5109  		v.AddArg(val)
  5110  		v.AddArg(mem)
  5111  		return true
  5112  	}
  5113  	return false
  5114  }
  5115  func rewriteValue386_Op386MOVSSstoreidx1(v *Value, config *Config) bool {
  5116  	b := v.Block
  5117  	_ = b
  5118  	// match: (MOVSSstoreidx1 [c] {sym} (ADDLconst [d] ptr) idx val mem)
  5119  	// cond:
  5120  	// result: (MOVSSstoreidx1 [c+d] {sym} ptr idx val mem)
  5121  	for {
  5122  		c := v.AuxInt
  5123  		sym := v.Aux
  5124  		v_0 := v.Args[0]
  5125  		if v_0.Op != Op386ADDLconst {
  5126  			break
  5127  		}
  5128  		d := v_0.AuxInt
  5129  		ptr := v_0.Args[0]
  5130  		idx := v.Args[1]
  5131  		val := v.Args[2]
  5132  		mem := v.Args[3]
  5133  		v.reset(Op386MOVSSstoreidx1)
  5134  		v.AuxInt = c + d
  5135  		v.Aux = sym
  5136  		v.AddArg(ptr)
  5137  		v.AddArg(idx)
  5138  		v.AddArg(val)
  5139  		v.AddArg(mem)
  5140  		return true
  5141  	}
  5142  	// match: (MOVSSstoreidx1 [c] {sym} ptr (ADDLconst [d] idx) val mem)
  5143  	// cond:
  5144  	// result: (MOVSSstoreidx1 [c+d] {sym} ptr idx val mem)
  5145  	for {
  5146  		c := v.AuxInt
  5147  		sym := v.Aux
  5148  		ptr := v.Args[0]
  5149  		v_1 := v.Args[1]
  5150  		if v_1.Op != Op386ADDLconst {
  5151  			break
  5152  		}
  5153  		d := v_1.AuxInt
  5154  		idx := v_1.Args[0]
  5155  		val := v.Args[2]
  5156  		mem := v.Args[3]
  5157  		v.reset(Op386MOVSSstoreidx1)
  5158  		v.AuxInt = c + d
  5159  		v.Aux = sym
  5160  		v.AddArg(ptr)
  5161  		v.AddArg(idx)
  5162  		v.AddArg(val)
  5163  		v.AddArg(mem)
  5164  		return true
  5165  	}
  5166  	return false
  5167  }
  5168  func rewriteValue386_Op386MOVSSstoreidx4(v *Value, config *Config) bool {
  5169  	b := v.Block
  5170  	_ = b
  5171  	// match: (MOVSSstoreidx4 [c] {sym} (ADDLconst [d] ptr) idx val mem)
  5172  	// cond:
  5173  	// result: (MOVSSstoreidx4 [c+d] {sym} ptr idx val mem)
  5174  	for {
  5175  		c := v.AuxInt
  5176  		sym := v.Aux
  5177  		v_0 := v.Args[0]
  5178  		if v_0.Op != Op386ADDLconst {
  5179  			break
  5180  		}
  5181  		d := v_0.AuxInt
  5182  		ptr := v_0.Args[0]
  5183  		idx := v.Args[1]
  5184  		val := v.Args[2]
  5185  		mem := v.Args[3]
  5186  		v.reset(Op386MOVSSstoreidx4)
  5187  		v.AuxInt = c + d
  5188  		v.Aux = sym
  5189  		v.AddArg(ptr)
  5190  		v.AddArg(idx)
  5191  		v.AddArg(val)
  5192  		v.AddArg(mem)
  5193  		return true
  5194  	}
  5195  	// match: (MOVSSstoreidx4 [c] {sym} ptr (ADDLconst [d] idx) val mem)
  5196  	// cond:
  5197  	// result: (MOVSSstoreidx4 [c+4*d] {sym} ptr idx val mem)
  5198  	for {
  5199  		c := v.AuxInt
  5200  		sym := v.Aux
  5201  		ptr := v.Args[0]
  5202  		v_1 := v.Args[1]
  5203  		if v_1.Op != Op386ADDLconst {
  5204  			break
  5205  		}
  5206  		d := v_1.AuxInt
  5207  		idx := v_1.Args[0]
  5208  		val := v.Args[2]
  5209  		mem := v.Args[3]
  5210  		v.reset(Op386MOVSSstoreidx4)
  5211  		v.AuxInt = c + 4*d
  5212  		v.Aux = sym
  5213  		v.AddArg(ptr)
  5214  		v.AddArg(idx)
  5215  		v.AddArg(val)
  5216  		v.AddArg(mem)
  5217  		return true
  5218  	}
  5219  	return false
  5220  }
  5221  func rewriteValue386_Op386MOVWLSX(v *Value, config *Config) bool {
  5222  	b := v.Block
  5223  	_ = b
  5224  	// match: (MOVWLSX x:(MOVWload [off] {sym} ptr mem))
  5225  	// cond: x.Uses == 1 && clobber(x)
  5226  	// result: @x.Block (MOVWLSXload <v.Type> [off] {sym} ptr mem)
  5227  	for {
  5228  		x := v.Args[0]
  5229  		if x.Op != Op386MOVWload {
  5230  			break
  5231  		}
  5232  		off := x.AuxInt
  5233  		sym := x.Aux
  5234  		ptr := x.Args[0]
  5235  		mem := x.Args[1]
  5236  		if !(x.Uses == 1 && clobber(x)) {
  5237  			break
  5238  		}
  5239  		b = x.Block
  5240  		v0 := b.NewValue0(v.Line, Op386MOVWLSXload, v.Type)
  5241  		v.reset(OpCopy)
  5242  		v.AddArg(v0)
  5243  		v0.AuxInt = off
  5244  		v0.Aux = sym
  5245  		v0.AddArg(ptr)
  5246  		v0.AddArg(mem)
  5247  		return true
  5248  	}
  5249  	// match: (MOVWLSX (ANDLconst [c] x))
  5250  	// cond: c & 0x8000 == 0
  5251  	// result: (ANDLconst [c & 0x7fff] x)
  5252  	for {
  5253  		v_0 := v.Args[0]
  5254  		if v_0.Op != Op386ANDLconst {
  5255  			break
  5256  		}
  5257  		c := v_0.AuxInt
  5258  		x := v_0.Args[0]
  5259  		if !(c&0x8000 == 0) {
  5260  			break
  5261  		}
  5262  		v.reset(Op386ANDLconst)
  5263  		v.AuxInt = c & 0x7fff
  5264  		v.AddArg(x)
  5265  		return true
  5266  	}
  5267  	return false
  5268  }
  5269  func rewriteValue386_Op386MOVWLSXload(v *Value, config *Config) bool {
  5270  	b := v.Block
  5271  	_ = b
  5272  	// match: (MOVWLSXload [off] {sym} ptr (MOVWstore [off2] {sym2} ptr2 x _))
  5273  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  5274  	// result: (MOVWLSX x)
  5275  	for {
  5276  		off := v.AuxInt
  5277  		sym := v.Aux
  5278  		ptr := v.Args[0]
  5279  		v_1 := v.Args[1]
  5280  		if v_1.Op != Op386MOVWstore {
  5281  			break
  5282  		}
  5283  		off2 := v_1.AuxInt
  5284  		sym2 := v_1.Aux
  5285  		ptr2 := v_1.Args[0]
  5286  		x := v_1.Args[1]
  5287  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  5288  			break
  5289  		}
  5290  		v.reset(Op386MOVWLSX)
  5291  		v.AddArg(x)
  5292  		return true
  5293  	}
  5294  	// match: (MOVWLSXload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  5295  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  5296  	// result: (MOVWLSXload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  5297  	for {
  5298  		off1 := v.AuxInt
  5299  		sym1 := v.Aux
  5300  		v_0 := v.Args[0]
  5301  		if v_0.Op != Op386LEAL {
  5302  			break
  5303  		}
  5304  		off2 := v_0.AuxInt
  5305  		sym2 := v_0.Aux
  5306  		base := v_0.Args[0]
  5307  		mem := v.Args[1]
  5308  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  5309  			break
  5310  		}
  5311  		v.reset(Op386MOVWLSXload)
  5312  		v.AuxInt = off1 + off2
  5313  		v.Aux = mergeSym(sym1, sym2)
  5314  		v.AddArg(base)
  5315  		v.AddArg(mem)
  5316  		return true
  5317  	}
  5318  	return false
  5319  }
  5320  func rewriteValue386_Op386MOVWLZX(v *Value, config *Config) bool {
  5321  	b := v.Block
  5322  	_ = b
  5323  	// match: (MOVWLZX x:(MOVWload [off] {sym} ptr mem))
  5324  	// cond: x.Uses == 1 && clobber(x)
  5325  	// result: @x.Block (MOVWload <v.Type> [off] {sym} ptr mem)
  5326  	for {
  5327  		x := v.Args[0]
  5328  		if x.Op != Op386MOVWload {
  5329  			break
  5330  		}
  5331  		off := x.AuxInt
  5332  		sym := x.Aux
  5333  		ptr := x.Args[0]
  5334  		mem := x.Args[1]
  5335  		if !(x.Uses == 1 && clobber(x)) {
  5336  			break
  5337  		}
  5338  		b = x.Block
  5339  		v0 := b.NewValue0(v.Line, Op386MOVWload, v.Type)
  5340  		v.reset(OpCopy)
  5341  		v.AddArg(v0)
  5342  		v0.AuxInt = off
  5343  		v0.Aux = sym
  5344  		v0.AddArg(ptr)
  5345  		v0.AddArg(mem)
  5346  		return true
  5347  	}
  5348  	// match: (MOVWLZX x:(MOVWloadidx1 [off] {sym} ptr idx mem))
  5349  	// cond: x.Uses == 1 && clobber(x)
  5350  	// result: @x.Block (MOVWloadidx1 <v.Type> [off] {sym} ptr idx mem)
  5351  	for {
  5352  		x := v.Args[0]
  5353  		if x.Op != Op386MOVWloadidx1 {
  5354  			break
  5355  		}
  5356  		off := x.AuxInt
  5357  		sym := x.Aux
  5358  		ptr := x.Args[0]
  5359  		idx := x.Args[1]
  5360  		mem := x.Args[2]
  5361  		if !(x.Uses == 1 && clobber(x)) {
  5362  			break
  5363  		}
  5364  		b = x.Block
  5365  		v0 := b.NewValue0(v.Line, Op386MOVWloadidx1, v.Type)
  5366  		v.reset(OpCopy)
  5367  		v.AddArg(v0)
  5368  		v0.AuxInt = off
  5369  		v0.Aux = sym
  5370  		v0.AddArg(ptr)
  5371  		v0.AddArg(idx)
  5372  		v0.AddArg(mem)
  5373  		return true
  5374  	}
  5375  	// match: (MOVWLZX x:(MOVWloadidx2 [off] {sym} ptr idx mem))
  5376  	// cond: x.Uses == 1 && clobber(x)
  5377  	// result: @x.Block (MOVWloadidx2 <v.Type> [off] {sym} ptr idx mem)
  5378  	for {
  5379  		x := v.Args[0]
  5380  		if x.Op != Op386MOVWloadidx2 {
  5381  			break
  5382  		}
  5383  		off := x.AuxInt
  5384  		sym := x.Aux
  5385  		ptr := x.Args[0]
  5386  		idx := x.Args[1]
  5387  		mem := x.Args[2]
  5388  		if !(x.Uses == 1 && clobber(x)) {
  5389  			break
  5390  		}
  5391  		b = x.Block
  5392  		v0 := b.NewValue0(v.Line, Op386MOVWloadidx2, v.Type)
  5393  		v.reset(OpCopy)
  5394  		v.AddArg(v0)
  5395  		v0.AuxInt = off
  5396  		v0.Aux = sym
  5397  		v0.AddArg(ptr)
  5398  		v0.AddArg(idx)
  5399  		v0.AddArg(mem)
  5400  		return true
  5401  	}
  5402  	// match: (MOVWLZX (ANDLconst [c] x))
  5403  	// cond:
  5404  	// result: (ANDLconst [c & 0xffff] x)
  5405  	for {
  5406  		v_0 := v.Args[0]
  5407  		if v_0.Op != Op386ANDLconst {
  5408  			break
  5409  		}
  5410  		c := v_0.AuxInt
  5411  		x := v_0.Args[0]
  5412  		v.reset(Op386ANDLconst)
  5413  		v.AuxInt = c & 0xffff
  5414  		v.AddArg(x)
  5415  		return true
  5416  	}
  5417  	return false
  5418  }
  5419  func rewriteValue386_Op386MOVWload(v *Value, config *Config) bool {
  5420  	b := v.Block
  5421  	_ = b
  5422  	// match: (MOVWload [off] {sym} ptr (MOVWstore [off2] {sym2} ptr2 x _))
  5423  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  5424  	// result: (MOVWLZX x)
  5425  	for {
  5426  		off := v.AuxInt
  5427  		sym := v.Aux
  5428  		ptr := v.Args[0]
  5429  		v_1 := v.Args[1]
  5430  		if v_1.Op != Op386MOVWstore {
  5431  			break
  5432  		}
  5433  		off2 := v_1.AuxInt
  5434  		sym2 := v_1.Aux
  5435  		ptr2 := v_1.Args[0]
  5436  		x := v_1.Args[1]
  5437  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  5438  			break
  5439  		}
  5440  		v.reset(Op386MOVWLZX)
  5441  		v.AddArg(x)
  5442  		return true
  5443  	}
  5444  	// match: (MOVWload  [off1] {sym} (ADDLconst [off2] ptr) mem)
  5445  	// cond: is32Bit(off1+off2)
  5446  	// result: (MOVWload  [off1+off2] {sym} ptr mem)
  5447  	for {
  5448  		off1 := v.AuxInt
  5449  		sym := v.Aux
  5450  		v_0 := v.Args[0]
  5451  		if v_0.Op != Op386ADDLconst {
  5452  			break
  5453  		}
  5454  		off2 := v_0.AuxInt
  5455  		ptr := v_0.Args[0]
  5456  		mem := v.Args[1]
  5457  		if !(is32Bit(off1 + off2)) {
  5458  			break
  5459  		}
  5460  		v.reset(Op386MOVWload)
  5461  		v.AuxInt = off1 + off2
  5462  		v.Aux = sym
  5463  		v.AddArg(ptr)
  5464  		v.AddArg(mem)
  5465  		return true
  5466  	}
  5467  	// match: (MOVWload  [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  5468  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  5469  	// result: (MOVWload  [off1+off2] {mergeSym(sym1,sym2)} base mem)
  5470  	for {
  5471  		off1 := v.AuxInt
  5472  		sym1 := v.Aux
  5473  		v_0 := v.Args[0]
  5474  		if v_0.Op != Op386LEAL {
  5475  			break
  5476  		}
  5477  		off2 := v_0.AuxInt
  5478  		sym2 := v_0.Aux
  5479  		base := v_0.Args[0]
  5480  		mem := v.Args[1]
  5481  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  5482  			break
  5483  		}
  5484  		v.reset(Op386MOVWload)
  5485  		v.AuxInt = off1 + off2
  5486  		v.Aux = mergeSym(sym1, sym2)
  5487  		v.AddArg(base)
  5488  		v.AddArg(mem)
  5489  		return true
  5490  	}
  5491  	// match: (MOVWload [off1] {sym1} (LEAL1 [off2] {sym2} ptr idx) mem)
  5492  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  5493  	// result: (MOVWloadidx1 [off1+off2] {mergeSym(sym1,sym2)} ptr idx mem)
  5494  	for {
  5495  		off1 := v.AuxInt
  5496  		sym1 := v.Aux
  5497  		v_0 := v.Args[0]
  5498  		if v_0.Op != Op386LEAL1 {
  5499  			break
  5500  		}
  5501  		off2 := v_0.AuxInt
  5502  		sym2 := v_0.Aux
  5503  		ptr := v_0.Args[0]
  5504  		idx := v_0.Args[1]
  5505  		mem := v.Args[1]
  5506  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  5507  			break
  5508  		}
  5509  		v.reset(Op386MOVWloadidx1)
  5510  		v.AuxInt = off1 + off2
  5511  		v.Aux = mergeSym(sym1, sym2)
  5512  		v.AddArg(ptr)
  5513  		v.AddArg(idx)
  5514  		v.AddArg(mem)
  5515  		return true
  5516  	}
  5517  	// match: (MOVWload [off1] {sym1} (LEAL2 [off2] {sym2} ptr idx) mem)
  5518  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  5519  	// result: (MOVWloadidx2 [off1+off2] {mergeSym(sym1,sym2)} ptr idx mem)
  5520  	for {
  5521  		off1 := v.AuxInt
  5522  		sym1 := v.Aux
  5523  		v_0 := v.Args[0]
  5524  		if v_0.Op != Op386LEAL2 {
  5525  			break
  5526  		}
  5527  		off2 := v_0.AuxInt
  5528  		sym2 := v_0.Aux
  5529  		ptr := v_0.Args[0]
  5530  		idx := v_0.Args[1]
  5531  		mem := v.Args[1]
  5532  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  5533  			break
  5534  		}
  5535  		v.reset(Op386MOVWloadidx2)
  5536  		v.AuxInt = off1 + off2
  5537  		v.Aux = mergeSym(sym1, sym2)
  5538  		v.AddArg(ptr)
  5539  		v.AddArg(idx)
  5540  		v.AddArg(mem)
  5541  		return true
  5542  	}
  5543  	// match: (MOVWload [off] {sym} (ADDL ptr idx) mem)
  5544  	// cond: ptr.Op != OpSB
  5545  	// result: (MOVWloadidx1 [off] {sym} ptr idx mem)
  5546  	for {
  5547  		off := v.AuxInt
  5548  		sym := v.Aux
  5549  		v_0 := v.Args[0]
  5550  		if v_0.Op != Op386ADDL {
  5551  			break
  5552  		}
  5553  		ptr := v_0.Args[0]
  5554  		idx := v_0.Args[1]
  5555  		mem := v.Args[1]
  5556  		if !(ptr.Op != OpSB) {
  5557  			break
  5558  		}
  5559  		v.reset(Op386MOVWloadidx1)
  5560  		v.AuxInt = off
  5561  		v.Aux = sym
  5562  		v.AddArg(ptr)
  5563  		v.AddArg(idx)
  5564  		v.AddArg(mem)
  5565  		return true
  5566  	}
  5567  	return false
  5568  }
  5569  func rewriteValue386_Op386MOVWloadidx1(v *Value, config *Config) bool {
  5570  	b := v.Block
  5571  	_ = b
  5572  	// match: (MOVWloadidx1 [c] {sym} ptr (SHLLconst [1] idx) mem)
  5573  	// cond:
  5574  	// result: (MOVWloadidx2 [c] {sym} ptr idx mem)
  5575  	for {
  5576  		c := v.AuxInt
  5577  		sym := v.Aux
  5578  		ptr := v.Args[0]
  5579  		v_1 := v.Args[1]
  5580  		if v_1.Op != Op386SHLLconst {
  5581  			break
  5582  		}
  5583  		if v_1.AuxInt != 1 {
  5584  			break
  5585  		}
  5586  		idx := v_1.Args[0]
  5587  		mem := v.Args[2]
  5588  		v.reset(Op386MOVWloadidx2)
  5589  		v.AuxInt = c
  5590  		v.Aux = sym
  5591  		v.AddArg(ptr)
  5592  		v.AddArg(idx)
  5593  		v.AddArg(mem)
  5594  		return true
  5595  	}
  5596  	// match: (MOVWloadidx1 [c] {sym} (ADDLconst [d] ptr) idx mem)
  5597  	// cond:
  5598  	// result: (MOVWloadidx1 [c+d] {sym} ptr idx mem)
  5599  	for {
  5600  		c := v.AuxInt
  5601  		sym := v.Aux
  5602  		v_0 := v.Args[0]
  5603  		if v_0.Op != Op386ADDLconst {
  5604  			break
  5605  		}
  5606  		d := v_0.AuxInt
  5607  		ptr := v_0.Args[0]
  5608  		idx := v.Args[1]
  5609  		mem := v.Args[2]
  5610  		v.reset(Op386MOVWloadidx1)
  5611  		v.AuxInt = c + d
  5612  		v.Aux = sym
  5613  		v.AddArg(ptr)
  5614  		v.AddArg(idx)
  5615  		v.AddArg(mem)
  5616  		return true
  5617  	}
  5618  	// match: (MOVWloadidx1 [c] {sym} ptr (ADDLconst [d] idx) mem)
  5619  	// cond:
  5620  	// result: (MOVWloadidx1 [c+d] {sym} ptr idx mem)
  5621  	for {
  5622  		c := v.AuxInt
  5623  		sym := v.Aux
  5624  		ptr := v.Args[0]
  5625  		v_1 := v.Args[1]
  5626  		if v_1.Op != Op386ADDLconst {
  5627  			break
  5628  		}
  5629  		d := v_1.AuxInt
  5630  		idx := v_1.Args[0]
  5631  		mem := v.Args[2]
  5632  		v.reset(Op386MOVWloadidx1)
  5633  		v.AuxInt = c + d
  5634  		v.Aux = sym
  5635  		v.AddArg(ptr)
  5636  		v.AddArg(idx)
  5637  		v.AddArg(mem)
  5638  		return true
  5639  	}
  5640  	return false
  5641  }
  5642  func rewriteValue386_Op386MOVWloadidx2(v *Value, config *Config) bool {
  5643  	b := v.Block
  5644  	_ = b
  5645  	// match: (MOVWloadidx2 [c] {sym} (ADDLconst [d] ptr) idx mem)
  5646  	// cond:
  5647  	// result: (MOVWloadidx2 [c+d] {sym} ptr idx mem)
  5648  	for {
  5649  		c := v.AuxInt
  5650  		sym := v.Aux
  5651  		v_0 := v.Args[0]
  5652  		if v_0.Op != Op386ADDLconst {
  5653  			break
  5654  		}
  5655  		d := v_0.AuxInt
  5656  		ptr := v_0.Args[0]
  5657  		idx := v.Args[1]
  5658  		mem := v.Args[2]
  5659  		v.reset(Op386MOVWloadidx2)
  5660  		v.AuxInt = c + d
  5661  		v.Aux = sym
  5662  		v.AddArg(ptr)
  5663  		v.AddArg(idx)
  5664  		v.AddArg(mem)
  5665  		return true
  5666  	}
  5667  	// match: (MOVWloadidx2 [c] {sym} ptr (ADDLconst [d] idx) mem)
  5668  	// cond:
  5669  	// result: (MOVWloadidx2 [c+2*d] {sym} ptr idx mem)
  5670  	for {
  5671  		c := v.AuxInt
  5672  		sym := v.Aux
  5673  		ptr := v.Args[0]
  5674  		v_1 := v.Args[1]
  5675  		if v_1.Op != Op386ADDLconst {
  5676  			break
  5677  		}
  5678  		d := v_1.AuxInt
  5679  		idx := v_1.Args[0]
  5680  		mem := v.Args[2]
  5681  		v.reset(Op386MOVWloadidx2)
  5682  		v.AuxInt = c + 2*d
  5683  		v.Aux = sym
  5684  		v.AddArg(ptr)
  5685  		v.AddArg(idx)
  5686  		v.AddArg(mem)
  5687  		return true
  5688  	}
  5689  	return false
  5690  }
  5691  func rewriteValue386_Op386MOVWstore(v *Value, config *Config) bool {
  5692  	b := v.Block
  5693  	_ = b
  5694  	// match: (MOVWstore [off] {sym} ptr (MOVWLSX x) mem)
  5695  	// cond:
  5696  	// result: (MOVWstore [off] {sym} ptr x mem)
  5697  	for {
  5698  		off := v.AuxInt
  5699  		sym := v.Aux
  5700  		ptr := v.Args[0]
  5701  		v_1 := v.Args[1]
  5702  		if v_1.Op != Op386MOVWLSX {
  5703  			break
  5704  		}
  5705  		x := v_1.Args[0]
  5706  		mem := v.Args[2]
  5707  		v.reset(Op386MOVWstore)
  5708  		v.AuxInt = off
  5709  		v.Aux = sym
  5710  		v.AddArg(ptr)
  5711  		v.AddArg(x)
  5712  		v.AddArg(mem)
  5713  		return true
  5714  	}
  5715  	// match: (MOVWstore [off] {sym} ptr (MOVWLZX x) mem)
  5716  	// cond:
  5717  	// result: (MOVWstore [off] {sym} ptr x mem)
  5718  	for {
  5719  		off := v.AuxInt
  5720  		sym := v.Aux
  5721  		ptr := v.Args[0]
  5722  		v_1 := v.Args[1]
  5723  		if v_1.Op != Op386MOVWLZX {
  5724  			break
  5725  		}
  5726  		x := v_1.Args[0]
  5727  		mem := v.Args[2]
  5728  		v.reset(Op386MOVWstore)
  5729  		v.AuxInt = off
  5730  		v.Aux = sym
  5731  		v.AddArg(ptr)
  5732  		v.AddArg(x)
  5733  		v.AddArg(mem)
  5734  		return true
  5735  	}
  5736  	// match: (MOVWstore  [off1] {sym} (ADDLconst [off2] ptr) val mem)
  5737  	// cond: is32Bit(off1+off2)
  5738  	// result: (MOVWstore  [off1+off2] {sym} ptr val mem)
  5739  	for {
  5740  		off1 := v.AuxInt
  5741  		sym := v.Aux
  5742  		v_0 := v.Args[0]
  5743  		if v_0.Op != Op386ADDLconst {
  5744  			break
  5745  		}
  5746  		off2 := v_0.AuxInt
  5747  		ptr := v_0.Args[0]
  5748  		val := v.Args[1]
  5749  		mem := v.Args[2]
  5750  		if !(is32Bit(off1 + off2)) {
  5751  			break
  5752  		}
  5753  		v.reset(Op386MOVWstore)
  5754  		v.AuxInt = off1 + off2
  5755  		v.Aux = sym
  5756  		v.AddArg(ptr)
  5757  		v.AddArg(val)
  5758  		v.AddArg(mem)
  5759  		return true
  5760  	}
  5761  	// match: (MOVWstore [off] {sym} ptr (MOVLconst [c]) mem)
  5762  	// cond: validOff(off)
  5763  	// result: (MOVWstoreconst [makeValAndOff(int64(int16(c)),off)] {sym} ptr mem)
  5764  	for {
  5765  		off := v.AuxInt
  5766  		sym := v.Aux
  5767  		ptr := v.Args[0]
  5768  		v_1 := v.Args[1]
  5769  		if v_1.Op != Op386MOVLconst {
  5770  			break
  5771  		}
  5772  		c := v_1.AuxInt
  5773  		mem := v.Args[2]
  5774  		if !(validOff(off)) {
  5775  			break
  5776  		}
  5777  		v.reset(Op386MOVWstoreconst)
  5778  		v.AuxInt = makeValAndOff(int64(int16(c)), off)
  5779  		v.Aux = sym
  5780  		v.AddArg(ptr)
  5781  		v.AddArg(mem)
  5782  		return true
  5783  	}
  5784  	// match: (MOVWstore  [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  5785  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  5786  	// result: (MOVWstore  [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  5787  	for {
  5788  		off1 := v.AuxInt
  5789  		sym1 := v.Aux
  5790  		v_0 := v.Args[0]
  5791  		if v_0.Op != Op386LEAL {
  5792  			break
  5793  		}
  5794  		off2 := v_0.AuxInt
  5795  		sym2 := v_0.Aux
  5796  		base := v_0.Args[0]
  5797  		val := v.Args[1]
  5798  		mem := v.Args[2]
  5799  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  5800  			break
  5801  		}
  5802  		v.reset(Op386MOVWstore)
  5803  		v.AuxInt = off1 + off2
  5804  		v.Aux = mergeSym(sym1, sym2)
  5805  		v.AddArg(base)
  5806  		v.AddArg(val)
  5807  		v.AddArg(mem)
  5808  		return true
  5809  	}
  5810  	// match: (MOVWstore [off1] {sym1} (LEAL1 [off2] {sym2} ptr idx) val mem)
  5811  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  5812  	// result: (MOVWstoreidx1 [off1+off2] {mergeSym(sym1,sym2)} ptr idx val mem)
  5813  	for {
  5814  		off1 := v.AuxInt
  5815  		sym1 := v.Aux
  5816  		v_0 := v.Args[0]
  5817  		if v_0.Op != Op386LEAL1 {
  5818  			break
  5819  		}
  5820  		off2 := v_0.AuxInt
  5821  		sym2 := v_0.Aux
  5822  		ptr := v_0.Args[0]
  5823  		idx := v_0.Args[1]
  5824  		val := v.Args[1]
  5825  		mem := v.Args[2]
  5826  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  5827  			break
  5828  		}
  5829  		v.reset(Op386MOVWstoreidx1)
  5830  		v.AuxInt = off1 + off2
  5831  		v.Aux = mergeSym(sym1, sym2)
  5832  		v.AddArg(ptr)
  5833  		v.AddArg(idx)
  5834  		v.AddArg(val)
  5835  		v.AddArg(mem)
  5836  		return true
  5837  	}
  5838  	// match: (MOVWstore [off1] {sym1} (LEAL2 [off2] {sym2} ptr idx) val mem)
  5839  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  5840  	// result: (MOVWstoreidx2 [off1+off2] {mergeSym(sym1,sym2)} ptr idx val mem)
  5841  	for {
  5842  		off1 := v.AuxInt
  5843  		sym1 := v.Aux
  5844  		v_0 := v.Args[0]
  5845  		if v_0.Op != Op386LEAL2 {
  5846  			break
  5847  		}
  5848  		off2 := v_0.AuxInt
  5849  		sym2 := v_0.Aux
  5850  		ptr := v_0.Args[0]
  5851  		idx := v_0.Args[1]
  5852  		val := v.Args[1]
  5853  		mem := v.Args[2]
  5854  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  5855  			break
  5856  		}
  5857  		v.reset(Op386MOVWstoreidx2)
  5858  		v.AuxInt = off1 + off2
  5859  		v.Aux = mergeSym(sym1, sym2)
  5860  		v.AddArg(ptr)
  5861  		v.AddArg(idx)
  5862  		v.AddArg(val)
  5863  		v.AddArg(mem)
  5864  		return true
  5865  	}
  5866  	// match: (MOVWstore [off] {sym} (ADDL ptr idx) val mem)
  5867  	// cond: ptr.Op != OpSB
  5868  	// result: (MOVWstoreidx1 [off] {sym} ptr idx val mem)
  5869  	for {
  5870  		off := v.AuxInt
  5871  		sym := v.Aux
  5872  		v_0 := v.Args[0]
  5873  		if v_0.Op != Op386ADDL {
  5874  			break
  5875  		}
  5876  		ptr := v_0.Args[0]
  5877  		idx := v_0.Args[1]
  5878  		val := v.Args[1]
  5879  		mem := v.Args[2]
  5880  		if !(ptr.Op != OpSB) {
  5881  			break
  5882  		}
  5883  		v.reset(Op386MOVWstoreidx1)
  5884  		v.AuxInt = off
  5885  		v.Aux = sym
  5886  		v.AddArg(ptr)
  5887  		v.AddArg(idx)
  5888  		v.AddArg(val)
  5889  		v.AddArg(mem)
  5890  		return true
  5891  	}
  5892  	// match: (MOVWstore [i] {s} p (SHRLconst [16] w) x:(MOVWstore [i-2] {s} p w mem))
  5893  	// cond: x.Uses == 1   && clobber(x)
  5894  	// result: (MOVLstore [i-2] {s} p w mem)
  5895  	for {
  5896  		i := v.AuxInt
  5897  		s := v.Aux
  5898  		p := v.Args[0]
  5899  		v_1 := v.Args[1]
  5900  		if v_1.Op != Op386SHRLconst {
  5901  			break
  5902  		}
  5903  		if v_1.AuxInt != 16 {
  5904  			break
  5905  		}
  5906  		w := v_1.Args[0]
  5907  		x := v.Args[2]
  5908  		if x.Op != Op386MOVWstore {
  5909  			break
  5910  		}
  5911  		if x.AuxInt != i-2 {
  5912  			break
  5913  		}
  5914  		if x.Aux != s {
  5915  			break
  5916  		}
  5917  		if p != x.Args[0] {
  5918  			break
  5919  		}
  5920  		if w != x.Args[1] {
  5921  			break
  5922  		}
  5923  		mem := x.Args[2]
  5924  		if !(x.Uses == 1 && clobber(x)) {
  5925  			break
  5926  		}
  5927  		v.reset(Op386MOVLstore)
  5928  		v.AuxInt = i - 2
  5929  		v.Aux = s
  5930  		v.AddArg(p)
  5931  		v.AddArg(w)
  5932  		v.AddArg(mem)
  5933  		return true
  5934  	}
  5935  	// match: (MOVWstore [i] {s} p (SHRLconst [j] w) x:(MOVWstore [i-2] {s} p w0:(SHRLconst [j-16] w) mem))
  5936  	// cond: x.Uses == 1   && clobber(x)
  5937  	// result: (MOVLstore [i-2] {s} p w0 mem)
  5938  	for {
  5939  		i := v.AuxInt
  5940  		s := v.Aux
  5941  		p := v.Args[0]
  5942  		v_1 := v.Args[1]
  5943  		if v_1.Op != Op386SHRLconst {
  5944  			break
  5945  		}
  5946  		j := v_1.AuxInt
  5947  		w := v_1.Args[0]
  5948  		x := v.Args[2]
  5949  		if x.Op != Op386MOVWstore {
  5950  			break
  5951  		}
  5952  		if x.AuxInt != i-2 {
  5953  			break
  5954  		}
  5955  		if x.Aux != s {
  5956  			break
  5957  		}
  5958  		if p != x.Args[0] {
  5959  			break
  5960  		}
  5961  		w0 := x.Args[1]
  5962  		if w0.Op != Op386SHRLconst {
  5963  			break
  5964  		}
  5965  		if w0.AuxInt != j-16 {
  5966  			break
  5967  		}
  5968  		if w != w0.Args[0] {
  5969  			break
  5970  		}
  5971  		mem := x.Args[2]
  5972  		if !(x.Uses == 1 && clobber(x)) {
  5973  			break
  5974  		}
  5975  		v.reset(Op386MOVLstore)
  5976  		v.AuxInt = i - 2
  5977  		v.Aux = s
  5978  		v.AddArg(p)
  5979  		v.AddArg(w0)
  5980  		v.AddArg(mem)
  5981  		return true
  5982  	}
  5983  	return false
  5984  }
  5985  func rewriteValue386_Op386MOVWstoreconst(v *Value, config *Config) bool {
  5986  	b := v.Block
  5987  	_ = b
  5988  	// match: (MOVWstoreconst [sc] {s} (ADDLconst [off] ptr) mem)
  5989  	// cond: ValAndOff(sc).canAdd(off)
  5990  	// result: (MOVWstoreconst [ValAndOff(sc).add(off)] {s} ptr mem)
  5991  	for {
  5992  		sc := v.AuxInt
  5993  		s := v.Aux
  5994  		v_0 := v.Args[0]
  5995  		if v_0.Op != Op386ADDLconst {
  5996  			break
  5997  		}
  5998  		off := v_0.AuxInt
  5999  		ptr := v_0.Args[0]
  6000  		mem := v.Args[1]
  6001  		if !(ValAndOff(sc).canAdd(off)) {
  6002  			break
  6003  		}
  6004  		v.reset(Op386MOVWstoreconst)
  6005  		v.AuxInt = ValAndOff(sc).add(off)
  6006  		v.Aux = s
  6007  		v.AddArg(ptr)
  6008  		v.AddArg(mem)
  6009  		return true
  6010  	}
  6011  	// match: (MOVWstoreconst [sc] {sym1} (LEAL [off] {sym2} ptr) mem)
  6012  	// cond: canMergeSym(sym1, sym2) && ValAndOff(sc).canAdd(off)   && (ptr.Op != OpSB || !config.ctxt.Flag_shared)
  6013  	// result: (MOVWstoreconst [ValAndOff(sc).add(off)] {mergeSym(sym1, sym2)} ptr mem)
  6014  	for {
  6015  		sc := v.AuxInt
  6016  		sym1 := v.Aux
  6017  		v_0 := v.Args[0]
  6018  		if v_0.Op != Op386LEAL {
  6019  			break
  6020  		}
  6021  		off := v_0.AuxInt
  6022  		sym2 := v_0.Aux
  6023  		ptr := v_0.Args[0]
  6024  		mem := v.Args[1]
  6025  		if !(canMergeSym(sym1, sym2) && ValAndOff(sc).canAdd(off) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
  6026  			break
  6027  		}
  6028  		v.reset(Op386MOVWstoreconst)
  6029  		v.AuxInt = ValAndOff(sc).add(off)
  6030  		v.Aux = mergeSym(sym1, sym2)
  6031  		v.AddArg(ptr)
  6032  		v.AddArg(mem)
  6033  		return true
  6034  	}
  6035  	// match: (MOVWstoreconst [x] {sym1} (LEAL1 [off] {sym2} ptr idx) mem)
  6036  	// cond: canMergeSym(sym1, sym2)
  6037  	// result: (MOVWstoreconstidx1 [ValAndOff(x).add(off)] {mergeSym(sym1,sym2)} ptr idx mem)
  6038  	for {
  6039  		x := v.AuxInt
  6040  		sym1 := v.Aux
  6041  		v_0 := v.Args[0]
  6042  		if v_0.Op != Op386LEAL1 {
  6043  			break
  6044  		}
  6045  		off := v_0.AuxInt
  6046  		sym2 := v_0.Aux
  6047  		ptr := v_0.Args[0]
  6048  		idx := v_0.Args[1]
  6049  		mem := v.Args[1]
  6050  		if !(canMergeSym(sym1, sym2)) {
  6051  			break
  6052  		}
  6053  		v.reset(Op386MOVWstoreconstidx1)
  6054  		v.AuxInt = ValAndOff(x).add(off)
  6055  		v.Aux = mergeSym(sym1, sym2)
  6056  		v.AddArg(ptr)
  6057  		v.AddArg(idx)
  6058  		v.AddArg(mem)
  6059  		return true
  6060  	}
  6061  	// match: (MOVWstoreconst [x] {sym1} (LEAL2 [off] {sym2} ptr idx) mem)
  6062  	// cond: canMergeSym(sym1, sym2)
  6063  	// result: (MOVWstoreconstidx2 [ValAndOff(x).add(off)] {mergeSym(sym1,sym2)} ptr idx mem)
  6064  	for {
  6065  		x := v.AuxInt
  6066  		sym1 := v.Aux
  6067  		v_0 := v.Args[0]
  6068  		if v_0.Op != Op386LEAL2 {
  6069  			break
  6070  		}
  6071  		off := v_0.AuxInt
  6072  		sym2 := v_0.Aux
  6073  		ptr := v_0.Args[0]
  6074  		idx := v_0.Args[1]
  6075  		mem := v.Args[1]
  6076  		if !(canMergeSym(sym1, sym2)) {
  6077  			break
  6078  		}
  6079  		v.reset(Op386MOVWstoreconstidx2)
  6080  		v.AuxInt = ValAndOff(x).add(off)
  6081  		v.Aux = mergeSym(sym1, sym2)
  6082  		v.AddArg(ptr)
  6083  		v.AddArg(idx)
  6084  		v.AddArg(mem)
  6085  		return true
  6086  	}
  6087  	// match: (MOVWstoreconst [x] {sym} (ADDL ptr idx) mem)
  6088  	// cond:
  6089  	// result: (MOVWstoreconstidx1 [x] {sym} ptr idx mem)
  6090  	for {
  6091  		x := v.AuxInt
  6092  		sym := v.Aux
  6093  		v_0 := v.Args[0]
  6094  		if v_0.Op != Op386ADDL {
  6095  			break
  6096  		}
  6097  		ptr := v_0.Args[0]
  6098  		idx := v_0.Args[1]
  6099  		mem := v.Args[1]
  6100  		v.reset(Op386MOVWstoreconstidx1)
  6101  		v.AuxInt = x
  6102  		v.Aux = sym
  6103  		v.AddArg(ptr)
  6104  		v.AddArg(idx)
  6105  		v.AddArg(mem)
  6106  		return true
  6107  	}
  6108  	// match: (MOVWstoreconst [c] {s} p x:(MOVWstoreconst [a] {s} p mem))
  6109  	// cond: x.Uses == 1   && ValAndOff(a).Off() + 2 == ValAndOff(c).Off()   && clobber(x)
  6110  	// result: (MOVLstoreconst [makeValAndOff(ValAndOff(a).Val()&0xffff | ValAndOff(c).Val()<<16, ValAndOff(a).Off())] {s} p mem)
  6111  	for {
  6112  		c := v.AuxInt
  6113  		s := v.Aux
  6114  		p := v.Args[0]
  6115  		x := v.Args[1]
  6116  		if x.Op != Op386MOVWstoreconst {
  6117  			break
  6118  		}
  6119  		a := x.AuxInt
  6120  		if x.Aux != s {
  6121  			break
  6122  		}
  6123  		if p != x.Args[0] {
  6124  			break
  6125  		}
  6126  		mem := x.Args[1]
  6127  		if !(x.Uses == 1 && ValAndOff(a).Off()+2 == ValAndOff(c).Off() && clobber(x)) {
  6128  			break
  6129  		}
  6130  		v.reset(Op386MOVLstoreconst)
  6131  		v.AuxInt = makeValAndOff(ValAndOff(a).Val()&0xffff|ValAndOff(c).Val()<<16, ValAndOff(a).Off())
  6132  		v.Aux = s
  6133  		v.AddArg(p)
  6134  		v.AddArg(mem)
  6135  		return true
  6136  	}
  6137  	return false
  6138  }
  6139  func rewriteValue386_Op386MOVWstoreconstidx1(v *Value, config *Config) bool {
  6140  	b := v.Block
  6141  	_ = b
  6142  	// match: (MOVWstoreconstidx1 [c] {sym} ptr (SHLLconst [1] idx) mem)
  6143  	// cond:
  6144  	// result: (MOVWstoreconstidx2 [c] {sym} ptr idx mem)
  6145  	for {
  6146  		c := v.AuxInt
  6147  		sym := v.Aux
  6148  		ptr := v.Args[0]
  6149  		v_1 := v.Args[1]
  6150  		if v_1.Op != Op386SHLLconst {
  6151  			break
  6152  		}
  6153  		if v_1.AuxInt != 1 {
  6154  			break
  6155  		}
  6156  		idx := v_1.Args[0]
  6157  		mem := v.Args[2]
  6158  		v.reset(Op386MOVWstoreconstidx2)
  6159  		v.AuxInt = c
  6160  		v.Aux = sym
  6161  		v.AddArg(ptr)
  6162  		v.AddArg(idx)
  6163  		v.AddArg(mem)
  6164  		return true
  6165  	}
  6166  	// match: (MOVWstoreconstidx1 [x] {sym} (ADDLconst [c] ptr) idx mem)
  6167  	// cond:
  6168  	// result: (MOVWstoreconstidx1 [ValAndOff(x).add(c)] {sym} ptr idx mem)
  6169  	for {
  6170  		x := v.AuxInt
  6171  		sym := v.Aux
  6172  		v_0 := v.Args[0]
  6173  		if v_0.Op != Op386ADDLconst {
  6174  			break
  6175  		}
  6176  		c := v_0.AuxInt
  6177  		ptr := v_0.Args[0]
  6178  		idx := v.Args[1]
  6179  		mem := v.Args[2]
  6180  		v.reset(Op386MOVWstoreconstidx1)
  6181  		v.AuxInt = ValAndOff(x).add(c)
  6182  		v.Aux = sym
  6183  		v.AddArg(ptr)
  6184  		v.AddArg(idx)
  6185  		v.AddArg(mem)
  6186  		return true
  6187  	}
  6188  	// match: (MOVWstoreconstidx1 [x] {sym} ptr (ADDLconst [c] idx) mem)
  6189  	// cond:
  6190  	// result: (MOVWstoreconstidx1 [ValAndOff(x).add(c)] {sym} ptr idx mem)
  6191  	for {
  6192  		x := v.AuxInt
  6193  		sym := v.Aux
  6194  		ptr := v.Args[0]
  6195  		v_1 := v.Args[1]
  6196  		if v_1.Op != Op386ADDLconst {
  6197  			break
  6198  		}
  6199  		c := v_1.AuxInt
  6200  		idx := v_1.Args[0]
  6201  		mem := v.Args[2]
  6202  		v.reset(Op386MOVWstoreconstidx1)
  6203  		v.AuxInt = ValAndOff(x).add(c)
  6204  		v.Aux = sym
  6205  		v.AddArg(ptr)
  6206  		v.AddArg(idx)
  6207  		v.AddArg(mem)
  6208  		return true
  6209  	}
  6210  	// match: (MOVWstoreconstidx1 [c] {s} p i x:(MOVWstoreconstidx1 [a] {s} p i mem))
  6211  	// cond: x.Uses == 1   && ValAndOff(a).Off() + 2 == ValAndOff(c).Off()   && clobber(x)
  6212  	// result: (MOVLstoreconstidx1 [makeValAndOff(ValAndOff(a).Val()&0xffff | ValAndOff(c).Val()<<16, ValAndOff(a).Off())] {s} p i mem)
  6213  	for {
  6214  		c := v.AuxInt
  6215  		s := v.Aux
  6216  		p := v.Args[0]
  6217  		i := v.Args[1]
  6218  		x := v.Args[2]
  6219  		if x.Op != Op386MOVWstoreconstidx1 {
  6220  			break
  6221  		}
  6222  		a := x.AuxInt
  6223  		if x.Aux != s {
  6224  			break
  6225  		}
  6226  		if p != x.Args[0] {
  6227  			break
  6228  		}
  6229  		if i != x.Args[1] {
  6230  			break
  6231  		}
  6232  		mem := x.Args[2]
  6233  		if !(x.Uses == 1 && ValAndOff(a).Off()+2 == ValAndOff(c).Off() && clobber(x)) {
  6234  			break
  6235  		}
  6236  		v.reset(Op386MOVLstoreconstidx1)
  6237  		v.AuxInt = makeValAndOff(ValAndOff(a).Val()&0xffff|ValAndOff(c).Val()<<16, ValAndOff(a).Off())
  6238  		v.Aux = s
  6239  		v.AddArg(p)
  6240  		v.AddArg(i)
  6241  		v.AddArg(mem)
  6242  		return true
  6243  	}
  6244  	return false
  6245  }
  6246  func rewriteValue386_Op386MOVWstoreconstidx2(v *Value, config *Config) bool {
  6247  	b := v.Block
  6248  	_ = b
  6249  	// match: (MOVWstoreconstidx2 [x] {sym} (ADDLconst [c] ptr) idx mem)
  6250  	// cond:
  6251  	// result: (MOVWstoreconstidx2 [ValAndOff(x).add(c)] {sym} ptr idx mem)
  6252  	for {
  6253  		x := v.AuxInt
  6254  		sym := v.Aux
  6255  		v_0 := v.Args[0]
  6256  		if v_0.Op != Op386ADDLconst {
  6257  			break
  6258  		}
  6259  		c := v_0.AuxInt
  6260  		ptr := v_0.Args[0]
  6261  		idx := v.Args[1]
  6262  		mem := v.Args[2]
  6263  		v.reset(Op386MOVWstoreconstidx2)
  6264  		v.AuxInt = ValAndOff(x).add(c)
  6265  		v.Aux = sym
  6266  		v.AddArg(ptr)
  6267  		v.AddArg(idx)
  6268  		v.AddArg(mem)
  6269  		return true
  6270  	}
  6271  	// match: (MOVWstoreconstidx2 [x] {sym} ptr (ADDLconst [c] idx) mem)
  6272  	// cond:
  6273  	// result: (MOVWstoreconstidx2 [ValAndOff(x).add(2*c)] {sym} ptr idx mem)
  6274  	for {
  6275  		x := v.AuxInt
  6276  		sym := v.Aux
  6277  		ptr := v.Args[0]
  6278  		v_1 := v.Args[1]
  6279  		if v_1.Op != Op386ADDLconst {
  6280  			break
  6281  		}
  6282  		c := v_1.AuxInt
  6283  		idx := v_1.Args[0]
  6284  		mem := v.Args[2]
  6285  		v.reset(Op386MOVWstoreconstidx2)
  6286  		v.AuxInt = ValAndOff(x).add(2 * c)
  6287  		v.Aux = sym
  6288  		v.AddArg(ptr)
  6289  		v.AddArg(idx)
  6290  		v.AddArg(mem)
  6291  		return true
  6292  	}
  6293  	// match: (MOVWstoreconstidx2 [c] {s} p i x:(MOVWstoreconstidx2 [a] {s} p i mem))
  6294  	// cond: x.Uses == 1   && ValAndOff(a).Off() + 2 == ValAndOff(c).Off()   && clobber(x)
  6295  	// result: (MOVLstoreconstidx1 [makeValAndOff(ValAndOff(a).Val()&0xffff | ValAndOff(c).Val()<<16, ValAndOff(a).Off())] {s} p (SHLLconst <i.Type> [1] i) mem)
  6296  	for {
  6297  		c := v.AuxInt
  6298  		s := v.Aux
  6299  		p := v.Args[0]
  6300  		i := v.Args[1]
  6301  		x := v.Args[2]
  6302  		if x.Op != Op386MOVWstoreconstidx2 {
  6303  			break
  6304  		}
  6305  		a := x.AuxInt
  6306  		if x.Aux != s {
  6307  			break
  6308  		}
  6309  		if p != x.Args[0] {
  6310  			break
  6311  		}
  6312  		if i != x.Args[1] {
  6313  			break
  6314  		}
  6315  		mem := x.Args[2]
  6316  		if !(x.Uses == 1 && ValAndOff(a).Off()+2 == ValAndOff(c).Off() && clobber(x)) {
  6317  			break
  6318  		}
  6319  		v.reset(Op386MOVLstoreconstidx1)
  6320  		v.AuxInt = makeValAndOff(ValAndOff(a).Val()&0xffff|ValAndOff(c).Val()<<16, ValAndOff(a).Off())
  6321  		v.Aux = s
  6322  		v.AddArg(p)
  6323  		v0 := b.NewValue0(v.Line, Op386SHLLconst, i.Type)
  6324  		v0.AuxInt = 1
  6325  		v0.AddArg(i)
  6326  		v.AddArg(v0)
  6327  		v.AddArg(mem)
  6328  		return true
  6329  	}
  6330  	return false
  6331  }
  6332  func rewriteValue386_Op386MOVWstoreidx1(v *Value, config *Config) bool {
  6333  	b := v.Block
  6334  	_ = b
  6335  	// match: (MOVWstoreidx1 [c] {sym} ptr (SHLLconst [1] idx) val mem)
  6336  	// cond:
  6337  	// result: (MOVWstoreidx2 [c] {sym} ptr idx val mem)
  6338  	for {
  6339  		c := v.AuxInt
  6340  		sym := v.Aux
  6341  		ptr := v.Args[0]
  6342  		v_1 := v.Args[1]
  6343  		if v_1.Op != Op386SHLLconst {
  6344  			break
  6345  		}
  6346  		if v_1.AuxInt != 1 {
  6347  			break
  6348  		}
  6349  		idx := v_1.Args[0]
  6350  		val := v.Args[2]
  6351  		mem := v.Args[3]
  6352  		v.reset(Op386MOVWstoreidx2)
  6353  		v.AuxInt = c
  6354  		v.Aux = sym
  6355  		v.AddArg(ptr)
  6356  		v.AddArg(idx)
  6357  		v.AddArg(val)
  6358  		v.AddArg(mem)
  6359  		return true
  6360  	}
  6361  	// match: (MOVWstoreidx1 [c] {sym} (ADDLconst [d] ptr) idx val mem)
  6362  	// cond:
  6363  	// result: (MOVWstoreidx1 [c+d] {sym} ptr idx val mem)
  6364  	for {
  6365  		c := v.AuxInt
  6366  		sym := v.Aux
  6367  		v_0 := v.Args[0]
  6368  		if v_0.Op != Op386ADDLconst {
  6369  			break
  6370  		}
  6371  		d := v_0.AuxInt
  6372  		ptr := v_0.Args[0]
  6373  		idx := v.Args[1]
  6374  		val := v.Args[2]
  6375  		mem := v.Args[3]
  6376  		v.reset(Op386MOVWstoreidx1)
  6377  		v.AuxInt = c + d
  6378  		v.Aux = sym
  6379  		v.AddArg(ptr)
  6380  		v.AddArg(idx)
  6381  		v.AddArg(val)
  6382  		v.AddArg(mem)
  6383  		return true
  6384  	}
  6385  	// match: (MOVWstoreidx1 [c] {sym} ptr (ADDLconst [d] idx) val mem)
  6386  	// cond:
  6387  	// result: (MOVWstoreidx1 [c+d] {sym} ptr idx val mem)
  6388  	for {
  6389  		c := v.AuxInt
  6390  		sym := v.Aux
  6391  		ptr := v.Args[0]
  6392  		v_1 := v.Args[1]
  6393  		if v_1.Op != Op386ADDLconst {
  6394  			break
  6395  		}
  6396  		d := v_1.AuxInt
  6397  		idx := v_1.Args[0]
  6398  		val := v.Args[2]
  6399  		mem := v.Args[3]
  6400  		v.reset(Op386MOVWstoreidx1)
  6401  		v.AuxInt = c + d
  6402  		v.Aux = sym
  6403  		v.AddArg(ptr)
  6404  		v.AddArg(idx)
  6405  		v.AddArg(val)
  6406  		v.AddArg(mem)
  6407  		return true
  6408  	}
  6409  	// match: (MOVWstoreidx1 [i] {s} p idx (SHRLconst [16] w) x:(MOVWstoreidx1 [i-2] {s} p idx w mem))
  6410  	// cond: x.Uses == 1   && clobber(x)
  6411  	// result: (MOVLstoreidx1 [i-2] {s} p idx w mem)
  6412  	for {
  6413  		i := v.AuxInt
  6414  		s := v.Aux
  6415  		p := v.Args[0]
  6416  		idx := v.Args[1]
  6417  		v_2 := v.Args[2]
  6418  		if v_2.Op != Op386SHRLconst {
  6419  			break
  6420  		}
  6421  		if v_2.AuxInt != 16 {
  6422  			break
  6423  		}
  6424  		w := v_2.Args[0]
  6425  		x := v.Args[3]
  6426  		if x.Op != Op386MOVWstoreidx1 {
  6427  			break
  6428  		}
  6429  		if x.AuxInt != i-2 {
  6430  			break
  6431  		}
  6432  		if x.Aux != s {
  6433  			break
  6434  		}
  6435  		if p != x.Args[0] {
  6436  			break
  6437  		}
  6438  		if idx != x.Args[1] {
  6439  			break
  6440  		}
  6441  		if w != x.Args[2] {
  6442  			break
  6443  		}
  6444  		mem := x.Args[3]
  6445  		if !(x.Uses == 1 && clobber(x)) {
  6446  			break
  6447  		}
  6448  		v.reset(Op386MOVLstoreidx1)
  6449  		v.AuxInt = i - 2
  6450  		v.Aux = s
  6451  		v.AddArg(p)
  6452  		v.AddArg(idx)
  6453  		v.AddArg(w)
  6454  		v.AddArg(mem)
  6455  		return true
  6456  	}
  6457  	// match: (MOVWstoreidx1 [i] {s} p idx (SHRLconst [j] w) x:(MOVWstoreidx1 [i-2] {s} p idx w0:(SHRLconst [j-16] w) mem))
  6458  	// cond: x.Uses == 1   && clobber(x)
  6459  	// result: (MOVLstoreidx1 [i-2] {s} p idx w0 mem)
  6460  	for {
  6461  		i := v.AuxInt
  6462  		s := v.Aux
  6463  		p := v.Args[0]
  6464  		idx := v.Args[1]
  6465  		v_2 := v.Args[2]
  6466  		if v_2.Op != Op386SHRLconst {
  6467  			break
  6468  		}
  6469  		j := v_2.AuxInt
  6470  		w := v_2.Args[0]
  6471  		x := v.Args[3]
  6472  		if x.Op != Op386MOVWstoreidx1 {
  6473  			break
  6474  		}
  6475  		if x.AuxInt != i-2 {
  6476  			break
  6477  		}
  6478  		if x.Aux != s {
  6479  			break
  6480  		}
  6481  		if p != x.Args[0] {
  6482  			break
  6483  		}
  6484  		if idx != x.Args[1] {
  6485  			break
  6486  		}
  6487  		w0 := x.Args[2]
  6488  		if w0.Op != Op386SHRLconst {
  6489  			break
  6490  		}
  6491  		if w0.AuxInt != j-16 {
  6492  			break
  6493  		}
  6494  		if w != w0.Args[0] {
  6495  			break
  6496  		}
  6497  		mem := x.Args[3]
  6498  		if !(x.Uses == 1 && clobber(x)) {
  6499  			break
  6500  		}
  6501  		v.reset(Op386MOVLstoreidx1)
  6502  		v.AuxInt = i - 2
  6503  		v.Aux = s
  6504  		v.AddArg(p)
  6505  		v.AddArg(idx)
  6506  		v.AddArg(w0)
  6507  		v.AddArg(mem)
  6508  		return true
  6509  	}
  6510  	return false
  6511  }
  6512  func rewriteValue386_Op386MOVWstoreidx2(v *Value, config *Config) bool {
  6513  	b := v.Block
  6514  	_ = b
  6515  	// match: (MOVWstoreidx2 [c] {sym} (ADDLconst [d] ptr) idx val mem)
  6516  	// cond:
  6517  	// result: (MOVWstoreidx2 [c+d] {sym} ptr idx val mem)
  6518  	for {
  6519  		c := v.AuxInt
  6520  		sym := v.Aux
  6521  		v_0 := v.Args[0]
  6522  		if v_0.Op != Op386ADDLconst {
  6523  			break
  6524  		}
  6525  		d := v_0.AuxInt
  6526  		ptr := v_0.Args[0]
  6527  		idx := v.Args[1]
  6528  		val := v.Args[2]
  6529  		mem := v.Args[3]
  6530  		v.reset(Op386MOVWstoreidx2)
  6531  		v.AuxInt = c + d
  6532  		v.Aux = sym
  6533  		v.AddArg(ptr)
  6534  		v.AddArg(idx)
  6535  		v.AddArg(val)
  6536  		v.AddArg(mem)
  6537  		return true
  6538  	}
  6539  	// match: (MOVWstoreidx2 [c] {sym} ptr (ADDLconst [d] idx) val mem)
  6540  	// cond:
  6541  	// result: (MOVWstoreidx2 [c+2*d] {sym} ptr idx val mem)
  6542  	for {
  6543  		c := v.AuxInt
  6544  		sym := v.Aux
  6545  		ptr := v.Args[0]
  6546  		v_1 := v.Args[1]
  6547  		if v_1.Op != Op386ADDLconst {
  6548  			break
  6549  		}
  6550  		d := v_1.AuxInt
  6551  		idx := v_1.Args[0]
  6552  		val := v.Args[2]
  6553  		mem := v.Args[3]
  6554  		v.reset(Op386MOVWstoreidx2)
  6555  		v.AuxInt = c + 2*d
  6556  		v.Aux = sym
  6557  		v.AddArg(ptr)
  6558  		v.AddArg(idx)
  6559  		v.AddArg(val)
  6560  		v.AddArg(mem)
  6561  		return true
  6562  	}
  6563  	// match: (MOVWstoreidx2 [i] {s} p idx (SHRLconst [16] w) x:(MOVWstoreidx2 [i-2] {s} p idx w mem))
  6564  	// cond: x.Uses == 1   && clobber(x)
  6565  	// result: (MOVLstoreidx1 [i-2] {s} p (SHLLconst <idx.Type> [1] idx) w mem)
  6566  	for {
  6567  		i := v.AuxInt
  6568  		s := v.Aux
  6569  		p := v.Args[0]
  6570  		idx := v.Args[1]
  6571  		v_2 := v.Args[2]
  6572  		if v_2.Op != Op386SHRLconst {
  6573  			break
  6574  		}
  6575  		if v_2.AuxInt != 16 {
  6576  			break
  6577  		}
  6578  		w := v_2.Args[0]
  6579  		x := v.Args[3]
  6580  		if x.Op != Op386MOVWstoreidx2 {
  6581  			break
  6582  		}
  6583  		if x.AuxInt != i-2 {
  6584  			break
  6585  		}
  6586  		if x.Aux != s {
  6587  			break
  6588  		}
  6589  		if p != x.Args[0] {
  6590  			break
  6591  		}
  6592  		if idx != x.Args[1] {
  6593  			break
  6594  		}
  6595  		if w != x.Args[2] {
  6596  			break
  6597  		}
  6598  		mem := x.Args[3]
  6599  		if !(x.Uses == 1 && clobber(x)) {
  6600  			break
  6601  		}
  6602  		v.reset(Op386MOVLstoreidx1)
  6603  		v.AuxInt = i - 2
  6604  		v.Aux = s
  6605  		v.AddArg(p)
  6606  		v0 := b.NewValue0(v.Line, Op386SHLLconst, idx.Type)
  6607  		v0.AuxInt = 1
  6608  		v0.AddArg(idx)
  6609  		v.AddArg(v0)
  6610  		v.AddArg(w)
  6611  		v.AddArg(mem)
  6612  		return true
  6613  	}
  6614  	// match: (MOVWstoreidx2 [i] {s} p idx (SHRLconst [j] w) x:(MOVWstoreidx2 [i-2] {s} p idx w0:(SHRLconst [j-16] w) mem))
  6615  	// cond: x.Uses == 1   && clobber(x)
  6616  	// result: (MOVLstoreidx1 [i-2] {s} p (SHLLconst <idx.Type> [1] idx) w0 mem)
  6617  	for {
  6618  		i := v.AuxInt
  6619  		s := v.Aux
  6620  		p := v.Args[0]
  6621  		idx := v.Args[1]
  6622  		v_2 := v.Args[2]
  6623  		if v_2.Op != Op386SHRLconst {
  6624  			break
  6625  		}
  6626  		j := v_2.AuxInt
  6627  		w := v_2.Args[0]
  6628  		x := v.Args[3]
  6629  		if x.Op != Op386MOVWstoreidx2 {
  6630  			break
  6631  		}
  6632  		if x.AuxInt != i-2 {
  6633  			break
  6634  		}
  6635  		if x.Aux != s {
  6636  			break
  6637  		}
  6638  		if p != x.Args[0] {
  6639  			break
  6640  		}
  6641  		if idx != x.Args[1] {
  6642  			break
  6643  		}
  6644  		w0 := x.Args[2]
  6645  		if w0.Op != Op386SHRLconst {
  6646  			break
  6647  		}
  6648  		if w0.AuxInt != j-16 {
  6649  			break
  6650  		}
  6651  		if w != w0.Args[0] {
  6652  			break
  6653  		}
  6654  		mem := x.Args[3]
  6655  		if !(x.Uses == 1 && clobber(x)) {
  6656  			break
  6657  		}
  6658  		v.reset(Op386MOVLstoreidx1)
  6659  		v.AuxInt = i - 2
  6660  		v.Aux = s
  6661  		v.AddArg(p)
  6662  		v0 := b.NewValue0(v.Line, Op386SHLLconst, idx.Type)
  6663  		v0.AuxInt = 1
  6664  		v0.AddArg(idx)
  6665  		v.AddArg(v0)
  6666  		v.AddArg(w0)
  6667  		v.AddArg(mem)
  6668  		return true
  6669  	}
  6670  	return false
  6671  }
  6672  func rewriteValue386_Op386MULL(v *Value, config *Config) bool {
  6673  	b := v.Block
  6674  	_ = b
  6675  	// match: (MULL x (MOVLconst [c]))
  6676  	// cond:
  6677  	// result: (MULLconst [c] x)
  6678  	for {
  6679  		x := v.Args[0]
  6680  		v_1 := v.Args[1]
  6681  		if v_1.Op != Op386MOVLconst {
  6682  			break
  6683  		}
  6684  		c := v_1.AuxInt
  6685  		v.reset(Op386MULLconst)
  6686  		v.AuxInt = c
  6687  		v.AddArg(x)
  6688  		return true
  6689  	}
  6690  	// match: (MULL (MOVLconst [c]) x)
  6691  	// cond:
  6692  	// result: (MULLconst [c] x)
  6693  	for {
  6694  		v_0 := v.Args[0]
  6695  		if v_0.Op != Op386MOVLconst {
  6696  			break
  6697  		}
  6698  		c := v_0.AuxInt
  6699  		x := v.Args[1]
  6700  		v.reset(Op386MULLconst)
  6701  		v.AuxInt = c
  6702  		v.AddArg(x)
  6703  		return true
  6704  	}
  6705  	return false
  6706  }
  6707  func rewriteValue386_Op386MULLconst(v *Value, config *Config) bool {
  6708  	b := v.Block
  6709  	_ = b
  6710  	// match: (MULLconst [c] (MULLconst [d] x))
  6711  	// cond:
  6712  	// result: (MULLconst [int64(int32(c * d))] x)
  6713  	for {
  6714  		c := v.AuxInt
  6715  		v_0 := v.Args[0]
  6716  		if v_0.Op != Op386MULLconst {
  6717  			break
  6718  		}
  6719  		d := v_0.AuxInt
  6720  		x := v_0.Args[0]
  6721  		v.reset(Op386MULLconst)
  6722  		v.AuxInt = int64(int32(c * d))
  6723  		v.AddArg(x)
  6724  		return true
  6725  	}
  6726  	// match: (MULLconst [-1] x)
  6727  	// cond:
  6728  	// result: (NEGL x)
  6729  	for {
  6730  		if v.AuxInt != -1 {
  6731  			break
  6732  		}
  6733  		x := v.Args[0]
  6734  		v.reset(Op386NEGL)
  6735  		v.AddArg(x)
  6736  		return true
  6737  	}
  6738  	// match: (MULLconst [0] _)
  6739  	// cond:
  6740  	// result: (MOVLconst [0])
  6741  	for {
  6742  		if v.AuxInt != 0 {
  6743  			break
  6744  		}
  6745  		v.reset(Op386MOVLconst)
  6746  		v.AuxInt = 0
  6747  		return true
  6748  	}
  6749  	// match: (MULLconst [1] x)
  6750  	// cond:
  6751  	// result: x
  6752  	for {
  6753  		if v.AuxInt != 1 {
  6754  			break
  6755  		}
  6756  		x := v.Args[0]
  6757  		v.reset(OpCopy)
  6758  		v.Type = x.Type
  6759  		v.AddArg(x)
  6760  		return true
  6761  	}
  6762  	// match: (MULLconst [3] x)
  6763  	// cond:
  6764  	// result: (LEAL2 x x)
  6765  	for {
  6766  		if v.AuxInt != 3 {
  6767  			break
  6768  		}
  6769  		x := v.Args[0]
  6770  		v.reset(Op386LEAL2)
  6771  		v.AddArg(x)
  6772  		v.AddArg(x)
  6773  		return true
  6774  	}
  6775  	// match: (MULLconst [5] x)
  6776  	// cond:
  6777  	// result: (LEAL4 x x)
  6778  	for {
  6779  		if v.AuxInt != 5 {
  6780  			break
  6781  		}
  6782  		x := v.Args[0]
  6783  		v.reset(Op386LEAL4)
  6784  		v.AddArg(x)
  6785  		v.AddArg(x)
  6786  		return true
  6787  	}
  6788  	// match: (MULLconst [7] x)
  6789  	// cond:
  6790  	// result: (LEAL8 (NEGL <v.Type> x) x)
  6791  	for {
  6792  		if v.AuxInt != 7 {
  6793  			break
  6794  		}
  6795  		x := v.Args[0]
  6796  		v.reset(Op386LEAL8)
  6797  		v0 := b.NewValue0(v.Line, Op386NEGL, v.Type)
  6798  		v0.AddArg(x)
  6799  		v.AddArg(v0)
  6800  		v.AddArg(x)
  6801  		return true
  6802  	}
  6803  	// match: (MULLconst [9] x)
  6804  	// cond:
  6805  	// result: (LEAL8 x x)
  6806  	for {
  6807  		if v.AuxInt != 9 {
  6808  			break
  6809  		}
  6810  		x := v.Args[0]
  6811  		v.reset(Op386LEAL8)
  6812  		v.AddArg(x)
  6813  		v.AddArg(x)
  6814  		return true
  6815  	}
  6816  	// match: (MULLconst [11] x)
  6817  	// cond:
  6818  	// result: (LEAL2 x (LEAL4 <v.Type> x x))
  6819  	for {
  6820  		if v.AuxInt != 11 {
  6821  			break
  6822  		}
  6823  		x := v.Args[0]
  6824  		v.reset(Op386LEAL2)
  6825  		v.AddArg(x)
  6826  		v0 := b.NewValue0(v.Line, Op386LEAL4, v.Type)
  6827  		v0.AddArg(x)
  6828  		v0.AddArg(x)
  6829  		v.AddArg(v0)
  6830  		return true
  6831  	}
  6832  	// match: (MULLconst [13] x)
  6833  	// cond:
  6834  	// result: (LEAL4 x (LEAL2 <v.Type> x x))
  6835  	for {
  6836  		if v.AuxInt != 13 {
  6837  			break
  6838  		}
  6839  		x := v.Args[0]
  6840  		v.reset(Op386LEAL4)
  6841  		v.AddArg(x)
  6842  		v0 := b.NewValue0(v.Line, Op386LEAL2, v.Type)
  6843  		v0.AddArg(x)
  6844  		v0.AddArg(x)
  6845  		v.AddArg(v0)
  6846  		return true
  6847  	}
  6848  	// match: (MULLconst [21] x)
  6849  	// cond:
  6850  	// result: (LEAL4 x (LEAL4 <v.Type> x x))
  6851  	for {
  6852  		if v.AuxInt != 21 {
  6853  			break
  6854  		}
  6855  		x := v.Args[0]
  6856  		v.reset(Op386LEAL4)
  6857  		v.AddArg(x)
  6858  		v0 := b.NewValue0(v.Line, Op386LEAL4, v.Type)
  6859  		v0.AddArg(x)
  6860  		v0.AddArg(x)
  6861  		v.AddArg(v0)
  6862  		return true
  6863  	}
  6864  	// match: (MULLconst [25] x)
  6865  	// cond:
  6866  	// result: (LEAL8 x (LEAL2 <v.Type> x x))
  6867  	for {
  6868  		if v.AuxInt != 25 {
  6869  			break
  6870  		}
  6871  		x := v.Args[0]
  6872  		v.reset(Op386LEAL8)
  6873  		v.AddArg(x)
  6874  		v0 := b.NewValue0(v.Line, Op386LEAL2, v.Type)
  6875  		v0.AddArg(x)
  6876  		v0.AddArg(x)
  6877  		v.AddArg(v0)
  6878  		return true
  6879  	}
  6880  	// match: (MULLconst [37] x)
  6881  	// cond:
  6882  	// result: (LEAL4 x (LEAL8 <v.Type> x x))
  6883  	for {
  6884  		if v.AuxInt != 37 {
  6885  			break
  6886  		}
  6887  		x := v.Args[0]
  6888  		v.reset(Op386LEAL4)
  6889  		v.AddArg(x)
  6890  		v0 := b.NewValue0(v.Line, Op386LEAL8, v.Type)
  6891  		v0.AddArg(x)
  6892  		v0.AddArg(x)
  6893  		v.AddArg(v0)
  6894  		return true
  6895  	}
  6896  	// match: (MULLconst [41] x)
  6897  	// cond:
  6898  	// result: (LEAL8 x (LEAL4 <v.Type> x x))
  6899  	for {
  6900  		if v.AuxInt != 41 {
  6901  			break
  6902  		}
  6903  		x := v.Args[0]
  6904  		v.reset(Op386LEAL8)
  6905  		v.AddArg(x)
  6906  		v0 := b.NewValue0(v.Line, Op386LEAL4, v.Type)
  6907  		v0.AddArg(x)
  6908  		v0.AddArg(x)
  6909  		v.AddArg(v0)
  6910  		return true
  6911  	}
  6912  	// match: (MULLconst [73] x)
  6913  	// cond:
  6914  	// result: (LEAL8 x (LEAL8 <v.Type> x x))
  6915  	for {
  6916  		if v.AuxInt != 73 {
  6917  			break
  6918  		}
  6919  		x := v.Args[0]
  6920  		v.reset(Op386LEAL8)
  6921  		v.AddArg(x)
  6922  		v0 := b.NewValue0(v.Line, Op386LEAL8, v.Type)
  6923  		v0.AddArg(x)
  6924  		v0.AddArg(x)
  6925  		v.AddArg(v0)
  6926  		return true
  6927  	}
  6928  	// match: (MULLconst [c] x)
  6929  	// cond: isPowerOfTwo(c)
  6930  	// result: (SHLLconst [log2(c)] x)
  6931  	for {
  6932  		c := v.AuxInt
  6933  		x := v.Args[0]
  6934  		if !(isPowerOfTwo(c)) {
  6935  			break
  6936  		}
  6937  		v.reset(Op386SHLLconst)
  6938  		v.AuxInt = log2(c)
  6939  		v.AddArg(x)
  6940  		return true
  6941  	}
  6942  	// match: (MULLconst [c] x)
  6943  	// cond: isPowerOfTwo(c+1) && c >= 15
  6944  	// result: (SUBL (SHLLconst <v.Type> [log2(c+1)] x) x)
  6945  	for {
  6946  		c := v.AuxInt
  6947  		x := v.Args[0]
  6948  		if !(isPowerOfTwo(c+1) && c >= 15) {
  6949  			break
  6950  		}
  6951  		v.reset(Op386SUBL)
  6952  		v0 := b.NewValue0(v.Line, Op386SHLLconst, v.Type)
  6953  		v0.AuxInt = log2(c + 1)
  6954  		v0.AddArg(x)
  6955  		v.AddArg(v0)
  6956  		v.AddArg(x)
  6957  		return true
  6958  	}
  6959  	// match: (MULLconst [c] x)
  6960  	// cond: isPowerOfTwo(c-1) && c >= 17
  6961  	// result: (LEAL1 (SHLLconst <v.Type> [log2(c-1)] x) x)
  6962  	for {
  6963  		c := v.AuxInt
  6964  		x := v.Args[0]
  6965  		if !(isPowerOfTwo(c-1) && c >= 17) {
  6966  			break
  6967  		}
  6968  		v.reset(Op386LEAL1)
  6969  		v0 := b.NewValue0(v.Line, Op386SHLLconst, v.Type)
  6970  		v0.AuxInt = log2(c - 1)
  6971  		v0.AddArg(x)
  6972  		v.AddArg(v0)
  6973  		v.AddArg(x)
  6974  		return true
  6975  	}
  6976  	// match: (MULLconst [c] x)
  6977  	// cond: isPowerOfTwo(c-2) && c >= 34
  6978  	// result: (LEAL2 (SHLLconst <v.Type> [log2(c-2)] x) x)
  6979  	for {
  6980  		c := v.AuxInt
  6981  		x := v.Args[0]
  6982  		if !(isPowerOfTwo(c-2) && c >= 34) {
  6983  			break
  6984  		}
  6985  		v.reset(Op386LEAL2)
  6986  		v0 := b.NewValue0(v.Line, Op386SHLLconst, v.Type)
  6987  		v0.AuxInt = log2(c - 2)
  6988  		v0.AddArg(x)
  6989  		v.AddArg(v0)
  6990  		v.AddArg(x)
  6991  		return true
  6992  	}
  6993  	// match: (MULLconst [c] x)
  6994  	// cond: isPowerOfTwo(c-4) && c >= 68
  6995  	// result: (LEAL4 (SHLLconst <v.Type> [log2(c-4)] x) x)
  6996  	for {
  6997  		c := v.AuxInt
  6998  		x := v.Args[0]
  6999  		if !(isPowerOfTwo(c-4) && c >= 68) {
  7000  			break
  7001  		}
  7002  		v.reset(Op386LEAL4)
  7003  		v0 := b.NewValue0(v.Line, Op386SHLLconst, v.Type)
  7004  		v0.AuxInt = log2(c - 4)
  7005  		v0.AddArg(x)
  7006  		v.AddArg(v0)
  7007  		v.AddArg(x)
  7008  		return true
  7009  	}
  7010  	// match: (MULLconst [c] x)
  7011  	// cond: isPowerOfTwo(c-8) && c >= 136
  7012  	// result: (LEAL8 (SHLLconst <v.Type> [log2(c-8)] x) x)
  7013  	for {
  7014  		c := v.AuxInt
  7015  		x := v.Args[0]
  7016  		if !(isPowerOfTwo(c-8) && c >= 136) {
  7017  			break
  7018  		}
  7019  		v.reset(Op386LEAL8)
  7020  		v0 := b.NewValue0(v.Line, Op386SHLLconst, v.Type)
  7021  		v0.AuxInt = log2(c - 8)
  7022  		v0.AddArg(x)
  7023  		v.AddArg(v0)
  7024  		v.AddArg(x)
  7025  		return true
  7026  	}
  7027  	// match: (MULLconst [c] x)
  7028  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
  7029  	// result: (SHLLconst [log2(c/3)] (LEAL2 <v.Type> x x))
  7030  	for {
  7031  		c := v.AuxInt
  7032  		x := v.Args[0]
  7033  		if !(c%3 == 0 && isPowerOfTwo(c/3)) {
  7034  			break
  7035  		}
  7036  		v.reset(Op386SHLLconst)
  7037  		v.AuxInt = log2(c / 3)
  7038  		v0 := b.NewValue0(v.Line, Op386LEAL2, v.Type)
  7039  		v0.AddArg(x)
  7040  		v0.AddArg(x)
  7041  		v.AddArg(v0)
  7042  		return true
  7043  	}
  7044  	// match: (MULLconst [c] x)
  7045  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
  7046  	// result: (SHLLconst [log2(c/5)] (LEAL4 <v.Type> x x))
  7047  	for {
  7048  		c := v.AuxInt
  7049  		x := v.Args[0]
  7050  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
  7051  			break
  7052  		}
  7053  		v.reset(Op386SHLLconst)
  7054  		v.AuxInt = log2(c / 5)
  7055  		v0 := b.NewValue0(v.Line, Op386LEAL4, v.Type)
  7056  		v0.AddArg(x)
  7057  		v0.AddArg(x)
  7058  		v.AddArg(v0)
  7059  		return true
  7060  	}
  7061  	// match: (MULLconst [c] x)
  7062  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
  7063  	// result: (SHLLconst [log2(c/9)] (LEAL8 <v.Type> x x))
  7064  	for {
  7065  		c := v.AuxInt
  7066  		x := v.Args[0]
  7067  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
  7068  			break
  7069  		}
  7070  		v.reset(Op386SHLLconst)
  7071  		v.AuxInt = log2(c / 9)
  7072  		v0 := b.NewValue0(v.Line, Op386LEAL8, v.Type)
  7073  		v0.AddArg(x)
  7074  		v0.AddArg(x)
  7075  		v.AddArg(v0)
  7076  		return true
  7077  	}
  7078  	// match: (MULLconst [c] (MOVLconst [d]))
  7079  	// cond:
  7080  	// result: (MOVLconst [int64(int32(c*d))])
  7081  	for {
  7082  		c := v.AuxInt
  7083  		v_0 := v.Args[0]
  7084  		if v_0.Op != Op386MOVLconst {
  7085  			break
  7086  		}
  7087  		d := v_0.AuxInt
  7088  		v.reset(Op386MOVLconst)
  7089  		v.AuxInt = int64(int32(c * d))
  7090  		return true
  7091  	}
  7092  	return false
  7093  }
  7094  func rewriteValue386_Op386NEGL(v *Value, config *Config) bool {
  7095  	b := v.Block
  7096  	_ = b
  7097  	// match: (NEGL (MOVLconst [c]))
  7098  	// cond:
  7099  	// result: (MOVLconst [int64(int32(-c))])
  7100  	for {
  7101  		v_0 := v.Args[0]
  7102  		if v_0.Op != Op386MOVLconst {
  7103  			break
  7104  		}
  7105  		c := v_0.AuxInt
  7106  		v.reset(Op386MOVLconst)
  7107  		v.AuxInt = int64(int32(-c))
  7108  		return true
  7109  	}
  7110  	return false
  7111  }
  7112  func rewriteValue386_Op386NOTL(v *Value, config *Config) bool {
  7113  	b := v.Block
  7114  	_ = b
  7115  	// match: (NOTL (MOVLconst [c]))
  7116  	// cond:
  7117  	// result: (MOVLconst [^c])
  7118  	for {
  7119  		v_0 := v.Args[0]
  7120  		if v_0.Op != Op386MOVLconst {
  7121  			break
  7122  		}
  7123  		c := v_0.AuxInt
  7124  		v.reset(Op386MOVLconst)
  7125  		v.AuxInt = ^c
  7126  		return true
  7127  	}
  7128  	return false
  7129  }
  7130  func rewriteValue386_Op386ORL(v *Value, config *Config) bool {
  7131  	b := v.Block
  7132  	_ = b
  7133  	// match: (ORL x (MOVLconst [c]))
  7134  	// cond:
  7135  	// result: (ORLconst [c] x)
  7136  	for {
  7137  		x := v.Args[0]
  7138  		v_1 := v.Args[1]
  7139  		if v_1.Op != Op386MOVLconst {
  7140  			break
  7141  		}
  7142  		c := v_1.AuxInt
  7143  		v.reset(Op386ORLconst)
  7144  		v.AuxInt = c
  7145  		v.AddArg(x)
  7146  		return true
  7147  	}
  7148  	// match: (ORL (MOVLconst [c]) x)
  7149  	// cond:
  7150  	// result: (ORLconst [c] x)
  7151  	for {
  7152  		v_0 := v.Args[0]
  7153  		if v_0.Op != Op386MOVLconst {
  7154  			break
  7155  		}
  7156  		c := v_0.AuxInt
  7157  		x := v.Args[1]
  7158  		v.reset(Op386ORLconst)
  7159  		v.AuxInt = c
  7160  		v.AddArg(x)
  7161  		return true
  7162  	}
  7163  	// match: (ORL x x)
  7164  	// cond:
  7165  	// result: x
  7166  	for {
  7167  		x := v.Args[0]
  7168  		if x != v.Args[1] {
  7169  			break
  7170  		}
  7171  		v.reset(OpCopy)
  7172  		v.Type = x.Type
  7173  		v.AddArg(x)
  7174  		return true
  7175  	}
  7176  	// match: (ORL                  x0:(MOVBload [i]   {s} p mem)     s0:(SHLLconst [8] x1:(MOVBload [i+1] {s} p mem)))
  7177  	// cond: x0.Uses == 1   && x1.Uses == 1   && s0.Uses == 1   && mergePoint(b,x0,x1) != nil   && clobber(x0)   && clobber(x1)   && clobber(s0)
  7178  	// result: @mergePoint(b,x0,x1) (MOVWload [i] {s} p mem)
  7179  	for {
  7180  		x0 := v.Args[0]
  7181  		if x0.Op != Op386MOVBload {
  7182  			break
  7183  		}
  7184  		i := x0.AuxInt
  7185  		s := x0.Aux
  7186  		p := x0.Args[0]
  7187  		mem := x0.Args[1]
  7188  		s0 := v.Args[1]
  7189  		if s0.Op != Op386SHLLconst {
  7190  			break
  7191  		}
  7192  		if s0.AuxInt != 8 {
  7193  			break
  7194  		}
  7195  		x1 := s0.Args[0]
  7196  		if x1.Op != Op386MOVBload {
  7197  			break
  7198  		}
  7199  		if x1.AuxInt != i+1 {
  7200  			break
  7201  		}
  7202  		if x1.Aux != s {
  7203  			break
  7204  		}
  7205  		if p != x1.Args[0] {
  7206  			break
  7207  		}
  7208  		if mem != x1.Args[1] {
  7209  			break
  7210  		}
  7211  		if !(x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0) && clobber(x1) && clobber(s0)) {
  7212  			break
  7213  		}
  7214  		b = mergePoint(b, x0, x1)
  7215  		v0 := b.NewValue0(v.Line, Op386MOVWload, config.fe.TypeUInt16())
  7216  		v.reset(OpCopy)
  7217  		v.AddArg(v0)
  7218  		v0.AuxInt = i
  7219  		v0.Aux = s
  7220  		v0.AddArg(p)
  7221  		v0.AddArg(mem)
  7222  		return true
  7223  	}
  7224  	// match: (ORL o0:(ORL                        x0:(MOVWload [i]   {s} p mem)     s0:(SHLLconst [16] x1:(MOVBload [i+2] {s} p mem)))     s1:(SHLLconst [24] x2:(MOVBload [i+3] {s} p mem)))
  7225  	// cond: x0.Uses == 1   && x1.Uses == 1   && x2.Uses == 1   && s0.Uses == 1   && s1.Uses == 1   && o0.Uses == 1   && mergePoint(b,x0,x1,x2) != nil   && clobber(x0)   && clobber(x1)   && clobber(x2)   && clobber(s0)   && clobber(s1)   && clobber(o0)
  7226  	// result: @mergePoint(b,x0,x1,x2) (MOVLload [i] {s} p mem)
  7227  	for {
  7228  		o0 := v.Args[0]
  7229  		if o0.Op != Op386ORL {
  7230  			break
  7231  		}
  7232  		x0 := o0.Args[0]
  7233  		if x0.Op != Op386MOVWload {
  7234  			break
  7235  		}
  7236  		i := x0.AuxInt
  7237  		s := x0.Aux
  7238  		p := x0.Args[0]
  7239  		mem := x0.Args[1]
  7240  		s0 := o0.Args[1]
  7241  		if s0.Op != Op386SHLLconst {
  7242  			break
  7243  		}
  7244  		if s0.AuxInt != 16 {
  7245  			break
  7246  		}
  7247  		x1 := s0.Args[0]
  7248  		if x1.Op != Op386MOVBload {
  7249  			break
  7250  		}
  7251  		if x1.AuxInt != i+2 {
  7252  			break
  7253  		}
  7254  		if x1.Aux != s {
  7255  			break
  7256  		}
  7257  		if p != x1.Args[0] {
  7258  			break
  7259  		}
  7260  		if mem != x1.Args[1] {
  7261  			break
  7262  		}
  7263  		s1 := v.Args[1]
  7264  		if s1.Op != Op386SHLLconst {
  7265  			break
  7266  		}
  7267  		if s1.AuxInt != 24 {
  7268  			break
  7269  		}
  7270  		x2 := s1.Args[0]
  7271  		if x2.Op != Op386MOVBload {
  7272  			break
  7273  		}
  7274  		if x2.AuxInt != i+3 {
  7275  			break
  7276  		}
  7277  		if x2.Aux != s {
  7278  			break
  7279  		}
  7280  		if p != x2.Args[0] {
  7281  			break
  7282  		}
  7283  		if mem != x2.Args[1] {
  7284  			break
  7285  		}
  7286  		if !(x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && o0.Uses == 1 && mergePoint(b, x0, x1, x2) != nil && clobber(x0) && clobber(x1) && clobber(x2) && clobber(s0) && clobber(s1) && clobber(o0)) {
  7287  			break
  7288  		}
  7289  		b = mergePoint(b, x0, x1, x2)
  7290  		v0 := b.NewValue0(v.Line, Op386MOVLload, config.fe.TypeUInt32())
  7291  		v.reset(OpCopy)
  7292  		v.AddArg(v0)
  7293  		v0.AuxInt = i
  7294  		v0.Aux = s
  7295  		v0.AddArg(p)
  7296  		v0.AddArg(mem)
  7297  		return true
  7298  	}
  7299  	// match: (ORL                  x0:(MOVBloadidx1 [i]   {s} p idx mem)     s0:(SHLLconst [8] x1:(MOVBloadidx1 [i+1] {s} p idx mem)))
  7300  	// cond: x0.Uses == 1   && x1.Uses == 1   && s0.Uses == 1   && mergePoint(b,x0,x1) != nil   && clobber(x0)   && clobber(x1)   && clobber(s0)
  7301  	// result: @mergePoint(b,x0,x1) (MOVWloadidx1 <v.Type> [i] {s} p idx mem)
  7302  	for {
  7303  		x0 := v.Args[0]
  7304  		if x0.Op != Op386MOVBloadidx1 {
  7305  			break
  7306  		}
  7307  		i := x0.AuxInt
  7308  		s := x0.Aux
  7309  		p := x0.Args[0]
  7310  		idx := x0.Args[1]
  7311  		mem := x0.Args[2]
  7312  		s0 := v.Args[1]
  7313  		if s0.Op != Op386SHLLconst {
  7314  			break
  7315  		}
  7316  		if s0.AuxInt != 8 {
  7317  			break
  7318  		}
  7319  		x1 := s0.Args[0]
  7320  		if x1.Op != Op386MOVBloadidx1 {
  7321  			break
  7322  		}
  7323  		if x1.AuxInt != i+1 {
  7324  			break
  7325  		}
  7326  		if x1.Aux != s {
  7327  			break
  7328  		}
  7329  		if p != x1.Args[0] {
  7330  			break
  7331  		}
  7332  		if idx != x1.Args[1] {
  7333  			break
  7334  		}
  7335  		if mem != x1.Args[2] {
  7336  			break
  7337  		}
  7338  		if !(x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0) && clobber(x1) && clobber(s0)) {
  7339  			break
  7340  		}
  7341  		b = mergePoint(b, x0, x1)
  7342  		v0 := b.NewValue0(v.Line, Op386MOVWloadidx1, v.Type)
  7343  		v.reset(OpCopy)
  7344  		v.AddArg(v0)
  7345  		v0.AuxInt = i
  7346  		v0.Aux = s
  7347  		v0.AddArg(p)
  7348  		v0.AddArg(idx)
  7349  		v0.AddArg(mem)
  7350  		return true
  7351  	}
  7352  	// match: (ORL o0:(ORL                        x0:(MOVWloadidx1 [i]   {s} p idx mem)     s0:(SHLLconst [16] x1:(MOVBloadidx1 [i+2] {s} p idx mem)))     s1:(SHLLconst [24] x2:(MOVBloadidx1 [i+3] {s} p idx mem)))
  7353  	// cond: x0.Uses == 1   && x1.Uses == 1   && x2.Uses == 1   && s0.Uses == 1   && s1.Uses == 1   && o0.Uses == 1   && mergePoint(b,x0,x1,x2) != nil   && clobber(x0)   && clobber(x1)   && clobber(x2)   && clobber(s0)   && clobber(s1)   && clobber(o0)
  7354  	// result: @mergePoint(b,x0,x1,x2) (MOVLloadidx1 <v.Type> [i] {s} p idx mem)
  7355  	for {
  7356  		o0 := v.Args[0]
  7357  		if o0.Op != Op386ORL {
  7358  			break
  7359  		}
  7360  		x0 := o0.Args[0]
  7361  		if x0.Op != Op386MOVWloadidx1 {
  7362  			break
  7363  		}
  7364  		i := x0.AuxInt
  7365  		s := x0.Aux
  7366  		p := x0.Args[0]
  7367  		idx := x0.Args[1]
  7368  		mem := x0.Args[2]
  7369  		s0 := o0.Args[1]
  7370  		if s0.Op != Op386SHLLconst {
  7371  			break
  7372  		}
  7373  		if s0.AuxInt != 16 {
  7374  			break
  7375  		}
  7376  		x1 := s0.Args[0]
  7377  		if x1.Op != Op386MOVBloadidx1 {
  7378  			break
  7379  		}
  7380  		if x1.AuxInt != i+2 {
  7381  			break
  7382  		}
  7383  		if x1.Aux != s {
  7384  			break
  7385  		}
  7386  		if p != x1.Args[0] {
  7387  			break
  7388  		}
  7389  		if idx != x1.Args[1] {
  7390  			break
  7391  		}
  7392  		if mem != x1.Args[2] {
  7393  			break
  7394  		}
  7395  		s1 := v.Args[1]
  7396  		if s1.Op != Op386SHLLconst {
  7397  			break
  7398  		}
  7399  		if s1.AuxInt != 24 {
  7400  			break
  7401  		}
  7402  		x2 := s1.Args[0]
  7403  		if x2.Op != Op386MOVBloadidx1 {
  7404  			break
  7405  		}
  7406  		if x2.AuxInt != i+3 {
  7407  			break
  7408  		}
  7409  		if x2.Aux != s {
  7410  			break
  7411  		}
  7412  		if p != x2.Args[0] {
  7413  			break
  7414  		}
  7415  		if idx != x2.Args[1] {
  7416  			break
  7417  		}
  7418  		if mem != x2.Args[2] {
  7419  			break
  7420  		}
  7421  		if !(x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && o0.Uses == 1 && mergePoint(b, x0, x1, x2) != nil && clobber(x0) && clobber(x1) && clobber(x2) && clobber(s0) && clobber(s1) && clobber(o0)) {
  7422  			break
  7423  		}
  7424  		b = mergePoint(b, x0, x1, x2)
  7425  		v0 := b.NewValue0(v.Line, Op386MOVLloadidx1, v.Type)
  7426  		v.reset(OpCopy)
  7427  		v.AddArg(v0)
  7428  		v0.AuxInt = i
  7429  		v0.Aux = s
  7430  		v0.AddArg(p)
  7431  		v0.AddArg(idx)
  7432  		v0.AddArg(mem)
  7433  		return true
  7434  	}
  7435  	return false
  7436  }
  7437  func rewriteValue386_Op386ORLconst(v *Value, config *Config) bool {
  7438  	b := v.Block
  7439  	_ = b
  7440  	// match: (ORLconst [c] x)
  7441  	// cond: int32(c)==0
  7442  	// result: x
  7443  	for {
  7444  		c := v.AuxInt
  7445  		x := v.Args[0]
  7446  		if !(int32(c) == 0) {
  7447  			break
  7448  		}
  7449  		v.reset(OpCopy)
  7450  		v.Type = x.Type
  7451  		v.AddArg(x)
  7452  		return true
  7453  	}
  7454  	// match: (ORLconst [c] _)
  7455  	// cond: int32(c)==-1
  7456  	// result: (MOVLconst [-1])
  7457  	for {
  7458  		c := v.AuxInt
  7459  		if !(int32(c) == -1) {
  7460  			break
  7461  		}
  7462  		v.reset(Op386MOVLconst)
  7463  		v.AuxInt = -1
  7464  		return true
  7465  	}
  7466  	// match: (ORLconst [c] (MOVLconst [d]))
  7467  	// cond:
  7468  	// result: (MOVLconst [c|d])
  7469  	for {
  7470  		c := v.AuxInt
  7471  		v_0 := v.Args[0]
  7472  		if v_0.Op != Op386MOVLconst {
  7473  			break
  7474  		}
  7475  		d := v_0.AuxInt
  7476  		v.reset(Op386MOVLconst)
  7477  		v.AuxInt = c | d
  7478  		return true
  7479  	}
  7480  	return false
  7481  }
  7482  func rewriteValue386_Op386ROLBconst(v *Value, config *Config) bool {
  7483  	b := v.Block
  7484  	_ = b
  7485  	// match: (ROLBconst [c] (ROLBconst [d] x))
  7486  	// cond:
  7487  	// result: (ROLBconst [(c+d)& 7] x)
  7488  	for {
  7489  		c := v.AuxInt
  7490  		v_0 := v.Args[0]
  7491  		if v_0.Op != Op386ROLBconst {
  7492  			break
  7493  		}
  7494  		d := v_0.AuxInt
  7495  		x := v_0.Args[0]
  7496  		v.reset(Op386ROLBconst)
  7497  		v.AuxInt = (c + d) & 7
  7498  		v.AddArg(x)
  7499  		return true
  7500  	}
  7501  	// match: (ROLBconst [0] x)
  7502  	// cond:
  7503  	// result: x
  7504  	for {
  7505  		if v.AuxInt != 0 {
  7506  			break
  7507  		}
  7508  		x := v.Args[0]
  7509  		v.reset(OpCopy)
  7510  		v.Type = x.Type
  7511  		v.AddArg(x)
  7512  		return true
  7513  	}
  7514  	return false
  7515  }
  7516  func rewriteValue386_Op386ROLLconst(v *Value, config *Config) bool {
  7517  	b := v.Block
  7518  	_ = b
  7519  	// match: (ROLLconst [c] (ROLLconst [d] x))
  7520  	// cond:
  7521  	// result: (ROLLconst [(c+d)&31] x)
  7522  	for {
  7523  		c := v.AuxInt
  7524  		v_0 := v.Args[0]
  7525  		if v_0.Op != Op386ROLLconst {
  7526  			break
  7527  		}
  7528  		d := v_0.AuxInt
  7529  		x := v_0.Args[0]
  7530  		v.reset(Op386ROLLconst)
  7531  		v.AuxInt = (c + d) & 31
  7532  		v.AddArg(x)
  7533  		return true
  7534  	}
  7535  	// match: (ROLLconst [0] x)
  7536  	// cond:
  7537  	// result: x
  7538  	for {
  7539  		if v.AuxInt != 0 {
  7540  			break
  7541  		}
  7542  		x := v.Args[0]
  7543  		v.reset(OpCopy)
  7544  		v.Type = x.Type
  7545  		v.AddArg(x)
  7546  		return true
  7547  	}
  7548  	return false
  7549  }
  7550  func rewriteValue386_Op386ROLWconst(v *Value, config *Config) bool {
  7551  	b := v.Block
  7552  	_ = b
  7553  	// match: (ROLWconst [c] (ROLWconst [d] x))
  7554  	// cond:
  7555  	// result: (ROLWconst [(c+d)&15] x)
  7556  	for {
  7557  		c := v.AuxInt
  7558  		v_0 := v.Args[0]
  7559  		if v_0.Op != Op386ROLWconst {
  7560  			break
  7561  		}
  7562  		d := v_0.AuxInt
  7563  		x := v_0.Args[0]
  7564  		v.reset(Op386ROLWconst)
  7565  		v.AuxInt = (c + d) & 15
  7566  		v.AddArg(x)
  7567  		return true
  7568  	}
  7569  	// match: (ROLWconst [0] x)
  7570  	// cond:
  7571  	// result: x
  7572  	for {
  7573  		if v.AuxInt != 0 {
  7574  			break
  7575  		}
  7576  		x := v.Args[0]
  7577  		v.reset(OpCopy)
  7578  		v.Type = x.Type
  7579  		v.AddArg(x)
  7580  		return true
  7581  	}
  7582  	return false
  7583  }
  7584  func rewriteValue386_Op386SARB(v *Value, config *Config) bool {
  7585  	b := v.Block
  7586  	_ = b
  7587  	// match: (SARB x (MOVLconst [c]))
  7588  	// cond:
  7589  	// result: (SARBconst [c&31] x)
  7590  	for {
  7591  		x := v.Args[0]
  7592  		v_1 := v.Args[1]
  7593  		if v_1.Op != Op386MOVLconst {
  7594  			break
  7595  		}
  7596  		c := v_1.AuxInt
  7597  		v.reset(Op386SARBconst)
  7598  		v.AuxInt = c & 31
  7599  		v.AddArg(x)
  7600  		return true
  7601  	}
  7602  	// match: (SARB x (MOVLconst [c]))
  7603  	// cond:
  7604  	// result: (SARBconst [c&31] x)
  7605  	for {
  7606  		x := v.Args[0]
  7607  		v_1 := v.Args[1]
  7608  		if v_1.Op != Op386MOVLconst {
  7609  			break
  7610  		}
  7611  		c := v_1.AuxInt
  7612  		v.reset(Op386SARBconst)
  7613  		v.AuxInt = c & 31
  7614  		v.AddArg(x)
  7615  		return true
  7616  	}
  7617  	return false
  7618  }
  7619  func rewriteValue386_Op386SARBconst(v *Value, config *Config) bool {
  7620  	b := v.Block
  7621  	_ = b
  7622  	// match: (SARBconst [c] (MOVLconst [d]))
  7623  	// cond:
  7624  	// result: (MOVLconst [d>>uint64(c)])
  7625  	for {
  7626  		c := v.AuxInt
  7627  		v_0 := v.Args[0]
  7628  		if v_0.Op != Op386MOVLconst {
  7629  			break
  7630  		}
  7631  		d := v_0.AuxInt
  7632  		v.reset(Op386MOVLconst)
  7633  		v.AuxInt = d >> uint64(c)
  7634  		return true
  7635  	}
  7636  	return false
  7637  }
  7638  func rewriteValue386_Op386SARL(v *Value, config *Config) bool {
  7639  	b := v.Block
  7640  	_ = b
  7641  	// match: (SARL x (MOVLconst [c]))
  7642  	// cond:
  7643  	// result: (SARLconst [c&31] x)
  7644  	for {
  7645  		x := v.Args[0]
  7646  		v_1 := v.Args[1]
  7647  		if v_1.Op != Op386MOVLconst {
  7648  			break
  7649  		}
  7650  		c := v_1.AuxInt
  7651  		v.reset(Op386SARLconst)
  7652  		v.AuxInt = c & 31
  7653  		v.AddArg(x)
  7654  		return true
  7655  	}
  7656  	// match: (SARL x (MOVLconst [c]))
  7657  	// cond:
  7658  	// result: (SARLconst [c&31] x)
  7659  	for {
  7660  		x := v.Args[0]
  7661  		v_1 := v.Args[1]
  7662  		if v_1.Op != Op386MOVLconst {
  7663  			break
  7664  		}
  7665  		c := v_1.AuxInt
  7666  		v.reset(Op386SARLconst)
  7667  		v.AuxInt = c & 31
  7668  		v.AddArg(x)
  7669  		return true
  7670  	}
  7671  	// match: (SARL x (ANDLconst [31] y))
  7672  	// cond:
  7673  	// result: (SARL x y)
  7674  	for {
  7675  		x := v.Args[0]
  7676  		v_1 := v.Args[1]
  7677  		if v_1.Op != Op386ANDLconst {
  7678  			break
  7679  		}
  7680  		if v_1.AuxInt != 31 {
  7681  			break
  7682  		}
  7683  		y := v_1.Args[0]
  7684  		v.reset(Op386SARL)
  7685  		v.AddArg(x)
  7686  		v.AddArg(y)
  7687  		return true
  7688  	}
  7689  	return false
  7690  }
  7691  func rewriteValue386_Op386SARLconst(v *Value, config *Config) bool {
  7692  	b := v.Block
  7693  	_ = b
  7694  	// match: (SARLconst [c] (MOVLconst [d]))
  7695  	// cond:
  7696  	// result: (MOVLconst [d>>uint64(c)])
  7697  	for {
  7698  		c := v.AuxInt
  7699  		v_0 := v.Args[0]
  7700  		if v_0.Op != Op386MOVLconst {
  7701  			break
  7702  		}
  7703  		d := v_0.AuxInt
  7704  		v.reset(Op386MOVLconst)
  7705  		v.AuxInt = d >> uint64(c)
  7706  		return true
  7707  	}
  7708  	return false
  7709  }
  7710  func rewriteValue386_Op386SARW(v *Value, config *Config) bool {
  7711  	b := v.Block
  7712  	_ = b
  7713  	// match: (SARW x (MOVLconst [c]))
  7714  	// cond:
  7715  	// result: (SARWconst [c&31] x)
  7716  	for {
  7717  		x := v.Args[0]
  7718  		v_1 := v.Args[1]
  7719  		if v_1.Op != Op386MOVLconst {
  7720  			break
  7721  		}
  7722  		c := v_1.AuxInt
  7723  		v.reset(Op386SARWconst)
  7724  		v.AuxInt = c & 31
  7725  		v.AddArg(x)
  7726  		return true
  7727  	}
  7728  	// match: (SARW x (MOVLconst [c]))
  7729  	// cond:
  7730  	// result: (SARWconst [c&31] x)
  7731  	for {
  7732  		x := v.Args[0]
  7733  		v_1 := v.Args[1]
  7734  		if v_1.Op != Op386MOVLconst {
  7735  			break
  7736  		}
  7737  		c := v_1.AuxInt
  7738  		v.reset(Op386SARWconst)
  7739  		v.AuxInt = c & 31
  7740  		v.AddArg(x)
  7741  		return true
  7742  	}
  7743  	return false
  7744  }
  7745  func rewriteValue386_Op386SARWconst(v *Value, config *Config) bool {
  7746  	b := v.Block
  7747  	_ = b
  7748  	// match: (SARWconst [c] (MOVLconst [d]))
  7749  	// cond:
  7750  	// result: (MOVLconst [d>>uint64(c)])
  7751  	for {
  7752  		c := v.AuxInt
  7753  		v_0 := v.Args[0]
  7754  		if v_0.Op != Op386MOVLconst {
  7755  			break
  7756  		}
  7757  		d := v_0.AuxInt
  7758  		v.reset(Op386MOVLconst)
  7759  		v.AuxInt = d >> uint64(c)
  7760  		return true
  7761  	}
  7762  	return false
  7763  }
  7764  func rewriteValue386_Op386SBBL(v *Value, config *Config) bool {
  7765  	b := v.Block
  7766  	_ = b
  7767  	// match: (SBBL x (MOVLconst [c]) f)
  7768  	// cond:
  7769  	// result: (SBBLconst [c] x f)
  7770  	for {
  7771  		x := v.Args[0]
  7772  		v_1 := v.Args[1]
  7773  		if v_1.Op != Op386MOVLconst {
  7774  			break
  7775  		}
  7776  		c := v_1.AuxInt
  7777  		f := v.Args[2]
  7778  		v.reset(Op386SBBLconst)
  7779  		v.AuxInt = c
  7780  		v.AddArg(x)
  7781  		v.AddArg(f)
  7782  		return true
  7783  	}
  7784  	return false
  7785  }
  7786  func rewriteValue386_Op386SBBLcarrymask(v *Value, config *Config) bool {
  7787  	b := v.Block
  7788  	_ = b
  7789  	// match: (SBBLcarrymask (FlagEQ))
  7790  	// cond:
  7791  	// result: (MOVLconst [0])
  7792  	for {
  7793  		v_0 := v.Args[0]
  7794  		if v_0.Op != Op386FlagEQ {
  7795  			break
  7796  		}
  7797  		v.reset(Op386MOVLconst)
  7798  		v.AuxInt = 0
  7799  		return true
  7800  	}
  7801  	// match: (SBBLcarrymask (FlagLT_ULT))
  7802  	// cond:
  7803  	// result: (MOVLconst [-1])
  7804  	for {
  7805  		v_0 := v.Args[0]
  7806  		if v_0.Op != Op386FlagLT_ULT {
  7807  			break
  7808  		}
  7809  		v.reset(Op386MOVLconst)
  7810  		v.AuxInt = -1
  7811  		return true
  7812  	}
  7813  	// match: (SBBLcarrymask (FlagLT_UGT))
  7814  	// cond:
  7815  	// result: (MOVLconst [0])
  7816  	for {
  7817  		v_0 := v.Args[0]
  7818  		if v_0.Op != Op386FlagLT_UGT {
  7819  			break
  7820  		}
  7821  		v.reset(Op386MOVLconst)
  7822  		v.AuxInt = 0
  7823  		return true
  7824  	}
  7825  	// match: (SBBLcarrymask (FlagGT_ULT))
  7826  	// cond:
  7827  	// result: (MOVLconst [-1])
  7828  	for {
  7829  		v_0 := v.Args[0]
  7830  		if v_0.Op != Op386FlagGT_ULT {
  7831  			break
  7832  		}
  7833  		v.reset(Op386MOVLconst)
  7834  		v.AuxInt = -1
  7835  		return true
  7836  	}
  7837  	// match: (SBBLcarrymask (FlagGT_UGT))
  7838  	// cond:
  7839  	// result: (MOVLconst [0])
  7840  	for {
  7841  		v_0 := v.Args[0]
  7842  		if v_0.Op != Op386FlagGT_UGT {
  7843  			break
  7844  		}
  7845  		v.reset(Op386MOVLconst)
  7846  		v.AuxInt = 0
  7847  		return true
  7848  	}
  7849  	return false
  7850  }
  7851  func rewriteValue386_Op386SETA(v *Value, config *Config) bool {
  7852  	b := v.Block
  7853  	_ = b
  7854  	// match: (SETA (InvertFlags x))
  7855  	// cond:
  7856  	// result: (SETB x)
  7857  	for {
  7858  		v_0 := v.Args[0]
  7859  		if v_0.Op != Op386InvertFlags {
  7860  			break
  7861  		}
  7862  		x := v_0.Args[0]
  7863  		v.reset(Op386SETB)
  7864  		v.AddArg(x)
  7865  		return true
  7866  	}
  7867  	// match: (SETA (FlagEQ))
  7868  	// cond:
  7869  	// result: (MOVLconst [0])
  7870  	for {
  7871  		v_0 := v.Args[0]
  7872  		if v_0.Op != Op386FlagEQ {
  7873  			break
  7874  		}
  7875  		v.reset(Op386MOVLconst)
  7876  		v.AuxInt = 0
  7877  		return true
  7878  	}
  7879  	// match: (SETA (FlagLT_ULT))
  7880  	// cond:
  7881  	// result: (MOVLconst [0])
  7882  	for {
  7883  		v_0 := v.Args[0]
  7884  		if v_0.Op != Op386FlagLT_ULT {
  7885  			break
  7886  		}
  7887  		v.reset(Op386MOVLconst)
  7888  		v.AuxInt = 0
  7889  		return true
  7890  	}
  7891  	// match: (SETA (FlagLT_UGT))
  7892  	// cond:
  7893  	// result: (MOVLconst [1])
  7894  	for {
  7895  		v_0 := v.Args[0]
  7896  		if v_0.Op != Op386FlagLT_UGT {
  7897  			break
  7898  		}
  7899  		v.reset(Op386MOVLconst)
  7900  		v.AuxInt = 1
  7901  		return true
  7902  	}
  7903  	// match: (SETA (FlagGT_ULT))
  7904  	// cond:
  7905  	// result: (MOVLconst [0])
  7906  	for {
  7907  		v_0 := v.Args[0]
  7908  		if v_0.Op != Op386FlagGT_ULT {
  7909  			break
  7910  		}
  7911  		v.reset(Op386MOVLconst)
  7912  		v.AuxInt = 0
  7913  		return true
  7914  	}
  7915  	// match: (SETA (FlagGT_UGT))
  7916  	// cond:
  7917  	// result: (MOVLconst [1])
  7918  	for {
  7919  		v_0 := v.Args[0]
  7920  		if v_0.Op != Op386FlagGT_UGT {
  7921  			break
  7922  		}
  7923  		v.reset(Op386MOVLconst)
  7924  		v.AuxInt = 1
  7925  		return true
  7926  	}
  7927  	return false
  7928  }
  7929  func rewriteValue386_Op386SETAE(v *Value, config *Config) bool {
  7930  	b := v.Block
  7931  	_ = b
  7932  	// match: (SETAE (InvertFlags x))
  7933  	// cond:
  7934  	// result: (SETBE x)
  7935  	for {
  7936  		v_0 := v.Args[0]
  7937  		if v_0.Op != Op386InvertFlags {
  7938  			break
  7939  		}
  7940  		x := v_0.Args[0]
  7941  		v.reset(Op386SETBE)
  7942  		v.AddArg(x)
  7943  		return true
  7944  	}
  7945  	// match: (SETAE (FlagEQ))
  7946  	// cond:
  7947  	// result: (MOVLconst [1])
  7948  	for {
  7949  		v_0 := v.Args[0]
  7950  		if v_0.Op != Op386FlagEQ {
  7951  			break
  7952  		}
  7953  		v.reset(Op386MOVLconst)
  7954  		v.AuxInt = 1
  7955  		return true
  7956  	}
  7957  	// match: (SETAE (FlagLT_ULT))
  7958  	// cond:
  7959  	// result: (MOVLconst [0])
  7960  	for {
  7961  		v_0 := v.Args[0]
  7962  		if v_0.Op != Op386FlagLT_ULT {
  7963  			break
  7964  		}
  7965  		v.reset(Op386MOVLconst)
  7966  		v.AuxInt = 0
  7967  		return true
  7968  	}
  7969  	// match: (SETAE (FlagLT_UGT))
  7970  	// cond:
  7971  	// result: (MOVLconst [1])
  7972  	for {
  7973  		v_0 := v.Args[0]
  7974  		if v_0.Op != Op386FlagLT_UGT {
  7975  			break
  7976  		}
  7977  		v.reset(Op386MOVLconst)
  7978  		v.AuxInt = 1
  7979  		return true
  7980  	}
  7981  	// match: (SETAE (FlagGT_ULT))
  7982  	// cond:
  7983  	// result: (MOVLconst [0])
  7984  	for {
  7985  		v_0 := v.Args[0]
  7986  		if v_0.Op != Op386FlagGT_ULT {
  7987  			break
  7988  		}
  7989  		v.reset(Op386MOVLconst)
  7990  		v.AuxInt = 0
  7991  		return true
  7992  	}
  7993  	// match: (SETAE (FlagGT_UGT))
  7994  	// cond:
  7995  	// result: (MOVLconst [1])
  7996  	for {
  7997  		v_0 := v.Args[0]
  7998  		if v_0.Op != Op386FlagGT_UGT {
  7999  			break
  8000  		}
  8001  		v.reset(Op386MOVLconst)
  8002  		v.AuxInt = 1
  8003  		return true
  8004  	}
  8005  	return false
  8006  }
  8007  func rewriteValue386_Op386SETB(v *Value, config *Config) bool {
  8008  	b := v.Block
  8009  	_ = b
  8010  	// match: (SETB (InvertFlags x))
  8011  	// cond:
  8012  	// result: (SETA x)
  8013  	for {
  8014  		v_0 := v.Args[0]
  8015  		if v_0.Op != Op386InvertFlags {
  8016  			break
  8017  		}
  8018  		x := v_0.Args[0]
  8019  		v.reset(Op386SETA)
  8020  		v.AddArg(x)
  8021  		return true
  8022  	}
  8023  	// match: (SETB (FlagEQ))
  8024  	// cond:
  8025  	// result: (MOVLconst [0])
  8026  	for {
  8027  		v_0 := v.Args[0]
  8028  		if v_0.Op != Op386FlagEQ {
  8029  			break
  8030  		}
  8031  		v.reset(Op386MOVLconst)
  8032  		v.AuxInt = 0
  8033  		return true
  8034  	}
  8035  	// match: (SETB (FlagLT_ULT))
  8036  	// cond:
  8037  	// result: (MOVLconst [1])
  8038  	for {
  8039  		v_0 := v.Args[0]
  8040  		if v_0.Op != Op386FlagLT_ULT {
  8041  			break
  8042  		}
  8043  		v.reset(Op386MOVLconst)
  8044  		v.AuxInt = 1
  8045  		return true
  8046  	}
  8047  	// match: (SETB (FlagLT_UGT))
  8048  	// cond:
  8049  	// result: (MOVLconst [0])
  8050  	for {
  8051  		v_0 := v.Args[0]
  8052  		if v_0.Op != Op386FlagLT_UGT {
  8053  			break
  8054  		}
  8055  		v.reset(Op386MOVLconst)
  8056  		v.AuxInt = 0
  8057  		return true
  8058  	}
  8059  	// match: (SETB (FlagGT_ULT))
  8060  	// cond:
  8061  	// result: (MOVLconst [1])
  8062  	for {
  8063  		v_0 := v.Args[0]
  8064  		if v_0.Op != Op386FlagGT_ULT {
  8065  			break
  8066  		}
  8067  		v.reset(Op386MOVLconst)
  8068  		v.AuxInt = 1
  8069  		return true
  8070  	}
  8071  	// match: (SETB (FlagGT_UGT))
  8072  	// cond:
  8073  	// result: (MOVLconst [0])
  8074  	for {
  8075  		v_0 := v.Args[0]
  8076  		if v_0.Op != Op386FlagGT_UGT {
  8077  			break
  8078  		}
  8079  		v.reset(Op386MOVLconst)
  8080  		v.AuxInt = 0
  8081  		return true
  8082  	}
  8083  	return false
  8084  }
  8085  func rewriteValue386_Op386SETBE(v *Value, config *Config) bool {
  8086  	b := v.Block
  8087  	_ = b
  8088  	// match: (SETBE (InvertFlags x))
  8089  	// cond:
  8090  	// result: (SETAE x)
  8091  	for {
  8092  		v_0 := v.Args[0]
  8093  		if v_0.Op != Op386InvertFlags {
  8094  			break
  8095  		}
  8096  		x := v_0.Args[0]
  8097  		v.reset(Op386SETAE)
  8098  		v.AddArg(x)
  8099  		return true
  8100  	}
  8101  	// match: (SETBE (FlagEQ))
  8102  	// cond:
  8103  	// result: (MOVLconst [1])
  8104  	for {
  8105  		v_0 := v.Args[0]
  8106  		if v_0.Op != Op386FlagEQ {
  8107  			break
  8108  		}
  8109  		v.reset(Op386MOVLconst)
  8110  		v.AuxInt = 1
  8111  		return true
  8112  	}
  8113  	// match: (SETBE (FlagLT_ULT))
  8114  	// cond:
  8115  	// result: (MOVLconst [1])
  8116  	for {
  8117  		v_0 := v.Args[0]
  8118  		if v_0.Op != Op386FlagLT_ULT {
  8119  			break
  8120  		}
  8121  		v.reset(Op386MOVLconst)
  8122  		v.AuxInt = 1
  8123  		return true
  8124  	}
  8125  	// match: (SETBE (FlagLT_UGT))
  8126  	// cond:
  8127  	// result: (MOVLconst [0])
  8128  	for {
  8129  		v_0 := v.Args[0]
  8130  		if v_0.Op != Op386FlagLT_UGT {
  8131  			break
  8132  		}
  8133  		v.reset(Op386MOVLconst)
  8134  		v.AuxInt = 0
  8135  		return true
  8136  	}
  8137  	// match: (SETBE (FlagGT_ULT))
  8138  	// cond:
  8139  	// result: (MOVLconst [1])
  8140  	for {
  8141  		v_0 := v.Args[0]
  8142  		if v_0.Op != Op386FlagGT_ULT {
  8143  			break
  8144  		}
  8145  		v.reset(Op386MOVLconst)
  8146  		v.AuxInt = 1
  8147  		return true
  8148  	}
  8149  	// match: (SETBE (FlagGT_UGT))
  8150  	// cond:
  8151  	// result: (MOVLconst [0])
  8152  	for {
  8153  		v_0 := v.Args[0]
  8154  		if v_0.Op != Op386FlagGT_UGT {
  8155  			break
  8156  		}
  8157  		v.reset(Op386MOVLconst)
  8158  		v.AuxInt = 0
  8159  		return true
  8160  	}
  8161  	return false
  8162  }
  8163  func rewriteValue386_Op386SETEQ(v *Value, config *Config) bool {
  8164  	b := v.Block
  8165  	_ = b
  8166  	// match: (SETEQ (InvertFlags x))
  8167  	// cond:
  8168  	// result: (SETEQ x)
  8169  	for {
  8170  		v_0 := v.Args[0]
  8171  		if v_0.Op != Op386InvertFlags {
  8172  			break
  8173  		}
  8174  		x := v_0.Args[0]
  8175  		v.reset(Op386SETEQ)
  8176  		v.AddArg(x)
  8177  		return true
  8178  	}
  8179  	// match: (SETEQ (FlagEQ))
  8180  	// cond:
  8181  	// result: (MOVLconst [1])
  8182  	for {
  8183  		v_0 := v.Args[0]
  8184  		if v_0.Op != Op386FlagEQ {
  8185  			break
  8186  		}
  8187  		v.reset(Op386MOVLconst)
  8188  		v.AuxInt = 1
  8189  		return true
  8190  	}
  8191  	// match: (SETEQ (FlagLT_ULT))
  8192  	// cond:
  8193  	// result: (MOVLconst [0])
  8194  	for {
  8195  		v_0 := v.Args[0]
  8196  		if v_0.Op != Op386FlagLT_ULT {
  8197  			break
  8198  		}
  8199  		v.reset(Op386MOVLconst)
  8200  		v.AuxInt = 0
  8201  		return true
  8202  	}
  8203  	// match: (SETEQ (FlagLT_UGT))
  8204  	// cond:
  8205  	// result: (MOVLconst [0])
  8206  	for {
  8207  		v_0 := v.Args[0]
  8208  		if v_0.Op != Op386FlagLT_UGT {
  8209  			break
  8210  		}
  8211  		v.reset(Op386MOVLconst)
  8212  		v.AuxInt = 0
  8213  		return true
  8214  	}
  8215  	// match: (SETEQ (FlagGT_ULT))
  8216  	// cond:
  8217  	// result: (MOVLconst [0])
  8218  	for {
  8219  		v_0 := v.Args[0]
  8220  		if v_0.Op != Op386FlagGT_ULT {
  8221  			break
  8222  		}
  8223  		v.reset(Op386MOVLconst)
  8224  		v.AuxInt = 0
  8225  		return true
  8226  	}
  8227  	// match: (SETEQ (FlagGT_UGT))
  8228  	// cond:
  8229  	// result: (MOVLconst [0])
  8230  	for {
  8231  		v_0 := v.Args[0]
  8232  		if v_0.Op != Op386FlagGT_UGT {
  8233  			break
  8234  		}
  8235  		v.reset(Op386MOVLconst)
  8236  		v.AuxInt = 0
  8237  		return true
  8238  	}
  8239  	return false
  8240  }
  8241  func rewriteValue386_Op386SETG(v *Value, config *Config) bool {
  8242  	b := v.Block
  8243  	_ = b
  8244  	// match: (SETG (InvertFlags x))
  8245  	// cond:
  8246  	// result: (SETL x)
  8247  	for {
  8248  		v_0 := v.Args[0]
  8249  		if v_0.Op != Op386InvertFlags {
  8250  			break
  8251  		}
  8252  		x := v_0.Args[0]
  8253  		v.reset(Op386SETL)
  8254  		v.AddArg(x)
  8255  		return true
  8256  	}
  8257  	// match: (SETG (FlagEQ))
  8258  	// cond:
  8259  	// result: (MOVLconst [0])
  8260  	for {
  8261  		v_0 := v.Args[0]
  8262  		if v_0.Op != Op386FlagEQ {
  8263  			break
  8264  		}
  8265  		v.reset(Op386MOVLconst)
  8266  		v.AuxInt = 0
  8267  		return true
  8268  	}
  8269  	// match: (SETG (FlagLT_ULT))
  8270  	// cond:
  8271  	// result: (MOVLconst [0])
  8272  	for {
  8273  		v_0 := v.Args[0]
  8274  		if v_0.Op != Op386FlagLT_ULT {
  8275  			break
  8276  		}
  8277  		v.reset(Op386MOVLconst)
  8278  		v.AuxInt = 0
  8279  		return true
  8280  	}
  8281  	// match: (SETG (FlagLT_UGT))
  8282  	// cond:
  8283  	// result: (MOVLconst [0])
  8284  	for {
  8285  		v_0 := v.Args[0]
  8286  		if v_0.Op != Op386FlagLT_UGT {
  8287  			break
  8288  		}
  8289  		v.reset(Op386MOVLconst)
  8290  		v.AuxInt = 0
  8291  		return true
  8292  	}
  8293  	// match: (SETG (FlagGT_ULT))
  8294  	// cond:
  8295  	// result: (MOVLconst [1])
  8296  	for {
  8297  		v_0 := v.Args[0]
  8298  		if v_0.Op != Op386FlagGT_ULT {
  8299  			break
  8300  		}
  8301  		v.reset(Op386MOVLconst)
  8302  		v.AuxInt = 1
  8303  		return true
  8304  	}
  8305  	// match: (SETG (FlagGT_UGT))
  8306  	// cond:
  8307  	// result: (MOVLconst [1])
  8308  	for {
  8309  		v_0 := v.Args[0]
  8310  		if v_0.Op != Op386FlagGT_UGT {
  8311  			break
  8312  		}
  8313  		v.reset(Op386MOVLconst)
  8314  		v.AuxInt = 1
  8315  		return true
  8316  	}
  8317  	return false
  8318  }
  8319  func rewriteValue386_Op386SETGE(v *Value, config *Config) bool {
  8320  	b := v.Block
  8321  	_ = b
  8322  	// match: (SETGE (InvertFlags x))
  8323  	// cond:
  8324  	// result: (SETLE x)
  8325  	for {
  8326  		v_0 := v.Args[0]
  8327  		if v_0.Op != Op386InvertFlags {
  8328  			break
  8329  		}
  8330  		x := v_0.Args[0]
  8331  		v.reset(Op386SETLE)
  8332  		v.AddArg(x)
  8333  		return true
  8334  	}
  8335  	// match: (SETGE (FlagEQ))
  8336  	// cond:
  8337  	// result: (MOVLconst [1])
  8338  	for {
  8339  		v_0 := v.Args[0]
  8340  		if v_0.Op != Op386FlagEQ {
  8341  			break
  8342  		}
  8343  		v.reset(Op386MOVLconst)
  8344  		v.AuxInt = 1
  8345  		return true
  8346  	}
  8347  	// match: (SETGE (FlagLT_ULT))
  8348  	// cond:
  8349  	// result: (MOVLconst [0])
  8350  	for {
  8351  		v_0 := v.Args[0]
  8352  		if v_0.Op != Op386FlagLT_ULT {
  8353  			break
  8354  		}
  8355  		v.reset(Op386MOVLconst)
  8356  		v.AuxInt = 0
  8357  		return true
  8358  	}
  8359  	// match: (SETGE (FlagLT_UGT))
  8360  	// cond:
  8361  	// result: (MOVLconst [0])
  8362  	for {
  8363  		v_0 := v.Args[0]
  8364  		if v_0.Op != Op386FlagLT_UGT {
  8365  			break
  8366  		}
  8367  		v.reset(Op386MOVLconst)
  8368  		v.AuxInt = 0
  8369  		return true
  8370  	}
  8371  	// match: (SETGE (FlagGT_ULT))
  8372  	// cond:
  8373  	// result: (MOVLconst [1])
  8374  	for {
  8375  		v_0 := v.Args[0]
  8376  		if v_0.Op != Op386FlagGT_ULT {
  8377  			break
  8378  		}
  8379  		v.reset(Op386MOVLconst)
  8380  		v.AuxInt = 1
  8381  		return true
  8382  	}
  8383  	// match: (SETGE (FlagGT_UGT))
  8384  	// cond:
  8385  	// result: (MOVLconst [1])
  8386  	for {
  8387  		v_0 := v.Args[0]
  8388  		if v_0.Op != Op386FlagGT_UGT {
  8389  			break
  8390  		}
  8391  		v.reset(Op386MOVLconst)
  8392  		v.AuxInt = 1
  8393  		return true
  8394  	}
  8395  	return false
  8396  }
  8397  func rewriteValue386_Op386SETL(v *Value, config *Config) bool {
  8398  	b := v.Block
  8399  	_ = b
  8400  	// match: (SETL (InvertFlags x))
  8401  	// cond:
  8402  	// result: (SETG x)
  8403  	for {
  8404  		v_0 := v.Args[0]
  8405  		if v_0.Op != Op386InvertFlags {
  8406  			break
  8407  		}
  8408  		x := v_0.Args[0]
  8409  		v.reset(Op386SETG)
  8410  		v.AddArg(x)
  8411  		return true
  8412  	}
  8413  	// match: (SETL (FlagEQ))
  8414  	// cond:
  8415  	// result: (MOVLconst [0])
  8416  	for {
  8417  		v_0 := v.Args[0]
  8418  		if v_0.Op != Op386FlagEQ {
  8419  			break
  8420  		}
  8421  		v.reset(Op386MOVLconst)
  8422  		v.AuxInt = 0
  8423  		return true
  8424  	}
  8425  	// match: (SETL (FlagLT_ULT))
  8426  	// cond:
  8427  	// result: (MOVLconst [1])
  8428  	for {
  8429  		v_0 := v.Args[0]
  8430  		if v_0.Op != Op386FlagLT_ULT {
  8431  			break
  8432  		}
  8433  		v.reset(Op386MOVLconst)
  8434  		v.AuxInt = 1
  8435  		return true
  8436  	}
  8437  	// match: (SETL (FlagLT_UGT))
  8438  	// cond:
  8439  	// result: (MOVLconst [1])
  8440  	for {
  8441  		v_0 := v.Args[0]
  8442  		if v_0.Op != Op386FlagLT_UGT {
  8443  			break
  8444  		}
  8445  		v.reset(Op386MOVLconst)
  8446  		v.AuxInt = 1
  8447  		return true
  8448  	}
  8449  	// match: (SETL (FlagGT_ULT))
  8450  	// cond:
  8451  	// result: (MOVLconst [0])
  8452  	for {
  8453  		v_0 := v.Args[0]
  8454  		if v_0.Op != Op386FlagGT_ULT {
  8455  			break
  8456  		}
  8457  		v.reset(Op386MOVLconst)
  8458  		v.AuxInt = 0
  8459  		return true
  8460  	}
  8461  	// match: (SETL (FlagGT_UGT))
  8462  	// cond:
  8463  	// result: (MOVLconst [0])
  8464  	for {
  8465  		v_0 := v.Args[0]
  8466  		if v_0.Op != Op386FlagGT_UGT {
  8467  			break
  8468  		}
  8469  		v.reset(Op386MOVLconst)
  8470  		v.AuxInt = 0
  8471  		return true
  8472  	}
  8473  	return false
  8474  }
  8475  func rewriteValue386_Op386SETLE(v *Value, config *Config) bool {
  8476  	b := v.Block
  8477  	_ = b
  8478  	// match: (SETLE (InvertFlags x))
  8479  	// cond:
  8480  	// result: (SETGE x)
  8481  	for {
  8482  		v_0 := v.Args[0]
  8483  		if v_0.Op != Op386InvertFlags {
  8484  			break
  8485  		}
  8486  		x := v_0.Args[0]
  8487  		v.reset(Op386SETGE)
  8488  		v.AddArg(x)
  8489  		return true
  8490  	}
  8491  	// match: (SETLE (FlagEQ))
  8492  	// cond:
  8493  	// result: (MOVLconst [1])
  8494  	for {
  8495  		v_0 := v.Args[0]
  8496  		if v_0.Op != Op386FlagEQ {
  8497  			break
  8498  		}
  8499  		v.reset(Op386MOVLconst)
  8500  		v.AuxInt = 1
  8501  		return true
  8502  	}
  8503  	// match: (SETLE (FlagLT_ULT))
  8504  	// cond:
  8505  	// result: (MOVLconst [1])
  8506  	for {
  8507  		v_0 := v.Args[0]
  8508  		if v_0.Op != Op386FlagLT_ULT {
  8509  			break
  8510  		}
  8511  		v.reset(Op386MOVLconst)
  8512  		v.AuxInt = 1
  8513  		return true
  8514  	}
  8515  	// match: (SETLE (FlagLT_UGT))
  8516  	// cond:
  8517  	// result: (MOVLconst [1])
  8518  	for {
  8519  		v_0 := v.Args[0]
  8520  		if v_0.Op != Op386FlagLT_UGT {
  8521  			break
  8522  		}
  8523  		v.reset(Op386MOVLconst)
  8524  		v.AuxInt = 1
  8525  		return true
  8526  	}
  8527  	// match: (SETLE (FlagGT_ULT))
  8528  	// cond:
  8529  	// result: (MOVLconst [0])
  8530  	for {
  8531  		v_0 := v.Args[0]
  8532  		if v_0.Op != Op386FlagGT_ULT {
  8533  			break
  8534  		}
  8535  		v.reset(Op386MOVLconst)
  8536  		v.AuxInt = 0
  8537  		return true
  8538  	}
  8539  	// match: (SETLE (FlagGT_UGT))
  8540  	// cond:
  8541  	// result: (MOVLconst [0])
  8542  	for {
  8543  		v_0 := v.Args[0]
  8544  		if v_0.Op != Op386FlagGT_UGT {
  8545  			break
  8546  		}
  8547  		v.reset(Op386MOVLconst)
  8548  		v.AuxInt = 0
  8549  		return true
  8550  	}
  8551  	return false
  8552  }
  8553  func rewriteValue386_Op386SETNE(v *Value, config *Config) bool {
  8554  	b := v.Block
  8555  	_ = b
  8556  	// match: (SETNE (InvertFlags x))
  8557  	// cond:
  8558  	// result: (SETNE x)
  8559  	for {
  8560  		v_0 := v.Args[0]
  8561  		if v_0.Op != Op386InvertFlags {
  8562  			break
  8563  		}
  8564  		x := v_0.Args[0]
  8565  		v.reset(Op386SETNE)
  8566  		v.AddArg(x)
  8567  		return true
  8568  	}
  8569  	// match: (SETNE (FlagEQ))
  8570  	// cond:
  8571  	// result: (MOVLconst [0])
  8572  	for {
  8573  		v_0 := v.Args[0]
  8574  		if v_0.Op != Op386FlagEQ {
  8575  			break
  8576  		}
  8577  		v.reset(Op386MOVLconst)
  8578  		v.AuxInt = 0
  8579  		return true
  8580  	}
  8581  	// match: (SETNE (FlagLT_ULT))
  8582  	// cond:
  8583  	// result: (MOVLconst [1])
  8584  	for {
  8585  		v_0 := v.Args[0]
  8586  		if v_0.Op != Op386FlagLT_ULT {
  8587  			break
  8588  		}
  8589  		v.reset(Op386MOVLconst)
  8590  		v.AuxInt = 1
  8591  		return true
  8592  	}
  8593  	// match: (SETNE (FlagLT_UGT))
  8594  	// cond:
  8595  	// result: (MOVLconst [1])
  8596  	for {
  8597  		v_0 := v.Args[0]
  8598  		if v_0.Op != Op386FlagLT_UGT {
  8599  			break
  8600  		}
  8601  		v.reset(Op386MOVLconst)
  8602  		v.AuxInt = 1
  8603  		return true
  8604  	}
  8605  	// match: (SETNE (FlagGT_ULT))
  8606  	// cond:
  8607  	// result: (MOVLconst [1])
  8608  	for {
  8609  		v_0 := v.Args[0]
  8610  		if v_0.Op != Op386FlagGT_ULT {
  8611  			break
  8612  		}
  8613  		v.reset(Op386MOVLconst)
  8614  		v.AuxInt = 1
  8615  		return true
  8616  	}
  8617  	// match: (SETNE (FlagGT_UGT))
  8618  	// cond:
  8619  	// result: (MOVLconst [1])
  8620  	for {
  8621  		v_0 := v.Args[0]
  8622  		if v_0.Op != Op386FlagGT_UGT {
  8623  			break
  8624  		}
  8625  		v.reset(Op386MOVLconst)
  8626  		v.AuxInt = 1
  8627  		return true
  8628  	}
  8629  	return false
  8630  }
  8631  func rewriteValue386_Op386SHLL(v *Value, config *Config) bool {
  8632  	b := v.Block
  8633  	_ = b
  8634  	// match: (SHLL x (MOVLconst [c]))
  8635  	// cond:
  8636  	// result: (SHLLconst [c&31] x)
  8637  	for {
  8638  		x := v.Args[0]
  8639  		v_1 := v.Args[1]
  8640  		if v_1.Op != Op386MOVLconst {
  8641  			break
  8642  		}
  8643  		c := v_1.AuxInt
  8644  		v.reset(Op386SHLLconst)
  8645  		v.AuxInt = c & 31
  8646  		v.AddArg(x)
  8647  		return true
  8648  	}
  8649  	// match: (SHLL x (MOVLconst [c]))
  8650  	// cond:
  8651  	// result: (SHLLconst [c&31] x)
  8652  	for {
  8653  		x := v.Args[0]
  8654  		v_1 := v.Args[1]
  8655  		if v_1.Op != Op386MOVLconst {
  8656  			break
  8657  		}
  8658  		c := v_1.AuxInt
  8659  		v.reset(Op386SHLLconst)
  8660  		v.AuxInt = c & 31
  8661  		v.AddArg(x)
  8662  		return true
  8663  	}
  8664  	// match: (SHLL x (ANDLconst [31] y))
  8665  	// cond:
  8666  	// result: (SHLL x y)
  8667  	for {
  8668  		x := v.Args[0]
  8669  		v_1 := v.Args[1]
  8670  		if v_1.Op != Op386ANDLconst {
  8671  			break
  8672  		}
  8673  		if v_1.AuxInt != 31 {
  8674  			break
  8675  		}
  8676  		y := v_1.Args[0]
  8677  		v.reset(Op386SHLL)
  8678  		v.AddArg(x)
  8679  		v.AddArg(y)
  8680  		return true
  8681  	}
  8682  	return false
  8683  }
  8684  func rewriteValue386_Op386SHRB(v *Value, config *Config) bool {
  8685  	b := v.Block
  8686  	_ = b
  8687  	// match: (SHRB x (MOVLconst [c]))
  8688  	// cond:
  8689  	// result: (SHRBconst [c&31] x)
  8690  	for {
  8691  		x := v.Args[0]
  8692  		v_1 := v.Args[1]
  8693  		if v_1.Op != Op386MOVLconst {
  8694  			break
  8695  		}
  8696  		c := v_1.AuxInt
  8697  		v.reset(Op386SHRBconst)
  8698  		v.AuxInt = c & 31
  8699  		v.AddArg(x)
  8700  		return true
  8701  	}
  8702  	// match: (SHRB x (MOVLconst [c]))
  8703  	// cond:
  8704  	// result: (SHRBconst [c&31] x)
  8705  	for {
  8706  		x := v.Args[0]
  8707  		v_1 := v.Args[1]
  8708  		if v_1.Op != Op386MOVLconst {
  8709  			break
  8710  		}
  8711  		c := v_1.AuxInt
  8712  		v.reset(Op386SHRBconst)
  8713  		v.AuxInt = c & 31
  8714  		v.AddArg(x)
  8715  		return true
  8716  	}
  8717  	return false
  8718  }
  8719  func rewriteValue386_Op386SHRL(v *Value, config *Config) bool {
  8720  	b := v.Block
  8721  	_ = b
  8722  	// match: (SHRL x (MOVLconst [c]))
  8723  	// cond:
  8724  	// result: (SHRLconst [c&31] x)
  8725  	for {
  8726  		x := v.Args[0]
  8727  		v_1 := v.Args[1]
  8728  		if v_1.Op != Op386MOVLconst {
  8729  			break
  8730  		}
  8731  		c := v_1.AuxInt
  8732  		v.reset(Op386SHRLconst)
  8733  		v.AuxInt = c & 31
  8734  		v.AddArg(x)
  8735  		return true
  8736  	}
  8737  	// match: (SHRL x (MOVLconst [c]))
  8738  	// cond:
  8739  	// result: (SHRLconst [c&31] x)
  8740  	for {
  8741  		x := v.Args[0]
  8742  		v_1 := v.Args[1]
  8743  		if v_1.Op != Op386MOVLconst {
  8744  			break
  8745  		}
  8746  		c := v_1.AuxInt
  8747  		v.reset(Op386SHRLconst)
  8748  		v.AuxInt = c & 31
  8749  		v.AddArg(x)
  8750  		return true
  8751  	}
  8752  	// match: (SHRL x (ANDLconst [31] y))
  8753  	// cond:
  8754  	// result: (SHRL x y)
  8755  	for {
  8756  		x := v.Args[0]
  8757  		v_1 := v.Args[1]
  8758  		if v_1.Op != Op386ANDLconst {
  8759  			break
  8760  		}
  8761  		if v_1.AuxInt != 31 {
  8762  			break
  8763  		}
  8764  		y := v_1.Args[0]
  8765  		v.reset(Op386SHRL)
  8766  		v.AddArg(x)
  8767  		v.AddArg(y)
  8768  		return true
  8769  	}
  8770  	return false
  8771  }
  8772  func rewriteValue386_Op386SHRW(v *Value, config *Config) bool {
  8773  	b := v.Block
  8774  	_ = b
  8775  	// match: (SHRW x (MOVLconst [c]))
  8776  	// cond:
  8777  	// result: (SHRWconst [c&31] x)
  8778  	for {
  8779  		x := v.Args[0]
  8780  		v_1 := v.Args[1]
  8781  		if v_1.Op != Op386MOVLconst {
  8782  			break
  8783  		}
  8784  		c := v_1.AuxInt
  8785  		v.reset(Op386SHRWconst)
  8786  		v.AuxInt = c & 31
  8787  		v.AddArg(x)
  8788  		return true
  8789  	}
  8790  	// match: (SHRW x (MOVLconst [c]))
  8791  	// cond:
  8792  	// result: (SHRWconst [c&31] x)
  8793  	for {
  8794  		x := v.Args[0]
  8795  		v_1 := v.Args[1]
  8796  		if v_1.Op != Op386MOVLconst {
  8797  			break
  8798  		}
  8799  		c := v_1.AuxInt
  8800  		v.reset(Op386SHRWconst)
  8801  		v.AuxInt = c & 31
  8802  		v.AddArg(x)
  8803  		return true
  8804  	}
  8805  	return false
  8806  }
  8807  func rewriteValue386_Op386SUBL(v *Value, config *Config) bool {
  8808  	b := v.Block
  8809  	_ = b
  8810  	// match: (SUBL x (MOVLconst [c]))
  8811  	// cond:
  8812  	// result: (SUBLconst x [c])
  8813  	for {
  8814  		x := v.Args[0]
  8815  		v_1 := v.Args[1]
  8816  		if v_1.Op != Op386MOVLconst {
  8817  			break
  8818  		}
  8819  		c := v_1.AuxInt
  8820  		v.reset(Op386SUBLconst)
  8821  		v.AuxInt = c
  8822  		v.AddArg(x)
  8823  		return true
  8824  	}
  8825  	// match: (SUBL (MOVLconst [c]) x)
  8826  	// cond:
  8827  	// result: (NEGL (SUBLconst <v.Type> x [c]))
  8828  	for {
  8829  		v_0 := v.Args[0]
  8830  		if v_0.Op != Op386MOVLconst {
  8831  			break
  8832  		}
  8833  		c := v_0.AuxInt
  8834  		x := v.Args[1]
  8835  		v.reset(Op386NEGL)
  8836  		v0 := b.NewValue0(v.Line, Op386SUBLconst, v.Type)
  8837  		v0.AuxInt = c
  8838  		v0.AddArg(x)
  8839  		v.AddArg(v0)
  8840  		return true
  8841  	}
  8842  	// match: (SUBL x x)
  8843  	// cond:
  8844  	// result: (MOVLconst [0])
  8845  	for {
  8846  		x := v.Args[0]
  8847  		if x != v.Args[1] {
  8848  			break
  8849  		}
  8850  		v.reset(Op386MOVLconst)
  8851  		v.AuxInt = 0
  8852  		return true
  8853  	}
  8854  	return false
  8855  }
  8856  func rewriteValue386_Op386SUBLcarry(v *Value, config *Config) bool {
  8857  	b := v.Block
  8858  	_ = b
  8859  	// match: (SUBLcarry x (MOVLconst [c]))
  8860  	// cond:
  8861  	// result: (SUBLconstcarry [c] x)
  8862  	for {
  8863  		x := v.Args[0]
  8864  		v_1 := v.Args[1]
  8865  		if v_1.Op != Op386MOVLconst {
  8866  			break
  8867  		}
  8868  		c := v_1.AuxInt
  8869  		v.reset(Op386SUBLconstcarry)
  8870  		v.AuxInt = c
  8871  		v.AddArg(x)
  8872  		return true
  8873  	}
  8874  	return false
  8875  }
  8876  func rewriteValue386_Op386SUBLconst(v *Value, config *Config) bool {
  8877  	b := v.Block
  8878  	_ = b
  8879  	// match: (SUBLconst [c] x)
  8880  	// cond: int32(c) == 0
  8881  	// result: x
  8882  	for {
  8883  		c := v.AuxInt
  8884  		x := v.Args[0]
  8885  		if !(int32(c) == 0) {
  8886  			break
  8887  		}
  8888  		v.reset(OpCopy)
  8889  		v.Type = x.Type
  8890  		v.AddArg(x)
  8891  		return true
  8892  	}
  8893  	// match: (SUBLconst [c] x)
  8894  	// cond:
  8895  	// result: (ADDLconst [int64(int32(-c))] x)
  8896  	for {
  8897  		c := v.AuxInt
  8898  		x := v.Args[0]
  8899  		v.reset(Op386ADDLconst)
  8900  		v.AuxInt = int64(int32(-c))
  8901  		v.AddArg(x)
  8902  		return true
  8903  	}
  8904  }
  8905  func rewriteValue386_Op386XORL(v *Value, config *Config) bool {
  8906  	b := v.Block
  8907  	_ = b
  8908  	// match: (XORL x (MOVLconst [c]))
  8909  	// cond:
  8910  	// result: (XORLconst [c] x)
  8911  	for {
  8912  		x := v.Args[0]
  8913  		v_1 := v.Args[1]
  8914  		if v_1.Op != Op386MOVLconst {
  8915  			break
  8916  		}
  8917  		c := v_1.AuxInt
  8918  		v.reset(Op386XORLconst)
  8919  		v.AuxInt = c
  8920  		v.AddArg(x)
  8921  		return true
  8922  	}
  8923  	// match: (XORL (MOVLconst [c]) x)
  8924  	// cond:
  8925  	// result: (XORLconst [c] x)
  8926  	for {
  8927  		v_0 := v.Args[0]
  8928  		if v_0.Op != Op386MOVLconst {
  8929  			break
  8930  		}
  8931  		c := v_0.AuxInt
  8932  		x := v.Args[1]
  8933  		v.reset(Op386XORLconst)
  8934  		v.AuxInt = c
  8935  		v.AddArg(x)
  8936  		return true
  8937  	}
  8938  	// match: (XORL x x)
  8939  	// cond:
  8940  	// result: (MOVLconst [0])
  8941  	for {
  8942  		x := v.Args[0]
  8943  		if x != v.Args[1] {
  8944  			break
  8945  		}
  8946  		v.reset(Op386MOVLconst)
  8947  		v.AuxInt = 0
  8948  		return true
  8949  	}
  8950  	return false
  8951  }
  8952  func rewriteValue386_Op386XORLconst(v *Value, config *Config) bool {
  8953  	b := v.Block
  8954  	_ = b
  8955  	// match: (XORLconst [c] (XORLconst [d] x))
  8956  	// cond:
  8957  	// result: (XORLconst [c ^ d] x)
  8958  	for {
  8959  		c := v.AuxInt
  8960  		v_0 := v.Args[0]
  8961  		if v_0.Op != Op386XORLconst {
  8962  			break
  8963  		}
  8964  		d := v_0.AuxInt
  8965  		x := v_0.Args[0]
  8966  		v.reset(Op386XORLconst)
  8967  		v.AuxInt = c ^ d
  8968  		v.AddArg(x)
  8969  		return true
  8970  	}
  8971  	// match: (XORLconst [c] x)
  8972  	// cond: int32(c)==0
  8973  	// result: x
  8974  	for {
  8975  		c := v.AuxInt
  8976  		x := v.Args[0]
  8977  		if !(int32(c) == 0) {
  8978  			break
  8979  		}
  8980  		v.reset(OpCopy)
  8981  		v.Type = x.Type
  8982  		v.AddArg(x)
  8983  		return true
  8984  	}
  8985  	// match: (XORLconst [c] (MOVLconst [d]))
  8986  	// cond:
  8987  	// result: (MOVLconst [c^d])
  8988  	for {
  8989  		c := v.AuxInt
  8990  		v_0 := v.Args[0]
  8991  		if v_0.Op != Op386MOVLconst {
  8992  			break
  8993  		}
  8994  		d := v_0.AuxInt
  8995  		v.reset(Op386MOVLconst)
  8996  		v.AuxInt = c ^ d
  8997  		return true
  8998  	}
  8999  	return false
  9000  }
  9001  func rewriteValue386_OpAdd16(v *Value, config *Config) bool {
  9002  	b := v.Block
  9003  	_ = b
  9004  	// match: (Add16  x y)
  9005  	// cond:
  9006  	// result: (ADDL  x y)
  9007  	for {
  9008  		x := v.Args[0]
  9009  		y := v.Args[1]
  9010  		v.reset(Op386ADDL)
  9011  		v.AddArg(x)
  9012  		v.AddArg(y)
  9013  		return true
  9014  	}
  9015  }
  9016  func rewriteValue386_OpAdd32(v *Value, config *Config) bool {
  9017  	b := v.Block
  9018  	_ = b
  9019  	// match: (Add32  x y)
  9020  	// cond:
  9021  	// result: (ADDL  x y)
  9022  	for {
  9023  		x := v.Args[0]
  9024  		y := v.Args[1]
  9025  		v.reset(Op386ADDL)
  9026  		v.AddArg(x)
  9027  		v.AddArg(y)
  9028  		return true
  9029  	}
  9030  }
  9031  func rewriteValue386_OpAdd32F(v *Value, config *Config) bool {
  9032  	b := v.Block
  9033  	_ = b
  9034  	// match: (Add32F x y)
  9035  	// cond:
  9036  	// result: (ADDSS x y)
  9037  	for {
  9038  		x := v.Args[0]
  9039  		y := v.Args[1]
  9040  		v.reset(Op386ADDSS)
  9041  		v.AddArg(x)
  9042  		v.AddArg(y)
  9043  		return true
  9044  	}
  9045  }
  9046  func rewriteValue386_OpAdd32carry(v *Value, config *Config) bool {
  9047  	b := v.Block
  9048  	_ = b
  9049  	// match: (Add32carry x y)
  9050  	// cond:
  9051  	// result: (ADDLcarry x y)
  9052  	for {
  9053  		x := v.Args[0]
  9054  		y := v.Args[1]
  9055  		v.reset(Op386ADDLcarry)
  9056  		v.AddArg(x)
  9057  		v.AddArg(y)
  9058  		return true
  9059  	}
  9060  }
  9061  func rewriteValue386_OpAdd32withcarry(v *Value, config *Config) bool {
  9062  	b := v.Block
  9063  	_ = b
  9064  	// match: (Add32withcarry x y c)
  9065  	// cond:
  9066  	// result: (ADCL x y c)
  9067  	for {
  9068  		x := v.Args[0]
  9069  		y := v.Args[1]
  9070  		c := v.Args[2]
  9071  		v.reset(Op386ADCL)
  9072  		v.AddArg(x)
  9073  		v.AddArg(y)
  9074  		v.AddArg(c)
  9075  		return true
  9076  	}
  9077  }
  9078  func rewriteValue386_OpAdd64F(v *Value, config *Config) bool {
  9079  	b := v.Block
  9080  	_ = b
  9081  	// match: (Add64F x y)
  9082  	// cond:
  9083  	// result: (ADDSD x y)
  9084  	for {
  9085  		x := v.Args[0]
  9086  		y := v.Args[1]
  9087  		v.reset(Op386ADDSD)
  9088  		v.AddArg(x)
  9089  		v.AddArg(y)
  9090  		return true
  9091  	}
  9092  }
  9093  func rewriteValue386_OpAdd8(v *Value, config *Config) bool {
  9094  	b := v.Block
  9095  	_ = b
  9096  	// match: (Add8   x y)
  9097  	// cond:
  9098  	// result: (ADDL  x y)
  9099  	for {
  9100  		x := v.Args[0]
  9101  		y := v.Args[1]
  9102  		v.reset(Op386ADDL)
  9103  		v.AddArg(x)
  9104  		v.AddArg(y)
  9105  		return true
  9106  	}
  9107  }
  9108  func rewriteValue386_OpAddPtr(v *Value, config *Config) bool {
  9109  	b := v.Block
  9110  	_ = b
  9111  	// match: (AddPtr x y)
  9112  	// cond:
  9113  	// result: (ADDL  x y)
  9114  	for {
  9115  		x := v.Args[0]
  9116  		y := v.Args[1]
  9117  		v.reset(Op386ADDL)
  9118  		v.AddArg(x)
  9119  		v.AddArg(y)
  9120  		return true
  9121  	}
  9122  }
  9123  func rewriteValue386_OpAddr(v *Value, config *Config) bool {
  9124  	b := v.Block
  9125  	_ = b
  9126  	// match: (Addr {sym} base)
  9127  	// cond:
  9128  	// result: (LEAL {sym} base)
  9129  	for {
  9130  		sym := v.Aux
  9131  		base := v.Args[0]
  9132  		v.reset(Op386LEAL)
  9133  		v.Aux = sym
  9134  		v.AddArg(base)
  9135  		return true
  9136  	}
  9137  }
  9138  func rewriteValue386_OpAnd16(v *Value, config *Config) bool {
  9139  	b := v.Block
  9140  	_ = b
  9141  	// match: (And16 x y)
  9142  	// cond:
  9143  	// result: (ANDL x y)
  9144  	for {
  9145  		x := v.Args[0]
  9146  		y := v.Args[1]
  9147  		v.reset(Op386ANDL)
  9148  		v.AddArg(x)
  9149  		v.AddArg(y)
  9150  		return true
  9151  	}
  9152  }
  9153  func rewriteValue386_OpAnd32(v *Value, config *Config) bool {
  9154  	b := v.Block
  9155  	_ = b
  9156  	// match: (And32 x y)
  9157  	// cond:
  9158  	// result: (ANDL x y)
  9159  	for {
  9160  		x := v.Args[0]
  9161  		y := v.Args[1]
  9162  		v.reset(Op386ANDL)
  9163  		v.AddArg(x)
  9164  		v.AddArg(y)
  9165  		return true
  9166  	}
  9167  }
  9168  func rewriteValue386_OpAnd8(v *Value, config *Config) bool {
  9169  	b := v.Block
  9170  	_ = b
  9171  	// match: (And8  x y)
  9172  	// cond:
  9173  	// result: (ANDL x y)
  9174  	for {
  9175  		x := v.Args[0]
  9176  		y := v.Args[1]
  9177  		v.reset(Op386ANDL)
  9178  		v.AddArg(x)
  9179  		v.AddArg(y)
  9180  		return true
  9181  	}
  9182  }
  9183  func rewriteValue386_OpAndB(v *Value, config *Config) bool {
  9184  	b := v.Block
  9185  	_ = b
  9186  	// match: (AndB x y)
  9187  	// cond:
  9188  	// result: (ANDL x y)
  9189  	for {
  9190  		x := v.Args[0]
  9191  		y := v.Args[1]
  9192  		v.reset(Op386ANDL)
  9193  		v.AddArg(x)
  9194  		v.AddArg(y)
  9195  		return true
  9196  	}
  9197  }
  9198  func rewriteValue386_OpBswap32(v *Value, config *Config) bool {
  9199  	b := v.Block
  9200  	_ = b
  9201  	// match: (Bswap32 x)
  9202  	// cond:
  9203  	// result: (BSWAPL x)
  9204  	for {
  9205  		x := v.Args[0]
  9206  		v.reset(Op386BSWAPL)
  9207  		v.AddArg(x)
  9208  		return true
  9209  	}
  9210  }
  9211  func rewriteValue386_OpClosureCall(v *Value, config *Config) bool {
  9212  	b := v.Block
  9213  	_ = b
  9214  	// match: (ClosureCall [argwid] entry closure mem)
  9215  	// cond:
  9216  	// result: (CALLclosure [argwid] entry closure mem)
  9217  	for {
  9218  		argwid := v.AuxInt
  9219  		entry := v.Args[0]
  9220  		closure := v.Args[1]
  9221  		mem := v.Args[2]
  9222  		v.reset(Op386CALLclosure)
  9223  		v.AuxInt = argwid
  9224  		v.AddArg(entry)
  9225  		v.AddArg(closure)
  9226  		v.AddArg(mem)
  9227  		return true
  9228  	}
  9229  }
  9230  func rewriteValue386_OpCom16(v *Value, config *Config) bool {
  9231  	b := v.Block
  9232  	_ = b
  9233  	// match: (Com16 x)
  9234  	// cond:
  9235  	// result: (NOTL x)
  9236  	for {
  9237  		x := v.Args[0]
  9238  		v.reset(Op386NOTL)
  9239  		v.AddArg(x)
  9240  		return true
  9241  	}
  9242  }
  9243  func rewriteValue386_OpCom32(v *Value, config *Config) bool {
  9244  	b := v.Block
  9245  	_ = b
  9246  	// match: (Com32 x)
  9247  	// cond:
  9248  	// result: (NOTL x)
  9249  	for {
  9250  		x := v.Args[0]
  9251  		v.reset(Op386NOTL)
  9252  		v.AddArg(x)
  9253  		return true
  9254  	}
  9255  }
  9256  func rewriteValue386_OpCom8(v *Value, config *Config) bool {
  9257  	b := v.Block
  9258  	_ = b
  9259  	// match: (Com8  x)
  9260  	// cond:
  9261  	// result: (NOTL x)
  9262  	for {
  9263  		x := v.Args[0]
  9264  		v.reset(Op386NOTL)
  9265  		v.AddArg(x)
  9266  		return true
  9267  	}
  9268  }
  9269  func rewriteValue386_OpConst16(v *Value, config *Config) bool {
  9270  	b := v.Block
  9271  	_ = b
  9272  	// match: (Const16  [val])
  9273  	// cond:
  9274  	// result: (MOVLconst [val])
  9275  	for {
  9276  		val := v.AuxInt
  9277  		v.reset(Op386MOVLconst)
  9278  		v.AuxInt = val
  9279  		return true
  9280  	}
  9281  }
  9282  func rewriteValue386_OpConst32(v *Value, config *Config) bool {
  9283  	b := v.Block
  9284  	_ = b
  9285  	// match: (Const32  [val])
  9286  	// cond:
  9287  	// result: (MOVLconst [val])
  9288  	for {
  9289  		val := v.AuxInt
  9290  		v.reset(Op386MOVLconst)
  9291  		v.AuxInt = val
  9292  		return true
  9293  	}
  9294  }
  9295  func rewriteValue386_OpConst32F(v *Value, config *Config) bool {
  9296  	b := v.Block
  9297  	_ = b
  9298  	// match: (Const32F [val])
  9299  	// cond:
  9300  	// result: (MOVSSconst [val])
  9301  	for {
  9302  		val := v.AuxInt
  9303  		v.reset(Op386MOVSSconst)
  9304  		v.AuxInt = val
  9305  		return true
  9306  	}
  9307  }
  9308  func rewriteValue386_OpConst64F(v *Value, config *Config) bool {
  9309  	b := v.Block
  9310  	_ = b
  9311  	// match: (Const64F [val])
  9312  	// cond:
  9313  	// result: (MOVSDconst [val])
  9314  	for {
  9315  		val := v.AuxInt
  9316  		v.reset(Op386MOVSDconst)
  9317  		v.AuxInt = val
  9318  		return true
  9319  	}
  9320  }
  9321  func rewriteValue386_OpConst8(v *Value, config *Config) bool {
  9322  	b := v.Block
  9323  	_ = b
  9324  	// match: (Const8   [val])
  9325  	// cond:
  9326  	// result: (MOVLconst [val])
  9327  	for {
  9328  		val := v.AuxInt
  9329  		v.reset(Op386MOVLconst)
  9330  		v.AuxInt = val
  9331  		return true
  9332  	}
  9333  }
  9334  func rewriteValue386_OpConstBool(v *Value, config *Config) bool {
  9335  	b := v.Block
  9336  	_ = b
  9337  	// match: (ConstBool [b])
  9338  	// cond:
  9339  	// result: (MOVLconst [b])
  9340  	for {
  9341  		b := v.AuxInt
  9342  		v.reset(Op386MOVLconst)
  9343  		v.AuxInt = b
  9344  		return true
  9345  	}
  9346  }
  9347  func rewriteValue386_OpConstNil(v *Value, config *Config) bool {
  9348  	b := v.Block
  9349  	_ = b
  9350  	// match: (ConstNil)
  9351  	// cond:
  9352  	// result: (MOVLconst [0])
  9353  	for {
  9354  		v.reset(Op386MOVLconst)
  9355  		v.AuxInt = 0
  9356  		return true
  9357  	}
  9358  }
  9359  func rewriteValue386_OpConvert(v *Value, config *Config) bool {
  9360  	b := v.Block
  9361  	_ = b
  9362  	// match: (Convert <t> x mem)
  9363  	// cond:
  9364  	// result: (MOVLconvert <t> x mem)
  9365  	for {
  9366  		t := v.Type
  9367  		x := v.Args[0]
  9368  		mem := v.Args[1]
  9369  		v.reset(Op386MOVLconvert)
  9370  		v.Type = t
  9371  		v.AddArg(x)
  9372  		v.AddArg(mem)
  9373  		return true
  9374  	}
  9375  }
  9376  func rewriteValue386_OpCvt32Fto32(v *Value, config *Config) bool {
  9377  	b := v.Block
  9378  	_ = b
  9379  	// match: (Cvt32Fto32 x)
  9380  	// cond:
  9381  	// result: (CVTTSS2SL x)
  9382  	for {
  9383  		x := v.Args[0]
  9384  		v.reset(Op386CVTTSS2SL)
  9385  		v.AddArg(x)
  9386  		return true
  9387  	}
  9388  }
  9389  func rewriteValue386_OpCvt32Fto64F(v *Value, config *Config) bool {
  9390  	b := v.Block
  9391  	_ = b
  9392  	// match: (Cvt32Fto64F x)
  9393  	// cond:
  9394  	// result: (CVTSS2SD x)
  9395  	for {
  9396  		x := v.Args[0]
  9397  		v.reset(Op386CVTSS2SD)
  9398  		v.AddArg(x)
  9399  		return true
  9400  	}
  9401  }
  9402  func rewriteValue386_OpCvt32to32F(v *Value, config *Config) bool {
  9403  	b := v.Block
  9404  	_ = b
  9405  	// match: (Cvt32to32F x)
  9406  	// cond:
  9407  	// result: (CVTSL2SS x)
  9408  	for {
  9409  		x := v.Args[0]
  9410  		v.reset(Op386CVTSL2SS)
  9411  		v.AddArg(x)
  9412  		return true
  9413  	}
  9414  }
  9415  func rewriteValue386_OpCvt32to64F(v *Value, config *Config) bool {
  9416  	b := v.Block
  9417  	_ = b
  9418  	// match: (Cvt32to64F x)
  9419  	// cond:
  9420  	// result: (CVTSL2SD x)
  9421  	for {
  9422  		x := v.Args[0]
  9423  		v.reset(Op386CVTSL2SD)
  9424  		v.AddArg(x)
  9425  		return true
  9426  	}
  9427  }
  9428  func rewriteValue386_OpCvt64Fto32(v *Value, config *Config) bool {
  9429  	b := v.Block
  9430  	_ = b
  9431  	// match: (Cvt64Fto32 x)
  9432  	// cond:
  9433  	// result: (CVTTSD2SL x)
  9434  	for {
  9435  		x := v.Args[0]
  9436  		v.reset(Op386CVTTSD2SL)
  9437  		v.AddArg(x)
  9438  		return true
  9439  	}
  9440  }
  9441  func rewriteValue386_OpCvt64Fto32F(v *Value, config *Config) bool {
  9442  	b := v.Block
  9443  	_ = b
  9444  	// match: (Cvt64Fto32F x)
  9445  	// cond:
  9446  	// result: (CVTSD2SS x)
  9447  	for {
  9448  		x := v.Args[0]
  9449  		v.reset(Op386CVTSD2SS)
  9450  		v.AddArg(x)
  9451  		return true
  9452  	}
  9453  }
  9454  func rewriteValue386_OpDeferCall(v *Value, config *Config) bool {
  9455  	b := v.Block
  9456  	_ = b
  9457  	// match: (DeferCall [argwid] mem)
  9458  	// cond:
  9459  	// result: (CALLdefer [argwid] mem)
  9460  	for {
  9461  		argwid := v.AuxInt
  9462  		mem := v.Args[0]
  9463  		v.reset(Op386CALLdefer)
  9464  		v.AuxInt = argwid
  9465  		v.AddArg(mem)
  9466  		return true
  9467  	}
  9468  }
  9469  func rewriteValue386_OpDiv16(v *Value, config *Config) bool {
  9470  	b := v.Block
  9471  	_ = b
  9472  	// match: (Div16  x y)
  9473  	// cond:
  9474  	// result: (DIVW  x y)
  9475  	for {
  9476  		x := v.Args[0]
  9477  		y := v.Args[1]
  9478  		v.reset(Op386DIVW)
  9479  		v.AddArg(x)
  9480  		v.AddArg(y)
  9481  		return true
  9482  	}
  9483  }
  9484  func rewriteValue386_OpDiv16u(v *Value, config *Config) bool {
  9485  	b := v.Block
  9486  	_ = b
  9487  	// match: (Div16u x y)
  9488  	// cond:
  9489  	// result: (DIVWU x y)
  9490  	for {
  9491  		x := v.Args[0]
  9492  		y := v.Args[1]
  9493  		v.reset(Op386DIVWU)
  9494  		v.AddArg(x)
  9495  		v.AddArg(y)
  9496  		return true
  9497  	}
  9498  }
  9499  func rewriteValue386_OpDiv32(v *Value, config *Config) bool {
  9500  	b := v.Block
  9501  	_ = b
  9502  	// match: (Div32  x y)
  9503  	// cond:
  9504  	// result: (DIVL  x y)
  9505  	for {
  9506  		x := v.Args[0]
  9507  		y := v.Args[1]
  9508  		v.reset(Op386DIVL)
  9509  		v.AddArg(x)
  9510  		v.AddArg(y)
  9511  		return true
  9512  	}
  9513  }
  9514  func rewriteValue386_OpDiv32F(v *Value, config *Config) bool {
  9515  	b := v.Block
  9516  	_ = b
  9517  	// match: (Div32F x y)
  9518  	// cond:
  9519  	// result: (DIVSS x y)
  9520  	for {
  9521  		x := v.Args[0]
  9522  		y := v.Args[1]
  9523  		v.reset(Op386DIVSS)
  9524  		v.AddArg(x)
  9525  		v.AddArg(y)
  9526  		return true
  9527  	}
  9528  }
  9529  func rewriteValue386_OpDiv32u(v *Value, config *Config) bool {
  9530  	b := v.Block
  9531  	_ = b
  9532  	// match: (Div32u x y)
  9533  	// cond:
  9534  	// result: (DIVLU x y)
  9535  	for {
  9536  		x := v.Args[0]
  9537  		y := v.Args[1]
  9538  		v.reset(Op386DIVLU)
  9539  		v.AddArg(x)
  9540  		v.AddArg(y)
  9541  		return true
  9542  	}
  9543  }
  9544  func rewriteValue386_OpDiv64F(v *Value, config *Config) bool {
  9545  	b := v.Block
  9546  	_ = b
  9547  	// match: (Div64F x y)
  9548  	// cond:
  9549  	// result: (DIVSD x y)
  9550  	for {
  9551  		x := v.Args[0]
  9552  		y := v.Args[1]
  9553  		v.reset(Op386DIVSD)
  9554  		v.AddArg(x)
  9555  		v.AddArg(y)
  9556  		return true
  9557  	}
  9558  }
  9559  func rewriteValue386_OpDiv8(v *Value, config *Config) bool {
  9560  	b := v.Block
  9561  	_ = b
  9562  	// match: (Div8   x y)
  9563  	// cond:
  9564  	// result: (DIVW  (SignExt8to16 x) (SignExt8to16 y))
  9565  	for {
  9566  		x := v.Args[0]
  9567  		y := v.Args[1]
  9568  		v.reset(Op386DIVW)
  9569  		v0 := b.NewValue0(v.Line, OpSignExt8to16, config.fe.TypeInt16())
  9570  		v0.AddArg(x)
  9571  		v.AddArg(v0)
  9572  		v1 := b.NewValue0(v.Line, OpSignExt8to16, config.fe.TypeInt16())
  9573  		v1.AddArg(y)
  9574  		v.AddArg(v1)
  9575  		return true
  9576  	}
  9577  }
  9578  func rewriteValue386_OpDiv8u(v *Value, config *Config) bool {
  9579  	b := v.Block
  9580  	_ = b
  9581  	// match: (Div8u  x y)
  9582  	// cond:
  9583  	// result: (DIVWU (ZeroExt8to16 x) (ZeroExt8to16 y))
  9584  	for {
  9585  		x := v.Args[0]
  9586  		y := v.Args[1]
  9587  		v.reset(Op386DIVWU)
  9588  		v0 := b.NewValue0(v.Line, OpZeroExt8to16, config.fe.TypeUInt16())
  9589  		v0.AddArg(x)
  9590  		v.AddArg(v0)
  9591  		v1 := b.NewValue0(v.Line, OpZeroExt8to16, config.fe.TypeUInt16())
  9592  		v1.AddArg(y)
  9593  		v.AddArg(v1)
  9594  		return true
  9595  	}
  9596  }
  9597  func rewriteValue386_OpEq16(v *Value, config *Config) bool {
  9598  	b := v.Block
  9599  	_ = b
  9600  	// match: (Eq16  x y)
  9601  	// cond:
  9602  	// result: (SETEQ (CMPW x y))
  9603  	for {
  9604  		x := v.Args[0]
  9605  		y := v.Args[1]
  9606  		v.reset(Op386SETEQ)
  9607  		v0 := b.NewValue0(v.Line, Op386CMPW, TypeFlags)
  9608  		v0.AddArg(x)
  9609  		v0.AddArg(y)
  9610  		v.AddArg(v0)
  9611  		return true
  9612  	}
  9613  }
  9614  func rewriteValue386_OpEq32(v *Value, config *Config) bool {
  9615  	b := v.Block
  9616  	_ = b
  9617  	// match: (Eq32  x y)
  9618  	// cond:
  9619  	// result: (SETEQ (CMPL x y))
  9620  	for {
  9621  		x := v.Args[0]
  9622  		y := v.Args[1]
  9623  		v.reset(Op386SETEQ)
  9624  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
  9625  		v0.AddArg(x)
  9626  		v0.AddArg(y)
  9627  		v.AddArg(v0)
  9628  		return true
  9629  	}
  9630  }
  9631  func rewriteValue386_OpEq32F(v *Value, config *Config) bool {
  9632  	b := v.Block
  9633  	_ = b
  9634  	// match: (Eq32F x y)
  9635  	// cond:
  9636  	// result: (SETEQF (UCOMISS x y))
  9637  	for {
  9638  		x := v.Args[0]
  9639  		y := v.Args[1]
  9640  		v.reset(Op386SETEQF)
  9641  		v0 := b.NewValue0(v.Line, Op386UCOMISS, TypeFlags)
  9642  		v0.AddArg(x)
  9643  		v0.AddArg(y)
  9644  		v.AddArg(v0)
  9645  		return true
  9646  	}
  9647  }
  9648  func rewriteValue386_OpEq64F(v *Value, config *Config) bool {
  9649  	b := v.Block
  9650  	_ = b
  9651  	// match: (Eq64F x y)
  9652  	// cond:
  9653  	// result: (SETEQF (UCOMISD x y))
  9654  	for {
  9655  		x := v.Args[0]
  9656  		y := v.Args[1]
  9657  		v.reset(Op386SETEQF)
  9658  		v0 := b.NewValue0(v.Line, Op386UCOMISD, TypeFlags)
  9659  		v0.AddArg(x)
  9660  		v0.AddArg(y)
  9661  		v.AddArg(v0)
  9662  		return true
  9663  	}
  9664  }
  9665  func rewriteValue386_OpEq8(v *Value, config *Config) bool {
  9666  	b := v.Block
  9667  	_ = b
  9668  	// match: (Eq8   x y)
  9669  	// cond:
  9670  	// result: (SETEQ (CMPB x y))
  9671  	for {
  9672  		x := v.Args[0]
  9673  		y := v.Args[1]
  9674  		v.reset(Op386SETEQ)
  9675  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
  9676  		v0.AddArg(x)
  9677  		v0.AddArg(y)
  9678  		v.AddArg(v0)
  9679  		return true
  9680  	}
  9681  }
  9682  func rewriteValue386_OpEqB(v *Value, config *Config) bool {
  9683  	b := v.Block
  9684  	_ = b
  9685  	// match: (EqB   x y)
  9686  	// cond:
  9687  	// result: (SETEQ (CMPB x y))
  9688  	for {
  9689  		x := v.Args[0]
  9690  		y := v.Args[1]
  9691  		v.reset(Op386SETEQ)
  9692  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
  9693  		v0.AddArg(x)
  9694  		v0.AddArg(y)
  9695  		v.AddArg(v0)
  9696  		return true
  9697  	}
  9698  }
  9699  func rewriteValue386_OpEqPtr(v *Value, config *Config) bool {
  9700  	b := v.Block
  9701  	_ = b
  9702  	// match: (EqPtr x y)
  9703  	// cond:
  9704  	// result: (SETEQ (CMPL x y))
  9705  	for {
  9706  		x := v.Args[0]
  9707  		y := v.Args[1]
  9708  		v.reset(Op386SETEQ)
  9709  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
  9710  		v0.AddArg(x)
  9711  		v0.AddArg(y)
  9712  		v.AddArg(v0)
  9713  		return true
  9714  	}
  9715  }
  9716  func rewriteValue386_OpGeq16(v *Value, config *Config) bool {
  9717  	b := v.Block
  9718  	_ = b
  9719  	// match: (Geq16  x y)
  9720  	// cond:
  9721  	// result: (SETGE (CMPW x y))
  9722  	for {
  9723  		x := v.Args[0]
  9724  		y := v.Args[1]
  9725  		v.reset(Op386SETGE)
  9726  		v0 := b.NewValue0(v.Line, Op386CMPW, TypeFlags)
  9727  		v0.AddArg(x)
  9728  		v0.AddArg(y)
  9729  		v.AddArg(v0)
  9730  		return true
  9731  	}
  9732  }
  9733  func rewriteValue386_OpGeq16U(v *Value, config *Config) bool {
  9734  	b := v.Block
  9735  	_ = b
  9736  	// match: (Geq16U x y)
  9737  	// cond:
  9738  	// result: (SETAE (CMPW x y))
  9739  	for {
  9740  		x := v.Args[0]
  9741  		y := v.Args[1]
  9742  		v.reset(Op386SETAE)
  9743  		v0 := b.NewValue0(v.Line, Op386CMPW, TypeFlags)
  9744  		v0.AddArg(x)
  9745  		v0.AddArg(y)
  9746  		v.AddArg(v0)
  9747  		return true
  9748  	}
  9749  }
  9750  func rewriteValue386_OpGeq32(v *Value, config *Config) bool {
  9751  	b := v.Block
  9752  	_ = b
  9753  	// match: (Geq32  x y)
  9754  	// cond:
  9755  	// result: (SETGE (CMPL x y))
  9756  	for {
  9757  		x := v.Args[0]
  9758  		y := v.Args[1]
  9759  		v.reset(Op386SETGE)
  9760  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
  9761  		v0.AddArg(x)
  9762  		v0.AddArg(y)
  9763  		v.AddArg(v0)
  9764  		return true
  9765  	}
  9766  }
  9767  func rewriteValue386_OpGeq32F(v *Value, config *Config) bool {
  9768  	b := v.Block
  9769  	_ = b
  9770  	// match: (Geq32F x y)
  9771  	// cond:
  9772  	// result: (SETGEF (UCOMISS x y))
  9773  	for {
  9774  		x := v.Args[0]
  9775  		y := v.Args[1]
  9776  		v.reset(Op386SETGEF)
  9777  		v0 := b.NewValue0(v.Line, Op386UCOMISS, TypeFlags)
  9778  		v0.AddArg(x)
  9779  		v0.AddArg(y)
  9780  		v.AddArg(v0)
  9781  		return true
  9782  	}
  9783  }
  9784  func rewriteValue386_OpGeq32U(v *Value, config *Config) bool {
  9785  	b := v.Block
  9786  	_ = b
  9787  	// match: (Geq32U x y)
  9788  	// cond:
  9789  	// result: (SETAE (CMPL x y))
  9790  	for {
  9791  		x := v.Args[0]
  9792  		y := v.Args[1]
  9793  		v.reset(Op386SETAE)
  9794  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
  9795  		v0.AddArg(x)
  9796  		v0.AddArg(y)
  9797  		v.AddArg(v0)
  9798  		return true
  9799  	}
  9800  }
  9801  func rewriteValue386_OpGeq64F(v *Value, config *Config) bool {
  9802  	b := v.Block
  9803  	_ = b
  9804  	// match: (Geq64F x y)
  9805  	// cond:
  9806  	// result: (SETGEF (UCOMISD x y))
  9807  	for {
  9808  		x := v.Args[0]
  9809  		y := v.Args[1]
  9810  		v.reset(Op386SETGEF)
  9811  		v0 := b.NewValue0(v.Line, Op386UCOMISD, TypeFlags)
  9812  		v0.AddArg(x)
  9813  		v0.AddArg(y)
  9814  		v.AddArg(v0)
  9815  		return true
  9816  	}
  9817  }
  9818  func rewriteValue386_OpGeq8(v *Value, config *Config) bool {
  9819  	b := v.Block
  9820  	_ = b
  9821  	// match: (Geq8   x y)
  9822  	// cond:
  9823  	// result: (SETGE (CMPB x y))
  9824  	for {
  9825  		x := v.Args[0]
  9826  		y := v.Args[1]
  9827  		v.reset(Op386SETGE)
  9828  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
  9829  		v0.AddArg(x)
  9830  		v0.AddArg(y)
  9831  		v.AddArg(v0)
  9832  		return true
  9833  	}
  9834  }
  9835  func rewriteValue386_OpGeq8U(v *Value, config *Config) bool {
  9836  	b := v.Block
  9837  	_ = b
  9838  	// match: (Geq8U  x y)
  9839  	// cond:
  9840  	// result: (SETAE (CMPB x y))
  9841  	for {
  9842  		x := v.Args[0]
  9843  		y := v.Args[1]
  9844  		v.reset(Op386SETAE)
  9845  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
  9846  		v0.AddArg(x)
  9847  		v0.AddArg(y)
  9848  		v.AddArg(v0)
  9849  		return true
  9850  	}
  9851  }
  9852  func rewriteValue386_OpGetClosurePtr(v *Value, config *Config) bool {
  9853  	b := v.Block
  9854  	_ = b
  9855  	// match: (GetClosurePtr)
  9856  	// cond:
  9857  	// result: (LoweredGetClosurePtr)
  9858  	for {
  9859  		v.reset(Op386LoweredGetClosurePtr)
  9860  		return true
  9861  	}
  9862  }
  9863  func rewriteValue386_OpGetG(v *Value, config *Config) bool {
  9864  	b := v.Block
  9865  	_ = b
  9866  	// match: (GetG mem)
  9867  	// cond:
  9868  	// result: (LoweredGetG mem)
  9869  	for {
  9870  		mem := v.Args[0]
  9871  		v.reset(Op386LoweredGetG)
  9872  		v.AddArg(mem)
  9873  		return true
  9874  	}
  9875  }
  9876  func rewriteValue386_OpGoCall(v *Value, config *Config) bool {
  9877  	b := v.Block
  9878  	_ = b
  9879  	// match: (GoCall [argwid] mem)
  9880  	// cond:
  9881  	// result: (CALLgo [argwid] mem)
  9882  	for {
  9883  		argwid := v.AuxInt
  9884  		mem := v.Args[0]
  9885  		v.reset(Op386CALLgo)
  9886  		v.AuxInt = argwid
  9887  		v.AddArg(mem)
  9888  		return true
  9889  	}
  9890  }
  9891  func rewriteValue386_OpGreater16(v *Value, config *Config) bool {
  9892  	b := v.Block
  9893  	_ = b
  9894  	// match: (Greater16  x y)
  9895  	// cond:
  9896  	// result: (SETG (CMPW x y))
  9897  	for {
  9898  		x := v.Args[0]
  9899  		y := v.Args[1]
  9900  		v.reset(Op386SETG)
  9901  		v0 := b.NewValue0(v.Line, Op386CMPW, TypeFlags)
  9902  		v0.AddArg(x)
  9903  		v0.AddArg(y)
  9904  		v.AddArg(v0)
  9905  		return true
  9906  	}
  9907  }
  9908  func rewriteValue386_OpGreater16U(v *Value, config *Config) bool {
  9909  	b := v.Block
  9910  	_ = b
  9911  	// match: (Greater16U x y)
  9912  	// cond:
  9913  	// result: (SETA (CMPW x y))
  9914  	for {
  9915  		x := v.Args[0]
  9916  		y := v.Args[1]
  9917  		v.reset(Op386SETA)
  9918  		v0 := b.NewValue0(v.Line, Op386CMPW, TypeFlags)
  9919  		v0.AddArg(x)
  9920  		v0.AddArg(y)
  9921  		v.AddArg(v0)
  9922  		return true
  9923  	}
  9924  }
  9925  func rewriteValue386_OpGreater32(v *Value, config *Config) bool {
  9926  	b := v.Block
  9927  	_ = b
  9928  	// match: (Greater32  x y)
  9929  	// cond:
  9930  	// result: (SETG (CMPL x y))
  9931  	for {
  9932  		x := v.Args[0]
  9933  		y := v.Args[1]
  9934  		v.reset(Op386SETG)
  9935  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
  9936  		v0.AddArg(x)
  9937  		v0.AddArg(y)
  9938  		v.AddArg(v0)
  9939  		return true
  9940  	}
  9941  }
  9942  func rewriteValue386_OpGreater32F(v *Value, config *Config) bool {
  9943  	b := v.Block
  9944  	_ = b
  9945  	// match: (Greater32F x y)
  9946  	// cond:
  9947  	// result: (SETGF (UCOMISS x y))
  9948  	for {
  9949  		x := v.Args[0]
  9950  		y := v.Args[1]
  9951  		v.reset(Op386SETGF)
  9952  		v0 := b.NewValue0(v.Line, Op386UCOMISS, TypeFlags)
  9953  		v0.AddArg(x)
  9954  		v0.AddArg(y)
  9955  		v.AddArg(v0)
  9956  		return true
  9957  	}
  9958  }
  9959  func rewriteValue386_OpGreater32U(v *Value, config *Config) bool {
  9960  	b := v.Block
  9961  	_ = b
  9962  	// match: (Greater32U x y)
  9963  	// cond:
  9964  	// result: (SETA (CMPL x y))
  9965  	for {
  9966  		x := v.Args[0]
  9967  		y := v.Args[1]
  9968  		v.reset(Op386SETA)
  9969  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
  9970  		v0.AddArg(x)
  9971  		v0.AddArg(y)
  9972  		v.AddArg(v0)
  9973  		return true
  9974  	}
  9975  }
  9976  func rewriteValue386_OpGreater64F(v *Value, config *Config) bool {
  9977  	b := v.Block
  9978  	_ = b
  9979  	// match: (Greater64F x y)
  9980  	// cond:
  9981  	// result: (SETGF (UCOMISD x y))
  9982  	for {
  9983  		x := v.Args[0]
  9984  		y := v.Args[1]
  9985  		v.reset(Op386SETGF)
  9986  		v0 := b.NewValue0(v.Line, Op386UCOMISD, TypeFlags)
  9987  		v0.AddArg(x)
  9988  		v0.AddArg(y)
  9989  		v.AddArg(v0)
  9990  		return true
  9991  	}
  9992  }
  9993  func rewriteValue386_OpGreater8(v *Value, config *Config) bool {
  9994  	b := v.Block
  9995  	_ = b
  9996  	// match: (Greater8   x y)
  9997  	// cond:
  9998  	// result: (SETG (CMPB x y))
  9999  	for {
 10000  		x := v.Args[0]
 10001  		y := v.Args[1]
 10002  		v.reset(Op386SETG)
 10003  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
 10004  		v0.AddArg(x)
 10005  		v0.AddArg(y)
 10006  		v.AddArg(v0)
 10007  		return true
 10008  	}
 10009  }
 10010  func rewriteValue386_OpGreater8U(v *Value, config *Config) bool {
 10011  	b := v.Block
 10012  	_ = b
 10013  	// match: (Greater8U  x y)
 10014  	// cond:
 10015  	// result: (SETA (CMPB x y))
 10016  	for {
 10017  		x := v.Args[0]
 10018  		y := v.Args[1]
 10019  		v.reset(Op386SETA)
 10020  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
 10021  		v0.AddArg(x)
 10022  		v0.AddArg(y)
 10023  		v.AddArg(v0)
 10024  		return true
 10025  	}
 10026  }
 10027  func rewriteValue386_OpHmul16(v *Value, config *Config) bool {
 10028  	b := v.Block
 10029  	_ = b
 10030  	// match: (Hmul16  x y)
 10031  	// cond:
 10032  	// result: (HMULW  x y)
 10033  	for {
 10034  		x := v.Args[0]
 10035  		y := v.Args[1]
 10036  		v.reset(Op386HMULW)
 10037  		v.AddArg(x)
 10038  		v.AddArg(y)
 10039  		return true
 10040  	}
 10041  }
 10042  func rewriteValue386_OpHmul16u(v *Value, config *Config) bool {
 10043  	b := v.Block
 10044  	_ = b
 10045  	// match: (Hmul16u x y)
 10046  	// cond:
 10047  	// result: (HMULWU x y)
 10048  	for {
 10049  		x := v.Args[0]
 10050  		y := v.Args[1]
 10051  		v.reset(Op386HMULWU)
 10052  		v.AddArg(x)
 10053  		v.AddArg(y)
 10054  		return true
 10055  	}
 10056  }
 10057  func rewriteValue386_OpHmul32(v *Value, config *Config) bool {
 10058  	b := v.Block
 10059  	_ = b
 10060  	// match: (Hmul32  x y)
 10061  	// cond:
 10062  	// result: (HMULL  x y)
 10063  	for {
 10064  		x := v.Args[0]
 10065  		y := v.Args[1]
 10066  		v.reset(Op386HMULL)
 10067  		v.AddArg(x)
 10068  		v.AddArg(y)
 10069  		return true
 10070  	}
 10071  }
 10072  func rewriteValue386_OpHmul32u(v *Value, config *Config) bool {
 10073  	b := v.Block
 10074  	_ = b
 10075  	// match: (Hmul32u x y)
 10076  	// cond:
 10077  	// result: (HMULLU x y)
 10078  	for {
 10079  		x := v.Args[0]
 10080  		y := v.Args[1]
 10081  		v.reset(Op386HMULLU)
 10082  		v.AddArg(x)
 10083  		v.AddArg(y)
 10084  		return true
 10085  	}
 10086  }
 10087  func rewriteValue386_OpHmul8(v *Value, config *Config) bool {
 10088  	b := v.Block
 10089  	_ = b
 10090  	// match: (Hmul8   x y)
 10091  	// cond:
 10092  	// result: (HMULB  x y)
 10093  	for {
 10094  		x := v.Args[0]
 10095  		y := v.Args[1]
 10096  		v.reset(Op386HMULB)
 10097  		v.AddArg(x)
 10098  		v.AddArg(y)
 10099  		return true
 10100  	}
 10101  }
 10102  func rewriteValue386_OpHmul8u(v *Value, config *Config) bool {
 10103  	b := v.Block
 10104  	_ = b
 10105  	// match: (Hmul8u  x y)
 10106  	// cond:
 10107  	// result: (HMULBU x y)
 10108  	for {
 10109  		x := v.Args[0]
 10110  		y := v.Args[1]
 10111  		v.reset(Op386HMULBU)
 10112  		v.AddArg(x)
 10113  		v.AddArg(y)
 10114  		return true
 10115  	}
 10116  }
 10117  func rewriteValue386_OpInterCall(v *Value, config *Config) bool {
 10118  	b := v.Block
 10119  	_ = b
 10120  	// match: (InterCall [argwid] entry mem)
 10121  	// cond:
 10122  	// result: (CALLinter [argwid] entry mem)
 10123  	for {
 10124  		argwid := v.AuxInt
 10125  		entry := v.Args[0]
 10126  		mem := v.Args[1]
 10127  		v.reset(Op386CALLinter)
 10128  		v.AuxInt = argwid
 10129  		v.AddArg(entry)
 10130  		v.AddArg(mem)
 10131  		return true
 10132  	}
 10133  }
 10134  func rewriteValue386_OpIsInBounds(v *Value, config *Config) bool {
 10135  	b := v.Block
 10136  	_ = b
 10137  	// match: (IsInBounds idx len)
 10138  	// cond:
 10139  	// result: (SETB (CMPL idx len))
 10140  	for {
 10141  		idx := v.Args[0]
 10142  		len := v.Args[1]
 10143  		v.reset(Op386SETB)
 10144  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
 10145  		v0.AddArg(idx)
 10146  		v0.AddArg(len)
 10147  		v.AddArg(v0)
 10148  		return true
 10149  	}
 10150  }
 10151  func rewriteValue386_OpIsNonNil(v *Value, config *Config) bool {
 10152  	b := v.Block
 10153  	_ = b
 10154  	// match: (IsNonNil p)
 10155  	// cond:
 10156  	// result: (SETNE (TESTL p p))
 10157  	for {
 10158  		p := v.Args[0]
 10159  		v.reset(Op386SETNE)
 10160  		v0 := b.NewValue0(v.Line, Op386TESTL, TypeFlags)
 10161  		v0.AddArg(p)
 10162  		v0.AddArg(p)
 10163  		v.AddArg(v0)
 10164  		return true
 10165  	}
 10166  }
 10167  func rewriteValue386_OpIsSliceInBounds(v *Value, config *Config) bool {
 10168  	b := v.Block
 10169  	_ = b
 10170  	// match: (IsSliceInBounds idx len)
 10171  	// cond:
 10172  	// result: (SETBE (CMPL idx len))
 10173  	for {
 10174  		idx := v.Args[0]
 10175  		len := v.Args[1]
 10176  		v.reset(Op386SETBE)
 10177  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
 10178  		v0.AddArg(idx)
 10179  		v0.AddArg(len)
 10180  		v.AddArg(v0)
 10181  		return true
 10182  	}
 10183  }
 10184  func rewriteValue386_OpLeq16(v *Value, config *Config) bool {
 10185  	b := v.Block
 10186  	_ = b
 10187  	// match: (Leq16  x y)
 10188  	// cond:
 10189  	// result: (SETLE (CMPW x y))
 10190  	for {
 10191  		x := v.Args[0]
 10192  		y := v.Args[1]
 10193  		v.reset(Op386SETLE)
 10194  		v0 := b.NewValue0(v.Line, Op386CMPW, TypeFlags)
 10195  		v0.AddArg(x)
 10196  		v0.AddArg(y)
 10197  		v.AddArg(v0)
 10198  		return true
 10199  	}
 10200  }
 10201  func rewriteValue386_OpLeq16U(v *Value, config *Config) bool {
 10202  	b := v.Block
 10203  	_ = b
 10204  	// match: (Leq16U x y)
 10205  	// cond:
 10206  	// result: (SETBE (CMPW x y))
 10207  	for {
 10208  		x := v.Args[0]
 10209  		y := v.Args[1]
 10210  		v.reset(Op386SETBE)
 10211  		v0 := b.NewValue0(v.Line, Op386CMPW, TypeFlags)
 10212  		v0.AddArg(x)
 10213  		v0.AddArg(y)
 10214  		v.AddArg(v0)
 10215  		return true
 10216  	}
 10217  }
 10218  func rewriteValue386_OpLeq32(v *Value, config *Config) bool {
 10219  	b := v.Block
 10220  	_ = b
 10221  	// match: (Leq32  x y)
 10222  	// cond:
 10223  	// result: (SETLE (CMPL x y))
 10224  	for {
 10225  		x := v.Args[0]
 10226  		y := v.Args[1]
 10227  		v.reset(Op386SETLE)
 10228  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
 10229  		v0.AddArg(x)
 10230  		v0.AddArg(y)
 10231  		v.AddArg(v0)
 10232  		return true
 10233  	}
 10234  }
 10235  func rewriteValue386_OpLeq32F(v *Value, config *Config) bool {
 10236  	b := v.Block
 10237  	_ = b
 10238  	// match: (Leq32F x y)
 10239  	// cond:
 10240  	// result: (SETGEF (UCOMISS y x))
 10241  	for {
 10242  		x := v.Args[0]
 10243  		y := v.Args[1]
 10244  		v.reset(Op386SETGEF)
 10245  		v0 := b.NewValue0(v.Line, Op386UCOMISS, TypeFlags)
 10246  		v0.AddArg(y)
 10247  		v0.AddArg(x)
 10248  		v.AddArg(v0)
 10249  		return true
 10250  	}
 10251  }
 10252  func rewriteValue386_OpLeq32U(v *Value, config *Config) bool {
 10253  	b := v.Block
 10254  	_ = b
 10255  	// match: (Leq32U x y)
 10256  	// cond:
 10257  	// result: (SETBE (CMPL x y))
 10258  	for {
 10259  		x := v.Args[0]
 10260  		y := v.Args[1]
 10261  		v.reset(Op386SETBE)
 10262  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
 10263  		v0.AddArg(x)
 10264  		v0.AddArg(y)
 10265  		v.AddArg(v0)
 10266  		return true
 10267  	}
 10268  }
 10269  func rewriteValue386_OpLeq64F(v *Value, config *Config) bool {
 10270  	b := v.Block
 10271  	_ = b
 10272  	// match: (Leq64F x y)
 10273  	// cond:
 10274  	// result: (SETGEF (UCOMISD y x))
 10275  	for {
 10276  		x := v.Args[0]
 10277  		y := v.Args[1]
 10278  		v.reset(Op386SETGEF)
 10279  		v0 := b.NewValue0(v.Line, Op386UCOMISD, TypeFlags)
 10280  		v0.AddArg(y)
 10281  		v0.AddArg(x)
 10282  		v.AddArg(v0)
 10283  		return true
 10284  	}
 10285  }
 10286  func rewriteValue386_OpLeq8(v *Value, config *Config) bool {
 10287  	b := v.Block
 10288  	_ = b
 10289  	// match: (Leq8   x y)
 10290  	// cond:
 10291  	// result: (SETLE (CMPB x y))
 10292  	for {
 10293  		x := v.Args[0]
 10294  		y := v.Args[1]
 10295  		v.reset(Op386SETLE)
 10296  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
 10297  		v0.AddArg(x)
 10298  		v0.AddArg(y)
 10299  		v.AddArg(v0)
 10300  		return true
 10301  	}
 10302  }
 10303  func rewriteValue386_OpLeq8U(v *Value, config *Config) bool {
 10304  	b := v.Block
 10305  	_ = b
 10306  	// match: (Leq8U  x y)
 10307  	// cond:
 10308  	// result: (SETBE (CMPB x y))
 10309  	for {
 10310  		x := v.Args[0]
 10311  		y := v.Args[1]
 10312  		v.reset(Op386SETBE)
 10313  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
 10314  		v0.AddArg(x)
 10315  		v0.AddArg(y)
 10316  		v.AddArg(v0)
 10317  		return true
 10318  	}
 10319  }
 10320  func rewriteValue386_OpLess16(v *Value, config *Config) bool {
 10321  	b := v.Block
 10322  	_ = b
 10323  	// match: (Less16  x y)
 10324  	// cond:
 10325  	// result: (SETL (CMPW x y))
 10326  	for {
 10327  		x := v.Args[0]
 10328  		y := v.Args[1]
 10329  		v.reset(Op386SETL)
 10330  		v0 := b.NewValue0(v.Line, Op386CMPW, TypeFlags)
 10331  		v0.AddArg(x)
 10332  		v0.AddArg(y)
 10333  		v.AddArg(v0)
 10334  		return true
 10335  	}
 10336  }
 10337  func rewriteValue386_OpLess16U(v *Value, config *Config) bool {
 10338  	b := v.Block
 10339  	_ = b
 10340  	// match: (Less16U x y)
 10341  	// cond:
 10342  	// result: (SETB (CMPW x y))
 10343  	for {
 10344  		x := v.Args[0]
 10345  		y := v.Args[1]
 10346  		v.reset(Op386SETB)
 10347  		v0 := b.NewValue0(v.Line, Op386CMPW, TypeFlags)
 10348  		v0.AddArg(x)
 10349  		v0.AddArg(y)
 10350  		v.AddArg(v0)
 10351  		return true
 10352  	}
 10353  }
 10354  func rewriteValue386_OpLess32(v *Value, config *Config) bool {
 10355  	b := v.Block
 10356  	_ = b
 10357  	// match: (Less32  x y)
 10358  	// cond:
 10359  	// result: (SETL (CMPL x y))
 10360  	for {
 10361  		x := v.Args[0]
 10362  		y := v.Args[1]
 10363  		v.reset(Op386SETL)
 10364  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
 10365  		v0.AddArg(x)
 10366  		v0.AddArg(y)
 10367  		v.AddArg(v0)
 10368  		return true
 10369  	}
 10370  }
 10371  func rewriteValue386_OpLess32F(v *Value, config *Config) bool {
 10372  	b := v.Block
 10373  	_ = b
 10374  	// match: (Less32F x y)
 10375  	// cond:
 10376  	// result: (SETGF (UCOMISS y x))
 10377  	for {
 10378  		x := v.Args[0]
 10379  		y := v.Args[1]
 10380  		v.reset(Op386SETGF)
 10381  		v0 := b.NewValue0(v.Line, Op386UCOMISS, TypeFlags)
 10382  		v0.AddArg(y)
 10383  		v0.AddArg(x)
 10384  		v.AddArg(v0)
 10385  		return true
 10386  	}
 10387  }
 10388  func rewriteValue386_OpLess32U(v *Value, config *Config) bool {
 10389  	b := v.Block
 10390  	_ = b
 10391  	// match: (Less32U x y)
 10392  	// cond:
 10393  	// result: (SETB (CMPL x y))
 10394  	for {
 10395  		x := v.Args[0]
 10396  		y := v.Args[1]
 10397  		v.reset(Op386SETB)
 10398  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
 10399  		v0.AddArg(x)
 10400  		v0.AddArg(y)
 10401  		v.AddArg(v0)
 10402  		return true
 10403  	}
 10404  }
 10405  func rewriteValue386_OpLess64F(v *Value, config *Config) bool {
 10406  	b := v.Block
 10407  	_ = b
 10408  	// match: (Less64F x y)
 10409  	// cond:
 10410  	// result: (SETGF (UCOMISD y x))
 10411  	for {
 10412  		x := v.Args[0]
 10413  		y := v.Args[1]
 10414  		v.reset(Op386SETGF)
 10415  		v0 := b.NewValue0(v.Line, Op386UCOMISD, TypeFlags)
 10416  		v0.AddArg(y)
 10417  		v0.AddArg(x)
 10418  		v.AddArg(v0)
 10419  		return true
 10420  	}
 10421  }
 10422  func rewriteValue386_OpLess8(v *Value, config *Config) bool {
 10423  	b := v.Block
 10424  	_ = b
 10425  	// match: (Less8   x y)
 10426  	// cond:
 10427  	// result: (SETL (CMPB x y))
 10428  	for {
 10429  		x := v.Args[0]
 10430  		y := v.Args[1]
 10431  		v.reset(Op386SETL)
 10432  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
 10433  		v0.AddArg(x)
 10434  		v0.AddArg(y)
 10435  		v.AddArg(v0)
 10436  		return true
 10437  	}
 10438  }
 10439  func rewriteValue386_OpLess8U(v *Value, config *Config) bool {
 10440  	b := v.Block
 10441  	_ = b
 10442  	// match: (Less8U  x y)
 10443  	// cond:
 10444  	// result: (SETB (CMPB x y))
 10445  	for {
 10446  		x := v.Args[0]
 10447  		y := v.Args[1]
 10448  		v.reset(Op386SETB)
 10449  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
 10450  		v0.AddArg(x)
 10451  		v0.AddArg(y)
 10452  		v.AddArg(v0)
 10453  		return true
 10454  	}
 10455  }
 10456  func rewriteValue386_OpLoad(v *Value, config *Config) bool {
 10457  	b := v.Block
 10458  	_ = b
 10459  	// match: (Load <t> ptr mem)
 10460  	// cond: (is32BitInt(t) || isPtr(t))
 10461  	// result: (MOVLload ptr mem)
 10462  	for {
 10463  		t := v.Type
 10464  		ptr := v.Args[0]
 10465  		mem := v.Args[1]
 10466  		if !(is32BitInt(t) || isPtr(t)) {
 10467  			break
 10468  		}
 10469  		v.reset(Op386MOVLload)
 10470  		v.AddArg(ptr)
 10471  		v.AddArg(mem)
 10472  		return true
 10473  	}
 10474  	// match: (Load <t> ptr mem)
 10475  	// cond: is16BitInt(t)
 10476  	// result: (MOVWload ptr mem)
 10477  	for {
 10478  		t := v.Type
 10479  		ptr := v.Args[0]
 10480  		mem := v.Args[1]
 10481  		if !(is16BitInt(t)) {
 10482  			break
 10483  		}
 10484  		v.reset(Op386MOVWload)
 10485  		v.AddArg(ptr)
 10486  		v.AddArg(mem)
 10487  		return true
 10488  	}
 10489  	// match: (Load <t> ptr mem)
 10490  	// cond: (t.IsBoolean() || is8BitInt(t))
 10491  	// result: (MOVBload ptr mem)
 10492  	for {
 10493  		t := v.Type
 10494  		ptr := v.Args[0]
 10495  		mem := v.Args[1]
 10496  		if !(t.IsBoolean() || is8BitInt(t)) {
 10497  			break
 10498  		}
 10499  		v.reset(Op386MOVBload)
 10500  		v.AddArg(ptr)
 10501  		v.AddArg(mem)
 10502  		return true
 10503  	}
 10504  	// match: (Load <t> ptr mem)
 10505  	// cond: is32BitFloat(t)
 10506  	// result: (MOVSSload ptr mem)
 10507  	for {
 10508  		t := v.Type
 10509  		ptr := v.Args[0]
 10510  		mem := v.Args[1]
 10511  		if !(is32BitFloat(t)) {
 10512  			break
 10513  		}
 10514  		v.reset(Op386MOVSSload)
 10515  		v.AddArg(ptr)
 10516  		v.AddArg(mem)
 10517  		return true
 10518  	}
 10519  	// match: (Load <t> ptr mem)
 10520  	// cond: is64BitFloat(t)
 10521  	// result: (MOVSDload ptr mem)
 10522  	for {
 10523  		t := v.Type
 10524  		ptr := v.Args[0]
 10525  		mem := v.Args[1]
 10526  		if !(is64BitFloat(t)) {
 10527  			break
 10528  		}
 10529  		v.reset(Op386MOVSDload)
 10530  		v.AddArg(ptr)
 10531  		v.AddArg(mem)
 10532  		return true
 10533  	}
 10534  	return false
 10535  }
 10536  func rewriteValue386_OpLrot16(v *Value, config *Config) bool {
 10537  	b := v.Block
 10538  	_ = b
 10539  	// match: (Lrot16 <t> x [c])
 10540  	// cond:
 10541  	// result: (ROLWconst <t> [c&15] x)
 10542  	for {
 10543  		t := v.Type
 10544  		c := v.AuxInt
 10545  		x := v.Args[0]
 10546  		v.reset(Op386ROLWconst)
 10547  		v.Type = t
 10548  		v.AuxInt = c & 15
 10549  		v.AddArg(x)
 10550  		return true
 10551  	}
 10552  }
 10553  func rewriteValue386_OpLrot32(v *Value, config *Config) bool {
 10554  	b := v.Block
 10555  	_ = b
 10556  	// match: (Lrot32 <t> x [c])
 10557  	// cond:
 10558  	// result: (ROLLconst <t> [c&31] x)
 10559  	for {
 10560  		t := v.Type
 10561  		c := v.AuxInt
 10562  		x := v.Args[0]
 10563  		v.reset(Op386ROLLconst)
 10564  		v.Type = t
 10565  		v.AuxInt = c & 31
 10566  		v.AddArg(x)
 10567  		return true
 10568  	}
 10569  }
 10570  func rewriteValue386_OpLrot8(v *Value, config *Config) bool {
 10571  	b := v.Block
 10572  	_ = b
 10573  	// match: (Lrot8  <t> x [c])
 10574  	// cond:
 10575  	// result: (ROLBconst <t> [c&7] x)
 10576  	for {
 10577  		t := v.Type
 10578  		c := v.AuxInt
 10579  		x := v.Args[0]
 10580  		v.reset(Op386ROLBconst)
 10581  		v.Type = t
 10582  		v.AuxInt = c & 7
 10583  		v.AddArg(x)
 10584  		return true
 10585  	}
 10586  }
 10587  func rewriteValue386_OpLsh16x16(v *Value, config *Config) bool {
 10588  	b := v.Block
 10589  	_ = b
 10590  	// match: (Lsh16x16 <t> x y)
 10591  	// cond:
 10592  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPWconst y [32])))
 10593  	for {
 10594  		t := v.Type
 10595  		x := v.Args[0]
 10596  		y := v.Args[1]
 10597  		v.reset(Op386ANDL)
 10598  		v0 := b.NewValue0(v.Line, Op386SHLL, t)
 10599  		v0.AddArg(x)
 10600  		v0.AddArg(y)
 10601  		v.AddArg(v0)
 10602  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 10603  		v2 := b.NewValue0(v.Line, Op386CMPWconst, TypeFlags)
 10604  		v2.AuxInt = 32
 10605  		v2.AddArg(y)
 10606  		v1.AddArg(v2)
 10607  		v.AddArg(v1)
 10608  		return true
 10609  	}
 10610  }
 10611  func rewriteValue386_OpLsh16x32(v *Value, config *Config) bool {
 10612  	b := v.Block
 10613  	_ = b
 10614  	// match: (Lsh16x32 <t> x y)
 10615  	// cond:
 10616  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPLconst y [32])))
 10617  	for {
 10618  		t := v.Type
 10619  		x := v.Args[0]
 10620  		y := v.Args[1]
 10621  		v.reset(Op386ANDL)
 10622  		v0 := b.NewValue0(v.Line, Op386SHLL, t)
 10623  		v0.AddArg(x)
 10624  		v0.AddArg(y)
 10625  		v.AddArg(v0)
 10626  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 10627  		v2 := b.NewValue0(v.Line, Op386CMPLconst, TypeFlags)
 10628  		v2.AuxInt = 32
 10629  		v2.AddArg(y)
 10630  		v1.AddArg(v2)
 10631  		v.AddArg(v1)
 10632  		return true
 10633  	}
 10634  }
 10635  func rewriteValue386_OpLsh16x64(v *Value, config *Config) bool {
 10636  	b := v.Block
 10637  	_ = b
 10638  	// match: (Lsh16x64 x (Const64 [c]))
 10639  	// cond: uint64(c) < 16
 10640  	// result: (SHLLconst x [c])
 10641  	for {
 10642  		x := v.Args[0]
 10643  		v_1 := v.Args[1]
 10644  		if v_1.Op != OpConst64 {
 10645  			break
 10646  		}
 10647  		c := v_1.AuxInt
 10648  		if !(uint64(c) < 16) {
 10649  			break
 10650  		}
 10651  		v.reset(Op386SHLLconst)
 10652  		v.AuxInt = c
 10653  		v.AddArg(x)
 10654  		return true
 10655  	}
 10656  	// match: (Lsh16x64 _ (Const64 [c]))
 10657  	// cond: uint64(c) >= 16
 10658  	// result: (Const16 [0])
 10659  	for {
 10660  		v_1 := v.Args[1]
 10661  		if v_1.Op != OpConst64 {
 10662  			break
 10663  		}
 10664  		c := v_1.AuxInt
 10665  		if !(uint64(c) >= 16) {
 10666  			break
 10667  		}
 10668  		v.reset(OpConst16)
 10669  		v.AuxInt = 0
 10670  		return true
 10671  	}
 10672  	return false
 10673  }
 10674  func rewriteValue386_OpLsh16x8(v *Value, config *Config) bool {
 10675  	b := v.Block
 10676  	_ = b
 10677  	// match: (Lsh16x8  <t> x y)
 10678  	// cond:
 10679  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPBconst y [32])))
 10680  	for {
 10681  		t := v.Type
 10682  		x := v.Args[0]
 10683  		y := v.Args[1]
 10684  		v.reset(Op386ANDL)
 10685  		v0 := b.NewValue0(v.Line, Op386SHLL, t)
 10686  		v0.AddArg(x)
 10687  		v0.AddArg(y)
 10688  		v.AddArg(v0)
 10689  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 10690  		v2 := b.NewValue0(v.Line, Op386CMPBconst, TypeFlags)
 10691  		v2.AuxInt = 32
 10692  		v2.AddArg(y)
 10693  		v1.AddArg(v2)
 10694  		v.AddArg(v1)
 10695  		return true
 10696  	}
 10697  }
 10698  func rewriteValue386_OpLsh32x16(v *Value, config *Config) bool {
 10699  	b := v.Block
 10700  	_ = b
 10701  	// match: (Lsh32x16 <t> x y)
 10702  	// cond:
 10703  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPWconst y [32])))
 10704  	for {
 10705  		t := v.Type
 10706  		x := v.Args[0]
 10707  		y := v.Args[1]
 10708  		v.reset(Op386ANDL)
 10709  		v0 := b.NewValue0(v.Line, Op386SHLL, t)
 10710  		v0.AddArg(x)
 10711  		v0.AddArg(y)
 10712  		v.AddArg(v0)
 10713  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 10714  		v2 := b.NewValue0(v.Line, Op386CMPWconst, TypeFlags)
 10715  		v2.AuxInt = 32
 10716  		v2.AddArg(y)
 10717  		v1.AddArg(v2)
 10718  		v.AddArg(v1)
 10719  		return true
 10720  	}
 10721  }
 10722  func rewriteValue386_OpLsh32x32(v *Value, config *Config) bool {
 10723  	b := v.Block
 10724  	_ = b
 10725  	// match: (Lsh32x32 <t> x y)
 10726  	// cond:
 10727  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPLconst y [32])))
 10728  	for {
 10729  		t := v.Type
 10730  		x := v.Args[0]
 10731  		y := v.Args[1]
 10732  		v.reset(Op386ANDL)
 10733  		v0 := b.NewValue0(v.Line, Op386SHLL, t)
 10734  		v0.AddArg(x)
 10735  		v0.AddArg(y)
 10736  		v.AddArg(v0)
 10737  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 10738  		v2 := b.NewValue0(v.Line, Op386CMPLconst, TypeFlags)
 10739  		v2.AuxInt = 32
 10740  		v2.AddArg(y)
 10741  		v1.AddArg(v2)
 10742  		v.AddArg(v1)
 10743  		return true
 10744  	}
 10745  }
 10746  func rewriteValue386_OpLsh32x64(v *Value, config *Config) bool {
 10747  	b := v.Block
 10748  	_ = b
 10749  	// match: (Lsh32x64 x (Const64 [c]))
 10750  	// cond: uint64(c) < 32
 10751  	// result: (SHLLconst x [c])
 10752  	for {
 10753  		x := v.Args[0]
 10754  		v_1 := v.Args[1]
 10755  		if v_1.Op != OpConst64 {
 10756  			break
 10757  		}
 10758  		c := v_1.AuxInt
 10759  		if !(uint64(c) < 32) {
 10760  			break
 10761  		}
 10762  		v.reset(Op386SHLLconst)
 10763  		v.AuxInt = c
 10764  		v.AddArg(x)
 10765  		return true
 10766  	}
 10767  	// match: (Lsh32x64 _ (Const64 [c]))
 10768  	// cond: uint64(c) >= 32
 10769  	// result: (Const32 [0])
 10770  	for {
 10771  		v_1 := v.Args[1]
 10772  		if v_1.Op != OpConst64 {
 10773  			break
 10774  		}
 10775  		c := v_1.AuxInt
 10776  		if !(uint64(c) >= 32) {
 10777  			break
 10778  		}
 10779  		v.reset(OpConst32)
 10780  		v.AuxInt = 0
 10781  		return true
 10782  	}
 10783  	return false
 10784  }
 10785  func rewriteValue386_OpLsh32x8(v *Value, config *Config) bool {
 10786  	b := v.Block
 10787  	_ = b
 10788  	// match: (Lsh32x8  <t> x y)
 10789  	// cond:
 10790  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPBconst y [32])))
 10791  	for {
 10792  		t := v.Type
 10793  		x := v.Args[0]
 10794  		y := v.Args[1]
 10795  		v.reset(Op386ANDL)
 10796  		v0 := b.NewValue0(v.Line, Op386SHLL, t)
 10797  		v0.AddArg(x)
 10798  		v0.AddArg(y)
 10799  		v.AddArg(v0)
 10800  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 10801  		v2 := b.NewValue0(v.Line, Op386CMPBconst, TypeFlags)
 10802  		v2.AuxInt = 32
 10803  		v2.AddArg(y)
 10804  		v1.AddArg(v2)
 10805  		v.AddArg(v1)
 10806  		return true
 10807  	}
 10808  }
 10809  func rewriteValue386_OpLsh8x16(v *Value, config *Config) bool {
 10810  	b := v.Block
 10811  	_ = b
 10812  	// match: (Lsh8x16 <t> x y)
 10813  	// cond:
 10814  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPWconst y [32])))
 10815  	for {
 10816  		t := v.Type
 10817  		x := v.Args[0]
 10818  		y := v.Args[1]
 10819  		v.reset(Op386ANDL)
 10820  		v0 := b.NewValue0(v.Line, Op386SHLL, t)
 10821  		v0.AddArg(x)
 10822  		v0.AddArg(y)
 10823  		v.AddArg(v0)
 10824  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 10825  		v2 := b.NewValue0(v.Line, Op386CMPWconst, TypeFlags)
 10826  		v2.AuxInt = 32
 10827  		v2.AddArg(y)
 10828  		v1.AddArg(v2)
 10829  		v.AddArg(v1)
 10830  		return true
 10831  	}
 10832  }
 10833  func rewriteValue386_OpLsh8x32(v *Value, config *Config) bool {
 10834  	b := v.Block
 10835  	_ = b
 10836  	// match: (Lsh8x32 <t> x y)
 10837  	// cond:
 10838  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPLconst y [32])))
 10839  	for {
 10840  		t := v.Type
 10841  		x := v.Args[0]
 10842  		y := v.Args[1]
 10843  		v.reset(Op386ANDL)
 10844  		v0 := b.NewValue0(v.Line, Op386SHLL, t)
 10845  		v0.AddArg(x)
 10846  		v0.AddArg(y)
 10847  		v.AddArg(v0)
 10848  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 10849  		v2 := b.NewValue0(v.Line, Op386CMPLconst, TypeFlags)
 10850  		v2.AuxInt = 32
 10851  		v2.AddArg(y)
 10852  		v1.AddArg(v2)
 10853  		v.AddArg(v1)
 10854  		return true
 10855  	}
 10856  }
 10857  func rewriteValue386_OpLsh8x64(v *Value, config *Config) bool {
 10858  	b := v.Block
 10859  	_ = b
 10860  	// match: (Lsh8x64 x (Const64 [c]))
 10861  	// cond: uint64(c) < 8
 10862  	// result: (SHLLconst x [c])
 10863  	for {
 10864  		x := v.Args[0]
 10865  		v_1 := v.Args[1]
 10866  		if v_1.Op != OpConst64 {
 10867  			break
 10868  		}
 10869  		c := v_1.AuxInt
 10870  		if !(uint64(c) < 8) {
 10871  			break
 10872  		}
 10873  		v.reset(Op386SHLLconst)
 10874  		v.AuxInt = c
 10875  		v.AddArg(x)
 10876  		return true
 10877  	}
 10878  	// match: (Lsh8x64 _ (Const64 [c]))
 10879  	// cond: uint64(c) >= 8
 10880  	// result: (Const8 [0])
 10881  	for {
 10882  		v_1 := v.Args[1]
 10883  		if v_1.Op != OpConst64 {
 10884  			break
 10885  		}
 10886  		c := v_1.AuxInt
 10887  		if !(uint64(c) >= 8) {
 10888  			break
 10889  		}
 10890  		v.reset(OpConst8)
 10891  		v.AuxInt = 0
 10892  		return true
 10893  	}
 10894  	return false
 10895  }
 10896  func rewriteValue386_OpLsh8x8(v *Value, config *Config) bool {
 10897  	b := v.Block
 10898  	_ = b
 10899  	// match: (Lsh8x8  <t> x y)
 10900  	// cond:
 10901  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPBconst y [32])))
 10902  	for {
 10903  		t := v.Type
 10904  		x := v.Args[0]
 10905  		y := v.Args[1]
 10906  		v.reset(Op386ANDL)
 10907  		v0 := b.NewValue0(v.Line, Op386SHLL, t)
 10908  		v0.AddArg(x)
 10909  		v0.AddArg(y)
 10910  		v.AddArg(v0)
 10911  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 10912  		v2 := b.NewValue0(v.Line, Op386CMPBconst, TypeFlags)
 10913  		v2.AuxInt = 32
 10914  		v2.AddArg(y)
 10915  		v1.AddArg(v2)
 10916  		v.AddArg(v1)
 10917  		return true
 10918  	}
 10919  }
 10920  func rewriteValue386_OpMod16(v *Value, config *Config) bool {
 10921  	b := v.Block
 10922  	_ = b
 10923  	// match: (Mod16  x y)
 10924  	// cond:
 10925  	// result: (MODW  x y)
 10926  	for {
 10927  		x := v.Args[0]
 10928  		y := v.Args[1]
 10929  		v.reset(Op386MODW)
 10930  		v.AddArg(x)
 10931  		v.AddArg(y)
 10932  		return true
 10933  	}
 10934  }
 10935  func rewriteValue386_OpMod16u(v *Value, config *Config) bool {
 10936  	b := v.Block
 10937  	_ = b
 10938  	// match: (Mod16u x y)
 10939  	// cond:
 10940  	// result: (MODWU x y)
 10941  	for {
 10942  		x := v.Args[0]
 10943  		y := v.Args[1]
 10944  		v.reset(Op386MODWU)
 10945  		v.AddArg(x)
 10946  		v.AddArg(y)
 10947  		return true
 10948  	}
 10949  }
 10950  func rewriteValue386_OpMod32(v *Value, config *Config) bool {
 10951  	b := v.Block
 10952  	_ = b
 10953  	// match: (Mod32  x y)
 10954  	// cond:
 10955  	// result: (MODL  x y)
 10956  	for {
 10957  		x := v.Args[0]
 10958  		y := v.Args[1]
 10959  		v.reset(Op386MODL)
 10960  		v.AddArg(x)
 10961  		v.AddArg(y)
 10962  		return true
 10963  	}
 10964  }
 10965  func rewriteValue386_OpMod32u(v *Value, config *Config) bool {
 10966  	b := v.Block
 10967  	_ = b
 10968  	// match: (Mod32u x y)
 10969  	// cond:
 10970  	// result: (MODLU x y)
 10971  	for {
 10972  		x := v.Args[0]
 10973  		y := v.Args[1]
 10974  		v.reset(Op386MODLU)
 10975  		v.AddArg(x)
 10976  		v.AddArg(y)
 10977  		return true
 10978  	}
 10979  }
 10980  func rewriteValue386_OpMod8(v *Value, config *Config) bool {
 10981  	b := v.Block
 10982  	_ = b
 10983  	// match: (Mod8   x y)
 10984  	// cond:
 10985  	// result: (MODW  (SignExt8to16 x) (SignExt8to16 y))
 10986  	for {
 10987  		x := v.Args[0]
 10988  		y := v.Args[1]
 10989  		v.reset(Op386MODW)
 10990  		v0 := b.NewValue0(v.Line, OpSignExt8to16, config.fe.TypeInt16())
 10991  		v0.AddArg(x)
 10992  		v.AddArg(v0)
 10993  		v1 := b.NewValue0(v.Line, OpSignExt8to16, config.fe.TypeInt16())
 10994  		v1.AddArg(y)
 10995  		v.AddArg(v1)
 10996  		return true
 10997  	}
 10998  }
 10999  func rewriteValue386_OpMod8u(v *Value, config *Config) bool {
 11000  	b := v.Block
 11001  	_ = b
 11002  	// match: (Mod8u  x y)
 11003  	// cond:
 11004  	// result: (MODWU (ZeroExt8to16 x) (ZeroExt8to16 y))
 11005  	for {
 11006  		x := v.Args[0]
 11007  		y := v.Args[1]
 11008  		v.reset(Op386MODWU)
 11009  		v0 := b.NewValue0(v.Line, OpZeroExt8to16, config.fe.TypeUInt16())
 11010  		v0.AddArg(x)
 11011  		v.AddArg(v0)
 11012  		v1 := b.NewValue0(v.Line, OpZeroExt8to16, config.fe.TypeUInt16())
 11013  		v1.AddArg(y)
 11014  		v.AddArg(v1)
 11015  		return true
 11016  	}
 11017  }
 11018  func rewriteValue386_OpMove(v *Value, config *Config) bool {
 11019  	b := v.Block
 11020  	_ = b
 11021  	// match: (Move [s] _ _ mem)
 11022  	// cond: SizeAndAlign(s).Size() == 0
 11023  	// result: mem
 11024  	for {
 11025  		s := v.AuxInt
 11026  		mem := v.Args[2]
 11027  		if !(SizeAndAlign(s).Size() == 0) {
 11028  			break
 11029  		}
 11030  		v.reset(OpCopy)
 11031  		v.Type = mem.Type
 11032  		v.AddArg(mem)
 11033  		return true
 11034  	}
 11035  	// match: (Move [s] dst src mem)
 11036  	// cond: SizeAndAlign(s).Size() == 1
 11037  	// result: (MOVBstore dst (MOVBload src mem) mem)
 11038  	for {
 11039  		s := v.AuxInt
 11040  		dst := v.Args[0]
 11041  		src := v.Args[1]
 11042  		mem := v.Args[2]
 11043  		if !(SizeAndAlign(s).Size() == 1) {
 11044  			break
 11045  		}
 11046  		v.reset(Op386MOVBstore)
 11047  		v.AddArg(dst)
 11048  		v0 := b.NewValue0(v.Line, Op386MOVBload, config.fe.TypeUInt8())
 11049  		v0.AddArg(src)
 11050  		v0.AddArg(mem)
 11051  		v.AddArg(v0)
 11052  		v.AddArg(mem)
 11053  		return true
 11054  	}
 11055  	// match: (Move [s] dst src mem)
 11056  	// cond: SizeAndAlign(s).Size() == 2
 11057  	// result: (MOVWstore dst (MOVWload src mem) mem)
 11058  	for {
 11059  		s := v.AuxInt
 11060  		dst := v.Args[0]
 11061  		src := v.Args[1]
 11062  		mem := v.Args[2]
 11063  		if !(SizeAndAlign(s).Size() == 2) {
 11064  			break
 11065  		}
 11066  		v.reset(Op386MOVWstore)
 11067  		v.AddArg(dst)
 11068  		v0 := b.NewValue0(v.Line, Op386MOVWload, config.fe.TypeUInt16())
 11069  		v0.AddArg(src)
 11070  		v0.AddArg(mem)
 11071  		v.AddArg(v0)
 11072  		v.AddArg(mem)
 11073  		return true
 11074  	}
 11075  	// match: (Move [s] dst src mem)
 11076  	// cond: SizeAndAlign(s).Size() == 4
 11077  	// result: (MOVLstore dst (MOVLload src mem) mem)
 11078  	for {
 11079  		s := v.AuxInt
 11080  		dst := v.Args[0]
 11081  		src := v.Args[1]
 11082  		mem := v.Args[2]
 11083  		if !(SizeAndAlign(s).Size() == 4) {
 11084  			break
 11085  		}
 11086  		v.reset(Op386MOVLstore)
 11087  		v.AddArg(dst)
 11088  		v0 := b.NewValue0(v.Line, Op386MOVLload, config.fe.TypeUInt32())
 11089  		v0.AddArg(src)
 11090  		v0.AddArg(mem)
 11091  		v.AddArg(v0)
 11092  		v.AddArg(mem)
 11093  		return true
 11094  	}
 11095  	// match: (Move [s] dst src mem)
 11096  	// cond: SizeAndAlign(s).Size() == 3
 11097  	// result: (MOVBstore [2] dst (MOVBload [2] src mem) 		(MOVWstore dst (MOVWload src mem) mem))
 11098  	for {
 11099  		s := v.AuxInt
 11100  		dst := v.Args[0]
 11101  		src := v.Args[1]
 11102  		mem := v.Args[2]
 11103  		if !(SizeAndAlign(s).Size() == 3) {
 11104  			break
 11105  		}
 11106  		v.reset(Op386MOVBstore)
 11107  		v.AuxInt = 2
 11108  		v.AddArg(dst)
 11109  		v0 := b.NewValue0(v.Line, Op386MOVBload, config.fe.TypeUInt8())
 11110  		v0.AuxInt = 2
 11111  		v0.AddArg(src)
 11112  		v0.AddArg(mem)
 11113  		v.AddArg(v0)
 11114  		v1 := b.NewValue0(v.Line, Op386MOVWstore, TypeMem)
 11115  		v1.AddArg(dst)
 11116  		v2 := b.NewValue0(v.Line, Op386MOVWload, config.fe.TypeUInt16())
 11117  		v2.AddArg(src)
 11118  		v2.AddArg(mem)
 11119  		v1.AddArg(v2)
 11120  		v1.AddArg(mem)
 11121  		v.AddArg(v1)
 11122  		return true
 11123  	}
 11124  	// match: (Move [s] dst src mem)
 11125  	// cond: SizeAndAlign(s).Size() == 5
 11126  	// result: (MOVBstore [4] dst (MOVBload [4] src mem) 		(MOVLstore dst (MOVLload src mem) mem))
 11127  	for {
 11128  		s := v.AuxInt
 11129  		dst := v.Args[0]
 11130  		src := v.Args[1]
 11131  		mem := v.Args[2]
 11132  		if !(SizeAndAlign(s).Size() == 5) {
 11133  			break
 11134  		}
 11135  		v.reset(Op386MOVBstore)
 11136  		v.AuxInt = 4
 11137  		v.AddArg(dst)
 11138  		v0 := b.NewValue0(v.Line, Op386MOVBload, config.fe.TypeUInt8())
 11139  		v0.AuxInt = 4
 11140  		v0.AddArg(src)
 11141  		v0.AddArg(mem)
 11142  		v.AddArg(v0)
 11143  		v1 := b.NewValue0(v.Line, Op386MOVLstore, TypeMem)
 11144  		v1.AddArg(dst)
 11145  		v2 := b.NewValue0(v.Line, Op386MOVLload, config.fe.TypeUInt32())
 11146  		v2.AddArg(src)
 11147  		v2.AddArg(mem)
 11148  		v1.AddArg(v2)
 11149  		v1.AddArg(mem)
 11150  		v.AddArg(v1)
 11151  		return true
 11152  	}
 11153  	// match: (Move [s] dst src mem)
 11154  	// cond: SizeAndAlign(s).Size() == 6
 11155  	// result: (MOVWstore [4] dst (MOVWload [4] src mem) 		(MOVLstore dst (MOVLload src mem) mem))
 11156  	for {
 11157  		s := v.AuxInt
 11158  		dst := v.Args[0]
 11159  		src := v.Args[1]
 11160  		mem := v.Args[2]
 11161  		if !(SizeAndAlign(s).Size() == 6) {
 11162  			break
 11163  		}
 11164  		v.reset(Op386MOVWstore)
 11165  		v.AuxInt = 4
 11166  		v.AddArg(dst)
 11167  		v0 := b.NewValue0(v.Line, Op386MOVWload, config.fe.TypeUInt16())
 11168  		v0.AuxInt = 4
 11169  		v0.AddArg(src)
 11170  		v0.AddArg(mem)
 11171  		v.AddArg(v0)
 11172  		v1 := b.NewValue0(v.Line, Op386MOVLstore, TypeMem)
 11173  		v1.AddArg(dst)
 11174  		v2 := b.NewValue0(v.Line, Op386MOVLload, config.fe.TypeUInt32())
 11175  		v2.AddArg(src)
 11176  		v2.AddArg(mem)
 11177  		v1.AddArg(v2)
 11178  		v1.AddArg(mem)
 11179  		v.AddArg(v1)
 11180  		return true
 11181  	}
 11182  	// match: (Move [s] dst src mem)
 11183  	// cond: SizeAndAlign(s).Size() == 7
 11184  	// result: (MOVLstore [3] dst (MOVLload [3] src mem) 		(MOVLstore dst (MOVLload src mem) mem))
 11185  	for {
 11186  		s := v.AuxInt
 11187  		dst := v.Args[0]
 11188  		src := v.Args[1]
 11189  		mem := v.Args[2]
 11190  		if !(SizeAndAlign(s).Size() == 7) {
 11191  			break
 11192  		}
 11193  		v.reset(Op386MOVLstore)
 11194  		v.AuxInt = 3
 11195  		v.AddArg(dst)
 11196  		v0 := b.NewValue0(v.Line, Op386MOVLload, config.fe.TypeUInt32())
 11197  		v0.AuxInt = 3
 11198  		v0.AddArg(src)
 11199  		v0.AddArg(mem)
 11200  		v.AddArg(v0)
 11201  		v1 := b.NewValue0(v.Line, Op386MOVLstore, TypeMem)
 11202  		v1.AddArg(dst)
 11203  		v2 := b.NewValue0(v.Line, Op386MOVLload, config.fe.TypeUInt32())
 11204  		v2.AddArg(src)
 11205  		v2.AddArg(mem)
 11206  		v1.AddArg(v2)
 11207  		v1.AddArg(mem)
 11208  		v.AddArg(v1)
 11209  		return true
 11210  	}
 11211  	// match: (Move [s] dst src mem)
 11212  	// cond: SizeAndAlign(s).Size() == 8
 11213  	// result: (MOVLstore [4] dst (MOVLload [4] src mem) 		(MOVLstore dst (MOVLload src mem) mem))
 11214  	for {
 11215  		s := v.AuxInt
 11216  		dst := v.Args[0]
 11217  		src := v.Args[1]
 11218  		mem := v.Args[2]
 11219  		if !(SizeAndAlign(s).Size() == 8) {
 11220  			break
 11221  		}
 11222  		v.reset(Op386MOVLstore)
 11223  		v.AuxInt = 4
 11224  		v.AddArg(dst)
 11225  		v0 := b.NewValue0(v.Line, Op386MOVLload, config.fe.TypeUInt32())
 11226  		v0.AuxInt = 4
 11227  		v0.AddArg(src)
 11228  		v0.AddArg(mem)
 11229  		v.AddArg(v0)
 11230  		v1 := b.NewValue0(v.Line, Op386MOVLstore, TypeMem)
 11231  		v1.AddArg(dst)
 11232  		v2 := b.NewValue0(v.Line, Op386MOVLload, config.fe.TypeUInt32())
 11233  		v2.AddArg(src)
 11234  		v2.AddArg(mem)
 11235  		v1.AddArg(v2)
 11236  		v1.AddArg(mem)
 11237  		v.AddArg(v1)
 11238  		return true
 11239  	}
 11240  	// match: (Move [s] dst src mem)
 11241  	// cond: SizeAndAlign(s).Size() > 8 && SizeAndAlign(s).Size()%4 != 0
 11242  	// result: (Move [SizeAndAlign(s).Size()-SizeAndAlign(s).Size()%4] 		(ADDLconst <dst.Type> dst [SizeAndAlign(s).Size()%4]) 		(ADDLconst <src.Type> src [SizeAndAlign(s).Size()%4]) 		(MOVLstore dst (MOVLload src mem) mem))
 11243  	for {
 11244  		s := v.AuxInt
 11245  		dst := v.Args[0]
 11246  		src := v.Args[1]
 11247  		mem := v.Args[2]
 11248  		if !(SizeAndAlign(s).Size() > 8 && SizeAndAlign(s).Size()%4 != 0) {
 11249  			break
 11250  		}
 11251  		v.reset(OpMove)
 11252  		v.AuxInt = SizeAndAlign(s).Size() - SizeAndAlign(s).Size()%4
 11253  		v0 := b.NewValue0(v.Line, Op386ADDLconst, dst.Type)
 11254  		v0.AuxInt = SizeAndAlign(s).Size() % 4
 11255  		v0.AddArg(dst)
 11256  		v.AddArg(v0)
 11257  		v1 := b.NewValue0(v.Line, Op386ADDLconst, src.Type)
 11258  		v1.AuxInt = SizeAndAlign(s).Size() % 4
 11259  		v1.AddArg(src)
 11260  		v.AddArg(v1)
 11261  		v2 := b.NewValue0(v.Line, Op386MOVLstore, TypeMem)
 11262  		v2.AddArg(dst)
 11263  		v3 := b.NewValue0(v.Line, Op386MOVLload, config.fe.TypeUInt32())
 11264  		v3.AddArg(src)
 11265  		v3.AddArg(mem)
 11266  		v2.AddArg(v3)
 11267  		v2.AddArg(mem)
 11268  		v.AddArg(v2)
 11269  		return true
 11270  	}
 11271  	// match: (Move [s] dst src mem)
 11272  	// cond: SizeAndAlign(s).Size() > 8 && SizeAndAlign(s).Size() <= 4*128 && SizeAndAlign(s).Size()%4 == 0 	&& !config.noDuffDevice
 11273  	// result: (DUFFCOPY [10*(128-SizeAndAlign(s).Size()/4)] dst src mem)
 11274  	for {
 11275  		s := v.AuxInt
 11276  		dst := v.Args[0]
 11277  		src := v.Args[1]
 11278  		mem := v.Args[2]
 11279  		if !(SizeAndAlign(s).Size() > 8 && SizeAndAlign(s).Size() <= 4*128 && SizeAndAlign(s).Size()%4 == 0 && !config.noDuffDevice) {
 11280  			break
 11281  		}
 11282  		v.reset(Op386DUFFCOPY)
 11283  		v.AuxInt = 10 * (128 - SizeAndAlign(s).Size()/4)
 11284  		v.AddArg(dst)
 11285  		v.AddArg(src)
 11286  		v.AddArg(mem)
 11287  		return true
 11288  	}
 11289  	// match: (Move [s] dst src mem)
 11290  	// cond: (SizeAndAlign(s).Size() > 4*128 || config.noDuffDevice) && SizeAndAlign(s).Size()%4 == 0
 11291  	// result: (REPMOVSL dst src (MOVLconst [SizeAndAlign(s).Size()/4]) mem)
 11292  	for {
 11293  		s := v.AuxInt
 11294  		dst := v.Args[0]
 11295  		src := v.Args[1]
 11296  		mem := v.Args[2]
 11297  		if !((SizeAndAlign(s).Size() > 4*128 || config.noDuffDevice) && SizeAndAlign(s).Size()%4 == 0) {
 11298  			break
 11299  		}
 11300  		v.reset(Op386REPMOVSL)
 11301  		v.AddArg(dst)
 11302  		v.AddArg(src)
 11303  		v0 := b.NewValue0(v.Line, Op386MOVLconst, config.fe.TypeUInt32())
 11304  		v0.AuxInt = SizeAndAlign(s).Size() / 4
 11305  		v.AddArg(v0)
 11306  		v.AddArg(mem)
 11307  		return true
 11308  	}
 11309  	return false
 11310  }
 11311  func rewriteValue386_OpMul16(v *Value, config *Config) bool {
 11312  	b := v.Block
 11313  	_ = b
 11314  	// match: (Mul16  x y)
 11315  	// cond:
 11316  	// result: (MULL  x y)
 11317  	for {
 11318  		x := v.Args[0]
 11319  		y := v.Args[1]
 11320  		v.reset(Op386MULL)
 11321  		v.AddArg(x)
 11322  		v.AddArg(y)
 11323  		return true
 11324  	}
 11325  }
 11326  func rewriteValue386_OpMul32(v *Value, config *Config) bool {
 11327  	b := v.Block
 11328  	_ = b
 11329  	// match: (Mul32  x y)
 11330  	// cond:
 11331  	// result: (MULL  x y)
 11332  	for {
 11333  		x := v.Args[0]
 11334  		y := v.Args[1]
 11335  		v.reset(Op386MULL)
 11336  		v.AddArg(x)
 11337  		v.AddArg(y)
 11338  		return true
 11339  	}
 11340  }
 11341  func rewriteValue386_OpMul32F(v *Value, config *Config) bool {
 11342  	b := v.Block
 11343  	_ = b
 11344  	// match: (Mul32F x y)
 11345  	// cond:
 11346  	// result: (MULSS x y)
 11347  	for {
 11348  		x := v.Args[0]
 11349  		y := v.Args[1]
 11350  		v.reset(Op386MULSS)
 11351  		v.AddArg(x)
 11352  		v.AddArg(y)
 11353  		return true
 11354  	}
 11355  }
 11356  func rewriteValue386_OpMul32uhilo(v *Value, config *Config) bool {
 11357  	b := v.Block
 11358  	_ = b
 11359  	// match: (Mul32uhilo x y)
 11360  	// cond:
 11361  	// result: (MULLQU x y)
 11362  	for {
 11363  		x := v.Args[0]
 11364  		y := v.Args[1]
 11365  		v.reset(Op386MULLQU)
 11366  		v.AddArg(x)
 11367  		v.AddArg(y)
 11368  		return true
 11369  	}
 11370  }
 11371  func rewriteValue386_OpMul64F(v *Value, config *Config) bool {
 11372  	b := v.Block
 11373  	_ = b
 11374  	// match: (Mul64F x y)
 11375  	// cond:
 11376  	// result: (MULSD x y)
 11377  	for {
 11378  		x := v.Args[0]
 11379  		y := v.Args[1]
 11380  		v.reset(Op386MULSD)
 11381  		v.AddArg(x)
 11382  		v.AddArg(y)
 11383  		return true
 11384  	}
 11385  }
 11386  func rewriteValue386_OpMul8(v *Value, config *Config) bool {
 11387  	b := v.Block
 11388  	_ = b
 11389  	// match: (Mul8   x y)
 11390  	// cond:
 11391  	// result: (MULL  x y)
 11392  	for {
 11393  		x := v.Args[0]
 11394  		y := v.Args[1]
 11395  		v.reset(Op386MULL)
 11396  		v.AddArg(x)
 11397  		v.AddArg(y)
 11398  		return true
 11399  	}
 11400  }
 11401  func rewriteValue386_OpNeg16(v *Value, config *Config) bool {
 11402  	b := v.Block
 11403  	_ = b
 11404  	// match: (Neg16  x)
 11405  	// cond:
 11406  	// result: (NEGL x)
 11407  	for {
 11408  		x := v.Args[0]
 11409  		v.reset(Op386NEGL)
 11410  		v.AddArg(x)
 11411  		return true
 11412  	}
 11413  }
 11414  func rewriteValue386_OpNeg32(v *Value, config *Config) bool {
 11415  	b := v.Block
 11416  	_ = b
 11417  	// match: (Neg32  x)
 11418  	// cond:
 11419  	// result: (NEGL x)
 11420  	for {
 11421  		x := v.Args[0]
 11422  		v.reset(Op386NEGL)
 11423  		v.AddArg(x)
 11424  		return true
 11425  	}
 11426  }
 11427  func rewriteValue386_OpNeg32F(v *Value, config *Config) bool {
 11428  	b := v.Block
 11429  	_ = b
 11430  	// match: (Neg32F x)
 11431  	// cond: !config.use387
 11432  	// result: (PXOR x (MOVSSconst <config.Frontend().TypeFloat32()> [f2i(math.Copysign(0, -1))]))
 11433  	for {
 11434  		x := v.Args[0]
 11435  		if !(!config.use387) {
 11436  			break
 11437  		}
 11438  		v.reset(Op386PXOR)
 11439  		v.AddArg(x)
 11440  		v0 := b.NewValue0(v.Line, Op386MOVSSconst, config.Frontend().TypeFloat32())
 11441  		v0.AuxInt = f2i(math.Copysign(0, -1))
 11442  		v.AddArg(v0)
 11443  		return true
 11444  	}
 11445  	// match: (Neg32F x)
 11446  	// cond: config.use387
 11447  	// result: (FCHS x)
 11448  	for {
 11449  		x := v.Args[0]
 11450  		if !(config.use387) {
 11451  			break
 11452  		}
 11453  		v.reset(Op386FCHS)
 11454  		v.AddArg(x)
 11455  		return true
 11456  	}
 11457  	return false
 11458  }
 11459  func rewriteValue386_OpNeg64F(v *Value, config *Config) bool {
 11460  	b := v.Block
 11461  	_ = b
 11462  	// match: (Neg64F x)
 11463  	// cond: !config.use387
 11464  	// result: (PXOR x (MOVSDconst <config.Frontend().TypeFloat64()> [f2i(math.Copysign(0, -1))]))
 11465  	for {
 11466  		x := v.Args[0]
 11467  		if !(!config.use387) {
 11468  			break
 11469  		}
 11470  		v.reset(Op386PXOR)
 11471  		v.AddArg(x)
 11472  		v0 := b.NewValue0(v.Line, Op386MOVSDconst, config.Frontend().TypeFloat64())
 11473  		v0.AuxInt = f2i(math.Copysign(0, -1))
 11474  		v.AddArg(v0)
 11475  		return true
 11476  	}
 11477  	// match: (Neg64F x)
 11478  	// cond: config.use387
 11479  	// result: (FCHS x)
 11480  	for {
 11481  		x := v.Args[0]
 11482  		if !(config.use387) {
 11483  			break
 11484  		}
 11485  		v.reset(Op386FCHS)
 11486  		v.AddArg(x)
 11487  		return true
 11488  	}
 11489  	return false
 11490  }
 11491  func rewriteValue386_OpNeg8(v *Value, config *Config) bool {
 11492  	b := v.Block
 11493  	_ = b
 11494  	// match: (Neg8   x)
 11495  	// cond:
 11496  	// result: (NEGL x)
 11497  	for {
 11498  		x := v.Args[0]
 11499  		v.reset(Op386NEGL)
 11500  		v.AddArg(x)
 11501  		return true
 11502  	}
 11503  }
 11504  func rewriteValue386_OpNeq16(v *Value, config *Config) bool {
 11505  	b := v.Block
 11506  	_ = b
 11507  	// match: (Neq16  x y)
 11508  	// cond:
 11509  	// result: (SETNE (CMPW x y))
 11510  	for {
 11511  		x := v.Args[0]
 11512  		y := v.Args[1]
 11513  		v.reset(Op386SETNE)
 11514  		v0 := b.NewValue0(v.Line, Op386CMPW, TypeFlags)
 11515  		v0.AddArg(x)
 11516  		v0.AddArg(y)
 11517  		v.AddArg(v0)
 11518  		return true
 11519  	}
 11520  }
 11521  func rewriteValue386_OpNeq32(v *Value, config *Config) bool {
 11522  	b := v.Block
 11523  	_ = b
 11524  	// match: (Neq32  x y)
 11525  	// cond:
 11526  	// result: (SETNE (CMPL x y))
 11527  	for {
 11528  		x := v.Args[0]
 11529  		y := v.Args[1]
 11530  		v.reset(Op386SETNE)
 11531  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
 11532  		v0.AddArg(x)
 11533  		v0.AddArg(y)
 11534  		v.AddArg(v0)
 11535  		return true
 11536  	}
 11537  }
 11538  func rewriteValue386_OpNeq32F(v *Value, config *Config) bool {
 11539  	b := v.Block
 11540  	_ = b
 11541  	// match: (Neq32F x y)
 11542  	// cond:
 11543  	// result: (SETNEF (UCOMISS x y))
 11544  	for {
 11545  		x := v.Args[0]
 11546  		y := v.Args[1]
 11547  		v.reset(Op386SETNEF)
 11548  		v0 := b.NewValue0(v.Line, Op386UCOMISS, TypeFlags)
 11549  		v0.AddArg(x)
 11550  		v0.AddArg(y)
 11551  		v.AddArg(v0)
 11552  		return true
 11553  	}
 11554  }
 11555  func rewriteValue386_OpNeq64F(v *Value, config *Config) bool {
 11556  	b := v.Block
 11557  	_ = b
 11558  	// match: (Neq64F x y)
 11559  	// cond:
 11560  	// result: (SETNEF (UCOMISD x y))
 11561  	for {
 11562  		x := v.Args[0]
 11563  		y := v.Args[1]
 11564  		v.reset(Op386SETNEF)
 11565  		v0 := b.NewValue0(v.Line, Op386UCOMISD, TypeFlags)
 11566  		v0.AddArg(x)
 11567  		v0.AddArg(y)
 11568  		v.AddArg(v0)
 11569  		return true
 11570  	}
 11571  }
 11572  func rewriteValue386_OpNeq8(v *Value, config *Config) bool {
 11573  	b := v.Block
 11574  	_ = b
 11575  	// match: (Neq8   x y)
 11576  	// cond:
 11577  	// result: (SETNE (CMPB x y))
 11578  	for {
 11579  		x := v.Args[0]
 11580  		y := v.Args[1]
 11581  		v.reset(Op386SETNE)
 11582  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
 11583  		v0.AddArg(x)
 11584  		v0.AddArg(y)
 11585  		v.AddArg(v0)
 11586  		return true
 11587  	}
 11588  }
 11589  func rewriteValue386_OpNeqB(v *Value, config *Config) bool {
 11590  	b := v.Block
 11591  	_ = b
 11592  	// match: (NeqB   x y)
 11593  	// cond:
 11594  	// result: (SETNE (CMPB x y))
 11595  	for {
 11596  		x := v.Args[0]
 11597  		y := v.Args[1]
 11598  		v.reset(Op386SETNE)
 11599  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
 11600  		v0.AddArg(x)
 11601  		v0.AddArg(y)
 11602  		v.AddArg(v0)
 11603  		return true
 11604  	}
 11605  }
 11606  func rewriteValue386_OpNeqPtr(v *Value, config *Config) bool {
 11607  	b := v.Block
 11608  	_ = b
 11609  	// match: (NeqPtr x y)
 11610  	// cond:
 11611  	// result: (SETNE (CMPL x y))
 11612  	for {
 11613  		x := v.Args[0]
 11614  		y := v.Args[1]
 11615  		v.reset(Op386SETNE)
 11616  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
 11617  		v0.AddArg(x)
 11618  		v0.AddArg(y)
 11619  		v.AddArg(v0)
 11620  		return true
 11621  	}
 11622  }
 11623  func rewriteValue386_OpNilCheck(v *Value, config *Config) bool {
 11624  	b := v.Block
 11625  	_ = b
 11626  	// match: (NilCheck ptr mem)
 11627  	// cond:
 11628  	// result: (LoweredNilCheck ptr mem)
 11629  	for {
 11630  		ptr := v.Args[0]
 11631  		mem := v.Args[1]
 11632  		v.reset(Op386LoweredNilCheck)
 11633  		v.AddArg(ptr)
 11634  		v.AddArg(mem)
 11635  		return true
 11636  	}
 11637  }
 11638  func rewriteValue386_OpNot(v *Value, config *Config) bool {
 11639  	b := v.Block
 11640  	_ = b
 11641  	// match: (Not x)
 11642  	// cond:
 11643  	// result: (XORLconst [1] x)
 11644  	for {
 11645  		x := v.Args[0]
 11646  		v.reset(Op386XORLconst)
 11647  		v.AuxInt = 1
 11648  		v.AddArg(x)
 11649  		return true
 11650  	}
 11651  }
 11652  func rewriteValue386_OpOffPtr(v *Value, config *Config) bool {
 11653  	b := v.Block
 11654  	_ = b
 11655  	// match: (OffPtr [off] ptr)
 11656  	// cond:
 11657  	// result: (ADDLconst [off] ptr)
 11658  	for {
 11659  		off := v.AuxInt
 11660  		ptr := v.Args[0]
 11661  		v.reset(Op386ADDLconst)
 11662  		v.AuxInt = off
 11663  		v.AddArg(ptr)
 11664  		return true
 11665  	}
 11666  }
 11667  func rewriteValue386_OpOr16(v *Value, config *Config) bool {
 11668  	b := v.Block
 11669  	_ = b
 11670  	// match: (Or16 x y)
 11671  	// cond:
 11672  	// result: (ORL x y)
 11673  	for {
 11674  		x := v.Args[0]
 11675  		y := v.Args[1]
 11676  		v.reset(Op386ORL)
 11677  		v.AddArg(x)
 11678  		v.AddArg(y)
 11679  		return true
 11680  	}
 11681  }
 11682  func rewriteValue386_OpOr32(v *Value, config *Config) bool {
 11683  	b := v.Block
 11684  	_ = b
 11685  	// match: (Or32 x y)
 11686  	// cond:
 11687  	// result: (ORL x y)
 11688  	for {
 11689  		x := v.Args[0]
 11690  		y := v.Args[1]
 11691  		v.reset(Op386ORL)
 11692  		v.AddArg(x)
 11693  		v.AddArg(y)
 11694  		return true
 11695  	}
 11696  }
 11697  func rewriteValue386_OpOr8(v *Value, config *Config) bool {
 11698  	b := v.Block
 11699  	_ = b
 11700  	// match: (Or8  x y)
 11701  	// cond:
 11702  	// result: (ORL x y)
 11703  	for {
 11704  		x := v.Args[0]
 11705  		y := v.Args[1]
 11706  		v.reset(Op386ORL)
 11707  		v.AddArg(x)
 11708  		v.AddArg(y)
 11709  		return true
 11710  	}
 11711  }
 11712  func rewriteValue386_OpOrB(v *Value, config *Config) bool {
 11713  	b := v.Block
 11714  	_ = b
 11715  	// match: (OrB x y)
 11716  	// cond:
 11717  	// result: (ORL x y)
 11718  	for {
 11719  		x := v.Args[0]
 11720  		y := v.Args[1]
 11721  		v.reset(Op386ORL)
 11722  		v.AddArg(x)
 11723  		v.AddArg(y)
 11724  		return true
 11725  	}
 11726  }
 11727  func rewriteValue386_OpRsh16Ux16(v *Value, config *Config) bool {
 11728  	b := v.Block
 11729  	_ = b
 11730  	// match: (Rsh16Ux16 <t> x y)
 11731  	// cond:
 11732  	// result: (ANDL (SHRW <t> x y) (SBBLcarrymask <t> (CMPWconst y [16])))
 11733  	for {
 11734  		t := v.Type
 11735  		x := v.Args[0]
 11736  		y := v.Args[1]
 11737  		v.reset(Op386ANDL)
 11738  		v0 := b.NewValue0(v.Line, Op386SHRW, t)
 11739  		v0.AddArg(x)
 11740  		v0.AddArg(y)
 11741  		v.AddArg(v0)
 11742  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 11743  		v2 := b.NewValue0(v.Line, Op386CMPWconst, TypeFlags)
 11744  		v2.AuxInt = 16
 11745  		v2.AddArg(y)
 11746  		v1.AddArg(v2)
 11747  		v.AddArg(v1)
 11748  		return true
 11749  	}
 11750  }
 11751  func rewriteValue386_OpRsh16Ux32(v *Value, config *Config) bool {
 11752  	b := v.Block
 11753  	_ = b
 11754  	// match: (Rsh16Ux32 <t> x y)
 11755  	// cond:
 11756  	// result: (ANDL (SHRW <t> x y) (SBBLcarrymask <t> (CMPLconst y [16])))
 11757  	for {
 11758  		t := v.Type
 11759  		x := v.Args[0]
 11760  		y := v.Args[1]
 11761  		v.reset(Op386ANDL)
 11762  		v0 := b.NewValue0(v.Line, Op386SHRW, t)
 11763  		v0.AddArg(x)
 11764  		v0.AddArg(y)
 11765  		v.AddArg(v0)
 11766  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 11767  		v2 := b.NewValue0(v.Line, Op386CMPLconst, TypeFlags)
 11768  		v2.AuxInt = 16
 11769  		v2.AddArg(y)
 11770  		v1.AddArg(v2)
 11771  		v.AddArg(v1)
 11772  		return true
 11773  	}
 11774  }
 11775  func rewriteValue386_OpRsh16Ux64(v *Value, config *Config) bool {
 11776  	b := v.Block
 11777  	_ = b
 11778  	// match: (Rsh16Ux64 x (Const64 [c]))
 11779  	// cond: uint64(c) < 16
 11780  	// result: (SHRWconst x [c])
 11781  	for {
 11782  		x := v.Args[0]
 11783  		v_1 := v.Args[1]
 11784  		if v_1.Op != OpConst64 {
 11785  			break
 11786  		}
 11787  		c := v_1.AuxInt
 11788  		if !(uint64(c) < 16) {
 11789  			break
 11790  		}
 11791  		v.reset(Op386SHRWconst)
 11792  		v.AuxInt = c
 11793  		v.AddArg(x)
 11794  		return true
 11795  	}
 11796  	// match: (Rsh16Ux64 _ (Const64 [c]))
 11797  	// cond: uint64(c) >= 16
 11798  	// result: (Const16 [0])
 11799  	for {
 11800  		v_1 := v.Args[1]
 11801  		if v_1.Op != OpConst64 {
 11802  			break
 11803  		}
 11804  		c := v_1.AuxInt
 11805  		if !(uint64(c) >= 16) {
 11806  			break
 11807  		}
 11808  		v.reset(OpConst16)
 11809  		v.AuxInt = 0
 11810  		return true
 11811  	}
 11812  	return false
 11813  }
 11814  func rewriteValue386_OpRsh16Ux8(v *Value, config *Config) bool {
 11815  	b := v.Block
 11816  	_ = b
 11817  	// match: (Rsh16Ux8  <t> x y)
 11818  	// cond:
 11819  	// result: (ANDL (SHRW <t> x y) (SBBLcarrymask <t> (CMPBconst y [16])))
 11820  	for {
 11821  		t := v.Type
 11822  		x := v.Args[0]
 11823  		y := v.Args[1]
 11824  		v.reset(Op386ANDL)
 11825  		v0 := b.NewValue0(v.Line, Op386SHRW, t)
 11826  		v0.AddArg(x)
 11827  		v0.AddArg(y)
 11828  		v.AddArg(v0)
 11829  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 11830  		v2 := b.NewValue0(v.Line, Op386CMPBconst, TypeFlags)
 11831  		v2.AuxInt = 16
 11832  		v2.AddArg(y)
 11833  		v1.AddArg(v2)
 11834  		v.AddArg(v1)
 11835  		return true
 11836  	}
 11837  }
 11838  func rewriteValue386_OpRsh16x16(v *Value, config *Config) bool {
 11839  	b := v.Block
 11840  	_ = b
 11841  	// match: (Rsh16x16 <t> x y)
 11842  	// cond:
 11843  	// result: (SARW <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPWconst y [16])))))
 11844  	for {
 11845  		t := v.Type
 11846  		x := v.Args[0]
 11847  		y := v.Args[1]
 11848  		v.reset(Op386SARW)
 11849  		v.Type = t
 11850  		v.AddArg(x)
 11851  		v0 := b.NewValue0(v.Line, Op386ORL, y.Type)
 11852  		v0.AddArg(y)
 11853  		v1 := b.NewValue0(v.Line, Op386NOTL, y.Type)
 11854  		v2 := b.NewValue0(v.Line, Op386SBBLcarrymask, y.Type)
 11855  		v3 := b.NewValue0(v.Line, Op386CMPWconst, TypeFlags)
 11856  		v3.AuxInt = 16
 11857  		v3.AddArg(y)
 11858  		v2.AddArg(v3)
 11859  		v1.AddArg(v2)
 11860  		v0.AddArg(v1)
 11861  		v.AddArg(v0)
 11862  		return true
 11863  	}
 11864  }
 11865  func rewriteValue386_OpRsh16x32(v *Value, config *Config) bool {
 11866  	b := v.Block
 11867  	_ = b
 11868  	// match: (Rsh16x32 <t> x y)
 11869  	// cond:
 11870  	// result: (SARW <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPLconst y [16])))))
 11871  	for {
 11872  		t := v.Type
 11873  		x := v.Args[0]
 11874  		y := v.Args[1]
 11875  		v.reset(Op386SARW)
 11876  		v.Type = t
 11877  		v.AddArg(x)
 11878  		v0 := b.NewValue0(v.Line, Op386ORL, y.Type)
 11879  		v0.AddArg(y)
 11880  		v1 := b.NewValue0(v.Line, Op386NOTL, y.Type)
 11881  		v2 := b.NewValue0(v.Line, Op386SBBLcarrymask, y.Type)
 11882  		v3 := b.NewValue0(v.Line, Op386CMPLconst, TypeFlags)
 11883  		v3.AuxInt = 16
 11884  		v3.AddArg(y)
 11885  		v2.AddArg(v3)
 11886  		v1.AddArg(v2)
 11887  		v0.AddArg(v1)
 11888  		v.AddArg(v0)
 11889  		return true
 11890  	}
 11891  }
 11892  func rewriteValue386_OpRsh16x64(v *Value, config *Config) bool {
 11893  	b := v.Block
 11894  	_ = b
 11895  	// match: (Rsh16x64 x (Const64 [c]))
 11896  	// cond: uint64(c) < 16
 11897  	// result: (SARWconst x [c])
 11898  	for {
 11899  		x := v.Args[0]
 11900  		v_1 := v.Args[1]
 11901  		if v_1.Op != OpConst64 {
 11902  			break
 11903  		}
 11904  		c := v_1.AuxInt
 11905  		if !(uint64(c) < 16) {
 11906  			break
 11907  		}
 11908  		v.reset(Op386SARWconst)
 11909  		v.AuxInt = c
 11910  		v.AddArg(x)
 11911  		return true
 11912  	}
 11913  	// match: (Rsh16x64 x (Const64 [c]))
 11914  	// cond: uint64(c) >= 16
 11915  	// result: (SARWconst x [15])
 11916  	for {
 11917  		x := v.Args[0]
 11918  		v_1 := v.Args[1]
 11919  		if v_1.Op != OpConst64 {
 11920  			break
 11921  		}
 11922  		c := v_1.AuxInt
 11923  		if !(uint64(c) >= 16) {
 11924  			break
 11925  		}
 11926  		v.reset(Op386SARWconst)
 11927  		v.AuxInt = 15
 11928  		v.AddArg(x)
 11929  		return true
 11930  	}
 11931  	return false
 11932  }
 11933  func rewriteValue386_OpRsh16x8(v *Value, config *Config) bool {
 11934  	b := v.Block
 11935  	_ = b
 11936  	// match: (Rsh16x8  <t> x y)
 11937  	// cond:
 11938  	// result: (SARW <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPBconst y [16])))))
 11939  	for {
 11940  		t := v.Type
 11941  		x := v.Args[0]
 11942  		y := v.Args[1]
 11943  		v.reset(Op386SARW)
 11944  		v.Type = t
 11945  		v.AddArg(x)
 11946  		v0 := b.NewValue0(v.Line, Op386ORL, y.Type)
 11947  		v0.AddArg(y)
 11948  		v1 := b.NewValue0(v.Line, Op386NOTL, y.Type)
 11949  		v2 := b.NewValue0(v.Line, Op386SBBLcarrymask, y.Type)
 11950  		v3 := b.NewValue0(v.Line, Op386CMPBconst, TypeFlags)
 11951  		v3.AuxInt = 16
 11952  		v3.AddArg(y)
 11953  		v2.AddArg(v3)
 11954  		v1.AddArg(v2)
 11955  		v0.AddArg(v1)
 11956  		v.AddArg(v0)
 11957  		return true
 11958  	}
 11959  }
 11960  func rewriteValue386_OpRsh32Ux16(v *Value, config *Config) bool {
 11961  	b := v.Block
 11962  	_ = b
 11963  	// match: (Rsh32Ux16 <t> x y)
 11964  	// cond:
 11965  	// result: (ANDL (SHRL <t> x y) (SBBLcarrymask <t> (CMPWconst y [32])))
 11966  	for {
 11967  		t := v.Type
 11968  		x := v.Args[0]
 11969  		y := v.Args[1]
 11970  		v.reset(Op386ANDL)
 11971  		v0 := b.NewValue0(v.Line, Op386SHRL, t)
 11972  		v0.AddArg(x)
 11973  		v0.AddArg(y)
 11974  		v.AddArg(v0)
 11975  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 11976  		v2 := b.NewValue0(v.Line, Op386CMPWconst, TypeFlags)
 11977  		v2.AuxInt = 32
 11978  		v2.AddArg(y)
 11979  		v1.AddArg(v2)
 11980  		v.AddArg(v1)
 11981  		return true
 11982  	}
 11983  }
 11984  func rewriteValue386_OpRsh32Ux32(v *Value, config *Config) bool {
 11985  	b := v.Block
 11986  	_ = b
 11987  	// match: (Rsh32Ux32 <t> x y)
 11988  	// cond:
 11989  	// result: (ANDL (SHRL <t> x y) (SBBLcarrymask <t> (CMPLconst y [32])))
 11990  	for {
 11991  		t := v.Type
 11992  		x := v.Args[0]
 11993  		y := v.Args[1]
 11994  		v.reset(Op386ANDL)
 11995  		v0 := b.NewValue0(v.Line, Op386SHRL, t)
 11996  		v0.AddArg(x)
 11997  		v0.AddArg(y)
 11998  		v.AddArg(v0)
 11999  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 12000  		v2 := b.NewValue0(v.Line, Op386CMPLconst, TypeFlags)
 12001  		v2.AuxInt = 32
 12002  		v2.AddArg(y)
 12003  		v1.AddArg(v2)
 12004  		v.AddArg(v1)
 12005  		return true
 12006  	}
 12007  }
 12008  func rewriteValue386_OpRsh32Ux64(v *Value, config *Config) bool {
 12009  	b := v.Block
 12010  	_ = b
 12011  	// match: (Rsh32Ux64 x (Const64 [c]))
 12012  	// cond: uint64(c) < 32
 12013  	// result: (SHRLconst x [c])
 12014  	for {
 12015  		x := v.Args[0]
 12016  		v_1 := v.Args[1]
 12017  		if v_1.Op != OpConst64 {
 12018  			break
 12019  		}
 12020  		c := v_1.AuxInt
 12021  		if !(uint64(c) < 32) {
 12022  			break
 12023  		}
 12024  		v.reset(Op386SHRLconst)
 12025  		v.AuxInt = c
 12026  		v.AddArg(x)
 12027  		return true
 12028  	}
 12029  	// match: (Rsh32Ux64 _ (Const64 [c]))
 12030  	// cond: uint64(c) >= 32
 12031  	// result: (Const32 [0])
 12032  	for {
 12033  		v_1 := v.Args[1]
 12034  		if v_1.Op != OpConst64 {
 12035  			break
 12036  		}
 12037  		c := v_1.AuxInt
 12038  		if !(uint64(c) >= 32) {
 12039  			break
 12040  		}
 12041  		v.reset(OpConst32)
 12042  		v.AuxInt = 0
 12043  		return true
 12044  	}
 12045  	return false
 12046  }
 12047  func rewriteValue386_OpRsh32Ux8(v *Value, config *Config) bool {
 12048  	b := v.Block
 12049  	_ = b
 12050  	// match: (Rsh32Ux8  <t> x y)
 12051  	// cond:
 12052  	// result: (ANDL (SHRL <t> x y) (SBBLcarrymask <t> (CMPBconst y [32])))
 12053  	for {
 12054  		t := v.Type
 12055  		x := v.Args[0]
 12056  		y := v.Args[1]
 12057  		v.reset(Op386ANDL)
 12058  		v0 := b.NewValue0(v.Line, Op386SHRL, t)
 12059  		v0.AddArg(x)
 12060  		v0.AddArg(y)
 12061  		v.AddArg(v0)
 12062  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 12063  		v2 := b.NewValue0(v.Line, Op386CMPBconst, TypeFlags)
 12064  		v2.AuxInt = 32
 12065  		v2.AddArg(y)
 12066  		v1.AddArg(v2)
 12067  		v.AddArg(v1)
 12068  		return true
 12069  	}
 12070  }
 12071  func rewriteValue386_OpRsh32x16(v *Value, config *Config) bool {
 12072  	b := v.Block
 12073  	_ = b
 12074  	// match: (Rsh32x16 <t> x y)
 12075  	// cond:
 12076  	// result: (SARL <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPWconst y [32])))))
 12077  	for {
 12078  		t := v.Type
 12079  		x := v.Args[0]
 12080  		y := v.Args[1]
 12081  		v.reset(Op386SARL)
 12082  		v.Type = t
 12083  		v.AddArg(x)
 12084  		v0 := b.NewValue0(v.Line, Op386ORL, y.Type)
 12085  		v0.AddArg(y)
 12086  		v1 := b.NewValue0(v.Line, Op386NOTL, y.Type)
 12087  		v2 := b.NewValue0(v.Line, Op386SBBLcarrymask, y.Type)
 12088  		v3 := b.NewValue0(v.Line, Op386CMPWconst, TypeFlags)
 12089  		v3.AuxInt = 32
 12090  		v3.AddArg(y)
 12091  		v2.AddArg(v3)
 12092  		v1.AddArg(v2)
 12093  		v0.AddArg(v1)
 12094  		v.AddArg(v0)
 12095  		return true
 12096  	}
 12097  }
 12098  func rewriteValue386_OpRsh32x32(v *Value, config *Config) bool {
 12099  	b := v.Block
 12100  	_ = b
 12101  	// match: (Rsh32x32 <t> x y)
 12102  	// cond:
 12103  	// result: (SARL <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPLconst y [32])))))
 12104  	for {
 12105  		t := v.Type
 12106  		x := v.Args[0]
 12107  		y := v.Args[1]
 12108  		v.reset(Op386SARL)
 12109  		v.Type = t
 12110  		v.AddArg(x)
 12111  		v0 := b.NewValue0(v.Line, Op386ORL, y.Type)
 12112  		v0.AddArg(y)
 12113  		v1 := b.NewValue0(v.Line, Op386NOTL, y.Type)
 12114  		v2 := b.NewValue0(v.Line, Op386SBBLcarrymask, y.Type)
 12115  		v3 := b.NewValue0(v.Line, Op386CMPLconst, TypeFlags)
 12116  		v3.AuxInt = 32
 12117  		v3.AddArg(y)
 12118  		v2.AddArg(v3)
 12119  		v1.AddArg(v2)
 12120  		v0.AddArg(v1)
 12121  		v.AddArg(v0)
 12122  		return true
 12123  	}
 12124  }
 12125  func rewriteValue386_OpRsh32x64(v *Value, config *Config) bool {
 12126  	b := v.Block
 12127  	_ = b
 12128  	// match: (Rsh32x64 x (Const64 [c]))
 12129  	// cond: uint64(c) < 32
 12130  	// result: (SARLconst x [c])
 12131  	for {
 12132  		x := v.Args[0]
 12133  		v_1 := v.Args[1]
 12134  		if v_1.Op != OpConst64 {
 12135  			break
 12136  		}
 12137  		c := v_1.AuxInt
 12138  		if !(uint64(c) < 32) {
 12139  			break
 12140  		}
 12141  		v.reset(Op386SARLconst)
 12142  		v.AuxInt = c
 12143  		v.AddArg(x)
 12144  		return true
 12145  	}
 12146  	// match: (Rsh32x64 x (Const64 [c]))
 12147  	// cond: uint64(c) >= 32
 12148  	// result: (SARLconst x [31])
 12149  	for {
 12150  		x := v.Args[0]
 12151  		v_1 := v.Args[1]
 12152  		if v_1.Op != OpConst64 {
 12153  			break
 12154  		}
 12155  		c := v_1.AuxInt
 12156  		if !(uint64(c) >= 32) {
 12157  			break
 12158  		}
 12159  		v.reset(Op386SARLconst)
 12160  		v.AuxInt = 31
 12161  		v.AddArg(x)
 12162  		return true
 12163  	}
 12164  	return false
 12165  }
 12166  func rewriteValue386_OpRsh32x8(v *Value, config *Config) bool {
 12167  	b := v.Block
 12168  	_ = b
 12169  	// match: (Rsh32x8  <t> x y)
 12170  	// cond:
 12171  	// result: (SARL <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPBconst y [32])))))
 12172  	for {
 12173  		t := v.Type
 12174  		x := v.Args[0]
 12175  		y := v.Args[1]
 12176  		v.reset(Op386SARL)
 12177  		v.Type = t
 12178  		v.AddArg(x)
 12179  		v0 := b.NewValue0(v.Line, Op386ORL, y.Type)
 12180  		v0.AddArg(y)
 12181  		v1 := b.NewValue0(v.Line, Op386NOTL, y.Type)
 12182  		v2 := b.NewValue0(v.Line, Op386SBBLcarrymask, y.Type)
 12183  		v3 := b.NewValue0(v.Line, Op386CMPBconst, TypeFlags)
 12184  		v3.AuxInt = 32
 12185  		v3.AddArg(y)
 12186  		v2.AddArg(v3)
 12187  		v1.AddArg(v2)
 12188  		v0.AddArg(v1)
 12189  		v.AddArg(v0)
 12190  		return true
 12191  	}
 12192  }
 12193  func rewriteValue386_OpRsh8Ux16(v *Value, config *Config) bool {
 12194  	b := v.Block
 12195  	_ = b
 12196  	// match: (Rsh8Ux16 <t> x y)
 12197  	// cond:
 12198  	// result: (ANDL (SHRB <t> x y) (SBBLcarrymask <t> (CMPWconst y [8])))
 12199  	for {
 12200  		t := v.Type
 12201  		x := v.Args[0]
 12202  		y := v.Args[1]
 12203  		v.reset(Op386ANDL)
 12204  		v0 := b.NewValue0(v.Line, Op386SHRB, t)
 12205  		v0.AddArg(x)
 12206  		v0.AddArg(y)
 12207  		v.AddArg(v0)
 12208  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 12209  		v2 := b.NewValue0(v.Line, Op386CMPWconst, TypeFlags)
 12210  		v2.AuxInt = 8
 12211  		v2.AddArg(y)
 12212  		v1.AddArg(v2)
 12213  		v.AddArg(v1)
 12214  		return true
 12215  	}
 12216  }
 12217  func rewriteValue386_OpRsh8Ux32(v *Value, config *Config) bool {
 12218  	b := v.Block
 12219  	_ = b
 12220  	// match: (Rsh8Ux32 <t> x y)
 12221  	// cond:
 12222  	// result: (ANDL (SHRB <t> x y) (SBBLcarrymask <t> (CMPLconst y [8])))
 12223  	for {
 12224  		t := v.Type
 12225  		x := v.Args[0]
 12226  		y := v.Args[1]
 12227  		v.reset(Op386ANDL)
 12228  		v0 := b.NewValue0(v.Line, Op386SHRB, t)
 12229  		v0.AddArg(x)
 12230  		v0.AddArg(y)
 12231  		v.AddArg(v0)
 12232  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 12233  		v2 := b.NewValue0(v.Line, Op386CMPLconst, TypeFlags)
 12234  		v2.AuxInt = 8
 12235  		v2.AddArg(y)
 12236  		v1.AddArg(v2)
 12237  		v.AddArg(v1)
 12238  		return true
 12239  	}
 12240  }
 12241  func rewriteValue386_OpRsh8Ux64(v *Value, config *Config) bool {
 12242  	b := v.Block
 12243  	_ = b
 12244  	// match: (Rsh8Ux64 x (Const64 [c]))
 12245  	// cond: uint64(c) < 8
 12246  	// result: (SHRBconst x [c])
 12247  	for {
 12248  		x := v.Args[0]
 12249  		v_1 := v.Args[1]
 12250  		if v_1.Op != OpConst64 {
 12251  			break
 12252  		}
 12253  		c := v_1.AuxInt
 12254  		if !(uint64(c) < 8) {
 12255  			break
 12256  		}
 12257  		v.reset(Op386SHRBconst)
 12258  		v.AuxInt = c
 12259  		v.AddArg(x)
 12260  		return true
 12261  	}
 12262  	// match: (Rsh8Ux64 _ (Const64 [c]))
 12263  	// cond: uint64(c) >= 8
 12264  	// result: (Const8 [0])
 12265  	for {
 12266  		v_1 := v.Args[1]
 12267  		if v_1.Op != OpConst64 {
 12268  			break
 12269  		}
 12270  		c := v_1.AuxInt
 12271  		if !(uint64(c) >= 8) {
 12272  			break
 12273  		}
 12274  		v.reset(OpConst8)
 12275  		v.AuxInt = 0
 12276  		return true
 12277  	}
 12278  	return false
 12279  }
 12280  func rewriteValue386_OpRsh8Ux8(v *Value, config *Config) bool {
 12281  	b := v.Block
 12282  	_ = b
 12283  	// match: (Rsh8Ux8  <t> x y)
 12284  	// cond:
 12285  	// result: (ANDL (SHRB <t> x y) (SBBLcarrymask <t> (CMPBconst y [8])))
 12286  	for {
 12287  		t := v.Type
 12288  		x := v.Args[0]
 12289  		y := v.Args[1]
 12290  		v.reset(Op386ANDL)
 12291  		v0 := b.NewValue0(v.Line, Op386SHRB, t)
 12292  		v0.AddArg(x)
 12293  		v0.AddArg(y)
 12294  		v.AddArg(v0)
 12295  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 12296  		v2 := b.NewValue0(v.Line, Op386CMPBconst, TypeFlags)
 12297  		v2.AuxInt = 8
 12298  		v2.AddArg(y)
 12299  		v1.AddArg(v2)
 12300  		v.AddArg(v1)
 12301  		return true
 12302  	}
 12303  }
 12304  func rewriteValue386_OpRsh8x16(v *Value, config *Config) bool {
 12305  	b := v.Block
 12306  	_ = b
 12307  	// match: (Rsh8x16 <t> x y)
 12308  	// cond:
 12309  	// result: (SARB <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPWconst y [8])))))
 12310  	for {
 12311  		t := v.Type
 12312  		x := v.Args[0]
 12313  		y := v.Args[1]
 12314  		v.reset(Op386SARB)
 12315  		v.Type = t
 12316  		v.AddArg(x)
 12317  		v0 := b.NewValue0(v.Line, Op386ORL, y.Type)
 12318  		v0.AddArg(y)
 12319  		v1 := b.NewValue0(v.Line, Op386NOTL, y.Type)
 12320  		v2 := b.NewValue0(v.Line, Op386SBBLcarrymask, y.Type)
 12321  		v3 := b.NewValue0(v.Line, Op386CMPWconst, TypeFlags)
 12322  		v3.AuxInt = 8
 12323  		v3.AddArg(y)
 12324  		v2.AddArg(v3)
 12325  		v1.AddArg(v2)
 12326  		v0.AddArg(v1)
 12327  		v.AddArg(v0)
 12328  		return true
 12329  	}
 12330  }
 12331  func rewriteValue386_OpRsh8x32(v *Value, config *Config) bool {
 12332  	b := v.Block
 12333  	_ = b
 12334  	// match: (Rsh8x32 <t> x y)
 12335  	// cond:
 12336  	// result: (SARB <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPLconst y [8])))))
 12337  	for {
 12338  		t := v.Type
 12339  		x := v.Args[0]
 12340  		y := v.Args[1]
 12341  		v.reset(Op386SARB)
 12342  		v.Type = t
 12343  		v.AddArg(x)
 12344  		v0 := b.NewValue0(v.Line, Op386ORL, y.Type)
 12345  		v0.AddArg(y)
 12346  		v1 := b.NewValue0(v.Line, Op386NOTL, y.Type)
 12347  		v2 := b.NewValue0(v.Line, Op386SBBLcarrymask, y.Type)
 12348  		v3 := b.NewValue0(v.Line, Op386CMPLconst, TypeFlags)
 12349  		v3.AuxInt = 8
 12350  		v3.AddArg(y)
 12351  		v2.AddArg(v3)
 12352  		v1.AddArg(v2)
 12353  		v0.AddArg(v1)
 12354  		v.AddArg(v0)
 12355  		return true
 12356  	}
 12357  }
 12358  func rewriteValue386_OpRsh8x64(v *Value, config *Config) bool {
 12359  	b := v.Block
 12360  	_ = b
 12361  	// match: (Rsh8x64 x (Const64 [c]))
 12362  	// cond: uint64(c) < 8
 12363  	// result: (SARBconst x [c])
 12364  	for {
 12365  		x := v.Args[0]
 12366  		v_1 := v.Args[1]
 12367  		if v_1.Op != OpConst64 {
 12368  			break
 12369  		}
 12370  		c := v_1.AuxInt
 12371  		if !(uint64(c) < 8) {
 12372  			break
 12373  		}
 12374  		v.reset(Op386SARBconst)
 12375  		v.AuxInt = c
 12376  		v.AddArg(x)
 12377  		return true
 12378  	}
 12379  	// match: (Rsh8x64 x (Const64 [c]))
 12380  	// cond: uint64(c) >= 8
 12381  	// result: (SARBconst x [7])
 12382  	for {
 12383  		x := v.Args[0]
 12384  		v_1 := v.Args[1]
 12385  		if v_1.Op != OpConst64 {
 12386  			break
 12387  		}
 12388  		c := v_1.AuxInt
 12389  		if !(uint64(c) >= 8) {
 12390  			break
 12391  		}
 12392  		v.reset(Op386SARBconst)
 12393  		v.AuxInt = 7
 12394  		v.AddArg(x)
 12395  		return true
 12396  	}
 12397  	return false
 12398  }
 12399  func rewriteValue386_OpRsh8x8(v *Value, config *Config) bool {
 12400  	b := v.Block
 12401  	_ = b
 12402  	// match: (Rsh8x8  <t> x y)
 12403  	// cond:
 12404  	// result: (SARB <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPBconst y [8])))))
 12405  	for {
 12406  		t := v.Type
 12407  		x := v.Args[0]
 12408  		y := v.Args[1]
 12409  		v.reset(Op386SARB)
 12410  		v.Type = t
 12411  		v.AddArg(x)
 12412  		v0 := b.NewValue0(v.Line, Op386ORL, y.Type)
 12413  		v0.AddArg(y)
 12414  		v1 := b.NewValue0(v.Line, Op386NOTL, y.Type)
 12415  		v2 := b.NewValue0(v.Line, Op386SBBLcarrymask, y.Type)
 12416  		v3 := b.NewValue0(v.Line, Op386CMPBconst, TypeFlags)
 12417  		v3.AuxInt = 8
 12418  		v3.AddArg(y)
 12419  		v2.AddArg(v3)
 12420  		v1.AddArg(v2)
 12421  		v0.AddArg(v1)
 12422  		v.AddArg(v0)
 12423  		return true
 12424  	}
 12425  }
 12426  func rewriteValue386_OpSignExt16to32(v *Value, config *Config) bool {
 12427  	b := v.Block
 12428  	_ = b
 12429  	// match: (SignExt16to32 x)
 12430  	// cond:
 12431  	// result: (MOVWLSX x)
 12432  	for {
 12433  		x := v.Args[0]
 12434  		v.reset(Op386MOVWLSX)
 12435  		v.AddArg(x)
 12436  		return true
 12437  	}
 12438  }
 12439  func rewriteValue386_OpSignExt8to16(v *Value, config *Config) bool {
 12440  	b := v.Block
 12441  	_ = b
 12442  	// match: (SignExt8to16  x)
 12443  	// cond:
 12444  	// result: (MOVBLSX x)
 12445  	for {
 12446  		x := v.Args[0]
 12447  		v.reset(Op386MOVBLSX)
 12448  		v.AddArg(x)
 12449  		return true
 12450  	}
 12451  }
 12452  func rewriteValue386_OpSignExt8to32(v *Value, config *Config) bool {
 12453  	b := v.Block
 12454  	_ = b
 12455  	// match: (SignExt8to32  x)
 12456  	// cond:
 12457  	// result: (MOVBLSX x)
 12458  	for {
 12459  		x := v.Args[0]
 12460  		v.reset(Op386MOVBLSX)
 12461  		v.AddArg(x)
 12462  		return true
 12463  	}
 12464  }
 12465  func rewriteValue386_OpSignmask(v *Value, config *Config) bool {
 12466  	b := v.Block
 12467  	_ = b
 12468  	// match: (Signmask x)
 12469  	// cond:
 12470  	// result: (SARLconst x [31])
 12471  	for {
 12472  		x := v.Args[0]
 12473  		v.reset(Op386SARLconst)
 12474  		v.AuxInt = 31
 12475  		v.AddArg(x)
 12476  		return true
 12477  	}
 12478  }
 12479  func rewriteValue386_OpSlicemask(v *Value, config *Config) bool {
 12480  	b := v.Block
 12481  	_ = b
 12482  	// match: (Slicemask <t> x)
 12483  	// cond:
 12484  	// result: (XORLconst [-1] (SARLconst <t> (SUBLconst <t> x [1]) [31]))
 12485  	for {
 12486  		t := v.Type
 12487  		x := v.Args[0]
 12488  		v.reset(Op386XORLconst)
 12489  		v.AuxInt = -1
 12490  		v0 := b.NewValue0(v.Line, Op386SARLconst, t)
 12491  		v0.AuxInt = 31
 12492  		v1 := b.NewValue0(v.Line, Op386SUBLconst, t)
 12493  		v1.AuxInt = 1
 12494  		v1.AddArg(x)
 12495  		v0.AddArg(v1)
 12496  		v.AddArg(v0)
 12497  		return true
 12498  	}
 12499  }
 12500  func rewriteValue386_OpSqrt(v *Value, config *Config) bool {
 12501  	b := v.Block
 12502  	_ = b
 12503  	// match: (Sqrt x)
 12504  	// cond:
 12505  	// result: (SQRTSD x)
 12506  	for {
 12507  		x := v.Args[0]
 12508  		v.reset(Op386SQRTSD)
 12509  		v.AddArg(x)
 12510  		return true
 12511  	}
 12512  }
 12513  func rewriteValue386_OpStaticCall(v *Value, config *Config) bool {
 12514  	b := v.Block
 12515  	_ = b
 12516  	// match: (StaticCall [argwid] {target} mem)
 12517  	// cond:
 12518  	// result: (CALLstatic [argwid] {target} mem)
 12519  	for {
 12520  		argwid := v.AuxInt
 12521  		target := v.Aux
 12522  		mem := v.Args[0]
 12523  		v.reset(Op386CALLstatic)
 12524  		v.AuxInt = argwid
 12525  		v.Aux = target
 12526  		v.AddArg(mem)
 12527  		return true
 12528  	}
 12529  }
 12530  func rewriteValue386_OpStore(v *Value, config *Config) bool {
 12531  	b := v.Block
 12532  	_ = b
 12533  	// match: (Store [8] ptr val mem)
 12534  	// cond: is64BitFloat(val.Type)
 12535  	// result: (MOVSDstore ptr val mem)
 12536  	for {
 12537  		if v.AuxInt != 8 {
 12538  			break
 12539  		}
 12540  		ptr := v.Args[0]
 12541  		val := v.Args[1]
 12542  		mem := v.Args[2]
 12543  		if !(is64BitFloat(val.Type)) {
 12544  			break
 12545  		}
 12546  		v.reset(Op386MOVSDstore)
 12547  		v.AddArg(ptr)
 12548  		v.AddArg(val)
 12549  		v.AddArg(mem)
 12550  		return true
 12551  	}
 12552  	// match: (Store [4] ptr val mem)
 12553  	// cond: is32BitFloat(val.Type)
 12554  	// result: (MOVSSstore ptr val mem)
 12555  	for {
 12556  		if v.AuxInt != 4 {
 12557  			break
 12558  		}
 12559  		ptr := v.Args[0]
 12560  		val := v.Args[1]
 12561  		mem := v.Args[2]
 12562  		if !(is32BitFloat(val.Type)) {
 12563  			break
 12564  		}
 12565  		v.reset(Op386MOVSSstore)
 12566  		v.AddArg(ptr)
 12567  		v.AddArg(val)
 12568  		v.AddArg(mem)
 12569  		return true
 12570  	}
 12571  	// match: (Store [4] ptr val mem)
 12572  	// cond:
 12573  	// result: (MOVLstore ptr val mem)
 12574  	for {
 12575  		if v.AuxInt != 4 {
 12576  			break
 12577  		}
 12578  		ptr := v.Args[0]
 12579  		val := v.Args[1]
 12580  		mem := v.Args[2]
 12581  		v.reset(Op386MOVLstore)
 12582  		v.AddArg(ptr)
 12583  		v.AddArg(val)
 12584  		v.AddArg(mem)
 12585  		return true
 12586  	}
 12587  	// match: (Store [2] ptr val mem)
 12588  	// cond:
 12589  	// result: (MOVWstore ptr val mem)
 12590  	for {
 12591  		if v.AuxInt != 2 {
 12592  			break
 12593  		}
 12594  		ptr := v.Args[0]
 12595  		val := v.Args[1]
 12596  		mem := v.Args[2]
 12597  		v.reset(Op386MOVWstore)
 12598  		v.AddArg(ptr)
 12599  		v.AddArg(val)
 12600  		v.AddArg(mem)
 12601  		return true
 12602  	}
 12603  	// match: (Store [1] ptr val mem)
 12604  	// cond:
 12605  	// result: (MOVBstore ptr val mem)
 12606  	for {
 12607  		if v.AuxInt != 1 {
 12608  			break
 12609  		}
 12610  		ptr := v.Args[0]
 12611  		val := v.Args[1]
 12612  		mem := v.Args[2]
 12613  		v.reset(Op386MOVBstore)
 12614  		v.AddArg(ptr)
 12615  		v.AddArg(val)
 12616  		v.AddArg(mem)
 12617  		return true
 12618  	}
 12619  	return false
 12620  }
 12621  func rewriteValue386_OpSub16(v *Value, config *Config) bool {
 12622  	b := v.Block
 12623  	_ = b
 12624  	// match: (Sub16  x y)
 12625  	// cond:
 12626  	// result: (SUBL  x y)
 12627  	for {
 12628  		x := v.Args[0]
 12629  		y := v.Args[1]
 12630  		v.reset(Op386SUBL)
 12631  		v.AddArg(x)
 12632  		v.AddArg(y)
 12633  		return true
 12634  	}
 12635  }
 12636  func rewriteValue386_OpSub32(v *Value, config *Config) bool {
 12637  	b := v.Block
 12638  	_ = b
 12639  	// match: (Sub32  x y)
 12640  	// cond:
 12641  	// result: (SUBL  x y)
 12642  	for {
 12643  		x := v.Args[0]
 12644  		y := v.Args[1]
 12645  		v.reset(Op386SUBL)
 12646  		v.AddArg(x)
 12647  		v.AddArg(y)
 12648  		return true
 12649  	}
 12650  }
 12651  func rewriteValue386_OpSub32F(v *Value, config *Config) bool {
 12652  	b := v.Block
 12653  	_ = b
 12654  	// match: (Sub32F x y)
 12655  	// cond:
 12656  	// result: (SUBSS x y)
 12657  	for {
 12658  		x := v.Args[0]
 12659  		y := v.Args[1]
 12660  		v.reset(Op386SUBSS)
 12661  		v.AddArg(x)
 12662  		v.AddArg(y)
 12663  		return true
 12664  	}
 12665  }
 12666  func rewriteValue386_OpSub32carry(v *Value, config *Config) bool {
 12667  	b := v.Block
 12668  	_ = b
 12669  	// match: (Sub32carry x y)
 12670  	// cond:
 12671  	// result: (SUBLcarry x y)
 12672  	for {
 12673  		x := v.Args[0]
 12674  		y := v.Args[1]
 12675  		v.reset(Op386SUBLcarry)
 12676  		v.AddArg(x)
 12677  		v.AddArg(y)
 12678  		return true
 12679  	}
 12680  }
 12681  func rewriteValue386_OpSub32withcarry(v *Value, config *Config) bool {
 12682  	b := v.Block
 12683  	_ = b
 12684  	// match: (Sub32withcarry x y c)
 12685  	// cond:
 12686  	// result: (SBBL x y c)
 12687  	for {
 12688  		x := v.Args[0]
 12689  		y := v.Args[1]
 12690  		c := v.Args[2]
 12691  		v.reset(Op386SBBL)
 12692  		v.AddArg(x)
 12693  		v.AddArg(y)
 12694  		v.AddArg(c)
 12695  		return true
 12696  	}
 12697  }
 12698  func rewriteValue386_OpSub64F(v *Value, config *Config) bool {
 12699  	b := v.Block
 12700  	_ = b
 12701  	// match: (Sub64F x y)
 12702  	// cond:
 12703  	// result: (SUBSD x y)
 12704  	for {
 12705  		x := v.Args[0]
 12706  		y := v.Args[1]
 12707  		v.reset(Op386SUBSD)
 12708  		v.AddArg(x)
 12709  		v.AddArg(y)
 12710  		return true
 12711  	}
 12712  }
 12713  func rewriteValue386_OpSub8(v *Value, config *Config) bool {
 12714  	b := v.Block
 12715  	_ = b
 12716  	// match: (Sub8   x y)
 12717  	// cond:
 12718  	// result: (SUBL  x y)
 12719  	for {
 12720  		x := v.Args[0]
 12721  		y := v.Args[1]
 12722  		v.reset(Op386SUBL)
 12723  		v.AddArg(x)
 12724  		v.AddArg(y)
 12725  		return true
 12726  	}
 12727  }
 12728  func rewriteValue386_OpSubPtr(v *Value, config *Config) bool {
 12729  	b := v.Block
 12730  	_ = b
 12731  	// match: (SubPtr x y)
 12732  	// cond:
 12733  	// result: (SUBL  x y)
 12734  	for {
 12735  		x := v.Args[0]
 12736  		y := v.Args[1]
 12737  		v.reset(Op386SUBL)
 12738  		v.AddArg(x)
 12739  		v.AddArg(y)
 12740  		return true
 12741  	}
 12742  }
 12743  func rewriteValue386_OpTrunc16to8(v *Value, config *Config) bool {
 12744  	b := v.Block
 12745  	_ = b
 12746  	// match: (Trunc16to8  x)
 12747  	// cond:
 12748  	// result: x
 12749  	for {
 12750  		x := v.Args[0]
 12751  		v.reset(OpCopy)
 12752  		v.Type = x.Type
 12753  		v.AddArg(x)
 12754  		return true
 12755  	}
 12756  }
 12757  func rewriteValue386_OpTrunc32to16(v *Value, config *Config) bool {
 12758  	b := v.Block
 12759  	_ = b
 12760  	// match: (Trunc32to16 x)
 12761  	// cond:
 12762  	// result: x
 12763  	for {
 12764  		x := v.Args[0]
 12765  		v.reset(OpCopy)
 12766  		v.Type = x.Type
 12767  		v.AddArg(x)
 12768  		return true
 12769  	}
 12770  }
 12771  func rewriteValue386_OpTrunc32to8(v *Value, config *Config) bool {
 12772  	b := v.Block
 12773  	_ = b
 12774  	// match: (Trunc32to8  x)
 12775  	// cond:
 12776  	// result: x
 12777  	for {
 12778  		x := v.Args[0]
 12779  		v.reset(OpCopy)
 12780  		v.Type = x.Type
 12781  		v.AddArg(x)
 12782  		return true
 12783  	}
 12784  }
 12785  func rewriteValue386_OpXor16(v *Value, config *Config) bool {
 12786  	b := v.Block
 12787  	_ = b
 12788  	// match: (Xor16 x y)
 12789  	// cond:
 12790  	// result: (XORL x y)
 12791  	for {
 12792  		x := v.Args[0]
 12793  		y := v.Args[1]
 12794  		v.reset(Op386XORL)
 12795  		v.AddArg(x)
 12796  		v.AddArg(y)
 12797  		return true
 12798  	}
 12799  }
 12800  func rewriteValue386_OpXor32(v *Value, config *Config) bool {
 12801  	b := v.Block
 12802  	_ = b
 12803  	// match: (Xor32 x y)
 12804  	// cond:
 12805  	// result: (XORL x y)
 12806  	for {
 12807  		x := v.Args[0]
 12808  		y := v.Args[1]
 12809  		v.reset(Op386XORL)
 12810  		v.AddArg(x)
 12811  		v.AddArg(y)
 12812  		return true
 12813  	}
 12814  }
 12815  func rewriteValue386_OpXor8(v *Value, config *Config) bool {
 12816  	b := v.Block
 12817  	_ = b
 12818  	// match: (Xor8  x y)
 12819  	// cond:
 12820  	// result: (XORL x y)
 12821  	for {
 12822  		x := v.Args[0]
 12823  		y := v.Args[1]
 12824  		v.reset(Op386XORL)
 12825  		v.AddArg(x)
 12826  		v.AddArg(y)
 12827  		return true
 12828  	}
 12829  }
 12830  func rewriteValue386_OpZero(v *Value, config *Config) bool {
 12831  	b := v.Block
 12832  	_ = b
 12833  	// match: (Zero [s] _ mem)
 12834  	// cond: SizeAndAlign(s).Size() == 0
 12835  	// result: mem
 12836  	for {
 12837  		s := v.AuxInt
 12838  		mem := v.Args[1]
 12839  		if !(SizeAndAlign(s).Size() == 0) {
 12840  			break
 12841  		}
 12842  		v.reset(OpCopy)
 12843  		v.Type = mem.Type
 12844  		v.AddArg(mem)
 12845  		return true
 12846  	}
 12847  	// match: (Zero [s] destptr mem)
 12848  	// cond: SizeAndAlign(s).Size() == 1
 12849  	// result: (MOVBstoreconst [0] destptr mem)
 12850  	for {
 12851  		s := v.AuxInt
 12852  		destptr := v.Args[0]
 12853  		mem := v.Args[1]
 12854  		if !(SizeAndAlign(s).Size() == 1) {
 12855  			break
 12856  		}
 12857  		v.reset(Op386MOVBstoreconst)
 12858  		v.AuxInt = 0
 12859  		v.AddArg(destptr)
 12860  		v.AddArg(mem)
 12861  		return true
 12862  	}
 12863  	// match: (Zero [s] destptr mem)
 12864  	// cond: SizeAndAlign(s).Size() == 2
 12865  	// result: (MOVWstoreconst [0] destptr mem)
 12866  	for {
 12867  		s := v.AuxInt
 12868  		destptr := v.Args[0]
 12869  		mem := v.Args[1]
 12870  		if !(SizeAndAlign(s).Size() == 2) {
 12871  			break
 12872  		}
 12873  		v.reset(Op386MOVWstoreconst)
 12874  		v.AuxInt = 0
 12875  		v.AddArg(destptr)
 12876  		v.AddArg(mem)
 12877  		return true
 12878  	}
 12879  	// match: (Zero [s] destptr mem)
 12880  	// cond: SizeAndAlign(s).Size() == 4
 12881  	// result: (MOVLstoreconst [0] destptr mem)
 12882  	for {
 12883  		s := v.AuxInt
 12884  		destptr := v.Args[0]
 12885  		mem := v.Args[1]
 12886  		if !(SizeAndAlign(s).Size() == 4) {
 12887  			break
 12888  		}
 12889  		v.reset(Op386MOVLstoreconst)
 12890  		v.AuxInt = 0
 12891  		v.AddArg(destptr)
 12892  		v.AddArg(mem)
 12893  		return true
 12894  	}
 12895  	// match: (Zero [s] destptr mem)
 12896  	// cond: SizeAndAlign(s).Size() == 3
 12897  	// result: (MOVBstoreconst [makeValAndOff(0,2)] destptr 		(MOVWstoreconst [0] destptr mem))
 12898  	for {
 12899  		s := v.AuxInt
 12900  		destptr := v.Args[0]
 12901  		mem := v.Args[1]
 12902  		if !(SizeAndAlign(s).Size() == 3) {
 12903  			break
 12904  		}
 12905  		v.reset(Op386MOVBstoreconst)
 12906  		v.AuxInt = makeValAndOff(0, 2)
 12907  		v.AddArg(destptr)
 12908  		v0 := b.NewValue0(v.Line, Op386MOVWstoreconst, TypeMem)
 12909  		v0.AuxInt = 0
 12910  		v0.AddArg(destptr)
 12911  		v0.AddArg(mem)
 12912  		v.AddArg(v0)
 12913  		return true
 12914  	}
 12915  	// match: (Zero [s] destptr mem)
 12916  	// cond: SizeAndAlign(s).Size() == 5
 12917  	// result: (MOVBstoreconst [makeValAndOff(0,4)] destptr 		(MOVLstoreconst [0] destptr mem))
 12918  	for {
 12919  		s := v.AuxInt
 12920  		destptr := v.Args[0]
 12921  		mem := v.Args[1]
 12922  		if !(SizeAndAlign(s).Size() == 5) {
 12923  			break
 12924  		}
 12925  		v.reset(Op386MOVBstoreconst)
 12926  		v.AuxInt = makeValAndOff(0, 4)
 12927  		v.AddArg(destptr)
 12928  		v0 := b.NewValue0(v.Line, Op386MOVLstoreconst, TypeMem)
 12929  		v0.AuxInt = 0
 12930  		v0.AddArg(destptr)
 12931  		v0.AddArg(mem)
 12932  		v.AddArg(v0)
 12933  		return true
 12934  	}
 12935  	// match: (Zero [s] destptr mem)
 12936  	// cond: SizeAndAlign(s).Size() == 6
 12937  	// result: (MOVWstoreconst [makeValAndOff(0,4)] destptr 		(MOVLstoreconst [0] destptr mem))
 12938  	for {
 12939  		s := v.AuxInt
 12940  		destptr := v.Args[0]
 12941  		mem := v.Args[1]
 12942  		if !(SizeAndAlign(s).Size() == 6) {
 12943  			break
 12944  		}
 12945  		v.reset(Op386MOVWstoreconst)
 12946  		v.AuxInt = makeValAndOff(0, 4)
 12947  		v.AddArg(destptr)
 12948  		v0 := b.NewValue0(v.Line, Op386MOVLstoreconst, TypeMem)
 12949  		v0.AuxInt = 0
 12950  		v0.AddArg(destptr)
 12951  		v0.AddArg(mem)
 12952  		v.AddArg(v0)
 12953  		return true
 12954  	}
 12955  	// match: (Zero [s] destptr mem)
 12956  	// cond: SizeAndAlign(s).Size() == 7
 12957  	// result: (MOVLstoreconst [makeValAndOff(0,3)] destptr 		(MOVLstoreconst [0] destptr mem))
 12958  	for {
 12959  		s := v.AuxInt
 12960  		destptr := v.Args[0]
 12961  		mem := v.Args[1]
 12962  		if !(SizeAndAlign(s).Size() == 7) {
 12963  			break
 12964  		}
 12965  		v.reset(Op386MOVLstoreconst)
 12966  		v.AuxInt = makeValAndOff(0, 3)
 12967  		v.AddArg(destptr)
 12968  		v0 := b.NewValue0(v.Line, Op386MOVLstoreconst, TypeMem)
 12969  		v0.AuxInt = 0
 12970  		v0.AddArg(destptr)
 12971  		v0.AddArg(mem)
 12972  		v.AddArg(v0)
 12973  		return true
 12974  	}
 12975  	// match: (Zero [s] destptr mem)
 12976  	// cond: SizeAndAlign(s).Size()%4 != 0 && SizeAndAlign(s).Size() > 4
 12977  	// result: (Zero [SizeAndAlign(s).Size()-SizeAndAlign(s).Size()%4] (ADDLconst destptr [SizeAndAlign(s).Size()%4]) 		(MOVLstoreconst [0] destptr mem))
 12978  	for {
 12979  		s := v.AuxInt
 12980  		destptr := v.Args[0]
 12981  		mem := v.Args[1]
 12982  		if !(SizeAndAlign(s).Size()%4 != 0 && SizeAndAlign(s).Size() > 4) {
 12983  			break
 12984  		}
 12985  		v.reset(OpZero)
 12986  		v.AuxInt = SizeAndAlign(s).Size() - SizeAndAlign(s).Size()%4
 12987  		v0 := b.NewValue0(v.Line, Op386ADDLconst, config.fe.TypeUInt32())
 12988  		v0.AuxInt = SizeAndAlign(s).Size() % 4
 12989  		v0.AddArg(destptr)
 12990  		v.AddArg(v0)
 12991  		v1 := b.NewValue0(v.Line, Op386MOVLstoreconst, TypeMem)
 12992  		v1.AuxInt = 0
 12993  		v1.AddArg(destptr)
 12994  		v1.AddArg(mem)
 12995  		v.AddArg(v1)
 12996  		return true
 12997  	}
 12998  	// match: (Zero [s] destptr mem)
 12999  	// cond: SizeAndAlign(s).Size() == 8
 13000  	// result: (MOVLstoreconst [makeValAndOff(0,4)] destptr 		(MOVLstoreconst [0] destptr mem))
 13001  	for {
 13002  		s := v.AuxInt
 13003  		destptr := v.Args[0]
 13004  		mem := v.Args[1]
 13005  		if !(SizeAndAlign(s).Size() == 8) {
 13006  			break
 13007  		}
 13008  		v.reset(Op386MOVLstoreconst)
 13009  		v.AuxInt = makeValAndOff(0, 4)
 13010  		v.AddArg(destptr)
 13011  		v0 := b.NewValue0(v.Line, Op386MOVLstoreconst, TypeMem)
 13012  		v0.AuxInt = 0
 13013  		v0.AddArg(destptr)
 13014  		v0.AddArg(mem)
 13015  		v.AddArg(v0)
 13016  		return true
 13017  	}
 13018  	// match: (Zero [s] destptr mem)
 13019  	// cond: SizeAndAlign(s).Size() == 12
 13020  	// result: (MOVLstoreconst [makeValAndOff(0,8)] destptr 		(MOVLstoreconst [makeValAndOff(0,4)] destptr 			(MOVLstoreconst [0] destptr mem)))
 13021  	for {
 13022  		s := v.AuxInt
 13023  		destptr := v.Args[0]
 13024  		mem := v.Args[1]
 13025  		if !(SizeAndAlign(s).Size() == 12) {
 13026  			break
 13027  		}
 13028  		v.reset(Op386MOVLstoreconst)
 13029  		v.AuxInt = makeValAndOff(0, 8)
 13030  		v.AddArg(destptr)
 13031  		v0 := b.NewValue0(v.Line, Op386MOVLstoreconst, TypeMem)
 13032  		v0.AuxInt = makeValAndOff(0, 4)
 13033  		v0.AddArg(destptr)
 13034  		v1 := b.NewValue0(v.Line, Op386MOVLstoreconst, TypeMem)
 13035  		v1.AuxInt = 0
 13036  		v1.AddArg(destptr)
 13037  		v1.AddArg(mem)
 13038  		v0.AddArg(v1)
 13039  		v.AddArg(v0)
 13040  		return true
 13041  	}
 13042  	// match: (Zero [s] destptr mem)
 13043  	// cond: SizeAndAlign(s).Size() == 16
 13044  	// result: (MOVLstoreconst [makeValAndOff(0,12)] destptr 		(MOVLstoreconst [makeValAndOff(0,8)] destptr 			(MOVLstoreconst [makeValAndOff(0,4)] destptr 				(MOVLstoreconst [0] destptr mem))))
 13045  	for {
 13046  		s := v.AuxInt
 13047  		destptr := v.Args[0]
 13048  		mem := v.Args[1]
 13049  		if !(SizeAndAlign(s).Size() == 16) {
 13050  			break
 13051  		}
 13052  		v.reset(Op386MOVLstoreconst)
 13053  		v.AuxInt = makeValAndOff(0, 12)
 13054  		v.AddArg(destptr)
 13055  		v0 := b.NewValue0(v.Line, Op386MOVLstoreconst, TypeMem)
 13056  		v0.AuxInt = makeValAndOff(0, 8)
 13057  		v0.AddArg(destptr)
 13058  		v1 := b.NewValue0(v.Line, Op386MOVLstoreconst, TypeMem)
 13059  		v1.AuxInt = makeValAndOff(0, 4)
 13060  		v1.AddArg(destptr)
 13061  		v2 := b.NewValue0(v.Line, Op386MOVLstoreconst, TypeMem)
 13062  		v2.AuxInt = 0
 13063  		v2.AddArg(destptr)
 13064  		v2.AddArg(mem)
 13065  		v1.AddArg(v2)
 13066  		v0.AddArg(v1)
 13067  		v.AddArg(v0)
 13068  		return true
 13069  	}
 13070  	// match: (Zero [s] destptr mem)
 13071  	// cond: SizeAndAlign(s).Size() > 16   && SizeAndAlign(s).Size() <= 4*128   && SizeAndAlign(s).Size()%4 == 0   && !config.noDuffDevice
 13072  	// result: (DUFFZERO [1*(128-SizeAndAlign(s).Size()/4)] destptr (MOVLconst [0]) mem)
 13073  	for {
 13074  		s := v.AuxInt
 13075  		destptr := v.Args[0]
 13076  		mem := v.Args[1]
 13077  		if !(SizeAndAlign(s).Size() > 16 && SizeAndAlign(s).Size() <= 4*128 && SizeAndAlign(s).Size()%4 == 0 && !config.noDuffDevice) {
 13078  			break
 13079  		}
 13080  		v.reset(Op386DUFFZERO)
 13081  		v.AuxInt = 1 * (128 - SizeAndAlign(s).Size()/4)
 13082  		v.AddArg(destptr)
 13083  		v0 := b.NewValue0(v.Line, Op386MOVLconst, config.fe.TypeUInt32())
 13084  		v0.AuxInt = 0
 13085  		v.AddArg(v0)
 13086  		v.AddArg(mem)
 13087  		return true
 13088  	}
 13089  	// match: (Zero [s] destptr mem)
 13090  	// cond: (SizeAndAlign(s).Size() > 4*128 || (config.noDuffDevice && SizeAndAlign(s).Size() > 16))   && SizeAndAlign(s).Size()%4 == 0
 13091  	// result: (REPSTOSL destptr (MOVLconst [SizeAndAlign(s).Size()/4]) (MOVLconst [0]) mem)
 13092  	for {
 13093  		s := v.AuxInt
 13094  		destptr := v.Args[0]
 13095  		mem := v.Args[1]
 13096  		if !((SizeAndAlign(s).Size() > 4*128 || (config.noDuffDevice && SizeAndAlign(s).Size() > 16)) && SizeAndAlign(s).Size()%4 == 0) {
 13097  			break
 13098  		}
 13099  		v.reset(Op386REPSTOSL)
 13100  		v.AddArg(destptr)
 13101  		v0 := b.NewValue0(v.Line, Op386MOVLconst, config.fe.TypeUInt32())
 13102  		v0.AuxInt = SizeAndAlign(s).Size() / 4
 13103  		v.AddArg(v0)
 13104  		v1 := b.NewValue0(v.Line, Op386MOVLconst, config.fe.TypeUInt32())
 13105  		v1.AuxInt = 0
 13106  		v.AddArg(v1)
 13107  		v.AddArg(mem)
 13108  		return true
 13109  	}
 13110  	return false
 13111  }
 13112  func rewriteValue386_OpZeroExt16to32(v *Value, config *Config) bool {
 13113  	b := v.Block
 13114  	_ = b
 13115  	// match: (ZeroExt16to32 x)
 13116  	// cond:
 13117  	// result: (MOVWLZX x)
 13118  	for {
 13119  		x := v.Args[0]
 13120  		v.reset(Op386MOVWLZX)
 13121  		v.AddArg(x)
 13122  		return true
 13123  	}
 13124  }
 13125  func rewriteValue386_OpZeroExt8to16(v *Value, config *Config) bool {
 13126  	b := v.Block
 13127  	_ = b
 13128  	// match: (ZeroExt8to16  x)
 13129  	// cond:
 13130  	// result: (MOVBLZX x)
 13131  	for {
 13132  		x := v.Args[0]
 13133  		v.reset(Op386MOVBLZX)
 13134  		v.AddArg(x)
 13135  		return true
 13136  	}
 13137  }
 13138  func rewriteValue386_OpZeroExt8to32(v *Value, config *Config) bool {
 13139  	b := v.Block
 13140  	_ = b
 13141  	// match: (ZeroExt8to32  x)
 13142  	// cond:
 13143  	// result: (MOVBLZX x)
 13144  	for {
 13145  		x := v.Args[0]
 13146  		v.reset(Op386MOVBLZX)
 13147  		v.AddArg(x)
 13148  		return true
 13149  	}
 13150  }
 13151  func rewriteValue386_OpZeromask(v *Value, config *Config) bool {
 13152  	b := v.Block
 13153  	_ = b
 13154  	// match: (Zeromask <t> x)
 13155  	// cond:
 13156  	// result: (XORLconst [-1] (SBBLcarrymask <t> (CMPLconst x [1])))
 13157  	for {
 13158  		t := v.Type
 13159  		x := v.Args[0]
 13160  		v.reset(Op386XORLconst)
 13161  		v.AuxInt = -1
 13162  		v0 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 13163  		v1 := b.NewValue0(v.Line, Op386CMPLconst, TypeFlags)
 13164  		v1.AuxInt = 1
 13165  		v1.AddArg(x)
 13166  		v0.AddArg(v1)
 13167  		v.AddArg(v0)
 13168  		return true
 13169  	}
 13170  }
 13171  func rewriteBlock386(b *Block, config *Config) bool {
 13172  	switch b.Kind {
 13173  	case Block386EQ:
 13174  		// match: (EQ (InvertFlags cmp) yes no)
 13175  		// cond:
 13176  		// result: (EQ cmp yes no)
 13177  		for {
 13178  			v := b.Control
 13179  			if v.Op != Op386InvertFlags {
 13180  				break
 13181  			}
 13182  			cmp := v.Args[0]
 13183  			yes := b.Succs[0]
 13184  			no := b.Succs[1]
 13185  			b.Kind = Block386EQ
 13186  			b.SetControl(cmp)
 13187  			_ = yes
 13188  			_ = no
 13189  			return true
 13190  		}
 13191  		// match: (EQ (FlagEQ) yes no)
 13192  		// cond:
 13193  		// result: (First nil yes no)
 13194  		for {
 13195  			v := b.Control
 13196  			if v.Op != Op386FlagEQ {
 13197  				break
 13198  			}
 13199  			yes := b.Succs[0]
 13200  			no := b.Succs[1]
 13201  			b.Kind = BlockFirst
 13202  			b.SetControl(nil)
 13203  			_ = yes
 13204  			_ = no
 13205  			return true
 13206  		}
 13207  		// match: (EQ (FlagLT_ULT) yes no)
 13208  		// cond:
 13209  		// result: (First nil no yes)
 13210  		for {
 13211  			v := b.Control
 13212  			if v.Op != Op386FlagLT_ULT {
 13213  				break
 13214  			}
 13215  			yes := b.Succs[0]
 13216  			no := b.Succs[1]
 13217  			b.Kind = BlockFirst
 13218  			b.SetControl(nil)
 13219  			b.swapSuccessors()
 13220  			_ = no
 13221  			_ = yes
 13222  			return true
 13223  		}
 13224  		// match: (EQ (FlagLT_UGT) yes no)
 13225  		// cond:
 13226  		// result: (First nil no yes)
 13227  		for {
 13228  			v := b.Control
 13229  			if v.Op != Op386FlagLT_UGT {
 13230  				break
 13231  			}
 13232  			yes := b.Succs[0]
 13233  			no := b.Succs[1]
 13234  			b.Kind = BlockFirst
 13235  			b.SetControl(nil)
 13236  			b.swapSuccessors()
 13237  			_ = no
 13238  			_ = yes
 13239  			return true
 13240  		}
 13241  		// match: (EQ (FlagGT_ULT) yes no)
 13242  		// cond:
 13243  		// result: (First nil no yes)
 13244  		for {
 13245  			v := b.Control
 13246  			if v.Op != Op386FlagGT_ULT {
 13247  				break
 13248  			}
 13249  			yes := b.Succs[0]
 13250  			no := b.Succs[1]
 13251  			b.Kind = BlockFirst
 13252  			b.SetControl(nil)
 13253  			b.swapSuccessors()
 13254  			_ = no
 13255  			_ = yes
 13256  			return true
 13257  		}
 13258  		// match: (EQ (FlagGT_UGT) yes no)
 13259  		// cond:
 13260  		// result: (First nil no yes)
 13261  		for {
 13262  			v := b.Control
 13263  			if v.Op != Op386FlagGT_UGT {
 13264  				break
 13265  			}
 13266  			yes := b.Succs[0]
 13267  			no := b.Succs[1]
 13268  			b.Kind = BlockFirst
 13269  			b.SetControl(nil)
 13270  			b.swapSuccessors()
 13271  			_ = no
 13272  			_ = yes
 13273  			return true
 13274  		}
 13275  	case Block386GE:
 13276  		// match: (GE (InvertFlags cmp) yes no)
 13277  		// cond:
 13278  		// result: (LE cmp yes no)
 13279  		for {
 13280  			v := b.Control
 13281  			if v.Op != Op386InvertFlags {
 13282  				break
 13283  			}
 13284  			cmp := v.Args[0]
 13285  			yes := b.Succs[0]
 13286  			no := b.Succs[1]
 13287  			b.Kind = Block386LE
 13288  			b.SetControl(cmp)
 13289  			_ = yes
 13290  			_ = no
 13291  			return true
 13292  		}
 13293  		// match: (GE (FlagEQ) yes no)
 13294  		// cond:
 13295  		// result: (First nil yes no)
 13296  		for {
 13297  			v := b.Control
 13298  			if v.Op != Op386FlagEQ {
 13299  				break
 13300  			}
 13301  			yes := b.Succs[0]
 13302  			no := b.Succs[1]
 13303  			b.Kind = BlockFirst
 13304  			b.SetControl(nil)
 13305  			_ = yes
 13306  			_ = no
 13307  			return true
 13308  		}
 13309  		// match: (GE (FlagLT_ULT) yes no)
 13310  		// cond:
 13311  		// result: (First nil no yes)
 13312  		for {
 13313  			v := b.Control
 13314  			if v.Op != Op386FlagLT_ULT {
 13315  				break
 13316  			}
 13317  			yes := b.Succs[0]
 13318  			no := b.Succs[1]
 13319  			b.Kind = BlockFirst
 13320  			b.SetControl(nil)
 13321  			b.swapSuccessors()
 13322  			_ = no
 13323  			_ = yes
 13324  			return true
 13325  		}
 13326  		// match: (GE (FlagLT_UGT) yes no)
 13327  		// cond:
 13328  		// result: (First nil no yes)
 13329  		for {
 13330  			v := b.Control
 13331  			if v.Op != Op386FlagLT_UGT {
 13332  				break
 13333  			}
 13334  			yes := b.Succs[0]
 13335  			no := b.Succs[1]
 13336  			b.Kind = BlockFirst
 13337  			b.SetControl(nil)
 13338  			b.swapSuccessors()
 13339  			_ = no
 13340  			_ = yes
 13341  			return true
 13342  		}
 13343  		// match: (GE (FlagGT_ULT) yes no)
 13344  		// cond:
 13345  		// result: (First nil yes no)
 13346  		for {
 13347  			v := b.Control
 13348  			if v.Op != Op386FlagGT_ULT {
 13349  				break
 13350  			}
 13351  			yes := b.Succs[0]
 13352  			no := b.Succs[1]
 13353  			b.Kind = BlockFirst
 13354  			b.SetControl(nil)
 13355  			_ = yes
 13356  			_ = no
 13357  			return true
 13358  		}
 13359  		// match: (GE (FlagGT_UGT) yes no)
 13360  		// cond:
 13361  		// result: (First nil yes no)
 13362  		for {
 13363  			v := b.Control
 13364  			if v.Op != Op386FlagGT_UGT {
 13365  				break
 13366  			}
 13367  			yes := b.Succs[0]
 13368  			no := b.Succs[1]
 13369  			b.Kind = BlockFirst
 13370  			b.SetControl(nil)
 13371  			_ = yes
 13372  			_ = no
 13373  			return true
 13374  		}
 13375  	case Block386GT:
 13376  		// match: (GT (InvertFlags cmp) yes no)
 13377  		// cond:
 13378  		// result: (LT cmp yes no)
 13379  		for {
 13380  			v := b.Control
 13381  			if v.Op != Op386InvertFlags {
 13382  				break
 13383  			}
 13384  			cmp := v.Args[0]
 13385  			yes := b.Succs[0]
 13386  			no := b.Succs[1]
 13387  			b.Kind = Block386LT
 13388  			b.SetControl(cmp)
 13389  			_ = yes
 13390  			_ = no
 13391  			return true
 13392  		}
 13393  		// match: (GT (FlagEQ) yes no)
 13394  		// cond:
 13395  		// result: (First nil no yes)
 13396  		for {
 13397  			v := b.Control
 13398  			if v.Op != Op386FlagEQ {
 13399  				break
 13400  			}
 13401  			yes := b.Succs[0]
 13402  			no := b.Succs[1]
 13403  			b.Kind = BlockFirst
 13404  			b.SetControl(nil)
 13405  			b.swapSuccessors()
 13406  			_ = no
 13407  			_ = yes
 13408  			return true
 13409  		}
 13410  		// match: (GT (FlagLT_ULT) yes no)
 13411  		// cond:
 13412  		// result: (First nil no yes)
 13413  		for {
 13414  			v := b.Control
 13415  			if v.Op != Op386FlagLT_ULT {
 13416  				break
 13417  			}
 13418  			yes := b.Succs[0]
 13419  			no := b.Succs[1]
 13420  			b.Kind = BlockFirst
 13421  			b.SetControl(nil)
 13422  			b.swapSuccessors()
 13423  			_ = no
 13424  			_ = yes
 13425  			return true
 13426  		}
 13427  		// match: (GT (FlagLT_UGT) yes no)
 13428  		// cond:
 13429  		// result: (First nil no yes)
 13430  		for {
 13431  			v := b.Control
 13432  			if v.Op != Op386FlagLT_UGT {
 13433  				break
 13434  			}
 13435  			yes := b.Succs[0]
 13436  			no := b.Succs[1]
 13437  			b.Kind = BlockFirst
 13438  			b.SetControl(nil)
 13439  			b.swapSuccessors()
 13440  			_ = no
 13441  			_ = yes
 13442  			return true
 13443  		}
 13444  		// match: (GT (FlagGT_ULT) yes no)
 13445  		// cond:
 13446  		// result: (First nil yes no)
 13447  		for {
 13448  			v := b.Control
 13449  			if v.Op != Op386FlagGT_ULT {
 13450  				break
 13451  			}
 13452  			yes := b.Succs[0]
 13453  			no := b.Succs[1]
 13454  			b.Kind = BlockFirst
 13455  			b.SetControl(nil)
 13456  			_ = yes
 13457  			_ = no
 13458  			return true
 13459  		}
 13460  		// match: (GT (FlagGT_UGT) yes no)
 13461  		// cond:
 13462  		// result: (First nil yes no)
 13463  		for {
 13464  			v := b.Control
 13465  			if v.Op != Op386FlagGT_UGT {
 13466  				break
 13467  			}
 13468  			yes := b.Succs[0]
 13469  			no := b.Succs[1]
 13470  			b.Kind = BlockFirst
 13471  			b.SetControl(nil)
 13472  			_ = yes
 13473  			_ = no
 13474  			return true
 13475  		}
 13476  	case BlockIf:
 13477  		// match: (If (SETL  cmp) yes no)
 13478  		// cond:
 13479  		// result: (LT  cmp yes no)
 13480  		for {
 13481  			v := b.Control
 13482  			if v.Op != Op386SETL {
 13483  				break
 13484  			}
 13485  			cmp := v.Args[0]
 13486  			yes := b.Succs[0]
 13487  			no := b.Succs[1]
 13488  			b.Kind = Block386LT
 13489  			b.SetControl(cmp)
 13490  			_ = yes
 13491  			_ = no
 13492  			return true
 13493  		}
 13494  		// match: (If (SETLE cmp) yes no)
 13495  		// cond:
 13496  		// result: (LE  cmp yes no)
 13497  		for {
 13498  			v := b.Control
 13499  			if v.Op != Op386SETLE {
 13500  				break
 13501  			}
 13502  			cmp := v.Args[0]
 13503  			yes := b.Succs[0]
 13504  			no := b.Succs[1]
 13505  			b.Kind = Block386LE
 13506  			b.SetControl(cmp)
 13507  			_ = yes
 13508  			_ = no
 13509  			return true
 13510  		}
 13511  		// match: (If (SETG  cmp) yes no)
 13512  		// cond:
 13513  		// result: (GT  cmp yes no)
 13514  		for {
 13515  			v := b.Control
 13516  			if v.Op != Op386SETG {
 13517  				break
 13518  			}
 13519  			cmp := v.Args[0]
 13520  			yes := b.Succs[0]
 13521  			no := b.Succs[1]
 13522  			b.Kind = Block386GT
 13523  			b.SetControl(cmp)
 13524  			_ = yes
 13525  			_ = no
 13526  			return true
 13527  		}
 13528  		// match: (If (SETGE cmp) yes no)
 13529  		// cond:
 13530  		// result: (GE  cmp yes no)
 13531  		for {
 13532  			v := b.Control
 13533  			if v.Op != Op386SETGE {
 13534  				break
 13535  			}
 13536  			cmp := v.Args[0]
 13537  			yes := b.Succs[0]
 13538  			no := b.Succs[1]
 13539  			b.Kind = Block386GE
 13540  			b.SetControl(cmp)
 13541  			_ = yes
 13542  			_ = no
 13543  			return true
 13544  		}
 13545  		// match: (If (SETEQ cmp) yes no)
 13546  		// cond:
 13547  		// result: (EQ  cmp yes no)
 13548  		for {
 13549  			v := b.Control
 13550  			if v.Op != Op386SETEQ {
 13551  				break
 13552  			}
 13553  			cmp := v.Args[0]
 13554  			yes := b.Succs[0]
 13555  			no := b.Succs[1]
 13556  			b.Kind = Block386EQ
 13557  			b.SetControl(cmp)
 13558  			_ = yes
 13559  			_ = no
 13560  			return true
 13561  		}
 13562  		// match: (If (SETNE cmp) yes no)
 13563  		// cond:
 13564  		// result: (NE  cmp yes no)
 13565  		for {
 13566  			v := b.Control
 13567  			if v.Op != Op386SETNE {
 13568  				break
 13569  			}
 13570  			cmp := v.Args[0]
 13571  			yes := b.Succs[0]
 13572  			no := b.Succs[1]
 13573  			b.Kind = Block386NE
 13574  			b.SetControl(cmp)
 13575  			_ = yes
 13576  			_ = no
 13577  			return true
 13578  		}
 13579  		// match: (If (SETB  cmp) yes no)
 13580  		// cond:
 13581  		// result: (ULT cmp yes no)
 13582  		for {
 13583  			v := b.Control
 13584  			if v.Op != Op386SETB {
 13585  				break
 13586  			}
 13587  			cmp := v.Args[0]
 13588  			yes := b.Succs[0]
 13589  			no := b.Succs[1]
 13590  			b.Kind = Block386ULT
 13591  			b.SetControl(cmp)
 13592  			_ = yes
 13593  			_ = no
 13594  			return true
 13595  		}
 13596  		// match: (If (SETBE cmp) yes no)
 13597  		// cond:
 13598  		// result: (ULE cmp yes no)
 13599  		for {
 13600  			v := b.Control
 13601  			if v.Op != Op386SETBE {
 13602  				break
 13603  			}
 13604  			cmp := v.Args[0]
 13605  			yes := b.Succs[0]
 13606  			no := b.Succs[1]
 13607  			b.Kind = Block386ULE
 13608  			b.SetControl(cmp)
 13609  			_ = yes
 13610  			_ = no
 13611  			return true
 13612  		}
 13613  		// match: (If (SETA  cmp) yes no)
 13614  		// cond:
 13615  		// result: (UGT cmp yes no)
 13616  		for {
 13617  			v := b.Control
 13618  			if v.Op != Op386SETA {
 13619  				break
 13620  			}
 13621  			cmp := v.Args[0]
 13622  			yes := b.Succs[0]
 13623  			no := b.Succs[1]
 13624  			b.Kind = Block386UGT
 13625  			b.SetControl(cmp)
 13626  			_ = yes
 13627  			_ = no
 13628  			return true
 13629  		}
 13630  		// match: (If (SETAE cmp) yes no)
 13631  		// cond:
 13632  		// result: (UGE cmp yes no)
 13633  		for {
 13634  			v := b.Control
 13635  			if v.Op != Op386SETAE {
 13636  				break
 13637  			}
 13638  			cmp := v.Args[0]
 13639  			yes := b.Succs[0]
 13640  			no := b.Succs[1]
 13641  			b.Kind = Block386UGE
 13642  			b.SetControl(cmp)
 13643  			_ = yes
 13644  			_ = no
 13645  			return true
 13646  		}
 13647  		// match: (If (SETGF  cmp) yes no)
 13648  		// cond:
 13649  		// result: (UGT  cmp yes no)
 13650  		for {
 13651  			v := b.Control
 13652  			if v.Op != Op386SETGF {
 13653  				break
 13654  			}
 13655  			cmp := v.Args[0]
 13656  			yes := b.Succs[0]
 13657  			no := b.Succs[1]
 13658  			b.Kind = Block386UGT
 13659  			b.SetControl(cmp)
 13660  			_ = yes
 13661  			_ = no
 13662  			return true
 13663  		}
 13664  		// match: (If (SETGEF cmp) yes no)
 13665  		// cond:
 13666  		// result: (UGE  cmp yes no)
 13667  		for {
 13668  			v := b.Control
 13669  			if v.Op != Op386SETGEF {
 13670  				break
 13671  			}
 13672  			cmp := v.Args[0]
 13673  			yes := b.Succs[0]
 13674  			no := b.Succs[1]
 13675  			b.Kind = Block386UGE
 13676  			b.SetControl(cmp)
 13677  			_ = yes
 13678  			_ = no
 13679  			return true
 13680  		}
 13681  		// match: (If (SETEQF cmp) yes no)
 13682  		// cond:
 13683  		// result: (EQF  cmp yes no)
 13684  		for {
 13685  			v := b.Control
 13686  			if v.Op != Op386SETEQF {
 13687  				break
 13688  			}
 13689  			cmp := v.Args[0]
 13690  			yes := b.Succs[0]
 13691  			no := b.Succs[1]
 13692  			b.Kind = Block386EQF
 13693  			b.SetControl(cmp)
 13694  			_ = yes
 13695  			_ = no
 13696  			return true
 13697  		}
 13698  		// match: (If (SETNEF cmp) yes no)
 13699  		// cond:
 13700  		// result: (NEF  cmp yes no)
 13701  		for {
 13702  			v := b.Control
 13703  			if v.Op != Op386SETNEF {
 13704  				break
 13705  			}
 13706  			cmp := v.Args[0]
 13707  			yes := b.Succs[0]
 13708  			no := b.Succs[1]
 13709  			b.Kind = Block386NEF
 13710  			b.SetControl(cmp)
 13711  			_ = yes
 13712  			_ = no
 13713  			return true
 13714  		}
 13715  		// match: (If cond yes no)
 13716  		// cond:
 13717  		// result: (NE (TESTB cond cond) yes no)
 13718  		for {
 13719  			v := b.Control
 13720  			_ = v
 13721  			cond := b.Control
 13722  			yes := b.Succs[0]
 13723  			no := b.Succs[1]
 13724  			b.Kind = Block386NE
 13725  			v0 := b.NewValue0(v.Line, Op386TESTB, TypeFlags)
 13726  			v0.AddArg(cond)
 13727  			v0.AddArg(cond)
 13728  			b.SetControl(v0)
 13729  			_ = yes
 13730  			_ = no
 13731  			return true
 13732  		}
 13733  	case Block386LE:
 13734  		// match: (LE (InvertFlags cmp) yes no)
 13735  		// cond:
 13736  		// result: (GE cmp yes no)
 13737  		for {
 13738  			v := b.Control
 13739  			if v.Op != Op386InvertFlags {
 13740  				break
 13741  			}
 13742  			cmp := v.Args[0]
 13743  			yes := b.Succs[0]
 13744  			no := b.Succs[1]
 13745  			b.Kind = Block386GE
 13746  			b.SetControl(cmp)
 13747  			_ = yes
 13748  			_ = no
 13749  			return true
 13750  		}
 13751  		// match: (LE (FlagEQ) yes no)
 13752  		// cond:
 13753  		// result: (First nil yes no)
 13754  		for {
 13755  			v := b.Control
 13756  			if v.Op != Op386FlagEQ {
 13757  				break
 13758  			}
 13759  			yes := b.Succs[0]
 13760  			no := b.Succs[1]
 13761  			b.Kind = BlockFirst
 13762  			b.SetControl(nil)
 13763  			_ = yes
 13764  			_ = no
 13765  			return true
 13766  		}
 13767  		// match: (LE (FlagLT_ULT) yes no)
 13768  		// cond:
 13769  		// result: (First nil yes no)
 13770  		for {
 13771  			v := b.Control
 13772  			if v.Op != Op386FlagLT_ULT {
 13773  				break
 13774  			}
 13775  			yes := b.Succs[0]
 13776  			no := b.Succs[1]
 13777  			b.Kind = BlockFirst
 13778  			b.SetControl(nil)
 13779  			_ = yes
 13780  			_ = no
 13781  			return true
 13782  		}
 13783  		// match: (LE (FlagLT_UGT) yes no)
 13784  		// cond:
 13785  		// result: (First nil yes no)
 13786  		for {
 13787  			v := b.Control
 13788  			if v.Op != Op386FlagLT_UGT {
 13789  				break
 13790  			}
 13791  			yes := b.Succs[0]
 13792  			no := b.Succs[1]
 13793  			b.Kind = BlockFirst
 13794  			b.SetControl(nil)
 13795  			_ = yes
 13796  			_ = no
 13797  			return true
 13798  		}
 13799  		// match: (LE (FlagGT_ULT) yes no)
 13800  		// cond:
 13801  		// result: (First nil no yes)
 13802  		for {
 13803  			v := b.Control
 13804  			if v.Op != Op386FlagGT_ULT {
 13805  				break
 13806  			}
 13807  			yes := b.Succs[0]
 13808  			no := b.Succs[1]
 13809  			b.Kind = BlockFirst
 13810  			b.SetControl(nil)
 13811  			b.swapSuccessors()
 13812  			_ = no
 13813  			_ = yes
 13814  			return true
 13815  		}
 13816  		// match: (LE (FlagGT_UGT) yes no)
 13817  		// cond:
 13818  		// result: (First nil no yes)
 13819  		for {
 13820  			v := b.Control
 13821  			if v.Op != Op386FlagGT_UGT {
 13822  				break
 13823  			}
 13824  			yes := b.Succs[0]
 13825  			no := b.Succs[1]
 13826  			b.Kind = BlockFirst
 13827  			b.SetControl(nil)
 13828  			b.swapSuccessors()
 13829  			_ = no
 13830  			_ = yes
 13831  			return true
 13832  		}
 13833  	case Block386LT:
 13834  		// match: (LT (InvertFlags cmp) yes no)
 13835  		// cond:
 13836  		// result: (GT cmp yes no)
 13837  		for {
 13838  			v := b.Control
 13839  			if v.Op != Op386InvertFlags {
 13840  				break
 13841  			}
 13842  			cmp := v.Args[0]
 13843  			yes := b.Succs[0]
 13844  			no := b.Succs[1]
 13845  			b.Kind = Block386GT
 13846  			b.SetControl(cmp)
 13847  			_ = yes
 13848  			_ = no
 13849  			return true
 13850  		}
 13851  		// match: (LT (FlagEQ) yes no)
 13852  		// cond:
 13853  		// result: (First nil no yes)
 13854  		for {
 13855  			v := b.Control
 13856  			if v.Op != Op386FlagEQ {
 13857  				break
 13858  			}
 13859  			yes := b.Succs[0]
 13860  			no := b.Succs[1]
 13861  			b.Kind = BlockFirst
 13862  			b.SetControl(nil)
 13863  			b.swapSuccessors()
 13864  			_ = no
 13865  			_ = yes
 13866  			return true
 13867  		}
 13868  		// match: (LT (FlagLT_ULT) yes no)
 13869  		// cond:
 13870  		// result: (First nil yes no)
 13871  		for {
 13872  			v := b.Control
 13873  			if v.Op != Op386FlagLT_ULT {
 13874  				break
 13875  			}
 13876  			yes := b.Succs[0]
 13877  			no := b.Succs[1]
 13878  			b.Kind = BlockFirst
 13879  			b.SetControl(nil)
 13880  			_ = yes
 13881  			_ = no
 13882  			return true
 13883  		}
 13884  		// match: (LT (FlagLT_UGT) yes no)
 13885  		// cond:
 13886  		// result: (First nil yes no)
 13887  		for {
 13888  			v := b.Control
 13889  			if v.Op != Op386FlagLT_UGT {
 13890  				break
 13891  			}
 13892  			yes := b.Succs[0]
 13893  			no := b.Succs[1]
 13894  			b.Kind = BlockFirst
 13895  			b.SetControl(nil)
 13896  			_ = yes
 13897  			_ = no
 13898  			return true
 13899  		}
 13900  		// match: (LT (FlagGT_ULT) yes no)
 13901  		// cond:
 13902  		// result: (First nil no yes)
 13903  		for {
 13904  			v := b.Control
 13905  			if v.Op != Op386FlagGT_ULT {
 13906  				break
 13907  			}
 13908  			yes := b.Succs[0]
 13909  			no := b.Succs[1]
 13910  			b.Kind = BlockFirst
 13911  			b.SetControl(nil)
 13912  			b.swapSuccessors()
 13913  			_ = no
 13914  			_ = yes
 13915  			return true
 13916  		}
 13917  		// match: (LT (FlagGT_UGT) yes no)
 13918  		// cond:
 13919  		// result: (First nil no yes)
 13920  		for {
 13921  			v := b.Control
 13922  			if v.Op != Op386FlagGT_UGT {
 13923  				break
 13924  			}
 13925  			yes := b.Succs[0]
 13926  			no := b.Succs[1]
 13927  			b.Kind = BlockFirst
 13928  			b.SetControl(nil)
 13929  			b.swapSuccessors()
 13930  			_ = no
 13931  			_ = yes
 13932  			return true
 13933  		}
 13934  	case Block386NE:
 13935  		// match: (NE (TESTB (SETL  cmp) (SETL  cmp)) yes no)
 13936  		// cond:
 13937  		// result: (LT  cmp yes no)
 13938  		for {
 13939  			v := b.Control
 13940  			if v.Op != Op386TESTB {
 13941  				break
 13942  			}
 13943  			v_0 := v.Args[0]
 13944  			if v_0.Op != Op386SETL {
 13945  				break
 13946  			}
 13947  			cmp := v_0.Args[0]
 13948  			v_1 := v.Args[1]
 13949  			if v_1.Op != Op386SETL {
 13950  				break
 13951  			}
 13952  			if cmp != v_1.Args[0] {
 13953  				break
 13954  			}
 13955  			yes := b.Succs[0]
 13956  			no := b.Succs[1]
 13957  			b.Kind = Block386LT
 13958  			b.SetControl(cmp)
 13959  			_ = yes
 13960  			_ = no
 13961  			return true
 13962  		}
 13963  		// match: (NE (TESTB (SETLE cmp) (SETLE cmp)) yes no)
 13964  		// cond:
 13965  		// result: (LE  cmp yes no)
 13966  		for {
 13967  			v := b.Control
 13968  			if v.Op != Op386TESTB {
 13969  				break
 13970  			}
 13971  			v_0 := v.Args[0]
 13972  			if v_0.Op != Op386SETLE {
 13973  				break
 13974  			}
 13975  			cmp := v_0.Args[0]
 13976  			v_1 := v.Args[1]
 13977  			if v_1.Op != Op386SETLE {
 13978  				break
 13979  			}
 13980  			if cmp != v_1.Args[0] {
 13981  				break
 13982  			}
 13983  			yes := b.Succs[0]
 13984  			no := b.Succs[1]
 13985  			b.Kind = Block386LE
 13986  			b.SetControl(cmp)
 13987  			_ = yes
 13988  			_ = no
 13989  			return true
 13990  		}
 13991  		// match: (NE (TESTB (SETG  cmp) (SETG  cmp)) yes no)
 13992  		// cond:
 13993  		// result: (GT  cmp yes no)
 13994  		for {
 13995  			v := b.Control
 13996  			if v.Op != Op386TESTB {
 13997  				break
 13998  			}
 13999  			v_0 := v.Args[0]
 14000  			if v_0.Op != Op386SETG {
 14001  				break
 14002  			}
 14003  			cmp := v_0.Args[0]
 14004  			v_1 := v.Args[1]
 14005  			if v_1.Op != Op386SETG {
 14006  				break
 14007  			}
 14008  			if cmp != v_1.Args[0] {
 14009  				break
 14010  			}
 14011  			yes := b.Succs[0]
 14012  			no := b.Succs[1]
 14013  			b.Kind = Block386GT
 14014  			b.SetControl(cmp)
 14015  			_ = yes
 14016  			_ = no
 14017  			return true
 14018  		}
 14019  		// match: (NE (TESTB (SETGE cmp) (SETGE cmp)) yes no)
 14020  		// cond:
 14021  		// result: (GE  cmp yes no)
 14022  		for {
 14023  			v := b.Control
 14024  			if v.Op != Op386TESTB {
 14025  				break
 14026  			}
 14027  			v_0 := v.Args[0]
 14028  			if v_0.Op != Op386SETGE {
 14029  				break
 14030  			}
 14031  			cmp := v_0.Args[0]
 14032  			v_1 := v.Args[1]
 14033  			if v_1.Op != Op386SETGE {
 14034  				break
 14035  			}
 14036  			if cmp != v_1.Args[0] {
 14037  				break
 14038  			}
 14039  			yes := b.Succs[0]
 14040  			no := b.Succs[1]
 14041  			b.Kind = Block386GE
 14042  			b.SetControl(cmp)
 14043  			_ = yes
 14044  			_ = no
 14045  			return true
 14046  		}
 14047  		// match: (NE (TESTB (SETEQ cmp) (SETEQ cmp)) yes no)
 14048  		// cond:
 14049  		// result: (EQ  cmp yes no)
 14050  		for {
 14051  			v := b.Control
 14052  			if v.Op != Op386TESTB {
 14053  				break
 14054  			}
 14055  			v_0 := v.Args[0]
 14056  			if v_0.Op != Op386SETEQ {
 14057  				break
 14058  			}
 14059  			cmp := v_0.Args[0]
 14060  			v_1 := v.Args[1]
 14061  			if v_1.Op != Op386SETEQ {
 14062  				break
 14063  			}
 14064  			if cmp != v_1.Args[0] {
 14065  				break
 14066  			}
 14067  			yes := b.Succs[0]
 14068  			no := b.Succs[1]
 14069  			b.Kind = Block386EQ
 14070  			b.SetControl(cmp)
 14071  			_ = yes
 14072  			_ = no
 14073  			return true
 14074  		}
 14075  		// match: (NE (TESTB (SETNE cmp) (SETNE cmp)) yes no)
 14076  		// cond:
 14077  		// result: (NE  cmp yes no)
 14078  		for {
 14079  			v := b.Control
 14080  			if v.Op != Op386TESTB {
 14081  				break
 14082  			}
 14083  			v_0 := v.Args[0]
 14084  			if v_0.Op != Op386SETNE {
 14085  				break
 14086  			}
 14087  			cmp := v_0.Args[0]
 14088  			v_1 := v.Args[1]
 14089  			if v_1.Op != Op386SETNE {
 14090  				break
 14091  			}
 14092  			if cmp != v_1.Args[0] {
 14093  				break
 14094  			}
 14095  			yes := b.Succs[0]
 14096  			no := b.Succs[1]
 14097  			b.Kind = Block386NE
 14098  			b.SetControl(cmp)
 14099  			_ = yes
 14100  			_ = no
 14101  			return true
 14102  		}
 14103  		// match: (NE (TESTB (SETB  cmp) (SETB  cmp)) yes no)
 14104  		// cond:
 14105  		// result: (ULT cmp yes no)
 14106  		for {
 14107  			v := b.Control
 14108  			if v.Op != Op386TESTB {
 14109  				break
 14110  			}
 14111  			v_0 := v.Args[0]
 14112  			if v_0.Op != Op386SETB {
 14113  				break
 14114  			}
 14115  			cmp := v_0.Args[0]
 14116  			v_1 := v.Args[1]
 14117  			if v_1.Op != Op386SETB {
 14118  				break
 14119  			}
 14120  			if cmp != v_1.Args[0] {
 14121  				break
 14122  			}
 14123  			yes := b.Succs[0]
 14124  			no := b.Succs[1]
 14125  			b.Kind = Block386ULT
 14126  			b.SetControl(cmp)
 14127  			_ = yes
 14128  			_ = no
 14129  			return true
 14130  		}
 14131  		// match: (NE (TESTB (SETBE cmp) (SETBE cmp)) yes no)
 14132  		// cond:
 14133  		// result: (ULE cmp yes no)
 14134  		for {
 14135  			v := b.Control
 14136  			if v.Op != Op386TESTB {
 14137  				break
 14138  			}
 14139  			v_0 := v.Args[0]
 14140  			if v_0.Op != Op386SETBE {
 14141  				break
 14142  			}
 14143  			cmp := v_0.Args[0]
 14144  			v_1 := v.Args[1]
 14145  			if v_1.Op != Op386SETBE {
 14146  				break
 14147  			}
 14148  			if cmp != v_1.Args[0] {
 14149  				break
 14150  			}
 14151  			yes := b.Succs[0]
 14152  			no := b.Succs[1]
 14153  			b.Kind = Block386ULE
 14154  			b.SetControl(cmp)
 14155  			_ = yes
 14156  			_ = no
 14157  			return true
 14158  		}
 14159  		// match: (NE (TESTB (SETA  cmp) (SETA  cmp)) yes no)
 14160  		// cond:
 14161  		// result: (UGT cmp yes no)
 14162  		for {
 14163  			v := b.Control
 14164  			if v.Op != Op386TESTB {
 14165  				break
 14166  			}
 14167  			v_0 := v.Args[0]
 14168  			if v_0.Op != Op386SETA {
 14169  				break
 14170  			}
 14171  			cmp := v_0.Args[0]
 14172  			v_1 := v.Args[1]
 14173  			if v_1.Op != Op386SETA {
 14174  				break
 14175  			}
 14176  			if cmp != v_1.Args[0] {
 14177  				break
 14178  			}
 14179  			yes := b.Succs[0]
 14180  			no := b.Succs[1]
 14181  			b.Kind = Block386UGT
 14182  			b.SetControl(cmp)
 14183  			_ = yes
 14184  			_ = no
 14185  			return true
 14186  		}
 14187  		// match: (NE (TESTB (SETAE cmp) (SETAE cmp)) yes no)
 14188  		// cond:
 14189  		// result: (UGE cmp yes no)
 14190  		for {
 14191  			v := b.Control
 14192  			if v.Op != Op386TESTB {
 14193  				break
 14194  			}
 14195  			v_0 := v.Args[0]
 14196  			if v_0.Op != Op386SETAE {
 14197  				break
 14198  			}
 14199  			cmp := v_0.Args[0]
 14200  			v_1 := v.Args[1]
 14201  			if v_1.Op != Op386SETAE {
 14202  				break
 14203  			}
 14204  			if cmp != v_1.Args[0] {
 14205  				break
 14206  			}
 14207  			yes := b.Succs[0]
 14208  			no := b.Succs[1]
 14209  			b.Kind = Block386UGE
 14210  			b.SetControl(cmp)
 14211  			_ = yes
 14212  			_ = no
 14213  			return true
 14214  		}
 14215  		// match: (NE (TESTB (SETGF  cmp) (SETGF  cmp)) yes no)
 14216  		// cond:
 14217  		// result: (UGT  cmp yes no)
 14218  		for {
 14219  			v := b.Control
 14220  			if v.Op != Op386TESTB {
 14221  				break
 14222  			}
 14223  			v_0 := v.Args[0]
 14224  			if v_0.Op != Op386SETGF {
 14225  				break
 14226  			}
 14227  			cmp := v_0.Args[0]
 14228  			v_1 := v.Args[1]
 14229  			if v_1.Op != Op386SETGF {
 14230  				break
 14231  			}
 14232  			if cmp != v_1.Args[0] {
 14233  				break
 14234  			}
 14235  			yes := b.Succs[0]
 14236  			no := b.Succs[1]
 14237  			b.Kind = Block386UGT
 14238  			b.SetControl(cmp)
 14239  			_ = yes
 14240  			_ = no
 14241  			return true
 14242  		}
 14243  		// match: (NE (TESTB (SETGEF cmp) (SETGEF cmp)) yes no)
 14244  		// cond:
 14245  		// result: (UGE  cmp yes no)
 14246  		for {
 14247  			v := b.Control
 14248  			if v.Op != Op386TESTB {
 14249  				break
 14250  			}
 14251  			v_0 := v.Args[0]
 14252  			if v_0.Op != Op386SETGEF {
 14253  				break
 14254  			}
 14255  			cmp := v_0.Args[0]
 14256  			v_1 := v.Args[1]
 14257  			if v_1.Op != Op386SETGEF {
 14258  				break
 14259  			}
 14260  			if cmp != v_1.Args[0] {
 14261  				break
 14262  			}
 14263  			yes := b.Succs[0]
 14264  			no := b.Succs[1]
 14265  			b.Kind = Block386UGE
 14266  			b.SetControl(cmp)
 14267  			_ = yes
 14268  			_ = no
 14269  			return true
 14270  		}
 14271  		// match: (NE (TESTB (SETEQF cmp) (SETEQF cmp)) yes no)
 14272  		// cond:
 14273  		// result: (EQF  cmp yes no)
 14274  		for {
 14275  			v := b.Control
 14276  			if v.Op != Op386TESTB {
 14277  				break
 14278  			}
 14279  			v_0 := v.Args[0]
 14280  			if v_0.Op != Op386SETEQF {
 14281  				break
 14282  			}
 14283  			cmp := v_0.Args[0]
 14284  			v_1 := v.Args[1]
 14285  			if v_1.Op != Op386SETEQF {
 14286  				break
 14287  			}
 14288  			if cmp != v_1.Args[0] {
 14289  				break
 14290  			}
 14291  			yes := b.Succs[0]
 14292  			no := b.Succs[1]
 14293  			b.Kind = Block386EQF
 14294  			b.SetControl(cmp)
 14295  			_ = yes
 14296  			_ = no
 14297  			return true
 14298  		}
 14299  		// match: (NE (TESTB (SETNEF cmp) (SETNEF cmp)) yes no)
 14300  		// cond:
 14301  		// result: (NEF  cmp yes no)
 14302  		for {
 14303  			v := b.Control
 14304  			if v.Op != Op386TESTB {
 14305  				break
 14306  			}
 14307  			v_0 := v.Args[0]
 14308  			if v_0.Op != Op386SETNEF {
 14309  				break
 14310  			}
 14311  			cmp := v_0.Args[0]
 14312  			v_1 := v.Args[1]
 14313  			if v_1.Op != Op386SETNEF {
 14314  				break
 14315  			}
 14316  			if cmp != v_1.Args[0] {
 14317  				break
 14318  			}
 14319  			yes := b.Succs[0]
 14320  			no := b.Succs[1]
 14321  			b.Kind = Block386NEF
 14322  			b.SetControl(cmp)
 14323  			_ = yes
 14324  			_ = no
 14325  			return true
 14326  		}
 14327  		// match: (NE (InvertFlags cmp) yes no)
 14328  		// cond:
 14329  		// result: (NE cmp yes no)
 14330  		for {
 14331  			v := b.Control
 14332  			if v.Op != Op386InvertFlags {
 14333  				break
 14334  			}
 14335  			cmp := v.Args[0]
 14336  			yes := b.Succs[0]
 14337  			no := b.Succs[1]
 14338  			b.Kind = Block386NE
 14339  			b.SetControl(cmp)
 14340  			_ = yes
 14341  			_ = no
 14342  			return true
 14343  		}
 14344  		// match: (NE (FlagEQ) yes no)
 14345  		// cond:
 14346  		// result: (First nil no yes)
 14347  		for {
 14348  			v := b.Control
 14349  			if v.Op != Op386FlagEQ {
 14350  				break
 14351  			}
 14352  			yes := b.Succs[0]
 14353  			no := b.Succs[1]
 14354  			b.Kind = BlockFirst
 14355  			b.SetControl(nil)
 14356  			b.swapSuccessors()
 14357  			_ = no
 14358  			_ = yes
 14359  			return true
 14360  		}
 14361  		// match: (NE (FlagLT_ULT) yes no)
 14362  		// cond:
 14363  		// result: (First nil yes no)
 14364  		for {
 14365  			v := b.Control
 14366  			if v.Op != Op386FlagLT_ULT {
 14367  				break
 14368  			}
 14369  			yes := b.Succs[0]
 14370  			no := b.Succs[1]
 14371  			b.Kind = BlockFirst
 14372  			b.SetControl(nil)
 14373  			_ = yes
 14374  			_ = no
 14375  			return true
 14376  		}
 14377  		// match: (NE (FlagLT_UGT) yes no)
 14378  		// cond:
 14379  		// result: (First nil yes no)
 14380  		for {
 14381  			v := b.Control
 14382  			if v.Op != Op386FlagLT_UGT {
 14383  				break
 14384  			}
 14385  			yes := b.Succs[0]
 14386  			no := b.Succs[1]
 14387  			b.Kind = BlockFirst
 14388  			b.SetControl(nil)
 14389  			_ = yes
 14390  			_ = no
 14391  			return true
 14392  		}
 14393  		// match: (NE (FlagGT_ULT) yes no)
 14394  		// cond:
 14395  		// result: (First nil yes no)
 14396  		for {
 14397  			v := b.Control
 14398  			if v.Op != Op386FlagGT_ULT {
 14399  				break
 14400  			}
 14401  			yes := b.Succs[0]
 14402  			no := b.Succs[1]
 14403  			b.Kind = BlockFirst
 14404  			b.SetControl(nil)
 14405  			_ = yes
 14406  			_ = no
 14407  			return true
 14408  		}
 14409  		// match: (NE (FlagGT_UGT) yes no)
 14410  		// cond:
 14411  		// result: (First nil yes no)
 14412  		for {
 14413  			v := b.Control
 14414  			if v.Op != Op386FlagGT_UGT {
 14415  				break
 14416  			}
 14417  			yes := b.Succs[0]
 14418  			no := b.Succs[1]
 14419  			b.Kind = BlockFirst
 14420  			b.SetControl(nil)
 14421  			_ = yes
 14422  			_ = no
 14423  			return true
 14424  		}
 14425  	case Block386UGE:
 14426  		// match: (UGE (InvertFlags cmp) yes no)
 14427  		// cond:
 14428  		// result: (ULE cmp yes no)
 14429  		for {
 14430  			v := b.Control
 14431  			if v.Op != Op386InvertFlags {
 14432  				break
 14433  			}
 14434  			cmp := v.Args[0]
 14435  			yes := b.Succs[0]
 14436  			no := b.Succs[1]
 14437  			b.Kind = Block386ULE
 14438  			b.SetControl(cmp)
 14439  			_ = yes
 14440  			_ = no
 14441  			return true
 14442  		}
 14443  		// match: (UGE (FlagEQ) yes no)
 14444  		// cond:
 14445  		// result: (First nil yes no)
 14446  		for {
 14447  			v := b.Control
 14448  			if v.Op != Op386FlagEQ {
 14449  				break
 14450  			}
 14451  			yes := b.Succs[0]
 14452  			no := b.Succs[1]
 14453  			b.Kind = BlockFirst
 14454  			b.SetControl(nil)
 14455  			_ = yes
 14456  			_ = no
 14457  			return true
 14458  		}
 14459  		// match: (UGE (FlagLT_ULT) yes no)
 14460  		// cond:
 14461  		// result: (First nil no yes)
 14462  		for {
 14463  			v := b.Control
 14464  			if v.Op != Op386FlagLT_ULT {
 14465  				break
 14466  			}
 14467  			yes := b.Succs[0]
 14468  			no := b.Succs[1]
 14469  			b.Kind = BlockFirst
 14470  			b.SetControl(nil)
 14471  			b.swapSuccessors()
 14472  			_ = no
 14473  			_ = yes
 14474  			return true
 14475  		}
 14476  		// match: (UGE (FlagLT_UGT) yes no)
 14477  		// cond:
 14478  		// result: (First nil yes no)
 14479  		for {
 14480  			v := b.Control
 14481  			if v.Op != Op386FlagLT_UGT {
 14482  				break
 14483  			}
 14484  			yes := b.Succs[0]
 14485  			no := b.Succs[1]
 14486  			b.Kind = BlockFirst
 14487  			b.SetControl(nil)
 14488  			_ = yes
 14489  			_ = no
 14490  			return true
 14491  		}
 14492  		// match: (UGE (FlagGT_ULT) yes no)
 14493  		// cond:
 14494  		// result: (First nil no yes)
 14495  		for {
 14496  			v := b.Control
 14497  			if v.Op != Op386FlagGT_ULT {
 14498  				break
 14499  			}
 14500  			yes := b.Succs[0]
 14501  			no := b.Succs[1]
 14502  			b.Kind = BlockFirst
 14503  			b.SetControl(nil)
 14504  			b.swapSuccessors()
 14505  			_ = no
 14506  			_ = yes
 14507  			return true
 14508  		}
 14509  		// match: (UGE (FlagGT_UGT) yes no)
 14510  		// cond:
 14511  		// result: (First nil yes no)
 14512  		for {
 14513  			v := b.Control
 14514  			if v.Op != Op386FlagGT_UGT {
 14515  				break
 14516  			}
 14517  			yes := b.Succs[0]
 14518  			no := b.Succs[1]
 14519  			b.Kind = BlockFirst
 14520  			b.SetControl(nil)
 14521  			_ = yes
 14522  			_ = no
 14523  			return true
 14524  		}
 14525  	case Block386UGT:
 14526  		// match: (UGT (InvertFlags cmp) yes no)
 14527  		// cond:
 14528  		// result: (ULT cmp yes no)
 14529  		for {
 14530  			v := b.Control
 14531  			if v.Op != Op386InvertFlags {
 14532  				break
 14533  			}
 14534  			cmp := v.Args[0]
 14535  			yes := b.Succs[0]
 14536  			no := b.Succs[1]
 14537  			b.Kind = Block386ULT
 14538  			b.SetControl(cmp)
 14539  			_ = yes
 14540  			_ = no
 14541  			return true
 14542  		}
 14543  		// match: (UGT (FlagEQ) yes no)
 14544  		// cond:
 14545  		// result: (First nil no yes)
 14546  		for {
 14547  			v := b.Control
 14548  			if v.Op != Op386FlagEQ {
 14549  				break
 14550  			}
 14551  			yes := b.Succs[0]
 14552  			no := b.Succs[1]
 14553  			b.Kind = BlockFirst
 14554  			b.SetControl(nil)
 14555  			b.swapSuccessors()
 14556  			_ = no
 14557  			_ = yes
 14558  			return true
 14559  		}
 14560  		// match: (UGT (FlagLT_ULT) yes no)
 14561  		// cond:
 14562  		// result: (First nil no yes)
 14563  		for {
 14564  			v := b.Control
 14565  			if v.Op != Op386FlagLT_ULT {
 14566  				break
 14567  			}
 14568  			yes := b.Succs[0]
 14569  			no := b.Succs[1]
 14570  			b.Kind = BlockFirst
 14571  			b.SetControl(nil)
 14572  			b.swapSuccessors()
 14573  			_ = no
 14574  			_ = yes
 14575  			return true
 14576  		}
 14577  		// match: (UGT (FlagLT_UGT) yes no)
 14578  		// cond:
 14579  		// result: (First nil yes no)
 14580  		for {
 14581  			v := b.Control
 14582  			if v.Op != Op386FlagLT_UGT {
 14583  				break
 14584  			}
 14585  			yes := b.Succs[0]
 14586  			no := b.Succs[1]
 14587  			b.Kind = BlockFirst
 14588  			b.SetControl(nil)
 14589  			_ = yes
 14590  			_ = no
 14591  			return true
 14592  		}
 14593  		// match: (UGT (FlagGT_ULT) yes no)
 14594  		// cond:
 14595  		// result: (First nil no yes)
 14596  		for {
 14597  			v := b.Control
 14598  			if v.Op != Op386FlagGT_ULT {
 14599  				break
 14600  			}
 14601  			yes := b.Succs[0]
 14602  			no := b.Succs[1]
 14603  			b.Kind = BlockFirst
 14604  			b.SetControl(nil)
 14605  			b.swapSuccessors()
 14606  			_ = no
 14607  			_ = yes
 14608  			return true
 14609  		}
 14610  		// match: (UGT (FlagGT_UGT) yes no)
 14611  		// cond:
 14612  		// result: (First nil yes no)
 14613  		for {
 14614  			v := b.Control
 14615  			if v.Op != Op386FlagGT_UGT {
 14616  				break
 14617  			}
 14618  			yes := b.Succs[0]
 14619  			no := b.Succs[1]
 14620  			b.Kind = BlockFirst
 14621  			b.SetControl(nil)
 14622  			_ = yes
 14623  			_ = no
 14624  			return true
 14625  		}
 14626  	case Block386ULE:
 14627  		// match: (ULE (InvertFlags cmp) yes no)
 14628  		// cond:
 14629  		// result: (UGE cmp yes no)
 14630  		for {
 14631  			v := b.Control
 14632  			if v.Op != Op386InvertFlags {
 14633  				break
 14634  			}
 14635  			cmp := v.Args[0]
 14636  			yes := b.Succs[0]
 14637  			no := b.Succs[1]
 14638  			b.Kind = Block386UGE
 14639  			b.SetControl(cmp)
 14640  			_ = yes
 14641  			_ = no
 14642  			return true
 14643  		}
 14644  		// match: (ULE (FlagEQ) yes no)
 14645  		// cond:
 14646  		// result: (First nil yes no)
 14647  		for {
 14648  			v := b.Control
 14649  			if v.Op != Op386FlagEQ {
 14650  				break
 14651  			}
 14652  			yes := b.Succs[0]
 14653  			no := b.Succs[1]
 14654  			b.Kind = BlockFirst
 14655  			b.SetControl(nil)
 14656  			_ = yes
 14657  			_ = no
 14658  			return true
 14659  		}
 14660  		// match: (ULE (FlagLT_ULT) yes no)
 14661  		// cond:
 14662  		// result: (First nil yes no)
 14663  		for {
 14664  			v := b.Control
 14665  			if v.Op != Op386FlagLT_ULT {
 14666  				break
 14667  			}
 14668  			yes := b.Succs[0]
 14669  			no := b.Succs[1]
 14670  			b.Kind = BlockFirst
 14671  			b.SetControl(nil)
 14672  			_ = yes
 14673  			_ = no
 14674  			return true
 14675  		}
 14676  		// match: (ULE (FlagLT_UGT) yes no)
 14677  		// cond:
 14678  		// result: (First nil no yes)
 14679  		for {
 14680  			v := b.Control
 14681  			if v.Op != Op386FlagLT_UGT {
 14682  				break
 14683  			}
 14684  			yes := b.Succs[0]
 14685  			no := b.Succs[1]
 14686  			b.Kind = BlockFirst
 14687  			b.SetControl(nil)
 14688  			b.swapSuccessors()
 14689  			_ = no
 14690  			_ = yes
 14691  			return true
 14692  		}
 14693  		// match: (ULE (FlagGT_ULT) yes no)
 14694  		// cond:
 14695  		// result: (First nil yes no)
 14696  		for {
 14697  			v := b.Control
 14698  			if v.Op != Op386FlagGT_ULT {
 14699  				break
 14700  			}
 14701  			yes := b.Succs[0]
 14702  			no := b.Succs[1]
 14703  			b.Kind = BlockFirst
 14704  			b.SetControl(nil)
 14705  			_ = yes
 14706  			_ = no
 14707  			return true
 14708  		}
 14709  		// match: (ULE (FlagGT_UGT) yes no)
 14710  		// cond:
 14711  		// result: (First nil no yes)
 14712  		for {
 14713  			v := b.Control
 14714  			if v.Op != Op386FlagGT_UGT {
 14715  				break
 14716  			}
 14717  			yes := b.Succs[0]
 14718  			no := b.Succs[1]
 14719  			b.Kind = BlockFirst
 14720  			b.SetControl(nil)
 14721  			b.swapSuccessors()
 14722  			_ = no
 14723  			_ = yes
 14724  			return true
 14725  		}
 14726  	case Block386ULT:
 14727  		// match: (ULT (InvertFlags cmp) yes no)
 14728  		// cond:
 14729  		// result: (UGT cmp yes no)
 14730  		for {
 14731  			v := b.Control
 14732  			if v.Op != Op386InvertFlags {
 14733  				break
 14734  			}
 14735  			cmp := v.Args[0]
 14736  			yes := b.Succs[0]
 14737  			no := b.Succs[1]
 14738  			b.Kind = Block386UGT
 14739  			b.SetControl(cmp)
 14740  			_ = yes
 14741  			_ = no
 14742  			return true
 14743  		}
 14744  		// match: (ULT (FlagEQ) yes no)
 14745  		// cond:
 14746  		// result: (First nil no yes)
 14747  		for {
 14748  			v := b.Control
 14749  			if v.Op != Op386FlagEQ {
 14750  				break
 14751  			}
 14752  			yes := b.Succs[0]
 14753  			no := b.Succs[1]
 14754  			b.Kind = BlockFirst
 14755  			b.SetControl(nil)
 14756  			b.swapSuccessors()
 14757  			_ = no
 14758  			_ = yes
 14759  			return true
 14760  		}
 14761  		// match: (ULT (FlagLT_ULT) yes no)
 14762  		// cond:
 14763  		// result: (First nil yes no)
 14764  		for {
 14765  			v := b.Control
 14766  			if v.Op != Op386FlagLT_ULT {
 14767  				break
 14768  			}
 14769  			yes := b.Succs[0]
 14770  			no := b.Succs[1]
 14771  			b.Kind = BlockFirst
 14772  			b.SetControl(nil)
 14773  			_ = yes
 14774  			_ = no
 14775  			return true
 14776  		}
 14777  		// match: (ULT (FlagLT_UGT) yes no)
 14778  		// cond:
 14779  		// result: (First nil no yes)
 14780  		for {
 14781  			v := b.Control
 14782  			if v.Op != Op386FlagLT_UGT {
 14783  				break
 14784  			}
 14785  			yes := b.Succs[0]
 14786  			no := b.Succs[1]
 14787  			b.Kind = BlockFirst
 14788  			b.SetControl(nil)
 14789  			b.swapSuccessors()
 14790  			_ = no
 14791  			_ = yes
 14792  			return true
 14793  		}
 14794  		// match: (ULT (FlagGT_ULT) yes no)
 14795  		// cond:
 14796  		// result: (First nil yes no)
 14797  		for {
 14798  			v := b.Control
 14799  			if v.Op != Op386FlagGT_ULT {
 14800  				break
 14801  			}
 14802  			yes := b.Succs[0]
 14803  			no := b.Succs[1]
 14804  			b.Kind = BlockFirst
 14805  			b.SetControl(nil)
 14806  			_ = yes
 14807  			_ = no
 14808  			return true
 14809  		}
 14810  		// match: (ULT (FlagGT_UGT) yes no)
 14811  		// cond:
 14812  		// result: (First nil no yes)
 14813  		for {
 14814  			v := b.Control
 14815  			if v.Op != Op386FlagGT_UGT {
 14816  				break
 14817  			}
 14818  			yes := b.Succs[0]
 14819  			no := b.Succs[1]
 14820  			b.Kind = BlockFirst
 14821  			b.SetControl(nil)
 14822  			b.swapSuccessors()
 14823  			_ = no
 14824  			_ = yes
 14825  			return true
 14826  		}
 14827  	}
 14828  	return false
 14829  }