github.com/euank/go@v0.0.0-20160829210321-495514729181/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 OpSqrt:
   544  		return rewriteValue386_OpSqrt(v, config)
   545  	case OpStaticCall:
   546  		return rewriteValue386_OpStaticCall(v, config)
   547  	case OpStore:
   548  		return rewriteValue386_OpStore(v, config)
   549  	case OpSub16:
   550  		return rewriteValue386_OpSub16(v, config)
   551  	case OpSub32:
   552  		return rewriteValue386_OpSub32(v, config)
   553  	case OpSub32F:
   554  		return rewriteValue386_OpSub32F(v, config)
   555  	case OpSub32carry:
   556  		return rewriteValue386_OpSub32carry(v, config)
   557  	case OpSub32withcarry:
   558  		return rewriteValue386_OpSub32withcarry(v, config)
   559  	case OpSub64F:
   560  		return rewriteValue386_OpSub64F(v, config)
   561  	case OpSub8:
   562  		return rewriteValue386_OpSub8(v, config)
   563  	case OpSubPtr:
   564  		return rewriteValue386_OpSubPtr(v, config)
   565  	case OpTrunc16to8:
   566  		return rewriteValue386_OpTrunc16to8(v, config)
   567  	case OpTrunc32to16:
   568  		return rewriteValue386_OpTrunc32to16(v, config)
   569  	case OpTrunc32to8:
   570  		return rewriteValue386_OpTrunc32to8(v, config)
   571  	case OpXor16:
   572  		return rewriteValue386_OpXor16(v, config)
   573  	case OpXor32:
   574  		return rewriteValue386_OpXor32(v, config)
   575  	case OpXor8:
   576  		return rewriteValue386_OpXor8(v, config)
   577  	case OpZero:
   578  		return rewriteValue386_OpZero(v, config)
   579  	case OpZeroExt16to32:
   580  		return rewriteValue386_OpZeroExt16to32(v, config)
   581  	case OpZeroExt8to16:
   582  		return rewriteValue386_OpZeroExt8to16(v, config)
   583  	case OpZeroExt8to32:
   584  		return rewriteValue386_OpZeroExt8to32(v, config)
   585  	case OpZeromask:
   586  		return rewriteValue386_OpZeromask(v, config)
   587  	}
   588  	return false
   589  }
   590  func rewriteValue386_Op386ADCL(v *Value, config *Config) bool {
   591  	b := v.Block
   592  	_ = b
   593  	// match: (ADCL x (MOVLconst [c]) f)
   594  	// cond:
   595  	// result: (ADCLconst [c] x f)
   596  	for {
   597  		x := v.Args[0]
   598  		v_1 := v.Args[1]
   599  		if v_1.Op != Op386MOVLconst {
   600  			break
   601  		}
   602  		c := v_1.AuxInt
   603  		f := v.Args[2]
   604  		v.reset(Op386ADCLconst)
   605  		v.AuxInt = c
   606  		v.AddArg(x)
   607  		v.AddArg(f)
   608  		return true
   609  	}
   610  	// match: (ADCL (MOVLconst [c]) x f)
   611  	// cond:
   612  	// result: (ADCLconst [c] x f)
   613  	for {
   614  		v_0 := v.Args[0]
   615  		if v_0.Op != Op386MOVLconst {
   616  			break
   617  		}
   618  		c := v_0.AuxInt
   619  		x := v.Args[1]
   620  		f := v.Args[2]
   621  		v.reset(Op386ADCLconst)
   622  		v.AuxInt = c
   623  		v.AddArg(x)
   624  		v.AddArg(f)
   625  		return true
   626  	}
   627  	return false
   628  }
   629  func rewriteValue386_Op386ADDL(v *Value, config *Config) bool {
   630  	b := v.Block
   631  	_ = b
   632  	// match: (ADDL x (MOVLconst [c]))
   633  	// cond:
   634  	// result: (ADDLconst [c] x)
   635  	for {
   636  		x := v.Args[0]
   637  		v_1 := v.Args[1]
   638  		if v_1.Op != Op386MOVLconst {
   639  			break
   640  		}
   641  		c := v_1.AuxInt
   642  		v.reset(Op386ADDLconst)
   643  		v.AuxInt = c
   644  		v.AddArg(x)
   645  		return true
   646  	}
   647  	// match: (ADDL (MOVLconst [c]) x)
   648  	// cond:
   649  	// result: (ADDLconst [c] x)
   650  	for {
   651  		v_0 := v.Args[0]
   652  		if v_0.Op != Op386MOVLconst {
   653  			break
   654  		}
   655  		c := v_0.AuxInt
   656  		x := v.Args[1]
   657  		v.reset(Op386ADDLconst)
   658  		v.AuxInt = c
   659  		v.AddArg(x)
   660  		return true
   661  	}
   662  	// match: (ADDL x (SHLLconst [3] y))
   663  	// cond:
   664  	// result: (LEAL8 x y)
   665  	for {
   666  		x := v.Args[0]
   667  		v_1 := v.Args[1]
   668  		if v_1.Op != Op386SHLLconst {
   669  			break
   670  		}
   671  		if v_1.AuxInt != 3 {
   672  			break
   673  		}
   674  		y := v_1.Args[0]
   675  		v.reset(Op386LEAL8)
   676  		v.AddArg(x)
   677  		v.AddArg(y)
   678  		return true
   679  	}
   680  	// match: (ADDL x (SHLLconst [2] y))
   681  	// cond:
   682  	// result: (LEAL4 x y)
   683  	for {
   684  		x := v.Args[0]
   685  		v_1 := v.Args[1]
   686  		if v_1.Op != Op386SHLLconst {
   687  			break
   688  		}
   689  		if v_1.AuxInt != 2 {
   690  			break
   691  		}
   692  		y := v_1.Args[0]
   693  		v.reset(Op386LEAL4)
   694  		v.AddArg(x)
   695  		v.AddArg(y)
   696  		return true
   697  	}
   698  	// match: (ADDL x (SHLLconst [1] y))
   699  	// cond:
   700  	// result: (LEAL2 x y)
   701  	for {
   702  		x := v.Args[0]
   703  		v_1 := v.Args[1]
   704  		if v_1.Op != Op386SHLLconst {
   705  			break
   706  		}
   707  		if v_1.AuxInt != 1 {
   708  			break
   709  		}
   710  		y := v_1.Args[0]
   711  		v.reset(Op386LEAL2)
   712  		v.AddArg(x)
   713  		v.AddArg(y)
   714  		return true
   715  	}
   716  	// match: (ADDL x (ADDL y y))
   717  	// cond:
   718  	// result: (LEAL2 x y)
   719  	for {
   720  		x := v.Args[0]
   721  		v_1 := v.Args[1]
   722  		if v_1.Op != Op386ADDL {
   723  			break
   724  		}
   725  		y := v_1.Args[0]
   726  		if y != v_1.Args[1] {
   727  			break
   728  		}
   729  		v.reset(Op386LEAL2)
   730  		v.AddArg(x)
   731  		v.AddArg(y)
   732  		return true
   733  	}
   734  	// match: (ADDL x (ADDL x y))
   735  	// cond:
   736  	// result: (LEAL2 y x)
   737  	for {
   738  		x := v.Args[0]
   739  		v_1 := v.Args[1]
   740  		if v_1.Op != Op386ADDL {
   741  			break
   742  		}
   743  		if x != v_1.Args[0] {
   744  			break
   745  		}
   746  		y := v_1.Args[1]
   747  		v.reset(Op386LEAL2)
   748  		v.AddArg(y)
   749  		v.AddArg(x)
   750  		return true
   751  	}
   752  	// match: (ADDL x (ADDL y x))
   753  	// cond:
   754  	// result: (LEAL2 y x)
   755  	for {
   756  		x := v.Args[0]
   757  		v_1 := v.Args[1]
   758  		if v_1.Op != Op386ADDL {
   759  			break
   760  		}
   761  		y := v_1.Args[0]
   762  		if x != v_1.Args[1] {
   763  			break
   764  		}
   765  		v.reset(Op386LEAL2)
   766  		v.AddArg(y)
   767  		v.AddArg(x)
   768  		return true
   769  	}
   770  	// match: (ADDL (ADDLconst [c] x) y)
   771  	// cond:
   772  	// result: (LEAL1 [c] x y)
   773  	for {
   774  		v_0 := v.Args[0]
   775  		if v_0.Op != Op386ADDLconst {
   776  			break
   777  		}
   778  		c := v_0.AuxInt
   779  		x := v_0.Args[0]
   780  		y := v.Args[1]
   781  		v.reset(Op386LEAL1)
   782  		v.AuxInt = c
   783  		v.AddArg(x)
   784  		v.AddArg(y)
   785  		return true
   786  	}
   787  	// match: (ADDL x (ADDLconst [c] y))
   788  	// cond:
   789  	// result: (LEAL1 [c] x y)
   790  	for {
   791  		x := v.Args[0]
   792  		v_1 := v.Args[1]
   793  		if v_1.Op != Op386ADDLconst {
   794  			break
   795  		}
   796  		c := v_1.AuxInt
   797  		y := v_1.Args[0]
   798  		v.reset(Op386LEAL1)
   799  		v.AuxInt = c
   800  		v.AddArg(x)
   801  		v.AddArg(y)
   802  		return true
   803  	}
   804  	// match: (ADDL x (LEAL [c] {s} y))
   805  	// cond: x.Op != OpSB && y.Op != OpSB
   806  	// result: (LEAL1 [c] {s} x y)
   807  	for {
   808  		x := v.Args[0]
   809  		v_1 := v.Args[1]
   810  		if v_1.Op != Op386LEAL {
   811  			break
   812  		}
   813  		c := v_1.AuxInt
   814  		s := v_1.Aux
   815  		y := v_1.Args[0]
   816  		if !(x.Op != OpSB && y.Op != OpSB) {
   817  			break
   818  		}
   819  		v.reset(Op386LEAL1)
   820  		v.AuxInt = c
   821  		v.Aux = s
   822  		v.AddArg(x)
   823  		v.AddArg(y)
   824  		return true
   825  	}
   826  	// match: (ADDL (LEAL [c] {s} x) y)
   827  	// cond: x.Op != OpSB && y.Op != OpSB
   828  	// result: (LEAL1 [c] {s} x y)
   829  	for {
   830  		v_0 := v.Args[0]
   831  		if v_0.Op != Op386LEAL {
   832  			break
   833  		}
   834  		c := v_0.AuxInt
   835  		s := v_0.Aux
   836  		x := v_0.Args[0]
   837  		y := v.Args[1]
   838  		if !(x.Op != OpSB && y.Op != OpSB) {
   839  			break
   840  		}
   841  		v.reset(Op386LEAL1)
   842  		v.AuxInt = c
   843  		v.Aux = s
   844  		v.AddArg(x)
   845  		v.AddArg(y)
   846  		return true
   847  	}
   848  	// match: (ADDL x (NEGL y))
   849  	// cond:
   850  	// result: (SUBL x y)
   851  	for {
   852  		x := v.Args[0]
   853  		v_1 := v.Args[1]
   854  		if v_1.Op != Op386NEGL {
   855  			break
   856  		}
   857  		y := v_1.Args[0]
   858  		v.reset(Op386SUBL)
   859  		v.AddArg(x)
   860  		v.AddArg(y)
   861  		return true
   862  	}
   863  	return false
   864  }
   865  func rewriteValue386_Op386ADDLcarry(v *Value, config *Config) bool {
   866  	b := v.Block
   867  	_ = b
   868  	// match: (ADDLcarry x (MOVLconst [c]))
   869  	// cond:
   870  	// result: (ADDLconstcarry [c] x)
   871  	for {
   872  		x := v.Args[0]
   873  		v_1 := v.Args[1]
   874  		if v_1.Op != Op386MOVLconst {
   875  			break
   876  		}
   877  		c := v_1.AuxInt
   878  		v.reset(Op386ADDLconstcarry)
   879  		v.AuxInt = c
   880  		v.AddArg(x)
   881  		return true
   882  	}
   883  	// match: (ADDLcarry (MOVLconst [c]) x)
   884  	// cond:
   885  	// result: (ADDLconstcarry [c] x)
   886  	for {
   887  		v_0 := v.Args[0]
   888  		if v_0.Op != Op386MOVLconst {
   889  			break
   890  		}
   891  		c := v_0.AuxInt
   892  		x := v.Args[1]
   893  		v.reset(Op386ADDLconstcarry)
   894  		v.AuxInt = c
   895  		v.AddArg(x)
   896  		return true
   897  	}
   898  	return false
   899  }
   900  func rewriteValue386_Op386ADDLconst(v *Value, config *Config) bool {
   901  	b := v.Block
   902  	_ = b
   903  	// match: (ADDLconst [c] (ADDL x y))
   904  	// cond:
   905  	// result: (LEAL1 [c] x y)
   906  	for {
   907  		c := v.AuxInt
   908  		v_0 := v.Args[0]
   909  		if v_0.Op != Op386ADDL {
   910  			break
   911  		}
   912  		x := v_0.Args[0]
   913  		y := v_0.Args[1]
   914  		v.reset(Op386LEAL1)
   915  		v.AuxInt = c
   916  		v.AddArg(x)
   917  		v.AddArg(y)
   918  		return true
   919  	}
   920  	// match: (ADDLconst [c] (LEAL [d] {s} x))
   921  	// cond: is32Bit(c+d)
   922  	// result: (LEAL [c+d] {s} x)
   923  	for {
   924  		c := v.AuxInt
   925  		v_0 := v.Args[0]
   926  		if v_0.Op != Op386LEAL {
   927  			break
   928  		}
   929  		d := v_0.AuxInt
   930  		s := v_0.Aux
   931  		x := v_0.Args[0]
   932  		if !(is32Bit(c + d)) {
   933  			break
   934  		}
   935  		v.reset(Op386LEAL)
   936  		v.AuxInt = c + d
   937  		v.Aux = s
   938  		v.AddArg(x)
   939  		return true
   940  	}
   941  	// match: (ADDLconst [c] (LEAL1 [d] {s} x y))
   942  	// cond: is32Bit(c+d)
   943  	// result: (LEAL1 [c+d] {s} x y)
   944  	for {
   945  		c := v.AuxInt
   946  		v_0 := v.Args[0]
   947  		if v_0.Op != Op386LEAL1 {
   948  			break
   949  		}
   950  		d := v_0.AuxInt
   951  		s := v_0.Aux
   952  		x := v_0.Args[0]
   953  		y := v_0.Args[1]
   954  		if !(is32Bit(c + d)) {
   955  			break
   956  		}
   957  		v.reset(Op386LEAL1)
   958  		v.AuxInt = c + d
   959  		v.Aux = s
   960  		v.AddArg(x)
   961  		v.AddArg(y)
   962  		return true
   963  	}
   964  	// match: (ADDLconst [c] (LEAL2 [d] {s} x y))
   965  	// cond: is32Bit(c+d)
   966  	// result: (LEAL2 [c+d] {s} x y)
   967  	for {
   968  		c := v.AuxInt
   969  		v_0 := v.Args[0]
   970  		if v_0.Op != Op386LEAL2 {
   971  			break
   972  		}
   973  		d := v_0.AuxInt
   974  		s := v_0.Aux
   975  		x := v_0.Args[0]
   976  		y := v_0.Args[1]
   977  		if !(is32Bit(c + d)) {
   978  			break
   979  		}
   980  		v.reset(Op386LEAL2)
   981  		v.AuxInt = c + d
   982  		v.Aux = s
   983  		v.AddArg(x)
   984  		v.AddArg(y)
   985  		return true
   986  	}
   987  	// match: (ADDLconst [c] (LEAL4 [d] {s} x y))
   988  	// cond: is32Bit(c+d)
   989  	// result: (LEAL4 [c+d] {s} x y)
   990  	for {
   991  		c := v.AuxInt
   992  		v_0 := v.Args[0]
   993  		if v_0.Op != Op386LEAL4 {
   994  			break
   995  		}
   996  		d := v_0.AuxInt
   997  		s := v_0.Aux
   998  		x := v_0.Args[0]
   999  		y := v_0.Args[1]
  1000  		if !(is32Bit(c + d)) {
  1001  			break
  1002  		}
  1003  		v.reset(Op386LEAL4)
  1004  		v.AuxInt = c + d
  1005  		v.Aux = s
  1006  		v.AddArg(x)
  1007  		v.AddArg(y)
  1008  		return true
  1009  	}
  1010  	// match: (ADDLconst [c] (LEAL8 [d] {s} x y))
  1011  	// cond: is32Bit(c+d)
  1012  	// result: (LEAL8 [c+d] {s} x y)
  1013  	for {
  1014  		c := v.AuxInt
  1015  		v_0 := v.Args[0]
  1016  		if v_0.Op != Op386LEAL8 {
  1017  			break
  1018  		}
  1019  		d := v_0.AuxInt
  1020  		s := v_0.Aux
  1021  		x := v_0.Args[0]
  1022  		y := v_0.Args[1]
  1023  		if !(is32Bit(c + d)) {
  1024  			break
  1025  		}
  1026  		v.reset(Op386LEAL8)
  1027  		v.AuxInt = c + d
  1028  		v.Aux = s
  1029  		v.AddArg(x)
  1030  		v.AddArg(y)
  1031  		return true
  1032  	}
  1033  	// match: (ADDLconst [c] x)
  1034  	// cond: int32(c)==0
  1035  	// result: x
  1036  	for {
  1037  		c := v.AuxInt
  1038  		x := v.Args[0]
  1039  		if !(int32(c) == 0) {
  1040  			break
  1041  		}
  1042  		v.reset(OpCopy)
  1043  		v.Type = x.Type
  1044  		v.AddArg(x)
  1045  		return true
  1046  	}
  1047  	// match: (ADDLconst [c] (MOVLconst [d]))
  1048  	// cond:
  1049  	// result: (MOVLconst [int64(int32(c+d))])
  1050  	for {
  1051  		c := v.AuxInt
  1052  		v_0 := v.Args[0]
  1053  		if v_0.Op != Op386MOVLconst {
  1054  			break
  1055  		}
  1056  		d := v_0.AuxInt
  1057  		v.reset(Op386MOVLconst)
  1058  		v.AuxInt = int64(int32(c + d))
  1059  		return true
  1060  	}
  1061  	// match: (ADDLconst [c] (ADDLconst [d] x))
  1062  	// cond:
  1063  	// result: (ADDLconst [int64(int32(c+d))] x)
  1064  	for {
  1065  		c := v.AuxInt
  1066  		v_0 := v.Args[0]
  1067  		if v_0.Op != Op386ADDLconst {
  1068  			break
  1069  		}
  1070  		d := v_0.AuxInt
  1071  		x := v_0.Args[0]
  1072  		v.reset(Op386ADDLconst)
  1073  		v.AuxInt = int64(int32(c + d))
  1074  		v.AddArg(x)
  1075  		return true
  1076  	}
  1077  	return false
  1078  }
  1079  func rewriteValue386_Op386ANDL(v *Value, config *Config) bool {
  1080  	b := v.Block
  1081  	_ = b
  1082  	// match: (ANDL x (MOVLconst [c]))
  1083  	// cond:
  1084  	// result: (ANDLconst [c] x)
  1085  	for {
  1086  		x := v.Args[0]
  1087  		v_1 := v.Args[1]
  1088  		if v_1.Op != Op386MOVLconst {
  1089  			break
  1090  		}
  1091  		c := v_1.AuxInt
  1092  		v.reset(Op386ANDLconst)
  1093  		v.AuxInt = c
  1094  		v.AddArg(x)
  1095  		return true
  1096  	}
  1097  	// match: (ANDL (MOVLconst [c]) x)
  1098  	// cond:
  1099  	// result: (ANDLconst [c] x)
  1100  	for {
  1101  		v_0 := v.Args[0]
  1102  		if v_0.Op != Op386MOVLconst {
  1103  			break
  1104  		}
  1105  		c := v_0.AuxInt
  1106  		x := v.Args[1]
  1107  		v.reset(Op386ANDLconst)
  1108  		v.AuxInt = c
  1109  		v.AddArg(x)
  1110  		return true
  1111  	}
  1112  	// match: (ANDL x x)
  1113  	// cond:
  1114  	// result: x
  1115  	for {
  1116  		x := v.Args[0]
  1117  		if x != v.Args[1] {
  1118  			break
  1119  		}
  1120  		v.reset(OpCopy)
  1121  		v.Type = x.Type
  1122  		v.AddArg(x)
  1123  		return true
  1124  	}
  1125  	return false
  1126  }
  1127  func rewriteValue386_Op386ANDLconst(v *Value, config *Config) bool {
  1128  	b := v.Block
  1129  	_ = b
  1130  	// match: (ANDLconst [c] (ANDLconst [d] x))
  1131  	// cond:
  1132  	// result: (ANDLconst [c & d] x)
  1133  	for {
  1134  		c := v.AuxInt
  1135  		v_0 := v.Args[0]
  1136  		if v_0.Op != Op386ANDLconst {
  1137  			break
  1138  		}
  1139  		d := v_0.AuxInt
  1140  		x := v_0.Args[0]
  1141  		v.reset(Op386ANDLconst)
  1142  		v.AuxInt = c & d
  1143  		v.AddArg(x)
  1144  		return true
  1145  	}
  1146  	// match: (ANDLconst [c] _)
  1147  	// cond: int32(c)==0
  1148  	// result: (MOVLconst [0])
  1149  	for {
  1150  		c := v.AuxInt
  1151  		if !(int32(c) == 0) {
  1152  			break
  1153  		}
  1154  		v.reset(Op386MOVLconst)
  1155  		v.AuxInt = 0
  1156  		return true
  1157  	}
  1158  	// match: (ANDLconst [c] x)
  1159  	// cond: int32(c)==-1
  1160  	// result: x
  1161  	for {
  1162  		c := v.AuxInt
  1163  		x := v.Args[0]
  1164  		if !(int32(c) == -1) {
  1165  			break
  1166  		}
  1167  		v.reset(OpCopy)
  1168  		v.Type = x.Type
  1169  		v.AddArg(x)
  1170  		return true
  1171  	}
  1172  	// match: (ANDLconst [c] (MOVLconst [d]))
  1173  	// cond:
  1174  	// result: (MOVLconst [c&d])
  1175  	for {
  1176  		c := v.AuxInt
  1177  		v_0 := v.Args[0]
  1178  		if v_0.Op != Op386MOVLconst {
  1179  			break
  1180  		}
  1181  		d := v_0.AuxInt
  1182  		v.reset(Op386MOVLconst)
  1183  		v.AuxInt = c & d
  1184  		return true
  1185  	}
  1186  	return false
  1187  }
  1188  func rewriteValue386_Op386CMPB(v *Value, config *Config) bool {
  1189  	b := v.Block
  1190  	_ = b
  1191  	// match: (CMPB x (MOVLconst [c]))
  1192  	// cond:
  1193  	// result: (CMPBconst x [int64(int8(c))])
  1194  	for {
  1195  		x := v.Args[0]
  1196  		v_1 := v.Args[1]
  1197  		if v_1.Op != Op386MOVLconst {
  1198  			break
  1199  		}
  1200  		c := v_1.AuxInt
  1201  		v.reset(Op386CMPBconst)
  1202  		v.AuxInt = int64(int8(c))
  1203  		v.AddArg(x)
  1204  		return true
  1205  	}
  1206  	// match: (CMPB (MOVLconst [c]) x)
  1207  	// cond:
  1208  	// result: (InvertFlags (CMPBconst x [int64(int8(c))]))
  1209  	for {
  1210  		v_0 := v.Args[0]
  1211  		if v_0.Op != Op386MOVLconst {
  1212  			break
  1213  		}
  1214  		c := v_0.AuxInt
  1215  		x := v.Args[1]
  1216  		v.reset(Op386InvertFlags)
  1217  		v0 := b.NewValue0(v.Line, Op386CMPBconst, TypeFlags)
  1218  		v0.AuxInt = int64(int8(c))
  1219  		v0.AddArg(x)
  1220  		v.AddArg(v0)
  1221  		return true
  1222  	}
  1223  	return false
  1224  }
  1225  func rewriteValue386_Op386CMPBconst(v *Value, config *Config) bool {
  1226  	b := v.Block
  1227  	_ = b
  1228  	// match: (CMPBconst (MOVLconst [x]) [y])
  1229  	// cond: int8(x)==int8(y)
  1230  	// result: (FlagEQ)
  1231  	for {
  1232  		y := v.AuxInt
  1233  		v_0 := v.Args[0]
  1234  		if v_0.Op != Op386MOVLconst {
  1235  			break
  1236  		}
  1237  		x := v_0.AuxInt
  1238  		if !(int8(x) == int8(y)) {
  1239  			break
  1240  		}
  1241  		v.reset(Op386FlagEQ)
  1242  		return true
  1243  	}
  1244  	// match: (CMPBconst (MOVLconst [x]) [y])
  1245  	// cond: int8(x)<int8(y) && uint8(x)<uint8(y)
  1246  	// result: (FlagLT_ULT)
  1247  	for {
  1248  		y := v.AuxInt
  1249  		v_0 := v.Args[0]
  1250  		if v_0.Op != Op386MOVLconst {
  1251  			break
  1252  		}
  1253  		x := v_0.AuxInt
  1254  		if !(int8(x) < int8(y) && uint8(x) < uint8(y)) {
  1255  			break
  1256  		}
  1257  		v.reset(Op386FlagLT_ULT)
  1258  		return true
  1259  	}
  1260  	// match: (CMPBconst (MOVLconst [x]) [y])
  1261  	// cond: int8(x)<int8(y) && uint8(x)>uint8(y)
  1262  	// result: (FlagLT_UGT)
  1263  	for {
  1264  		y := v.AuxInt
  1265  		v_0 := v.Args[0]
  1266  		if v_0.Op != Op386MOVLconst {
  1267  			break
  1268  		}
  1269  		x := v_0.AuxInt
  1270  		if !(int8(x) < int8(y) && uint8(x) > uint8(y)) {
  1271  			break
  1272  		}
  1273  		v.reset(Op386FlagLT_UGT)
  1274  		return true
  1275  	}
  1276  	// match: (CMPBconst (MOVLconst [x]) [y])
  1277  	// cond: int8(x)>int8(y) && uint8(x)<uint8(y)
  1278  	// result: (FlagGT_ULT)
  1279  	for {
  1280  		y := v.AuxInt
  1281  		v_0 := v.Args[0]
  1282  		if v_0.Op != Op386MOVLconst {
  1283  			break
  1284  		}
  1285  		x := v_0.AuxInt
  1286  		if !(int8(x) > int8(y) && uint8(x) < uint8(y)) {
  1287  			break
  1288  		}
  1289  		v.reset(Op386FlagGT_ULT)
  1290  		return true
  1291  	}
  1292  	// match: (CMPBconst (MOVLconst [x]) [y])
  1293  	// cond: int8(x)>int8(y) && uint8(x)>uint8(y)
  1294  	// result: (FlagGT_UGT)
  1295  	for {
  1296  		y := v.AuxInt
  1297  		v_0 := v.Args[0]
  1298  		if v_0.Op != Op386MOVLconst {
  1299  			break
  1300  		}
  1301  		x := v_0.AuxInt
  1302  		if !(int8(x) > int8(y) && uint8(x) > uint8(y)) {
  1303  			break
  1304  		}
  1305  		v.reset(Op386FlagGT_UGT)
  1306  		return true
  1307  	}
  1308  	// match: (CMPBconst (ANDLconst _ [m]) [n])
  1309  	// cond: 0 <= int8(m) && int8(m) < int8(n)
  1310  	// result: (FlagLT_ULT)
  1311  	for {
  1312  		n := v.AuxInt
  1313  		v_0 := v.Args[0]
  1314  		if v_0.Op != Op386ANDLconst {
  1315  			break
  1316  		}
  1317  		m := v_0.AuxInt
  1318  		if !(0 <= int8(m) && int8(m) < int8(n)) {
  1319  			break
  1320  		}
  1321  		v.reset(Op386FlagLT_ULT)
  1322  		return true
  1323  	}
  1324  	// match: (CMPBconst (ANDL x y) [0])
  1325  	// cond:
  1326  	// result: (TESTB x y)
  1327  	for {
  1328  		if v.AuxInt != 0 {
  1329  			break
  1330  		}
  1331  		v_0 := v.Args[0]
  1332  		if v_0.Op != Op386ANDL {
  1333  			break
  1334  		}
  1335  		x := v_0.Args[0]
  1336  		y := v_0.Args[1]
  1337  		v.reset(Op386TESTB)
  1338  		v.AddArg(x)
  1339  		v.AddArg(y)
  1340  		return true
  1341  	}
  1342  	// match: (CMPBconst (ANDLconst [c] x) [0])
  1343  	// cond:
  1344  	// result: (TESTBconst [int64(int8(c))] x)
  1345  	for {
  1346  		if v.AuxInt != 0 {
  1347  			break
  1348  		}
  1349  		v_0 := v.Args[0]
  1350  		if v_0.Op != Op386ANDLconst {
  1351  			break
  1352  		}
  1353  		c := v_0.AuxInt
  1354  		x := v_0.Args[0]
  1355  		v.reset(Op386TESTBconst)
  1356  		v.AuxInt = int64(int8(c))
  1357  		v.AddArg(x)
  1358  		return true
  1359  	}
  1360  	// match: (CMPBconst x [0])
  1361  	// cond:
  1362  	// result: (TESTB x x)
  1363  	for {
  1364  		if v.AuxInt != 0 {
  1365  			break
  1366  		}
  1367  		x := v.Args[0]
  1368  		v.reset(Op386TESTB)
  1369  		v.AddArg(x)
  1370  		v.AddArg(x)
  1371  		return true
  1372  	}
  1373  	return false
  1374  }
  1375  func rewriteValue386_Op386CMPL(v *Value, config *Config) bool {
  1376  	b := v.Block
  1377  	_ = b
  1378  	// match: (CMPL x (MOVLconst [c]))
  1379  	// cond:
  1380  	// result: (CMPLconst x [c])
  1381  	for {
  1382  		x := v.Args[0]
  1383  		v_1 := v.Args[1]
  1384  		if v_1.Op != Op386MOVLconst {
  1385  			break
  1386  		}
  1387  		c := v_1.AuxInt
  1388  		v.reset(Op386CMPLconst)
  1389  		v.AuxInt = c
  1390  		v.AddArg(x)
  1391  		return true
  1392  	}
  1393  	// match: (CMPL (MOVLconst [c]) x)
  1394  	// cond:
  1395  	// result: (InvertFlags (CMPLconst x [c]))
  1396  	for {
  1397  		v_0 := v.Args[0]
  1398  		if v_0.Op != Op386MOVLconst {
  1399  			break
  1400  		}
  1401  		c := v_0.AuxInt
  1402  		x := v.Args[1]
  1403  		v.reset(Op386InvertFlags)
  1404  		v0 := b.NewValue0(v.Line, Op386CMPLconst, TypeFlags)
  1405  		v0.AuxInt = c
  1406  		v0.AddArg(x)
  1407  		v.AddArg(v0)
  1408  		return true
  1409  	}
  1410  	return false
  1411  }
  1412  func rewriteValue386_Op386CMPLconst(v *Value, config *Config) bool {
  1413  	b := v.Block
  1414  	_ = b
  1415  	// match: (CMPLconst (MOVLconst [x]) [y])
  1416  	// cond: int32(x)==int32(y)
  1417  	// result: (FlagEQ)
  1418  	for {
  1419  		y := v.AuxInt
  1420  		v_0 := v.Args[0]
  1421  		if v_0.Op != Op386MOVLconst {
  1422  			break
  1423  		}
  1424  		x := v_0.AuxInt
  1425  		if !(int32(x) == int32(y)) {
  1426  			break
  1427  		}
  1428  		v.reset(Op386FlagEQ)
  1429  		return true
  1430  	}
  1431  	// match: (CMPLconst (MOVLconst [x]) [y])
  1432  	// cond: int32(x)<int32(y) && uint32(x)<uint32(y)
  1433  	// result: (FlagLT_ULT)
  1434  	for {
  1435  		y := v.AuxInt
  1436  		v_0 := v.Args[0]
  1437  		if v_0.Op != Op386MOVLconst {
  1438  			break
  1439  		}
  1440  		x := v_0.AuxInt
  1441  		if !(int32(x) < int32(y) && uint32(x) < uint32(y)) {
  1442  			break
  1443  		}
  1444  		v.reset(Op386FlagLT_ULT)
  1445  		return true
  1446  	}
  1447  	// match: (CMPLconst (MOVLconst [x]) [y])
  1448  	// cond: int32(x)<int32(y) && uint32(x)>uint32(y)
  1449  	// result: (FlagLT_UGT)
  1450  	for {
  1451  		y := v.AuxInt
  1452  		v_0 := v.Args[0]
  1453  		if v_0.Op != Op386MOVLconst {
  1454  			break
  1455  		}
  1456  		x := v_0.AuxInt
  1457  		if !(int32(x) < int32(y) && uint32(x) > uint32(y)) {
  1458  			break
  1459  		}
  1460  		v.reset(Op386FlagLT_UGT)
  1461  		return true
  1462  	}
  1463  	// match: (CMPLconst (MOVLconst [x]) [y])
  1464  	// cond: int32(x)>int32(y) && uint32(x)<uint32(y)
  1465  	// result: (FlagGT_ULT)
  1466  	for {
  1467  		y := v.AuxInt
  1468  		v_0 := v.Args[0]
  1469  		if v_0.Op != Op386MOVLconst {
  1470  			break
  1471  		}
  1472  		x := v_0.AuxInt
  1473  		if !(int32(x) > int32(y) && uint32(x) < uint32(y)) {
  1474  			break
  1475  		}
  1476  		v.reset(Op386FlagGT_ULT)
  1477  		return true
  1478  	}
  1479  	// match: (CMPLconst (MOVLconst [x]) [y])
  1480  	// cond: int32(x)>int32(y) && uint32(x)>uint32(y)
  1481  	// result: (FlagGT_UGT)
  1482  	for {
  1483  		y := v.AuxInt
  1484  		v_0 := v.Args[0]
  1485  		if v_0.Op != Op386MOVLconst {
  1486  			break
  1487  		}
  1488  		x := v_0.AuxInt
  1489  		if !(int32(x) > int32(y) && uint32(x) > uint32(y)) {
  1490  			break
  1491  		}
  1492  		v.reset(Op386FlagGT_UGT)
  1493  		return true
  1494  	}
  1495  	// match: (CMPLconst (SHRLconst _ [c]) [n])
  1496  	// cond: 0 <= n && 0 < c && c <= 32 && (1<<uint64(32-c)) <= uint64(n)
  1497  	// result: (FlagLT_ULT)
  1498  	for {
  1499  		n := v.AuxInt
  1500  		v_0 := v.Args[0]
  1501  		if v_0.Op != Op386SHRLconst {
  1502  			break
  1503  		}
  1504  		c := v_0.AuxInt
  1505  		if !(0 <= n && 0 < c && c <= 32 && (1<<uint64(32-c)) <= uint64(n)) {
  1506  			break
  1507  		}
  1508  		v.reset(Op386FlagLT_ULT)
  1509  		return true
  1510  	}
  1511  	// match: (CMPLconst (ANDLconst _ [m]) [n])
  1512  	// cond: 0 <= int32(m) && int32(m) < int32(n)
  1513  	// result: (FlagLT_ULT)
  1514  	for {
  1515  		n := v.AuxInt
  1516  		v_0 := v.Args[0]
  1517  		if v_0.Op != Op386ANDLconst {
  1518  			break
  1519  		}
  1520  		m := v_0.AuxInt
  1521  		if !(0 <= int32(m) && int32(m) < int32(n)) {
  1522  			break
  1523  		}
  1524  		v.reset(Op386FlagLT_ULT)
  1525  		return true
  1526  	}
  1527  	// match: (CMPLconst (ANDL x y) [0])
  1528  	// cond:
  1529  	// result: (TESTL x y)
  1530  	for {
  1531  		if v.AuxInt != 0 {
  1532  			break
  1533  		}
  1534  		v_0 := v.Args[0]
  1535  		if v_0.Op != Op386ANDL {
  1536  			break
  1537  		}
  1538  		x := v_0.Args[0]
  1539  		y := v_0.Args[1]
  1540  		v.reset(Op386TESTL)
  1541  		v.AddArg(x)
  1542  		v.AddArg(y)
  1543  		return true
  1544  	}
  1545  	// match: (CMPLconst (ANDLconst [c] x) [0])
  1546  	// cond:
  1547  	// result: (TESTLconst [c] x)
  1548  	for {
  1549  		if v.AuxInt != 0 {
  1550  			break
  1551  		}
  1552  		v_0 := v.Args[0]
  1553  		if v_0.Op != Op386ANDLconst {
  1554  			break
  1555  		}
  1556  		c := v_0.AuxInt
  1557  		x := v_0.Args[0]
  1558  		v.reset(Op386TESTLconst)
  1559  		v.AuxInt = c
  1560  		v.AddArg(x)
  1561  		return true
  1562  	}
  1563  	// match: (CMPLconst x [0])
  1564  	// cond:
  1565  	// result: (TESTL x x)
  1566  	for {
  1567  		if v.AuxInt != 0 {
  1568  			break
  1569  		}
  1570  		x := v.Args[0]
  1571  		v.reset(Op386TESTL)
  1572  		v.AddArg(x)
  1573  		v.AddArg(x)
  1574  		return true
  1575  	}
  1576  	return false
  1577  }
  1578  func rewriteValue386_Op386CMPW(v *Value, config *Config) bool {
  1579  	b := v.Block
  1580  	_ = b
  1581  	// match: (CMPW x (MOVLconst [c]))
  1582  	// cond:
  1583  	// result: (CMPWconst x [int64(int16(c))])
  1584  	for {
  1585  		x := v.Args[0]
  1586  		v_1 := v.Args[1]
  1587  		if v_1.Op != Op386MOVLconst {
  1588  			break
  1589  		}
  1590  		c := v_1.AuxInt
  1591  		v.reset(Op386CMPWconst)
  1592  		v.AuxInt = int64(int16(c))
  1593  		v.AddArg(x)
  1594  		return true
  1595  	}
  1596  	// match: (CMPW (MOVLconst [c]) x)
  1597  	// cond:
  1598  	// result: (InvertFlags (CMPWconst x [int64(int16(c))]))
  1599  	for {
  1600  		v_0 := v.Args[0]
  1601  		if v_0.Op != Op386MOVLconst {
  1602  			break
  1603  		}
  1604  		c := v_0.AuxInt
  1605  		x := v.Args[1]
  1606  		v.reset(Op386InvertFlags)
  1607  		v0 := b.NewValue0(v.Line, Op386CMPWconst, TypeFlags)
  1608  		v0.AuxInt = int64(int16(c))
  1609  		v0.AddArg(x)
  1610  		v.AddArg(v0)
  1611  		return true
  1612  	}
  1613  	return false
  1614  }
  1615  func rewriteValue386_Op386CMPWconst(v *Value, config *Config) bool {
  1616  	b := v.Block
  1617  	_ = b
  1618  	// match: (CMPWconst (MOVLconst [x]) [y])
  1619  	// cond: int16(x)==int16(y)
  1620  	// result: (FlagEQ)
  1621  	for {
  1622  		y := v.AuxInt
  1623  		v_0 := v.Args[0]
  1624  		if v_0.Op != Op386MOVLconst {
  1625  			break
  1626  		}
  1627  		x := v_0.AuxInt
  1628  		if !(int16(x) == int16(y)) {
  1629  			break
  1630  		}
  1631  		v.reset(Op386FlagEQ)
  1632  		return true
  1633  	}
  1634  	// match: (CMPWconst (MOVLconst [x]) [y])
  1635  	// cond: int16(x)<int16(y) && uint16(x)<uint16(y)
  1636  	// result: (FlagLT_ULT)
  1637  	for {
  1638  		y := v.AuxInt
  1639  		v_0 := v.Args[0]
  1640  		if v_0.Op != Op386MOVLconst {
  1641  			break
  1642  		}
  1643  		x := v_0.AuxInt
  1644  		if !(int16(x) < int16(y) && uint16(x) < uint16(y)) {
  1645  			break
  1646  		}
  1647  		v.reset(Op386FlagLT_ULT)
  1648  		return true
  1649  	}
  1650  	// match: (CMPWconst (MOVLconst [x]) [y])
  1651  	// cond: int16(x)<int16(y) && uint16(x)>uint16(y)
  1652  	// result: (FlagLT_UGT)
  1653  	for {
  1654  		y := v.AuxInt
  1655  		v_0 := v.Args[0]
  1656  		if v_0.Op != Op386MOVLconst {
  1657  			break
  1658  		}
  1659  		x := v_0.AuxInt
  1660  		if !(int16(x) < int16(y) && uint16(x) > uint16(y)) {
  1661  			break
  1662  		}
  1663  		v.reset(Op386FlagLT_UGT)
  1664  		return true
  1665  	}
  1666  	// match: (CMPWconst (MOVLconst [x]) [y])
  1667  	// cond: int16(x)>int16(y) && uint16(x)<uint16(y)
  1668  	// result: (FlagGT_ULT)
  1669  	for {
  1670  		y := v.AuxInt
  1671  		v_0 := v.Args[0]
  1672  		if v_0.Op != Op386MOVLconst {
  1673  			break
  1674  		}
  1675  		x := v_0.AuxInt
  1676  		if !(int16(x) > int16(y) && uint16(x) < uint16(y)) {
  1677  			break
  1678  		}
  1679  		v.reset(Op386FlagGT_ULT)
  1680  		return true
  1681  	}
  1682  	// match: (CMPWconst (MOVLconst [x]) [y])
  1683  	// cond: int16(x)>int16(y) && uint16(x)>uint16(y)
  1684  	// result: (FlagGT_UGT)
  1685  	for {
  1686  		y := v.AuxInt
  1687  		v_0 := v.Args[0]
  1688  		if v_0.Op != Op386MOVLconst {
  1689  			break
  1690  		}
  1691  		x := v_0.AuxInt
  1692  		if !(int16(x) > int16(y) && uint16(x) > uint16(y)) {
  1693  			break
  1694  		}
  1695  		v.reset(Op386FlagGT_UGT)
  1696  		return true
  1697  	}
  1698  	// match: (CMPWconst (ANDLconst _ [m]) [n])
  1699  	// cond: 0 <= int16(m) && int16(m) < int16(n)
  1700  	// result: (FlagLT_ULT)
  1701  	for {
  1702  		n := v.AuxInt
  1703  		v_0 := v.Args[0]
  1704  		if v_0.Op != Op386ANDLconst {
  1705  			break
  1706  		}
  1707  		m := v_0.AuxInt
  1708  		if !(0 <= int16(m) && int16(m) < int16(n)) {
  1709  			break
  1710  		}
  1711  		v.reset(Op386FlagLT_ULT)
  1712  		return true
  1713  	}
  1714  	// match: (CMPWconst (ANDL x y) [0])
  1715  	// cond:
  1716  	// result: (TESTW x y)
  1717  	for {
  1718  		if v.AuxInt != 0 {
  1719  			break
  1720  		}
  1721  		v_0 := v.Args[0]
  1722  		if v_0.Op != Op386ANDL {
  1723  			break
  1724  		}
  1725  		x := v_0.Args[0]
  1726  		y := v_0.Args[1]
  1727  		v.reset(Op386TESTW)
  1728  		v.AddArg(x)
  1729  		v.AddArg(y)
  1730  		return true
  1731  	}
  1732  	// match: (CMPWconst (ANDLconst [c] x) [0])
  1733  	// cond:
  1734  	// result: (TESTWconst [int64(int16(c))] x)
  1735  	for {
  1736  		if v.AuxInt != 0 {
  1737  			break
  1738  		}
  1739  		v_0 := v.Args[0]
  1740  		if v_0.Op != Op386ANDLconst {
  1741  			break
  1742  		}
  1743  		c := v_0.AuxInt
  1744  		x := v_0.Args[0]
  1745  		v.reset(Op386TESTWconst)
  1746  		v.AuxInt = int64(int16(c))
  1747  		v.AddArg(x)
  1748  		return true
  1749  	}
  1750  	// match: (CMPWconst x [0])
  1751  	// cond:
  1752  	// result: (TESTW x x)
  1753  	for {
  1754  		if v.AuxInt != 0 {
  1755  			break
  1756  		}
  1757  		x := v.Args[0]
  1758  		v.reset(Op386TESTW)
  1759  		v.AddArg(x)
  1760  		v.AddArg(x)
  1761  		return true
  1762  	}
  1763  	return false
  1764  }
  1765  func rewriteValue386_Op386LEAL(v *Value, config *Config) bool {
  1766  	b := v.Block
  1767  	_ = b
  1768  	// match: (LEAL [c] {s} (ADDLconst [d] x))
  1769  	// cond: is32Bit(c+d)
  1770  	// result: (LEAL [c+d] {s} x)
  1771  	for {
  1772  		c := v.AuxInt
  1773  		s := v.Aux
  1774  		v_0 := v.Args[0]
  1775  		if v_0.Op != Op386ADDLconst {
  1776  			break
  1777  		}
  1778  		d := v_0.AuxInt
  1779  		x := v_0.Args[0]
  1780  		if !(is32Bit(c + d)) {
  1781  			break
  1782  		}
  1783  		v.reset(Op386LEAL)
  1784  		v.AuxInt = c + d
  1785  		v.Aux = s
  1786  		v.AddArg(x)
  1787  		return true
  1788  	}
  1789  	// match: (LEAL [c] {s} (ADDL x y))
  1790  	// cond: x.Op != OpSB && y.Op != OpSB
  1791  	// result: (LEAL1 [c] {s} x y)
  1792  	for {
  1793  		c := v.AuxInt
  1794  		s := v.Aux
  1795  		v_0 := v.Args[0]
  1796  		if v_0.Op != Op386ADDL {
  1797  			break
  1798  		}
  1799  		x := v_0.Args[0]
  1800  		y := v_0.Args[1]
  1801  		if !(x.Op != OpSB && y.Op != OpSB) {
  1802  			break
  1803  		}
  1804  		v.reset(Op386LEAL1)
  1805  		v.AuxInt = c
  1806  		v.Aux = s
  1807  		v.AddArg(x)
  1808  		v.AddArg(y)
  1809  		return true
  1810  	}
  1811  	// match: (LEAL [off1] {sym1} (LEAL [off2] {sym2} x))
  1812  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  1813  	// result: (LEAL [off1+off2] {mergeSym(sym1,sym2)} x)
  1814  	for {
  1815  		off1 := v.AuxInt
  1816  		sym1 := v.Aux
  1817  		v_0 := v.Args[0]
  1818  		if v_0.Op != Op386LEAL {
  1819  			break
  1820  		}
  1821  		off2 := v_0.AuxInt
  1822  		sym2 := v_0.Aux
  1823  		x := v_0.Args[0]
  1824  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  1825  			break
  1826  		}
  1827  		v.reset(Op386LEAL)
  1828  		v.AuxInt = off1 + off2
  1829  		v.Aux = mergeSym(sym1, sym2)
  1830  		v.AddArg(x)
  1831  		return true
  1832  	}
  1833  	// match: (LEAL [off1] {sym1} (LEAL1 [off2] {sym2} x y))
  1834  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  1835  	// result: (LEAL1 [off1+off2] {mergeSym(sym1,sym2)} x y)
  1836  	for {
  1837  		off1 := v.AuxInt
  1838  		sym1 := v.Aux
  1839  		v_0 := v.Args[0]
  1840  		if v_0.Op != Op386LEAL1 {
  1841  			break
  1842  		}
  1843  		off2 := v_0.AuxInt
  1844  		sym2 := v_0.Aux
  1845  		x := v_0.Args[0]
  1846  		y := v_0.Args[1]
  1847  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  1848  			break
  1849  		}
  1850  		v.reset(Op386LEAL1)
  1851  		v.AuxInt = off1 + off2
  1852  		v.Aux = mergeSym(sym1, sym2)
  1853  		v.AddArg(x)
  1854  		v.AddArg(y)
  1855  		return true
  1856  	}
  1857  	// match: (LEAL [off1] {sym1} (LEAL2 [off2] {sym2} x y))
  1858  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  1859  	// result: (LEAL2 [off1+off2] {mergeSym(sym1,sym2)} x y)
  1860  	for {
  1861  		off1 := v.AuxInt
  1862  		sym1 := v.Aux
  1863  		v_0 := v.Args[0]
  1864  		if v_0.Op != Op386LEAL2 {
  1865  			break
  1866  		}
  1867  		off2 := v_0.AuxInt
  1868  		sym2 := v_0.Aux
  1869  		x := v_0.Args[0]
  1870  		y := v_0.Args[1]
  1871  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  1872  			break
  1873  		}
  1874  		v.reset(Op386LEAL2)
  1875  		v.AuxInt = off1 + off2
  1876  		v.Aux = mergeSym(sym1, sym2)
  1877  		v.AddArg(x)
  1878  		v.AddArg(y)
  1879  		return true
  1880  	}
  1881  	// match: (LEAL [off1] {sym1} (LEAL4 [off2] {sym2} x y))
  1882  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  1883  	// result: (LEAL4 [off1+off2] {mergeSym(sym1,sym2)} x y)
  1884  	for {
  1885  		off1 := v.AuxInt
  1886  		sym1 := v.Aux
  1887  		v_0 := v.Args[0]
  1888  		if v_0.Op != Op386LEAL4 {
  1889  			break
  1890  		}
  1891  		off2 := v_0.AuxInt
  1892  		sym2 := v_0.Aux
  1893  		x := v_0.Args[0]
  1894  		y := v_0.Args[1]
  1895  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  1896  			break
  1897  		}
  1898  		v.reset(Op386LEAL4)
  1899  		v.AuxInt = off1 + off2
  1900  		v.Aux = mergeSym(sym1, sym2)
  1901  		v.AddArg(x)
  1902  		v.AddArg(y)
  1903  		return true
  1904  	}
  1905  	// match: (LEAL [off1] {sym1} (LEAL8 [off2] {sym2} x y))
  1906  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  1907  	// result: (LEAL8 [off1+off2] {mergeSym(sym1,sym2)} x y)
  1908  	for {
  1909  		off1 := v.AuxInt
  1910  		sym1 := v.Aux
  1911  		v_0 := v.Args[0]
  1912  		if v_0.Op != Op386LEAL8 {
  1913  			break
  1914  		}
  1915  		off2 := v_0.AuxInt
  1916  		sym2 := v_0.Aux
  1917  		x := v_0.Args[0]
  1918  		y := v_0.Args[1]
  1919  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  1920  			break
  1921  		}
  1922  		v.reset(Op386LEAL8)
  1923  		v.AuxInt = off1 + off2
  1924  		v.Aux = mergeSym(sym1, sym2)
  1925  		v.AddArg(x)
  1926  		v.AddArg(y)
  1927  		return true
  1928  	}
  1929  	return false
  1930  }
  1931  func rewriteValue386_Op386LEAL1(v *Value, config *Config) bool {
  1932  	b := v.Block
  1933  	_ = b
  1934  	// match: (LEAL1 [c] {s} (ADDLconst [d] x) y)
  1935  	// cond: is32Bit(c+d)   && x.Op != OpSB
  1936  	// result: (LEAL1 [c+d] {s} x y)
  1937  	for {
  1938  		c := v.AuxInt
  1939  		s := v.Aux
  1940  		v_0 := v.Args[0]
  1941  		if v_0.Op != Op386ADDLconst {
  1942  			break
  1943  		}
  1944  		d := v_0.AuxInt
  1945  		x := v_0.Args[0]
  1946  		y := v.Args[1]
  1947  		if !(is32Bit(c+d) && x.Op != OpSB) {
  1948  			break
  1949  		}
  1950  		v.reset(Op386LEAL1)
  1951  		v.AuxInt = c + d
  1952  		v.Aux = s
  1953  		v.AddArg(x)
  1954  		v.AddArg(y)
  1955  		return true
  1956  	}
  1957  	// match: (LEAL1 [c] {s} x (ADDLconst [d] y))
  1958  	// cond: is32Bit(c+d)   && y.Op != OpSB
  1959  	// result: (LEAL1 [c+d] {s} x y)
  1960  	for {
  1961  		c := v.AuxInt
  1962  		s := v.Aux
  1963  		x := v.Args[0]
  1964  		v_1 := v.Args[1]
  1965  		if v_1.Op != Op386ADDLconst {
  1966  			break
  1967  		}
  1968  		d := v_1.AuxInt
  1969  		y := v_1.Args[0]
  1970  		if !(is32Bit(c+d) && y.Op != OpSB) {
  1971  			break
  1972  		}
  1973  		v.reset(Op386LEAL1)
  1974  		v.AuxInt = c + d
  1975  		v.Aux = s
  1976  		v.AddArg(x)
  1977  		v.AddArg(y)
  1978  		return true
  1979  	}
  1980  	// match: (LEAL1 [c] {s} x (SHLLconst [1] y))
  1981  	// cond:
  1982  	// result: (LEAL2 [c] {s} x y)
  1983  	for {
  1984  		c := v.AuxInt
  1985  		s := v.Aux
  1986  		x := v.Args[0]
  1987  		v_1 := v.Args[1]
  1988  		if v_1.Op != Op386SHLLconst {
  1989  			break
  1990  		}
  1991  		if v_1.AuxInt != 1 {
  1992  			break
  1993  		}
  1994  		y := v_1.Args[0]
  1995  		v.reset(Op386LEAL2)
  1996  		v.AuxInt = c
  1997  		v.Aux = s
  1998  		v.AddArg(x)
  1999  		v.AddArg(y)
  2000  		return true
  2001  	}
  2002  	// match: (LEAL1 [c] {s} (SHLLconst [1] x) y)
  2003  	// cond:
  2004  	// result: (LEAL2 [c] {s} y x)
  2005  	for {
  2006  		c := v.AuxInt
  2007  		s := v.Aux
  2008  		v_0 := v.Args[0]
  2009  		if v_0.Op != Op386SHLLconst {
  2010  			break
  2011  		}
  2012  		if v_0.AuxInt != 1 {
  2013  			break
  2014  		}
  2015  		x := v_0.Args[0]
  2016  		y := v.Args[1]
  2017  		v.reset(Op386LEAL2)
  2018  		v.AuxInt = c
  2019  		v.Aux = s
  2020  		v.AddArg(y)
  2021  		v.AddArg(x)
  2022  		return true
  2023  	}
  2024  	// match: (LEAL1 [c] {s} x (SHLLconst [2] y))
  2025  	// cond:
  2026  	// result: (LEAL4 [c] {s} x y)
  2027  	for {
  2028  		c := v.AuxInt
  2029  		s := v.Aux
  2030  		x := v.Args[0]
  2031  		v_1 := v.Args[1]
  2032  		if v_1.Op != Op386SHLLconst {
  2033  			break
  2034  		}
  2035  		if v_1.AuxInt != 2 {
  2036  			break
  2037  		}
  2038  		y := v_1.Args[0]
  2039  		v.reset(Op386LEAL4)
  2040  		v.AuxInt = c
  2041  		v.Aux = s
  2042  		v.AddArg(x)
  2043  		v.AddArg(y)
  2044  		return true
  2045  	}
  2046  	// match: (LEAL1 [c] {s} (SHLLconst [2] x) y)
  2047  	// cond:
  2048  	// result: (LEAL4 [c] {s} y x)
  2049  	for {
  2050  		c := v.AuxInt
  2051  		s := v.Aux
  2052  		v_0 := v.Args[0]
  2053  		if v_0.Op != Op386SHLLconst {
  2054  			break
  2055  		}
  2056  		if v_0.AuxInt != 2 {
  2057  			break
  2058  		}
  2059  		x := v_0.Args[0]
  2060  		y := v.Args[1]
  2061  		v.reset(Op386LEAL4)
  2062  		v.AuxInt = c
  2063  		v.Aux = s
  2064  		v.AddArg(y)
  2065  		v.AddArg(x)
  2066  		return true
  2067  	}
  2068  	// match: (LEAL1 [c] {s} x (SHLLconst [3] y))
  2069  	// cond:
  2070  	// result: (LEAL8 [c] {s} x y)
  2071  	for {
  2072  		c := v.AuxInt
  2073  		s := v.Aux
  2074  		x := v.Args[0]
  2075  		v_1 := v.Args[1]
  2076  		if v_1.Op != Op386SHLLconst {
  2077  			break
  2078  		}
  2079  		if v_1.AuxInt != 3 {
  2080  			break
  2081  		}
  2082  		y := v_1.Args[0]
  2083  		v.reset(Op386LEAL8)
  2084  		v.AuxInt = c
  2085  		v.Aux = s
  2086  		v.AddArg(x)
  2087  		v.AddArg(y)
  2088  		return true
  2089  	}
  2090  	// match: (LEAL1 [c] {s} (SHLLconst [3] x) y)
  2091  	// cond:
  2092  	// result: (LEAL8 [c] {s} y x)
  2093  	for {
  2094  		c := v.AuxInt
  2095  		s := v.Aux
  2096  		v_0 := v.Args[0]
  2097  		if v_0.Op != Op386SHLLconst {
  2098  			break
  2099  		}
  2100  		if v_0.AuxInt != 3 {
  2101  			break
  2102  		}
  2103  		x := v_0.Args[0]
  2104  		y := v.Args[1]
  2105  		v.reset(Op386LEAL8)
  2106  		v.AuxInt = c
  2107  		v.Aux = s
  2108  		v.AddArg(y)
  2109  		v.AddArg(x)
  2110  		return true
  2111  	}
  2112  	// match: (LEAL1 [off1] {sym1} (LEAL [off2] {sym2} x) y)
  2113  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2) && x.Op != OpSB
  2114  	// result: (LEAL1 [off1+off2] {mergeSym(sym1,sym2)} x y)
  2115  	for {
  2116  		off1 := v.AuxInt
  2117  		sym1 := v.Aux
  2118  		v_0 := v.Args[0]
  2119  		if v_0.Op != Op386LEAL {
  2120  			break
  2121  		}
  2122  		off2 := v_0.AuxInt
  2123  		sym2 := v_0.Aux
  2124  		x := v_0.Args[0]
  2125  		y := v.Args[1]
  2126  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && x.Op != OpSB) {
  2127  			break
  2128  		}
  2129  		v.reset(Op386LEAL1)
  2130  		v.AuxInt = off1 + off2
  2131  		v.Aux = mergeSym(sym1, sym2)
  2132  		v.AddArg(x)
  2133  		v.AddArg(y)
  2134  		return true
  2135  	}
  2136  	// match: (LEAL1 [off1] {sym1} x (LEAL [off2] {sym2} y))
  2137  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2) && y.Op != OpSB
  2138  	// result: (LEAL1 [off1+off2] {mergeSym(sym1,sym2)} x y)
  2139  	for {
  2140  		off1 := v.AuxInt
  2141  		sym1 := v.Aux
  2142  		x := v.Args[0]
  2143  		v_1 := v.Args[1]
  2144  		if v_1.Op != Op386LEAL {
  2145  			break
  2146  		}
  2147  		off2 := v_1.AuxInt
  2148  		sym2 := v_1.Aux
  2149  		y := v_1.Args[0]
  2150  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && y.Op != OpSB) {
  2151  			break
  2152  		}
  2153  		v.reset(Op386LEAL1)
  2154  		v.AuxInt = off1 + off2
  2155  		v.Aux = mergeSym(sym1, sym2)
  2156  		v.AddArg(x)
  2157  		v.AddArg(y)
  2158  		return true
  2159  	}
  2160  	return false
  2161  }
  2162  func rewriteValue386_Op386LEAL2(v *Value, config *Config) bool {
  2163  	b := v.Block
  2164  	_ = b
  2165  	// match: (LEAL2 [c] {s} (ADDLconst [d] x) y)
  2166  	// cond: is32Bit(c+d)   && x.Op != OpSB
  2167  	// result: (LEAL2 [c+d] {s} x y)
  2168  	for {
  2169  		c := v.AuxInt
  2170  		s := v.Aux
  2171  		v_0 := v.Args[0]
  2172  		if v_0.Op != Op386ADDLconst {
  2173  			break
  2174  		}
  2175  		d := v_0.AuxInt
  2176  		x := v_0.Args[0]
  2177  		y := v.Args[1]
  2178  		if !(is32Bit(c+d) && x.Op != OpSB) {
  2179  			break
  2180  		}
  2181  		v.reset(Op386LEAL2)
  2182  		v.AuxInt = c + d
  2183  		v.Aux = s
  2184  		v.AddArg(x)
  2185  		v.AddArg(y)
  2186  		return true
  2187  	}
  2188  	// match: (LEAL2 [c] {s} x (ADDLconst [d] y))
  2189  	// cond: is32Bit(c+2*d) && y.Op != OpSB
  2190  	// result: (LEAL2 [c+2*d] {s} x y)
  2191  	for {
  2192  		c := v.AuxInt
  2193  		s := v.Aux
  2194  		x := v.Args[0]
  2195  		v_1 := v.Args[1]
  2196  		if v_1.Op != Op386ADDLconst {
  2197  			break
  2198  		}
  2199  		d := v_1.AuxInt
  2200  		y := v_1.Args[0]
  2201  		if !(is32Bit(c+2*d) && y.Op != OpSB) {
  2202  			break
  2203  		}
  2204  		v.reset(Op386LEAL2)
  2205  		v.AuxInt = c + 2*d
  2206  		v.Aux = s
  2207  		v.AddArg(x)
  2208  		v.AddArg(y)
  2209  		return true
  2210  	}
  2211  	// match: (LEAL2 [c] {s} x (SHLLconst [1] y))
  2212  	// cond:
  2213  	// result: (LEAL4 [c] {s} x y)
  2214  	for {
  2215  		c := v.AuxInt
  2216  		s := v.Aux
  2217  		x := v.Args[0]
  2218  		v_1 := v.Args[1]
  2219  		if v_1.Op != Op386SHLLconst {
  2220  			break
  2221  		}
  2222  		if v_1.AuxInt != 1 {
  2223  			break
  2224  		}
  2225  		y := v_1.Args[0]
  2226  		v.reset(Op386LEAL4)
  2227  		v.AuxInt = c
  2228  		v.Aux = s
  2229  		v.AddArg(x)
  2230  		v.AddArg(y)
  2231  		return true
  2232  	}
  2233  	// match: (LEAL2 [c] {s} x (SHLLconst [2] y))
  2234  	// cond:
  2235  	// result: (LEAL8 [c] {s} x y)
  2236  	for {
  2237  		c := v.AuxInt
  2238  		s := v.Aux
  2239  		x := v.Args[0]
  2240  		v_1 := v.Args[1]
  2241  		if v_1.Op != Op386SHLLconst {
  2242  			break
  2243  		}
  2244  		if v_1.AuxInt != 2 {
  2245  			break
  2246  		}
  2247  		y := v_1.Args[0]
  2248  		v.reset(Op386LEAL8)
  2249  		v.AuxInt = c
  2250  		v.Aux = s
  2251  		v.AddArg(x)
  2252  		v.AddArg(y)
  2253  		return true
  2254  	}
  2255  	// match: (LEAL2 [off1] {sym1} (LEAL [off2] {sym2} x) y)
  2256  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2) && x.Op != OpSB
  2257  	// result: (LEAL2 [off1+off2] {mergeSym(sym1,sym2)} x y)
  2258  	for {
  2259  		off1 := v.AuxInt
  2260  		sym1 := v.Aux
  2261  		v_0 := v.Args[0]
  2262  		if v_0.Op != Op386LEAL {
  2263  			break
  2264  		}
  2265  		off2 := v_0.AuxInt
  2266  		sym2 := v_0.Aux
  2267  		x := v_0.Args[0]
  2268  		y := v.Args[1]
  2269  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && x.Op != OpSB) {
  2270  			break
  2271  		}
  2272  		v.reset(Op386LEAL2)
  2273  		v.AuxInt = off1 + off2
  2274  		v.Aux = mergeSym(sym1, sym2)
  2275  		v.AddArg(x)
  2276  		v.AddArg(y)
  2277  		return true
  2278  	}
  2279  	return false
  2280  }
  2281  func rewriteValue386_Op386LEAL4(v *Value, config *Config) bool {
  2282  	b := v.Block
  2283  	_ = b
  2284  	// match: (LEAL4 [c] {s} (ADDLconst [d] x) y)
  2285  	// cond: is32Bit(c+d)   && x.Op != OpSB
  2286  	// result: (LEAL4 [c+d] {s} x y)
  2287  	for {
  2288  		c := v.AuxInt
  2289  		s := v.Aux
  2290  		v_0 := v.Args[0]
  2291  		if v_0.Op != Op386ADDLconst {
  2292  			break
  2293  		}
  2294  		d := v_0.AuxInt
  2295  		x := v_0.Args[0]
  2296  		y := v.Args[1]
  2297  		if !(is32Bit(c+d) && x.Op != OpSB) {
  2298  			break
  2299  		}
  2300  		v.reset(Op386LEAL4)
  2301  		v.AuxInt = c + d
  2302  		v.Aux = s
  2303  		v.AddArg(x)
  2304  		v.AddArg(y)
  2305  		return true
  2306  	}
  2307  	// match: (LEAL4 [c] {s} x (ADDLconst [d] y))
  2308  	// cond: is32Bit(c+4*d) && y.Op != OpSB
  2309  	// result: (LEAL4 [c+4*d] {s} x y)
  2310  	for {
  2311  		c := v.AuxInt
  2312  		s := v.Aux
  2313  		x := v.Args[0]
  2314  		v_1 := v.Args[1]
  2315  		if v_1.Op != Op386ADDLconst {
  2316  			break
  2317  		}
  2318  		d := v_1.AuxInt
  2319  		y := v_1.Args[0]
  2320  		if !(is32Bit(c+4*d) && y.Op != OpSB) {
  2321  			break
  2322  		}
  2323  		v.reset(Op386LEAL4)
  2324  		v.AuxInt = c + 4*d
  2325  		v.Aux = s
  2326  		v.AddArg(x)
  2327  		v.AddArg(y)
  2328  		return true
  2329  	}
  2330  	// match: (LEAL4 [c] {s} x (SHLLconst [1] y))
  2331  	// cond:
  2332  	// result: (LEAL8 [c] {s} x y)
  2333  	for {
  2334  		c := v.AuxInt
  2335  		s := v.Aux
  2336  		x := v.Args[0]
  2337  		v_1 := v.Args[1]
  2338  		if v_1.Op != Op386SHLLconst {
  2339  			break
  2340  		}
  2341  		if v_1.AuxInt != 1 {
  2342  			break
  2343  		}
  2344  		y := v_1.Args[0]
  2345  		v.reset(Op386LEAL8)
  2346  		v.AuxInt = c
  2347  		v.Aux = s
  2348  		v.AddArg(x)
  2349  		v.AddArg(y)
  2350  		return true
  2351  	}
  2352  	// match: (LEAL4 [off1] {sym1} (LEAL [off2] {sym2} x) y)
  2353  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2) && x.Op != OpSB
  2354  	// result: (LEAL4 [off1+off2] {mergeSym(sym1,sym2)} x y)
  2355  	for {
  2356  		off1 := v.AuxInt
  2357  		sym1 := v.Aux
  2358  		v_0 := v.Args[0]
  2359  		if v_0.Op != Op386LEAL {
  2360  			break
  2361  		}
  2362  		off2 := v_0.AuxInt
  2363  		sym2 := v_0.Aux
  2364  		x := v_0.Args[0]
  2365  		y := v.Args[1]
  2366  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && x.Op != OpSB) {
  2367  			break
  2368  		}
  2369  		v.reset(Op386LEAL4)
  2370  		v.AuxInt = off1 + off2
  2371  		v.Aux = mergeSym(sym1, sym2)
  2372  		v.AddArg(x)
  2373  		v.AddArg(y)
  2374  		return true
  2375  	}
  2376  	return false
  2377  }
  2378  func rewriteValue386_Op386LEAL8(v *Value, config *Config) bool {
  2379  	b := v.Block
  2380  	_ = b
  2381  	// match: (LEAL8 [c] {s} (ADDLconst [d] x) y)
  2382  	// cond: is32Bit(c+d)   && x.Op != OpSB
  2383  	// result: (LEAL8 [c+d] {s} x y)
  2384  	for {
  2385  		c := v.AuxInt
  2386  		s := v.Aux
  2387  		v_0 := v.Args[0]
  2388  		if v_0.Op != Op386ADDLconst {
  2389  			break
  2390  		}
  2391  		d := v_0.AuxInt
  2392  		x := v_0.Args[0]
  2393  		y := v.Args[1]
  2394  		if !(is32Bit(c+d) && x.Op != OpSB) {
  2395  			break
  2396  		}
  2397  		v.reset(Op386LEAL8)
  2398  		v.AuxInt = c + d
  2399  		v.Aux = s
  2400  		v.AddArg(x)
  2401  		v.AddArg(y)
  2402  		return true
  2403  	}
  2404  	// match: (LEAL8 [c] {s} x (ADDLconst [d] y))
  2405  	// cond: is32Bit(c+8*d) && y.Op != OpSB
  2406  	// result: (LEAL8 [c+8*d] {s} x y)
  2407  	for {
  2408  		c := v.AuxInt
  2409  		s := v.Aux
  2410  		x := v.Args[0]
  2411  		v_1 := v.Args[1]
  2412  		if v_1.Op != Op386ADDLconst {
  2413  			break
  2414  		}
  2415  		d := v_1.AuxInt
  2416  		y := v_1.Args[0]
  2417  		if !(is32Bit(c+8*d) && y.Op != OpSB) {
  2418  			break
  2419  		}
  2420  		v.reset(Op386LEAL8)
  2421  		v.AuxInt = c + 8*d
  2422  		v.Aux = s
  2423  		v.AddArg(x)
  2424  		v.AddArg(y)
  2425  		return true
  2426  	}
  2427  	// match: (LEAL8 [off1] {sym1} (LEAL [off2] {sym2} x) y)
  2428  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2) && x.Op != OpSB
  2429  	// result: (LEAL8 [off1+off2] {mergeSym(sym1,sym2)} x y)
  2430  	for {
  2431  		off1 := v.AuxInt
  2432  		sym1 := v.Aux
  2433  		v_0 := v.Args[0]
  2434  		if v_0.Op != Op386LEAL {
  2435  			break
  2436  		}
  2437  		off2 := v_0.AuxInt
  2438  		sym2 := v_0.Aux
  2439  		x := v_0.Args[0]
  2440  		y := v.Args[1]
  2441  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && x.Op != OpSB) {
  2442  			break
  2443  		}
  2444  		v.reset(Op386LEAL8)
  2445  		v.AuxInt = off1 + off2
  2446  		v.Aux = mergeSym(sym1, sym2)
  2447  		v.AddArg(x)
  2448  		v.AddArg(y)
  2449  		return true
  2450  	}
  2451  	return false
  2452  }
  2453  func rewriteValue386_Op386MOVBLSX(v *Value, config *Config) bool {
  2454  	b := v.Block
  2455  	_ = b
  2456  	// match: (MOVBLSX x:(MOVBload [off] {sym} ptr mem))
  2457  	// cond: x.Uses == 1 && clobber(x)
  2458  	// result: @x.Block (MOVBLSXload <v.Type> [off] {sym} ptr mem)
  2459  	for {
  2460  		x := v.Args[0]
  2461  		if x.Op != Op386MOVBload {
  2462  			break
  2463  		}
  2464  		off := x.AuxInt
  2465  		sym := x.Aux
  2466  		ptr := x.Args[0]
  2467  		mem := x.Args[1]
  2468  		if !(x.Uses == 1 && clobber(x)) {
  2469  			break
  2470  		}
  2471  		b = x.Block
  2472  		v0 := b.NewValue0(v.Line, Op386MOVBLSXload, v.Type)
  2473  		v.reset(OpCopy)
  2474  		v.AddArg(v0)
  2475  		v0.AuxInt = off
  2476  		v0.Aux = sym
  2477  		v0.AddArg(ptr)
  2478  		v0.AddArg(mem)
  2479  		return true
  2480  	}
  2481  	// match: (MOVBLSX (ANDLconst [c] x))
  2482  	// cond: c & 0x80 == 0
  2483  	// result: (ANDLconst [c & 0x7f] x)
  2484  	for {
  2485  		v_0 := v.Args[0]
  2486  		if v_0.Op != Op386ANDLconst {
  2487  			break
  2488  		}
  2489  		c := v_0.AuxInt
  2490  		x := v_0.Args[0]
  2491  		if !(c&0x80 == 0) {
  2492  			break
  2493  		}
  2494  		v.reset(Op386ANDLconst)
  2495  		v.AuxInt = c & 0x7f
  2496  		v.AddArg(x)
  2497  		return true
  2498  	}
  2499  	return false
  2500  }
  2501  func rewriteValue386_Op386MOVBLSXload(v *Value, config *Config) bool {
  2502  	b := v.Block
  2503  	_ = b
  2504  	// match: (MOVBLSXload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  2505  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  2506  	// result: (MOVBLSXload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  2507  	for {
  2508  		off1 := v.AuxInt
  2509  		sym1 := v.Aux
  2510  		v_0 := v.Args[0]
  2511  		if v_0.Op != Op386LEAL {
  2512  			break
  2513  		}
  2514  		off2 := v_0.AuxInt
  2515  		sym2 := v_0.Aux
  2516  		base := v_0.Args[0]
  2517  		mem := v.Args[1]
  2518  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  2519  			break
  2520  		}
  2521  		v.reset(Op386MOVBLSXload)
  2522  		v.AuxInt = off1 + off2
  2523  		v.Aux = mergeSym(sym1, sym2)
  2524  		v.AddArg(base)
  2525  		v.AddArg(mem)
  2526  		return true
  2527  	}
  2528  	return false
  2529  }
  2530  func rewriteValue386_Op386MOVBLZX(v *Value, config *Config) bool {
  2531  	b := v.Block
  2532  	_ = b
  2533  	// match: (MOVBLZX x:(MOVBload [off] {sym} ptr mem))
  2534  	// cond: x.Uses == 1 && clobber(x)
  2535  	// result: @x.Block (MOVBload <v.Type> [off] {sym} ptr mem)
  2536  	for {
  2537  		x := v.Args[0]
  2538  		if x.Op != Op386MOVBload {
  2539  			break
  2540  		}
  2541  		off := x.AuxInt
  2542  		sym := x.Aux
  2543  		ptr := x.Args[0]
  2544  		mem := x.Args[1]
  2545  		if !(x.Uses == 1 && clobber(x)) {
  2546  			break
  2547  		}
  2548  		b = x.Block
  2549  		v0 := b.NewValue0(v.Line, Op386MOVBload, v.Type)
  2550  		v.reset(OpCopy)
  2551  		v.AddArg(v0)
  2552  		v0.AuxInt = off
  2553  		v0.Aux = sym
  2554  		v0.AddArg(ptr)
  2555  		v0.AddArg(mem)
  2556  		return true
  2557  	}
  2558  	// match: (MOVBLZX x:(MOVBloadidx1 [off] {sym} ptr idx mem))
  2559  	// cond: x.Uses == 1 && clobber(x)
  2560  	// result: @x.Block (MOVBloadidx1 <v.Type> [off] {sym} ptr idx mem)
  2561  	for {
  2562  		x := v.Args[0]
  2563  		if x.Op != Op386MOVBloadidx1 {
  2564  			break
  2565  		}
  2566  		off := x.AuxInt
  2567  		sym := x.Aux
  2568  		ptr := x.Args[0]
  2569  		idx := x.Args[1]
  2570  		mem := x.Args[2]
  2571  		if !(x.Uses == 1 && clobber(x)) {
  2572  			break
  2573  		}
  2574  		b = x.Block
  2575  		v0 := b.NewValue0(v.Line, Op386MOVBloadidx1, v.Type)
  2576  		v.reset(OpCopy)
  2577  		v.AddArg(v0)
  2578  		v0.AuxInt = off
  2579  		v0.Aux = sym
  2580  		v0.AddArg(ptr)
  2581  		v0.AddArg(idx)
  2582  		v0.AddArg(mem)
  2583  		return true
  2584  	}
  2585  	// match: (MOVBLZX (ANDLconst [c] x))
  2586  	// cond:
  2587  	// result: (ANDLconst [c & 0xff] x)
  2588  	for {
  2589  		v_0 := v.Args[0]
  2590  		if v_0.Op != Op386ANDLconst {
  2591  			break
  2592  		}
  2593  		c := v_0.AuxInt
  2594  		x := v_0.Args[0]
  2595  		v.reset(Op386ANDLconst)
  2596  		v.AuxInt = c & 0xff
  2597  		v.AddArg(x)
  2598  		return true
  2599  	}
  2600  	return false
  2601  }
  2602  func rewriteValue386_Op386MOVBload(v *Value, config *Config) bool {
  2603  	b := v.Block
  2604  	_ = b
  2605  	// match: (MOVBload [off] {sym} ptr (MOVBstore [off2] {sym2} ptr2 x _))
  2606  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  2607  	// result: x
  2608  	for {
  2609  		off := v.AuxInt
  2610  		sym := v.Aux
  2611  		ptr := v.Args[0]
  2612  		v_1 := v.Args[1]
  2613  		if v_1.Op != Op386MOVBstore {
  2614  			break
  2615  		}
  2616  		off2 := v_1.AuxInt
  2617  		sym2 := v_1.Aux
  2618  		ptr2 := v_1.Args[0]
  2619  		x := v_1.Args[1]
  2620  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  2621  			break
  2622  		}
  2623  		v.reset(OpCopy)
  2624  		v.Type = x.Type
  2625  		v.AddArg(x)
  2626  		return true
  2627  	}
  2628  	// match: (MOVBload  [off1] {sym} (ADDLconst [off2] ptr) mem)
  2629  	// cond: is32Bit(off1+off2)
  2630  	// result: (MOVBload  [off1+off2] {sym} ptr mem)
  2631  	for {
  2632  		off1 := v.AuxInt
  2633  		sym := v.Aux
  2634  		v_0 := v.Args[0]
  2635  		if v_0.Op != Op386ADDLconst {
  2636  			break
  2637  		}
  2638  		off2 := v_0.AuxInt
  2639  		ptr := v_0.Args[0]
  2640  		mem := v.Args[1]
  2641  		if !(is32Bit(off1 + off2)) {
  2642  			break
  2643  		}
  2644  		v.reset(Op386MOVBload)
  2645  		v.AuxInt = off1 + off2
  2646  		v.Aux = sym
  2647  		v.AddArg(ptr)
  2648  		v.AddArg(mem)
  2649  		return true
  2650  	}
  2651  	// match: (MOVBload  [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  2652  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  2653  	// result: (MOVBload  [off1+off2] {mergeSym(sym1,sym2)} base mem)
  2654  	for {
  2655  		off1 := v.AuxInt
  2656  		sym1 := v.Aux
  2657  		v_0 := v.Args[0]
  2658  		if v_0.Op != Op386LEAL {
  2659  			break
  2660  		}
  2661  		off2 := v_0.AuxInt
  2662  		sym2 := v_0.Aux
  2663  		base := v_0.Args[0]
  2664  		mem := v.Args[1]
  2665  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  2666  			break
  2667  		}
  2668  		v.reset(Op386MOVBload)
  2669  		v.AuxInt = off1 + off2
  2670  		v.Aux = mergeSym(sym1, sym2)
  2671  		v.AddArg(base)
  2672  		v.AddArg(mem)
  2673  		return true
  2674  	}
  2675  	// match: (MOVBload [off1] {sym1} (LEAL1 [off2] {sym2} ptr idx) mem)
  2676  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  2677  	// result: (MOVBloadidx1 [off1+off2] {mergeSym(sym1,sym2)} ptr idx mem)
  2678  	for {
  2679  		off1 := v.AuxInt
  2680  		sym1 := v.Aux
  2681  		v_0 := v.Args[0]
  2682  		if v_0.Op != Op386LEAL1 {
  2683  			break
  2684  		}
  2685  		off2 := v_0.AuxInt
  2686  		sym2 := v_0.Aux
  2687  		ptr := v_0.Args[0]
  2688  		idx := v_0.Args[1]
  2689  		mem := v.Args[1]
  2690  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  2691  			break
  2692  		}
  2693  		v.reset(Op386MOVBloadidx1)
  2694  		v.AuxInt = off1 + off2
  2695  		v.Aux = mergeSym(sym1, sym2)
  2696  		v.AddArg(ptr)
  2697  		v.AddArg(idx)
  2698  		v.AddArg(mem)
  2699  		return true
  2700  	}
  2701  	// match: (MOVBload [off] {sym} (ADDL ptr idx) mem)
  2702  	// cond: ptr.Op != OpSB
  2703  	// result: (MOVBloadidx1 [off] {sym} ptr idx mem)
  2704  	for {
  2705  		off := v.AuxInt
  2706  		sym := v.Aux
  2707  		v_0 := v.Args[0]
  2708  		if v_0.Op != Op386ADDL {
  2709  			break
  2710  		}
  2711  		ptr := v_0.Args[0]
  2712  		idx := v_0.Args[1]
  2713  		mem := v.Args[1]
  2714  		if !(ptr.Op != OpSB) {
  2715  			break
  2716  		}
  2717  		v.reset(Op386MOVBloadidx1)
  2718  		v.AuxInt = off
  2719  		v.Aux = sym
  2720  		v.AddArg(ptr)
  2721  		v.AddArg(idx)
  2722  		v.AddArg(mem)
  2723  		return true
  2724  	}
  2725  	return false
  2726  }
  2727  func rewriteValue386_Op386MOVBloadidx1(v *Value, config *Config) bool {
  2728  	b := v.Block
  2729  	_ = b
  2730  	// match: (MOVBloadidx1 [c] {sym} (ADDLconst [d] ptr) idx mem)
  2731  	// cond:
  2732  	// result: (MOVBloadidx1 [c+d] {sym} ptr idx mem)
  2733  	for {
  2734  		c := v.AuxInt
  2735  		sym := v.Aux
  2736  		v_0 := v.Args[0]
  2737  		if v_0.Op != Op386ADDLconst {
  2738  			break
  2739  		}
  2740  		d := v_0.AuxInt
  2741  		ptr := v_0.Args[0]
  2742  		idx := v.Args[1]
  2743  		mem := v.Args[2]
  2744  		v.reset(Op386MOVBloadidx1)
  2745  		v.AuxInt = c + d
  2746  		v.Aux = sym
  2747  		v.AddArg(ptr)
  2748  		v.AddArg(idx)
  2749  		v.AddArg(mem)
  2750  		return true
  2751  	}
  2752  	// match: (MOVBloadidx1 [c] {sym} ptr (ADDLconst [d] idx) mem)
  2753  	// cond:
  2754  	// result: (MOVBloadidx1 [c+d] {sym} ptr idx mem)
  2755  	for {
  2756  		c := v.AuxInt
  2757  		sym := v.Aux
  2758  		ptr := v.Args[0]
  2759  		v_1 := v.Args[1]
  2760  		if v_1.Op != Op386ADDLconst {
  2761  			break
  2762  		}
  2763  		d := v_1.AuxInt
  2764  		idx := v_1.Args[0]
  2765  		mem := v.Args[2]
  2766  		v.reset(Op386MOVBloadidx1)
  2767  		v.AuxInt = c + d
  2768  		v.Aux = sym
  2769  		v.AddArg(ptr)
  2770  		v.AddArg(idx)
  2771  		v.AddArg(mem)
  2772  		return true
  2773  	}
  2774  	return false
  2775  }
  2776  func rewriteValue386_Op386MOVBstore(v *Value, config *Config) bool {
  2777  	b := v.Block
  2778  	_ = b
  2779  	// match: (MOVBstore [off] {sym} ptr (MOVBLSX x) mem)
  2780  	// cond:
  2781  	// result: (MOVBstore [off] {sym} ptr x mem)
  2782  	for {
  2783  		off := v.AuxInt
  2784  		sym := v.Aux
  2785  		ptr := v.Args[0]
  2786  		v_1 := v.Args[1]
  2787  		if v_1.Op != Op386MOVBLSX {
  2788  			break
  2789  		}
  2790  		x := v_1.Args[0]
  2791  		mem := v.Args[2]
  2792  		v.reset(Op386MOVBstore)
  2793  		v.AuxInt = off
  2794  		v.Aux = sym
  2795  		v.AddArg(ptr)
  2796  		v.AddArg(x)
  2797  		v.AddArg(mem)
  2798  		return true
  2799  	}
  2800  	// match: (MOVBstore [off] {sym} ptr (MOVBLZX x) mem)
  2801  	// cond:
  2802  	// result: (MOVBstore [off] {sym} ptr x mem)
  2803  	for {
  2804  		off := v.AuxInt
  2805  		sym := v.Aux
  2806  		ptr := v.Args[0]
  2807  		v_1 := v.Args[1]
  2808  		if v_1.Op != Op386MOVBLZX {
  2809  			break
  2810  		}
  2811  		x := v_1.Args[0]
  2812  		mem := v.Args[2]
  2813  		v.reset(Op386MOVBstore)
  2814  		v.AuxInt = off
  2815  		v.Aux = sym
  2816  		v.AddArg(ptr)
  2817  		v.AddArg(x)
  2818  		v.AddArg(mem)
  2819  		return true
  2820  	}
  2821  	// match: (MOVBstore  [off1] {sym} (ADDLconst [off2] ptr) val mem)
  2822  	// cond: is32Bit(off1+off2)
  2823  	// result: (MOVBstore  [off1+off2] {sym} ptr val mem)
  2824  	for {
  2825  		off1 := v.AuxInt
  2826  		sym := v.Aux
  2827  		v_0 := v.Args[0]
  2828  		if v_0.Op != Op386ADDLconst {
  2829  			break
  2830  		}
  2831  		off2 := v_0.AuxInt
  2832  		ptr := v_0.Args[0]
  2833  		val := v.Args[1]
  2834  		mem := v.Args[2]
  2835  		if !(is32Bit(off1 + off2)) {
  2836  			break
  2837  		}
  2838  		v.reset(Op386MOVBstore)
  2839  		v.AuxInt = off1 + off2
  2840  		v.Aux = sym
  2841  		v.AddArg(ptr)
  2842  		v.AddArg(val)
  2843  		v.AddArg(mem)
  2844  		return true
  2845  	}
  2846  	// match: (MOVBstore [off] {sym} ptr (MOVLconst [c]) mem)
  2847  	// cond: validOff(off)
  2848  	// result: (MOVBstoreconst [makeValAndOff(int64(int8(c)),off)] {sym} ptr mem)
  2849  	for {
  2850  		off := v.AuxInt
  2851  		sym := v.Aux
  2852  		ptr := v.Args[0]
  2853  		v_1 := v.Args[1]
  2854  		if v_1.Op != Op386MOVLconst {
  2855  			break
  2856  		}
  2857  		c := v_1.AuxInt
  2858  		mem := v.Args[2]
  2859  		if !(validOff(off)) {
  2860  			break
  2861  		}
  2862  		v.reset(Op386MOVBstoreconst)
  2863  		v.AuxInt = makeValAndOff(int64(int8(c)), off)
  2864  		v.Aux = sym
  2865  		v.AddArg(ptr)
  2866  		v.AddArg(mem)
  2867  		return true
  2868  	}
  2869  	// match: (MOVBstore  [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  2870  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  2871  	// result: (MOVBstore  [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  2872  	for {
  2873  		off1 := v.AuxInt
  2874  		sym1 := v.Aux
  2875  		v_0 := v.Args[0]
  2876  		if v_0.Op != Op386LEAL {
  2877  			break
  2878  		}
  2879  		off2 := v_0.AuxInt
  2880  		sym2 := v_0.Aux
  2881  		base := v_0.Args[0]
  2882  		val := v.Args[1]
  2883  		mem := v.Args[2]
  2884  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  2885  			break
  2886  		}
  2887  		v.reset(Op386MOVBstore)
  2888  		v.AuxInt = off1 + off2
  2889  		v.Aux = mergeSym(sym1, sym2)
  2890  		v.AddArg(base)
  2891  		v.AddArg(val)
  2892  		v.AddArg(mem)
  2893  		return true
  2894  	}
  2895  	// match: (MOVBstore [off1] {sym1} (LEAL1 [off2] {sym2} ptr idx) val mem)
  2896  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  2897  	// result: (MOVBstoreidx1 [off1+off2] {mergeSym(sym1,sym2)} ptr idx val mem)
  2898  	for {
  2899  		off1 := v.AuxInt
  2900  		sym1 := v.Aux
  2901  		v_0 := v.Args[0]
  2902  		if v_0.Op != Op386LEAL1 {
  2903  			break
  2904  		}
  2905  		off2 := v_0.AuxInt
  2906  		sym2 := v_0.Aux
  2907  		ptr := v_0.Args[0]
  2908  		idx := v_0.Args[1]
  2909  		val := v.Args[1]
  2910  		mem := v.Args[2]
  2911  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  2912  			break
  2913  		}
  2914  		v.reset(Op386MOVBstoreidx1)
  2915  		v.AuxInt = off1 + off2
  2916  		v.Aux = mergeSym(sym1, sym2)
  2917  		v.AddArg(ptr)
  2918  		v.AddArg(idx)
  2919  		v.AddArg(val)
  2920  		v.AddArg(mem)
  2921  		return true
  2922  	}
  2923  	// match: (MOVBstore [off] {sym} (ADDL ptr idx) val mem)
  2924  	// cond: ptr.Op != OpSB
  2925  	// result: (MOVBstoreidx1 [off] {sym} ptr idx val mem)
  2926  	for {
  2927  		off := v.AuxInt
  2928  		sym := v.Aux
  2929  		v_0 := v.Args[0]
  2930  		if v_0.Op != Op386ADDL {
  2931  			break
  2932  		}
  2933  		ptr := v_0.Args[0]
  2934  		idx := v_0.Args[1]
  2935  		val := v.Args[1]
  2936  		mem := v.Args[2]
  2937  		if !(ptr.Op != OpSB) {
  2938  			break
  2939  		}
  2940  		v.reset(Op386MOVBstoreidx1)
  2941  		v.AuxInt = off
  2942  		v.Aux = sym
  2943  		v.AddArg(ptr)
  2944  		v.AddArg(idx)
  2945  		v.AddArg(val)
  2946  		v.AddArg(mem)
  2947  		return true
  2948  	}
  2949  	// match: (MOVBstore [i] {s} p (SHRLconst [8] w) x:(MOVBstore [i-1] {s} p w mem))
  2950  	// cond: x.Uses == 1   && clobber(x)
  2951  	// result: (MOVWstore [i-1] {s} p w mem)
  2952  	for {
  2953  		i := v.AuxInt
  2954  		s := v.Aux
  2955  		p := v.Args[0]
  2956  		v_1 := v.Args[1]
  2957  		if v_1.Op != Op386SHRLconst {
  2958  			break
  2959  		}
  2960  		if v_1.AuxInt != 8 {
  2961  			break
  2962  		}
  2963  		w := v_1.Args[0]
  2964  		x := v.Args[2]
  2965  		if x.Op != Op386MOVBstore {
  2966  			break
  2967  		}
  2968  		if x.AuxInt != i-1 {
  2969  			break
  2970  		}
  2971  		if x.Aux != s {
  2972  			break
  2973  		}
  2974  		if p != x.Args[0] {
  2975  			break
  2976  		}
  2977  		if w != x.Args[1] {
  2978  			break
  2979  		}
  2980  		mem := x.Args[2]
  2981  		if !(x.Uses == 1 && clobber(x)) {
  2982  			break
  2983  		}
  2984  		v.reset(Op386MOVWstore)
  2985  		v.AuxInt = i - 1
  2986  		v.Aux = s
  2987  		v.AddArg(p)
  2988  		v.AddArg(w)
  2989  		v.AddArg(mem)
  2990  		return true
  2991  	}
  2992  	// match: (MOVBstore [i] {s} p (SHRLconst [j] w) x:(MOVBstore [i-1] {s} p w0:(SHRLconst [j-8] w) mem))
  2993  	// cond: x.Uses == 1   && clobber(x)
  2994  	// result: (MOVWstore [i-1] {s} p w0 mem)
  2995  	for {
  2996  		i := v.AuxInt
  2997  		s := v.Aux
  2998  		p := v.Args[0]
  2999  		v_1 := v.Args[1]
  3000  		if v_1.Op != Op386SHRLconst {
  3001  			break
  3002  		}
  3003  		j := v_1.AuxInt
  3004  		w := v_1.Args[0]
  3005  		x := v.Args[2]
  3006  		if x.Op != Op386MOVBstore {
  3007  			break
  3008  		}
  3009  		if x.AuxInt != i-1 {
  3010  			break
  3011  		}
  3012  		if x.Aux != s {
  3013  			break
  3014  		}
  3015  		if p != x.Args[0] {
  3016  			break
  3017  		}
  3018  		w0 := x.Args[1]
  3019  		if w0.Op != Op386SHRLconst {
  3020  			break
  3021  		}
  3022  		if w0.AuxInt != j-8 {
  3023  			break
  3024  		}
  3025  		if w != w0.Args[0] {
  3026  			break
  3027  		}
  3028  		mem := x.Args[2]
  3029  		if !(x.Uses == 1 && clobber(x)) {
  3030  			break
  3031  		}
  3032  		v.reset(Op386MOVWstore)
  3033  		v.AuxInt = i - 1
  3034  		v.Aux = s
  3035  		v.AddArg(p)
  3036  		v.AddArg(w0)
  3037  		v.AddArg(mem)
  3038  		return true
  3039  	}
  3040  	return false
  3041  }
  3042  func rewriteValue386_Op386MOVBstoreconst(v *Value, config *Config) bool {
  3043  	b := v.Block
  3044  	_ = b
  3045  	// match: (MOVBstoreconst [sc] {s} (ADDLconst [off] ptr) mem)
  3046  	// cond: ValAndOff(sc).canAdd(off)
  3047  	// result: (MOVBstoreconst [ValAndOff(sc).add(off)] {s} ptr mem)
  3048  	for {
  3049  		sc := v.AuxInt
  3050  		s := v.Aux
  3051  		v_0 := v.Args[0]
  3052  		if v_0.Op != Op386ADDLconst {
  3053  			break
  3054  		}
  3055  		off := v_0.AuxInt
  3056  		ptr := v_0.Args[0]
  3057  		mem := v.Args[1]
  3058  		if !(ValAndOff(sc).canAdd(off)) {
  3059  			break
  3060  		}
  3061  		v.reset(Op386MOVBstoreconst)
  3062  		v.AuxInt = ValAndOff(sc).add(off)
  3063  		v.Aux = s
  3064  		v.AddArg(ptr)
  3065  		v.AddArg(mem)
  3066  		return true
  3067  	}
  3068  	// match: (MOVBstoreconst [sc] {sym1} (LEAL [off] {sym2} ptr) mem)
  3069  	// cond: canMergeSym(sym1, sym2) && ValAndOff(sc).canAdd(off)   && (ptr.Op != OpSB || !config.ctxt.Flag_shared)
  3070  	// result: (MOVBstoreconst [ValAndOff(sc).add(off)] {mergeSym(sym1, sym2)} ptr mem)
  3071  	for {
  3072  		sc := v.AuxInt
  3073  		sym1 := v.Aux
  3074  		v_0 := v.Args[0]
  3075  		if v_0.Op != Op386LEAL {
  3076  			break
  3077  		}
  3078  		off := v_0.AuxInt
  3079  		sym2 := v_0.Aux
  3080  		ptr := v_0.Args[0]
  3081  		mem := v.Args[1]
  3082  		if !(canMergeSym(sym1, sym2) && ValAndOff(sc).canAdd(off) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
  3083  			break
  3084  		}
  3085  		v.reset(Op386MOVBstoreconst)
  3086  		v.AuxInt = ValAndOff(sc).add(off)
  3087  		v.Aux = mergeSym(sym1, sym2)
  3088  		v.AddArg(ptr)
  3089  		v.AddArg(mem)
  3090  		return true
  3091  	}
  3092  	// match: (MOVBstoreconst [x] {sym1} (LEAL1 [off] {sym2} ptr idx) mem)
  3093  	// cond: canMergeSym(sym1, sym2)
  3094  	// result: (MOVBstoreconstidx1 [ValAndOff(x).add(off)] {mergeSym(sym1,sym2)} ptr idx mem)
  3095  	for {
  3096  		x := v.AuxInt
  3097  		sym1 := v.Aux
  3098  		v_0 := v.Args[0]
  3099  		if v_0.Op != Op386LEAL1 {
  3100  			break
  3101  		}
  3102  		off := v_0.AuxInt
  3103  		sym2 := v_0.Aux
  3104  		ptr := v_0.Args[0]
  3105  		idx := v_0.Args[1]
  3106  		mem := v.Args[1]
  3107  		if !(canMergeSym(sym1, sym2)) {
  3108  			break
  3109  		}
  3110  		v.reset(Op386MOVBstoreconstidx1)
  3111  		v.AuxInt = ValAndOff(x).add(off)
  3112  		v.Aux = mergeSym(sym1, sym2)
  3113  		v.AddArg(ptr)
  3114  		v.AddArg(idx)
  3115  		v.AddArg(mem)
  3116  		return true
  3117  	}
  3118  	// match: (MOVBstoreconst [x] {sym} (ADDL ptr idx) mem)
  3119  	// cond:
  3120  	// result: (MOVBstoreconstidx1 [x] {sym} ptr idx mem)
  3121  	for {
  3122  		x := v.AuxInt
  3123  		sym := v.Aux
  3124  		v_0 := v.Args[0]
  3125  		if v_0.Op != Op386ADDL {
  3126  			break
  3127  		}
  3128  		ptr := v_0.Args[0]
  3129  		idx := v_0.Args[1]
  3130  		mem := v.Args[1]
  3131  		v.reset(Op386MOVBstoreconstidx1)
  3132  		v.AuxInt = x
  3133  		v.Aux = sym
  3134  		v.AddArg(ptr)
  3135  		v.AddArg(idx)
  3136  		v.AddArg(mem)
  3137  		return true
  3138  	}
  3139  	// match: (MOVBstoreconst [c] {s} p x:(MOVBstoreconst [a] {s} p mem))
  3140  	// cond: x.Uses == 1   && ValAndOff(a).Off() + 1 == ValAndOff(c).Off()   && clobber(x)
  3141  	// result: (MOVWstoreconst [makeValAndOff(ValAndOff(a).Val()&0xff | ValAndOff(c).Val()<<8, ValAndOff(a).Off())] {s} p mem)
  3142  	for {
  3143  		c := v.AuxInt
  3144  		s := v.Aux
  3145  		p := v.Args[0]
  3146  		x := v.Args[1]
  3147  		if x.Op != Op386MOVBstoreconst {
  3148  			break
  3149  		}
  3150  		a := x.AuxInt
  3151  		if x.Aux != s {
  3152  			break
  3153  		}
  3154  		if p != x.Args[0] {
  3155  			break
  3156  		}
  3157  		mem := x.Args[1]
  3158  		if !(x.Uses == 1 && ValAndOff(a).Off()+1 == ValAndOff(c).Off() && clobber(x)) {
  3159  			break
  3160  		}
  3161  		v.reset(Op386MOVWstoreconst)
  3162  		v.AuxInt = makeValAndOff(ValAndOff(a).Val()&0xff|ValAndOff(c).Val()<<8, ValAndOff(a).Off())
  3163  		v.Aux = s
  3164  		v.AddArg(p)
  3165  		v.AddArg(mem)
  3166  		return true
  3167  	}
  3168  	return false
  3169  }
  3170  func rewriteValue386_Op386MOVBstoreconstidx1(v *Value, config *Config) bool {
  3171  	b := v.Block
  3172  	_ = b
  3173  	// match: (MOVBstoreconstidx1 [x] {sym} (ADDLconst [c] ptr) idx mem)
  3174  	// cond:
  3175  	// result: (MOVBstoreconstidx1 [ValAndOff(x).add(c)] {sym} ptr idx mem)
  3176  	for {
  3177  		x := v.AuxInt
  3178  		sym := v.Aux
  3179  		v_0 := v.Args[0]
  3180  		if v_0.Op != Op386ADDLconst {
  3181  			break
  3182  		}
  3183  		c := v_0.AuxInt
  3184  		ptr := v_0.Args[0]
  3185  		idx := v.Args[1]
  3186  		mem := v.Args[2]
  3187  		v.reset(Op386MOVBstoreconstidx1)
  3188  		v.AuxInt = ValAndOff(x).add(c)
  3189  		v.Aux = sym
  3190  		v.AddArg(ptr)
  3191  		v.AddArg(idx)
  3192  		v.AddArg(mem)
  3193  		return true
  3194  	}
  3195  	// match: (MOVBstoreconstidx1 [x] {sym} ptr (ADDLconst [c] idx) mem)
  3196  	// cond:
  3197  	// result: (MOVBstoreconstidx1 [ValAndOff(x).add(c)] {sym} ptr idx mem)
  3198  	for {
  3199  		x := v.AuxInt
  3200  		sym := v.Aux
  3201  		ptr := v.Args[0]
  3202  		v_1 := v.Args[1]
  3203  		if v_1.Op != Op386ADDLconst {
  3204  			break
  3205  		}
  3206  		c := v_1.AuxInt
  3207  		idx := v_1.Args[0]
  3208  		mem := v.Args[2]
  3209  		v.reset(Op386MOVBstoreconstidx1)
  3210  		v.AuxInt = ValAndOff(x).add(c)
  3211  		v.Aux = sym
  3212  		v.AddArg(ptr)
  3213  		v.AddArg(idx)
  3214  		v.AddArg(mem)
  3215  		return true
  3216  	}
  3217  	// match: (MOVBstoreconstidx1 [c] {s} p i x:(MOVBstoreconstidx1 [a] {s} p i mem))
  3218  	// cond: x.Uses == 1   && ValAndOff(a).Off() + 1 == ValAndOff(c).Off()   && clobber(x)
  3219  	// result: (MOVWstoreconstidx1 [makeValAndOff(ValAndOff(a).Val()&0xff | ValAndOff(c).Val()<<8, ValAndOff(a).Off())] {s} p i mem)
  3220  	for {
  3221  		c := v.AuxInt
  3222  		s := v.Aux
  3223  		p := v.Args[0]
  3224  		i := v.Args[1]
  3225  		x := v.Args[2]
  3226  		if x.Op != Op386MOVBstoreconstidx1 {
  3227  			break
  3228  		}
  3229  		a := x.AuxInt
  3230  		if x.Aux != s {
  3231  			break
  3232  		}
  3233  		if p != x.Args[0] {
  3234  			break
  3235  		}
  3236  		if i != x.Args[1] {
  3237  			break
  3238  		}
  3239  		mem := x.Args[2]
  3240  		if !(x.Uses == 1 && ValAndOff(a).Off()+1 == ValAndOff(c).Off() && clobber(x)) {
  3241  			break
  3242  		}
  3243  		v.reset(Op386MOVWstoreconstidx1)
  3244  		v.AuxInt = makeValAndOff(ValAndOff(a).Val()&0xff|ValAndOff(c).Val()<<8, ValAndOff(a).Off())
  3245  		v.Aux = s
  3246  		v.AddArg(p)
  3247  		v.AddArg(i)
  3248  		v.AddArg(mem)
  3249  		return true
  3250  	}
  3251  	return false
  3252  }
  3253  func rewriteValue386_Op386MOVBstoreidx1(v *Value, config *Config) bool {
  3254  	b := v.Block
  3255  	_ = b
  3256  	// match: (MOVBstoreidx1 [c] {sym} (ADDLconst [d] ptr) idx val mem)
  3257  	// cond:
  3258  	// result: (MOVBstoreidx1 [c+d] {sym} ptr idx val mem)
  3259  	for {
  3260  		c := v.AuxInt
  3261  		sym := v.Aux
  3262  		v_0 := v.Args[0]
  3263  		if v_0.Op != Op386ADDLconst {
  3264  			break
  3265  		}
  3266  		d := v_0.AuxInt
  3267  		ptr := v_0.Args[0]
  3268  		idx := v.Args[1]
  3269  		val := v.Args[2]
  3270  		mem := v.Args[3]
  3271  		v.reset(Op386MOVBstoreidx1)
  3272  		v.AuxInt = c + d
  3273  		v.Aux = sym
  3274  		v.AddArg(ptr)
  3275  		v.AddArg(idx)
  3276  		v.AddArg(val)
  3277  		v.AddArg(mem)
  3278  		return true
  3279  	}
  3280  	// match: (MOVBstoreidx1 [c] {sym} ptr (ADDLconst [d] idx) val mem)
  3281  	// cond:
  3282  	// result: (MOVBstoreidx1 [c+d] {sym} ptr idx val mem)
  3283  	for {
  3284  		c := v.AuxInt
  3285  		sym := v.Aux
  3286  		ptr := v.Args[0]
  3287  		v_1 := v.Args[1]
  3288  		if v_1.Op != Op386ADDLconst {
  3289  			break
  3290  		}
  3291  		d := v_1.AuxInt
  3292  		idx := v_1.Args[0]
  3293  		val := v.Args[2]
  3294  		mem := v.Args[3]
  3295  		v.reset(Op386MOVBstoreidx1)
  3296  		v.AuxInt = c + d
  3297  		v.Aux = sym
  3298  		v.AddArg(ptr)
  3299  		v.AddArg(idx)
  3300  		v.AddArg(val)
  3301  		v.AddArg(mem)
  3302  		return true
  3303  	}
  3304  	// match: (MOVBstoreidx1 [i] {s} p idx (SHRLconst [8] w) x:(MOVBstoreidx1 [i-1] {s} p idx w mem))
  3305  	// cond: x.Uses == 1   && clobber(x)
  3306  	// result: (MOVWstoreidx1 [i-1] {s} p idx w mem)
  3307  	for {
  3308  		i := v.AuxInt
  3309  		s := v.Aux
  3310  		p := v.Args[0]
  3311  		idx := v.Args[1]
  3312  		v_2 := v.Args[2]
  3313  		if v_2.Op != Op386SHRLconst {
  3314  			break
  3315  		}
  3316  		if v_2.AuxInt != 8 {
  3317  			break
  3318  		}
  3319  		w := v_2.Args[0]
  3320  		x := v.Args[3]
  3321  		if x.Op != Op386MOVBstoreidx1 {
  3322  			break
  3323  		}
  3324  		if x.AuxInt != i-1 {
  3325  			break
  3326  		}
  3327  		if x.Aux != s {
  3328  			break
  3329  		}
  3330  		if p != x.Args[0] {
  3331  			break
  3332  		}
  3333  		if idx != x.Args[1] {
  3334  			break
  3335  		}
  3336  		if w != x.Args[2] {
  3337  			break
  3338  		}
  3339  		mem := x.Args[3]
  3340  		if !(x.Uses == 1 && clobber(x)) {
  3341  			break
  3342  		}
  3343  		v.reset(Op386MOVWstoreidx1)
  3344  		v.AuxInt = i - 1
  3345  		v.Aux = s
  3346  		v.AddArg(p)
  3347  		v.AddArg(idx)
  3348  		v.AddArg(w)
  3349  		v.AddArg(mem)
  3350  		return true
  3351  	}
  3352  	// match: (MOVBstoreidx1 [i] {s} p idx (SHRLconst [j] w) x:(MOVBstoreidx1 [i-1] {s} p idx w0:(SHRLconst [j-8] w) mem))
  3353  	// cond: x.Uses == 1   && clobber(x)
  3354  	// result: (MOVWstoreidx1 [i-1] {s} p idx w0 mem)
  3355  	for {
  3356  		i := v.AuxInt
  3357  		s := v.Aux
  3358  		p := v.Args[0]
  3359  		idx := v.Args[1]
  3360  		v_2 := v.Args[2]
  3361  		if v_2.Op != Op386SHRLconst {
  3362  			break
  3363  		}
  3364  		j := v_2.AuxInt
  3365  		w := v_2.Args[0]
  3366  		x := v.Args[3]
  3367  		if x.Op != Op386MOVBstoreidx1 {
  3368  			break
  3369  		}
  3370  		if x.AuxInt != i-1 {
  3371  			break
  3372  		}
  3373  		if x.Aux != s {
  3374  			break
  3375  		}
  3376  		if p != x.Args[0] {
  3377  			break
  3378  		}
  3379  		if idx != x.Args[1] {
  3380  			break
  3381  		}
  3382  		w0 := x.Args[2]
  3383  		if w0.Op != Op386SHRLconst {
  3384  			break
  3385  		}
  3386  		if w0.AuxInt != j-8 {
  3387  			break
  3388  		}
  3389  		if w != w0.Args[0] {
  3390  			break
  3391  		}
  3392  		mem := x.Args[3]
  3393  		if !(x.Uses == 1 && clobber(x)) {
  3394  			break
  3395  		}
  3396  		v.reset(Op386MOVWstoreidx1)
  3397  		v.AuxInt = i - 1
  3398  		v.Aux = s
  3399  		v.AddArg(p)
  3400  		v.AddArg(idx)
  3401  		v.AddArg(w0)
  3402  		v.AddArg(mem)
  3403  		return true
  3404  	}
  3405  	return false
  3406  }
  3407  func rewriteValue386_Op386MOVLload(v *Value, config *Config) bool {
  3408  	b := v.Block
  3409  	_ = b
  3410  	// match: (MOVLload [off] {sym} ptr (MOVLstore [off2] {sym2} ptr2 x _))
  3411  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  3412  	// result: x
  3413  	for {
  3414  		off := v.AuxInt
  3415  		sym := v.Aux
  3416  		ptr := v.Args[0]
  3417  		v_1 := v.Args[1]
  3418  		if v_1.Op != Op386MOVLstore {
  3419  			break
  3420  		}
  3421  		off2 := v_1.AuxInt
  3422  		sym2 := v_1.Aux
  3423  		ptr2 := v_1.Args[0]
  3424  		x := v_1.Args[1]
  3425  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  3426  			break
  3427  		}
  3428  		v.reset(OpCopy)
  3429  		v.Type = x.Type
  3430  		v.AddArg(x)
  3431  		return true
  3432  	}
  3433  	// match: (MOVLload  [off1] {sym} (ADDLconst [off2] ptr) mem)
  3434  	// cond: is32Bit(off1+off2)
  3435  	// result: (MOVLload  [off1+off2] {sym} ptr mem)
  3436  	for {
  3437  		off1 := v.AuxInt
  3438  		sym := v.Aux
  3439  		v_0 := v.Args[0]
  3440  		if v_0.Op != Op386ADDLconst {
  3441  			break
  3442  		}
  3443  		off2 := v_0.AuxInt
  3444  		ptr := v_0.Args[0]
  3445  		mem := v.Args[1]
  3446  		if !(is32Bit(off1 + off2)) {
  3447  			break
  3448  		}
  3449  		v.reset(Op386MOVLload)
  3450  		v.AuxInt = off1 + off2
  3451  		v.Aux = sym
  3452  		v.AddArg(ptr)
  3453  		v.AddArg(mem)
  3454  		return true
  3455  	}
  3456  	// match: (MOVLload  [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  3457  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  3458  	// result: (MOVLload  [off1+off2] {mergeSym(sym1,sym2)} base mem)
  3459  	for {
  3460  		off1 := v.AuxInt
  3461  		sym1 := v.Aux
  3462  		v_0 := v.Args[0]
  3463  		if v_0.Op != Op386LEAL {
  3464  			break
  3465  		}
  3466  		off2 := v_0.AuxInt
  3467  		sym2 := v_0.Aux
  3468  		base := v_0.Args[0]
  3469  		mem := v.Args[1]
  3470  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  3471  			break
  3472  		}
  3473  		v.reset(Op386MOVLload)
  3474  		v.AuxInt = off1 + off2
  3475  		v.Aux = mergeSym(sym1, sym2)
  3476  		v.AddArg(base)
  3477  		v.AddArg(mem)
  3478  		return true
  3479  	}
  3480  	// match: (MOVLload [off1] {sym1} (LEAL1 [off2] {sym2} ptr idx) mem)
  3481  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  3482  	// result: (MOVLloadidx1 [off1+off2] {mergeSym(sym1,sym2)} ptr idx mem)
  3483  	for {
  3484  		off1 := v.AuxInt
  3485  		sym1 := v.Aux
  3486  		v_0 := v.Args[0]
  3487  		if v_0.Op != Op386LEAL1 {
  3488  			break
  3489  		}
  3490  		off2 := v_0.AuxInt
  3491  		sym2 := v_0.Aux
  3492  		ptr := v_0.Args[0]
  3493  		idx := v_0.Args[1]
  3494  		mem := v.Args[1]
  3495  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  3496  			break
  3497  		}
  3498  		v.reset(Op386MOVLloadidx1)
  3499  		v.AuxInt = off1 + off2
  3500  		v.Aux = mergeSym(sym1, sym2)
  3501  		v.AddArg(ptr)
  3502  		v.AddArg(idx)
  3503  		v.AddArg(mem)
  3504  		return true
  3505  	}
  3506  	// match: (MOVLload [off1] {sym1} (LEAL4 [off2] {sym2} ptr idx) mem)
  3507  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  3508  	// result: (MOVLloadidx4 [off1+off2] {mergeSym(sym1,sym2)} ptr idx mem)
  3509  	for {
  3510  		off1 := v.AuxInt
  3511  		sym1 := v.Aux
  3512  		v_0 := v.Args[0]
  3513  		if v_0.Op != Op386LEAL4 {
  3514  			break
  3515  		}
  3516  		off2 := v_0.AuxInt
  3517  		sym2 := v_0.Aux
  3518  		ptr := v_0.Args[0]
  3519  		idx := v_0.Args[1]
  3520  		mem := v.Args[1]
  3521  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  3522  			break
  3523  		}
  3524  		v.reset(Op386MOVLloadidx4)
  3525  		v.AuxInt = off1 + off2
  3526  		v.Aux = mergeSym(sym1, sym2)
  3527  		v.AddArg(ptr)
  3528  		v.AddArg(idx)
  3529  		v.AddArg(mem)
  3530  		return true
  3531  	}
  3532  	// match: (MOVLload [off] {sym} (ADDL ptr idx) mem)
  3533  	// cond: ptr.Op != OpSB
  3534  	// result: (MOVLloadidx1 [off] {sym} ptr idx mem)
  3535  	for {
  3536  		off := v.AuxInt
  3537  		sym := v.Aux
  3538  		v_0 := v.Args[0]
  3539  		if v_0.Op != Op386ADDL {
  3540  			break
  3541  		}
  3542  		ptr := v_0.Args[0]
  3543  		idx := v_0.Args[1]
  3544  		mem := v.Args[1]
  3545  		if !(ptr.Op != OpSB) {
  3546  			break
  3547  		}
  3548  		v.reset(Op386MOVLloadidx1)
  3549  		v.AuxInt = off
  3550  		v.Aux = sym
  3551  		v.AddArg(ptr)
  3552  		v.AddArg(idx)
  3553  		v.AddArg(mem)
  3554  		return true
  3555  	}
  3556  	return false
  3557  }
  3558  func rewriteValue386_Op386MOVLloadidx1(v *Value, config *Config) bool {
  3559  	b := v.Block
  3560  	_ = b
  3561  	// match: (MOVLloadidx1 [c] {sym} ptr (SHLLconst [2] idx) mem)
  3562  	// cond:
  3563  	// result: (MOVLloadidx4 [c] {sym} ptr idx mem)
  3564  	for {
  3565  		c := v.AuxInt
  3566  		sym := v.Aux
  3567  		ptr := v.Args[0]
  3568  		v_1 := v.Args[1]
  3569  		if v_1.Op != Op386SHLLconst {
  3570  			break
  3571  		}
  3572  		if v_1.AuxInt != 2 {
  3573  			break
  3574  		}
  3575  		idx := v_1.Args[0]
  3576  		mem := v.Args[2]
  3577  		v.reset(Op386MOVLloadidx4)
  3578  		v.AuxInt = c
  3579  		v.Aux = sym
  3580  		v.AddArg(ptr)
  3581  		v.AddArg(idx)
  3582  		v.AddArg(mem)
  3583  		return true
  3584  	}
  3585  	// match: (MOVLloadidx1 [c] {sym} (ADDLconst [d] ptr) idx mem)
  3586  	// cond:
  3587  	// result: (MOVLloadidx1 [c+d] {sym} ptr idx mem)
  3588  	for {
  3589  		c := v.AuxInt
  3590  		sym := v.Aux
  3591  		v_0 := v.Args[0]
  3592  		if v_0.Op != Op386ADDLconst {
  3593  			break
  3594  		}
  3595  		d := v_0.AuxInt
  3596  		ptr := v_0.Args[0]
  3597  		idx := v.Args[1]
  3598  		mem := v.Args[2]
  3599  		v.reset(Op386MOVLloadidx1)
  3600  		v.AuxInt = c + d
  3601  		v.Aux = sym
  3602  		v.AddArg(ptr)
  3603  		v.AddArg(idx)
  3604  		v.AddArg(mem)
  3605  		return true
  3606  	}
  3607  	// match: (MOVLloadidx1 [c] {sym} ptr (ADDLconst [d] idx) mem)
  3608  	// cond:
  3609  	// result: (MOVLloadidx1 [c+d] {sym} ptr idx mem)
  3610  	for {
  3611  		c := v.AuxInt
  3612  		sym := v.Aux
  3613  		ptr := v.Args[0]
  3614  		v_1 := v.Args[1]
  3615  		if v_1.Op != Op386ADDLconst {
  3616  			break
  3617  		}
  3618  		d := v_1.AuxInt
  3619  		idx := v_1.Args[0]
  3620  		mem := v.Args[2]
  3621  		v.reset(Op386MOVLloadidx1)
  3622  		v.AuxInt = c + d
  3623  		v.Aux = sym
  3624  		v.AddArg(ptr)
  3625  		v.AddArg(idx)
  3626  		v.AddArg(mem)
  3627  		return true
  3628  	}
  3629  	return false
  3630  }
  3631  func rewriteValue386_Op386MOVLloadidx4(v *Value, config *Config) bool {
  3632  	b := v.Block
  3633  	_ = b
  3634  	// match: (MOVLloadidx4 [c] {sym} (ADDLconst [d] ptr) idx mem)
  3635  	// cond:
  3636  	// result: (MOVLloadidx4 [c+d] {sym} ptr idx mem)
  3637  	for {
  3638  		c := v.AuxInt
  3639  		sym := v.Aux
  3640  		v_0 := v.Args[0]
  3641  		if v_0.Op != Op386ADDLconst {
  3642  			break
  3643  		}
  3644  		d := v_0.AuxInt
  3645  		ptr := v_0.Args[0]
  3646  		idx := v.Args[1]
  3647  		mem := v.Args[2]
  3648  		v.reset(Op386MOVLloadidx4)
  3649  		v.AuxInt = c + d
  3650  		v.Aux = sym
  3651  		v.AddArg(ptr)
  3652  		v.AddArg(idx)
  3653  		v.AddArg(mem)
  3654  		return true
  3655  	}
  3656  	// match: (MOVLloadidx4 [c] {sym} ptr (ADDLconst [d] idx) mem)
  3657  	// cond:
  3658  	// result: (MOVLloadidx4 [c+4*d] {sym} ptr idx mem)
  3659  	for {
  3660  		c := v.AuxInt
  3661  		sym := v.Aux
  3662  		ptr := v.Args[0]
  3663  		v_1 := v.Args[1]
  3664  		if v_1.Op != Op386ADDLconst {
  3665  			break
  3666  		}
  3667  		d := v_1.AuxInt
  3668  		idx := v_1.Args[0]
  3669  		mem := v.Args[2]
  3670  		v.reset(Op386MOVLloadidx4)
  3671  		v.AuxInt = c + 4*d
  3672  		v.Aux = sym
  3673  		v.AddArg(ptr)
  3674  		v.AddArg(idx)
  3675  		v.AddArg(mem)
  3676  		return true
  3677  	}
  3678  	return false
  3679  }
  3680  func rewriteValue386_Op386MOVLstore(v *Value, config *Config) bool {
  3681  	b := v.Block
  3682  	_ = b
  3683  	// match: (MOVLstore  [off1] {sym} (ADDLconst [off2] ptr) val mem)
  3684  	// cond: is32Bit(off1+off2)
  3685  	// result: (MOVLstore  [off1+off2] {sym} ptr val mem)
  3686  	for {
  3687  		off1 := v.AuxInt
  3688  		sym := v.Aux
  3689  		v_0 := v.Args[0]
  3690  		if v_0.Op != Op386ADDLconst {
  3691  			break
  3692  		}
  3693  		off2 := v_0.AuxInt
  3694  		ptr := v_0.Args[0]
  3695  		val := v.Args[1]
  3696  		mem := v.Args[2]
  3697  		if !(is32Bit(off1 + off2)) {
  3698  			break
  3699  		}
  3700  		v.reset(Op386MOVLstore)
  3701  		v.AuxInt = off1 + off2
  3702  		v.Aux = sym
  3703  		v.AddArg(ptr)
  3704  		v.AddArg(val)
  3705  		v.AddArg(mem)
  3706  		return true
  3707  	}
  3708  	// match: (MOVLstore [off] {sym} ptr (MOVLconst [c]) mem)
  3709  	// cond: validOff(off)
  3710  	// result: (MOVLstoreconst [makeValAndOff(int64(int32(c)),off)] {sym} ptr mem)
  3711  	for {
  3712  		off := v.AuxInt
  3713  		sym := v.Aux
  3714  		ptr := v.Args[0]
  3715  		v_1 := v.Args[1]
  3716  		if v_1.Op != Op386MOVLconst {
  3717  			break
  3718  		}
  3719  		c := v_1.AuxInt
  3720  		mem := v.Args[2]
  3721  		if !(validOff(off)) {
  3722  			break
  3723  		}
  3724  		v.reset(Op386MOVLstoreconst)
  3725  		v.AuxInt = makeValAndOff(int64(int32(c)), off)
  3726  		v.Aux = sym
  3727  		v.AddArg(ptr)
  3728  		v.AddArg(mem)
  3729  		return true
  3730  	}
  3731  	// match: (MOVLstore  [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  3732  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  3733  	// result: (MOVLstore  [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  3734  	for {
  3735  		off1 := v.AuxInt
  3736  		sym1 := v.Aux
  3737  		v_0 := v.Args[0]
  3738  		if v_0.Op != Op386LEAL {
  3739  			break
  3740  		}
  3741  		off2 := v_0.AuxInt
  3742  		sym2 := v_0.Aux
  3743  		base := v_0.Args[0]
  3744  		val := v.Args[1]
  3745  		mem := v.Args[2]
  3746  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  3747  			break
  3748  		}
  3749  		v.reset(Op386MOVLstore)
  3750  		v.AuxInt = off1 + off2
  3751  		v.Aux = mergeSym(sym1, sym2)
  3752  		v.AddArg(base)
  3753  		v.AddArg(val)
  3754  		v.AddArg(mem)
  3755  		return true
  3756  	}
  3757  	// match: (MOVLstore [off1] {sym1} (LEAL1 [off2] {sym2} ptr idx) val mem)
  3758  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  3759  	// result: (MOVLstoreidx1 [off1+off2] {mergeSym(sym1,sym2)} ptr idx val mem)
  3760  	for {
  3761  		off1 := v.AuxInt
  3762  		sym1 := v.Aux
  3763  		v_0 := v.Args[0]
  3764  		if v_0.Op != Op386LEAL1 {
  3765  			break
  3766  		}
  3767  		off2 := v_0.AuxInt
  3768  		sym2 := v_0.Aux
  3769  		ptr := v_0.Args[0]
  3770  		idx := v_0.Args[1]
  3771  		val := v.Args[1]
  3772  		mem := v.Args[2]
  3773  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  3774  			break
  3775  		}
  3776  		v.reset(Op386MOVLstoreidx1)
  3777  		v.AuxInt = off1 + off2
  3778  		v.Aux = mergeSym(sym1, sym2)
  3779  		v.AddArg(ptr)
  3780  		v.AddArg(idx)
  3781  		v.AddArg(val)
  3782  		v.AddArg(mem)
  3783  		return true
  3784  	}
  3785  	// match: (MOVLstore [off1] {sym1} (LEAL4 [off2] {sym2} ptr idx) val mem)
  3786  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  3787  	// result: (MOVLstoreidx4 [off1+off2] {mergeSym(sym1,sym2)} ptr idx val mem)
  3788  	for {
  3789  		off1 := v.AuxInt
  3790  		sym1 := v.Aux
  3791  		v_0 := v.Args[0]
  3792  		if v_0.Op != Op386LEAL4 {
  3793  			break
  3794  		}
  3795  		off2 := v_0.AuxInt
  3796  		sym2 := v_0.Aux
  3797  		ptr := v_0.Args[0]
  3798  		idx := v_0.Args[1]
  3799  		val := v.Args[1]
  3800  		mem := v.Args[2]
  3801  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  3802  			break
  3803  		}
  3804  		v.reset(Op386MOVLstoreidx4)
  3805  		v.AuxInt = off1 + off2
  3806  		v.Aux = mergeSym(sym1, sym2)
  3807  		v.AddArg(ptr)
  3808  		v.AddArg(idx)
  3809  		v.AddArg(val)
  3810  		v.AddArg(mem)
  3811  		return true
  3812  	}
  3813  	// match: (MOVLstore [off] {sym} (ADDL ptr idx) val mem)
  3814  	// cond: ptr.Op != OpSB
  3815  	// result: (MOVLstoreidx1 [off] {sym} ptr idx val mem)
  3816  	for {
  3817  		off := v.AuxInt
  3818  		sym := v.Aux
  3819  		v_0 := v.Args[0]
  3820  		if v_0.Op != Op386ADDL {
  3821  			break
  3822  		}
  3823  		ptr := v_0.Args[0]
  3824  		idx := v_0.Args[1]
  3825  		val := v.Args[1]
  3826  		mem := v.Args[2]
  3827  		if !(ptr.Op != OpSB) {
  3828  			break
  3829  		}
  3830  		v.reset(Op386MOVLstoreidx1)
  3831  		v.AuxInt = off
  3832  		v.Aux = sym
  3833  		v.AddArg(ptr)
  3834  		v.AddArg(idx)
  3835  		v.AddArg(val)
  3836  		v.AddArg(mem)
  3837  		return true
  3838  	}
  3839  	return false
  3840  }
  3841  func rewriteValue386_Op386MOVLstoreconst(v *Value, config *Config) bool {
  3842  	b := v.Block
  3843  	_ = b
  3844  	// match: (MOVLstoreconst [sc] {s} (ADDLconst [off] ptr) mem)
  3845  	// cond: ValAndOff(sc).canAdd(off)
  3846  	// result: (MOVLstoreconst [ValAndOff(sc).add(off)] {s} ptr mem)
  3847  	for {
  3848  		sc := v.AuxInt
  3849  		s := v.Aux
  3850  		v_0 := v.Args[0]
  3851  		if v_0.Op != Op386ADDLconst {
  3852  			break
  3853  		}
  3854  		off := v_0.AuxInt
  3855  		ptr := v_0.Args[0]
  3856  		mem := v.Args[1]
  3857  		if !(ValAndOff(sc).canAdd(off)) {
  3858  			break
  3859  		}
  3860  		v.reset(Op386MOVLstoreconst)
  3861  		v.AuxInt = ValAndOff(sc).add(off)
  3862  		v.Aux = s
  3863  		v.AddArg(ptr)
  3864  		v.AddArg(mem)
  3865  		return true
  3866  	}
  3867  	// match: (MOVLstoreconst [sc] {sym1} (LEAL [off] {sym2} ptr) mem)
  3868  	// cond: canMergeSym(sym1, sym2) && ValAndOff(sc).canAdd(off)   && (ptr.Op != OpSB || !config.ctxt.Flag_shared)
  3869  	// result: (MOVLstoreconst [ValAndOff(sc).add(off)] {mergeSym(sym1, sym2)} ptr mem)
  3870  	for {
  3871  		sc := v.AuxInt
  3872  		sym1 := v.Aux
  3873  		v_0 := v.Args[0]
  3874  		if v_0.Op != Op386LEAL {
  3875  			break
  3876  		}
  3877  		off := v_0.AuxInt
  3878  		sym2 := v_0.Aux
  3879  		ptr := v_0.Args[0]
  3880  		mem := v.Args[1]
  3881  		if !(canMergeSym(sym1, sym2) && ValAndOff(sc).canAdd(off) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
  3882  			break
  3883  		}
  3884  		v.reset(Op386MOVLstoreconst)
  3885  		v.AuxInt = ValAndOff(sc).add(off)
  3886  		v.Aux = mergeSym(sym1, sym2)
  3887  		v.AddArg(ptr)
  3888  		v.AddArg(mem)
  3889  		return true
  3890  	}
  3891  	// match: (MOVLstoreconst [x] {sym1} (LEAL1 [off] {sym2} ptr idx) mem)
  3892  	// cond: canMergeSym(sym1, sym2)
  3893  	// result: (MOVLstoreconstidx1 [ValAndOff(x).add(off)] {mergeSym(sym1,sym2)} ptr idx mem)
  3894  	for {
  3895  		x := v.AuxInt
  3896  		sym1 := v.Aux
  3897  		v_0 := v.Args[0]
  3898  		if v_0.Op != Op386LEAL1 {
  3899  			break
  3900  		}
  3901  		off := v_0.AuxInt
  3902  		sym2 := v_0.Aux
  3903  		ptr := v_0.Args[0]
  3904  		idx := v_0.Args[1]
  3905  		mem := v.Args[1]
  3906  		if !(canMergeSym(sym1, sym2)) {
  3907  			break
  3908  		}
  3909  		v.reset(Op386MOVLstoreconstidx1)
  3910  		v.AuxInt = ValAndOff(x).add(off)
  3911  		v.Aux = mergeSym(sym1, sym2)
  3912  		v.AddArg(ptr)
  3913  		v.AddArg(idx)
  3914  		v.AddArg(mem)
  3915  		return true
  3916  	}
  3917  	// match: (MOVLstoreconst [x] {sym1} (LEAL4 [off] {sym2} ptr idx) mem)
  3918  	// cond: canMergeSym(sym1, sym2)
  3919  	// result: (MOVLstoreconstidx4 [ValAndOff(x).add(off)] {mergeSym(sym1,sym2)} ptr idx mem)
  3920  	for {
  3921  		x := v.AuxInt
  3922  		sym1 := v.Aux
  3923  		v_0 := v.Args[0]
  3924  		if v_0.Op != Op386LEAL4 {
  3925  			break
  3926  		}
  3927  		off := v_0.AuxInt
  3928  		sym2 := v_0.Aux
  3929  		ptr := v_0.Args[0]
  3930  		idx := v_0.Args[1]
  3931  		mem := v.Args[1]
  3932  		if !(canMergeSym(sym1, sym2)) {
  3933  			break
  3934  		}
  3935  		v.reset(Op386MOVLstoreconstidx4)
  3936  		v.AuxInt = ValAndOff(x).add(off)
  3937  		v.Aux = mergeSym(sym1, sym2)
  3938  		v.AddArg(ptr)
  3939  		v.AddArg(idx)
  3940  		v.AddArg(mem)
  3941  		return true
  3942  	}
  3943  	// match: (MOVLstoreconst [x] {sym} (ADDL ptr idx) mem)
  3944  	// cond:
  3945  	// result: (MOVLstoreconstidx1 [x] {sym} ptr idx mem)
  3946  	for {
  3947  		x := v.AuxInt
  3948  		sym := v.Aux
  3949  		v_0 := v.Args[0]
  3950  		if v_0.Op != Op386ADDL {
  3951  			break
  3952  		}
  3953  		ptr := v_0.Args[0]
  3954  		idx := v_0.Args[1]
  3955  		mem := v.Args[1]
  3956  		v.reset(Op386MOVLstoreconstidx1)
  3957  		v.AuxInt = x
  3958  		v.Aux = sym
  3959  		v.AddArg(ptr)
  3960  		v.AddArg(idx)
  3961  		v.AddArg(mem)
  3962  		return true
  3963  	}
  3964  	return false
  3965  }
  3966  func rewriteValue386_Op386MOVLstoreconstidx1(v *Value, config *Config) bool {
  3967  	b := v.Block
  3968  	_ = b
  3969  	// match: (MOVLstoreconstidx1 [c] {sym} ptr (SHLLconst [2] idx) mem)
  3970  	// cond:
  3971  	// result: (MOVLstoreconstidx4 [c] {sym} ptr idx mem)
  3972  	for {
  3973  		c := v.AuxInt
  3974  		sym := v.Aux
  3975  		ptr := v.Args[0]
  3976  		v_1 := v.Args[1]
  3977  		if v_1.Op != Op386SHLLconst {
  3978  			break
  3979  		}
  3980  		if v_1.AuxInt != 2 {
  3981  			break
  3982  		}
  3983  		idx := v_1.Args[0]
  3984  		mem := v.Args[2]
  3985  		v.reset(Op386MOVLstoreconstidx4)
  3986  		v.AuxInt = c
  3987  		v.Aux = sym
  3988  		v.AddArg(ptr)
  3989  		v.AddArg(idx)
  3990  		v.AddArg(mem)
  3991  		return true
  3992  	}
  3993  	// match: (MOVLstoreconstidx1 [x] {sym} (ADDLconst [c] ptr) idx mem)
  3994  	// cond:
  3995  	// result: (MOVLstoreconstidx1 [ValAndOff(x).add(c)] {sym} ptr idx mem)
  3996  	for {
  3997  		x := v.AuxInt
  3998  		sym := v.Aux
  3999  		v_0 := v.Args[0]
  4000  		if v_0.Op != Op386ADDLconst {
  4001  			break
  4002  		}
  4003  		c := v_0.AuxInt
  4004  		ptr := v_0.Args[0]
  4005  		idx := v.Args[1]
  4006  		mem := v.Args[2]
  4007  		v.reset(Op386MOVLstoreconstidx1)
  4008  		v.AuxInt = ValAndOff(x).add(c)
  4009  		v.Aux = sym
  4010  		v.AddArg(ptr)
  4011  		v.AddArg(idx)
  4012  		v.AddArg(mem)
  4013  		return true
  4014  	}
  4015  	// match: (MOVLstoreconstidx1 [x] {sym} ptr (ADDLconst [c] idx) mem)
  4016  	// cond:
  4017  	// result: (MOVLstoreconstidx1 [ValAndOff(x).add(c)] {sym} ptr idx mem)
  4018  	for {
  4019  		x := v.AuxInt
  4020  		sym := v.Aux
  4021  		ptr := v.Args[0]
  4022  		v_1 := v.Args[1]
  4023  		if v_1.Op != Op386ADDLconst {
  4024  			break
  4025  		}
  4026  		c := v_1.AuxInt
  4027  		idx := v_1.Args[0]
  4028  		mem := v.Args[2]
  4029  		v.reset(Op386MOVLstoreconstidx1)
  4030  		v.AuxInt = ValAndOff(x).add(c)
  4031  		v.Aux = sym
  4032  		v.AddArg(ptr)
  4033  		v.AddArg(idx)
  4034  		v.AddArg(mem)
  4035  		return true
  4036  	}
  4037  	return false
  4038  }
  4039  func rewriteValue386_Op386MOVLstoreconstidx4(v *Value, config *Config) bool {
  4040  	b := v.Block
  4041  	_ = b
  4042  	// match: (MOVLstoreconstidx4 [x] {sym} (ADDLconst [c] ptr) idx mem)
  4043  	// cond:
  4044  	// result: (MOVLstoreconstidx4 [ValAndOff(x).add(c)] {sym} ptr idx mem)
  4045  	for {
  4046  		x := v.AuxInt
  4047  		sym := v.Aux
  4048  		v_0 := v.Args[0]
  4049  		if v_0.Op != Op386ADDLconst {
  4050  			break
  4051  		}
  4052  		c := v_0.AuxInt
  4053  		ptr := v_0.Args[0]
  4054  		idx := v.Args[1]
  4055  		mem := v.Args[2]
  4056  		v.reset(Op386MOVLstoreconstidx4)
  4057  		v.AuxInt = ValAndOff(x).add(c)
  4058  		v.Aux = sym
  4059  		v.AddArg(ptr)
  4060  		v.AddArg(idx)
  4061  		v.AddArg(mem)
  4062  		return true
  4063  	}
  4064  	// match: (MOVLstoreconstidx4 [x] {sym} ptr (ADDLconst [c] idx) mem)
  4065  	// cond:
  4066  	// result: (MOVLstoreconstidx4 [ValAndOff(x).add(4*c)] {sym} ptr idx mem)
  4067  	for {
  4068  		x := v.AuxInt
  4069  		sym := v.Aux
  4070  		ptr := v.Args[0]
  4071  		v_1 := v.Args[1]
  4072  		if v_1.Op != Op386ADDLconst {
  4073  			break
  4074  		}
  4075  		c := v_1.AuxInt
  4076  		idx := v_1.Args[0]
  4077  		mem := v.Args[2]
  4078  		v.reset(Op386MOVLstoreconstidx4)
  4079  		v.AuxInt = ValAndOff(x).add(4 * c)
  4080  		v.Aux = sym
  4081  		v.AddArg(ptr)
  4082  		v.AddArg(idx)
  4083  		v.AddArg(mem)
  4084  		return true
  4085  	}
  4086  	return false
  4087  }
  4088  func rewriteValue386_Op386MOVLstoreidx1(v *Value, config *Config) bool {
  4089  	b := v.Block
  4090  	_ = b
  4091  	// match: (MOVLstoreidx1 [c] {sym} ptr (SHLLconst [2] idx) val mem)
  4092  	// cond:
  4093  	// result: (MOVLstoreidx4 [c] {sym} ptr idx val mem)
  4094  	for {
  4095  		c := v.AuxInt
  4096  		sym := v.Aux
  4097  		ptr := v.Args[0]
  4098  		v_1 := v.Args[1]
  4099  		if v_1.Op != Op386SHLLconst {
  4100  			break
  4101  		}
  4102  		if v_1.AuxInt != 2 {
  4103  			break
  4104  		}
  4105  		idx := v_1.Args[0]
  4106  		val := v.Args[2]
  4107  		mem := v.Args[3]
  4108  		v.reset(Op386MOVLstoreidx4)
  4109  		v.AuxInt = c
  4110  		v.Aux = sym
  4111  		v.AddArg(ptr)
  4112  		v.AddArg(idx)
  4113  		v.AddArg(val)
  4114  		v.AddArg(mem)
  4115  		return true
  4116  	}
  4117  	// match: (MOVLstoreidx1 [c] {sym} (ADDLconst [d] ptr) idx val mem)
  4118  	// cond:
  4119  	// result: (MOVLstoreidx1 [c+d] {sym} ptr idx val mem)
  4120  	for {
  4121  		c := v.AuxInt
  4122  		sym := v.Aux
  4123  		v_0 := v.Args[0]
  4124  		if v_0.Op != Op386ADDLconst {
  4125  			break
  4126  		}
  4127  		d := v_0.AuxInt
  4128  		ptr := v_0.Args[0]
  4129  		idx := v.Args[1]
  4130  		val := v.Args[2]
  4131  		mem := v.Args[3]
  4132  		v.reset(Op386MOVLstoreidx1)
  4133  		v.AuxInt = c + d
  4134  		v.Aux = sym
  4135  		v.AddArg(ptr)
  4136  		v.AddArg(idx)
  4137  		v.AddArg(val)
  4138  		v.AddArg(mem)
  4139  		return true
  4140  	}
  4141  	// match: (MOVLstoreidx1 [c] {sym} ptr (ADDLconst [d] idx) val mem)
  4142  	// cond:
  4143  	// result: (MOVLstoreidx1 [c+d] {sym} ptr idx val mem)
  4144  	for {
  4145  		c := v.AuxInt
  4146  		sym := v.Aux
  4147  		ptr := v.Args[0]
  4148  		v_1 := v.Args[1]
  4149  		if v_1.Op != Op386ADDLconst {
  4150  			break
  4151  		}
  4152  		d := v_1.AuxInt
  4153  		idx := v_1.Args[0]
  4154  		val := v.Args[2]
  4155  		mem := v.Args[3]
  4156  		v.reset(Op386MOVLstoreidx1)
  4157  		v.AuxInt = c + d
  4158  		v.Aux = sym
  4159  		v.AddArg(ptr)
  4160  		v.AddArg(idx)
  4161  		v.AddArg(val)
  4162  		v.AddArg(mem)
  4163  		return true
  4164  	}
  4165  	return false
  4166  }
  4167  func rewriteValue386_Op386MOVLstoreidx4(v *Value, config *Config) bool {
  4168  	b := v.Block
  4169  	_ = b
  4170  	// match: (MOVLstoreidx4 [c] {sym} (ADDLconst [d] ptr) idx val mem)
  4171  	// cond:
  4172  	// result: (MOVLstoreidx4 [c+d] {sym} ptr idx val mem)
  4173  	for {
  4174  		c := v.AuxInt
  4175  		sym := v.Aux
  4176  		v_0 := v.Args[0]
  4177  		if v_0.Op != Op386ADDLconst {
  4178  			break
  4179  		}
  4180  		d := v_0.AuxInt
  4181  		ptr := v_0.Args[0]
  4182  		idx := v.Args[1]
  4183  		val := v.Args[2]
  4184  		mem := v.Args[3]
  4185  		v.reset(Op386MOVLstoreidx4)
  4186  		v.AuxInt = c + d
  4187  		v.Aux = sym
  4188  		v.AddArg(ptr)
  4189  		v.AddArg(idx)
  4190  		v.AddArg(val)
  4191  		v.AddArg(mem)
  4192  		return true
  4193  	}
  4194  	// match: (MOVLstoreidx4 [c] {sym} ptr (ADDLconst [d] idx) val mem)
  4195  	// cond:
  4196  	// result: (MOVLstoreidx4 [c+4*d] {sym} ptr idx val mem)
  4197  	for {
  4198  		c := v.AuxInt
  4199  		sym := v.Aux
  4200  		ptr := v.Args[0]
  4201  		v_1 := v.Args[1]
  4202  		if v_1.Op != Op386ADDLconst {
  4203  			break
  4204  		}
  4205  		d := v_1.AuxInt
  4206  		idx := v_1.Args[0]
  4207  		val := v.Args[2]
  4208  		mem := v.Args[3]
  4209  		v.reset(Op386MOVLstoreidx4)
  4210  		v.AuxInt = c + 4*d
  4211  		v.Aux = sym
  4212  		v.AddArg(ptr)
  4213  		v.AddArg(idx)
  4214  		v.AddArg(val)
  4215  		v.AddArg(mem)
  4216  		return true
  4217  	}
  4218  	return false
  4219  }
  4220  func rewriteValue386_Op386MOVSDconst(v *Value, config *Config) bool {
  4221  	b := v.Block
  4222  	_ = b
  4223  	// match: (MOVSDconst [c])
  4224  	// cond: config.ctxt.Flag_shared
  4225  	// result: (MOVSDconst2 (MOVSDconst1 [c]))
  4226  	for {
  4227  		c := v.AuxInt
  4228  		if !(config.ctxt.Flag_shared) {
  4229  			break
  4230  		}
  4231  		v.reset(Op386MOVSDconst2)
  4232  		v0 := b.NewValue0(v.Line, Op386MOVSDconst1, config.fe.TypeUInt32())
  4233  		v0.AuxInt = c
  4234  		v.AddArg(v0)
  4235  		return true
  4236  	}
  4237  	return false
  4238  }
  4239  func rewriteValue386_Op386MOVSDload(v *Value, config *Config) bool {
  4240  	b := v.Block
  4241  	_ = b
  4242  	// match: (MOVSDload [off1] {sym} (ADDLconst [off2] ptr) mem)
  4243  	// cond: is32Bit(off1+off2)
  4244  	// result: (MOVSDload [off1+off2] {sym} ptr mem)
  4245  	for {
  4246  		off1 := v.AuxInt
  4247  		sym := v.Aux
  4248  		v_0 := v.Args[0]
  4249  		if v_0.Op != Op386ADDLconst {
  4250  			break
  4251  		}
  4252  		off2 := v_0.AuxInt
  4253  		ptr := v_0.Args[0]
  4254  		mem := v.Args[1]
  4255  		if !(is32Bit(off1 + off2)) {
  4256  			break
  4257  		}
  4258  		v.reset(Op386MOVSDload)
  4259  		v.AuxInt = off1 + off2
  4260  		v.Aux = sym
  4261  		v.AddArg(ptr)
  4262  		v.AddArg(mem)
  4263  		return true
  4264  	}
  4265  	// match: (MOVSDload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  4266  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  4267  	// result: (MOVSDload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  4268  	for {
  4269  		off1 := v.AuxInt
  4270  		sym1 := v.Aux
  4271  		v_0 := v.Args[0]
  4272  		if v_0.Op != Op386LEAL {
  4273  			break
  4274  		}
  4275  		off2 := v_0.AuxInt
  4276  		sym2 := v_0.Aux
  4277  		base := v_0.Args[0]
  4278  		mem := v.Args[1]
  4279  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  4280  			break
  4281  		}
  4282  		v.reset(Op386MOVSDload)
  4283  		v.AuxInt = off1 + off2
  4284  		v.Aux = mergeSym(sym1, sym2)
  4285  		v.AddArg(base)
  4286  		v.AddArg(mem)
  4287  		return true
  4288  	}
  4289  	// match: (MOVSDload [off1] {sym1} (LEAL1 [off2] {sym2} ptr idx) mem)
  4290  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  4291  	// result: (MOVSDloadidx1 [off1+off2] {mergeSym(sym1,sym2)} ptr idx mem)
  4292  	for {
  4293  		off1 := v.AuxInt
  4294  		sym1 := v.Aux
  4295  		v_0 := v.Args[0]
  4296  		if v_0.Op != Op386LEAL1 {
  4297  			break
  4298  		}
  4299  		off2 := v_0.AuxInt
  4300  		sym2 := v_0.Aux
  4301  		ptr := v_0.Args[0]
  4302  		idx := v_0.Args[1]
  4303  		mem := v.Args[1]
  4304  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  4305  			break
  4306  		}
  4307  		v.reset(Op386MOVSDloadidx1)
  4308  		v.AuxInt = off1 + off2
  4309  		v.Aux = mergeSym(sym1, sym2)
  4310  		v.AddArg(ptr)
  4311  		v.AddArg(idx)
  4312  		v.AddArg(mem)
  4313  		return true
  4314  	}
  4315  	// match: (MOVSDload [off1] {sym1} (LEAL8 [off2] {sym2} ptr idx) mem)
  4316  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  4317  	// result: (MOVSDloadidx8 [off1+off2] {mergeSym(sym1,sym2)} ptr idx mem)
  4318  	for {
  4319  		off1 := v.AuxInt
  4320  		sym1 := v.Aux
  4321  		v_0 := v.Args[0]
  4322  		if v_0.Op != Op386LEAL8 {
  4323  			break
  4324  		}
  4325  		off2 := v_0.AuxInt
  4326  		sym2 := v_0.Aux
  4327  		ptr := v_0.Args[0]
  4328  		idx := v_0.Args[1]
  4329  		mem := v.Args[1]
  4330  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  4331  			break
  4332  		}
  4333  		v.reset(Op386MOVSDloadidx8)
  4334  		v.AuxInt = off1 + off2
  4335  		v.Aux = mergeSym(sym1, sym2)
  4336  		v.AddArg(ptr)
  4337  		v.AddArg(idx)
  4338  		v.AddArg(mem)
  4339  		return true
  4340  	}
  4341  	// match: (MOVSDload [off] {sym} (ADDL ptr idx) mem)
  4342  	// cond: ptr.Op != OpSB
  4343  	// result: (MOVSDloadidx1 [off] {sym} ptr idx mem)
  4344  	for {
  4345  		off := v.AuxInt
  4346  		sym := v.Aux
  4347  		v_0 := v.Args[0]
  4348  		if v_0.Op != Op386ADDL {
  4349  			break
  4350  		}
  4351  		ptr := v_0.Args[0]
  4352  		idx := v_0.Args[1]
  4353  		mem := v.Args[1]
  4354  		if !(ptr.Op != OpSB) {
  4355  			break
  4356  		}
  4357  		v.reset(Op386MOVSDloadidx1)
  4358  		v.AuxInt = off
  4359  		v.Aux = sym
  4360  		v.AddArg(ptr)
  4361  		v.AddArg(idx)
  4362  		v.AddArg(mem)
  4363  		return true
  4364  	}
  4365  	return false
  4366  }
  4367  func rewriteValue386_Op386MOVSDloadidx1(v *Value, config *Config) bool {
  4368  	b := v.Block
  4369  	_ = b
  4370  	// match: (MOVSDloadidx1 [c] {sym} (ADDLconst [d] ptr) idx mem)
  4371  	// cond:
  4372  	// result: (MOVSDloadidx1 [c+d] {sym} ptr idx mem)
  4373  	for {
  4374  		c := v.AuxInt
  4375  		sym := v.Aux
  4376  		v_0 := v.Args[0]
  4377  		if v_0.Op != Op386ADDLconst {
  4378  			break
  4379  		}
  4380  		d := v_0.AuxInt
  4381  		ptr := v_0.Args[0]
  4382  		idx := v.Args[1]
  4383  		mem := v.Args[2]
  4384  		v.reset(Op386MOVSDloadidx1)
  4385  		v.AuxInt = c + d
  4386  		v.Aux = sym
  4387  		v.AddArg(ptr)
  4388  		v.AddArg(idx)
  4389  		v.AddArg(mem)
  4390  		return true
  4391  	}
  4392  	// match: (MOVSDloadidx1 [c] {sym} ptr (ADDLconst [d] idx) mem)
  4393  	// cond:
  4394  	// result: (MOVSDloadidx1 [c+d] {sym} ptr idx mem)
  4395  	for {
  4396  		c := v.AuxInt
  4397  		sym := v.Aux
  4398  		ptr := v.Args[0]
  4399  		v_1 := v.Args[1]
  4400  		if v_1.Op != Op386ADDLconst {
  4401  			break
  4402  		}
  4403  		d := v_1.AuxInt
  4404  		idx := v_1.Args[0]
  4405  		mem := v.Args[2]
  4406  		v.reset(Op386MOVSDloadidx1)
  4407  		v.AuxInt = c + d
  4408  		v.Aux = sym
  4409  		v.AddArg(ptr)
  4410  		v.AddArg(idx)
  4411  		v.AddArg(mem)
  4412  		return true
  4413  	}
  4414  	return false
  4415  }
  4416  func rewriteValue386_Op386MOVSDloadidx8(v *Value, config *Config) bool {
  4417  	b := v.Block
  4418  	_ = b
  4419  	// match: (MOVSDloadidx8 [c] {sym} (ADDLconst [d] ptr) idx mem)
  4420  	// cond:
  4421  	// result: (MOVSDloadidx8 [c+d] {sym} ptr idx mem)
  4422  	for {
  4423  		c := v.AuxInt
  4424  		sym := v.Aux
  4425  		v_0 := v.Args[0]
  4426  		if v_0.Op != Op386ADDLconst {
  4427  			break
  4428  		}
  4429  		d := v_0.AuxInt
  4430  		ptr := v_0.Args[0]
  4431  		idx := v.Args[1]
  4432  		mem := v.Args[2]
  4433  		v.reset(Op386MOVSDloadidx8)
  4434  		v.AuxInt = c + d
  4435  		v.Aux = sym
  4436  		v.AddArg(ptr)
  4437  		v.AddArg(idx)
  4438  		v.AddArg(mem)
  4439  		return true
  4440  	}
  4441  	// match: (MOVSDloadidx8 [c] {sym} ptr (ADDLconst [d] idx) mem)
  4442  	// cond:
  4443  	// result: (MOVSDloadidx8 [c+8*d] {sym} ptr idx mem)
  4444  	for {
  4445  		c := v.AuxInt
  4446  		sym := v.Aux
  4447  		ptr := v.Args[0]
  4448  		v_1 := v.Args[1]
  4449  		if v_1.Op != Op386ADDLconst {
  4450  			break
  4451  		}
  4452  		d := v_1.AuxInt
  4453  		idx := v_1.Args[0]
  4454  		mem := v.Args[2]
  4455  		v.reset(Op386MOVSDloadidx8)
  4456  		v.AuxInt = c + 8*d
  4457  		v.Aux = sym
  4458  		v.AddArg(ptr)
  4459  		v.AddArg(idx)
  4460  		v.AddArg(mem)
  4461  		return true
  4462  	}
  4463  	return false
  4464  }
  4465  func rewriteValue386_Op386MOVSDstore(v *Value, config *Config) bool {
  4466  	b := v.Block
  4467  	_ = b
  4468  	// match: (MOVSDstore [off1] {sym} (ADDLconst [off2] ptr) val mem)
  4469  	// cond: is32Bit(off1+off2)
  4470  	// result: (MOVSDstore [off1+off2] {sym} ptr val mem)
  4471  	for {
  4472  		off1 := v.AuxInt
  4473  		sym := v.Aux
  4474  		v_0 := v.Args[0]
  4475  		if v_0.Op != Op386ADDLconst {
  4476  			break
  4477  		}
  4478  		off2 := v_0.AuxInt
  4479  		ptr := v_0.Args[0]
  4480  		val := v.Args[1]
  4481  		mem := v.Args[2]
  4482  		if !(is32Bit(off1 + off2)) {
  4483  			break
  4484  		}
  4485  		v.reset(Op386MOVSDstore)
  4486  		v.AuxInt = off1 + off2
  4487  		v.Aux = sym
  4488  		v.AddArg(ptr)
  4489  		v.AddArg(val)
  4490  		v.AddArg(mem)
  4491  		return true
  4492  	}
  4493  	// match: (MOVSDstore [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  4494  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  4495  	// result: (MOVSDstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  4496  	for {
  4497  		off1 := v.AuxInt
  4498  		sym1 := v.Aux
  4499  		v_0 := v.Args[0]
  4500  		if v_0.Op != Op386LEAL {
  4501  			break
  4502  		}
  4503  		off2 := v_0.AuxInt
  4504  		sym2 := v_0.Aux
  4505  		base := v_0.Args[0]
  4506  		val := v.Args[1]
  4507  		mem := v.Args[2]
  4508  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  4509  			break
  4510  		}
  4511  		v.reset(Op386MOVSDstore)
  4512  		v.AuxInt = off1 + off2
  4513  		v.Aux = mergeSym(sym1, sym2)
  4514  		v.AddArg(base)
  4515  		v.AddArg(val)
  4516  		v.AddArg(mem)
  4517  		return true
  4518  	}
  4519  	// match: (MOVSDstore [off1] {sym1} (LEAL1 [off2] {sym2} ptr idx) val mem)
  4520  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  4521  	// result: (MOVSDstoreidx1 [off1+off2] {mergeSym(sym1,sym2)} ptr idx val mem)
  4522  	for {
  4523  		off1 := v.AuxInt
  4524  		sym1 := v.Aux
  4525  		v_0 := v.Args[0]
  4526  		if v_0.Op != Op386LEAL1 {
  4527  			break
  4528  		}
  4529  		off2 := v_0.AuxInt
  4530  		sym2 := v_0.Aux
  4531  		ptr := v_0.Args[0]
  4532  		idx := v_0.Args[1]
  4533  		val := v.Args[1]
  4534  		mem := v.Args[2]
  4535  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  4536  			break
  4537  		}
  4538  		v.reset(Op386MOVSDstoreidx1)
  4539  		v.AuxInt = off1 + off2
  4540  		v.Aux = mergeSym(sym1, sym2)
  4541  		v.AddArg(ptr)
  4542  		v.AddArg(idx)
  4543  		v.AddArg(val)
  4544  		v.AddArg(mem)
  4545  		return true
  4546  	}
  4547  	// match: (MOVSDstore [off1] {sym1} (LEAL8 [off2] {sym2} ptr idx) val mem)
  4548  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  4549  	// result: (MOVSDstoreidx8 [off1+off2] {mergeSym(sym1,sym2)} ptr idx val mem)
  4550  	for {
  4551  		off1 := v.AuxInt
  4552  		sym1 := v.Aux
  4553  		v_0 := v.Args[0]
  4554  		if v_0.Op != Op386LEAL8 {
  4555  			break
  4556  		}
  4557  		off2 := v_0.AuxInt
  4558  		sym2 := v_0.Aux
  4559  		ptr := v_0.Args[0]
  4560  		idx := v_0.Args[1]
  4561  		val := v.Args[1]
  4562  		mem := v.Args[2]
  4563  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  4564  			break
  4565  		}
  4566  		v.reset(Op386MOVSDstoreidx8)
  4567  		v.AuxInt = off1 + off2
  4568  		v.Aux = mergeSym(sym1, sym2)
  4569  		v.AddArg(ptr)
  4570  		v.AddArg(idx)
  4571  		v.AddArg(val)
  4572  		v.AddArg(mem)
  4573  		return true
  4574  	}
  4575  	// match: (MOVSDstore [off] {sym} (ADDL ptr idx) val mem)
  4576  	// cond: ptr.Op != OpSB
  4577  	// result: (MOVSDstoreidx1 [off] {sym} ptr idx val mem)
  4578  	for {
  4579  		off := v.AuxInt
  4580  		sym := v.Aux
  4581  		v_0 := v.Args[0]
  4582  		if v_0.Op != Op386ADDL {
  4583  			break
  4584  		}
  4585  		ptr := v_0.Args[0]
  4586  		idx := v_0.Args[1]
  4587  		val := v.Args[1]
  4588  		mem := v.Args[2]
  4589  		if !(ptr.Op != OpSB) {
  4590  			break
  4591  		}
  4592  		v.reset(Op386MOVSDstoreidx1)
  4593  		v.AuxInt = off
  4594  		v.Aux = sym
  4595  		v.AddArg(ptr)
  4596  		v.AddArg(idx)
  4597  		v.AddArg(val)
  4598  		v.AddArg(mem)
  4599  		return true
  4600  	}
  4601  	return false
  4602  }
  4603  func rewriteValue386_Op386MOVSDstoreidx1(v *Value, config *Config) bool {
  4604  	b := v.Block
  4605  	_ = b
  4606  	// match: (MOVSDstoreidx1 [c] {sym} (ADDLconst [d] ptr) idx val mem)
  4607  	// cond:
  4608  	// result: (MOVSDstoreidx1 [c+d] {sym} ptr idx val mem)
  4609  	for {
  4610  		c := v.AuxInt
  4611  		sym := v.Aux
  4612  		v_0 := v.Args[0]
  4613  		if v_0.Op != Op386ADDLconst {
  4614  			break
  4615  		}
  4616  		d := v_0.AuxInt
  4617  		ptr := v_0.Args[0]
  4618  		idx := v.Args[1]
  4619  		val := v.Args[2]
  4620  		mem := v.Args[3]
  4621  		v.reset(Op386MOVSDstoreidx1)
  4622  		v.AuxInt = c + d
  4623  		v.Aux = sym
  4624  		v.AddArg(ptr)
  4625  		v.AddArg(idx)
  4626  		v.AddArg(val)
  4627  		v.AddArg(mem)
  4628  		return true
  4629  	}
  4630  	// match: (MOVSDstoreidx1 [c] {sym} ptr (ADDLconst [d] idx) val mem)
  4631  	// cond:
  4632  	// result: (MOVSDstoreidx1 [c+d] {sym} ptr idx val mem)
  4633  	for {
  4634  		c := v.AuxInt
  4635  		sym := v.Aux
  4636  		ptr := v.Args[0]
  4637  		v_1 := v.Args[1]
  4638  		if v_1.Op != Op386ADDLconst {
  4639  			break
  4640  		}
  4641  		d := v_1.AuxInt
  4642  		idx := v_1.Args[0]
  4643  		val := v.Args[2]
  4644  		mem := v.Args[3]
  4645  		v.reset(Op386MOVSDstoreidx1)
  4646  		v.AuxInt = c + d
  4647  		v.Aux = sym
  4648  		v.AddArg(ptr)
  4649  		v.AddArg(idx)
  4650  		v.AddArg(val)
  4651  		v.AddArg(mem)
  4652  		return true
  4653  	}
  4654  	return false
  4655  }
  4656  func rewriteValue386_Op386MOVSDstoreidx8(v *Value, config *Config) bool {
  4657  	b := v.Block
  4658  	_ = b
  4659  	// match: (MOVSDstoreidx8 [c] {sym} (ADDLconst [d] ptr) idx val mem)
  4660  	// cond:
  4661  	// result: (MOVSDstoreidx8 [c+d] {sym} ptr idx val mem)
  4662  	for {
  4663  		c := v.AuxInt
  4664  		sym := v.Aux
  4665  		v_0 := v.Args[0]
  4666  		if v_0.Op != Op386ADDLconst {
  4667  			break
  4668  		}
  4669  		d := v_0.AuxInt
  4670  		ptr := v_0.Args[0]
  4671  		idx := v.Args[1]
  4672  		val := v.Args[2]
  4673  		mem := v.Args[3]
  4674  		v.reset(Op386MOVSDstoreidx8)
  4675  		v.AuxInt = c + d
  4676  		v.Aux = sym
  4677  		v.AddArg(ptr)
  4678  		v.AddArg(idx)
  4679  		v.AddArg(val)
  4680  		v.AddArg(mem)
  4681  		return true
  4682  	}
  4683  	// match: (MOVSDstoreidx8 [c] {sym} ptr (ADDLconst [d] idx) val mem)
  4684  	// cond:
  4685  	// result: (MOVSDstoreidx8 [c+8*d] {sym} ptr idx val mem)
  4686  	for {
  4687  		c := v.AuxInt
  4688  		sym := v.Aux
  4689  		ptr := v.Args[0]
  4690  		v_1 := v.Args[1]
  4691  		if v_1.Op != Op386ADDLconst {
  4692  			break
  4693  		}
  4694  		d := v_1.AuxInt
  4695  		idx := v_1.Args[0]
  4696  		val := v.Args[2]
  4697  		mem := v.Args[3]
  4698  		v.reset(Op386MOVSDstoreidx8)
  4699  		v.AuxInt = c + 8*d
  4700  		v.Aux = sym
  4701  		v.AddArg(ptr)
  4702  		v.AddArg(idx)
  4703  		v.AddArg(val)
  4704  		v.AddArg(mem)
  4705  		return true
  4706  	}
  4707  	return false
  4708  }
  4709  func rewriteValue386_Op386MOVSSconst(v *Value, config *Config) bool {
  4710  	b := v.Block
  4711  	_ = b
  4712  	// match: (MOVSSconst [c])
  4713  	// cond: config.ctxt.Flag_shared
  4714  	// result: (MOVSSconst2 (MOVSSconst1 [c]))
  4715  	for {
  4716  		c := v.AuxInt
  4717  		if !(config.ctxt.Flag_shared) {
  4718  			break
  4719  		}
  4720  		v.reset(Op386MOVSSconst2)
  4721  		v0 := b.NewValue0(v.Line, Op386MOVSSconst1, config.fe.TypeUInt32())
  4722  		v0.AuxInt = c
  4723  		v.AddArg(v0)
  4724  		return true
  4725  	}
  4726  	return false
  4727  }
  4728  func rewriteValue386_Op386MOVSSload(v *Value, config *Config) bool {
  4729  	b := v.Block
  4730  	_ = b
  4731  	// match: (MOVSSload [off1] {sym} (ADDLconst [off2] ptr) mem)
  4732  	// cond: is32Bit(off1+off2)
  4733  	// result: (MOVSSload [off1+off2] {sym} ptr mem)
  4734  	for {
  4735  		off1 := v.AuxInt
  4736  		sym := v.Aux
  4737  		v_0 := v.Args[0]
  4738  		if v_0.Op != Op386ADDLconst {
  4739  			break
  4740  		}
  4741  		off2 := v_0.AuxInt
  4742  		ptr := v_0.Args[0]
  4743  		mem := v.Args[1]
  4744  		if !(is32Bit(off1 + off2)) {
  4745  			break
  4746  		}
  4747  		v.reset(Op386MOVSSload)
  4748  		v.AuxInt = off1 + off2
  4749  		v.Aux = sym
  4750  		v.AddArg(ptr)
  4751  		v.AddArg(mem)
  4752  		return true
  4753  	}
  4754  	// match: (MOVSSload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  4755  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  4756  	// result: (MOVSSload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  4757  	for {
  4758  		off1 := v.AuxInt
  4759  		sym1 := v.Aux
  4760  		v_0 := v.Args[0]
  4761  		if v_0.Op != Op386LEAL {
  4762  			break
  4763  		}
  4764  		off2 := v_0.AuxInt
  4765  		sym2 := v_0.Aux
  4766  		base := v_0.Args[0]
  4767  		mem := v.Args[1]
  4768  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  4769  			break
  4770  		}
  4771  		v.reset(Op386MOVSSload)
  4772  		v.AuxInt = off1 + off2
  4773  		v.Aux = mergeSym(sym1, sym2)
  4774  		v.AddArg(base)
  4775  		v.AddArg(mem)
  4776  		return true
  4777  	}
  4778  	// match: (MOVSSload [off1] {sym1} (LEAL1 [off2] {sym2} ptr idx) mem)
  4779  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  4780  	// result: (MOVSSloadidx1 [off1+off2] {mergeSym(sym1,sym2)} ptr idx mem)
  4781  	for {
  4782  		off1 := v.AuxInt
  4783  		sym1 := v.Aux
  4784  		v_0 := v.Args[0]
  4785  		if v_0.Op != Op386LEAL1 {
  4786  			break
  4787  		}
  4788  		off2 := v_0.AuxInt
  4789  		sym2 := v_0.Aux
  4790  		ptr := v_0.Args[0]
  4791  		idx := v_0.Args[1]
  4792  		mem := v.Args[1]
  4793  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  4794  			break
  4795  		}
  4796  		v.reset(Op386MOVSSloadidx1)
  4797  		v.AuxInt = off1 + off2
  4798  		v.Aux = mergeSym(sym1, sym2)
  4799  		v.AddArg(ptr)
  4800  		v.AddArg(idx)
  4801  		v.AddArg(mem)
  4802  		return true
  4803  	}
  4804  	// match: (MOVSSload [off1] {sym1} (LEAL4 [off2] {sym2} ptr idx) mem)
  4805  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  4806  	// result: (MOVSSloadidx4 [off1+off2] {mergeSym(sym1,sym2)} ptr idx mem)
  4807  	for {
  4808  		off1 := v.AuxInt
  4809  		sym1 := v.Aux
  4810  		v_0 := v.Args[0]
  4811  		if v_0.Op != Op386LEAL4 {
  4812  			break
  4813  		}
  4814  		off2 := v_0.AuxInt
  4815  		sym2 := v_0.Aux
  4816  		ptr := v_0.Args[0]
  4817  		idx := v_0.Args[1]
  4818  		mem := v.Args[1]
  4819  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  4820  			break
  4821  		}
  4822  		v.reset(Op386MOVSSloadidx4)
  4823  		v.AuxInt = off1 + off2
  4824  		v.Aux = mergeSym(sym1, sym2)
  4825  		v.AddArg(ptr)
  4826  		v.AddArg(idx)
  4827  		v.AddArg(mem)
  4828  		return true
  4829  	}
  4830  	// match: (MOVSSload [off] {sym} (ADDL ptr idx) mem)
  4831  	// cond: ptr.Op != OpSB
  4832  	// result: (MOVSSloadidx1 [off] {sym} ptr idx mem)
  4833  	for {
  4834  		off := v.AuxInt
  4835  		sym := v.Aux
  4836  		v_0 := v.Args[0]
  4837  		if v_0.Op != Op386ADDL {
  4838  			break
  4839  		}
  4840  		ptr := v_0.Args[0]
  4841  		idx := v_0.Args[1]
  4842  		mem := v.Args[1]
  4843  		if !(ptr.Op != OpSB) {
  4844  			break
  4845  		}
  4846  		v.reset(Op386MOVSSloadidx1)
  4847  		v.AuxInt = off
  4848  		v.Aux = sym
  4849  		v.AddArg(ptr)
  4850  		v.AddArg(idx)
  4851  		v.AddArg(mem)
  4852  		return true
  4853  	}
  4854  	return false
  4855  }
  4856  func rewriteValue386_Op386MOVSSloadidx1(v *Value, config *Config) bool {
  4857  	b := v.Block
  4858  	_ = b
  4859  	// match: (MOVSSloadidx1 [c] {sym} (ADDLconst [d] ptr) idx mem)
  4860  	// cond:
  4861  	// result: (MOVSSloadidx1 [c+d] {sym} ptr idx mem)
  4862  	for {
  4863  		c := v.AuxInt
  4864  		sym := v.Aux
  4865  		v_0 := v.Args[0]
  4866  		if v_0.Op != Op386ADDLconst {
  4867  			break
  4868  		}
  4869  		d := v_0.AuxInt
  4870  		ptr := v_0.Args[0]
  4871  		idx := v.Args[1]
  4872  		mem := v.Args[2]
  4873  		v.reset(Op386MOVSSloadidx1)
  4874  		v.AuxInt = c + d
  4875  		v.Aux = sym
  4876  		v.AddArg(ptr)
  4877  		v.AddArg(idx)
  4878  		v.AddArg(mem)
  4879  		return true
  4880  	}
  4881  	// match: (MOVSSloadidx1 [c] {sym} ptr (ADDLconst [d] idx) mem)
  4882  	// cond:
  4883  	// result: (MOVSSloadidx1 [c+d] {sym} ptr idx mem)
  4884  	for {
  4885  		c := v.AuxInt
  4886  		sym := v.Aux
  4887  		ptr := v.Args[0]
  4888  		v_1 := v.Args[1]
  4889  		if v_1.Op != Op386ADDLconst {
  4890  			break
  4891  		}
  4892  		d := v_1.AuxInt
  4893  		idx := v_1.Args[0]
  4894  		mem := v.Args[2]
  4895  		v.reset(Op386MOVSSloadidx1)
  4896  		v.AuxInt = c + d
  4897  		v.Aux = sym
  4898  		v.AddArg(ptr)
  4899  		v.AddArg(idx)
  4900  		v.AddArg(mem)
  4901  		return true
  4902  	}
  4903  	return false
  4904  }
  4905  func rewriteValue386_Op386MOVSSloadidx4(v *Value, config *Config) bool {
  4906  	b := v.Block
  4907  	_ = b
  4908  	// match: (MOVSSloadidx4 [c] {sym} (ADDLconst [d] ptr) idx mem)
  4909  	// cond:
  4910  	// result: (MOVSSloadidx4 [c+d] {sym} ptr idx mem)
  4911  	for {
  4912  		c := v.AuxInt
  4913  		sym := v.Aux
  4914  		v_0 := v.Args[0]
  4915  		if v_0.Op != Op386ADDLconst {
  4916  			break
  4917  		}
  4918  		d := v_0.AuxInt
  4919  		ptr := v_0.Args[0]
  4920  		idx := v.Args[1]
  4921  		mem := v.Args[2]
  4922  		v.reset(Op386MOVSSloadidx4)
  4923  		v.AuxInt = c + d
  4924  		v.Aux = sym
  4925  		v.AddArg(ptr)
  4926  		v.AddArg(idx)
  4927  		v.AddArg(mem)
  4928  		return true
  4929  	}
  4930  	// match: (MOVSSloadidx4 [c] {sym} ptr (ADDLconst [d] idx) mem)
  4931  	// cond:
  4932  	// result: (MOVSSloadidx4 [c+4*d] {sym} ptr idx mem)
  4933  	for {
  4934  		c := v.AuxInt
  4935  		sym := v.Aux
  4936  		ptr := v.Args[0]
  4937  		v_1 := v.Args[1]
  4938  		if v_1.Op != Op386ADDLconst {
  4939  			break
  4940  		}
  4941  		d := v_1.AuxInt
  4942  		idx := v_1.Args[0]
  4943  		mem := v.Args[2]
  4944  		v.reset(Op386MOVSSloadidx4)
  4945  		v.AuxInt = c + 4*d
  4946  		v.Aux = sym
  4947  		v.AddArg(ptr)
  4948  		v.AddArg(idx)
  4949  		v.AddArg(mem)
  4950  		return true
  4951  	}
  4952  	return false
  4953  }
  4954  func rewriteValue386_Op386MOVSSstore(v *Value, config *Config) bool {
  4955  	b := v.Block
  4956  	_ = b
  4957  	// match: (MOVSSstore [off1] {sym} (ADDLconst [off2] ptr) val mem)
  4958  	// cond: is32Bit(off1+off2)
  4959  	// result: (MOVSSstore [off1+off2] {sym} ptr val mem)
  4960  	for {
  4961  		off1 := v.AuxInt
  4962  		sym := v.Aux
  4963  		v_0 := v.Args[0]
  4964  		if v_0.Op != Op386ADDLconst {
  4965  			break
  4966  		}
  4967  		off2 := v_0.AuxInt
  4968  		ptr := v_0.Args[0]
  4969  		val := v.Args[1]
  4970  		mem := v.Args[2]
  4971  		if !(is32Bit(off1 + off2)) {
  4972  			break
  4973  		}
  4974  		v.reset(Op386MOVSSstore)
  4975  		v.AuxInt = off1 + off2
  4976  		v.Aux = sym
  4977  		v.AddArg(ptr)
  4978  		v.AddArg(val)
  4979  		v.AddArg(mem)
  4980  		return true
  4981  	}
  4982  	// match: (MOVSSstore [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  4983  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  4984  	// result: (MOVSSstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  4985  	for {
  4986  		off1 := v.AuxInt
  4987  		sym1 := v.Aux
  4988  		v_0 := v.Args[0]
  4989  		if v_0.Op != Op386LEAL {
  4990  			break
  4991  		}
  4992  		off2 := v_0.AuxInt
  4993  		sym2 := v_0.Aux
  4994  		base := v_0.Args[0]
  4995  		val := v.Args[1]
  4996  		mem := v.Args[2]
  4997  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  4998  			break
  4999  		}
  5000  		v.reset(Op386MOVSSstore)
  5001  		v.AuxInt = off1 + off2
  5002  		v.Aux = mergeSym(sym1, sym2)
  5003  		v.AddArg(base)
  5004  		v.AddArg(val)
  5005  		v.AddArg(mem)
  5006  		return true
  5007  	}
  5008  	// match: (MOVSSstore [off1] {sym1} (LEAL1 [off2] {sym2} ptr idx) val mem)
  5009  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  5010  	// result: (MOVSSstoreidx1 [off1+off2] {mergeSym(sym1,sym2)} ptr idx val mem)
  5011  	for {
  5012  		off1 := v.AuxInt
  5013  		sym1 := v.Aux
  5014  		v_0 := v.Args[0]
  5015  		if v_0.Op != Op386LEAL1 {
  5016  			break
  5017  		}
  5018  		off2 := v_0.AuxInt
  5019  		sym2 := v_0.Aux
  5020  		ptr := v_0.Args[0]
  5021  		idx := v_0.Args[1]
  5022  		val := v.Args[1]
  5023  		mem := v.Args[2]
  5024  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  5025  			break
  5026  		}
  5027  		v.reset(Op386MOVSSstoreidx1)
  5028  		v.AuxInt = off1 + off2
  5029  		v.Aux = mergeSym(sym1, sym2)
  5030  		v.AddArg(ptr)
  5031  		v.AddArg(idx)
  5032  		v.AddArg(val)
  5033  		v.AddArg(mem)
  5034  		return true
  5035  	}
  5036  	// match: (MOVSSstore [off1] {sym1} (LEAL4 [off2] {sym2} ptr idx) val mem)
  5037  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  5038  	// result: (MOVSSstoreidx4 [off1+off2] {mergeSym(sym1,sym2)} ptr idx val mem)
  5039  	for {
  5040  		off1 := v.AuxInt
  5041  		sym1 := v.Aux
  5042  		v_0 := v.Args[0]
  5043  		if v_0.Op != Op386LEAL4 {
  5044  			break
  5045  		}
  5046  		off2 := v_0.AuxInt
  5047  		sym2 := v_0.Aux
  5048  		ptr := v_0.Args[0]
  5049  		idx := v_0.Args[1]
  5050  		val := v.Args[1]
  5051  		mem := v.Args[2]
  5052  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  5053  			break
  5054  		}
  5055  		v.reset(Op386MOVSSstoreidx4)
  5056  		v.AuxInt = off1 + off2
  5057  		v.Aux = mergeSym(sym1, sym2)
  5058  		v.AddArg(ptr)
  5059  		v.AddArg(idx)
  5060  		v.AddArg(val)
  5061  		v.AddArg(mem)
  5062  		return true
  5063  	}
  5064  	// match: (MOVSSstore [off] {sym} (ADDL ptr idx) val mem)
  5065  	// cond: ptr.Op != OpSB
  5066  	// result: (MOVSSstoreidx1 [off] {sym} ptr idx val mem)
  5067  	for {
  5068  		off := v.AuxInt
  5069  		sym := v.Aux
  5070  		v_0 := v.Args[0]
  5071  		if v_0.Op != Op386ADDL {
  5072  			break
  5073  		}
  5074  		ptr := v_0.Args[0]
  5075  		idx := v_0.Args[1]
  5076  		val := v.Args[1]
  5077  		mem := v.Args[2]
  5078  		if !(ptr.Op != OpSB) {
  5079  			break
  5080  		}
  5081  		v.reset(Op386MOVSSstoreidx1)
  5082  		v.AuxInt = off
  5083  		v.Aux = sym
  5084  		v.AddArg(ptr)
  5085  		v.AddArg(idx)
  5086  		v.AddArg(val)
  5087  		v.AddArg(mem)
  5088  		return true
  5089  	}
  5090  	return false
  5091  }
  5092  func rewriteValue386_Op386MOVSSstoreidx1(v *Value, config *Config) bool {
  5093  	b := v.Block
  5094  	_ = b
  5095  	// match: (MOVSSstoreidx1 [c] {sym} (ADDLconst [d] ptr) idx val mem)
  5096  	// cond:
  5097  	// result: (MOVSSstoreidx1 [c+d] {sym} ptr idx val mem)
  5098  	for {
  5099  		c := v.AuxInt
  5100  		sym := v.Aux
  5101  		v_0 := v.Args[0]
  5102  		if v_0.Op != Op386ADDLconst {
  5103  			break
  5104  		}
  5105  		d := v_0.AuxInt
  5106  		ptr := v_0.Args[0]
  5107  		idx := v.Args[1]
  5108  		val := v.Args[2]
  5109  		mem := v.Args[3]
  5110  		v.reset(Op386MOVSSstoreidx1)
  5111  		v.AuxInt = c + d
  5112  		v.Aux = sym
  5113  		v.AddArg(ptr)
  5114  		v.AddArg(idx)
  5115  		v.AddArg(val)
  5116  		v.AddArg(mem)
  5117  		return true
  5118  	}
  5119  	// match: (MOVSSstoreidx1 [c] {sym} ptr (ADDLconst [d] idx) val mem)
  5120  	// cond:
  5121  	// result: (MOVSSstoreidx1 [c+d] {sym} ptr idx val mem)
  5122  	for {
  5123  		c := v.AuxInt
  5124  		sym := v.Aux
  5125  		ptr := v.Args[0]
  5126  		v_1 := v.Args[1]
  5127  		if v_1.Op != Op386ADDLconst {
  5128  			break
  5129  		}
  5130  		d := v_1.AuxInt
  5131  		idx := v_1.Args[0]
  5132  		val := v.Args[2]
  5133  		mem := v.Args[3]
  5134  		v.reset(Op386MOVSSstoreidx1)
  5135  		v.AuxInt = c + d
  5136  		v.Aux = sym
  5137  		v.AddArg(ptr)
  5138  		v.AddArg(idx)
  5139  		v.AddArg(val)
  5140  		v.AddArg(mem)
  5141  		return true
  5142  	}
  5143  	return false
  5144  }
  5145  func rewriteValue386_Op386MOVSSstoreidx4(v *Value, config *Config) bool {
  5146  	b := v.Block
  5147  	_ = b
  5148  	// match: (MOVSSstoreidx4 [c] {sym} (ADDLconst [d] ptr) idx val mem)
  5149  	// cond:
  5150  	// result: (MOVSSstoreidx4 [c+d] {sym} ptr idx val mem)
  5151  	for {
  5152  		c := v.AuxInt
  5153  		sym := v.Aux
  5154  		v_0 := v.Args[0]
  5155  		if v_0.Op != Op386ADDLconst {
  5156  			break
  5157  		}
  5158  		d := v_0.AuxInt
  5159  		ptr := v_0.Args[0]
  5160  		idx := v.Args[1]
  5161  		val := v.Args[2]
  5162  		mem := v.Args[3]
  5163  		v.reset(Op386MOVSSstoreidx4)
  5164  		v.AuxInt = c + d
  5165  		v.Aux = sym
  5166  		v.AddArg(ptr)
  5167  		v.AddArg(idx)
  5168  		v.AddArg(val)
  5169  		v.AddArg(mem)
  5170  		return true
  5171  	}
  5172  	// match: (MOVSSstoreidx4 [c] {sym} ptr (ADDLconst [d] idx) val mem)
  5173  	// cond:
  5174  	// result: (MOVSSstoreidx4 [c+4*d] {sym} ptr idx val mem)
  5175  	for {
  5176  		c := v.AuxInt
  5177  		sym := v.Aux
  5178  		ptr := v.Args[0]
  5179  		v_1 := v.Args[1]
  5180  		if v_1.Op != Op386ADDLconst {
  5181  			break
  5182  		}
  5183  		d := v_1.AuxInt
  5184  		idx := v_1.Args[0]
  5185  		val := v.Args[2]
  5186  		mem := v.Args[3]
  5187  		v.reset(Op386MOVSSstoreidx4)
  5188  		v.AuxInt = c + 4*d
  5189  		v.Aux = sym
  5190  		v.AddArg(ptr)
  5191  		v.AddArg(idx)
  5192  		v.AddArg(val)
  5193  		v.AddArg(mem)
  5194  		return true
  5195  	}
  5196  	return false
  5197  }
  5198  func rewriteValue386_Op386MOVWLSX(v *Value, config *Config) bool {
  5199  	b := v.Block
  5200  	_ = b
  5201  	// match: (MOVWLSX x:(MOVWload [off] {sym} ptr mem))
  5202  	// cond: x.Uses == 1 && clobber(x)
  5203  	// result: @x.Block (MOVWLSXload <v.Type> [off] {sym} ptr mem)
  5204  	for {
  5205  		x := v.Args[0]
  5206  		if x.Op != Op386MOVWload {
  5207  			break
  5208  		}
  5209  		off := x.AuxInt
  5210  		sym := x.Aux
  5211  		ptr := x.Args[0]
  5212  		mem := x.Args[1]
  5213  		if !(x.Uses == 1 && clobber(x)) {
  5214  			break
  5215  		}
  5216  		b = x.Block
  5217  		v0 := b.NewValue0(v.Line, Op386MOVWLSXload, v.Type)
  5218  		v.reset(OpCopy)
  5219  		v.AddArg(v0)
  5220  		v0.AuxInt = off
  5221  		v0.Aux = sym
  5222  		v0.AddArg(ptr)
  5223  		v0.AddArg(mem)
  5224  		return true
  5225  	}
  5226  	// match: (MOVWLSX (ANDLconst [c] x))
  5227  	// cond: c & 0x8000 == 0
  5228  	// result: (ANDLconst [c & 0x7fff] x)
  5229  	for {
  5230  		v_0 := v.Args[0]
  5231  		if v_0.Op != Op386ANDLconst {
  5232  			break
  5233  		}
  5234  		c := v_0.AuxInt
  5235  		x := v_0.Args[0]
  5236  		if !(c&0x8000 == 0) {
  5237  			break
  5238  		}
  5239  		v.reset(Op386ANDLconst)
  5240  		v.AuxInt = c & 0x7fff
  5241  		v.AddArg(x)
  5242  		return true
  5243  	}
  5244  	return false
  5245  }
  5246  func rewriteValue386_Op386MOVWLSXload(v *Value, config *Config) bool {
  5247  	b := v.Block
  5248  	_ = b
  5249  	// match: (MOVWLSXload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  5250  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  5251  	// result: (MOVWLSXload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  5252  	for {
  5253  		off1 := v.AuxInt
  5254  		sym1 := v.Aux
  5255  		v_0 := v.Args[0]
  5256  		if v_0.Op != Op386LEAL {
  5257  			break
  5258  		}
  5259  		off2 := v_0.AuxInt
  5260  		sym2 := v_0.Aux
  5261  		base := v_0.Args[0]
  5262  		mem := v.Args[1]
  5263  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  5264  			break
  5265  		}
  5266  		v.reset(Op386MOVWLSXload)
  5267  		v.AuxInt = off1 + off2
  5268  		v.Aux = mergeSym(sym1, sym2)
  5269  		v.AddArg(base)
  5270  		v.AddArg(mem)
  5271  		return true
  5272  	}
  5273  	return false
  5274  }
  5275  func rewriteValue386_Op386MOVWLZX(v *Value, config *Config) bool {
  5276  	b := v.Block
  5277  	_ = b
  5278  	// match: (MOVWLZX x:(MOVWload [off] {sym} ptr mem))
  5279  	// cond: x.Uses == 1 && clobber(x)
  5280  	// result: @x.Block (MOVWload <v.Type> [off] {sym} ptr mem)
  5281  	for {
  5282  		x := v.Args[0]
  5283  		if x.Op != Op386MOVWload {
  5284  			break
  5285  		}
  5286  		off := x.AuxInt
  5287  		sym := x.Aux
  5288  		ptr := x.Args[0]
  5289  		mem := x.Args[1]
  5290  		if !(x.Uses == 1 && clobber(x)) {
  5291  			break
  5292  		}
  5293  		b = x.Block
  5294  		v0 := b.NewValue0(v.Line, Op386MOVWload, v.Type)
  5295  		v.reset(OpCopy)
  5296  		v.AddArg(v0)
  5297  		v0.AuxInt = off
  5298  		v0.Aux = sym
  5299  		v0.AddArg(ptr)
  5300  		v0.AddArg(mem)
  5301  		return true
  5302  	}
  5303  	// match: (MOVWLZX x:(MOVWloadidx1 [off] {sym} ptr idx mem))
  5304  	// cond: x.Uses == 1 && clobber(x)
  5305  	// result: @x.Block (MOVWloadidx1 <v.Type> [off] {sym} ptr idx mem)
  5306  	for {
  5307  		x := v.Args[0]
  5308  		if x.Op != Op386MOVWloadidx1 {
  5309  			break
  5310  		}
  5311  		off := x.AuxInt
  5312  		sym := x.Aux
  5313  		ptr := x.Args[0]
  5314  		idx := x.Args[1]
  5315  		mem := x.Args[2]
  5316  		if !(x.Uses == 1 && clobber(x)) {
  5317  			break
  5318  		}
  5319  		b = x.Block
  5320  		v0 := b.NewValue0(v.Line, Op386MOVWloadidx1, v.Type)
  5321  		v.reset(OpCopy)
  5322  		v.AddArg(v0)
  5323  		v0.AuxInt = off
  5324  		v0.Aux = sym
  5325  		v0.AddArg(ptr)
  5326  		v0.AddArg(idx)
  5327  		v0.AddArg(mem)
  5328  		return true
  5329  	}
  5330  	// match: (MOVWLZX x:(MOVWloadidx2 [off] {sym} ptr idx mem))
  5331  	// cond: x.Uses == 1 && clobber(x)
  5332  	// result: @x.Block (MOVWloadidx2 <v.Type> [off] {sym} ptr idx mem)
  5333  	for {
  5334  		x := v.Args[0]
  5335  		if x.Op != Op386MOVWloadidx2 {
  5336  			break
  5337  		}
  5338  		off := x.AuxInt
  5339  		sym := x.Aux
  5340  		ptr := x.Args[0]
  5341  		idx := x.Args[1]
  5342  		mem := x.Args[2]
  5343  		if !(x.Uses == 1 && clobber(x)) {
  5344  			break
  5345  		}
  5346  		b = x.Block
  5347  		v0 := b.NewValue0(v.Line, Op386MOVWloadidx2, v.Type)
  5348  		v.reset(OpCopy)
  5349  		v.AddArg(v0)
  5350  		v0.AuxInt = off
  5351  		v0.Aux = sym
  5352  		v0.AddArg(ptr)
  5353  		v0.AddArg(idx)
  5354  		v0.AddArg(mem)
  5355  		return true
  5356  	}
  5357  	// match: (MOVWLZX (ANDLconst [c] x))
  5358  	// cond:
  5359  	// result: (ANDLconst [c & 0xffff] x)
  5360  	for {
  5361  		v_0 := v.Args[0]
  5362  		if v_0.Op != Op386ANDLconst {
  5363  			break
  5364  		}
  5365  		c := v_0.AuxInt
  5366  		x := v_0.Args[0]
  5367  		v.reset(Op386ANDLconst)
  5368  		v.AuxInt = c & 0xffff
  5369  		v.AddArg(x)
  5370  		return true
  5371  	}
  5372  	return false
  5373  }
  5374  func rewriteValue386_Op386MOVWload(v *Value, config *Config) bool {
  5375  	b := v.Block
  5376  	_ = b
  5377  	// match: (MOVWload [off] {sym} ptr (MOVWstore [off2] {sym2} ptr2 x _))
  5378  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  5379  	// result: x
  5380  	for {
  5381  		off := v.AuxInt
  5382  		sym := v.Aux
  5383  		ptr := v.Args[0]
  5384  		v_1 := v.Args[1]
  5385  		if v_1.Op != Op386MOVWstore {
  5386  			break
  5387  		}
  5388  		off2 := v_1.AuxInt
  5389  		sym2 := v_1.Aux
  5390  		ptr2 := v_1.Args[0]
  5391  		x := v_1.Args[1]
  5392  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  5393  			break
  5394  		}
  5395  		v.reset(OpCopy)
  5396  		v.Type = x.Type
  5397  		v.AddArg(x)
  5398  		return true
  5399  	}
  5400  	// match: (MOVWload  [off1] {sym} (ADDLconst [off2] ptr) mem)
  5401  	// cond: is32Bit(off1+off2)
  5402  	// result: (MOVWload  [off1+off2] {sym} ptr mem)
  5403  	for {
  5404  		off1 := v.AuxInt
  5405  		sym := v.Aux
  5406  		v_0 := v.Args[0]
  5407  		if v_0.Op != Op386ADDLconst {
  5408  			break
  5409  		}
  5410  		off2 := v_0.AuxInt
  5411  		ptr := v_0.Args[0]
  5412  		mem := v.Args[1]
  5413  		if !(is32Bit(off1 + off2)) {
  5414  			break
  5415  		}
  5416  		v.reset(Op386MOVWload)
  5417  		v.AuxInt = off1 + off2
  5418  		v.Aux = sym
  5419  		v.AddArg(ptr)
  5420  		v.AddArg(mem)
  5421  		return true
  5422  	}
  5423  	// match: (MOVWload  [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  5424  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  5425  	// result: (MOVWload  [off1+off2] {mergeSym(sym1,sym2)} base mem)
  5426  	for {
  5427  		off1 := v.AuxInt
  5428  		sym1 := v.Aux
  5429  		v_0 := v.Args[0]
  5430  		if v_0.Op != Op386LEAL {
  5431  			break
  5432  		}
  5433  		off2 := v_0.AuxInt
  5434  		sym2 := v_0.Aux
  5435  		base := v_0.Args[0]
  5436  		mem := v.Args[1]
  5437  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  5438  			break
  5439  		}
  5440  		v.reset(Op386MOVWload)
  5441  		v.AuxInt = off1 + off2
  5442  		v.Aux = mergeSym(sym1, sym2)
  5443  		v.AddArg(base)
  5444  		v.AddArg(mem)
  5445  		return true
  5446  	}
  5447  	// match: (MOVWload [off1] {sym1} (LEAL1 [off2] {sym2} ptr idx) mem)
  5448  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  5449  	// result: (MOVWloadidx1 [off1+off2] {mergeSym(sym1,sym2)} ptr idx mem)
  5450  	for {
  5451  		off1 := v.AuxInt
  5452  		sym1 := v.Aux
  5453  		v_0 := v.Args[0]
  5454  		if v_0.Op != Op386LEAL1 {
  5455  			break
  5456  		}
  5457  		off2 := v_0.AuxInt
  5458  		sym2 := v_0.Aux
  5459  		ptr := v_0.Args[0]
  5460  		idx := v_0.Args[1]
  5461  		mem := v.Args[1]
  5462  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  5463  			break
  5464  		}
  5465  		v.reset(Op386MOVWloadidx1)
  5466  		v.AuxInt = off1 + off2
  5467  		v.Aux = mergeSym(sym1, sym2)
  5468  		v.AddArg(ptr)
  5469  		v.AddArg(idx)
  5470  		v.AddArg(mem)
  5471  		return true
  5472  	}
  5473  	// match: (MOVWload [off1] {sym1} (LEAL2 [off2] {sym2} ptr idx) mem)
  5474  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  5475  	// result: (MOVWloadidx2 [off1+off2] {mergeSym(sym1,sym2)} ptr idx mem)
  5476  	for {
  5477  		off1 := v.AuxInt
  5478  		sym1 := v.Aux
  5479  		v_0 := v.Args[0]
  5480  		if v_0.Op != Op386LEAL2 {
  5481  			break
  5482  		}
  5483  		off2 := v_0.AuxInt
  5484  		sym2 := v_0.Aux
  5485  		ptr := v_0.Args[0]
  5486  		idx := v_0.Args[1]
  5487  		mem := v.Args[1]
  5488  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  5489  			break
  5490  		}
  5491  		v.reset(Op386MOVWloadidx2)
  5492  		v.AuxInt = off1 + off2
  5493  		v.Aux = mergeSym(sym1, sym2)
  5494  		v.AddArg(ptr)
  5495  		v.AddArg(idx)
  5496  		v.AddArg(mem)
  5497  		return true
  5498  	}
  5499  	// match: (MOVWload [off] {sym} (ADDL ptr idx) mem)
  5500  	// cond: ptr.Op != OpSB
  5501  	// result: (MOVWloadidx1 [off] {sym} ptr idx mem)
  5502  	for {
  5503  		off := v.AuxInt
  5504  		sym := v.Aux
  5505  		v_0 := v.Args[0]
  5506  		if v_0.Op != Op386ADDL {
  5507  			break
  5508  		}
  5509  		ptr := v_0.Args[0]
  5510  		idx := v_0.Args[1]
  5511  		mem := v.Args[1]
  5512  		if !(ptr.Op != OpSB) {
  5513  			break
  5514  		}
  5515  		v.reset(Op386MOVWloadidx1)
  5516  		v.AuxInt = off
  5517  		v.Aux = sym
  5518  		v.AddArg(ptr)
  5519  		v.AddArg(idx)
  5520  		v.AddArg(mem)
  5521  		return true
  5522  	}
  5523  	return false
  5524  }
  5525  func rewriteValue386_Op386MOVWloadidx1(v *Value, config *Config) bool {
  5526  	b := v.Block
  5527  	_ = b
  5528  	// match: (MOVWloadidx1 [c] {sym} ptr (SHLLconst [1] idx) mem)
  5529  	// cond:
  5530  	// result: (MOVWloadidx2 [c] {sym} ptr idx mem)
  5531  	for {
  5532  		c := v.AuxInt
  5533  		sym := v.Aux
  5534  		ptr := v.Args[0]
  5535  		v_1 := v.Args[1]
  5536  		if v_1.Op != Op386SHLLconst {
  5537  			break
  5538  		}
  5539  		if v_1.AuxInt != 1 {
  5540  			break
  5541  		}
  5542  		idx := v_1.Args[0]
  5543  		mem := v.Args[2]
  5544  		v.reset(Op386MOVWloadidx2)
  5545  		v.AuxInt = c
  5546  		v.Aux = sym
  5547  		v.AddArg(ptr)
  5548  		v.AddArg(idx)
  5549  		v.AddArg(mem)
  5550  		return true
  5551  	}
  5552  	// match: (MOVWloadidx1 [c] {sym} (ADDLconst [d] ptr) idx mem)
  5553  	// cond:
  5554  	// result: (MOVWloadidx1 [c+d] {sym} ptr idx mem)
  5555  	for {
  5556  		c := v.AuxInt
  5557  		sym := v.Aux
  5558  		v_0 := v.Args[0]
  5559  		if v_0.Op != Op386ADDLconst {
  5560  			break
  5561  		}
  5562  		d := v_0.AuxInt
  5563  		ptr := v_0.Args[0]
  5564  		idx := v.Args[1]
  5565  		mem := v.Args[2]
  5566  		v.reset(Op386MOVWloadidx1)
  5567  		v.AuxInt = c + d
  5568  		v.Aux = sym
  5569  		v.AddArg(ptr)
  5570  		v.AddArg(idx)
  5571  		v.AddArg(mem)
  5572  		return true
  5573  	}
  5574  	// match: (MOVWloadidx1 [c] {sym} ptr (ADDLconst [d] idx) mem)
  5575  	// cond:
  5576  	// result: (MOVWloadidx1 [c+d] {sym} ptr idx mem)
  5577  	for {
  5578  		c := v.AuxInt
  5579  		sym := v.Aux
  5580  		ptr := v.Args[0]
  5581  		v_1 := v.Args[1]
  5582  		if v_1.Op != Op386ADDLconst {
  5583  			break
  5584  		}
  5585  		d := v_1.AuxInt
  5586  		idx := v_1.Args[0]
  5587  		mem := v.Args[2]
  5588  		v.reset(Op386MOVWloadidx1)
  5589  		v.AuxInt = c + d
  5590  		v.Aux = sym
  5591  		v.AddArg(ptr)
  5592  		v.AddArg(idx)
  5593  		v.AddArg(mem)
  5594  		return true
  5595  	}
  5596  	return false
  5597  }
  5598  func rewriteValue386_Op386MOVWloadidx2(v *Value, config *Config) bool {
  5599  	b := v.Block
  5600  	_ = b
  5601  	// match: (MOVWloadidx2 [c] {sym} (ADDLconst [d] ptr) idx mem)
  5602  	// cond:
  5603  	// result: (MOVWloadidx2 [c+d] {sym} ptr idx mem)
  5604  	for {
  5605  		c := v.AuxInt
  5606  		sym := v.Aux
  5607  		v_0 := v.Args[0]
  5608  		if v_0.Op != Op386ADDLconst {
  5609  			break
  5610  		}
  5611  		d := v_0.AuxInt
  5612  		ptr := v_0.Args[0]
  5613  		idx := v.Args[1]
  5614  		mem := v.Args[2]
  5615  		v.reset(Op386MOVWloadidx2)
  5616  		v.AuxInt = c + d
  5617  		v.Aux = sym
  5618  		v.AddArg(ptr)
  5619  		v.AddArg(idx)
  5620  		v.AddArg(mem)
  5621  		return true
  5622  	}
  5623  	// match: (MOVWloadidx2 [c] {sym} ptr (ADDLconst [d] idx) mem)
  5624  	// cond:
  5625  	// result: (MOVWloadidx2 [c+2*d] {sym} ptr idx mem)
  5626  	for {
  5627  		c := v.AuxInt
  5628  		sym := v.Aux
  5629  		ptr := v.Args[0]
  5630  		v_1 := v.Args[1]
  5631  		if v_1.Op != Op386ADDLconst {
  5632  			break
  5633  		}
  5634  		d := v_1.AuxInt
  5635  		idx := v_1.Args[0]
  5636  		mem := v.Args[2]
  5637  		v.reset(Op386MOVWloadidx2)
  5638  		v.AuxInt = c + 2*d
  5639  		v.Aux = sym
  5640  		v.AddArg(ptr)
  5641  		v.AddArg(idx)
  5642  		v.AddArg(mem)
  5643  		return true
  5644  	}
  5645  	return false
  5646  }
  5647  func rewriteValue386_Op386MOVWstore(v *Value, config *Config) bool {
  5648  	b := v.Block
  5649  	_ = b
  5650  	// match: (MOVWstore [off] {sym} ptr (MOVWLSX x) mem)
  5651  	// cond:
  5652  	// result: (MOVWstore [off] {sym} ptr x mem)
  5653  	for {
  5654  		off := v.AuxInt
  5655  		sym := v.Aux
  5656  		ptr := v.Args[0]
  5657  		v_1 := v.Args[1]
  5658  		if v_1.Op != Op386MOVWLSX {
  5659  			break
  5660  		}
  5661  		x := v_1.Args[0]
  5662  		mem := v.Args[2]
  5663  		v.reset(Op386MOVWstore)
  5664  		v.AuxInt = off
  5665  		v.Aux = sym
  5666  		v.AddArg(ptr)
  5667  		v.AddArg(x)
  5668  		v.AddArg(mem)
  5669  		return true
  5670  	}
  5671  	// match: (MOVWstore [off] {sym} ptr (MOVWLZX x) mem)
  5672  	// cond:
  5673  	// result: (MOVWstore [off] {sym} ptr x mem)
  5674  	for {
  5675  		off := v.AuxInt
  5676  		sym := v.Aux
  5677  		ptr := v.Args[0]
  5678  		v_1 := v.Args[1]
  5679  		if v_1.Op != Op386MOVWLZX {
  5680  			break
  5681  		}
  5682  		x := v_1.Args[0]
  5683  		mem := v.Args[2]
  5684  		v.reset(Op386MOVWstore)
  5685  		v.AuxInt = off
  5686  		v.Aux = sym
  5687  		v.AddArg(ptr)
  5688  		v.AddArg(x)
  5689  		v.AddArg(mem)
  5690  		return true
  5691  	}
  5692  	// match: (MOVWstore  [off1] {sym} (ADDLconst [off2] ptr) val mem)
  5693  	// cond: is32Bit(off1+off2)
  5694  	// result: (MOVWstore  [off1+off2] {sym} ptr val mem)
  5695  	for {
  5696  		off1 := v.AuxInt
  5697  		sym := v.Aux
  5698  		v_0 := v.Args[0]
  5699  		if v_0.Op != Op386ADDLconst {
  5700  			break
  5701  		}
  5702  		off2 := v_0.AuxInt
  5703  		ptr := v_0.Args[0]
  5704  		val := v.Args[1]
  5705  		mem := v.Args[2]
  5706  		if !(is32Bit(off1 + off2)) {
  5707  			break
  5708  		}
  5709  		v.reset(Op386MOVWstore)
  5710  		v.AuxInt = off1 + off2
  5711  		v.Aux = sym
  5712  		v.AddArg(ptr)
  5713  		v.AddArg(val)
  5714  		v.AddArg(mem)
  5715  		return true
  5716  	}
  5717  	// match: (MOVWstore [off] {sym} ptr (MOVLconst [c]) mem)
  5718  	// cond: validOff(off)
  5719  	// result: (MOVWstoreconst [makeValAndOff(int64(int16(c)),off)] {sym} ptr mem)
  5720  	for {
  5721  		off := v.AuxInt
  5722  		sym := v.Aux
  5723  		ptr := v.Args[0]
  5724  		v_1 := v.Args[1]
  5725  		if v_1.Op != Op386MOVLconst {
  5726  			break
  5727  		}
  5728  		c := v_1.AuxInt
  5729  		mem := v.Args[2]
  5730  		if !(validOff(off)) {
  5731  			break
  5732  		}
  5733  		v.reset(Op386MOVWstoreconst)
  5734  		v.AuxInt = makeValAndOff(int64(int16(c)), off)
  5735  		v.Aux = sym
  5736  		v.AddArg(ptr)
  5737  		v.AddArg(mem)
  5738  		return true
  5739  	}
  5740  	// match: (MOVWstore  [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  5741  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  5742  	// result: (MOVWstore  [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  5743  	for {
  5744  		off1 := v.AuxInt
  5745  		sym1 := v.Aux
  5746  		v_0 := v.Args[0]
  5747  		if v_0.Op != Op386LEAL {
  5748  			break
  5749  		}
  5750  		off2 := v_0.AuxInt
  5751  		sym2 := v_0.Aux
  5752  		base := v_0.Args[0]
  5753  		val := v.Args[1]
  5754  		mem := v.Args[2]
  5755  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  5756  			break
  5757  		}
  5758  		v.reset(Op386MOVWstore)
  5759  		v.AuxInt = off1 + off2
  5760  		v.Aux = mergeSym(sym1, sym2)
  5761  		v.AddArg(base)
  5762  		v.AddArg(val)
  5763  		v.AddArg(mem)
  5764  		return true
  5765  	}
  5766  	// match: (MOVWstore [off1] {sym1} (LEAL1 [off2] {sym2} ptr idx) val mem)
  5767  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  5768  	// result: (MOVWstoreidx1 [off1+off2] {mergeSym(sym1,sym2)} ptr idx val mem)
  5769  	for {
  5770  		off1 := v.AuxInt
  5771  		sym1 := v.Aux
  5772  		v_0 := v.Args[0]
  5773  		if v_0.Op != Op386LEAL1 {
  5774  			break
  5775  		}
  5776  		off2 := v_0.AuxInt
  5777  		sym2 := v_0.Aux
  5778  		ptr := v_0.Args[0]
  5779  		idx := v_0.Args[1]
  5780  		val := v.Args[1]
  5781  		mem := v.Args[2]
  5782  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  5783  			break
  5784  		}
  5785  		v.reset(Op386MOVWstoreidx1)
  5786  		v.AuxInt = off1 + off2
  5787  		v.Aux = mergeSym(sym1, sym2)
  5788  		v.AddArg(ptr)
  5789  		v.AddArg(idx)
  5790  		v.AddArg(val)
  5791  		v.AddArg(mem)
  5792  		return true
  5793  	}
  5794  	// match: (MOVWstore [off1] {sym1} (LEAL2 [off2] {sym2} ptr idx) val mem)
  5795  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  5796  	// result: (MOVWstoreidx2 [off1+off2] {mergeSym(sym1,sym2)} ptr idx val mem)
  5797  	for {
  5798  		off1 := v.AuxInt
  5799  		sym1 := v.Aux
  5800  		v_0 := v.Args[0]
  5801  		if v_0.Op != Op386LEAL2 {
  5802  			break
  5803  		}
  5804  		off2 := v_0.AuxInt
  5805  		sym2 := v_0.Aux
  5806  		ptr := v_0.Args[0]
  5807  		idx := v_0.Args[1]
  5808  		val := v.Args[1]
  5809  		mem := v.Args[2]
  5810  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  5811  			break
  5812  		}
  5813  		v.reset(Op386MOVWstoreidx2)
  5814  		v.AuxInt = off1 + off2
  5815  		v.Aux = mergeSym(sym1, sym2)
  5816  		v.AddArg(ptr)
  5817  		v.AddArg(idx)
  5818  		v.AddArg(val)
  5819  		v.AddArg(mem)
  5820  		return true
  5821  	}
  5822  	// match: (MOVWstore [off] {sym} (ADDL ptr idx) val mem)
  5823  	// cond: ptr.Op != OpSB
  5824  	// result: (MOVWstoreidx1 [off] {sym} ptr idx val mem)
  5825  	for {
  5826  		off := v.AuxInt
  5827  		sym := v.Aux
  5828  		v_0 := v.Args[0]
  5829  		if v_0.Op != Op386ADDL {
  5830  			break
  5831  		}
  5832  		ptr := v_0.Args[0]
  5833  		idx := v_0.Args[1]
  5834  		val := v.Args[1]
  5835  		mem := v.Args[2]
  5836  		if !(ptr.Op != OpSB) {
  5837  			break
  5838  		}
  5839  		v.reset(Op386MOVWstoreidx1)
  5840  		v.AuxInt = off
  5841  		v.Aux = sym
  5842  		v.AddArg(ptr)
  5843  		v.AddArg(idx)
  5844  		v.AddArg(val)
  5845  		v.AddArg(mem)
  5846  		return true
  5847  	}
  5848  	// match: (MOVWstore [i] {s} p (SHRLconst [16] w) x:(MOVWstore [i-2] {s} p w mem))
  5849  	// cond: x.Uses == 1   && clobber(x)
  5850  	// result: (MOVLstore [i-2] {s} p w mem)
  5851  	for {
  5852  		i := v.AuxInt
  5853  		s := v.Aux
  5854  		p := v.Args[0]
  5855  		v_1 := v.Args[1]
  5856  		if v_1.Op != Op386SHRLconst {
  5857  			break
  5858  		}
  5859  		if v_1.AuxInt != 16 {
  5860  			break
  5861  		}
  5862  		w := v_1.Args[0]
  5863  		x := v.Args[2]
  5864  		if x.Op != Op386MOVWstore {
  5865  			break
  5866  		}
  5867  		if x.AuxInt != i-2 {
  5868  			break
  5869  		}
  5870  		if x.Aux != s {
  5871  			break
  5872  		}
  5873  		if p != x.Args[0] {
  5874  			break
  5875  		}
  5876  		if w != x.Args[1] {
  5877  			break
  5878  		}
  5879  		mem := x.Args[2]
  5880  		if !(x.Uses == 1 && clobber(x)) {
  5881  			break
  5882  		}
  5883  		v.reset(Op386MOVLstore)
  5884  		v.AuxInt = i - 2
  5885  		v.Aux = s
  5886  		v.AddArg(p)
  5887  		v.AddArg(w)
  5888  		v.AddArg(mem)
  5889  		return true
  5890  	}
  5891  	// match: (MOVWstore [i] {s} p (SHRLconst [j] w) x:(MOVWstore [i-2] {s} p w0:(SHRLconst [j-16] w) mem))
  5892  	// cond: x.Uses == 1   && clobber(x)
  5893  	// result: (MOVLstore [i-2] {s} p w0 mem)
  5894  	for {
  5895  		i := v.AuxInt
  5896  		s := v.Aux
  5897  		p := v.Args[0]
  5898  		v_1 := v.Args[1]
  5899  		if v_1.Op != Op386SHRLconst {
  5900  			break
  5901  		}
  5902  		j := v_1.AuxInt
  5903  		w := v_1.Args[0]
  5904  		x := v.Args[2]
  5905  		if x.Op != Op386MOVWstore {
  5906  			break
  5907  		}
  5908  		if x.AuxInt != i-2 {
  5909  			break
  5910  		}
  5911  		if x.Aux != s {
  5912  			break
  5913  		}
  5914  		if p != x.Args[0] {
  5915  			break
  5916  		}
  5917  		w0 := x.Args[1]
  5918  		if w0.Op != Op386SHRLconst {
  5919  			break
  5920  		}
  5921  		if w0.AuxInt != j-16 {
  5922  			break
  5923  		}
  5924  		if w != w0.Args[0] {
  5925  			break
  5926  		}
  5927  		mem := x.Args[2]
  5928  		if !(x.Uses == 1 && clobber(x)) {
  5929  			break
  5930  		}
  5931  		v.reset(Op386MOVLstore)
  5932  		v.AuxInt = i - 2
  5933  		v.Aux = s
  5934  		v.AddArg(p)
  5935  		v.AddArg(w0)
  5936  		v.AddArg(mem)
  5937  		return true
  5938  	}
  5939  	return false
  5940  }
  5941  func rewriteValue386_Op386MOVWstoreconst(v *Value, config *Config) bool {
  5942  	b := v.Block
  5943  	_ = b
  5944  	// match: (MOVWstoreconst [sc] {s} (ADDLconst [off] ptr) mem)
  5945  	// cond: ValAndOff(sc).canAdd(off)
  5946  	// result: (MOVWstoreconst [ValAndOff(sc).add(off)] {s} ptr mem)
  5947  	for {
  5948  		sc := v.AuxInt
  5949  		s := v.Aux
  5950  		v_0 := v.Args[0]
  5951  		if v_0.Op != Op386ADDLconst {
  5952  			break
  5953  		}
  5954  		off := v_0.AuxInt
  5955  		ptr := v_0.Args[0]
  5956  		mem := v.Args[1]
  5957  		if !(ValAndOff(sc).canAdd(off)) {
  5958  			break
  5959  		}
  5960  		v.reset(Op386MOVWstoreconst)
  5961  		v.AuxInt = ValAndOff(sc).add(off)
  5962  		v.Aux = s
  5963  		v.AddArg(ptr)
  5964  		v.AddArg(mem)
  5965  		return true
  5966  	}
  5967  	// match: (MOVWstoreconst [sc] {sym1} (LEAL [off] {sym2} ptr) mem)
  5968  	// cond: canMergeSym(sym1, sym2) && ValAndOff(sc).canAdd(off)   && (ptr.Op != OpSB || !config.ctxt.Flag_shared)
  5969  	// result: (MOVWstoreconst [ValAndOff(sc).add(off)] {mergeSym(sym1, sym2)} ptr mem)
  5970  	for {
  5971  		sc := v.AuxInt
  5972  		sym1 := v.Aux
  5973  		v_0 := v.Args[0]
  5974  		if v_0.Op != Op386LEAL {
  5975  			break
  5976  		}
  5977  		off := v_0.AuxInt
  5978  		sym2 := v_0.Aux
  5979  		ptr := v_0.Args[0]
  5980  		mem := v.Args[1]
  5981  		if !(canMergeSym(sym1, sym2) && ValAndOff(sc).canAdd(off) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
  5982  			break
  5983  		}
  5984  		v.reset(Op386MOVWstoreconst)
  5985  		v.AuxInt = ValAndOff(sc).add(off)
  5986  		v.Aux = mergeSym(sym1, sym2)
  5987  		v.AddArg(ptr)
  5988  		v.AddArg(mem)
  5989  		return true
  5990  	}
  5991  	// match: (MOVWstoreconst [x] {sym1} (LEAL1 [off] {sym2} ptr idx) mem)
  5992  	// cond: canMergeSym(sym1, sym2)
  5993  	// result: (MOVWstoreconstidx1 [ValAndOff(x).add(off)] {mergeSym(sym1,sym2)} ptr idx mem)
  5994  	for {
  5995  		x := v.AuxInt
  5996  		sym1 := v.Aux
  5997  		v_0 := v.Args[0]
  5998  		if v_0.Op != Op386LEAL1 {
  5999  			break
  6000  		}
  6001  		off := v_0.AuxInt
  6002  		sym2 := v_0.Aux
  6003  		ptr := v_0.Args[0]
  6004  		idx := v_0.Args[1]
  6005  		mem := v.Args[1]
  6006  		if !(canMergeSym(sym1, sym2)) {
  6007  			break
  6008  		}
  6009  		v.reset(Op386MOVWstoreconstidx1)
  6010  		v.AuxInt = ValAndOff(x).add(off)
  6011  		v.Aux = mergeSym(sym1, sym2)
  6012  		v.AddArg(ptr)
  6013  		v.AddArg(idx)
  6014  		v.AddArg(mem)
  6015  		return true
  6016  	}
  6017  	// match: (MOVWstoreconst [x] {sym1} (LEAL2 [off] {sym2} ptr idx) mem)
  6018  	// cond: canMergeSym(sym1, sym2)
  6019  	// result: (MOVWstoreconstidx2 [ValAndOff(x).add(off)] {mergeSym(sym1,sym2)} ptr idx mem)
  6020  	for {
  6021  		x := v.AuxInt
  6022  		sym1 := v.Aux
  6023  		v_0 := v.Args[0]
  6024  		if v_0.Op != Op386LEAL2 {
  6025  			break
  6026  		}
  6027  		off := v_0.AuxInt
  6028  		sym2 := v_0.Aux
  6029  		ptr := v_0.Args[0]
  6030  		idx := v_0.Args[1]
  6031  		mem := v.Args[1]
  6032  		if !(canMergeSym(sym1, sym2)) {
  6033  			break
  6034  		}
  6035  		v.reset(Op386MOVWstoreconstidx2)
  6036  		v.AuxInt = ValAndOff(x).add(off)
  6037  		v.Aux = mergeSym(sym1, sym2)
  6038  		v.AddArg(ptr)
  6039  		v.AddArg(idx)
  6040  		v.AddArg(mem)
  6041  		return true
  6042  	}
  6043  	// match: (MOVWstoreconst [x] {sym} (ADDL ptr idx) mem)
  6044  	// cond:
  6045  	// result: (MOVWstoreconstidx1 [x] {sym} ptr idx mem)
  6046  	for {
  6047  		x := v.AuxInt
  6048  		sym := v.Aux
  6049  		v_0 := v.Args[0]
  6050  		if v_0.Op != Op386ADDL {
  6051  			break
  6052  		}
  6053  		ptr := v_0.Args[0]
  6054  		idx := v_0.Args[1]
  6055  		mem := v.Args[1]
  6056  		v.reset(Op386MOVWstoreconstidx1)
  6057  		v.AuxInt = x
  6058  		v.Aux = sym
  6059  		v.AddArg(ptr)
  6060  		v.AddArg(idx)
  6061  		v.AddArg(mem)
  6062  		return true
  6063  	}
  6064  	// match: (MOVWstoreconst [c] {s} p x:(MOVWstoreconst [a] {s} p mem))
  6065  	// cond: x.Uses == 1   && ValAndOff(a).Off() + 2 == ValAndOff(c).Off()   && clobber(x)
  6066  	// result: (MOVLstoreconst [makeValAndOff(ValAndOff(a).Val()&0xffff | ValAndOff(c).Val()<<16, ValAndOff(a).Off())] {s} p mem)
  6067  	for {
  6068  		c := v.AuxInt
  6069  		s := v.Aux
  6070  		p := v.Args[0]
  6071  		x := v.Args[1]
  6072  		if x.Op != Op386MOVWstoreconst {
  6073  			break
  6074  		}
  6075  		a := x.AuxInt
  6076  		if x.Aux != s {
  6077  			break
  6078  		}
  6079  		if p != x.Args[0] {
  6080  			break
  6081  		}
  6082  		mem := x.Args[1]
  6083  		if !(x.Uses == 1 && ValAndOff(a).Off()+2 == ValAndOff(c).Off() && clobber(x)) {
  6084  			break
  6085  		}
  6086  		v.reset(Op386MOVLstoreconst)
  6087  		v.AuxInt = makeValAndOff(ValAndOff(a).Val()&0xffff|ValAndOff(c).Val()<<16, ValAndOff(a).Off())
  6088  		v.Aux = s
  6089  		v.AddArg(p)
  6090  		v.AddArg(mem)
  6091  		return true
  6092  	}
  6093  	return false
  6094  }
  6095  func rewriteValue386_Op386MOVWstoreconstidx1(v *Value, config *Config) bool {
  6096  	b := v.Block
  6097  	_ = b
  6098  	// match: (MOVWstoreconstidx1 [c] {sym} ptr (SHLLconst [1] idx) mem)
  6099  	// cond:
  6100  	// result: (MOVWstoreconstidx2 [c] {sym} ptr idx mem)
  6101  	for {
  6102  		c := v.AuxInt
  6103  		sym := v.Aux
  6104  		ptr := v.Args[0]
  6105  		v_1 := v.Args[1]
  6106  		if v_1.Op != Op386SHLLconst {
  6107  			break
  6108  		}
  6109  		if v_1.AuxInt != 1 {
  6110  			break
  6111  		}
  6112  		idx := v_1.Args[0]
  6113  		mem := v.Args[2]
  6114  		v.reset(Op386MOVWstoreconstidx2)
  6115  		v.AuxInt = c
  6116  		v.Aux = sym
  6117  		v.AddArg(ptr)
  6118  		v.AddArg(idx)
  6119  		v.AddArg(mem)
  6120  		return true
  6121  	}
  6122  	// match: (MOVWstoreconstidx1 [x] {sym} (ADDLconst [c] ptr) idx mem)
  6123  	// cond:
  6124  	// result: (MOVWstoreconstidx1 [ValAndOff(x).add(c)] {sym} ptr idx mem)
  6125  	for {
  6126  		x := v.AuxInt
  6127  		sym := v.Aux
  6128  		v_0 := v.Args[0]
  6129  		if v_0.Op != Op386ADDLconst {
  6130  			break
  6131  		}
  6132  		c := v_0.AuxInt
  6133  		ptr := v_0.Args[0]
  6134  		idx := v.Args[1]
  6135  		mem := v.Args[2]
  6136  		v.reset(Op386MOVWstoreconstidx1)
  6137  		v.AuxInt = ValAndOff(x).add(c)
  6138  		v.Aux = sym
  6139  		v.AddArg(ptr)
  6140  		v.AddArg(idx)
  6141  		v.AddArg(mem)
  6142  		return true
  6143  	}
  6144  	// match: (MOVWstoreconstidx1 [x] {sym} ptr (ADDLconst [c] idx) mem)
  6145  	// cond:
  6146  	// result: (MOVWstoreconstidx1 [ValAndOff(x).add(c)] {sym} ptr idx mem)
  6147  	for {
  6148  		x := v.AuxInt
  6149  		sym := v.Aux
  6150  		ptr := v.Args[0]
  6151  		v_1 := v.Args[1]
  6152  		if v_1.Op != Op386ADDLconst {
  6153  			break
  6154  		}
  6155  		c := v_1.AuxInt
  6156  		idx := v_1.Args[0]
  6157  		mem := v.Args[2]
  6158  		v.reset(Op386MOVWstoreconstidx1)
  6159  		v.AuxInt = ValAndOff(x).add(c)
  6160  		v.Aux = sym
  6161  		v.AddArg(ptr)
  6162  		v.AddArg(idx)
  6163  		v.AddArg(mem)
  6164  		return true
  6165  	}
  6166  	// match: (MOVWstoreconstidx1 [c] {s} p i x:(MOVWstoreconstidx1 [a] {s} p i mem))
  6167  	// cond: x.Uses == 1   && ValAndOff(a).Off() + 2 == ValAndOff(c).Off()   && clobber(x)
  6168  	// result: (MOVLstoreconstidx1 [makeValAndOff(ValAndOff(a).Val()&0xffff | ValAndOff(c).Val()<<16, ValAndOff(a).Off())] {s} p i mem)
  6169  	for {
  6170  		c := v.AuxInt
  6171  		s := v.Aux
  6172  		p := v.Args[0]
  6173  		i := v.Args[1]
  6174  		x := v.Args[2]
  6175  		if x.Op != Op386MOVWstoreconstidx1 {
  6176  			break
  6177  		}
  6178  		a := x.AuxInt
  6179  		if x.Aux != s {
  6180  			break
  6181  		}
  6182  		if p != x.Args[0] {
  6183  			break
  6184  		}
  6185  		if i != x.Args[1] {
  6186  			break
  6187  		}
  6188  		mem := x.Args[2]
  6189  		if !(x.Uses == 1 && ValAndOff(a).Off()+2 == ValAndOff(c).Off() && clobber(x)) {
  6190  			break
  6191  		}
  6192  		v.reset(Op386MOVLstoreconstidx1)
  6193  		v.AuxInt = makeValAndOff(ValAndOff(a).Val()&0xffff|ValAndOff(c).Val()<<16, ValAndOff(a).Off())
  6194  		v.Aux = s
  6195  		v.AddArg(p)
  6196  		v.AddArg(i)
  6197  		v.AddArg(mem)
  6198  		return true
  6199  	}
  6200  	return false
  6201  }
  6202  func rewriteValue386_Op386MOVWstoreconstidx2(v *Value, config *Config) bool {
  6203  	b := v.Block
  6204  	_ = b
  6205  	// match: (MOVWstoreconstidx2 [x] {sym} (ADDLconst [c] ptr) idx mem)
  6206  	// cond:
  6207  	// result: (MOVWstoreconstidx2 [ValAndOff(x).add(c)] {sym} ptr idx mem)
  6208  	for {
  6209  		x := v.AuxInt
  6210  		sym := v.Aux
  6211  		v_0 := v.Args[0]
  6212  		if v_0.Op != Op386ADDLconst {
  6213  			break
  6214  		}
  6215  		c := v_0.AuxInt
  6216  		ptr := v_0.Args[0]
  6217  		idx := v.Args[1]
  6218  		mem := v.Args[2]
  6219  		v.reset(Op386MOVWstoreconstidx2)
  6220  		v.AuxInt = ValAndOff(x).add(c)
  6221  		v.Aux = sym
  6222  		v.AddArg(ptr)
  6223  		v.AddArg(idx)
  6224  		v.AddArg(mem)
  6225  		return true
  6226  	}
  6227  	// match: (MOVWstoreconstidx2 [x] {sym} ptr (ADDLconst [c] idx) mem)
  6228  	// cond:
  6229  	// result: (MOVWstoreconstidx2 [ValAndOff(x).add(2*c)] {sym} ptr idx mem)
  6230  	for {
  6231  		x := v.AuxInt
  6232  		sym := v.Aux
  6233  		ptr := v.Args[0]
  6234  		v_1 := v.Args[1]
  6235  		if v_1.Op != Op386ADDLconst {
  6236  			break
  6237  		}
  6238  		c := v_1.AuxInt
  6239  		idx := v_1.Args[0]
  6240  		mem := v.Args[2]
  6241  		v.reset(Op386MOVWstoreconstidx2)
  6242  		v.AuxInt = ValAndOff(x).add(2 * c)
  6243  		v.Aux = sym
  6244  		v.AddArg(ptr)
  6245  		v.AddArg(idx)
  6246  		v.AddArg(mem)
  6247  		return true
  6248  	}
  6249  	// match: (MOVWstoreconstidx2 [c] {s} p i x:(MOVWstoreconstidx2 [a] {s} p i mem))
  6250  	// cond: x.Uses == 1   && ValAndOff(a).Off() + 2 == ValAndOff(c).Off()   && clobber(x)
  6251  	// result: (MOVLstoreconstidx1 [makeValAndOff(ValAndOff(a).Val()&0xffff | ValAndOff(c).Val()<<16, ValAndOff(a).Off())] {s} p (SHLLconst <i.Type> [1] i) mem)
  6252  	for {
  6253  		c := v.AuxInt
  6254  		s := v.Aux
  6255  		p := v.Args[0]
  6256  		i := v.Args[1]
  6257  		x := v.Args[2]
  6258  		if x.Op != Op386MOVWstoreconstidx2 {
  6259  			break
  6260  		}
  6261  		a := x.AuxInt
  6262  		if x.Aux != s {
  6263  			break
  6264  		}
  6265  		if p != x.Args[0] {
  6266  			break
  6267  		}
  6268  		if i != x.Args[1] {
  6269  			break
  6270  		}
  6271  		mem := x.Args[2]
  6272  		if !(x.Uses == 1 && ValAndOff(a).Off()+2 == ValAndOff(c).Off() && clobber(x)) {
  6273  			break
  6274  		}
  6275  		v.reset(Op386MOVLstoreconstidx1)
  6276  		v.AuxInt = makeValAndOff(ValAndOff(a).Val()&0xffff|ValAndOff(c).Val()<<16, ValAndOff(a).Off())
  6277  		v.Aux = s
  6278  		v.AddArg(p)
  6279  		v0 := b.NewValue0(v.Line, Op386SHLLconst, i.Type)
  6280  		v0.AuxInt = 1
  6281  		v0.AddArg(i)
  6282  		v.AddArg(v0)
  6283  		v.AddArg(mem)
  6284  		return true
  6285  	}
  6286  	return false
  6287  }
  6288  func rewriteValue386_Op386MOVWstoreidx1(v *Value, config *Config) bool {
  6289  	b := v.Block
  6290  	_ = b
  6291  	// match: (MOVWstoreidx1 [c] {sym} ptr (SHLLconst [1] idx) val mem)
  6292  	// cond:
  6293  	// result: (MOVWstoreidx2 [c] {sym} ptr idx val mem)
  6294  	for {
  6295  		c := v.AuxInt
  6296  		sym := v.Aux
  6297  		ptr := v.Args[0]
  6298  		v_1 := v.Args[1]
  6299  		if v_1.Op != Op386SHLLconst {
  6300  			break
  6301  		}
  6302  		if v_1.AuxInt != 1 {
  6303  			break
  6304  		}
  6305  		idx := v_1.Args[0]
  6306  		val := v.Args[2]
  6307  		mem := v.Args[3]
  6308  		v.reset(Op386MOVWstoreidx2)
  6309  		v.AuxInt = c
  6310  		v.Aux = sym
  6311  		v.AddArg(ptr)
  6312  		v.AddArg(idx)
  6313  		v.AddArg(val)
  6314  		v.AddArg(mem)
  6315  		return true
  6316  	}
  6317  	// match: (MOVWstoreidx1 [c] {sym} (ADDLconst [d] ptr) idx val mem)
  6318  	// cond:
  6319  	// result: (MOVWstoreidx1 [c+d] {sym} ptr idx val mem)
  6320  	for {
  6321  		c := v.AuxInt
  6322  		sym := v.Aux
  6323  		v_0 := v.Args[0]
  6324  		if v_0.Op != Op386ADDLconst {
  6325  			break
  6326  		}
  6327  		d := v_0.AuxInt
  6328  		ptr := v_0.Args[0]
  6329  		idx := v.Args[1]
  6330  		val := v.Args[2]
  6331  		mem := v.Args[3]
  6332  		v.reset(Op386MOVWstoreidx1)
  6333  		v.AuxInt = c + d
  6334  		v.Aux = sym
  6335  		v.AddArg(ptr)
  6336  		v.AddArg(idx)
  6337  		v.AddArg(val)
  6338  		v.AddArg(mem)
  6339  		return true
  6340  	}
  6341  	// match: (MOVWstoreidx1 [c] {sym} ptr (ADDLconst [d] idx) val mem)
  6342  	// cond:
  6343  	// result: (MOVWstoreidx1 [c+d] {sym} ptr idx val mem)
  6344  	for {
  6345  		c := v.AuxInt
  6346  		sym := v.Aux
  6347  		ptr := v.Args[0]
  6348  		v_1 := v.Args[1]
  6349  		if v_1.Op != Op386ADDLconst {
  6350  			break
  6351  		}
  6352  		d := v_1.AuxInt
  6353  		idx := v_1.Args[0]
  6354  		val := v.Args[2]
  6355  		mem := v.Args[3]
  6356  		v.reset(Op386MOVWstoreidx1)
  6357  		v.AuxInt = c + d
  6358  		v.Aux = sym
  6359  		v.AddArg(ptr)
  6360  		v.AddArg(idx)
  6361  		v.AddArg(val)
  6362  		v.AddArg(mem)
  6363  		return true
  6364  	}
  6365  	// match: (MOVWstoreidx1 [i] {s} p idx (SHRLconst [16] w) x:(MOVWstoreidx1 [i-2] {s} p idx w mem))
  6366  	// cond: x.Uses == 1   && clobber(x)
  6367  	// result: (MOVLstoreidx1 [i-2] {s} p idx w mem)
  6368  	for {
  6369  		i := v.AuxInt
  6370  		s := v.Aux
  6371  		p := v.Args[0]
  6372  		idx := v.Args[1]
  6373  		v_2 := v.Args[2]
  6374  		if v_2.Op != Op386SHRLconst {
  6375  			break
  6376  		}
  6377  		if v_2.AuxInt != 16 {
  6378  			break
  6379  		}
  6380  		w := v_2.Args[0]
  6381  		x := v.Args[3]
  6382  		if x.Op != Op386MOVWstoreidx1 {
  6383  			break
  6384  		}
  6385  		if x.AuxInt != i-2 {
  6386  			break
  6387  		}
  6388  		if x.Aux != s {
  6389  			break
  6390  		}
  6391  		if p != x.Args[0] {
  6392  			break
  6393  		}
  6394  		if idx != x.Args[1] {
  6395  			break
  6396  		}
  6397  		if w != x.Args[2] {
  6398  			break
  6399  		}
  6400  		mem := x.Args[3]
  6401  		if !(x.Uses == 1 && clobber(x)) {
  6402  			break
  6403  		}
  6404  		v.reset(Op386MOVLstoreidx1)
  6405  		v.AuxInt = i - 2
  6406  		v.Aux = s
  6407  		v.AddArg(p)
  6408  		v.AddArg(idx)
  6409  		v.AddArg(w)
  6410  		v.AddArg(mem)
  6411  		return true
  6412  	}
  6413  	// match: (MOVWstoreidx1 [i] {s} p idx (SHRLconst [j] w) x:(MOVWstoreidx1 [i-2] {s} p idx w0:(SHRLconst [j-16] w) mem))
  6414  	// cond: x.Uses == 1   && clobber(x)
  6415  	// result: (MOVLstoreidx1 [i-2] {s} p idx w0 mem)
  6416  	for {
  6417  		i := v.AuxInt
  6418  		s := v.Aux
  6419  		p := v.Args[0]
  6420  		idx := v.Args[1]
  6421  		v_2 := v.Args[2]
  6422  		if v_2.Op != Op386SHRLconst {
  6423  			break
  6424  		}
  6425  		j := v_2.AuxInt
  6426  		w := v_2.Args[0]
  6427  		x := v.Args[3]
  6428  		if x.Op != Op386MOVWstoreidx1 {
  6429  			break
  6430  		}
  6431  		if x.AuxInt != i-2 {
  6432  			break
  6433  		}
  6434  		if x.Aux != s {
  6435  			break
  6436  		}
  6437  		if p != x.Args[0] {
  6438  			break
  6439  		}
  6440  		if idx != x.Args[1] {
  6441  			break
  6442  		}
  6443  		w0 := x.Args[2]
  6444  		if w0.Op != Op386SHRLconst {
  6445  			break
  6446  		}
  6447  		if w0.AuxInt != j-16 {
  6448  			break
  6449  		}
  6450  		if w != w0.Args[0] {
  6451  			break
  6452  		}
  6453  		mem := x.Args[3]
  6454  		if !(x.Uses == 1 && clobber(x)) {
  6455  			break
  6456  		}
  6457  		v.reset(Op386MOVLstoreidx1)
  6458  		v.AuxInt = i - 2
  6459  		v.Aux = s
  6460  		v.AddArg(p)
  6461  		v.AddArg(idx)
  6462  		v.AddArg(w0)
  6463  		v.AddArg(mem)
  6464  		return true
  6465  	}
  6466  	return false
  6467  }
  6468  func rewriteValue386_Op386MOVWstoreidx2(v *Value, config *Config) bool {
  6469  	b := v.Block
  6470  	_ = b
  6471  	// match: (MOVWstoreidx2 [c] {sym} (ADDLconst [d] ptr) idx val mem)
  6472  	// cond:
  6473  	// result: (MOVWstoreidx2 [c+d] {sym} ptr idx val mem)
  6474  	for {
  6475  		c := v.AuxInt
  6476  		sym := v.Aux
  6477  		v_0 := v.Args[0]
  6478  		if v_0.Op != Op386ADDLconst {
  6479  			break
  6480  		}
  6481  		d := v_0.AuxInt
  6482  		ptr := v_0.Args[0]
  6483  		idx := v.Args[1]
  6484  		val := v.Args[2]
  6485  		mem := v.Args[3]
  6486  		v.reset(Op386MOVWstoreidx2)
  6487  		v.AuxInt = c + d
  6488  		v.Aux = sym
  6489  		v.AddArg(ptr)
  6490  		v.AddArg(idx)
  6491  		v.AddArg(val)
  6492  		v.AddArg(mem)
  6493  		return true
  6494  	}
  6495  	// match: (MOVWstoreidx2 [c] {sym} ptr (ADDLconst [d] idx) val mem)
  6496  	// cond:
  6497  	// result: (MOVWstoreidx2 [c+2*d] {sym} ptr idx val mem)
  6498  	for {
  6499  		c := v.AuxInt
  6500  		sym := v.Aux
  6501  		ptr := v.Args[0]
  6502  		v_1 := v.Args[1]
  6503  		if v_1.Op != Op386ADDLconst {
  6504  			break
  6505  		}
  6506  		d := v_1.AuxInt
  6507  		idx := v_1.Args[0]
  6508  		val := v.Args[2]
  6509  		mem := v.Args[3]
  6510  		v.reset(Op386MOVWstoreidx2)
  6511  		v.AuxInt = c + 2*d
  6512  		v.Aux = sym
  6513  		v.AddArg(ptr)
  6514  		v.AddArg(idx)
  6515  		v.AddArg(val)
  6516  		v.AddArg(mem)
  6517  		return true
  6518  	}
  6519  	// match: (MOVWstoreidx2 [i] {s} p idx (SHRLconst [16] w) x:(MOVWstoreidx2 [i-2] {s} p idx w mem))
  6520  	// cond: x.Uses == 1   && clobber(x)
  6521  	// result: (MOVLstoreidx1 [i-2] {s} p (SHLLconst <idx.Type> [1] idx) w mem)
  6522  	for {
  6523  		i := v.AuxInt
  6524  		s := v.Aux
  6525  		p := v.Args[0]
  6526  		idx := v.Args[1]
  6527  		v_2 := v.Args[2]
  6528  		if v_2.Op != Op386SHRLconst {
  6529  			break
  6530  		}
  6531  		if v_2.AuxInt != 16 {
  6532  			break
  6533  		}
  6534  		w := v_2.Args[0]
  6535  		x := v.Args[3]
  6536  		if x.Op != Op386MOVWstoreidx2 {
  6537  			break
  6538  		}
  6539  		if x.AuxInt != i-2 {
  6540  			break
  6541  		}
  6542  		if x.Aux != s {
  6543  			break
  6544  		}
  6545  		if p != x.Args[0] {
  6546  			break
  6547  		}
  6548  		if idx != x.Args[1] {
  6549  			break
  6550  		}
  6551  		if w != x.Args[2] {
  6552  			break
  6553  		}
  6554  		mem := x.Args[3]
  6555  		if !(x.Uses == 1 && clobber(x)) {
  6556  			break
  6557  		}
  6558  		v.reset(Op386MOVLstoreidx1)
  6559  		v.AuxInt = i - 2
  6560  		v.Aux = s
  6561  		v.AddArg(p)
  6562  		v0 := b.NewValue0(v.Line, Op386SHLLconst, idx.Type)
  6563  		v0.AuxInt = 1
  6564  		v0.AddArg(idx)
  6565  		v.AddArg(v0)
  6566  		v.AddArg(w)
  6567  		v.AddArg(mem)
  6568  		return true
  6569  	}
  6570  	// match: (MOVWstoreidx2 [i] {s} p idx (SHRLconst [j] w) x:(MOVWstoreidx2 [i-2] {s} p idx w0:(SHRLconst [j-16] w) mem))
  6571  	// cond: x.Uses == 1   && clobber(x)
  6572  	// result: (MOVLstoreidx1 [i-2] {s} p (SHLLconst <idx.Type> [1] idx) w0 mem)
  6573  	for {
  6574  		i := v.AuxInt
  6575  		s := v.Aux
  6576  		p := v.Args[0]
  6577  		idx := v.Args[1]
  6578  		v_2 := v.Args[2]
  6579  		if v_2.Op != Op386SHRLconst {
  6580  			break
  6581  		}
  6582  		j := v_2.AuxInt
  6583  		w := v_2.Args[0]
  6584  		x := v.Args[3]
  6585  		if x.Op != Op386MOVWstoreidx2 {
  6586  			break
  6587  		}
  6588  		if x.AuxInt != i-2 {
  6589  			break
  6590  		}
  6591  		if x.Aux != s {
  6592  			break
  6593  		}
  6594  		if p != x.Args[0] {
  6595  			break
  6596  		}
  6597  		if idx != x.Args[1] {
  6598  			break
  6599  		}
  6600  		w0 := x.Args[2]
  6601  		if w0.Op != Op386SHRLconst {
  6602  			break
  6603  		}
  6604  		if w0.AuxInt != j-16 {
  6605  			break
  6606  		}
  6607  		if w != w0.Args[0] {
  6608  			break
  6609  		}
  6610  		mem := x.Args[3]
  6611  		if !(x.Uses == 1 && clobber(x)) {
  6612  			break
  6613  		}
  6614  		v.reset(Op386MOVLstoreidx1)
  6615  		v.AuxInt = i - 2
  6616  		v.Aux = s
  6617  		v.AddArg(p)
  6618  		v0 := b.NewValue0(v.Line, Op386SHLLconst, idx.Type)
  6619  		v0.AuxInt = 1
  6620  		v0.AddArg(idx)
  6621  		v.AddArg(v0)
  6622  		v.AddArg(w0)
  6623  		v.AddArg(mem)
  6624  		return true
  6625  	}
  6626  	return false
  6627  }
  6628  func rewriteValue386_Op386MULL(v *Value, config *Config) bool {
  6629  	b := v.Block
  6630  	_ = b
  6631  	// match: (MULL x (MOVLconst [c]))
  6632  	// cond:
  6633  	// result: (MULLconst [c] x)
  6634  	for {
  6635  		x := v.Args[0]
  6636  		v_1 := v.Args[1]
  6637  		if v_1.Op != Op386MOVLconst {
  6638  			break
  6639  		}
  6640  		c := v_1.AuxInt
  6641  		v.reset(Op386MULLconst)
  6642  		v.AuxInt = c
  6643  		v.AddArg(x)
  6644  		return true
  6645  	}
  6646  	// match: (MULL (MOVLconst [c]) x)
  6647  	// cond:
  6648  	// result: (MULLconst [c] x)
  6649  	for {
  6650  		v_0 := v.Args[0]
  6651  		if v_0.Op != Op386MOVLconst {
  6652  			break
  6653  		}
  6654  		c := v_0.AuxInt
  6655  		x := v.Args[1]
  6656  		v.reset(Op386MULLconst)
  6657  		v.AuxInt = c
  6658  		v.AddArg(x)
  6659  		return true
  6660  	}
  6661  	return false
  6662  }
  6663  func rewriteValue386_Op386MULLconst(v *Value, config *Config) bool {
  6664  	b := v.Block
  6665  	_ = b
  6666  	// match: (MULLconst [c] (MULLconst [d] x))
  6667  	// cond:
  6668  	// result: (MULLconst [int64(int32(c * d))] x)
  6669  	for {
  6670  		c := v.AuxInt
  6671  		v_0 := v.Args[0]
  6672  		if v_0.Op != Op386MULLconst {
  6673  			break
  6674  		}
  6675  		d := v_0.AuxInt
  6676  		x := v_0.Args[0]
  6677  		v.reset(Op386MULLconst)
  6678  		v.AuxInt = int64(int32(c * d))
  6679  		v.AddArg(x)
  6680  		return true
  6681  	}
  6682  	// match: (MULLconst [-1] x)
  6683  	// cond:
  6684  	// result: (NEGL x)
  6685  	for {
  6686  		if v.AuxInt != -1 {
  6687  			break
  6688  		}
  6689  		x := v.Args[0]
  6690  		v.reset(Op386NEGL)
  6691  		v.AddArg(x)
  6692  		return true
  6693  	}
  6694  	// match: (MULLconst [0] _)
  6695  	// cond:
  6696  	// result: (MOVLconst [0])
  6697  	for {
  6698  		if v.AuxInt != 0 {
  6699  			break
  6700  		}
  6701  		v.reset(Op386MOVLconst)
  6702  		v.AuxInt = 0
  6703  		return true
  6704  	}
  6705  	// match: (MULLconst [1] x)
  6706  	// cond:
  6707  	// result: x
  6708  	for {
  6709  		if v.AuxInt != 1 {
  6710  			break
  6711  		}
  6712  		x := v.Args[0]
  6713  		v.reset(OpCopy)
  6714  		v.Type = x.Type
  6715  		v.AddArg(x)
  6716  		return true
  6717  	}
  6718  	// match: (MULLconst [3] x)
  6719  	// cond:
  6720  	// result: (LEAL2 x x)
  6721  	for {
  6722  		if v.AuxInt != 3 {
  6723  			break
  6724  		}
  6725  		x := v.Args[0]
  6726  		v.reset(Op386LEAL2)
  6727  		v.AddArg(x)
  6728  		v.AddArg(x)
  6729  		return true
  6730  	}
  6731  	// match: (MULLconst [5] x)
  6732  	// cond:
  6733  	// result: (LEAL4 x x)
  6734  	for {
  6735  		if v.AuxInt != 5 {
  6736  			break
  6737  		}
  6738  		x := v.Args[0]
  6739  		v.reset(Op386LEAL4)
  6740  		v.AddArg(x)
  6741  		v.AddArg(x)
  6742  		return true
  6743  	}
  6744  	// match: (MULLconst [7] x)
  6745  	// cond:
  6746  	// result: (LEAL8 (NEGL <v.Type> x) x)
  6747  	for {
  6748  		if v.AuxInt != 7 {
  6749  			break
  6750  		}
  6751  		x := v.Args[0]
  6752  		v.reset(Op386LEAL8)
  6753  		v0 := b.NewValue0(v.Line, Op386NEGL, v.Type)
  6754  		v0.AddArg(x)
  6755  		v.AddArg(v0)
  6756  		v.AddArg(x)
  6757  		return true
  6758  	}
  6759  	// match: (MULLconst [9] x)
  6760  	// cond:
  6761  	// result: (LEAL8 x x)
  6762  	for {
  6763  		if v.AuxInt != 9 {
  6764  			break
  6765  		}
  6766  		x := v.Args[0]
  6767  		v.reset(Op386LEAL8)
  6768  		v.AddArg(x)
  6769  		v.AddArg(x)
  6770  		return true
  6771  	}
  6772  	// match: (MULLconst [11] x)
  6773  	// cond:
  6774  	// result: (LEAL2 x (LEAL4 <v.Type> x x))
  6775  	for {
  6776  		if v.AuxInt != 11 {
  6777  			break
  6778  		}
  6779  		x := v.Args[0]
  6780  		v.reset(Op386LEAL2)
  6781  		v.AddArg(x)
  6782  		v0 := b.NewValue0(v.Line, Op386LEAL4, v.Type)
  6783  		v0.AddArg(x)
  6784  		v0.AddArg(x)
  6785  		v.AddArg(v0)
  6786  		return true
  6787  	}
  6788  	// match: (MULLconst [13] x)
  6789  	// cond:
  6790  	// result: (LEAL4 x (LEAL2 <v.Type> x x))
  6791  	for {
  6792  		if v.AuxInt != 13 {
  6793  			break
  6794  		}
  6795  		x := v.Args[0]
  6796  		v.reset(Op386LEAL4)
  6797  		v.AddArg(x)
  6798  		v0 := b.NewValue0(v.Line, Op386LEAL2, v.Type)
  6799  		v0.AddArg(x)
  6800  		v0.AddArg(x)
  6801  		v.AddArg(v0)
  6802  		return true
  6803  	}
  6804  	// match: (MULLconst [21] x)
  6805  	// cond:
  6806  	// result: (LEAL4 x (LEAL4 <v.Type> x x))
  6807  	for {
  6808  		if v.AuxInt != 21 {
  6809  			break
  6810  		}
  6811  		x := v.Args[0]
  6812  		v.reset(Op386LEAL4)
  6813  		v.AddArg(x)
  6814  		v0 := b.NewValue0(v.Line, Op386LEAL4, v.Type)
  6815  		v0.AddArg(x)
  6816  		v0.AddArg(x)
  6817  		v.AddArg(v0)
  6818  		return true
  6819  	}
  6820  	// match: (MULLconst [25] x)
  6821  	// cond:
  6822  	// result: (LEAL8 x (LEAL2 <v.Type> x x))
  6823  	for {
  6824  		if v.AuxInt != 25 {
  6825  			break
  6826  		}
  6827  		x := v.Args[0]
  6828  		v.reset(Op386LEAL8)
  6829  		v.AddArg(x)
  6830  		v0 := b.NewValue0(v.Line, Op386LEAL2, v.Type)
  6831  		v0.AddArg(x)
  6832  		v0.AddArg(x)
  6833  		v.AddArg(v0)
  6834  		return true
  6835  	}
  6836  	// match: (MULLconst [37] x)
  6837  	// cond:
  6838  	// result: (LEAL4 x (LEAL8 <v.Type> x x))
  6839  	for {
  6840  		if v.AuxInt != 37 {
  6841  			break
  6842  		}
  6843  		x := v.Args[0]
  6844  		v.reset(Op386LEAL4)
  6845  		v.AddArg(x)
  6846  		v0 := b.NewValue0(v.Line, Op386LEAL8, v.Type)
  6847  		v0.AddArg(x)
  6848  		v0.AddArg(x)
  6849  		v.AddArg(v0)
  6850  		return true
  6851  	}
  6852  	// match: (MULLconst [41] x)
  6853  	// cond:
  6854  	// result: (LEAL8 x (LEAL4 <v.Type> x x))
  6855  	for {
  6856  		if v.AuxInt != 41 {
  6857  			break
  6858  		}
  6859  		x := v.Args[0]
  6860  		v.reset(Op386LEAL8)
  6861  		v.AddArg(x)
  6862  		v0 := b.NewValue0(v.Line, Op386LEAL4, v.Type)
  6863  		v0.AddArg(x)
  6864  		v0.AddArg(x)
  6865  		v.AddArg(v0)
  6866  		return true
  6867  	}
  6868  	// match: (MULLconst [73] x)
  6869  	// cond:
  6870  	// result: (LEAL8 x (LEAL8 <v.Type> x x))
  6871  	for {
  6872  		if v.AuxInt != 73 {
  6873  			break
  6874  		}
  6875  		x := v.Args[0]
  6876  		v.reset(Op386LEAL8)
  6877  		v.AddArg(x)
  6878  		v0 := b.NewValue0(v.Line, Op386LEAL8, v.Type)
  6879  		v0.AddArg(x)
  6880  		v0.AddArg(x)
  6881  		v.AddArg(v0)
  6882  		return true
  6883  	}
  6884  	// match: (MULLconst [c] x)
  6885  	// cond: isPowerOfTwo(c)
  6886  	// result: (SHLLconst [log2(c)] x)
  6887  	for {
  6888  		c := v.AuxInt
  6889  		x := v.Args[0]
  6890  		if !(isPowerOfTwo(c)) {
  6891  			break
  6892  		}
  6893  		v.reset(Op386SHLLconst)
  6894  		v.AuxInt = log2(c)
  6895  		v.AddArg(x)
  6896  		return true
  6897  	}
  6898  	// match: (MULLconst [c] x)
  6899  	// cond: isPowerOfTwo(c+1) && c >= 15
  6900  	// result: (SUBL (SHLLconst <v.Type> [log2(c+1)] x) x)
  6901  	for {
  6902  		c := v.AuxInt
  6903  		x := v.Args[0]
  6904  		if !(isPowerOfTwo(c+1) && c >= 15) {
  6905  			break
  6906  		}
  6907  		v.reset(Op386SUBL)
  6908  		v0 := b.NewValue0(v.Line, Op386SHLLconst, v.Type)
  6909  		v0.AuxInt = log2(c + 1)
  6910  		v0.AddArg(x)
  6911  		v.AddArg(v0)
  6912  		v.AddArg(x)
  6913  		return true
  6914  	}
  6915  	// match: (MULLconst [c] x)
  6916  	// cond: isPowerOfTwo(c-1) && c >= 17
  6917  	// result: (LEAL1 (SHLLconst <v.Type> [log2(c-1)] x) x)
  6918  	for {
  6919  		c := v.AuxInt
  6920  		x := v.Args[0]
  6921  		if !(isPowerOfTwo(c-1) && c >= 17) {
  6922  			break
  6923  		}
  6924  		v.reset(Op386LEAL1)
  6925  		v0 := b.NewValue0(v.Line, Op386SHLLconst, v.Type)
  6926  		v0.AuxInt = log2(c - 1)
  6927  		v0.AddArg(x)
  6928  		v.AddArg(v0)
  6929  		v.AddArg(x)
  6930  		return true
  6931  	}
  6932  	// match: (MULLconst [c] x)
  6933  	// cond: isPowerOfTwo(c-2) && c >= 34
  6934  	// result: (LEAL2 (SHLLconst <v.Type> [log2(c-2)] x) x)
  6935  	for {
  6936  		c := v.AuxInt
  6937  		x := v.Args[0]
  6938  		if !(isPowerOfTwo(c-2) && c >= 34) {
  6939  			break
  6940  		}
  6941  		v.reset(Op386LEAL2)
  6942  		v0 := b.NewValue0(v.Line, Op386SHLLconst, v.Type)
  6943  		v0.AuxInt = log2(c - 2)
  6944  		v0.AddArg(x)
  6945  		v.AddArg(v0)
  6946  		v.AddArg(x)
  6947  		return true
  6948  	}
  6949  	// match: (MULLconst [c] x)
  6950  	// cond: isPowerOfTwo(c-4) && c >= 68
  6951  	// result: (LEAL4 (SHLLconst <v.Type> [log2(c-4)] x) x)
  6952  	for {
  6953  		c := v.AuxInt
  6954  		x := v.Args[0]
  6955  		if !(isPowerOfTwo(c-4) && c >= 68) {
  6956  			break
  6957  		}
  6958  		v.reset(Op386LEAL4)
  6959  		v0 := b.NewValue0(v.Line, Op386SHLLconst, v.Type)
  6960  		v0.AuxInt = log2(c - 4)
  6961  		v0.AddArg(x)
  6962  		v.AddArg(v0)
  6963  		v.AddArg(x)
  6964  		return true
  6965  	}
  6966  	// match: (MULLconst [c] x)
  6967  	// cond: isPowerOfTwo(c-8) && c >= 136
  6968  	// result: (LEAL8 (SHLLconst <v.Type> [log2(c-8)] x) x)
  6969  	for {
  6970  		c := v.AuxInt
  6971  		x := v.Args[0]
  6972  		if !(isPowerOfTwo(c-8) && c >= 136) {
  6973  			break
  6974  		}
  6975  		v.reset(Op386LEAL8)
  6976  		v0 := b.NewValue0(v.Line, Op386SHLLconst, v.Type)
  6977  		v0.AuxInt = log2(c - 8)
  6978  		v0.AddArg(x)
  6979  		v.AddArg(v0)
  6980  		v.AddArg(x)
  6981  		return true
  6982  	}
  6983  	// match: (MULLconst [c] x)
  6984  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
  6985  	// result: (SHLLconst [log2(c/3)] (LEAL2 <v.Type> x x))
  6986  	for {
  6987  		c := v.AuxInt
  6988  		x := v.Args[0]
  6989  		if !(c%3 == 0 && isPowerOfTwo(c/3)) {
  6990  			break
  6991  		}
  6992  		v.reset(Op386SHLLconst)
  6993  		v.AuxInt = log2(c / 3)
  6994  		v0 := b.NewValue0(v.Line, Op386LEAL2, v.Type)
  6995  		v0.AddArg(x)
  6996  		v0.AddArg(x)
  6997  		v.AddArg(v0)
  6998  		return true
  6999  	}
  7000  	// match: (MULLconst [c] x)
  7001  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
  7002  	// result: (SHLLconst [log2(c/5)] (LEAL4 <v.Type> x x))
  7003  	for {
  7004  		c := v.AuxInt
  7005  		x := v.Args[0]
  7006  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
  7007  			break
  7008  		}
  7009  		v.reset(Op386SHLLconst)
  7010  		v.AuxInt = log2(c / 5)
  7011  		v0 := b.NewValue0(v.Line, Op386LEAL4, v.Type)
  7012  		v0.AddArg(x)
  7013  		v0.AddArg(x)
  7014  		v.AddArg(v0)
  7015  		return true
  7016  	}
  7017  	// match: (MULLconst [c] x)
  7018  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
  7019  	// result: (SHLLconst [log2(c/9)] (LEAL8 <v.Type> x x))
  7020  	for {
  7021  		c := v.AuxInt
  7022  		x := v.Args[0]
  7023  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
  7024  			break
  7025  		}
  7026  		v.reset(Op386SHLLconst)
  7027  		v.AuxInt = log2(c / 9)
  7028  		v0 := b.NewValue0(v.Line, Op386LEAL8, v.Type)
  7029  		v0.AddArg(x)
  7030  		v0.AddArg(x)
  7031  		v.AddArg(v0)
  7032  		return true
  7033  	}
  7034  	// match: (MULLconst [c] (MOVLconst [d]))
  7035  	// cond:
  7036  	// result: (MOVLconst [int64(int32(c*d))])
  7037  	for {
  7038  		c := v.AuxInt
  7039  		v_0 := v.Args[0]
  7040  		if v_0.Op != Op386MOVLconst {
  7041  			break
  7042  		}
  7043  		d := v_0.AuxInt
  7044  		v.reset(Op386MOVLconst)
  7045  		v.AuxInt = int64(int32(c * d))
  7046  		return true
  7047  	}
  7048  	return false
  7049  }
  7050  func rewriteValue386_Op386NEGL(v *Value, config *Config) bool {
  7051  	b := v.Block
  7052  	_ = b
  7053  	// match: (NEGL (MOVLconst [c]))
  7054  	// cond:
  7055  	// result: (MOVLconst [int64(int32(-c))])
  7056  	for {
  7057  		v_0 := v.Args[0]
  7058  		if v_0.Op != Op386MOVLconst {
  7059  			break
  7060  		}
  7061  		c := v_0.AuxInt
  7062  		v.reset(Op386MOVLconst)
  7063  		v.AuxInt = int64(int32(-c))
  7064  		return true
  7065  	}
  7066  	return false
  7067  }
  7068  func rewriteValue386_Op386NOTL(v *Value, config *Config) bool {
  7069  	b := v.Block
  7070  	_ = b
  7071  	// match: (NOTL (MOVLconst [c]))
  7072  	// cond:
  7073  	// result: (MOVLconst [^c])
  7074  	for {
  7075  		v_0 := v.Args[0]
  7076  		if v_0.Op != Op386MOVLconst {
  7077  			break
  7078  		}
  7079  		c := v_0.AuxInt
  7080  		v.reset(Op386MOVLconst)
  7081  		v.AuxInt = ^c
  7082  		return true
  7083  	}
  7084  	return false
  7085  }
  7086  func rewriteValue386_Op386ORL(v *Value, config *Config) bool {
  7087  	b := v.Block
  7088  	_ = b
  7089  	// match: (ORL x (MOVLconst [c]))
  7090  	// cond:
  7091  	// result: (ORLconst [c] x)
  7092  	for {
  7093  		x := v.Args[0]
  7094  		v_1 := v.Args[1]
  7095  		if v_1.Op != Op386MOVLconst {
  7096  			break
  7097  		}
  7098  		c := v_1.AuxInt
  7099  		v.reset(Op386ORLconst)
  7100  		v.AuxInt = c
  7101  		v.AddArg(x)
  7102  		return true
  7103  	}
  7104  	// match: (ORL (MOVLconst [c]) x)
  7105  	// cond:
  7106  	// result: (ORLconst [c] x)
  7107  	for {
  7108  		v_0 := v.Args[0]
  7109  		if v_0.Op != Op386MOVLconst {
  7110  			break
  7111  		}
  7112  		c := v_0.AuxInt
  7113  		x := v.Args[1]
  7114  		v.reset(Op386ORLconst)
  7115  		v.AuxInt = c
  7116  		v.AddArg(x)
  7117  		return true
  7118  	}
  7119  	// match: (ORL x x)
  7120  	// cond:
  7121  	// result: x
  7122  	for {
  7123  		x := v.Args[0]
  7124  		if x != v.Args[1] {
  7125  			break
  7126  		}
  7127  		v.reset(OpCopy)
  7128  		v.Type = x.Type
  7129  		v.AddArg(x)
  7130  		return true
  7131  	}
  7132  	// match: (ORL                  x0:(MOVBload [i]   {s} p mem)     s0:(SHLLconst [8] x1:(MOVBload [i+1] {s} p mem)))
  7133  	// cond: x0.Uses == 1   && x1.Uses == 1   && s0.Uses == 1   && mergePoint(b,x0,x1) != nil   && clobber(x0)   && clobber(x1)   && clobber(s0)
  7134  	// result: @mergePoint(b,x0,x1) (MOVWload [i] {s} p mem)
  7135  	for {
  7136  		x0 := v.Args[0]
  7137  		if x0.Op != Op386MOVBload {
  7138  			break
  7139  		}
  7140  		i := x0.AuxInt
  7141  		s := x0.Aux
  7142  		p := x0.Args[0]
  7143  		mem := x0.Args[1]
  7144  		s0 := v.Args[1]
  7145  		if s0.Op != Op386SHLLconst {
  7146  			break
  7147  		}
  7148  		if s0.AuxInt != 8 {
  7149  			break
  7150  		}
  7151  		x1 := s0.Args[0]
  7152  		if x1.Op != Op386MOVBload {
  7153  			break
  7154  		}
  7155  		if x1.AuxInt != i+1 {
  7156  			break
  7157  		}
  7158  		if x1.Aux != s {
  7159  			break
  7160  		}
  7161  		if p != x1.Args[0] {
  7162  			break
  7163  		}
  7164  		if mem != x1.Args[1] {
  7165  			break
  7166  		}
  7167  		if !(x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0) && clobber(x1) && clobber(s0)) {
  7168  			break
  7169  		}
  7170  		b = mergePoint(b, x0, x1)
  7171  		v0 := b.NewValue0(v.Line, Op386MOVWload, config.fe.TypeUInt16())
  7172  		v.reset(OpCopy)
  7173  		v.AddArg(v0)
  7174  		v0.AuxInt = i
  7175  		v0.Aux = s
  7176  		v0.AddArg(p)
  7177  		v0.AddArg(mem)
  7178  		return true
  7179  	}
  7180  	// match: (ORL o0:(ORL o1:(ORL                        x0:(MOVBload [i]   {s} p mem)     s0:(SHLLconst [8]  x1:(MOVBload [i+1] {s} p mem)))     s1:(SHLLconst [16] x2:(MOVBload [i+2] {s} p mem)))     s2:(SHLLconst [24] x3:(MOVBload [i+3] {s} p mem)))
  7181  	// cond: x0.Uses == 1   && x1.Uses == 1   && x2.Uses == 1   && x3.Uses == 1   && s0.Uses == 1   && s1.Uses == 1   && s2.Uses == 1   && o0.Uses == 1   && o1.Uses == 1   && mergePoint(b,x0,x1,x2,x3) != nil   && clobber(x0)   && clobber(x1)   && clobber(x2)   && clobber(x3)   && clobber(s0)   && clobber(s1)   && clobber(s2)   && clobber(o0)   && clobber(o1)
  7182  	// result: @mergePoint(b,x0,x1,x2,x3) (MOVLload [i] {s} p mem)
  7183  	for {
  7184  		o0 := v.Args[0]
  7185  		if o0.Op != Op386ORL {
  7186  			break
  7187  		}
  7188  		o1 := o0.Args[0]
  7189  		if o1.Op != Op386ORL {
  7190  			break
  7191  		}
  7192  		x0 := o1.Args[0]
  7193  		if x0.Op != Op386MOVBload {
  7194  			break
  7195  		}
  7196  		i := x0.AuxInt
  7197  		s := x0.Aux
  7198  		p := x0.Args[0]
  7199  		mem := x0.Args[1]
  7200  		s0 := o1.Args[1]
  7201  		if s0.Op != Op386SHLLconst {
  7202  			break
  7203  		}
  7204  		if s0.AuxInt != 8 {
  7205  			break
  7206  		}
  7207  		x1 := s0.Args[0]
  7208  		if x1.Op != Op386MOVBload {
  7209  			break
  7210  		}
  7211  		if x1.AuxInt != i+1 {
  7212  			break
  7213  		}
  7214  		if x1.Aux != s {
  7215  			break
  7216  		}
  7217  		if p != x1.Args[0] {
  7218  			break
  7219  		}
  7220  		if mem != x1.Args[1] {
  7221  			break
  7222  		}
  7223  		s1 := o0.Args[1]
  7224  		if s1.Op != Op386SHLLconst {
  7225  			break
  7226  		}
  7227  		if s1.AuxInt != 16 {
  7228  			break
  7229  		}
  7230  		x2 := s1.Args[0]
  7231  		if x2.Op != Op386MOVBload {
  7232  			break
  7233  		}
  7234  		if x2.AuxInt != i+2 {
  7235  			break
  7236  		}
  7237  		if x2.Aux != s {
  7238  			break
  7239  		}
  7240  		if p != x2.Args[0] {
  7241  			break
  7242  		}
  7243  		if mem != x2.Args[1] {
  7244  			break
  7245  		}
  7246  		s2 := v.Args[1]
  7247  		if s2.Op != Op386SHLLconst {
  7248  			break
  7249  		}
  7250  		if s2.AuxInt != 24 {
  7251  			break
  7252  		}
  7253  		x3 := s2.Args[0]
  7254  		if x3.Op != Op386MOVBload {
  7255  			break
  7256  		}
  7257  		if x3.AuxInt != i+3 {
  7258  			break
  7259  		}
  7260  		if x3.Aux != s {
  7261  			break
  7262  		}
  7263  		if p != x3.Args[0] {
  7264  			break
  7265  		}
  7266  		if mem != x3.Args[1] {
  7267  			break
  7268  		}
  7269  		if !(x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && x3.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && s2.Uses == 1 && o0.Uses == 1 && o1.Uses == 1 && mergePoint(b, x0, x1, x2, x3) != nil && clobber(x0) && clobber(x1) && clobber(x2) && clobber(x3) && clobber(s0) && clobber(s1) && clobber(s2) && clobber(o0) && clobber(o1)) {
  7270  			break
  7271  		}
  7272  		b = mergePoint(b, x0, x1, x2, x3)
  7273  		v0 := b.NewValue0(v.Line, Op386MOVLload, config.fe.TypeUInt32())
  7274  		v.reset(OpCopy)
  7275  		v.AddArg(v0)
  7276  		v0.AuxInt = i
  7277  		v0.Aux = s
  7278  		v0.AddArg(p)
  7279  		v0.AddArg(mem)
  7280  		return true
  7281  	}
  7282  	// match: (ORL                  x0:(MOVBloadidx1 [i]   {s} p idx mem)     s0:(SHLLconst [8] x1:(MOVBloadidx1 [i+1] {s} p idx mem)))
  7283  	// cond: x0.Uses == 1   && x1.Uses == 1   && s0.Uses == 1   && mergePoint(b,x0,x1) != nil   && clobber(x0)   && clobber(x1)   && clobber(s0)
  7284  	// result: @mergePoint(b,x0,x1) (MOVWloadidx1 <v.Type> [i] {s} p idx mem)
  7285  	for {
  7286  		x0 := v.Args[0]
  7287  		if x0.Op != Op386MOVBloadidx1 {
  7288  			break
  7289  		}
  7290  		i := x0.AuxInt
  7291  		s := x0.Aux
  7292  		p := x0.Args[0]
  7293  		idx := x0.Args[1]
  7294  		mem := x0.Args[2]
  7295  		s0 := v.Args[1]
  7296  		if s0.Op != Op386SHLLconst {
  7297  			break
  7298  		}
  7299  		if s0.AuxInt != 8 {
  7300  			break
  7301  		}
  7302  		x1 := s0.Args[0]
  7303  		if x1.Op != Op386MOVBloadidx1 {
  7304  			break
  7305  		}
  7306  		if x1.AuxInt != i+1 {
  7307  			break
  7308  		}
  7309  		if x1.Aux != s {
  7310  			break
  7311  		}
  7312  		if p != x1.Args[0] {
  7313  			break
  7314  		}
  7315  		if idx != x1.Args[1] {
  7316  			break
  7317  		}
  7318  		if mem != x1.Args[2] {
  7319  			break
  7320  		}
  7321  		if !(x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0) && clobber(x1) && clobber(s0)) {
  7322  			break
  7323  		}
  7324  		b = mergePoint(b, x0, x1)
  7325  		v0 := b.NewValue0(v.Line, Op386MOVWloadidx1, v.Type)
  7326  		v.reset(OpCopy)
  7327  		v.AddArg(v0)
  7328  		v0.AuxInt = i
  7329  		v0.Aux = s
  7330  		v0.AddArg(p)
  7331  		v0.AddArg(idx)
  7332  		v0.AddArg(mem)
  7333  		return true
  7334  	}
  7335  	// match: (ORL o0:(ORL o1:(ORL                        x0:(MOVBloadidx1 [i]   {s} p idx mem)     s0:(SHLLconst [8]  x1:(MOVBloadidx1 [i+1] {s} p idx mem)))     s1:(SHLLconst [16] x2:(MOVBloadidx1 [i+2] {s} p idx mem)))     s2:(SHLLconst [24] x3:(MOVBloadidx1 [i+3] {s} p idx mem)))
  7336  	// cond: x0.Uses == 1   && x1.Uses == 1   && x2.Uses == 1   && x3.Uses == 1   && s0.Uses == 1   && s1.Uses == 1   && s2.Uses == 1   && o0.Uses == 1   && o1.Uses == 1   && mergePoint(b,x0,x1,x2,x3) != nil   && clobber(x0)   && clobber(x1)   && clobber(x2)   && clobber(x3)   && clobber(s0)   && clobber(s1)   && clobber(s2)   && clobber(o0)   && clobber(o1)
  7337  	// result: @mergePoint(b,x0,x1,x2,x3) (MOVLloadidx1 <v.Type> [i] {s} p idx mem)
  7338  	for {
  7339  		o0 := v.Args[0]
  7340  		if o0.Op != Op386ORL {
  7341  			break
  7342  		}
  7343  		o1 := o0.Args[0]
  7344  		if o1.Op != Op386ORL {
  7345  			break
  7346  		}
  7347  		x0 := o1.Args[0]
  7348  		if x0.Op != Op386MOVBloadidx1 {
  7349  			break
  7350  		}
  7351  		i := x0.AuxInt
  7352  		s := x0.Aux
  7353  		p := x0.Args[0]
  7354  		idx := x0.Args[1]
  7355  		mem := x0.Args[2]
  7356  		s0 := o1.Args[1]
  7357  		if s0.Op != Op386SHLLconst {
  7358  			break
  7359  		}
  7360  		if s0.AuxInt != 8 {
  7361  			break
  7362  		}
  7363  		x1 := s0.Args[0]
  7364  		if x1.Op != Op386MOVBloadidx1 {
  7365  			break
  7366  		}
  7367  		if x1.AuxInt != i+1 {
  7368  			break
  7369  		}
  7370  		if x1.Aux != s {
  7371  			break
  7372  		}
  7373  		if p != x1.Args[0] {
  7374  			break
  7375  		}
  7376  		if idx != x1.Args[1] {
  7377  			break
  7378  		}
  7379  		if mem != x1.Args[2] {
  7380  			break
  7381  		}
  7382  		s1 := o0.Args[1]
  7383  		if s1.Op != Op386SHLLconst {
  7384  			break
  7385  		}
  7386  		if s1.AuxInt != 16 {
  7387  			break
  7388  		}
  7389  		x2 := s1.Args[0]
  7390  		if x2.Op != Op386MOVBloadidx1 {
  7391  			break
  7392  		}
  7393  		if x2.AuxInt != i+2 {
  7394  			break
  7395  		}
  7396  		if x2.Aux != s {
  7397  			break
  7398  		}
  7399  		if p != x2.Args[0] {
  7400  			break
  7401  		}
  7402  		if idx != x2.Args[1] {
  7403  			break
  7404  		}
  7405  		if mem != x2.Args[2] {
  7406  			break
  7407  		}
  7408  		s2 := v.Args[1]
  7409  		if s2.Op != Op386SHLLconst {
  7410  			break
  7411  		}
  7412  		if s2.AuxInt != 24 {
  7413  			break
  7414  		}
  7415  		x3 := s2.Args[0]
  7416  		if x3.Op != Op386MOVBloadidx1 {
  7417  			break
  7418  		}
  7419  		if x3.AuxInt != i+3 {
  7420  			break
  7421  		}
  7422  		if x3.Aux != s {
  7423  			break
  7424  		}
  7425  		if p != x3.Args[0] {
  7426  			break
  7427  		}
  7428  		if idx != x3.Args[1] {
  7429  			break
  7430  		}
  7431  		if mem != x3.Args[2] {
  7432  			break
  7433  		}
  7434  		if !(x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && x3.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && s2.Uses == 1 && o0.Uses == 1 && o1.Uses == 1 && mergePoint(b, x0, x1, x2, x3) != nil && clobber(x0) && clobber(x1) && clobber(x2) && clobber(x3) && clobber(s0) && clobber(s1) && clobber(s2) && clobber(o0) && clobber(o1)) {
  7435  			break
  7436  		}
  7437  		b = mergePoint(b, x0, x1, x2, x3)
  7438  		v0 := b.NewValue0(v.Line, Op386MOVLloadidx1, v.Type)
  7439  		v.reset(OpCopy)
  7440  		v.AddArg(v0)
  7441  		v0.AuxInt = i
  7442  		v0.Aux = s
  7443  		v0.AddArg(p)
  7444  		v0.AddArg(idx)
  7445  		v0.AddArg(mem)
  7446  		return true
  7447  	}
  7448  	return false
  7449  }
  7450  func rewriteValue386_Op386ORLconst(v *Value, config *Config) bool {
  7451  	b := v.Block
  7452  	_ = b
  7453  	// match: (ORLconst [c] x)
  7454  	// cond: int32(c)==0
  7455  	// result: x
  7456  	for {
  7457  		c := v.AuxInt
  7458  		x := v.Args[0]
  7459  		if !(int32(c) == 0) {
  7460  			break
  7461  		}
  7462  		v.reset(OpCopy)
  7463  		v.Type = x.Type
  7464  		v.AddArg(x)
  7465  		return true
  7466  	}
  7467  	// match: (ORLconst [c] _)
  7468  	// cond: int32(c)==-1
  7469  	// result: (MOVLconst [-1])
  7470  	for {
  7471  		c := v.AuxInt
  7472  		if !(int32(c) == -1) {
  7473  			break
  7474  		}
  7475  		v.reset(Op386MOVLconst)
  7476  		v.AuxInt = -1
  7477  		return true
  7478  	}
  7479  	// match: (ORLconst [c] (MOVLconst [d]))
  7480  	// cond:
  7481  	// result: (MOVLconst [c|d])
  7482  	for {
  7483  		c := v.AuxInt
  7484  		v_0 := v.Args[0]
  7485  		if v_0.Op != Op386MOVLconst {
  7486  			break
  7487  		}
  7488  		d := v_0.AuxInt
  7489  		v.reset(Op386MOVLconst)
  7490  		v.AuxInt = c | d
  7491  		return true
  7492  	}
  7493  	return false
  7494  }
  7495  func rewriteValue386_Op386ROLBconst(v *Value, config *Config) bool {
  7496  	b := v.Block
  7497  	_ = b
  7498  	// match: (ROLBconst [c] (ROLBconst [d] x))
  7499  	// cond:
  7500  	// result: (ROLBconst [(c+d)& 7] x)
  7501  	for {
  7502  		c := v.AuxInt
  7503  		v_0 := v.Args[0]
  7504  		if v_0.Op != Op386ROLBconst {
  7505  			break
  7506  		}
  7507  		d := v_0.AuxInt
  7508  		x := v_0.Args[0]
  7509  		v.reset(Op386ROLBconst)
  7510  		v.AuxInt = (c + d) & 7
  7511  		v.AddArg(x)
  7512  		return true
  7513  	}
  7514  	// match: (ROLBconst [0] x)
  7515  	// cond:
  7516  	// result: x
  7517  	for {
  7518  		if v.AuxInt != 0 {
  7519  			break
  7520  		}
  7521  		x := v.Args[0]
  7522  		v.reset(OpCopy)
  7523  		v.Type = x.Type
  7524  		v.AddArg(x)
  7525  		return true
  7526  	}
  7527  	return false
  7528  }
  7529  func rewriteValue386_Op386ROLLconst(v *Value, config *Config) bool {
  7530  	b := v.Block
  7531  	_ = b
  7532  	// match: (ROLLconst [c] (ROLLconst [d] x))
  7533  	// cond:
  7534  	// result: (ROLLconst [(c+d)&31] x)
  7535  	for {
  7536  		c := v.AuxInt
  7537  		v_0 := v.Args[0]
  7538  		if v_0.Op != Op386ROLLconst {
  7539  			break
  7540  		}
  7541  		d := v_0.AuxInt
  7542  		x := v_0.Args[0]
  7543  		v.reset(Op386ROLLconst)
  7544  		v.AuxInt = (c + d) & 31
  7545  		v.AddArg(x)
  7546  		return true
  7547  	}
  7548  	// match: (ROLLconst [0] x)
  7549  	// cond:
  7550  	// result: x
  7551  	for {
  7552  		if v.AuxInt != 0 {
  7553  			break
  7554  		}
  7555  		x := v.Args[0]
  7556  		v.reset(OpCopy)
  7557  		v.Type = x.Type
  7558  		v.AddArg(x)
  7559  		return true
  7560  	}
  7561  	return false
  7562  }
  7563  func rewriteValue386_Op386ROLWconst(v *Value, config *Config) bool {
  7564  	b := v.Block
  7565  	_ = b
  7566  	// match: (ROLWconst [c] (ROLWconst [d] x))
  7567  	// cond:
  7568  	// result: (ROLWconst [(c+d)&15] x)
  7569  	for {
  7570  		c := v.AuxInt
  7571  		v_0 := v.Args[0]
  7572  		if v_0.Op != Op386ROLWconst {
  7573  			break
  7574  		}
  7575  		d := v_0.AuxInt
  7576  		x := v_0.Args[0]
  7577  		v.reset(Op386ROLWconst)
  7578  		v.AuxInt = (c + d) & 15
  7579  		v.AddArg(x)
  7580  		return true
  7581  	}
  7582  	// match: (ROLWconst [0] x)
  7583  	// cond:
  7584  	// result: x
  7585  	for {
  7586  		if v.AuxInt != 0 {
  7587  			break
  7588  		}
  7589  		x := v.Args[0]
  7590  		v.reset(OpCopy)
  7591  		v.Type = x.Type
  7592  		v.AddArg(x)
  7593  		return true
  7594  	}
  7595  	return false
  7596  }
  7597  func rewriteValue386_Op386SARB(v *Value, config *Config) bool {
  7598  	b := v.Block
  7599  	_ = b
  7600  	// match: (SARB x (MOVLconst [c]))
  7601  	// cond:
  7602  	// result: (SARBconst [c&31] x)
  7603  	for {
  7604  		x := v.Args[0]
  7605  		v_1 := v.Args[1]
  7606  		if v_1.Op != Op386MOVLconst {
  7607  			break
  7608  		}
  7609  		c := v_1.AuxInt
  7610  		v.reset(Op386SARBconst)
  7611  		v.AuxInt = c & 31
  7612  		v.AddArg(x)
  7613  		return true
  7614  	}
  7615  	// match: (SARB x (MOVLconst [c]))
  7616  	// cond:
  7617  	// result: (SARBconst [c&31] x)
  7618  	for {
  7619  		x := v.Args[0]
  7620  		v_1 := v.Args[1]
  7621  		if v_1.Op != Op386MOVLconst {
  7622  			break
  7623  		}
  7624  		c := v_1.AuxInt
  7625  		v.reset(Op386SARBconst)
  7626  		v.AuxInt = c & 31
  7627  		v.AddArg(x)
  7628  		return true
  7629  	}
  7630  	return false
  7631  }
  7632  func rewriteValue386_Op386SARBconst(v *Value, config *Config) bool {
  7633  	b := v.Block
  7634  	_ = b
  7635  	// match: (SARBconst [c] (MOVLconst [d]))
  7636  	// cond:
  7637  	// result: (MOVLconst [d>>uint64(c)])
  7638  	for {
  7639  		c := v.AuxInt
  7640  		v_0 := v.Args[0]
  7641  		if v_0.Op != Op386MOVLconst {
  7642  			break
  7643  		}
  7644  		d := v_0.AuxInt
  7645  		v.reset(Op386MOVLconst)
  7646  		v.AuxInt = d >> uint64(c)
  7647  		return true
  7648  	}
  7649  	return false
  7650  }
  7651  func rewriteValue386_Op386SARL(v *Value, config *Config) bool {
  7652  	b := v.Block
  7653  	_ = b
  7654  	// match: (SARL x (MOVLconst [c]))
  7655  	// cond:
  7656  	// result: (SARLconst [c&31] x)
  7657  	for {
  7658  		x := v.Args[0]
  7659  		v_1 := v.Args[1]
  7660  		if v_1.Op != Op386MOVLconst {
  7661  			break
  7662  		}
  7663  		c := v_1.AuxInt
  7664  		v.reset(Op386SARLconst)
  7665  		v.AuxInt = c & 31
  7666  		v.AddArg(x)
  7667  		return true
  7668  	}
  7669  	// match: (SARL x (MOVLconst [c]))
  7670  	// cond:
  7671  	// result: (SARLconst [c&31] x)
  7672  	for {
  7673  		x := v.Args[0]
  7674  		v_1 := v.Args[1]
  7675  		if v_1.Op != Op386MOVLconst {
  7676  			break
  7677  		}
  7678  		c := v_1.AuxInt
  7679  		v.reset(Op386SARLconst)
  7680  		v.AuxInt = c & 31
  7681  		v.AddArg(x)
  7682  		return true
  7683  	}
  7684  	// match: (SARL x (ANDLconst [31] y))
  7685  	// cond:
  7686  	// result: (SARL x y)
  7687  	for {
  7688  		x := v.Args[0]
  7689  		v_1 := v.Args[1]
  7690  		if v_1.Op != Op386ANDLconst {
  7691  			break
  7692  		}
  7693  		if v_1.AuxInt != 31 {
  7694  			break
  7695  		}
  7696  		y := v_1.Args[0]
  7697  		v.reset(Op386SARL)
  7698  		v.AddArg(x)
  7699  		v.AddArg(y)
  7700  		return true
  7701  	}
  7702  	return false
  7703  }
  7704  func rewriteValue386_Op386SARLconst(v *Value, config *Config) bool {
  7705  	b := v.Block
  7706  	_ = b
  7707  	// match: (SARLconst [c] (MOVLconst [d]))
  7708  	// cond:
  7709  	// result: (MOVLconst [d>>uint64(c)])
  7710  	for {
  7711  		c := v.AuxInt
  7712  		v_0 := v.Args[0]
  7713  		if v_0.Op != Op386MOVLconst {
  7714  			break
  7715  		}
  7716  		d := v_0.AuxInt
  7717  		v.reset(Op386MOVLconst)
  7718  		v.AuxInt = d >> uint64(c)
  7719  		return true
  7720  	}
  7721  	return false
  7722  }
  7723  func rewriteValue386_Op386SARW(v *Value, config *Config) bool {
  7724  	b := v.Block
  7725  	_ = b
  7726  	// match: (SARW x (MOVLconst [c]))
  7727  	// cond:
  7728  	// result: (SARWconst [c&31] x)
  7729  	for {
  7730  		x := v.Args[0]
  7731  		v_1 := v.Args[1]
  7732  		if v_1.Op != Op386MOVLconst {
  7733  			break
  7734  		}
  7735  		c := v_1.AuxInt
  7736  		v.reset(Op386SARWconst)
  7737  		v.AuxInt = c & 31
  7738  		v.AddArg(x)
  7739  		return true
  7740  	}
  7741  	// match: (SARW x (MOVLconst [c]))
  7742  	// cond:
  7743  	// result: (SARWconst [c&31] x)
  7744  	for {
  7745  		x := v.Args[0]
  7746  		v_1 := v.Args[1]
  7747  		if v_1.Op != Op386MOVLconst {
  7748  			break
  7749  		}
  7750  		c := v_1.AuxInt
  7751  		v.reset(Op386SARWconst)
  7752  		v.AuxInt = c & 31
  7753  		v.AddArg(x)
  7754  		return true
  7755  	}
  7756  	return false
  7757  }
  7758  func rewriteValue386_Op386SARWconst(v *Value, config *Config) bool {
  7759  	b := v.Block
  7760  	_ = b
  7761  	// match: (SARWconst [c] (MOVLconst [d]))
  7762  	// cond:
  7763  	// result: (MOVLconst [d>>uint64(c)])
  7764  	for {
  7765  		c := v.AuxInt
  7766  		v_0 := v.Args[0]
  7767  		if v_0.Op != Op386MOVLconst {
  7768  			break
  7769  		}
  7770  		d := v_0.AuxInt
  7771  		v.reset(Op386MOVLconst)
  7772  		v.AuxInt = d >> uint64(c)
  7773  		return true
  7774  	}
  7775  	return false
  7776  }
  7777  func rewriteValue386_Op386SBBL(v *Value, config *Config) bool {
  7778  	b := v.Block
  7779  	_ = b
  7780  	// match: (SBBL x (MOVLconst [c]) f)
  7781  	// cond:
  7782  	// result: (SBBLconst [c] x f)
  7783  	for {
  7784  		x := v.Args[0]
  7785  		v_1 := v.Args[1]
  7786  		if v_1.Op != Op386MOVLconst {
  7787  			break
  7788  		}
  7789  		c := v_1.AuxInt
  7790  		f := v.Args[2]
  7791  		v.reset(Op386SBBLconst)
  7792  		v.AuxInt = c
  7793  		v.AddArg(x)
  7794  		v.AddArg(f)
  7795  		return true
  7796  	}
  7797  	return false
  7798  }
  7799  func rewriteValue386_Op386SBBLcarrymask(v *Value, config *Config) bool {
  7800  	b := v.Block
  7801  	_ = b
  7802  	// match: (SBBLcarrymask (FlagEQ))
  7803  	// cond:
  7804  	// result: (MOVLconst [0])
  7805  	for {
  7806  		v_0 := v.Args[0]
  7807  		if v_0.Op != Op386FlagEQ {
  7808  			break
  7809  		}
  7810  		v.reset(Op386MOVLconst)
  7811  		v.AuxInt = 0
  7812  		return true
  7813  	}
  7814  	// match: (SBBLcarrymask (FlagLT_ULT))
  7815  	// cond:
  7816  	// result: (MOVLconst [-1])
  7817  	for {
  7818  		v_0 := v.Args[0]
  7819  		if v_0.Op != Op386FlagLT_ULT {
  7820  			break
  7821  		}
  7822  		v.reset(Op386MOVLconst)
  7823  		v.AuxInt = -1
  7824  		return true
  7825  	}
  7826  	// match: (SBBLcarrymask (FlagLT_UGT))
  7827  	// cond:
  7828  	// result: (MOVLconst [0])
  7829  	for {
  7830  		v_0 := v.Args[0]
  7831  		if v_0.Op != Op386FlagLT_UGT {
  7832  			break
  7833  		}
  7834  		v.reset(Op386MOVLconst)
  7835  		v.AuxInt = 0
  7836  		return true
  7837  	}
  7838  	// match: (SBBLcarrymask (FlagGT_ULT))
  7839  	// cond:
  7840  	// result: (MOVLconst [-1])
  7841  	for {
  7842  		v_0 := v.Args[0]
  7843  		if v_0.Op != Op386FlagGT_ULT {
  7844  			break
  7845  		}
  7846  		v.reset(Op386MOVLconst)
  7847  		v.AuxInt = -1
  7848  		return true
  7849  	}
  7850  	// match: (SBBLcarrymask (FlagGT_UGT))
  7851  	// cond:
  7852  	// result: (MOVLconst [0])
  7853  	for {
  7854  		v_0 := v.Args[0]
  7855  		if v_0.Op != Op386FlagGT_UGT {
  7856  			break
  7857  		}
  7858  		v.reset(Op386MOVLconst)
  7859  		v.AuxInt = 0
  7860  		return true
  7861  	}
  7862  	return false
  7863  }
  7864  func rewriteValue386_Op386SETA(v *Value, config *Config) bool {
  7865  	b := v.Block
  7866  	_ = b
  7867  	// match: (SETA (InvertFlags x))
  7868  	// cond:
  7869  	// result: (SETB x)
  7870  	for {
  7871  		v_0 := v.Args[0]
  7872  		if v_0.Op != Op386InvertFlags {
  7873  			break
  7874  		}
  7875  		x := v_0.Args[0]
  7876  		v.reset(Op386SETB)
  7877  		v.AddArg(x)
  7878  		return true
  7879  	}
  7880  	// match: (SETA (FlagEQ))
  7881  	// cond:
  7882  	// result: (MOVLconst [0])
  7883  	for {
  7884  		v_0 := v.Args[0]
  7885  		if v_0.Op != Op386FlagEQ {
  7886  			break
  7887  		}
  7888  		v.reset(Op386MOVLconst)
  7889  		v.AuxInt = 0
  7890  		return true
  7891  	}
  7892  	// match: (SETA (FlagLT_ULT))
  7893  	// cond:
  7894  	// result: (MOVLconst [0])
  7895  	for {
  7896  		v_0 := v.Args[0]
  7897  		if v_0.Op != Op386FlagLT_ULT {
  7898  			break
  7899  		}
  7900  		v.reset(Op386MOVLconst)
  7901  		v.AuxInt = 0
  7902  		return true
  7903  	}
  7904  	// match: (SETA (FlagLT_UGT))
  7905  	// cond:
  7906  	// result: (MOVLconst [1])
  7907  	for {
  7908  		v_0 := v.Args[0]
  7909  		if v_0.Op != Op386FlagLT_UGT {
  7910  			break
  7911  		}
  7912  		v.reset(Op386MOVLconst)
  7913  		v.AuxInt = 1
  7914  		return true
  7915  	}
  7916  	// match: (SETA (FlagGT_ULT))
  7917  	// cond:
  7918  	// result: (MOVLconst [0])
  7919  	for {
  7920  		v_0 := v.Args[0]
  7921  		if v_0.Op != Op386FlagGT_ULT {
  7922  			break
  7923  		}
  7924  		v.reset(Op386MOVLconst)
  7925  		v.AuxInt = 0
  7926  		return true
  7927  	}
  7928  	// match: (SETA (FlagGT_UGT))
  7929  	// cond:
  7930  	// result: (MOVLconst [1])
  7931  	for {
  7932  		v_0 := v.Args[0]
  7933  		if v_0.Op != Op386FlagGT_UGT {
  7934  			break
  7935  		}
  7936  		v.reset(Op386MOVLconst)
  7937  		v.AuxInt = 1
  7938  		return true
  7939  	}
  7940  	return false
  7941  }
  7942  func rewriteValue386_Op386SETAE(v *Value, config *Config) bool {
  7943  	b := v.Block
  7944  	_ = b
  7945  	// match: (SETAE (InvertFlags x))
  7946  	// cond:
  7947  	// result: (SETBE x)
  7948  	for {
  7949  		v_0 := v.Args[0]
  7950  		if v_0.Op != Op386InvertFlags {
  7951  			break
  7952  		}
  7953  		x := v_0.Args[0]
  7954  		v.reset(Op386SETBE)
  7955  		v.AddArg(x)
  7956  		return true
  7957  	}
  7958  	// match: (SETAE (FlagEQ))
  7959  	// cond:
  7960  	// result: (MOVLconst [1])
  7961  	for {
  7962  		v_0 := v.Args[0]
  7963  		if v_0.Op != Op386FlagEQ {
  7964  			break
  7965  		}
  7966  		v.reset(Op386MOVLconst)
  7967  		v.AuxInt = 1
  7968  		return true
  7969  	}
  7970  	// match: (SETAE (FlagLT_ULT))
  7971  	// cond:
  7972  	// result: (MOVLconst [0])
  7973  	for {
  7974  		v_0 := v.Args[0]
  7975  		if v_0.Op != Op386FlagLT_ULT {
  7976  			break
  7977  		}
  7978  		v.reset(Op386MOVLconst)
  7979  		v.AuxInt = 0
  7980  		return true
  7981  	}
  7982  	// match: (SETAE (FlagLT_UGT))
  7983  	// cond:
  7984  	// result: (MOVLconst [1])
  7985  	for {
  7986  		v_0 := v.Args[0]
  7987  		if v_0.Op != Op386FlagLT_UGT {
  7988  			break
  7989  		}
  7990  		v.reset(Op386MOVLconst)
  7991  		v.AuxInt = 1
  7992  		return true
  7993  	}
  7994  	// match: (SETAE (FlagGT_ULT))
  7995  	// cond:
  7996  	// result: (MOVLconst [0])
  7997  	for {
  7998  		v_0 := v.Args[0]
  7999  		if v_0.Op != Op386FlagGT_ULT {
  8000  			break
  8001  		}
  8002  		v.reset(Op386MOVLconst)
  8003  		v.AuxInt = 0
  8004  		return true
  8005  	}
  8006  	// match: (SETAE (FlagGT_UGT))
  8007  	// cond:
  8008  	// result: (MOVLconst [1])
  8009  	for {
  8010  		v_0 := v.Args[0]
  8011  		if v_0.Op != Op386FlagGT_UGT {
  8012  			break
  8013  		}
  8014  		v.reset(Op386MOVLconst)
  8015  		v.AuxInt = 1
  8016  		return true
  8017  	}
  8018  	return false
  8019  }
  8020  func rewriteValue386_Op386SETB(v *Value, config *Config) bool {
  8021  	b := v.Block
  8022  	_ = b
  8023  	// match: (SETB (InvertFlags x))
  8024  	// cond:
  8025  	// result: (SETA x)
  8026  	for {
  8027  		v_0 := v.Args[0]
  8028  		if v_0.Op != Op386InvertFlags {
  8029  			break
  8030  		}
  8031  		x := v_0.Args[0]
  8032  		v.reset(Op386SETA)
  8033  		v.AddArg(x)
  8034  		return true
  8035  	}
  8036  	// match: (SETB (FlagEQ))
  8037  	// cond:
  8038  	// result: (MOVLconst [0])
  8039  	for {
  8040  		v_0 := v.Args[0]
  8041  		if v_0.Op != Op386FlagEQ {
  8042  			break
  8043  		}
  8044  		v.reset(Op386MOVLconst)
  8045  		v.AuxInt = 0
  8046  		return true
  8047  	}
  8048  	// match: (SETB (FlagLT_ULT))
  8049  	// cond:
  8050  	// result: (MOVLconst [1])
  8051  	for {
  8052  		v_0 := v.Args[0]
  8053  		if v_0.Op != Op386FlagLT_ULT {
  8054  			break
  8055  		}
  8056  		v.reset(Op386MOVLconst)
  8057  		v.AuxInt = 1
  8058  		return true
  8059  	}
  8060  	// match: (SETB (FlagLT_UGT))
  8061  	// cond:
  8062  	// result: (MOVLconst [0])
  8063  	for {
  8064  		v_0 := v.Args[0]
  8065  		if v_0.Op != Op386FlagLT_UGT {
  8066  			break
  8067  		}
  8068  		v.reset(Op386MOVLconst)
  8069  		v.AuxInt = 0
  8070  		return true
  8071  	}
  8072  	// match: (SETB (FlagGT_ULT))
  8073  	// cond:
  8074  	// result: (MOVLconst [1])
  8075  	for {
  8076  		v_0 := v.Args[0]
  8077  		if v_0.Op != Op386FlagGT_ULT {
  8078  			break
  8079  		}
  8080  		v.reset(Op386MOVLconst)
  8081  		v.AuxInt = 1
  8082  		return true
  8083  	}
  8084  	// match: (SETB (FlagGT_UGT))
  8085  	// cond:
  8086  	// result: (MOVLconst [0])
  8087  	for {
  8088  		v_0 := v.Args[0]
  8089  		if v_0.Op != Op386FlagGT_UGT {
  8090  			break
  8091  		}
  8092  		v.reset(Op386MOVLconst)
  8093  		v.AuxInt = 0
  8094  		return true
  8095  	}
  8096  	return false
  8097  }
  8098  func rewriteValue386_Op386SETBE(v *Value, config *Config) bool {
  8099  	b := v.Block
  8100  	_ = b
  8101  	// match: (SETBE (InvertFlags x))
  8102  	// cond:
  8103  	// result: (SETAE x)
  8104  	for {
  8105  		v_0 := v.Args[0]
  8106  		if v_0.Op != Op386InvertFlags {
  8107  			break
  8108  		}
  8109  		x := v_0.Args[0]
  8110  		v.reset(Op386SETAE)
  8111  		v.AddArg(x)
  8112  		return true
  8113  	}
  8114  	// match: (SETBE (FlagEQ))
  8115  	// cond:
  8116  	// result: (MOVLconst [1])
  8117  	for {
  8118  		v_0 := v.Args[0]
  8119  		if v_0.Op != Op386FlagEQ {
  8120  			break
  8121  		}
  8122  		v.reset(Op386MOVLconst)
  8123  		v.AuxInt = 1
  8124  		return true
  8125  	}
  8126  	// match: (SETBE (FlagLT_ULT))
  8127  	// cond:
  8128  	// result: (MOVLconst [1])
  8129  	for {
  8130  		v_0 := v.Args[0]
  8131  		if v_0.Op != Op386FlagLT_ULT {
  8132  			break
  8133  		}
  8134  		v.reset(Op386MOVLconst)
  8135  		v.AuxInt = 1
  8136  		return true
  8137  	}
  8138  	// match: (SETBE (FlagLT_UGT))
  8139  	// cond:
  8140  	// result: (MOVLconst [0])
  8141  	for {
  8142  		v_0 := v.Args[0]
  8143  		if v_0.Op != Op386FlagLT_UGT {
  8144  			break
  8145  		}
  8146  		v.reset(Op386MOVLconst)
  8147  		v.AuxInt = 0
  8148  		return true
  8149  	}
  8150  	// match: (SETBE (FlagGT_ULT))
  8151  	// cond:
  8152  	// result: (MOVLconst [1])
  8153  	for {
  8154  		v_0 := v.Args[0]
  8155  		if v_0.Op != Op386FlagGT_ULT {
  8156  			break
  8157  		}
  8158  		v.reset(Op386MOVLconst)
  8159  		v.AuxInt = 1
  8160  		return true
  8161  	}
  8162  	// match: (SETBE (FlagGT_UGT))
  8163  	// cond:
  8164  	// result: (MOVLconst [0])
  8165  	for {
  8166  		v_0 := v.Args[0]
  8167  		if v_0.Op != Op386FlagGT_UGT {
  8168  			break
  8169  		}
  8170  		v.reset(Op386MOVLconst)
  8171  		v.AuxInt = 0
  8172  		return true
  8173  	}
  8174  	return false
  8175  }
  8176  func rewriteValue386_Op386SETEQ(v *Value, config *Config) bool {
  8177  	b := v.Block
  8178  	_ = b
  8179  	// match: (SETEQ (InvertFlags x))
  8180  	// cond:
  8181  	// result: (SETEQ x)
  8182  	for {
  8183  		v_0 := v.Args[0]
  8184  		if v_0.Op != Op386InvertFlags {
  8185  			break
  8186  		}
  8187  		x := v_0.Args[0]
  8188  		v.reset(Op386SETEQ)
  8189  		v.AddArg(x)
  8190  		return true
  8191  	}
  8192  	// match: (SETEQ (FlagEQ))
  8193  	// cond:
  8194  	// result: (MOVLconst [1])
  8195  	for {
  8196  		v_0 := v.Args[0]
  8197  		if v_0.Op != Op386FlagEQ {
  8198  			break
  8199  		}
  8200  		v.reset(Op386MOVLconst)
  8201  		v.AuxInt = 1
  8202  		return true
  8203  	}
  8204  	// match: (SETEQ (FlagLT_ULT))
  8205  	// cond:
  8206  	// result: (MOVLconst [0])
  8207  	for {
  8208  		v_0 := v.Args[0]
  8209  		if v_0.Op != Op386FlagLT_ULT {
  8210  			break
  8211  		}
  8212  		v.reset(Op386MOVLconst)
  8213  		v.AuxInt = 0
  8214  		return true
  8215  	}
  8216  	// match: (SETEQ (FlagLT_UGT))
  8217  	// cond:
  8218  	// result: (MOVLconst [0])
  8219  	for {
  8220  		v_0 := v.Args[0]
  8221  		if v_0.Op != Op386FlagLT_UGT {
  8222  			break
  8223  		}
  8224  		v.reset(Op386MOVLconst)
  8225  		v.AuxInt = 0
  8226  		return true
  8227  	}
  8228  	// match: (SETEQ (FlagGT_ULT))
  8229  	// cond:
  8230  	// result: (MOVLconst [0])
  8231  	for {
  8232  		v_0 := v.Args[0]
  8233  		if v_0.Op != Op386FlagGT_ULT {
  8234  			break
  8235  		}
  8236  		v.reset(Op386MOVLconst)
  8237  		v.AuxInt = 0
  8238  		return true
  8239  	}
  8240  	// match: (SETEQ (FlagGT_UGT))
  8241  	// cond:
  8242  	// result: (MOVLconst [0])
  8243  	for {
  8244  		v_0 := v.Args[0]
  8245  		if v_0.Op != Op386FlagGT_UGT {
  8246  			break
  8247  		}
  8248  		v.reset(Op386MOVLconst)
  8249  		v.AuxInt = 0
  8250  		return true
  8251  	}
  8252  	return false
  8253  }
  8254  func rewriteValue386_Op386SETG(v *Value, config *Config) bool {
  8255  	b := v.Block
  8256  	_ = b
  8257  	// match: (SETG (InvertFlags x))
  8258  	// cond:
  8259  	// result: (SETL x)
  8260  	for {
  8261  		v_0 := v.Args[0]
  8262  		if v_0.Op != Op386InvertFlags {
  8263  			break
  8264  		}
  8265  		x := v_0.Args[0]
  8266  		v.reset(Op386SETL)
  8267  		v.AddArg(x)
  8268  		return true
  8269  	}
  8270  	// match: (SETG (FlagEQ))
  8271  	// cond:
  8272  	// result: (MOVLconst [0])
  8273  	for {
  8274  		v_0 := v.Args[0]
  8275  		if v_0.Op != Op386FlagEQ {
  8276  			break
  8277  		}
  8278  		v.reset(Op386MOVLconst)
  8279  		v.AuxInt = 0
  8280  		return true
  8281  	}
  8282  	// match: (SETG (FlagLT_ULT))
  8283  	// cond:
  8284  	// result: (MOVLconst [0])
  8285  	for {
  8286  		v_0 := v.Args[0]
  8287  		if v_0.Op != Op386FlagLT_ULT {
  8288  			break
  8289  		}
  8290  		v.reset(Op386MOVLconst)
  8291  		v.AuxInt = 0
  8292  		return true
  8293  	}
  8294  	// match: (SETG (FlagLT_UGT))
  8295  	// cond:
  8296  	// result: (MOVLconst [0])
  8297  	for {
  8298  		v_0 := v.Args[0]
  8299  		if v_0.Op != Op386FlagLT_UGT {
  8300  			break
  8301  		}
  8302  		v.reset(Op386MOVLconst)
  8303  		v.AuxInt = 0
  8304  		return true
  8305  	}
  8306  	// match: (SETG (FlagGT_ULT))
  8307  	// cond:
  8308  	// result: (MOVLconst [1])
  8309  	for {
  8310  		v_0 := v.Args[0]
  8311  		if v_0.Op != Op386FlagGT_ULT {
  8312  			break
  8313  		}
  8314  		v.reset(Op386MOVLconst)
  8315  		v.AuxInt = 1
  8316  		return true
  8317  	}
  8318  	// match: (SETG (FlagGT_UGT))
  8319  	// cond:
  8320  	// result: (MOVLconst [1])
  8321  	for {
  8322  		v_0 := v.Args[0]
  8323  		if v_0.Op != Op386FlagGT_UGT {
  8324  			break
  8325  		}
  8326  		v.reset(Op386MOVLconst)
  8327  		v.AuxInt = 1
  8328  		return true
  8329  	}
  8330  	return false
  8331  }
  8332  func rewriteValue386_Op386SETGE(v *Value, config *Config) bool {
  8333  	b := v.Block
  8334  	_ = b
  8335  	// match: (SETGE (InvertFlags x))
  8336  	// cond:
  8337  	// result: (SETLE x)
  8338  	for {
  8339  		v_0 := v.Args[0]
  8340  		if v_0.Op != Op386InvertFlags {
  8341  			break
  8342  		}
  8343  		x := v_0.Args[0]
  8344  		v.reset(Op386SETLE)
  8345  		v.AddArg(x)
  8346  		return true
  8347  	}
  8348  	// match: (SETGE (FlagEQ))
  8349  	// cond:
  8350  	// result: (MOVLconst [1])
  8351  	for {
  8352  		v_0 := v.Args[0]
  8353  		if v_0.Op != Op386FlagEQ {
  8354  			break
  8355  		}
  8356  		v.reset(Op386MOVLconst)
  8357  		v.AuxInt = 1
  8358  		return true
  8359  	}
  8360  	// match: (SETGE (FlagLT_ULT))
  8361  	// cond:
  8362  	// result: (MOVLconst [0])
  8363  	for {
  8364  		v_0 := v.Args[0]
  8365  		if v_0.Op != Op386FlagLT_ULT {
  8366  			break
  8367  		}
  8368  		v.reset(Op386MOVLconst)
  8369  		v.AuxInt = 0
  8370  		return true
  8371  	}
  8372  	// match: (SETGE (FlagLT_UGT))
  8373  	// cond:
  8374  	// result: (MOVLconst [0])
  8375  	for {
  8376  		v_0 := v.Args[0]
  8377  		if v_0.Op != Op386FlagLT_UGT {
  8378  			break
  8379  		}
  8380  		v.reset(Op386MOVLconst)
  8381  		v.AuxInt = 0
  8382  		return true
  8383  	}
  8384  	// match: (SETGE (FlagGT_ULT))
  8385  	// cond:
  8386  	// result: (MOVLconst [1])
  8387  	for {
  8388  		v_0 := v.Args[0]
  8389  		if v_0.Op != Op386FlagGT_ULT {
  8390  			break
  8391  		}
  8392  		v.reset(Op386MOVLconst)
  8393  		v.AuxInt = 1
  8394  		return true
  8395  	}
  8396  	// match: (SETGE (FlagGT_UGT))
  8397  	// cond:
  8398  	// result: (MOVLconst [1])
  8399  	for {
  8400  		v_0 := v.Args[0]
  8401  		if v_0.Op != Op386FlagGT_UGT {
  8402  			break
  8403  		}
  8404  		v.reset(Op386MOVLconst)
  8405  		v.AuxInt = 1
  8406  		return true
  8407  	}
  8408  	return false
  8409  }
  8410  func rewriteValue386_Op386SETL(v *Value, config *Config) bool {
  8411  	b := v.Block
  8412  	_ = b
  8413  	// match: (SETL (InvertFlags x))
  8414  	// cond:
  8415  	// result: (SETG x)
  8416  	for {
  8417  		v_0 := v.Args[0]
  8418  		if v_0.Op != Op386InvertFlags {
  8419  			break
  8420  		}
  8421  		x := v_0.Args[0]
  8422  		v.reset(Op386SETG)
  8423  		v.AddArg(x)
  8424  		return true
  8425  	}
  8426  	// match: (SETL (FlagEQ))
  8427  	// cond:
  8428  	// result: (MOVLconst [0])
  8429  	for {
  8430  		v_0 := v.Args[0]
  8431  		if v_0.Op != Op386FlagEQ {
  8432  			break
  8433  		}
  8434  		v.reset(Op386MOVLconst)
  8435  		v.AuxInt = 0
  8436  		return true
  8437  	}
  8438  	// match: (SETL (FlagLT_ULT))
  8439  	// cond:
  8440  	// result: (MOVLconst [1])
  8441  	for {
  8442  		v_0 := v.Args[0]
  8443  		if v_0.Op != Op386FlagLT_ULT {
  8444  			break
  8445  		}
  8446  		v.reset(Op386MOVLconst)
  8447  		v.AuxInt = 1
  8448  		return true
  8449  	}
  8450  	// match: (SETL (FlagLT_UGT))
  8451  	// cond:
  8452  	// result: (MOVLconst [1])
  8453  	for {
  8454  		v_0 := v.Args[0]
  8455  		if v_0.Op != Op386FlagLT_UGT {
  8456  			break
  8457  		}
  8458  		v.reset(Op386MOVLconst)
  8459  		v.AuxInt = 1
  8460  		return true
  8461  	}
  8462  	// match: (SETL (FlagGT_ULT))
  8463  	// cond:
  8464  	// result: (MOVLconst [0])
  8465  	for {
  8466  		v_0 := v.Args[0]
  8467  		if v_0.Op != Op386FlagGT_ULT {
  8468  			break
  8469  		}
  8470  		v.reset(Op386MOVLconst)
  8471  		v.AuxInt = 0
  8472  		return true
  8473  	}
  8474  	// match: (SETL (FlagGT_UGT))
  8475  	// cond:
  8476  	// result: (MOVLconst [0])
  8477  	for {
  8478  		v_0 := v.Args[0]
  8479  		if v_0.Op != Op386FlagGT_UGT {
  8480  			break
  8481  		}
  8482  		v.reset(Op386MOVLconst)
  8483  		v.AuxInt = 0
  8484  		return true
  8485  	}
  8486  	return false
  8487  }
  8488  func rewriteValue386_Op386SETLE(v *Value, config *Config) bool {
  8489  	b := v.Block
  8490  	_ = b
  8491  	// match: (SETLE (InvertFlags x))
  8492  	// cond:
  8493  	// result: (SETGE x)
  8494  	for {
  8495  		v_0 := v.Args[0]
  8496  		if v_0.Op != Op386InvertFlags {
  8497  			break
  8498  		}
  8499  		x := v_0.Args[0]
  8500  		v.reset(Op386SETGE)
  8501  		v.AddArg(x)
  8502  		return true
  8503  	}
  8504  	// match: (SETLE (FlagEQ))
  8505  	// cond:
  8506  	// result: (MOVLconst [1])
  8507  	for {
  8508  		v_0 := v.Args[0]
  8509  		if v_0.Op != Op386FlagEQ {
  8510  			break
  8511  		}
  8512  		v.reset(Op386MOVLconst)
  8513  		v.AuxInt = 1
  8514  		return true
  8515  	}
  8516  	// match: (SETLE (FlagLT_ULT))
  8517  	// cond:
  8518  	// result: (MOVLconst [1])
  8519  	for {
  8520  		v_0 := v.Args[0]
  8521  		if v_0.Op != Op386FlagLT_ULT {
  8522  			break
  8523  		}
  8524  		v.reset(Op386MOVLconst)
  8525  		v.AuxInt = 1
  8526  		return true
  8527  	}
  8528  	// match: (SETLE (FlagLT_UGT))
  8529  	// cond:
  8530  	// result: (MOVLconst [1])
  8531  	for {
  8532  		v_0 := v.Args[0]
  8533  		if v_0.Op != Op386FlagLT_UGT {
  8534  			break
  8535  		}
  8536  		v.reset(Op386MOVLconst)
  8537  		v.AuxInt = 1
  8538  		return true
  8539  	}
  8540  	// match: (SETLE (FlagGT_ULT))
  8541  	// cond:
  8542  	// result: (MOVLconst [0])
  8543  	for {
  8544  		v_0 := v.Args[0]
  8545  		if v_0.Op != Op386FlagGT_ULT {
  8546  			break
  8547  		}
  8548  		v.reset(Op386MOVLconst)
  8549  		v.AuxInt = 0
  8550  		return true
  8551  	}
  8552  	// match: (SETLE (FlagGT_UGT))
  8553  	// cond:
  8554  	// result: (MOVLconst [0])
  8555  	for {
  8556  		v_0 := v.Args[0]
  8557  		if v_0.Op != Op386FlagGT_UGT {
  8558  			break
  8559  		}
  8560  		v.reset(Op386MOVLconst)
  8561  		v.AuxInt = 0
  8562  		return true
  8563  	}
  8564  	return false
  8565  }
  8566  func rewriteValue386_Op386SETNE(v *Value, config *Config) bool {
  8567  	b := v.Block
  8568  	_ = b
  8569  	// match: (SETNE (InvertFlags x))
  8570  	// cond:
  8571  	// result: (SETNE x)
  8572  	for {
  8573  		v_0 := v.Args[0]
  8574  		if v_0.Op != Op386InvertFlags {
  8575  			break
  8576  		}
  8577  		x := v_0.Args[0]
  8578  		v.reset(Op386SETNE)
  8579  		v.AddArg(x)
  8580  		return true
  8581  	}
  8582  	// match: (SETNE (FlagEQ))
  8583  	// cond:
  8584  	// result: (MOVLconst [0])
  8585  	for {
  8586  		v_0 := v.Args[0]
  8587  		if v_0.Op != Op386FlagEQ {
  8588  			break
  8589  		}
  8590  		v.reset(Op386MOVLconst)
  8591  		v.AuxInt = 0
  8592  		return true
  8593  	}
  8594  	// match: (SETNE (FlagLT_ULT))
  8595  	// cond:
  8596  	// result: (MOVLconst [1])
  8597  	for {
  8598  		v_0 := v.Args[0]
  8599  		if v_0.Op != Op386FlagLT_ULT {
  8600  			break
  8601  		}
  8602  		v.reset(Op386MOVLconst)
  8603  		v.AuxInt = 1
  8604  		return true
  8605  	}
  8606  	// match: (SETNE (FlagLT_UGT))
  8607  	// cond:
  8608  	// result: (MOVLconst [1])
  8609  	for {
  8610  		v_0 := v.Args[0]
  8611  		if v_0.Op != Op386FlagLT_UGT {
  8612  			break
  8613  		}
  8614  		v.reset(Op386MOVLconst)
  8615  		v.AuxInt = 1
  8616  		return true
  8617  	}
  8618  	// match: (SETNE (FlagGT_ULT))
  8619  	// cond:
  8620  	// result: (MOVLconst [1])
  8621  	for {
  8622  		v_0 := v.Args[0]
  8623  		if v_0.Op != Op386FlagGT_ULT {
  8624  			break
  8625  		}
  8626  		v.reset(Op386MOVLconst)
  8627  		v.AuxInt = 1
  8628  		return true
  8629  	}
  8630  	// match: (SETNE (FlagGT_UGT))
  8631  	// cond:
  8632  	// result: (MOVLconst [1])
  8633  	for {
  8634  		v_0 := v.Args[0]
  8635  		if v_0.Op != Op386FlagGT_UGT {
  8636  			break
  8637  		}
  8638  		v.reset(Op386MOVLconst)
  8639  		v.AuxInt = 1
  8640  		return true
  8641  	}
  8642  	return false
  8643  }
  8644  func rewriteValue386_Op386SHLL(v *Value, config *Config) bool {
  8645  	b := v.Block
  8646  	_ = b
  8647  	// match: (SHLL x (MOVLconst [c]))
  8648  	// cond:
  8649  	// result: (SHLLconst [c&31] x)
  8650  	for {
  8651  		x := v.Args[0]
  8652  		v_1 := v.Args[1]
  8653  		if v_1.Op != Op386MOVLconst {
  8654  			break
  8655  		}
  8656  		c := v_1.AuxInt
  8657  		v.reset(Op386SHLLconst)
  8658  		v.AuxInt = c & 31
  8659  		v.AddArg(x)
  8660  		return true
  8661  	}
  8662  	// match: (SHLL x (MOVLconst [c]))
  8663  	// cond:
  8664  	// result: (SHLLconst [c&31] x)
  8665  	for {
  8666  		x := v.Args[0]
  8667  		v_1 := v.Args[1]
  8668  		if v_1.Op != Op386MOVLconst {
  8669  			break
  8670  		}
  8671  		c := v_1.AuxInt
  8672  		v.reset(Op386SHLLconst)
  8673  		v.AuxInt = c & 31
  8674  		v.AddArg(x)
  8675  		return true
  8676  	}
  8677  	// match: (SHLL x (ANDLconst [31] y))
  8678  	// cond:
  8679  	// result: (SHLL x y)
  8680  	for {
  8681  		x := v.Args[0]
  8682  		v_1 := v.Args[1]
  8683  		if v_1.Op != Op386ANDLconst {
  8684  			break
  8685  		}
  8686  		if v_1.AuxInt != 31 {
  8687  			break
  8688  		}
  8689  		y := v_1.Args[0]
  8690  		v.reset(Op386SHLL)
  8691  		v.AddArg(x)
  8692  		v.AddArg(y)
  8693  		return true
  8694  	}
  8695  	return false
  8696  }
  8697  func rewriteValue386_Op386SHRB(v *Value, config *Config) bool {
  8698  	b := v.Block
  8699  	_ = b
  8700  	// match: (SHRB x (MOVLconst [c]))
  8701  	// cond:
  8702  	// result: (SHRBconst [c&31] x)
  8703  	for {
  8704  		x := v.Args[0]
  8705  		v_1 := v.Args[1]
  8706  		if v_1.Op != Op386MOVLconst {
  8707  			break
  8708  		}
  8709  		c := v_1.AuxInt
  8710  		v.reset(Op386SHRBconst)
  8711  		v.AuxInt = c & 31
  8712  		v.AddArg(x)
  8713  		return true
  8714  	}
  8715  	// match: (SHRB x (MOVLconst [c]))
  8716  	// cond:
  8717  	// result: (SHRBconst [c&31] x)
  8718  	for {
  8719  		x := v.Args[0]
  8720  		v_1 := v.Args[1]
  8721  		if v_1.Op != Op386MOVLconst {
  8722  			break
  8723  		}
  8724  		c := v_1.AuxInt
  8725  		v.reset(Op386SHRBconst)
  8726  		v.AuxInt = c & 31
  8727  		v.AddArg(x)
  8728  		return true
  8729  	}
  8730  	return false
  8731  }
  8732  func rewriteValue386_Op386SHRL(v *Value, config *Config) bool {
  8733  	b := v.Block
  8734  	_ = b
  8735  	// match: (SHRL x (MOVLconst [c]))
  8736  	// cond:
  8737  	// result: (SHRLconst [c&31] x)
  8738  	for {
  8739  		x := v.Args[0]
  8740  		v_1 := v.Args[1]
  8741  		if v_1.Op != Op386MOVLconst {
  8742  			break
  8743  		}
  8744  		c := v_1.AuxInt
  8745  		v.reset(Op386SHRLconst)
  8746  		v.AuxInt = c & 31
  8747  		v.AddArg(x)
  8748  		return true
  8749  	}
  8750  	// match: (SHRL x (MOVLconst [c]))
  8751  	// cond:
  8752  	// result: (SHRLconst [c&31] x)
  8753  	for {
  8754  		x := v.Args[0]
  8755  		v_1 := v.Args[1]
  8756  		if v_1.Op != Op386MOVLconst {
  8757  			break
  8758  		}
  8759  		c := v_1.AuxInt
  8760  		v.reset(Op386SHRLconst)
  8761  		v.AuxInt = c & 31
  8762  		v.AddArg(x)
  8763  		return true
  8764  	}
  8765  	// match: (SHRL x (ANDLconst [31] y))
  8766  	// cond:
  8767  	// result: (SHRL x y)
  8768  	for {
  8769  		x := v.Args[0]
  8770  		v_1 := v.Args[1]
  8771  		if v_1.Op != Op386ANDLconst {
  8772  			break
  8773  		}
  8774  		if v_1.AuxInt != 31 {
  8775  			break
  8776  		}
  8777  		y := v_1.Args[0]
  8778  		v.reset(Op386SHRL)
  8779  		v.AddArg(x)
  8780  		v.AddArg(y)
  8781  		return true
  8782  	}
  8783  	return false
  8784  }
  8785  func rewriteValue386_Op386SHRW(v *Value, config *Config) bool {
  8786  	b := v.Block
  8787  	_ = b
  8788  	// match: (SHRW x (MOVLconst [c]))
  8789  	// cond:
  8790  	// result: (SHRWconst [c&31] x)
  8791  	for {
  8792  		x := v.Args[0]
  8793  		v_1 := v.Args[1]
  8794  		if v_1.Op != Op386MOVLconst {
  8795  			break
  8796  		}
  8797  		c := v_1.AuxInt
  8798  		v.reset(Op386SHRWconst)
  8799  		v.AuxInt = c & 31
  8800  		v.AddArg(x)
  8801  		return true
  8802  	}
  8803  	// match: (SHRW x (MOVLconst [c]))
  8804  	// cond:
  8805  	// result: (SHRWconst [c&31] x)
  8806  	for {
  8807  		x := v.Args[0]
  8808  		v_1 := v.Args[1]
  8809  		if v_1.Op != Op386MOVLconst {
  8810  			break
  8811  		}
  8812  		c := v_1.AuxInt
  8813  		v.reset(Op386SHRWconst)
  8814  		v.AuxInt = c & 31
  8815  		v.AddArg(x)
  8816  		return true
  8817  	}
  8818  	return false
  8819  }
  8820  func rewriteValue386_Op386SUBL(v *Value, config *Config) bool {
  8821  	b := v.Block
  8822  	_ = b
  8823  	// match: (SUBL x (MOVLconst [c]))
  8824  	// cond:
  8825  	// result: (SUBLconst x [c])
  8826  	for {
  8827  		x := v.Args[0]
  8828  		v_1 := v.Args[1]
  8829  		if v_1.Op != Op386MOVLconst {
  8830  			break
  8831  		}
  8832  		c := v_1.AuxInt
  8833  		v.reset(Op386SUBLconst)
  8834  		v.AuxInt = c
  8835  		v.AddArg(x)
  8836  		return true
  8837  	}
  8838  	// match: (SUBL (MOVLconst [c]) x)
  8839  	// cond:
  8840  	// result: (NEGL (SUBLconst <v.Type> x [c]))
  8841  	for {
  8842  		v_0 := v.Args[0]
  8843  		if v_0.Op != Op386MOVLconst {
  8844  			break
  8845  		}
  8846  		c := v_0.AuxInt
  8847  		x := v.Args[1]
  8848  		v.reset(Op386NEGL)
  8849  		v0 := b.NewValue0(v.Line, Op386SUBLconst, v.Type)
  8850  		v0.AuxInt = c
  8851  		v0.AddArg(x)
  8852  		v.AddArg(v0)
  8853  		return true
  8854  	}
  8855  	// match: (SUBL x x)
  8856  	// cond:
  8857  	// result: (MOVLconst [0])
  8858  	for {
  8859  		x := v.Args[0]
  8860  		if x != v.Args[1] {
  8861  			break
  8862  		}
  8863  		v.reset(Op386MOVLconst)
  8864  		v.AuxInt = 0
  8865  		return true
  8866  	}
  8867  	return false
  8868  }
  8869  func rewriteValue386_Op386SUBLcarry(v *Value, config *Config) bool {
  8870  	b := v.Block
  8871  	_ = b
  8872  	// match: (SUBLcarry x (MOVLconst [c]))
  8873  	// cond:
  8874  	// result: (SUBLconstcarry [c] x)
  8875  	for {
  8876  		x := v.Args[0]
  8877  		v_1 := v.Args[1]
  8878  		if v_1.Op != Op386MOVLconst {
  8879  			break
  8880  		}
  8881  		c := v_1.AuxInt
  8882  		v.reset(Op386SUBLconstcarry)
  8883  		v.AuxInt = c
  8884  		v.AddArg(x)
  8885  		return true
  8886  	}
  8887  	return false
  8888  }
  8889  func rewriteValue386_Op386SUBLconst(v *Value, config *Config) bool {
  8890  	b := v.Block
  8891  	_ = b
  8892  	// match: (SUBLconst [c] x)
  8893  	// cond: int32(c) == 0
  8894  	// result: x
  8895  	for {
  8896  		c := v.AuxInt
  8897  		x := v.Args[0]
  8898  		if !(int32(c) == 0) {
  8899  			break
  8900  		}
  8901  		v.reset(OpCopy)
  8902  		v.Type = x.Type
  8903  		v.AddArg(x)
  8904  		return true
  8905  	}
  8906  	// match: (SUBLconst [c] x)
  8907  	// cond:
  8908  	// result: (ADDLconst [int64(int32(-c))] x)
  8909  	for {
  8910  		c := v.AuxInt
  8911  		x := v.Args[0]
  8912  		v.reset(Op386ADDLconst)
  8913  		v.AuxInt = int64(int32(-c))
  8914  		v.AddArg(x)
  8915  		return true
  8916  	}
  8917  }
  8918  func rewriteValue386_Op386XORL(v *Value, config *Config) bool {
  8919  	b := v.Block
  8920  	_ = b
  8921  	// match: (XORL x (MOVLconst [c]))
  8922  	// cond:
  8923  	// result: (XORLconst [c] x)
  8924  	for {
  8925  		x := v.Args[0]
  8926  		v_1 := v.Args[1]
  8927  		if v_1.Op != Op386MOVLconst {
  8928  			break
  8929  		}
  8930  		c := v_1.AuxInt
  8931  		v.reset(Op386XORLconst)
  8932  		v.AuxInt = c
  8933  		v.AddArg(x)
  8934  		return true
  8935  	}
  8936  	// match: (XORL (MOVLconst [c]) x)
  8937  	// cond:
  8938  	// result: (XORLconst [c] x)
  8939  	for {
  8940  		v_0 := v.Args[0]
  8941  		if v_0.Op != Op386MOVLconst {
  8942  			break
  8943  		}
  8944  		c := v_0.AuxInt
  8945  		x := v.Args[1]
  8946  		v.reset(Op386XORLconst)
  8947  		v.AuxInt = c
  8948  		v.AddArg(x)
  8949  		return true
  8950  	}
  8951  	// match: (XORL x x)
  8952  	// cond:
  8953  	// result: (MOVLconst [0])
  8954  	for {
  8955  		x := v.Args[0]
  8956  		if x != v.Args[1] {
  8957  			break
  8958  		}
  8959  		v.reset(Op386MOVLconst)
  8960  		v.AuxInt = 0
  8961  		return true
  8962  	}
  8963  	return false
  8964  }
  8965  func rewriteValue386_Op386XORLconst(v *Value, config *Config) bool {
  8966  	b := v.Block
  8967  	_ = b
  8968  	// match: (XORLconst [c] (XORLconst [d] x))
  8969  	// cond:
  8970  	// result: (XORLconst [c ^ d] x)
  8971  	for {
  8972  		c := v.AuxInt
  8973  		v_0 := v.Args[0]
  8974  		if v_0.Op != Op386XORLconst {
  8975  			break
  8976  		}
  8977  		d := v_0.AuxInt
  8978  		x := v_0.Args[0]
  8979  		v.reset(Op386XORLconst)
  8980  		v.AuxInt = c ^ d
  8981  		v.AddArg(x)
  8982  		return true
  8983  	}
  8984  	// match: (XORLconst [c] x)
  8985  	// cond: int32(c)==0
  8986  	// result: x
  8987  	for {
  8988  		c := v.AuxInt
  8989  		x := v.Args[0]
  8990  		if !(int32(c) == 0) {
  8991  			break
  8992  		}
  8993  		v.reset(OpCopy)
  8994  		v.Type = x.Type
  8995  		v.AddArg(x)
  8996  		return true
  8997  	}
  8998  	// match: (XORLconst [c] (MOVLconst [d]))
  8999  	// cond:
  9000  	// result: (MOVLconst [c^d])
  9001  	for {
  9002  		c := v.AuxInt
  9003  		v_0 := v.Args[0]
  9004  		if v_0.Op != Op386MOVLconst {
  9005  			break
  9006  		}
  9007  		d := v_0.AuxInt
  9008  		v.reset(Op386MOVLconst)
  9009  		v.AuxInt = c ^ d
  9010  		return true
  9011  	}
  9012  	return false
  9013  }
  9014  func rewriteValue386_OpAdd16(v *Value, config *Config) bool {
  9015  	b := v.Block
  9016  	_ = b
  9017  	// match: (Add16  x y)
  9018  	// cond:
  9019  	// result: (ADDL  x y)
  9020  	for {
  9021  		x := v.Args[0]
  9022  		y := v.Args[1]
  9023  		v.reset(Op386ADDL)
  9024  		v.AddArg(x)
  9025  		v.AddArg(y)
  9026  		return true
  9027  	}
  9028  }
  9029  func rewriteValue386_OpAdd32(v *Value, config *Config) bool {
  9030  	b := v.Block
  9031  	_ = b
  9032  	// match: (Add32  x y)
  9033  	// cond:
  9034  	// result: (ADDL  x y)
  9035  	for {
  9036  		x := v.Args[0]
  9037  		y := v.Args[1]
  9038  		v.reset(Op386ADDL)
  9039  		v.AddArg(x)
  9040  		v.AddArg(y)
  9041  		return true
  9042  	}
  9043  }
  9044  func rewriteValue386_OpAdd32F(v *Value, config *Config) bool {
  9045  	b := v.Block
  9046  	_ = b
  9047  	// match: (Add32F x y)
  9048  	// cond:
  9049  	// result: (ADDSS x y)
  9050  	for {
  9051  		x := v.Args[0]
  9052  		y := v.Args[1]
  9053  		v.reset(Op386ADDSS)
  9054  		v.AddArg(x)
  9055  		v.AddArg(y)
  9056  		return true
  9057  	}
  9058  }
  9059  func rewriteValue386_OpAdd32carry(v *Value, config *Config) bool {
  9060  	b := v.Block
  9061  	_ = b
  9062  	// match: (Add32carry x y)
  9063  	// cond:
  9064  	// result: (ADDLcarry x y)
  9065  	for {
  9066  		x := v.Args[0]
  9067  		y := v.Args[1]
  9068  		v.reset(Op386ADDLcarry)
  9069  		v.AddArg(x)
  9070  		v.AddArg(y)
  9071  		return true
  9072  	}
  9073  }
  9074  func rewriteValue386_OpAdd32withcarry(v *Value, config *Config) bool {
  9075  	b := v.Block
  9076  	_ = b
  9077  	// match: (Add32withcarry x y c)
  9078  	// cond:
  9079  	// result: (ADCL x y c)
  9080  	for {
  9081  		x := v.Args[0]
  9082  		y := v.Args[1]
  9083  		c := v.Args[2]
  9084  		v.reset(Op386ADCL)
  9085  		v.AddArg(x)
  9086  		v.AddArg(y)
  9087  		v.AddArg(c)
  9088  		return true
  9089  	}
  9090  }
  9091  func rewriteValue386_OpAdd64F(v *Value, config *Config) bool {
  9092  	b := v.Block
  9093  	_ = b
  9094  	// match: (Add64F x y)
  9095  	// cond:
  9096  	// result: (ADDSD x y)
  9097  	for {
  9098  		x := v.Args[0]
  9099  		y := v.Args[1]
  9100  		v.reset(Op386ADDSD)
  9101  		v.AddArg(x)
  9102  		v.AddArg(y)
  9103  		return true
  9104  	}
  9105  }
  9106  func rewriteValue386_OpAdd8(v *Value, config *Config) bool {
  9107  	b := v.Block
  9108  	_ = b
  9109  	// match: (Add8   x y)
  9110  	// cond:
  9111  	// result: (ADDL  x y)
  9112  	for {
  9113  		x := v.Args[0]
  9114  		y := v.Args[1]
  9115  		v.reset(Op386ADDL)
  9116  		v.AddArg(x)
  9117  		v.AddArg(y)
  9118  		return true
  9119  	}
  9120  }
  9121  func rewriteValue386_OpAddPtr(v *Value, config *Config) bool {
  9122  	b := v.Block
  9123  	_ = b
  9124  	// match: (AddPtr x y)
  9125  	// cond:
  9126  	// result: (ADDL  x y)
  9127  	for {
  9128  		x := v.Args[0]
  9129  		y := v.Args[1]
  9130  		v.reset(Op386ADDL)
  9131  		v.AddArg(x)
  9132  		v.AddArg(y)
  9133  		return true
  9134  	}
  9135  }
  9136  func rewriteValue386_OpAddr(v *Value, config *Config) bool {
  9137  	b := v.Block
  9138  	_ = b
  9139  	// match: (Addr {sym} base)
  9140  	// cond:
  9141  	// result: (LEAL {sym} base)
  9142  	for {
  9143  		sym := v.Aux
  9144  		base := v.Args[0]
  9145  		v.reset(Op386LEAL)
  9146  		v.Aux = sym
  9147  		v.AddArg(base)
  9148  		return true
  9149  	}
  9150  }
  9151  func rewriteValue386_OpAnd16(v *Value, config *Config) bool {
  9152  	b := v.Block
  9153  	_ = b
  9154  	// match: (And16 x y)
  9155  	// cond:
  9156  	// result: (ANDL x y)
  9157  	for {
  9158  		x := v.Args[0]
  9159  		y := v.Args[1]
  9160  		v.reset(Op386ANDL)
  9161  		v.AddArg(x)
  9162  		v.AddArg(y)
  9163  		return true
  9164  	}
  9165  }
  9166  func rewriteValue386_OpAnd32(v *Value, config *Config) bool {
  9167  	b := v.Block
  9168  	_ = b
  9169  	// match: (And32 x y)
  9170  	// cond:
  9171  	// result: (ANDL x y)
  9172  	for {
  9173  		x := v.Args[0]
  9174  		y := v.Args[1]
  9175  		v.reset(Op386ANDL)
  9176  		v.AddArg(x)
  9177  		v.AddArg(y)
  9178  		return true
  9179  	}
  9180  }
  9181  func rewriteValue386_OpAnd8(v *Value, config *Config) bool {
  9182  	b := v.Block
  9183  	_ = b
  9184  	// match: (And8  x y)
  9185  	// cond:
  9186  	// result: (ANDL x y)
  9187  	for {
  9188  		x := v.Args[0]
  9189  		y := v.Args[1]
  9190  		v.reset(Op386ANDL)
  9191  		v.AddArg(x)
  9192  		v.AddArg(y)
  9193  		return true
  9194  	}
  9195  }
  9196  func rewriteValue386_OpAndB(v *Value, config *Config) bool {
  9197  	b := v.Block
  9198  	_ = b
  9199  	// match: (AndB x y)
  9200  	// cond:
  9201  	// result: (ANDL x y)
  9202  	for {
  9203  		x := v.Args[0]
  9204  		y := v.Args[1]
  9205  		v.reset(Op386ANDL)
  9206  		v.AddArg(x)
  9207  		v.AddArg(y)
  9208  		return true
  9209  	}
  9210  }
  9211  func rewriteValue386_OpBswap32(v *Value, config *Config) bool {
  9212  	b := v.Block
  9213  	_ = b
  9214  	// match: (Bswap32 x)
  9215  	// cond:
  9216  	// result: (BSWAPL x)
  9217  	for {
  9218  		x := v.Args[0]
  9219  		v.reset(Op386BSWAPL)
  9220  		v.AddArg(x)
  9221  		return true
  9222  	}
  9223  }
  9224  func rewriteValue386_OpClosureCall(v *Value, config *Config) bool {
  9225  	b := v.Block
  9226  	_ = b
  9227  	// match: (ClosureCall [argwid] entry closure mem)
  9228  	// cond:
  9229  	// result: (CALLclosure [argwid] entry closure mem)
  9230  	for {
  9231  		argwid := v.AuxInt
  9232  		entry := v.Args[0]
  9233  		closure := v.Args[1]
  9234  		mem := v.Args[2]
  9235  		v.reset(Op386CALLclosure)
  9236  		v.AuxInt = argwid
  9237  		v.AddArg(entry)
  9238  		v.AddArg(closure)
  9239  		v.AddArg(mem)
  9240  		return true
  9241  	}
  9242  }
  9243  func rewriteValue386_OpCom16(v *Value, config *Config) bool {
  9244  	b := v.Block
  9245  	_ = b
  9246  	// match: (Com16 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_OpCom32(v *Value, config *Config) bool {
  9257  	b := v.Block
  9258  	_ = b
  9259  	// match: (Com32 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_OpCom8(v *Value, config *Config) bool {
  9270  	b := v.Block
  9271  	_ = b
  9272  	// match: (Com8  x)
  9273  	// cond:
  9274  	// result: (NOTL x)
  9275  	for {
  9276  		x := v.Args[0]
  9277  		v.reset(Op386NOTL)
  9278  		v.AddArg(x)
  9279  		return true
  9280  	}
  9281  }
  9282  func rewriteValue386_OpConst16(v *Value, config *Config) bool {
  9283  	b := v.Block
  9284  	_ = b
  9285  	// match: (Const16  [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_OpConst32(v *Value, config *Config) bool {
  9296  	b := v.Block
  9297  	_ = b
  9298  	// match: (Const32  [val])
  9299  	// cond:
  9300  	// result: (MOVLconst [val])
  9301  	for {
  9302  		val := v.AuxInt
  9303  		v.reset(Op386MOVLconst)
  9304  		v.AuxInt = val
  9305  		return true
  9306  	}
  9307  }
  9308  func rewriteValue386_OpConst32F(v *Value, config *Config) bool {
  9309  	b := v.Block
  9310  	_ = b
  9311  	// match: (Const32F [val])
  9312  	// cond:
  9313  	// result: (MOVSSconst [val])
  9314  	for {
  9315  		val := v.AuxInt
  9316  		v.reset(Op386MOVSSconst)
  9317  		v.AuxInt = val
  9318  		return true
  9319  	}
  9320  }
  9321  func rewriteValue386_OpConst64F(v *Value, config *Config) bool {
  9322  	b := v.Block
  9323  	_ = b
  9324  	// match: (Const64F [val])
  9325  	// cond:
  9326  	// result: (MOVSDconst [val])
  9327  	for {
  9328  		val := v.AuxInt
  9329  		v.reset(Op386MOVSDconst)
  9330  		v.AuxInt = val
  9331  		return true
  9332  	}
  9333  }
  9334  func rewriteValue386_OpConst8(v *Value, config *Config) bool {
  9335  	b := v.Block
  9336  	_ = b
  9337  	// match: (Const8   [val])
  9338  	// cond:
  9339  	// result: (MOVLconst [val])
  9340  	for {
  9341  		val := v.AuxInt
  9342  		v.reset(Op386MOVLconst)
  9343  		v.AuxInt = val
  9344  		return true
  9345  	}
  9346  }
  9347  func rewriteValue386_OpConstBool(v *Value, config *Config) bool {
  9348  	b := v.Block
  9349  	_ = b
  9350  	// match: (ConstBool [b])
  9351  	// cond:
  9352  	// result: (MOVLconst [b])
  9353  	for {
  9354  		b := v.AuxInt
  9355  		v.reset(Op386MOVLconst)
  9356  		v.AuxInt = b
  9357  		return true
  9358  	}
  9359  }
  9360  func rewriteValue386_OpConstNil(v *Value, config *Config) bool {
  9361  	b := v.Block
  9362  	_ = b
  9363  	// match: (ConstNil)
  9364  	// cond:
  9365  	// result: (MOVLconst [0])
  9366  	for {
  9367  		v.reset(Op386MOVLconst)
  9368  		v.AuxInt = 0
  9369  		return true
  9370  	}
  9371  }
  9372  func rewriteValue386_OpConvert(v *Value, config *Config) bool {
  9373  	b := v.Block
  9374  	_ = b
  9375  	// match: (Convert <t> x mem)
  9376  	// cond:
  9377  	// result: (MOVLconvert <t> x mem)
  9378  	for {
  9379  		t := v.Type
  9380  		x := v.Args[0]
  9381  		mem := v.Args[1]
  9382  		v.reset(Op386MOVLconvert)
  9383  		v.Type = t
  9384  		v.AddArg(x)
  9385  		v.AddArg(mem)
  9386  		return true
  9387  	}
  9388  }
  9389  func rewriteValue386_OpCvt32Fto32(v *Value, config *Config) bool {
  9390  	b := v.Block
  9391  	_ = b
  9392  	// match: (Cvt32Fto32 x)
  9393  	// cond:
  9394  	// result: (CVTTSS2SL x)
  9395  	for {
  9396  		x := v.Args[0]
  9397  		v.reset(Op386CVTTSS2SL)
  9398  		v.AddArg(x)
  9399  		return true
  9400  	}
  9401  }
  9402  func rewriteValue386_OpCvt32Fto64F(v *Value, config *Config) bool {
  9403  	b := v.Block
  9404  	_ = b
  9405  	// match: (Cvt32Fto64F x)
  9406  	// cond:
  9407  	// result: (CVTSS2SD x)
  9408  	for {
  9409  		x := v.Args[0]
  9410  		v.reset(Op386CVTSS2SD)
  9411  		v.AddArg(x)
  9412  		return true
  9413  	}
  9414  }
  9415  func rewriteValue386_OpCvt32to32F(v *Value, config *Config) bool {
  9416  	b := v.Block
  9417  	_ = b
  9418  	// match: (Cvt32to32F x)
  9419  	// cond:
  9420  	// result: (CVTSL2SS x)
  9421  	for {
  9422  		x := v.Args[0]
  9423  		v.reset(Op386CVTSL2SS)
  9424  		v.AddArg(x)
  9425  		return true
  9426  	}
  9427  }
  9428  func rewriteValue386_OpCvt32to64F(v *Value, config *Config) bool {
  9429  	b := v.Block
  9430  	_ = b
  9431  	// match: (Cvt32to64F x)
  9432  	// cond:
  9433  	// result: (CVTSL2SD x)
  9434  	for {
  9435  		x := v.Args[0]
  9436  		v.reset(Op386CVTSL2SD)
  9437  		v.AddArg(x)
  9438  		return true
  9439  	}
  9440  }
  9441  func rewriteValue386_OpCvt64Fto32(v *Value, config *Config) bool {
  9442  	b := v.Block
  9443  	_ = b
  9444  	// match: (Cvt64Fto32 x)
  9445  	// cond:
  9446  	// result: (CVTTSD2SL x)
  9447  	for {
  9448  		x := v.Args[0]
  9449  		v.reset(Op386CVTTSD2SL)
  9450  		v.AddArg(x)
  9451  		return true
  9452  	}
  9453  }
  9454  func rewriteValue386_OpCvt64Fto32F(v *Value, config *Config) bool {
  9455  	b := v.Block
  9456  	_ = b
  9457  	// match: (Cvt64Fto32F x)
  9458  	// cond:
  9459  	// result: (CVTSD2SS x)
  9460  	for {
  9461  		x := v.Args[0]
  9462  		v.reset(Op386CVTSD2SS)
  9463  		v.AddArg(x)
  9464  		return true
  9465  	}
  9466  }
  9467  func rewriteValue386_OpDeferCall(v *Value, config *Config) bool {
  9468  	b := v.Block
  9469  	_ = b
  9470  	// match: (DeferCall [argwid] mem)
  9471  	// cond:
  9472  	// result: (CALLdefer [argwid] mem)
  9473  	for {
  9474  		argwid := v.AuxInt
  9475  		mem := v.Args[0]
  9476  		v.reset(Op386CALLdefer)
  9477  		v.AuxInt = argwid
  9478  		v.AddArg(mem)
  9479  		return true
  9480  	}
  9481  }
  9482  func rewriteValue386_OpDiv16(v *Value, config *Config) bool {
  9483  	b := v.Block
  9484  	_ = b
  9485  	// match: (Div16  x y)
  9486  	// cond:
  9487  	// result: (DIVW  x y)
  9488  	for {
  9489  		x := v.Args[0]
  9490  		y := v.Args[1]
  9491  		v.reset(Op386DIVW)
  9492  		v.AddArg(x)
  9493  		v.AddArg(y)
  9494  		return true
  9495  	}
  9496  }
  9497  func rewriteValue386_OpDiv16u(v *Value, config *Config) bool {
  9498  	b := v.Block
  9499  	_ = b
  9500  	// match: (Div16u x y)
  9501  	// cond:
  9502  	// result: (DIVWU x y)
  9503  	for {
  9504  		x := v.Args[0]
  9505  		y := v.Args[1]
  9506  		v.reset(Op386DIVWU)
  9507  		v.AddArg(x)
  9508  		v.AddArg(y)
  9509  		return true
  9510  	}
  9511  }
  9512  func rewriteValue386_OpDiv32(v *Value, config *Config) bool {
  9513  	b := v.Block
  9514  	_ = b
  9515  	// match: (Div32  x y)
  9516  	// cond:
  9517  	// result: (DIVL  x y)
  9518  	for {
  9519  		x := v.Args[0]
  9520  		y := v.Args[1]
  9521  		v.reset(Op386DIVL)
  9522  		v.AddArg(x)
  9523  		v.AddArg(y)
  9524  		return true
  9525  	}
  9526  }
  9527  func rewriteValue386_OpDiv32F(v *Value, config *Config) bool {
  9528  	b := v.Block
  9529  	_ = b
  9530  	// match: (Div32F x y)
  9531  	// cond:
  9532  	// result: (DIVSS x y)
  9533  	for {
  9534  		x := v.Args[0]
  9535  		y := v.Args[1]
  9536  		v.reset(Op386DIVSS)
  9537  		v.AddArg(x)
  9538  		v.AddArg(y)
  9539  		return true
  9540  	}
  9541  }
  9542  func rewriteValue386_OpDiv32u(v *Value, config *Config) bool {
  9543  	b := v.Block
  9544  	_ = b
  9545  	// match: (Div32u x y)
  9546  	// cond:
  9547  	// result: (DIVLU x y)
  9548  	for {
  9549  		x := v.Args[0]
  9550  		y := v.Args[1]
  9551  		v.reset(Op386DIVLU)
  9552  		v.AddArg(x)
  9553  		v.AddArg(y)
  9554  		return true
  9555  	}
  9556  }
  9557  func rewriteValue386_OpDiv64F(v *Value, config *Config) bool {
  9558  	b := v.Block
  9559  	_ = b
  9560  	// match: (Div64F x y)
  9561  	// cond:
  9562  	// result: (DIVSD x y)
  9563  	for {
  9564  		x := v.Args[0]
  9565  		y := v.Args[1]
  9566  		v.reset(Op386DIVSD)
  9567  		v.AddArg(x)
  9568  		v.AddArg(y)
  9569  		return true
  9570  	}
  9571  }
  9572  func rewriteValue386_OpDiv8(v *Value, config *Config) bool {
  9573  	b := v.Block
  9574  	_ = b
  9575  	// match: (Div8   x y)
  9576  	// cond:
  9577  	// result: (DIVW  (SignExt8to16 x) (SignExt8to16 y))
  9578  	for {
  9579  		x := v.Args[0]
  9580  		y := v.Args[1]
  9581  		v.reset(Op386DIVW)
  9582  		v0 := b.NewValue0(v.Line, OpSignExt8to16, config.fe.TypeInt16())
  9583  		v0.AddArg(x)
  9584  		v.AddArg(v0)
  9585  		v1 := b.NewValue0(v.Line, OpSignExt8to16, config.fe.TypeInt16())
  9586  		v1.AddArg(y)
  9587  		v.AddArg(v1)
  9588  		return true
  9589  	}
  9590  }
  9591  func rewriteValue386_OpDiv8u(v *Value, config *Config) bool {
  9592  	b := v.Block
  9593  	_ = b
  9594  	// match: (Div8u  x y)
  9595  	// cond:
  9596  	// result: (DIVWU (ZeroExt8to16 x) (ZeroExt8to16 y))
  9597  	for {
  9598  		x := v.Args[0]
  9599  		y := v.Args[1]
  9600  		v.reset(Op386DIVWU)
  9601  		v0 := b.NewValue0(v.Line, OpZeroExt8to16, config.fe.TypeUInt16())
  9602  		v0.AddArg(x)
  9603  		v.AddArg(v0)
  9604  		v1 := b.NewValue0(v.Line, OpZeroExt8to16, config.fe.TypeUInt16())
  9605  		v1.AddArg(y)
  9606  		v.AddArg(v1)
  9607  		return true
  9608  	}
  9609  }
  9610  func rewriteValue386_OpEq16(v *Value, config *Config) bool {
  9611  	b := v.Block
  9612  	_ = b
  9613  	// match: (Eq16  x y)
  9614  	// cond:
  9615  	// result: (SETEQ (CMPW x y))
  9616  	for {
  9617  		x := v.Args[0]
  9618  		y := v.Args[1]
  9619  		v.reset(Op386SETEQ)
  9620  		v0 := b.NewValue0(v.Line, Op386CMPW, TypeFlags)
  9621  		v0.AddArg(x)
  9622  		v0.AddArg(y)
  9623  		v.AddArg(v0)
  9624  		return true
  9625  	}
  9626  }
  9627  func rewriteValue386_OpEq32(v *Value, config *Config) bool {
  9628  	b := v.Block
  9629  	_ = b
  9630  	// match: (Eq32  x y)
  9631  	// cond:
  9632  	// result: (SETEQ (CMPL x y))
  9633  	for {
  9634  		x := v.Args[0]
  9635  		y := v.Args[1]
  9636  		v.reset(Op386SETEQ)
  9637  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
  9638  		v0.AddArg(x)
  9639  		v0.AddArg(y)
  9640  		v.AddArg(v0)
  9641  		return true
  9642  	}
  9643  }
  9644  func rewriteValue386_OpEq32F(v *Value, config *Config) bool {
  9645  	b := v.Block
  9646  	_ = b
  9647  	// match: (Eq32F x y)
  9648  	// cond:
  9649  	// result: (SETEQF (UCOMISS x y))
  9650  	for {
  9651  		x := v.Args[0]
  9652  		y := v.Args[1]
  9653  		v.reset(Op386SETEQF)
  9654  		v0 := b.NewValue0(v.Line, Op386UCOMISS, TypeFlags)
  9655  		v0.AddArg(x)
  9656  		v0.AddArg(y)
  9657  		v.AddArg(v0)
  9658  		return true
  9659  	}
  9660  }
  9661  func rewriteValue386_OpEq64F(v *Value, config *Config) bool {
  9662  	b := v.Block
  9663  	_ = b
  9664  	// match: (Eq64F x y)
  9665  	// cond:
  9666  	// result: (SETEQF (UCOMISD x y))
  9667  	for {
  9668  		x := v.Args[0]
  9669  		y := v.Args[1]
  9670  		v.reset(Op386SETEQF)
  9671  		v0 := b.NewValue0(v.Line, Op386UCOMISD, TypeFlags)
  9672  		v0.AddArg(x)
  9673  		v0.AddArg(y)
  9674  		v.AddArg(v0)
  9675  		return true
  9676  	}
  9677  }
  9678  func rewriteValue386_OpEq8(v *Value, config *Config) bool {
  9679  	b := v.Block
  9680  	_ = b
  9681  	// match: (Eq8   x y)
  9682  	// cond:
  9683  	// result: (SETEQ (CMPB x y))
  9684  	for {
  9685  		x := v.Args[0]
  9686  		y := v.Args[1]
  9687  		v.reset(Op386SETEQ)
  9688  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
  9689  		v0.AddArg(x)
  9690  		v0.AddArg(y)
  9691  		v.AddArg(v0)
  9692  		return true
  9693  	}
  9694  }
  9695  func rewriteValue386_OpEqB(v *Value, config *Config) bool {
  9696  	b := v.Block
  9697  	_ = b
  9698  	// match: (EqB   x y)
  9699  	// cond:
  9700  	// result: (SETEQ (CMPB x y))
  9701  	for {
  9702  		x := v.Args[0]
  9703  		y := v.Args[1]
  9704  		v.reset(Op386SETEQ)
  9705  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
  9706  		v0.AddArg(x)
  9707  		v0.AddArg(y)
  9708  		v.AddArg(v0)
  9709  		return true
  9710  	}
  9711  }
  9712  func rewriteValue386_OpEqPtr(v *Value, config *Config) bool {
  9713  	b := v.Block
  9714  	_ = b
  9715  	// match: (EqPtr x y)
  9716  	// cond:
  9717  	// result: (SETEQ (CMPL x y))
  9718  	for {
  9719  		x := v.Args[0]
  9720  		y := v.Args[1]
  9721  		v.reset(Op386SETEQ)
  9722  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
  9723  		v0.AddArg(x)
  9724  		v0.AddArg(y)
  9725  		v.AddArg(v0)
  9726  		return true
  9727  	}
  9728  }
  9729  func rewriteValue386_OpGeq16(v *Value, config *Config) bool {
  9730  	b := v.Block
  9731  	_ = b
  9732  	// match: (Geq16  x y)
  9733  	// cond:
  9734  	// result: (SETGE (CMPW x y))
  9735  	for {
  9736  		x := v.Args[0]
  9737  		y := v.Args[1]
  9738  		v.reset(Op386SETGE)
  9739  		v0 := b.NewValue0(v.Line, Op386CMPW, TypeFlags)
  9740  		v0.AddArg(x)
  9741  		v0.AddArg(y)
  9742  		v.AddArg(v0)
  9743  		return true
  9744  	}
  9745  }
  9746  func rewriteValue386_OpGeq16U(v *Value, config *Config) bool {
  9747  	b := v.Block
  9748  	_ = b
  9749  	// match: (Geq16U x y)
  9750  	// cond:
  9751  	// result: (SETAE (CMPW x y))
  9752  	for {
  9753  		x := v.Args[0]
  9754  		y := v.Args[1]
  9755  		v.reset(Op386SETAE)
  9756  		v0 := b.NewValue0(v.Line, Op386CMPW, TypeFlags)
  9757  		v0.AddArg(x)
  9758  		v0.AddArg(y)
  9759  		v.AddArg(v0)
  9760  		return true
  9761  	}
  9762  }
  9763  func rewriteValue386_OpGeq32(v *Value, config *Config) bool {
  9764  	b := v.Block
  9765  	_ = b
  9766  	// match: (Geq32  x y)
  9767  	// cond:
  9768  	// result: (SETGE (CMPL x y))
  9769  	for {
  9770  		x := v.Args[0]
  9771  		y := v.Args[1]
  9772  		v.reset(Op386SETGE)
  9773  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
  9774  		v0.AddArg(x)
  9775  		v0.AddArg(y)
  9776  		v.AddArg(v0)
  9777  		return true
  9778  	}
  9779  }
  9780  func rewriteValue386_OpGeq32F(v *Value, config *Config) bool {
  9781  	b := v.Block
  9782  	_ = b
  9783  	// match: (Geq32F x y)
  9784  	// cond:
  9785  	// result: (SETGEF (UCOMISS x y))
  9786  	for {
  9787  		x := v.Args[0]
  9788  		y := v.Args[1]
  9789  		v.reset(Op386SETGEF)
  9790  		v0 := b.NewValue0(v.Line, Op386UCOMISS, TypeFlags)
  9791  		v0.AddArg(x)
  9792  		v0.AddArg(y)
  9793  		v.AddArg(v0)
  9794  		return true
  9795  	}
  9796  }
  9797  func rewriteValue386_OpGeq32U(v *Value, config *Config) bool {
  9798  	b := v.Block
  9799  	_ = b
  9800  	// match: (Geq32U x y)
  9801  	// cond:
  9802  	// result: (SETAE (CMPL x y))
  9803  	for {
  9804  		x := v.Args[0]
  9805  		y := v.Args[1]
  9806  		v.reset(Op386SETAE)
  9807  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
  9808  		v0.AddArg(x)
  9809  		v0.AddArg(y)
  9810  		v.AddArg(v0)
  9811  		return true
  9812  	}
  9813  }
  9814  func rewriteValue386_OpGeq64F(v *Value, config *Config) bool {
  9815  	b := v.Block
  9816  	_ = b
  9817  	// match: (Geq64F x y)
  9818  	// cond:
  9819  	// result: (SETGEF (UCOMISD x y))
  9820  	for {
  9821  		x := v.Args[0]
  9822  		y := v.Args[1]
  9823  		v.reset(Op386SETGEF)
  9824  		v0 := b.NewValue0(v.Line, Op386UCOMISD, TypeFlags)
  9825  		v0.AddArg(x)
  9826  		v0.AddArg(y)
  9827  		v.AddArg(v0)
  9828  		return true
  9829  	}
  9830  }
  9831  func rewriteValue386_OpGeq8(v *Value, config *Config) bool {
  9832  	b := v.Block
  9833  	_ = b
  9834  	// match: (Geq8   x y)
  9835  	// cond:
  9836  	// result: (SETGE (CMPB x y))
  9837  	for {
  9838  		x := v.Args[0]
  9839  		y := v.Args[1]
  9840  		v.reset(Op386SETGE)
  9841  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
  9842  		v0.AddArg(x)
  9843  		v0.AddArg(y)
  9844  		v.AddArg(v0)
  9845  		return true
  9846  	}
  9847  }
  9848  func rewriteValue386_OpGeq8U(v *Value, config *Config) bool {
  9849  	b := v.Block
  9850  	_ = b
  9851  	// match: (Geq8U  x y)
  9852  	// cond:
  9853  	// result: (SETAE (CMPB x y))
  9854  	for {
  9855  		x := v.Args[0]
  9856  		y := v.Args[1]
  9857  		v.reset(Op386SETAE)
  9858  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
  9859  		v0.AddArg(x)
  9860  		v0.AddArg(y)
  9861  		v.AddArg(v0)
  9862  		return true
  9863  	}
  9864  }
  9865  func rewriteValue386_OpGetClosurePtr(v *Value, config *Config) bool {
  9866  	b := v.Block
  9867  	_ = b
  9868  	// match: (GetClosurePtr)
  9869  	// cond:
  9870  	// result: (LoweredGetClosurePtr)
  9871  	for {
  9872  		v.reset(Op386LoweredGetClosurePtr)
  9873  		return true
  9874  	}
  9875  }
  9876  func rewriteValue386_OpGetG(v *Value, config *Config) bool {
  9877  	b := v.Block
  9878  	_ = b
  9879  	// match: (GetG mem)
  9880  	// cond:
  9881  	// result: (LoweredGetG mem)
  9882  	for {
  9883  		mem := v.Args[0]
  9884  		v.reset(Op386LoweredGetG)
  9885  		v.AddArg(mem)
  9886  		return true
  9887  	}
  9888  }
  9889  func rewriteValue386_OpGoCall(v *Value, config *Config) bool {
  9890  	b := v.Block
  9891  	_ = b
  9892  	// match: (GoCall [argwid] mem)
  9893  	// cond:
  9894  	// result: (CALLgo [argwid] mem)
  9895  	for {
  9896  		argwid := v.AuxInt
  9897  		mem := v.Args[0]
  9898  		v.reset(Op386CALLgo)
  9899  		v.AuxInt = argwid
  9900  		v.AddArg(mem)
  9901  		return true
  9902  	}
  9903  }
  9904  func rewriteValue386_OpGreater16(v *Value, config *Config) bool {
  9905  	b := v.Block
  9906  	_ = b
  9907  	// match: (Greater16  x y)
  9908  	// cond:
  9909  	// result: (SETG (CMPW x y))
  9910  	for {
  9911  		x := v.Args[0]
  9912  		y := v.Args[1]
  9913  		v.reset(Op386SETG)
  9914  		v0 := b.NewValue0(v.Line, Op386CMPW, TypeFlags)
  9915  		v0.AddArg(x)
  9916  		v0.AddArg(y)
  9917  		v.AddArg(v0)
  9918  		return true
  9919  	}
  9920  }
  9921  func rewriteValue386_OpGreater16U(v *Value, config *Config) bool {
  9922  	b := v.Block
  9923  	_ = b
  9924  	// match: (Greater16U x y)
  9925  	// cond:
  9926  	// result: (SETA (CMPW x y))
  9927  	for {
  9928  		x := v.Args[0]
  9929  		y := v.Args[1]
  9930  		v.reset(Op386SETA)
  9931  		v0 := b.NewValue0(v.Line, Op386CMPW, TypeFlags)
  9932  		v0.AddArg(x)
  9933  		v0.AddArg(y)
  9934  		v.AddArg(v0)
  9935  		return true
  9936  	}
  9937  }
  9938  func rewriteValue386_OpGreater32(v *Value, config *Config) bool {
  9939  	b := v.Block
  9940  	_ = b
  9941  	// match: (Greater32  x y)
  9942  	// cond:
  9943  	// result: (SETG (CMPL x y))
  9944  	for {
  9945  		x := v.Args[0]
  9946  		y := v.Args[1]
  9947  		v.reset(Op386SETG)
  9948  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
  9949  		v0.AddArg(x)
  9950  		v0.AddArg(y)
  9951  		v.AddArg(v0)
  9952  		return true
  9953  	}
  9954  }
  9955  func rewriteValue386_OpGreater32F(v *Value, config *Config) bool {
  9956  	b := v.Block
  9957  	_ = b
  9958  	// match: (Greater32F x y)
  9959  	// cond:
  9960  	// result: (SETGF (UCOMISS x y))
  9961  	for {
  9962  		x := v.Args[0]
  9963  		y := v.Args[1]
  9964  		v.reset(Op386SETGF)
  9965  		v0 := b.NewValue0(v.Line, Op386UCOMISS, TypeFlags)
  9966  		v0.AddArg(x)
  9967  		v0.AddArg(y)
  9968  		v.AddArg(v0)
  9969  		return true
  9970  	}
  9971  }
  9972  func rewriteValue386_OpGreater32U(v *Value, config *Config) bool {
  9973  	b := v.Block
  9974  	_ = b
  9975  	// match: (Greater32U x y)
  9976  	// cond:
  9977  	// result: (SETA (CMPL x y))
  9978  	for {
  9979  		x := v.Args[0]
  9980  		y := v.Args[1]
  9981  		v.reset(Op386SETA)
  9982  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
  9983  		v0.AddArg(x)
  9984  		v0.AddArg(y)
  9985  		v.AddArg(v0)
  9986  		return true
  9987  	}
  9988  }
  9989  func rewriteValue386_OpGreater64F(v *Value, config *Config) bool {
  9990  	b := v.Block
  9991  	_ = b
  9992  	// match: (Greater64F x y)
  9993  	// cond:
  9994  	// result: (SETGF (UCOMISD x y))
  9995  	for {
  9996  		x := v.Args[0]
  9997  		y := v.Args[1]
  9998  		v.reset(Op386SETGF)
  9999  		v0 := b.NewValue0(v.Line, Op386UCOMISD, TypeFlags)
 10000  		v0.AddArg(x)
 10001  		v0.AddArg(y)
 10002  		v.AddArg(v0)
 10003  		return true
 10004  	}
 10005  }
 10006  func rewriteValue386_OpGreater8(v *Value, config *Config) bool {
 10007  	b := v.Block
 10008  	_ = b
 10009  	// match: (Greater8   x y)
 10010  	// cond:
 10011  	// result: (SETG (CMPB x y))
 10012  	for {
 10013  		x := v.Args[0]
 10014  		y := v.Args[1]
 10015  		v.reset(Op386SETG)
 10016  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
 10017  		v0.AddArg(x)
 10018  		v0.AddArg(y)
 10019  		v.AddArg(v0)
 10020  		return true
 10021  	}
 10022  }
 10023  func rewriteValue386_OpGreater8U(v *Value, config *Config) bool {
 10024  	b := v.Block
 10025  	_ = b
 10026  	// match: (Greater8U  x y)
 10027  	// cond:
 10028  	// result: (SETA (CMPB x y))
 10029  	for {
 10030  		x := v.Args[0]
 10031  		y := v.Args[1]
 10032  		v.reset(Op386SETA)
 10033  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
 10034  		v0.AddArg(x)
 10035  		v0.AddArg(y)
 10036  		v.AddArg(v0)
 10037  		return true
 10038  	}
 10039  }
 10040  func rewriteValue386_OpHmul16(v *Value, config *Config) bool {
 10041  	b := v.Block
 10042  	_ = b
 10043  	// match: (Hmul16  x y)
 10044  	// cond:
 10045  	// result: (HMULW  x y)
 10046  	for {
 10047  		x := v.Args[0]
 10048  		y := v.Args[1]
 10049  		v.reset(Op386HMULW)
 10050  		v.AddArg(x)
 10051  		v.AddArg(y)
 10052  		return true
 10053  	}
 10054  }
 10055  func rewriteValue386_OpHmul16u(v *Value, config *Config) bool {
 10056  	b := v.Block
 10057  	_ = b
 10058  	// match: (Hmul16u x y)
 10059  	// cond:
 10060  	// result: (HMULWU x y)
 10061  	for {
 10062  		x := v.Args[0]
 10063  		y := v.Args[1]
 10064  		v.reset(Op386HMULWU)
 10065  		v.AddArg(x)
 10066  		v.AddArg(y)
 10067  		return true
 10068  	}
 10069  }
 10070  func rewriteValue386_OpHmul32(v *Value, config *Config) bool {
 10071  	b := v.Block
 10072  	_ = b
 10073  	// match: (Hmul32  x y)
 10074  	// cond:
 10075  	// result: (HMULL  x y)
 10076  	for {
 10077  		x := v.Args[0]
 10078  		y := v.Args[1]
 10079  		v.reset(Op386HMULL)
 10080  		v.AddArg(x)
 10081  		v.AddArg(y)
 10082  		return true
 10083  	}
 10084  }
 10085  func rewriteValue386_OpHmul32u(v *Value, config *Config) bool {
 10086  	b := v.Block
 10087  	_ = b
 10088  	// match: (Hmul32u x y)
 10089  	// cond:
 10090  	// result: (HMULLU x y)
 10091  	for {
 10092  		x := v.Args[0]
 10093  		y := v.Args[1]
 10094  		v.reset(Op386HMULLU)
 10095  		v.AddArg(x)
 10096  		v.AddArg(y)
 10097  		return true
 10098  	}
 10099  }
 10100  func rewriteValue386_OpHmul8(v *Value, config *Config) bool {
 10101  	b := v.Block
 10102  	_ = b
 10103  	// match: (Hmul8   x y)
 10104  	// cond:
 10105  	// result: (HMULB  x y)
 10106  	for {
 10107  		x := v.Args[0]
 10108  		y := v.Args[1]
 10109  		v.reset(Op386HMULB)
 10110  		v.AddArg(x)
 10111  		v.AddArg(y)
 10112  		return true
 10113  	}
 10114  }
 10115  func rewriteValue386_OpHmul8u(v *Value, config *Config) bool {
 10116  	b := v.Block
 10117  	_ = b
 10118  	// match: (Hmul8u  x y)
 10119  	// cond:
 10120  	// result: (HMULBU x y)
 10121  	for {
 10122  		x := v.Args[0]
 10123  		y := v.Args[1]
 10124  		v.reset(Op386HMULBU)
 10125  		v.AddArg(x)
 10126  		v.AddArg(y)
 10127  		return true
 10128  	}
 10129  }
 10130  func rewriteValue386_OpInterCall(v *Value, config *Config) bool {
 10131  	b := v.Block
 10132  	_ = b
 10133  	// match: (InterCall [argwid] entry mem)
 10134  	// cond:
 10135  	// result: (CALLinter [argwid] entry mem)
 10136  	for {
 10137  		argwid := v.AuxInt
 10138  		entry := v.Args[0]
 10139  		mem := v.Args[1]
 10140  		v.reset(Op386CALLinter)
 10141  		v.AuxInt = argwid
 10142  		v.AddArg(entry)
 10143  		v.AddArg(mem)
 10144  		return true
 10145  	}
 10146  }
 10147  func rewriteValue386_OpIsInBounds(v *Value, config *Config) bool {
 10148  	b := v.Block
 10149  	_ = b
 10150  	// match: (IsInBounds idx len)
 10151  	// cond:
 10152  	// result: (SETB (CMPL idx len))
 10153  	for {
 10154  		idx := v.Args[0]
 10155  		len := v.Args[1]
 10156  		v.reset(Op386SETB)
 10157  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
 10158  		v0.AddArg(idx)
 10159  		v0.AddArg(len)
 10160  		v.AddArg(v0)
 10161  		return true
 10162  	}
 10163  }
 10164  func rewriteValue386_OpIsNonNil(v *Value, config *Config) bool {
 10165  	b := v.Block
 10166  	_ = b
 10167  	// match: (IsNonNil p)
 10168  	// cond:
 10169  	// result: (SETNE (TESTL p p))
 10170  	for {
 10171  		p := v.Args[0]
 10172  		v.reset(Op386SETNE)
 10173  		v0 := b.NewValue0(v.Line, Op386TESTL, TypeFlags)
 10174  		v0.AddArg(p)
 10175  		v0.AddArg(p)
 10176  		v.AddArg(v0)
 10177  		return true
 10178  	}
 10179  }
 10180  func rewriteValue386_OpIsSliceInBounds(v *Value, config *Config) bool {
 10181  	b := v.Block
 10182  	_ = b
 10183  	// match: (IsSliceInBounds idx len)
 10184  	// cond:
 10185  	// result: (SETBE (CMPL idx len))
 10186  	for {
 10187  		idx := v.Args[0]
 10188  		len := v.Args[1]
 10189  		v.reset(Op386SETBE)
 10190  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
 10191  		v0.AddArg(idx)
 10192  		v0.AddArg(len)
 10193  		v.AddArg(v0)
 10194  		return true
 10195  	}
 10196  }
 10197  func rewriteValue386_OpLeq16(v *Value, config *Config) bool {
 10198  	b := v.Block
 10199  	_ = b
 10200  	// match: (Leq16  x y)
 10201  	// cond:
 10202  	// result: (SETLE (CMPW x y))
 10203  	for {
 10204  		x := v.Args[0]
 10205  		y := v.Args[1]
 10206  		v.reset(Op386SETLE)
 10207  		v0 := b.NewValue0(v.Line, Op386CMPW, TypeFlags)
 10208  		v0.AddArg(x)
 10209  		v0.AddArg(y)
 10210  		v.AddArg(v0)
 10211  		return true
 10212  	}
 10213  }
 10214  func rewriteValue386_OpLeq16U(v *Value, config *Config) bool {
 10215  	b := v.Block
 10216  	_ = b
 10217  	// match: (Leq16U x y)
 10218  	// cond:
 10219  	// result: (SETBE (CMPW x y))
 10220  	for {
 10221  		x := v.Args[0]
 10222  		y := v.Args[1]
 10223  		v.reset(Op386SETBE)
 10224  		v0 := b.NewValue0(v.Line, Op386CMPW, TypeFlags)
 10225  		v0.AddArg(x)
 10226  		v0.AddArg(y)
 10227  		v.AddArg(v0)
 10228  		return true
 10229  	}
 10230  }
 10231  func rewriteValue386_OpLeq32(v *Value, config *Config) bool {
 10232  	b := v.Block
 10233  	_ = b
 10234  	// match: (Leq32  x y)
 10235  	// cond:
 10236  	// result: (SETLE (CMPL x y))
 10237  	for {
 10238  		x := v.Args[0]
 10239  		y := v.Args[1]
 10240  		v.reset(Op386SETLE)
 10241  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
 10242  		v0.AddArg(x)
 10243  		v0.AddArg(y)
 10244  		v.AddArg(v0)
 10245  		return true
 10246  	}
 10247  }
 10248  func rewriteValue386_OpLeq32F(v *Value, config *Config) bool {
 10249  	b := v.Block
 10250  	_ = b
 10251  	// match: (Leq32F x y)
 10252  	// cond:
 10253  	// result: (SETGEF (UCOMISS y x))
 10254  	for {
 10255  		x := v.Args[0]
 10256  		y := v.Args[1]
 10257  		v.reset(Op386SETGEF)
 10258  		v0 := b.NewValue0(v.Line, Op386UCOMISS, TypeFlags)
 10259  		v0.AddArg(y)
 10260  		v0.AddArg(x)
 10261  		v.AddArg(v0)
 10262  		return true
 10263  	}
 10264  }
 10265  func rewriteValue386_OpLeq32U(v *Value, config *Config) bool {
 10266  	b := v.Block
 10267  	_ = b
 10268  	// match: (Leq32U x y)
 10269  	// cond:
 10270  	// result: (SETBE (CMPL x y))
 10271  	for {
 10272  		x := v.Args[0]
 10273  		y := v.Args[1]
 10274  		v.reset(Op386SETBE)
 10275  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
 10276  		v0.AddArg(x)
 10277  		v0.AddArg(y)
 10278  		v.AddArg(v0)
 10279  		return true
 10280  	}
 10281  }
 10282  func rewriteValue386_OpLeq64F(v *Value, config *Config) bool {
 10283  	b := v.Block
 10284  	_ = b
 10285  	// match: (Leq64F x y)
 10286  	// cond:
 10287  	// result: (SETGEF (UCOMISD y x))
 10288  	for {
 10289  		x := v.Args[0]
 10290  		y := v.Args[1]
 10291  		v.reset(Op386SETGEF)
 10292  		v0 := b.NewValue0(v.Line, Op386UCOMISD, TypeFlags)
 10293  		v0.AddArg(y)
 10294  		v0.AddArg(x)
 10295  		v.AddArg(v0)
 10296  		return true
 10297  	}
 10298  }
 10299  func rewriteValue386_OpLeq8(v *Value, config *Config) bool {
 10300  	b := v.Block
 10301  	_ = b
 10302  	// match: (Leq8   x y)
 10303  	// cond:
 10304  	// result: (SETLE (CMPB x y))
 10305  	for {
 10306  		x := v.Args[0]
 10307  		y := v.Args[1]
 10308  		v.reset(Op386SETLE)
 10309  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
 10310  		v0.AddArg(x)
 10311  		v0.AddArg(y)
 10312  		v.AddArg(v0)
 10313  		return true
 10314  	}
 10315  }
 10316  func rewriteValue386_OpLeq8U(v *Value, config *Config) bool {
 10317  	b := v.Block
 10318  	_ = b
 10319  	// match: (Leq8U  x y)
 10320  	// cond:
 10321  	// result: (SETBE (CMPB x y))
 10322  	for {
 10323  		x := v.Args[0]
 10324  		y := v.Args[1]
 10325  		v.reset(Op386SETBE)
 10326  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
 10327  		v0.AddArg(x)
 10328  		v0.AddArg(y)
 10329  		v.AddArg(v0)
 10330  		return true
 10331  	}
 10332  }
 10333  func rewriteValue386_OpLess16(v *Value, config *Config) bool {
 10334  	b := v.Block
 10335  	_ = b
 10336  	// match: (Less16  x y)
 10337  	// cond:
 10338  	// result: (SETL (CMPW x y))
 10339  	for {
 10340  		x := v.Args[0]
 10341  		y := v.Args[1]
 10342  		v.reset(Op386SETL)
 10343  		v0 := b.NewValue0(v.Line, Op386CMPW, TypeFlags)
 10344  		v0.AddArg(x)
 10345  		v0.AddArg(y)
 10346  		v.AddArg(v0)
 10347  		return true
 10348  	}
 10349  }
 10350  func rewriteValue386_OpLess16U(v *Value, config *Config) bool {
 10351  	b := v.Block
 10352  	_ = b
 10353  	// match: (Less16U x y)
 10354  	// cond:
 10355  	// result: (SETB (CMPW x y))
 10356  	for {
 10357  		x := v.Args[0]
 10358  		y := v.Args[1]
 10359  		v.reset(Op386SETB)
 10360  		v0 := b.NewValue0(v.Line, Op386CMPW, TypeFlags)
 10361  		v0.AddArg(x)
 10362  		v0.AddArg(y)
 10363  		v.AddArg(v0)
 10364  		return true
 10365  	}
 10366  }
 10367  func rewriteValue386_OpLess32(v *Value, config *Config) bool {
 10368  	b := v.Block
 10369  	_ = b
 10370  	// match: (Less32  x y)
 10371  	// cond:
 10372  	// result: (SETL (CMPL x y))
 10373  	for {
 10374  		x := v.Args[0]
 10375  		y := v.Args[1]
 10376  		v.reset(Op386SETL)
 10377  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
 10378  		v0.AddArg(x)
 10379  		v0.AddArg(y)
 10380  		v.AddArg(v0)
 10381  		return true
 10382  	}
 10383  }
 10384  func rewriteValue386_OpLess32F(v *Value, config *Config) bool {
 10385  	b := v.Block
 10386  	_ = b
 10387  	// match: (Less32F x y)
 10388  	// cond:
 10389  	// result: (SETGF (UCOMISS y x))
 10390  	for {
 10391  		x := v.Args[0]
 10392  		y := v.Args[1]
 10393  		v.reset(Op386SETGF)
 10394  		v0 := b.NewValue0(v.Line, Op386UCOMISS, TypeFlags)
 10395  		v0.AddArg(y)
 10396  		v0.AddArg(x)
 10397  		v.AddArg(v0)
 10398  		return true
 10399  	}
 10400  }
 10401  func rewriteValue386_OpLess32U(v *Value, config *Config) bool {
 10402  	b := v.Block
 10403  	_ = b
 10404  	// match: (Less32U x y)
 10405  	// cond:
 10406  	// result: (SETB (CMPL x y))
 10407  	for {
 10408  		x := v.Args[0]
 10409  		y := v.Args[1]
 10410  		v.reset(Op386SETB)
 10411  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
 10412  		v0.AddArg(x)
 10413  		v0.AddArg(y)
 10414  		v.AddArg(v0)
 10415  		return true
 10416  	}
 10417  }
 10418  func rewriteValue386_OpLess64F(v *Value, config *Config) bool {
 10419  	b := v.Block
 10420  	_ = b
 10421  	// match: (Less64F x y)
 10422  	// cond:
 10423  	// result: (SETGF (UCOMISD y x))
 10424  	for {
 10425  		x := v.Args[0]
 10426  		y := v.Args[1]
 10427  		v.reset(Op386SETGF)
 10428  		v0 := b.NewValue0(v.Line, Op386UCOMISD, TypeFlags)
 10429  		v0.AddArg(y)
 10430  		v0.AddArg(x)
 10431  		v.AddArg(v0)
 10432  		return true
 10433  	}
 10434  }
 10435  func rewriteValue386_OpLess8(v *Value, config *Config) bool {
 10436  	b := v.Block
 10437  	_ = b
 10438  	// match: (Less8   x y)
 10439  	// cond:
 10440  	// result: (SETL (CMPB x y))
 10441  	for {
 10442  		x := v.Args[0]
 10443  		y := v.Args[1]
 10444  		v.reset(Op386SETL)
 10445  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
 10446  		v0.AddArg(x)
 10447  		v0.AddArg(y)
 10448  		v.AddArg(v0)
 10449  		return true
 10450  	}
 10451  }
 10452  func rewriteValue386_OpLess8U(v *Value, config *Config) bool {
 10453  	b := v.Block
 10454  	_ = b
 10455  	// match: (Less8U  x y)
 10456  	// cond:
 10457  	// result: (SETB (CMPB x y))
 10458  	for {
 10459  		x := v.Args[0]
 10460  		y := v.Args[1]
 10461  		v.reset(Op386SETB)
 10462  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
 10463  		v0.AddArg(x)
 10464  		v0.AddArg(y)
 10465  		v.AddArg(v0)
 10466  		return true
 10467  	}
 10468  }
 10469  func rewriteValue386_OpLoad(v *Value, config *Config) bool {
 10470  	b := v.Block
 10471  	_ = b
 10472  	// match: (Load <t> ptr mem)
 10473  	// cond: (is32BitInt(t) || isPtr(t))
 10474  	// result: (MOVLload ptr mem)
 10475  	for {
 10476  		t := v.Type
 10477  		ptr := v.Args[0]
 10478  		mem := v.Args[1]
 10479  		if !(is32BitInt(t) || isPtr(t)) {
 10480  			break
 10481  		}
 10482  		v.reset(Op386MOVLload)
 10483  		v.AddArg(ptr)
 10484  		v.AddArg(mem)
 10485  		return true
 10486  	}
 10487  	// match: (Load <t> ptr mem)
 10488  	// cond: is16BitInt(t)
 10489  	// result: (MOVWload ptr mem)
 10490  	for {
 10491  		t := v.Type
 10492  		ptr := v.Args[0]
 10493  		mem := v.Args[1]
 10494  		if !(is16BitInt(t)) {
 10495  			break
 10496  		}
 10497  		v.reset(Op386MOVWload)
 10498  		v.AddArg(ptr)
 10499  		v.AddArg(mem)
 10500  		return true
 10501  	}
 10502  	// match: (Load <t> ptr mem)
 10503  	// cond: (t.IsBoolean() || is8BitInt(t))
 10504  	// result: (MOVBload ptr mem)
 10505  	for {
 10506  		t := v.Type
 10507  		ptr := v.Args[0]
 10508  		mem := v.Args[1]
 10509  		if !(t.IsBoolean() || is8BitInt(t)) {
 10510  			break
 10511  		}
 10512  		v.reset(Op386MOVBload)
 10513  		v.AddArg(ptr)
 10514  		v.AddArg(mem)
 10515  		return true
 10516  	}
 10517  	// match: (Load <t> ptr mem)
 10518  	// cond: is32BitFloat(t)
 10519  	// result: (MOVSSload ptr mem)
 10520  	for {
 10521  		t := v.Type
 10522  		ptr := v.Args[0]
 10523  		mem := v.Args[1]
 10524  		if !(is32BitFloat(t)) {
 10525  			break
 10526  		}
 10527  		v.reset(Op386MOVSSload)
 10528  		v.AddArg(ptr)
 10529  		v.AddArg(mem)
 10530  		return true
 10531  	}
 10532  	// match: (Load <t> ptr mem)
 10533  	// cond: is64BitFloat(t)
 10534  	// result: (MOVSDload ptr mem)
 10535  	for {
 10536  		t := v.Type
 10537  		ptr := v.Args[0]
 10538  		mem := v.Args[1]
 10539  		if !(is64BitFloat(t)) {
 10540  			break
 10541  		}
 10542  		v.reset(Op386MOVSDload)
 10543  		v.AddArg(ptr)
 10544  		v.AddArg(mem)
 10545  		return true
 10546  	}
 10547  	return false
 10548  }
 10549  func rewriteValue386_OpLrot16(v *Value, config *Config) bool {
 10550  	b := v.Block
 10551  	_ = b
 10552  	// match: (Lrot16 <t> x [c])
 10553  	// cond:
 10554  	// result: (ROLWconst <t> [c&15] x)
 10555  	for {
 10556  		t := v.Type
 10557  		c := v.AuxInt
 10558  		x := v.Args[0]
 10559  		v.reset(Op386ROLWconst)
 10560  		v.Type = t
 10561  		v.AuxInt = c & 15
 10562  		v.AddArg(x)
 10563  		return true
 10564  	}
 10565  }
 10566  func rewriteValue386_OpLrot32(v *Value, config *Config) bool {
 10567  	b := v.Block
 10568  	_ = b
 10569  	// match: (Lrot32 <t> x [c])
 10570  	// cond:
 10571  	// result: (ROLLconst <t> [c&31] x)
 10572  	for {
 10573  		t := v.Type
 10574  		c := v.AuxInt
 10575  		x := v.Args[0]
 10576  		v.reset(Op386ROLLconst)
 10577  		v.Type = t
 10578  		v.AuxInt = c & 31
 10579  		v.AddArg(x)
 10580  		return true
 10581  	}
 10582  }
 10583  func rewriteValue386_OpLrot8(v *Value, config *Config) bool {
 10584  	b := v.Block
 10585  	_ = b
 10586  	// match: (Lrot8  <t> x [c])
 10587  	// cond:
 10588  	// result: (ROLBconst <t> [c&7] x)
 10589  	for {
 10590  		t := v.Type
 10591  		c := v.AuxInt
 10592  		x := v.Args[0]
 10593  		v.reset(Op386ROLBconst)
 10594  		v.Type = t
 10595  		v.AuxInt = c & 7
 10596  		v.AddArg(x)
 10597  		return true
 10598  	}
 10599  }
 10600  func rewriteValue386_OpLsh16x16(v *Value, config *Config) bool {
 10601  	b := v.Block
 10602  	_ = b
 10603  	// match: (Lsh16x16 <t> x y)
 10604  	// cond:
 10605  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPWconst y [32])))
 10606  	for {
 10607  		t := v.Type
 10608  		x := v.Args[0]
 10609  		y := v.Args[1]
 10610  		v.reset(Op386ANDL)
 10611  		v0 := b.NewValue0(v.Line, Op386SHLL, t)
 10612  		v0.AddArg(x)
 10613  		v0.AddArg(y)
 10614  		v.AddArg(v0)
 10615  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 10616  		v2 := b.NewValue0(v.Line, Op386CMPWconst, TypeFlags)
 10617  		v2.AuxInt = 32
 10618  		v2.AddArg(y)
 10619  		v1.AddArg(v2)
 10620  		v.AddArg(v1)
 10621  		return true
 10622  	}
 10623  }
 10624  func rewriteValue386_OpLsh16x32(v *Value, config *Config) bool {
 10625  	b := v.Block
 10626  	_ = b
 10627  	// match: (Lsh16x32 <t> x y)
 10628  	// cond:
 10629  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPLconst y [32])))
 10630  	for {
 10631  		t := v.Type
 10632  		x := v.Args[0]
 10633  		y := v.Args[1]
 10634  		v.reset(Op386ANDL)
 10635  		v0 := b.NewValue0(v.Line, Op386SHLL, t)
 10636  		v0.AddArg(x)
 10637  		v0.AddArg(y)
 10638  		v.AddArg(v0)
 10639  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 10640  		v2 := b.NewValue0(v.Line, Op386CMPLconst, TypeFlags)
 10641  		v2.AuxInt = 32
 10642  		v2.AddArg(y)
 10643  		v1.AddArg(v2)
 10644  		v.AddArg(v1)
 10645  		return true
 10646  	}
 10647  }
 10648  func rewriteValue386_OpLsh16x64(v *Value, config *Config) bool {
 10649  	b := v.Block
 10650  	_ = b
 10651  	// match: (Lsh16x64 x (Const64 [c]))
 10652  	// cond: uint64(c) < 16
 10653  	// result: (SHLLconst x [c])
 10654  	for {
 10655  		x := v.Args[0]
 10656  		v_1 := v.Args[1]
 10657  		if v_1.Op != OpConst64 {
 10658  			break
 10659  		}
 10660  		c := v_1.AuxInt
 10661  		if !(uint64(c) < 16) {
 10662  			break
 10663  		}
 10664  		v.reset(Op386SHLLconst)
 10665  		v.AuxInt = c
 10666  		v.AddArg(x)
 10667  		return true
 10668  	}
 10669  	// match: (Lsh16x64 _ (Const64 [c]))
 10670  	// cond: uint64(c) >= 16
 10671  	// result: (Const16 [0])
 10672  	for {
 10673  		v_1 := v.Args[1]
 10674  		if v_1.Op != OpConst64 {
 10675  			break
 10676  		}
 10677  		c := v_1.AuxInt
 10678  		if !(uint64(c) >= 16) {
 10679  			break
 10680  		}
 10681  		v.reset(OpConst16)
 10682  		v.AuxInt = 0
 10683  		return true
 10684  	}
 10685  	return false
 10686  }
 10687  func rewriteValue386_OpLsh16x8(v *Value, config *Config) bool {
 10688  	b := v.Block
 10689  	_ = b
 10690  	// match: (Lsh16x8  <t> x y)
 10691  	// cond:
 10692  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPBconst y [32])))
 10693  	for {
 10694  		t := v.Type
 10695  		x := v.Args[0]
 10696  		y := v.Args[1]
 10697  		v.reset(Op386ANDL)
 10698  		v0 := b.NewValue0(v.Line, Op386SHLL, t)
 10699  		v0.AddArg(x)
 10700  		v0.AddArg(y)
 10701  		v.AddArg(v0)
 10702  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 10703  		v2 := b.NewValue0(v.Line, Op386CMPBconst, TypeFlags)
 10704  		v2.AuxInt = 32
 10705  		v2.AddArg(y)
 10706  		v1.AddArg(v2)
 10707  		v.AddArg(v1)
 10708  		return true
 10709  	}
 10710  }
 10711  func rewriteValue386_OpLsh32x16(v *Value, config *Config) bool {
 10712  	b := v.Block
 10713  	_ = b
 10714  	// match: (Lsh32x16 <t> x y)
 10715  	// cond:
 10716  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPWconst y [32])))
 10717  	for {
 10718  		t := v.Type
 10719  		x := v.Args[0]
 10720  		y := v.Args[1]
 10721  		v.reset(Op386ANDL)
 10722  		v0 := b.NewValue0(v.Line, Op386SHLL, t)
 10723  		v0.AddArg(x)
 10724  		v0.AddArg(y)
 10725  		v.AddArg(v0)
 10726  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 10727  		v2 := b.NewValue0(v.Line, Op386CMPWconst, TypeFlags)
 10728  		v2.AuxInt = 32
 10729  		v2.AddArg(y)
 10730  		v1.AddArg(v2)
 10731  		v.AddArg(v1)
 10732  		return true
 10733  	}
 10734  }
 10735  func rewriteValue386_OpLsh32x32(v *Value, config *Config) bool {
 10736  	b := v.Block
 10737  	_ = b
 10738  	// match: (Lsh32x32 <t> x y)
 10739  	// cond:
 10740  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPLconst y [32])))
 10741  	for {
 10742  		t := v.Type
 10743  		x := v.Args[0]
 10744  		y := v.Args[1]
 10745  		v.reset(Op386ANDL)
 10746  		v0 := b.NewValue0(v.Line, Op386SHLL, t)
 10747  		v0.AddArg(x)
 10748  		v0.AddArg(y)
 10749  		v.AddArg(v0)
 10750  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 10751  		v2 := b.NewValue0(v.Line, Op386CMPLconst, TypeFlags)
 10752  		v2.AuxInt = 32
 10753  		v2.AddArg(y)
 10754  		v1.AddArg(v2)
 10755  		v.AddArg(v1)
 10756  		return true
 10757  	}
 10758  }
 10759  func rewriteValue386_OpLsh32x64(v *Value, config *Config) bool {
 10760  	b := v.Block
 10761  	_ = b
 10762  	// match: (Lsh32x64 x (Const64 [c]))
 10763  	// cond: uint64(c) < 32
 10764  	// result: (SHLLconst x [c])
 10765  	for {
 10766  		x := v.Args[0]
 10767  		v_1 := v.Args[1]
 10768  		if v_1.Op != OpConst64 {
 10769  			break
 10770  		}
 10771  		c := v_1.AuxInt
 10772  		if !(uint64(c) < 32) {
 10773  			break
 10774  		}
 10775  		v.reset(Op386SHLLconst)
 10776  		v.AuxInt = c
 10777  		v.AddArg(x)
 10778  		return true
 10779  	}
 10780  	// match: (Lsh32x64 _ (Const64 [c]))
 10781  	// cond: uint64(c) >= 32
 10782  	// result: (Const32 [0])
 10783  	for {
 10784  		v_1 := v.Args[1]
 10785  		if v_1.Op != OpConst64 {
 10786  			break
 10787  		}
 10788  		c := v_1.AuxInt
 10789  		if !(uint64(c) >= 32) {
 10790  			break
 10791  		}
 10792  		v.reset(OpConst32)
 10793  		v.AuxInt = 0
 10794  		return true
 10795  	}
 10796  	return false
 10797  }
 10798  func rewriteValue386_OpLsh32x8(v *Value, config *Config) bool {
 10799  	b := v.Block
 10800  	_ = b
 10801  	// match: (Lsh32x8  <t> x y)
 10802  	// cond:
 10803  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPBconst y [32])))
 10804  	for {
 10805  		t := v.Type
 10806  		x := v.Args[0]
 10807  		y := v.Args[1]
 10808  		v.reset(Op386ANDL)
 10809  		v0 := b.NewValue0(v.Line, Op386SHLL, t)
 10810  		v0.AddArg(x)
 10811  		v0.AddArg(y)
 10812  		v.AddArg(v0)
 10813  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 10814  		v2 := b.NewValue0(v.Line, Op386CMPBconst, TypeFlags)
 10815  		v2.AuxInt = 32
 10816  		v2.AddArg(y)
 10817  		v1.AddArg(v2)
 10818  		v.AddArg(v1)
 10819  		return true
 10820  	}
 10821  }
 10822  func rewriteValue386_OpLsh8x16(v *Value, config *Config) bool {
 10823  	b := v.Block
 10824  	_ = b
 10825  	// match: (Lsh8x16 <t> x y)
 10826  	// cond:
 10827  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPWconst y [32])))
 10828  	for {
 10829  		t := v.Type
 10830  		x := v.Args[0]
 10831  		y := v.Args[1]
 10832  		v.reset(Op386ANDL)
 10833  		v0 := b.NewValue0(v.Line, Op386SHLL, t)
 10834  		v0.AddArg(x)
 10835  		v0.AddArg(y)
 10836  		v.AddArg(v0)
 10837  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 10838  		v2 := b.NewValue0(v.Line, Op386CMPWconst, TypeFlags)
 10839  		v2.AuxInt = 32
 10840  		v2.AddArg(y)
 10841  		v1.AddArg(v2)
 10842  		v.AddArg(v1)
 10843  		return true
 10844  	}
 10845  }
 10846  func rewriteValue386_OpLsh8x32(v *Value, config *Config) bool {
 10847  	b := v.Block
 10848  	_ = b
 10849  	// match: (Lsh8x32 <t> x y)
 10850  	// cond:
 10851  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPLconst y [32])))
 10852  	for {
 10853  		t := v.Type
 10854  		x := v.Args[0]
 10855  		y := v.Args[1]
 10856  		v.reset(Op386ANDL)
 10857  		v0 := b.NewValue0(v.Line, Op386SHLL, t)
 10858  		v0.AddArg(x)
 10859  		v0.AddArg(y)
 10860  		v.AddArg(v0)
 10861  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 10862  		v2 := b.NewValue0(v.Line, Op386CMPLconst, TypeFlags)
 10863  		v2.AuxInt = 32
 10864  		v2.AddArg(y)
 10865  		v1.AddArg(v2)
 10866  		v.AddArg(v1)
 10867  		return true
 10868  	}
 10869  }
 10870  func rewriteValue386_OpLsh8x64(v *Value, config *Config) bool {
 10871  	b := v.Block
 10872  	_ = b
 10873  	// match: (Lsh8x64 x (Const64 [c]))
 10874  	// cond: uint64(c) < 8
 10875  	// result: (SHLLconst x [c])
 10876  	for {
 10877  		x := v.Args[0]
 10878  		v_1 := v.Args[1]
 10879  		if v_1.Op != OpConst64 {
 10880  			break
 10881  		}
 10882  		c := v_1.AuxInt
 10883  		if !(uint64(c) < 8) {
 10884  			break
 10885  		}
 10886  		v.reset(Op386SHLLconst)
 10887  		v.AuxInt = c
 10888  		v.AddArg(x)
 10889  		return true
 10890  	}
 10891  	// match: (Lsh8x64 _ (Const64 [c]))
 10892  	// cond: uint64(c) >= 8
 10893  	// result: (Const8 [0])
 10894  	for {
 10895  		v_1 := v.Args[1]
 10896  		if v_1.Op != OpConst64 {
 10897  			break
 10898  		}
 10899  		c := v_1.AuxInt
 10900  		if !(uint64(c) >= 8) {
 10901  			break
 10902  		}
 10903  		v.reset(OpConst8)
 10904  		v.AuxInt = 0
 10905  		return true
 10906  	}
 10907  	return false
 10908  }
 10909  func rewriteValue386_OpLsh8x8(v *Value, config *Config) bool {
 10910  	b := v.Block
 10911  	_ = b
 10912  	// match: (Lsh8x8  <t> x y)
 10913  	// cond:
 10914  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPBconst y [32])))
 10915  	for {
 10916  		t := v.Type
 10917  		x := v.Args[0]
 10918  		y := v.Args[1]
 10919  		v.reset(Op386ANDL)
 10920  		v0 := b.NewValue0(v.Line, Op386SHLL, t)
 10921  		v0.AddArg(x)
 10922  		v0.AddArg(y)
 10923  		v.AddArg(v0)
 10924  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 10925  		v2 := b.NewValue0(v.Line, Op386CMPBconst, TypeFlags)
 10926  		v2.AuxInt = 32
 10927  		v2.AddArg(y)
 10928  		v1.AddArg(v2)
 10929  		v.AddArg(v1)
 10930  		return true
 10931  	}
 10932  }
 10933  func rewriteValue386_OpMod16(v *Value, config *Config) bool {
 10934  	b := v.Block
 10935  	_ = b
 10936  	// match: (Mod16  x y)
 10937  	// cond:
 10938  	// result: (MODW  x y)
 10939  	for {
 10940  		x := v.Args[0]
 10941  		y := v.Args[1]
 10942  		v.reset(Op386MODW)
 10943  		v.AddArg(x)
 10944  		v.AddArg(y)
 10945  		return true
 10946  	}
 10947  }
 10948  func rewriteValue386_OpMod16u(v *Value, config *Config) bool {
 10949  	b := v.Block
 10950  	_ = b
 10951  	// match: (Mod16u x y)
 10952  	// cond:
 10953  	// result: (MODWU x y)
 10954  	for {
 10955  		x := v.Args[0]
 10956  		y := v.Args[1]
 10957  		v.reset(Op386MODWU)
 10958  		v.AddArg(x)
 10959  		v.AddArg(y)
 10960  		return true
 10961  	}
 10962  }
 10963  func rewriteValue386_OpMod32(v *Value, config *Config) bool {
 10964  	b := v.Block
 10965  	_ = b
 10966  	// match: (Mod32  x y)
 10967  	// cond:
 10968  	// result: (MODL  x y)
 10969  	for {
 10970  		x := v.Args[0]
 10971  		y := v.Args[1]
 10972  		v.reset(Op386MODL)
 10973  		v.AddArg(x)
 10974  		v.AddArg(y)
 10975  		return true
 10976  	}
 10977  }
 10978  func rewriteValue386_OpMod32u(v *Value, config *Config) bool {
 10979  	b := v.Block
 10980  	_ = b
 10981  	// match: (Mod32u x y)
 10982  	// cond:
 10983  	// result: (MODLU x y)
 10984  	for {
 10985  		x := v.Args[0]
 10986  		y := v.Args[1]
 10987  		v.reset(Op386MODLU)
 10988  		v.AddArg(x)
 10989  		v.AddArg(y)
 10990  		return true
 10991  	}
 10992  }
 10993  func rewriteValue386_OpMod8(v *Value, config *Config) bool {
 10994  	b := v.Block
 10995  	_ = b
 10996  	// match: (Mod8   x y)
 10997  	// cond:
 10998  	// result: (MODW  (SignExt8to16 x) (SignExt8to16 y))
 10999  	for {
 11000  		x := v.Args[0]
 11001  		y := v.Args[1]
 11002  		v.reset(Op386MODW)
 11003  		v0 := b.NewValue0(v.Line, OpSignExt8to16, config.fe.TypeInt16())
 11004  		v0.AddArg(x)
 11005  		v.AddArg(v0)
 11006  		v1 := b.NewValue0(v.Line, OpSignExt8to16, config.fe.TypeInt16())
 11007  		v1.AddArg(y)
 11008  		v.AddArg(v1)
 11009  		return true
 11010  	}
 11011  }
 11012  func rewriteValue386_OpMod8u(v *Value, config *Config) bool {
 11013  	b := v.Block
 11014  	_ = b
 11015  	// match: (Mod8u  x y)
 11016  	// cond:
 11017  	// result: (MODWU (ZeroExt8to16 x) (ZeroExt8to16 y))
 11018  	for {
 11019  		x := v.Args[0]
 11020  		y := v.Args[1]
 11021  		v.reset(Op386MODWU)
 11022  		v0 := b.NewValue0(v.Line, OpZeroExt8to16, config.fe.TypeUInt16())
 11023  		v0.AddArg(x)
 11024  		v.AddArg(v0)
 11025  		v1 := b.NewValue0(v.Line, OpZeroExt8to16, config.fe.TypeUInt16())
 11026  		v1.AddArg(y)
 11027  		v.AddArg(v1)
 11028  		return true
 11029  	}
 11030  }
 11031  func rewriteValue386_OpMove(v *Value, config *Config) bool {
 11032  	b := v.Block
 11033  	_ = b
 11034  	// match: (Move [s] _ _ mem)
 11035  	// cond: SizeAndAlign(s).Size() == 0
 11036  	// result: mem
 11037  	for {
 11038  		s := v.AuxInt
 11039  		mem := v.Args[2]
 11040  		if !(SizeAndAlign(s).Size() == 0) {
 11041  			break
 11042  		}
 11043  		v.reset(OpCopy)
 11044  		v.Type = mem.Type
 11045  		v.AddArg(mem)
 11046  		return true
 11047  	}
 11048  	// match: (Move [s] dst src mem)
 11049  	// cond: SizeAndAlign(s).Size() == 1
 11050  	// result: (MOVBstore dst (MOVBload src mem) mem)
 11051  	for {
 11052  		s := v.AuxInt
 11053  		dst := v.Args[0]
 11054  		src := v.Args[1]
 11055  		mem := v.Args[2]
 11056  		if !(SizeAndAlign(s).Size() == 1) {
 11057  			break
 11058  		}
 11059  		v.reset(Op386MOVBstore)
 11060  		v.AddArg(dst)
 11061  		v0 := b.NewValue0(v.Line, Op386MOVBload, config.fe.TypeUInt8())
 11062  		v0.AddArg(src)
 11063  		v0.AddArg(mem)
 11064  		v.AddArg(v0)
 11065  		v.AddArg(mem)
 11066  		return true
 11067  	}
 11068  	// match: (Move [s] dst src mem)
 11069  	// cond: SizeAndAlign(s).Size() == 2
 11070  	// result: (MOVWstore dst (MOVWload src mem) mem)
 11071  	for {
 11072  		s := v.AuxInt
 11073  		dst := v.Args[0]
 11074  		src := v.Args[1]
 11075  		mem := v.Args[2]
 11076  		if !(SizeAndAlign(s).Size() == 2) {
 11077  			break
 11078  		}
 11079  		v.reset(Op386MOVWstore)
 11080  		v.AddArg(dst)
 11081  		v0 := b.NewValue0(v.Line, Op386MOVWload, config.fe.TypeUInt16())
 11082  		v0.AddArg(src)
 11083  		v0.AddArg(mem)
 11084  		v.AddArg(v0)
 11085  		v.AddArg(mem)
 11086  		return true
 11087  	}
 11088  	// match: (Move [s] dst src mem)
 11089  	// cond: SizeAndAlign(s).Size() == 4
 11090  	// result: (MOVLstore dst (MOVLload src mem) mem)
 11091  	for {
 11092  		s := v.AuxInt
 11093  		dst := v.Args[0]
 11094  		src := v.Args[1]
 11095  		mem := v.Args[2]
 11096  		if !(SizeAndAlign(s).Size() == 4) {
 11097  			break
 11098  		}
 11099  		v.reset(Op386MOVLstore)
 11100  		v.AddArg(dst)
 11101  		v0 := b.NewValue0(v.Line, Op386MOVLload, config.fe.TypeUInt32())
 11102  		v0.AddArg(src)
 11103  		v0.AddArg(mem)
 11104  		v.AddArg(v0)
 11105  		v.AddArg(mem)
 11106  		return true
 11107  	}
 11108  	// match: (Move [s] dst src mem)
 11109  	// cond: SizeAndAlign(s).Size() == 3
 11110  	// result: (MOVBstore [2] dst (MOVBload [2] src mem) 		(MOVWstore dst (MOVWload src mem) mem))
 11111  	for {
 11112  		s := v.AuxInt
 11113  		dst := v.Args[0]
 11114  		src := v.Args[1]
 11115  		mem := v.Args[2]
 11116  		if !(SizeAndAlign(s).Size() == 3) {
 11117  			break
 11118  		}
 11119  		v.reset(Op386MOVBstore)
 11120  		v.AuxInt = 2
 11121  		v.AddArg(dst)
 11122  		v0 := b.NewValue0(v.Line, Op386MOVBload, config.fe.TypeUInt8())
 11123  		v0.AuxInt = 2
 11124  		v0.AddArg(src)
 11125  		v0.AddArg(mem)
 11126  		v.AddArg(v0)
 11127  		v1 := b.NewValue0(v.Line, Op386MOVWstore, TypeMem)
 11128  		v1.AddArg(dst)
 11129  		v2 := b.NewValue0(v.Line, Op386MOVWload, config.fe.TypeUInt16())
 11130  		v2.AddArg(src)
 11131  		v2.AddArg(mem)
 11132  		v1.AddArg(v2)
 11133  		v1.AddArg(mem)
 11134  		v.AddArg(v1)
 11135  		return true
 11136  	}
 11137  	// match: (Move [s] dst src mem)
 11138  	// cond: SizeAndAlign(s).Size() == 5
 11139  	// result: (MOVBstore [4] dst (MOVBload [4] src mem) 		(MOVLstore dst (MOVLload src mem) mem))
 11140  	for {
 11141  		s := v.AuxInt
 11142  		dst := v.Args[0]
 11143  		src := v.Args[1]
 11144  		mem := v.Args[2]
 11145  		if !(SizeAndAlign(s).Size() == 5) {
 11146  			break
 11147  		}
 11148  		v.reset(Op386MOVBstore)
 11149  		v.AuxInt = 4
 11150  		v.AddArg(dst)
 11151  		v0 := b.NewValue0(v.Line, Op386MOVBload, config.fe.TypeUInt8())
 11152  		v0.AuxInt = 4
 11153  		v0.AddArg(src)
 11154  		v0.AddArg(mem)
 11155  		v.AddArg(v0)
 11156  		v1 := b.NewValue0(v.Line, Op386MOVLstore, TypeMem)
 11157  		v1.AddArg(dst)
 11158  		v2 := b.NewValue0(v.Line, Op386MOVLload, config.fe.TypeUInt32())
 11159  		v2.AddArg(src)
 11160  		v2.AddArg(mem)
 11161  		v1.AddArg(v2)
 11162  		v1.AddArg(mem)
 11163  		v.AddArg(v1)
 11164  		return true
 11165  	}
 11166  	// match: (Move [s] dst src mem)
 11167  	// cond: SizeAndAlign(s).Size() == 6
 11168  	// result: (MOVWstore [4] dst (MOVWload [4] src mem) 		(MOVLstore dst (MOVLload src mem) mem))
 11169  	for {
 11170  		s := v.AuxInt
 11171  		dst := v.Args[0]
 11172  		src := v.Args[1]
 11173  		mem := v.Args[2]
 11174  		if !(SizeAndAlign(s).Size() == 6) {
 11175  			break
 11176  		}
 11177  		v.reset(Op386MOVWstore)
 11178  		v.AuxInt = 4
 11179  		v.AddArg(dst)
 11180  		v0 := b.NewValue0(v.Line, Op386MOVWload, config.fe.TypeUInt16())
 11181  		v0.AuxInt = 4
 11182  		v0.AddArg(src)
 11183  		v0.AddArg(mem)
 11184  		v.AddArg(v0)
 11185  		v1 := b.NewValue0(v.Line, Op386MOVLstore, TypeMem)
 11186  		v1.AddArg(dst)
 11187  		v2 := b.NewValue0(v.Line, Op386MOVLload, config.fe.TypeUInt32())
 11188  		v2.AddArg(src)
 11189  		v2.AddArg(mem)
 11190  		v1.AddArg(v2)
 11191  		v1.AddArg(mem)
 11192  		v.AddArg(v1)
 11193  		return true
 11194  	}
 11195  	// match: (Move [s] dst src mem)
 11196  	// cond: SizeAndAlign(s).Size() == 7
 11197  	// result: (MOVLstore [3] dst (MOVLload [3] src mem) 		(MOVLstore dst (MOVLload src mem) mem))
 11198  	for {
 11199  		s := v.AuxInt
 11200  		dst := v.Args[0]
 11201  		src := v.Args[1]
 11202  		mem := v.Args[2]
 11203  		if !(SizeAndAlign(s).Size() == 7) {
 11204  			break
 11205  		}
 11206  		v.reset(Op386MOVLstore)
 11207  		v.AuxInt = 3
 11208  		v.AddArg(dst)
 11209  		v0 := b.NewValue0(v.Line, Op386MOVLload, config.fe.TypeUInt32())
 11210  		v0.AuxInt = 3
 11211  		v0.AddArg(src)
 11212  		v0.AddArg(mem)
 11213  		v.AddArg(v0)
 11214  		v1 := b.NewValue0(v.Line, Op386MOVLstore, TypeMem)
 11215  		v1.AddArg(dst)
 11216  		v2 := b.NewValue0(v.Line, Op386MOVLload, config.fe.TypeUInt32())
 11217  		v2.AddArg(src)
 11218  		v2.AddArg(mem)
 11219  		v1.AddArg(v2)
 11220  		v1.AddArg(mem)
 11221  		v.AddArg(v1)
 11222  		return true
 11223  	}
 11224  	// match: (Move [s] dst src mem)
 11225  	// cond: SizeAndAlign(s).Size() == 8
 11226  	// result: (MOVLstore [4] dst (MOVLload [4] src mem) 		(MOVLstore dst (MOVLload src mem) mem))
 11227  	for {
 11228  		s := v.AuxInt
 11229  		dst := v.Args[0]
 11230  		src := v.Args[1]
 11231  		mem := v.Args[2]
 11232  		if !(SizeAndAlign(s).Size() == 8) {
 11233  			break
 11234  		}
 11235  		v.reset(Op386MOVLstore)
 11236  		v.AuxInt = 4
 11237  		v.AddArg(dst)
 11238  		v0 := b.NewValue0(v.Line, Op386MOVLload, config.fe.TypeUInt32())
 11239  		v0.AuxInt = 4
 11240  		v0.AddArg(src)
 11241  		v0.AddArg(mem)
 11242  		v.AddArg(v0)
 11243  		v1 := b.NewValue0(v.Line, Op386MOVLstore, TypeMem)
 11244  		v1.AddArg(dst)
 11245  		v2 := b.NewValue0(v.Line, Op386MOVLload, config.fe.TypeUInt32())
 11246  		v2.AddArg(src)
 11247  		v2.AddArg(mem)
 11248  		v1.AddArg(v2)
 11249  		v1.AddArg(mem)
 11250  		v.AddArg(v1)
 11251  		return true
 11252  	}
 11253  	// match: (Move [s] dst src mem)
 11254  	// cond: SizeAndAlign(s).Size() > 8 && SizeAndAlign(s).Size()%4 != 0
 11255  	// 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))
 11256  	for {
 11257  		s := v.AuxInt
 11258  		dst := v.Args[0]
 11259  		src := v.Args[1]
 11260  		mem := v.Args[2]
 11261  		if !(SizeAndAlign(s).Size() > 8 && SizeAndAlign(s).Size()%4 != 0) {
 11262  			break
 11263  		}
 11264  		v.reset(OpMove)
 11265  		v.AuxInt = SizeAndAlign(s).Size() - SizeAndAlign(s).Size()%4
 11266  		v0 := b.NewValue0(v.Line, Op386ADDLconst, dst.Type)
 11267  		v0.AuxInt = SizeAndAlign(s).Size() % 4
 11268  		v0.AddArg(dst)
 11269  		v.AddArg(v0)
 11270  		v1 := b.NewValue0(v.Line, Op386ADDLconst, src.Type)
 11271  		v1.AuxInt = SizeAndAlign(s).Size() % 4
 11272  		v1.AddArg(src)
 11273  		v.AddArg(v1)
 11274  		v2 := b.NewValue0(v.Line, Op386MOVLstore, TypeMem)
 11275  		v2.AddArg(dst)
 11276  		v3 := b.NewValue0(v.Line, Op386MOVLload, config.fe.TypeUInt32())
 11277  		v3.AddArg(src)
 11278  		v3.AddArg(mem)
 11279  		v2.AddArg(v3)
 11280  		v2.AddArg(mem)
 11281  		v.AddArg(v2)
 11282  		return true
 11283  	}
 11284  	// match: (Move [s] dst src mem)
 11285  	// cond: SizeAndAlign(s).Size() > 8 && SizeAndAlign(s).Size() <= 4*128 && SizeAndAlign(s).Size()%4 == 0 	&& !config.noDuffDevice
 11286  	// result: (DUFFCOPY [10*(128-SizeAndAlign(s).Size()/4)] dst src mem)
 11287  	for {
 11288  		s := v.AuxInt
 11289  		dst := v.Args[0]
 11290  		src := v.Args[1]
 11291  		mem := v.Args[2]
 11292  		if !(SizeAndAlign(s).Size() > 8 && SizeAndAlign(s).Size() <= 4*128 && SizeAndAlign(s).Size()%4 == 0 && !config.noDuffDevice) {
 11293  			break
 11294  		}
 11295  		v.reset(Op386DUFFCOPY)
 11296  		v.AuxInt = 10 * (128 - SizeAndAlign(s).Size()/4)
 11297  		v.AddArg(dst)
 11298  		v.AddArg(src)
 11299  		v.AddArg(mem)
 11300  		return true
 11301  	}
 11302  	// match: (Move [s] dst src mem)
 11303  	// cond: (SizeAndAlign(s).Size() > 4*128 || config.noDuffDevice) && SizeAndAlign(s).Size()%4 == 0
 11304  	// result: (REPMOVSL dst src (MOVLconst [SizeAndAlign(s).Size()/4]) mem)
 11305  	for {
 11306  		s := v.AuxInt
 11307  		dst := v.Args[0]
 11308  		src := v.Args[1]
 11309  		mem := v.Args[2]
 11310  		if !((SizeAndAlign(s).Size() > 4*128 || config.noDuffDevice) && SizeAndAlign(s).Size()%4 == 0) {
 11311  			break
 11312  		}
 11313  		v.reset(Op386REPMOVSL)
 11314  		v.AddArg(dst)
 11315  		v.AddArg(src)
 11316  		v0 := b.NewValue0(v.Line, Op386MOVLconst, config.fe.TypeUInt32())
 11317  		v0.AuxInt = SizeAndAlign(s).Size() / 4
 11318  		v.AddArg(v0)
 11319  		v.AddArg(mem)
 11320  		return true
 11321  	}
 11322  	return false
 11323  }
 11324  func rewriteValue386_OpMul16(v *Value, config *Config) bool {
 11325  	b := v.Block
 11326  	_ = b
 11327  	// match: (Mul16  x y)
 11328  	// cond:
 11329  	// result: (MULL  x y)
 11330  	for {
 11331  		x := v.Args[0]
 11332  		y := v.Args[1]
 11333  		v.reset(Op386MULL)
 11334  		v.AddArg(x)
 11335  		v.AddArg(y)
 11336  		return true
 11337  	}
 11338  }
 11339  func rewriteValue386_OpMul32(v *Value, config *Config) bool {
 11340  	b := v.Block
 11341  	_ = b
 11342  	// match: (Mul32  x y)
 11343  	// cond:
 11344  	// result: (MULL  x y)
 11345  	for {
 11346  		x := v.Args[0]
 11347  		y := v.Args[1]
 11348  		v.reset(Op386MULL)
 11349  		v.AddArg(x)
 11350  		v.AddArg(y)
 11351  		return true
 11352  	}
 11353  }
 11354  func rewriteValue386_OpMul32F(v *Value, config *Config) bool {
 11355  	b := v.Block
 11356  	_ = b
 11357  	// match: (Mul32F x y)
 11358  	// cond:
 11359  	// result: (MULSS x y)
 11360  	for {
 11361  		x := v.Args[0]
 11362  		y := v.Args[1]
 11363  		v.reset(Op386MULSS)
 11364  		v.AddArg(x)
 11365  		v.AddArg(y)
 11366  		return true
 11367  	}
 11368  }
 11369  func rewriteValue386_OpMul32uhilo(v *Value, config *Config) bool {
 11370  	b := v.Block
 11371  	_ = b
 11372  	// match: (Mul32uhilo x y)
 11373  	// cond:
 11374  	// result: (MULLQU x y)
 11375  	for {
 11376  		x := v.Args[0]
 11377  		y := v.Args[1]
 11378  		v.reset(Op386MULLQU)
 11379  		v.AddArg(x)
 11380  		v.AddArg(y)
 11381  		return true
 11382  	}
 11383  }
 11384  func rewriteValue386_OpMul64F(v *Value, config *Config) bool {
 11385  	b := v.Block
 11386  	_ = b
 11387  	// match: (Mul64F x y)
 11388  	// cond:
 11389  	// result: (MULSD x y)
 11390  	for {
 11391  		x := v.Args[0]
 11392  		y := v.Args[1]
 11393  		v.reset(Op386MULSD)
 11394  		v.AddArg(x)
 11395  		v.AddArg(y)
 11396  		return true
 11397  	}
 11398  }
 11399  func rewriteValue386_OpMul8(v *Value, config *Config) bool {
 11400  	b := v.Block
 11401  	_ = b
 11402  	// match: (Mul8   x y)
 11403  	// cond:
 11404  	// result: (MULL  x y)
 11405  	for {
 11406  		x := v.Args[0]
 11407  		y := v.Args[1]
 11408  		v.reset(Op386MULL)
 11409  		v.AddArg(x)
 11410  		v.AddArg(y)
 11411  		return true
 11412  	}
 11413  }
 11414  func rewriteValue386_OpNeg16(v *Value, config *Config) bool {
 11415  	b := v.Block
 11416  	_ = b
 11417  	// match: (Neg16  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_OpNeg32(v *Value, config *Config) bool {
 11428  	b := v.Block
 11429  	_ = b
 11430  	// match: (Neg32  x)
 11431  	// cond:
 11432  	// result: (NEGL x)
 11433  	for {
 11434  		x := v.Args[0]
 11435  		v.reset(Op386NEGL)
 11436  		v.AddArg(x)
 11437  		return true
 11438  	}
 11439  }
 11440  func rewriteValue386_OpNeg32F(v *Value, config *Config) bool {
 11441  	b := v.Block
 11442  	_ = b
 11443  	// match: (Neg32F x)
 11444  	// cond: !config.use387
 11445  	// result: (PXOR x (MOVSSconst <config.Frontend().TypeFloat32()> [f2i(math.Copysign(0, -1))]))
 11446  	for {
 11447  		x := v.Args[0]
 11448  		if !(!config.use387) {
 11449  			break
 11450  		}
 11451  		v.reset(Op386PXOR)
 11452  		v.AddArg(x)
 11453  		v0 := b.NewValue0(v.Line, Op386MOVSSconst, config.Frontend().TypeFloat32())
 11454  		v0.AuxInt = f2i(math.Copysign(0, -1))
 11455  		v.AddArg(v0)
 11456  		return true
 11457  	}
 11458  	// match: (Neg32F x)
 11459  	// cond: config.use387
 11460  	// result: (FCHS x)
 11461  	for {
 11462  		x := v.Args[0]
 11463  		if !(config.use387) {
 11464  			break
 11465  		}
 11466  		v.reset(Op386FCHS)
 11467  		v.AddArg(x)
 11468  		return true
 11469  	}
 11470  	return false
 11471  }
 11472  func rewriteValue386_OpNeg64F(v *Value, config *Config) bool {
 11473  	b := v.Block
 11474  	_ = b
 11475  	// match: (Neg64F x)
 11476  	// cond: !config.use387
 11477  	// result: (PXOR x (MOVSDconst <config.Frontend().TypeFloat64()> [f2i(math.Copysign(0, -1))]))
 11478  	for {
 11479  		x := v.Args[0]
 11480  		if !(!config.use387) {
 11481  			break
 11482  		}
 11483  		v.reset(Op386PXOR)
 11484  		v.AddArg(x)
 11485  		v0 := b.NewValue0(v.Line, Op386MOVSDconst, config.Frontend().TypeFloat64())
 11486  		v0.AuxInt = f2i(math.Copysign(0, -1))
 11487  		v.AddArg(v0)
 11488  		return true
 11489  	}
 11490  	// match: (Neg64F x)
 11491  	// cond: config.use387
 11492  	// result: (FCHS x)
 11493  	for {
 11494  		x := v.Args[0]
 11495  		if !(config.use387) {
 11496  			break
 11497  		}
 11498  		v.reset(Op386FCHS)
 11499  		v.AddArg(x)
 11500  		return true
 11501  	}
 11502  	return false
 11503  }
 11504  func rewriteValue386_OpNeg8(v *Value, config *Config) bool {
 11505  	b := v.Block
 11506  	_ = b
 11507  	// match: (Neg8   x)
 11508  	// cond:
 11509  	// result: (NEGL x)
 11510  	for {
 11511  		x := v.Args[0]
 11512  		v.reset(Op386NEGL)
 11513  		v.AddArg(x)
 11514  		return true
 11515  	}
 11516  }
 11517  func rewriteValue386_OpNeq16(v *Value, config *Config) bool {
 11518  	b := v.Block
 11519  	_ = b
 11520  	// match: (Neq16  x y)
 11521  	// cond:
 11522  	// result: (SETNE (CMPW x y))
 11523  	for {
 11524  		x := v.Args[0]
 11525  		y := v.Args[1]
 11526  		v.reset(Op386SETNE)
 11527  		v0 := b.NewValue0(v.Line, Op386CMPW, TypeFlags)
 11528  		v0.AddArg(x)
 11529  		v0.AddArg(y)
 11530  		v.AddArg(v0)
 11531  		return true
 11532  	}
 11533  }
 11534  func rewriteValue386_OpNeq32(v *Value, config *Config) bool {
 11535  	b := v.Block
 11536  	_ = b
 11537  	// match: (Neq32  x y)
 11538  	// cond:
 11539  	// result: (SETNE (CMPL x y))
 11540  	for {
 11541  		x := v.Args[0]
 11542  		y := v.Args[1]
 11543  		v.reset(Op386SETNE)
 11544  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
 11545  		v0.AddArg(x)
 11546  		v0.AddArg(y)
 11547  		v.AddArg(v0)
 11548  		return true
 11549  	}
 11550  }
 11551  func rewriteValue386_OpNeq32F(v *Value, config *Config) bool {
 11552  	b := v.Block
 11553  	_ = b
 11554  	// match: (Neq32F x y)
 11555  	// cond:
 11556  	// result: (SETNEF (UCOMISS x y))
 11557  	for {
 11558  		x := v.Args[0]
 11559  		y := v.Args[1]
 11560  		v.reset(Op386SETNEF)
 11561  		v0 := b.NewValue0(v.Line, Op386UCOMISS, TypeFlags)
 11562  		v0.AddArg(x)
 11563  		v0.AddArg(y)
 11564  		v.AddArg(v0)
 11565  		return true
 11566  	}
 11567  }
 11568  func rewriteValue386_OpNeq64F(v *Value, config *Config) bool {
 11569  	b := v.Block
 11570  	_ = b
 11571  	// match: (Neq64F x y)
 11572  	// cond:
 11573  	// result: (SETNEF (UCOMISD x y))
 11574  	for {
 11575  		x := v.Args[0]
 11576  		y := v.Args[1]
 11577  		v.reset(Op386SETNEF)
 11578  		v0 := b.NewValue0(v.Line, Op386UCOMISD, TypeFlags)
 11579  		v0.AddArg(x)
 11580  		v0.AddArg(y)
 11581  		v.AddArg(v0)
 11582  		return true
 11583  	}
 11584  }
 11585  func rewriteValue386_OpNeq8(v *Value, config *Config) bool {
 11586  	b := v.Block
 11587  	_ = b
 11588  	// match: (Neq8   x y)
 11589  	// cond:
 11590  	// result: (SETNE (CMPB x y))
 11591  	for {
 11592  		x := v.Args[0]
 11593  		y := v.Args[1]
 11594  		v.reset(Op386SETNE)
 11595  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
 11596  		v0.AddArg(x)
 11597  		v0.AddArg(y)
 11598  		v.AddArg(v0)
 11599  		return true
 11600  	}
 11601  }
 11602  func rewriteValue386_OpNeqB(v *Value, config *Config) bool {
 11603  	b := v.Block
 11604  	_ = b
 11605  	// match: (NeqB   x y)
 11606  	// cond:
 11607  	// result: (SETNE (CMPB x y))
 11608  	for {
 11609  		x := v.Args[0]
 11610  		y := v.Args[1]
 11611  		v.reset(Op386SETNE)
 11612  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
 11613  		v0.AddArg(x)
 11614  		v0.AddArg(y)
 11615  		v.AddArg(v0)
 11616  		return true
 11617  	}
 11618  }
 11619  func rewriteValue386_OpNeqPtr(v *Value, config *Config) bool {
 11620  	b := v.Block
 11621  	_ = b
 11622  	// match: (NeqPtr x y)
 11623  	// cond:
 11624  	// result: (SETNE (CMPL x y))
 11625  	for {
 11626  		x := v.Args[0]
 11627  		y := v.Args[1]
 11628  		v.reset(Op386SETNE)
 11629  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
 11630  		v0.AddArg(x)
 11631  		v0.AddArg(y)
 11632  		v.AddArg(v0)
 11633  		return true
 11634  	}
 11635  }
 11636  func rewriteValue386_OpNilCheck(v *Value, config *Config) bool {
 11637  	b := v.Block
 11638  	_ = b
 11639  	// match: (NilCheck ptr mem)
 11640  	// cond:
 11641  	// result: (LoweredNilCheck ptr mem)
 11642  	for {
 11643  		ptr := v.Args[0]
 11644  		mem := v.Args[1]
 11645  		v.reset(Op386LoweredNilCheck)
 11646  		v.AddArg(ptr)
 11647  		v.AddArg(mem)
 11648  		return true
 11649  	}
 11650  }
 11651  func rewriteValue386_OpNot(v *Value, config *Config) bool {
 11652  	b := v.Block
 11653  	_ = b
 11654  	// match: (Not x)
 11655  	// cond:
 11656  	// result: (XORLconst [1] x)
 11657  	for {
 11658  		x := v.Args[0]
 11659  		v.reset(Op386XORLconst)
 11660  		v.AuxInt = 1
 11661  		v.AddArg(x)
 11662  		return true
 11663  	}
 11664  }
 11665  func rewriteValue386_OpOffPtr(v *Value, config *Config) bool {
 11666  	b := v.Block
 11667  	_ = b
 11668  	// match: (OffPtr [off] ptr)
 11669  	// cond:
 11670  	// result: (ADDLconst [off] ptr)
 11671  	for {
 11672  		off := v.AuxInt
 11673  		ptr := v.Args[0]
 11674  		v.reset(Op386ADDLconst)
 11675  		v.AuxInt = off
 11676  		v.AddArg(ptr)
 11677  		return true
 11678  	}
 11679  }
 11680  func rewriteValue386_OpOr16(v *Value, config *Config) bool {
 11681  	b := v.Block
 11682  	_ = b
 11683  	// match: (Or16 x y)
 11684  	// cond:
 11685  	// result: (ORL x y)
 11686  	for {
 11687  		x := v.Args[0]
 11688  		y := v.Args[1]
 11689  		v.reset(Op386ORL)
 11690  		v.AddArg(x)
 11691  		v.AddArg(y)
 11692  		return true
 11693  	}
 11694  }
 11695  func rewriteValue386_OpOr32(v *Value, config *Config) bool {
 11696  	b := v.Block
 11697  	_ = b
 11698  	// match: (Or32 x y)
 11699  	// cond:
 11700  	// result: (ORL x y)
 11701  	for {
 11702  		x := v.Args[0]
 11703  		y := v.Args[1]
 11704  		v.reset(Op386ORL)
 11705  		v.AddArg(x)
 11706  		v.AddArg(y)
 11707  		return true
 11708  	}
 11709  }
 11710  func rewriteValue386_OpOr8(v *Value, config *Config) bool {
 11711  	b := v.Block
 11712  	_ = b
 11713  	// match: (Or8  x y)
 11714  	// cond:
 11715  	// result: (ORL x y)
 11716  	for {
 11717  		x := v.Args[0]
 11718  		y := v.Args[1]
 11719  		v.reset(Op386ORL)
 11720  		v.AddArg(x)
 11721  		v.AddArg(y)
 11722  		return true
 11723  	}
 11724  }
 11725  func rewriteValue386_OpOrB(v *Value, config *Config) bool {
 11726  	b := v.Block
 11727  	_ = b
 11728  	// match: (OrB x y)
 11729  	// cond:
 11730  	// result: (ORL x y)
 11731  	for {
 11732  		x := v.Args[0]
 11733  		y := v.Args[1]
 11734  		v.reset(Op386ORL)
 11735  		v.AddArg(x)
 11736  		v.AddArg(y)
 11737  		return true
 11738  	}
 11739  }
 11740  func rewriteValue386_OpRsh16Ux16(v *Value, config *Config) bool {
 11741  	b := v.Block
 11742  	_ = b
 11743  	// match: (Rsh16Ux16 <t> x y)
 11744  	// cond:
 11745  	// result: (ANDL (SHRW <t> x y) (SBBLcarrymask <t> (CMPWconst y [16])))
 11746  	for {
 11747  		t := v.Type
 11748  		x := v.Args[0]
 11749  		y := v.Args[1]
 11750  		v.reset(Op386ANDL)
 11751  		v0 := b.NewValue0(v.Line, Op386SHRW, t)
 11752  		v0.AddArg(x)
 11753  		v0.AddArg(y)
 11754  		v.AddArg(v0)
 11755  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 11756  		v2 := b.NewValue0(v.Line, Op386CMPWconst, TypeFlags)
 11757  		v2.AuxInt = 16
 11758  		v2.AddArg(y)
 11759  		v1.AddArg(v2)
 11760  		v.AddArg(v1)
 11761  		return true
 11762  	}
 11763  }
 11764  func rewriteValue386_OpRsh16Ux32(v *Value, config *Config) bool {
 11765  	b := v.Block
 11766  	_ = b
 11767  	// match: (Rsh16Ux32 <t> x y)
 11768  	// cond:
 11769  	// result: (ANDL (SHRW <t> x y) (SBBLcarrymask <t> (CMPLconst y [16])))
 11770  	for {
 11771  		t := v.Type
 11772  		x := v.Args[0]
 11773  		y := v.Args[1]
 11774  		v.reset(Op386ANDL)
 11775  		v0 := b.NewValue0(v.Line, Op386SHRW, t)
 11776  		v0.AddArg(x)
 11777  		v0.AddArg(y)
 11778  		v.AddArg(v0)
 11779  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 11780  		v2 := b.NewValue0(v.Line, Op386CMPLconst, TypeFlags)
 11781  		v2.AuxInt = 16
 11782  		v2.AddArg(y)
 11783  		v1.AddArg(v2)
 11784  		v.AddArg(v1)
 11785  		return true
 11786  	}
 11787  }
 11788  func rewriteValue386_OpRsh16Ux64(v *Value, config *Config) bool {
 11789  	b := v.Block
 11790  	_ = b
 11791  	// match: (Rsh16Ux64 x (Const64 [c]))
 11792  	// cond: uint64(c) < 16
 11793  	// result: (SHRWconst x [c])
 11794  	for {
 11795  		x := v.Args[0]
 11796  		v_1 := v.Args[1]
 11797  		if v_1.Op != OpConst64 {
 11798  			break
 11799  		}
 11800  		c := v_1.AuxInt
 11801  		if !(uint64(c) < 16) {
 11802  			break
 11803  		}
 11804  		v.reset(Op386SHRWconst)
 11805  		v.AuxInt = c
 11806  		v.AddArg(x)
 11807  		return true
 11808  	}
 11809  	// match: (Rsh16Ux64 _ (Const64 [c]))
 11810  	// cond: uint64(c) >= 16
 11811  	// result: (Const16 [0])
 11812  	for {
 11813  		v_1 := v.Args[1]
 11814  		if v_1.Op != OpConst64 {
 11815  			break
 11816  		}
 11817  		c := v_1.AuxInt
 11818  		if !(uint64(c) >= 16) {
 11819  			break
 11820  		}
 11821  		v.reset(OpConst16)
 11822  		v.AuxInt = 0
 11823  		return true
 11824  	}
 11825  	return false
 11826  }
 11827  func rewriteValue386_OpRsh16Ux8(v *Value, config *Config) bool {
 11828  	b := v.Block
 11829  	_ = b
 11830  	// match: (Rsh16Ux8  <t> x y)
 11831  	// cond:
 11832  	// result: (ANDL (SHRW <t> x y) (SBBLcarrymask <t> (CMPBconst y [16])))
 11833  	for {
 11834  		t := v.Type
 11835  		x := v.Args[0]
 11836  		y := v.Args[1]
 11837  		v.reset(Op386ANDL)
 11838  		v0 := b.NewValue0(v.Line, Op386SHRW, t)
 11839  		v0.AddArg(x)
 11840  		v0.AddArg(y)
 11841  		v.AddArg(v0)
 11842  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 11843  		v2 := b.NewValue0(v.Line, Op386CMPBconst, TypeFlags)
 11844  		v2.AuxInt = 16
 11845  		v2.AddArg(y)
 11846  		v1.AddArg(v2)
 11847  		v.AddArg(v1)
 11848  		return true
 11849  	}
 11850  }
 11851  func rewriteValue386_OpRsh16x16(v *Value, config *Config) bool {
 11852  	b := v.Block
 11853  	_ = b
 11854  	// match: (Rsh16x16 <t> x y)
 11855  	// cond:
 11856  	// result: (SARW <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPWconst y [16])))))
 11857  	for {
 11858  		t := v.Type
 11859  		x := v.Args[0]
 11860  		y := v.Args[1]
 11861  		v.reset(Op386SARW)
 11862  		v.Type = t
 11863  		v.AddArg(x)
 11864  		v0 := b.NewValue0(v.Line, Op386ORL, y.Type)
 11865  		v0.AddArg(y)
 11866  		v1 := b.NewValue0(v.Line, Op386NOTL, y.Type)
 11867  		v2 := b.NewValue0(v.Line, Op386SBBLcarrymask, y.Type)
 11868  		v3 := b.NewValue0(v.Line, Op386CMPWconst, TypeFlags)
 11869  		v3.AuxInt = 16
 11870  		v3.AddArg(y)
 11871  		v2.AddArg(v3)
 11872  		v1.AddArg(v2)
 11873  		v0.AddArg(v1)
 11874  		v.AddArg(v0)
 11875  		return true
 11876  	}
 11877  }
 11878  func rewriteValue386_OpRsh16x32(v *Value, config *Config) bool {
 11879  	b := v.Block
 11880  	_ = b
 11881  	// match: (Rsh16x32 <t> x y)
 11882  	// cond:
 11883  	// result: (SARW <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPLconst y [16])))))
 11884  	for {
 11885  		t := v.Type
 11886  		x := v.Args[0]
 11887  		y := v.Args[1]
 11888  		v.reset(Op386SARW)
 11889  		v.Type = t
 11890  		v.AddArg(x)
 11891  		v0 := b.NewValue0(v.Line, Op386ORL, y.Type)
 11892  		v0.AddArg(y)
 11893  		v1 := b.NewValue0(v.Line, Op386NOTL, y.Type)
 11894  		v2 := b.NewValue0(v.Line, Op386SBBLcarrymask, y.Type)
 11895  		v3 := b.NewValue0(v.Line, Op386CMPLconst, TypeFlags)
 11896  		v3.AuxInt = 16
 11897  		v3.AddArg(y)
 11898  		v2.AddArg(v3)
 11899  		v1.AddArg(v2)
 11900  		v0.AddArg(v1)
 11901  		v.AddArg(v0)
 11902  		return true
 11903  	}
 11904  }
 11905  func rewriteValue386_OpRsh16x64(v *Value, config *Config) bool {
 11906  	b := v.Block
 11907  	_ = b
 11908  	// match: (Rsh16x64 x (Const64 [c]))
 11909  	// cond: uint64(c) < 16
 11910  	// result: (SARWconst x [c])
 11911  	for {
 11912  		x := v.Args[0]
 11913  		v_1 := v.Args[1]
 11914  		if v_1.Op != OpConst64 {
 11915  			break
 11916  		}
 11917  		c := v_1.AuxInt
 11918  		if !(uint64(c) < 16) {
 11919  			break
 11920  		}
 11921  		v.reset(Op386SARWconst)
 11922  		v.AuxInt = c
 11923  		v.AddArg(x)
 11924  		return true
 11925  	}
 11926  	// match: (Rsh16x64 x (Const64 [c]))
 11927  	// cond: uint64(c) >= 16
 11928  	// result: (SARWconst x [15])
 11929  	for {
 11930  		x := v.Args[0]
 11931  		v_1 := v.Args[1]
 11932  		if v_1.Op != OpConst64 {
 11933  			break
 11934  		}
 11935  		c := v_1.AuxInt
 11936  		if !(uint64(c) >= 16) {
 11937  			break
 11938  		}
 11939  		v.reset(Op386SARWconst)
 11940  		v.AuxInt = 15
 11941  		v.AddArg(x)
 11942  		return true
 11943  	}
 11944  	return false
 11945  }
 11946  func rewriteValue386_OpRsh16x8(v *Value, config *Config) bool {
 11947  	b := v.Block
 11948  	_ = b
 11949  	// match: (Rsh16x8  <t> x y)
 11950  	// cond:
 11951  	// result: (SARW <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPBconst y [16])))))
 11952  	for {
 11953  		t := v.Type
 11954  		x := v.Args[0]
 11955  		y := v.Args[1]
 11956  		v.reset(Op386SARW)
 11957  		v.Type = t
 11958  		v.AddArg(x)
 11959  		v0 := b.NewValue0(v.Line, Op386ORL, y.Type)
 11960  		v0.AddArg(y)
 11961  		v1 := b.NewValue0(v.Line, Op386NOTL, y.Type)
 11962  		v2 := b.NewValue0(v.Line, Op386SBBLcarrymask, y.Type)
 11963  		v3 := b.NewValue0(v.Line, Op386CMPBconst, TypeFlags)
 11964  		v3.AuxInt = 16
 11965  		v3.AddArg(y)
 11966  		v2.AddArg(v3)
 11967  		v1.AddArg(v2)
 11968  		v0.AddArg(v1)
 11969  		v.AddArg(v0)
 11970  		return true
 11971  	}
 11972  }
 11973  func rewriteValue386_OpRsh32Ux16(v *Value, config *Config) bool {
 11974  	b := v.Block
 11975  	_ = b
 11976  	// match: (Rsh32Ux16 <t> x y)
 11977  	// cond:
 11978  	// result: (ANDL (SHRL <t> x y) (SBBLcarrymask <t> (CMPWconst y [32])))
 11979  	for {
 11980  		t := v.Type
 11981  		x := v.Args[0]
 11982  		y := v.Args[1]
 11983  		v.reset(Op386ANDL)
 11984  		v0 := b.NewValue0(v.Line, Op386SHRL, t)
 11985  		v0.AddArg(x)
 11986  		v0.AddArg(y)
 11987  		v.AddArg(v0)
 11988  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 11989  		v2 := b.NewValue0(v.Line, Op386CMPWconst, TypeFlags)
 11990  		v2.AuxInt = 32
 11991  		v2.AddArg(y)
 11992  		v1.AddArg(v2)
 11993  		v.AddArg(v1)
 11994  		return true
 11995  	}
 11996  }
 11997  func rewriteValue386_OpRsh32Ux32(v *Value, config *Config) bool {
 11998  	b := v.Block
 11999  	_ = b
 12000  	// match: (Rsh32Ux32 <t> x y)
 12001  	// cond:
 12002  	// result: (ANDL (SHRL <t> x y) (SBBLcarrymask <t> (CMPLconst y [32])))
 12003  	for {
 12004  		t := v.Type
 12005  		x := v.Args[0]
 12006  		y := v.Args[1]
 12007  		v.reset(Op386ANDL)
 12008  		v0 := b.NewValue0(v.Line, Op386SHRL, t)
 12009  		v0.AddArg(x)
 12010  		v0.AddArg(y)
 12011  		v.AddArg(v0)
 12012  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 12013  		v2 := b.NewValue0(v.Line, Op386CMPLconst, TypeFlags)
 12014  		v2.AuxInt = 32
 12015  		v2.AddArg(y)
 12016  		v1.AddArg(v2)
 12017  		v.AddArg(v1)
 12018  		return true
 12019  	}
 12020  }
 12021  func rewriteValue386_OpRsh32Ux64(v *Value, config *Config) bool {
 12022  	b := v.Block
 12023  	_ = b
 12024  	// match: (Rsh32Ux64 x (Const64 [c]))
 12025  	// cond: uint64(c) < 32
 12026  	// result: (SHRLconst x [c])
 12027  	for {
 12028  		x := v.Args[0]
 12029  		v_1 := v.Args[1]
 12030  		if v_1.Op != OpConst64 {
 12031  			break
 12032  		}
 12033  		c := v_1.AuxInt
 12034  		if !(uint64(c) < 32) {
 12035  			break
 12036  		}
 12037  		v.reset(Op386SHRLconst)
 12038  		v.AuxInt = c
 12039  		v.AddArg(x)
 12040  		return true
 12041  	}
 12042  	// match: (Rsh32Ux64 _ (Const64 [c]))
 12043  	// cond: uint64(c) >= 32
 12044  	// result: (Const32 [0])
 12045  	for {
 12046  		v_1 := v.Args[1]
 12047  		if v_1.Op != OpConst64 {
 12048  			break
 12049  		}
 12050  		c := v_1.AuxInt
 12051  		if !(uint64(c) >= 32) {
 12052  			break
 12053  		}
 12054  		v.reset(OpConst32)
 12055  		v.AuxInt = 0
 12056  		return true
 12057  	}
 12058  	return false
 12059  }
 12060  func rewriteValue386_OpRsh32Ux8(v *Value, config *Config) bool {
 12061  	b := v.Block
 12062  	_ = b
 12063  	// match: (Rsh32Ux8  <t> x y)
 12064  	// cond:
 12065  	// result: (ANDL (SHRL <t> x y) (SBBLcarrymask <t> (CMPBconst y [32])))
 12066  	for {
 12067  		t := v.Type
 12068  		x := v.Args[0]
 12069  		y := v.Args[1]
 12070  		v.reset(Op386ANDL)
 12071  		v0 := b.NewValue0(v.Line, Op386SHRL, t)
 12072  		v0.AddArg(x)
 12073  		v0.AddArg(y)
 12074  		v.AddArg(v0)
 12075  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 12076  		v2 := b.NewValue0(v.Line, Op386CMPBconst, TypeFlags)
 12077  		v2.AuxInt = 32
 12078  		v2.AddArg(y)
 12079  		v1.AddArg(v2)
 12080  		v.AddArg(v1)
 12081  		return true
 12082  	}
 12083  }
 12084  func rewriteValue386_OpRsh32x16(v *Value, config *Config) bool {
 12085  	b := v.Block
 12086  	_ = b
 12087  	// match: (Rsh32x16 <t> x y)
 12088  	// cond:
 12089  	// result: (SARL <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPWconst y [32])))))
 12090  	for {
 12091  		t := v.Type
 12092  		x := v.Args[0]
 12093  		y := v.Args[1]
 12094  		v.reset(Op386SARL)
 12095  		v.Type = t
 12096  		v.AddArg(x)
 12097  		v0 := b.NewValue0(v.Line, Op386ORL, y.Type)
 12098  		v0.AddArg(y)
 12099  		v1 := b.NewValue0(v.Line, Op386NOTL, y.Type)
 12100  		v2 := b.NewValue0(v.Line, Op386SBBLcarrymask, y.Type)
 12101  		v3 := b.NewValue0(v.Line, Op386CMPWconst, TypeFlags)
 12102  		v3.AuxInt = 32
 12103  		v3.AddArg(y)
 12104  		v2.AddArg(v3)
 12105  		v1.AddArg(v2)
 12106  		v0.AddArg(v1)
 12107  		v.AddArg(v0)
 12108  		return true
 12109  	}
 12110  }
 12111  func rewriteValue386_OpRsh32x32(v *Value, config *Config) bool {
 12112  	b := v.Block
 12113  	_ = b
 12114  	// match: (Rsh32x32 <t> x y)
 12115  	// cond:
 12116  	// result: (SARL <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPLconst y [32])))))
 12117  	for {
 12118  		t := v.Type
 12119  		x := v.Args[0]
 12120  		y := v.Args[1]
 12121  		v.reset(Op386SARL)
 12122  		v.Type = t
 12123  		v.AddArg(x)
 12124  		v0 := b.NewValue0(v.Line, Op386ORL, y.Type)
 12125  		v0.AddArg(y)
 12126  		v1 := b.NewValue0(v.Line, Op386NOTL, y.Type)
 12127  		v2 := b.NewValue0(v.Line, Op386SBBLcarrymask, y.Type)
 12128  		v3 := b.NewValue0(v.Line, Op386CMPLconst, TypeFlags)
 12129  		v3.AuxInt = 32
 12130  		v3.AddArg(y)
 12131  		v2.AddArg(v3)
 12132  		v1.AddArg(v2)
 12133  		v0.AddArg(v1)
 12134  		v.AddArg(v0)
 12135  		return true
 12136  	}
 12137  }
 12138  func rewriteValue386_OpRsh32x64(v *Value, config *Config) bool {
 12139  	b := v.Block
 12140  	_ = b
 12141  	// match: (Rsh32x64 x (Const64 [c]))
 12142  	// cond: uint64(c) < 32
 12143  	// result: (SARLconst x [c])
 12144  	for {
 12145  		x := v.Args[0]
 12146  		v_1 := v.Args[1]
 12147  		if v_1.Op != OpConst64 {
 12148  			break
 12149  		}
 12150  		c := v_1.AuxInt
 12151  		if !(uint64(c) < 32) {
 12152  			break
 12153  		}
 12154  		v.reset(Op386SARLconst)
 12155  		v.AuxInt = c
 12156  		v.AddArg(x)
 12157  		return true
 12158  	}
 12159  	// match: (Rsh32x64 x (Const64 [c]))
 12160  	// cond: uint64(c) >= 32
 12161  	// result: (SARLconst x [31])
 12162  	for {
 12163  		x := v.Args[0]
 12164  		v_1 := v.Args[1]
 12165  		if v_1.Op != OpConst64 {
 12166  			break
 12167  		}
 12168  		c := v_1.AuxInt
 12169  		if !(uint64(c) >= 32) {
 12170  			break
 12171  		}
 12172  		v.reset(Op386SARLconst)
 12173  		v.AuxInt = 31
 12174  		v.AddArg(x)
 12175  		return true
 12176  	}
 12177  	return false
 12178  }
 12179  func rewriteValue386_OpRsh32x8(v *Value, config *Config) bool {
 12180  	b := v.Block
 12181  	_ = b
 12182  	// match: (Rsh32x8  <t> x y)
 12183  	// cond:
 12184  	// result: (SARL <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPBconst y [32])))))
 12185  	for {
 12186  		t := v.Type
 12187  		x := v.Args[0]
 12188  		y := v.Args[1]
 12189  		v.reset(Op386SARL)
 12190  		v.Type = t
 12191  		v.AddArg(x)
 12192  		v0 := b.NewValue0(v.Line, Op386ORL, y.Type)
 12193  		v0.AddArg(y)
 12194  		v1 := b.NewValue0(v.Line, Op386NOTL, y.Type)
 12195  		v2 := b.NewValue0(v.Line, Op386SBBLcarrymask, y.Type)
 12196  		v3 := b.NewValue0(v.Line, Op386CMPBconst, TypeFlags)
 12197  		v3.AuxInt = 32
 12198  		v3.AddArg(y)
 12199  		v2.AddArg(v3)
 12200  		v1.AddArg(v2)
 12201  		v0.AddArg(v1)
 12202  		v.AddArg(v0)
 12203  		return true
 12204  	}
 12205  }
 12206  func rewriteValue386_OpRsh8Ux16(v *Value, config *Config) bool {
 12207  	b := v.Block
 12208  	_ = b
 12209  	// match: (Rsh8Ux16 <t> x y)
 12210  	// cond:
 12211  	// result: (ANDL (SHRB <t> x y) (SBBLcarrymask <t> (CMPWconst y [8])))
 12212  	for {
 12213  		t := v.Type
 12214  		x := v.Args[0]
 12215  		y := v.Args[1]
 12216  		v.reset(Op386ANDL)
 12217  		v0 := b.NewValue0(v.Line, Op386SHRB, t)
 12218  		v0.AddArg(x)
 12219  		v0.AddArg(y)
 12220  		v.AddArg(v0)
 12221  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 12222  		v2 := b.NewValue0(v.Line, Op386CMPWconst, TypeFlags)
 12223  		v2.AuxInt = 8
 12224  		v2.AddArg(y)
 12225  		v1.AddArg(v2)
 12226  		v.AddArg(v1)
 12227  		return true
 12228  	}
 12229  }
 12230  func rewriteValue386_OpRsh8Ux32(v *Value, config *Config) bool {
 12231  	b := v.Block
 12232  	_ = b
 12233  	// match: (Rsh8Ux32 <t> x y)
 12234  	// cond:
 12235  	// result: (ANDL (SHRB <t> x y) (SBBLcarrymask <t> (CMPLconst y [8])))
 12236  	for {
 12237  		t := v.Type
 12238  		x := v.Args[0]
 12239  		y := v.Args[1]
 12240  		v.reset(Op386ANDL)
 12241  		v0 := b.NewValue0(v.Line, Op386SHRB, t)
 12242  		v0.AddArg(x)
 12243  		v0.AddArg(y)
 12244  		v.AddArg(v0)
 12245  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 12246  		v2 := b.NewValue0(v.Line, Op386CMPLconst, TypeFlags)
 12247  		v2.AuxInt = 8
 12248  		v2.AddArg(y)
 12249  		v1.AddArg(v2)
 12250  		v.AddArg(v1)
 12251  		return true
 12252  	}
 12253  }
 12254  func rewriteValue386_OpRsh8Ux64(v *Value, config *Config) bool {
 12255  	b := v.Block
 12256  	_ = b
 12257  	// match: (Rsh8Ux64 x (Const64 [c]))
 12258  	// cond: uint64(c) < 8
 12259  	// result: (SHRBconst x [c])
 12260  	for {
 12261  		x := v.Args[0]
 12262  		v_1 := v.Args[1]
 12263  		if v_1.Op != OpConst64 {
 12264  			break
 12265  		}
 12266  		c := v_1.AuxInt
 12267  		if !(uint64(c) < 8) {
 12268  			break
 12269  		}
 12270  		v.reset(Op386SHRBconst)
 12271  		v.AuxInt = c
 12272  		v.AddArg(x)
 12273  		return true
 12274  	}
 12275  	// match: (Rsh8Ux64 _ (Const64 [c]))
 12276  	// cond: uint64(c) >= 8
 12277  	// result: (Const8 [0])
 12278  	for {
 12279  		v_1 := v.Args[1]
 12280  		if v_1.Op != OpConst64 {
 12281  			break
 12282  		}
 12283  		c := v_1.AuxInt
 12284  		if !(uint64(c) >= 8) {
 12285  			break
 12286  		}
 12287  		v.reset(OpConst8)
 12288  		v.AuxInt = 0
 12289  		return true
 12290  	}
 12291  	return false
 12292  }
 12293  func rewriteValue386_OpRsh8Ux8(v *Value, config *Config) bool {
 12294  	b := v.Block
 12295  	_ = b
 12296  	// match: (Rsh8Ux8  <t> x y)
 12297  	// cond:
 12298  	// result: (ANDL (SHRB <t> x y) (SBBLcarrymask <t> (CMPBconst y [8])))
 12299  	for {
 12300  		t := v.Type
 12301  		x := v.Args[0]
 12302  		y := v.Args[1]
 12303  		v.reset(Op386ANDL)
 12304  		v0 := b.NewValue0(v.Line, Op386SHRB, t)
 12305  		v0.AddArg(x)
 12306  		v0.AddArg(y)
 12307  		v.AddArg(v0)
 12308  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 12309  		v2 := b.NewValue0(v.Line, Op386CMPBconst, TypeFlags)
 12310  		v2.AuxInt = 8
 12311  		v2.AddArg(y)
 12312  		v1.AddArg(v2)
 12313  		v.AddArg(v1)
 12314  		return true
 12315  	}
 12316  }
 12317  func rewriteValue386_OpRsh8x16(v *Value, config *Config) bool {
 12318  	b := v.Block
 12319  	_ = b
 12320  	// match: (Rsh8x16 <t> x y)
 12321  	// cond:
 12322  	// result: (SARB <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPWconst y [8])))))
 12323  	for {
 12324  		t := v.Type
 12325  		x := v.Args[0]
 12326  		y := v.Args[1]
 12327  		v.reset(Op386SARB)
 12328  		v.Type = t
 12329  		v.AddArg(x)
 12330  		v0 := b.NewValue0(v.Line, Op386ORL, y.Type)
 12331  		v0.AddArg(y)
 12332  		v1 := b.NewValue0(v.Line, Op386NOTL, y.Type)
 12333  		v2 := b.NewValue0(v.Line, Op386SBBLcarrymask, y.Type)
 12334  		v3 := b.NewValue0(v.Line, Op386CMPWconst, TypeFlags)
 12335  		v3.AuxInt = 8
 12336  		v3.AddArg(y)
 12337  		v2.AddArg(v3)
 12338  		v1.AddArg(v2)
 12339  		v0.AddArg(v1)
 12340  		v.AddArg(v0)
 12341  		return true
 12342  	}
 12343  }
 12344  func rewriteValue386_OpRsh8x32(v *Value, config *Config) bool {
 12345  	b := v.Block
 12346  	_ = b
 12347  	// match: (Rsh8x32 <t> x y)
 12348  	// cond:
 12349  	// result: (SARB <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPLconst y [8])))))
 12350  	for {
 12351  		t := v.Type
 12352  		x := v.Args[0]
 12353  		y := v.Args[1]
 12354  		v.reset(Op386SARB)
 12355  		v.Type = t
 12356  		v.AddArg(x)
 12357  		v0 := b.NewValue0(v.Line, Op386ORL, y.Type)
 12358  		v0.AddArg(y)
 12359  		v1 := b.NewValue0(v.Line, Op386NOTL, y.Type)
 12360  		v2 := b.NewValue0(v.Line, Op386SBBLcarrymask, y.Type)
 12361  		v3 := b.NewValue0(v.Line, Op386CMPLconst, TypeFlags)
 12362  		v3.AuxInt = 8
 12363  		v3.AddArg(y)
 12364  		v2.AddArg(v3)
 12365  		v1.AddArg(v2)
 12366  		v0.AddArg(v1)
 12367  		v.AddArg(v0)
 12368  		return true
 12369  	}
 12370  }
 12371  func rewriteValue386_OpRsh8x64(v *Value, config *Config) bool {
 12372  	b := v.Block
 12373  	_ = b
 12374  	// match: (Rsh8x64 x (Const64 [c]))
 12375  	// cond: uint64(c) < 8
 12376  	// result: (SARBconst x [c])
 12377  	for {
 12378  		x := v.Args[0]
 12379  		v_1 := v.Args[1]
 12380  		if v_1.Op != OpConst64 {
 12381  			break
 12382  		}
 12383  		c := v_1.AuxInt
 12384  		if !(uint64(c) < 8) {
 12385  			break
 12386  		}
 12387  		v.reset(Op386SARBconst)
 12388  		v.AuxInt = c
 12389  		v.AddArg(x)
 12390  		return true
 12391  	}
 12392  	// match: (Rsh8x64 x (Const64 [c]))
 12393  	// cond: uint64(c) >= 8
 12394  	// result: (SARBconst x [7])
 12395  	for {
 12396  		x := v.Args[0]
 12397  		v_1 := v.Args[1]
 12398  		if v_1.Op != OpConst64 {
 12399  			break
 12400  		}
 12401  		c := v_1.AuxInt
 12402  		if !(uint64(c) >= 8) {
 12403  			break
 12404  		}
 12405  		v.reset(Op386SARBconst)
 12406  		v.AuxInt = 7
 12407  		v.AddArg(x)
 12408  		return true
 12409  	}
 12410  	return false
 12411  }
 12412  func rewriteValue386_OpRsh8x8(v *Value, config *Config) bool {
 12413  	b := v.Block
 12414  	_ = b
 12415  	// match: (Rsh8x8  <t> x y)
 12416  	// cond:
 12417  	// result: (SARB <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPBconst y [8])))))
 12418  	for {
 12419  		t := v.Type
 12420  		x := v.Args[0]
 12421  		y := v.Args[1]
 12422  		v.reset(Op386SARB)
 12423  		v.Type = t
 12424  		v.AddArg(x)
 12425  		v0 := b.NewValue0(v.Line, Op386ORL, y.Type)
 12426  		v0.AddArg(y)
 12427  		v1 := b.NewValue0(v.Line, Op386NOTL, y.Type)
 12428  		v2 := b.NewValue0(v.Line, Op386SBBLcarrymask, y.Type)
 12429  		v3 := b.NewValue0(v.Line, Op386CMPBconst, TypeFlags)
 12430  		v3.AuxInt = 8
 12431  		v3.AddArg(y)
 12432  		v2.AddArg(v3)
 12433  		v1.AddArg(v2)
 12434  		v0.AddArg(v1)
 12435  		v.AddArg(v0)
 12436  		return true
 12437  	}
 12438  }
 12439  func rewriteValue386_OpSignExt16to32(v *Value, config *Config) bool {
 12440  	b := v.Block
 12441  	_ = b
 12442  	// match: (SignExt16to32 x)
 12443  	// cond:
 12444  	// result: (MOVWLSX x)
 12445  	for {
 12446  		x := v.Args[0]
 12447  		v.reset(Op386MOVWLSX)
 12448  		v.AddArg(x)
 12449  		return true
 12450  	}
 12451  }
 12452  func rewriteValue386_OpSignExt8to16(v *Value, config *Config) bool {
 12453  	b := v.Block
 12454  	_ = b
 12455  	// match: (SignExt8to16  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_OpSignExt8to32(v *Value, config *Config) bool {
 12466  	b := v.Block
 12467  	_ = b
 12468  	// match: (SignExt8to32  x)
 12469  	// cond:
 12470  	// result: (MOVBLSX x)
 12471  	for {
 12472  		x := v.Args[0]
 12473  		v.reset(Op386MOVBLSX)
 12474  		v.AddArg(x)
 12475  		return true
 12476  	}
 12477  }
 12478  func rewriteValue386_OpSignmask(v *Value, config *Config) bool {
 12479  	b := v.Block
 12480  	_ = b
 12481  	// match: (Signmask x)
 12482  	// cond:
 12483  	// result: (SARLconst x [31])
 12484  	for {
 12485  		x := v.Args[0]
 12486  		v.reset(Op386SARLconst)
 12487  		v.AuxInt = 31
 12488  		v.AddArg(x)
 12489  		return true
 12490  	}
 12491  }
 12492  func rewriteValue386_OpSqrt(v *Value, config *Config) bool {
 12493  	b := v.Block
 12494  	_ = b
 12495  	// match: (Sqrt x)
 12496  	// cond:
 12497  	// result: (SQRTSD x)
 12498  	for {
 12499  		x := v.Args[0]
 12500  		v.reset(Op386SQRTSD)
 12501  		v.AddArg(x)
 12502  		return true
 12503  	}
 12504  }
 12505  func rewriteValue386_OpStaticCall(v *Value, config *Config) bool {
 12506  	b := v.Block
 12507  	_ = b
 12508  	// match: (StaticCall [argwid] {target} mem)
 12509  	// cond:
 12510  	// result: (CALLstatic [argwid] {target} mem)
 12511  	for {
 12512  		argwid := v.AuxInt
 12513  		target := v.Aux
 12514  		mem := v.Args[0]
 12515  		v.reset(Op386CALLstatic)
 12516  		v.AuxInt = argwid
 12517  		v.Aux = target
 12518  		v.AddArg(mem)
 12519  		return true
 12520  	}
 12521  }
 12522  func rewriteValue386_OpStore(v *Value, config *Config) bool {
 12523  	b := v.Block
 12524  	_ = b
 12525  	// match: (Store [8] ptr val mem)
 12526  	// cond: is64BitFloat(val.Type)
 12527  	// result: (MOVSDstore ptr val mem)
 12528  	for {
 12529  		if v.AuxInt != 8 {
 12530  			break
 12531  		}
 12532  		ptr := v.Args[0]
 12533  		val := v.Args[1]
 12534  		mem := v.Args[2]
 12535  		if !(is64BitFloat(val.Type)) {
 12536  			break
 12537  		}
 12538  		v.reset(Op386MOVSDstore)
 12539  		v.AddArg(ptr)
 12540  		v.AddArg(val)
 12541  		v.AddArg(mem)
 12542  		return true
 12543  	}
 12544  	// match: (Store [4] ptr val mem)
 12545  	// cond: is32BitFloat(val.Type)
 12546  	// result: (MOVSSstore ptr val mem)
 12547  	for {
 12548  		if v.AuxInt != 4 {
 12549  			break
 12550  		}
 12551  		ptr := v.Args[0]
 12552  		val := v.Args[1]
 12553  		mem := v.Args[2]
 12554  		if !(is32BitFloat(val.Type)) {
 12555  			break
 12556  		}
 12557  		v.reset(Op386MOVSSstore)
 12558  		v.AddArg(ptr)
 12559  		v.AddArg(val)
 12560  		v.AddArg(mem)
 12561  		return true
 12562  	}
 12563  	// match: (Store [4] ptr val mem)
 12564  	// cond:
 12565  	// result: (MOVLstore ptr val mem)
 12566  	for {
 12567  		if v.AuxInt != 4 {
 12568  			break
 12569  		}
 12570  		ptr := v.Args[0]
 12571  		val := v.Args[1]
 12572  		mem := v.Args[2]
 12573  		v.reset(Op386MOVLstore)
 12574  		v.AddArg(ptr)
 12575  		v.AddArg(val)
 12576  		v.AddArg(mem)
 12577  		return true
 12578  	}
 12579  	// match: (Store [2] ptr val mem)
 12580  	// cond:
 12581  	// result: (MOVWstore ptr val mem)
 12582  	for {
 12583  		if v.AuxInt != 2 {
 12584  			break
 12585  		}
 12586  		ptr := v.Args[0]
 12587  		val := v.Args[1]
 12588  		mem := v.Args[2]
 12589  		v.reset(Op386MOVWstore)
 12590  		v.AddArg(ptr)
 12591  		v.AddArg(val)
 12592  		v.AddArg(mem)
 12593  		return true
 12594  	}
 12595  	// match: (Store [1] ptr val mem)
 12596  	// cond:
 12597  	// result: (MOVBstore ptr val mem)
 12598  	for {
 12599  		if v.AuxInt != 1 {
 12600  			break
 12601  		}
 12602  		ptr := v.Args[0]
 12603  		val := v.Args[1]
 12604  		mem := v.Args[2]
 12605  		v.reset(Op386MOVBstore)
 12606  		v.AddArg(ptr)
 12607  		v.AddArg(val)
 12608  		v.AddArg(mem)
 12609  		return true
 12610  	}
 12611  	return false
 12612  }
 12613  func rewriteValue386_OpSub16(v *Value, config *Config) bool {
 12614  	b := v.Block
 12615  	_ = b
 12616  	// match: (Sub16  x y)
 12617  	// cond:
 12618  	// result: (SUBL  x y)
 12619  	for {
 12620  		x := v.Args[0]
 12621  		y := v.Args[1]
 12622  		v.reset(Op386SUBL)
 12623  		v.AddArg(x)
 12624  		v.AddArg(y)
 12625  		return true
 12626  	}
 12627  }
 12628  func rewriteValue386_OpSub32(v *Value, config *Config) bool {
 12629  	b := v.Block
 12630  	_ = b
 12631  	// match: (Sub32  x y)
 12632  	// cond:
 12633  	// result: (SUBL  x y)
 12634  	for {
 12635  		x := v.Args[0]
 12636  		y := v.Args[1]
 12637  		v.reset(Op386SUBL)
 12638  		v.AddArg(x)
 12639  		v.AddArg(y)
 12640  		return true
 12641  	}
 12642  }
 12643  func rewriteValue386_OpSub32F(v *Value, config *Config) bool {
 12644  	b := v.Block
 12645  	_ = b
 12646  	// match: (Sub32F x y)
 12647  	// cond:
 12648  	// result: (SUBSS x y)
 12649  	for {
 12650  		x := v.Args[0]
 12651  		y := v.Args[1]
 12652  		v.reset(Op386SUBSS)
 12653  		v.AddArg(x)
 12654  		v.AddArg(y)
 12655  		return true
 12656  	}
 12657  }
 12658  func rewriteValue386_OpSub32carry(v *Value, config *Config) bool {
 12659  	b := v.Block
 12660  	_ = b
 12661  	// match: (Sub32carry x y)
 12662  	// cond:
 12663  	// result: (SUBLcarry x y)
 12664  	for {
 12665  		x := v.Args[0]
 12666  		y := v.Args[1]
 12667  		v.reset(Op386SUBLcarry)
 12668  		v.AddArg(x)
 12669  		v.AddArg(y)
 12670  		return true
 12671  	}
 12672  }
 12673  func rewriteValue386_OpSub32withcarry(v *Value, config *Config) bool {
 12674  	b := v.Block
 12675  	_ = b
 12676  	// match: (Sub32withcarry x y c)
 12677  	// cond:
 12678  	// result: (SBBL x y c)
 12679  	for {
 12680  		x := v.Args[0]
 12681  		y := v.Args[1]
 12682  		c := v.Args[2]
 12683  		v.reset(Op386SBBL)
 12684  		v.AddArg(x)
 12685  		v.AddArg(y)
 12686  		v.AddArg(c)
 12687  		return true
 12688  	}
 12689  }
 12690  func rewriteValue386_OpSub64F(v *Value, config *Config) bool {
 12691  	b := v.Block
 12692  	_ = b
 12693  	// match: (Sub64F x y)
 12694  	// cond:
 12695  	// result: (SUBSD x y)
 12696  	for {
 12697  		x := v.Args[0]
 12698  		y := v.Args[1]
 12699  		v.reset(Op386SUBSD)
 12700  		v.AddArg(x)
 12701  		v.AddArg(y)
 12702  		return true
 12703  	}
 12704  }
 12705  func rewriteValue386_OpSub8(v *Value, config *Config) bool {
 12706  	b := v.Block
 12707  	_ = b
 12708  	// match: (Sub8   x y)
 12709  	// cond:
 12710  	// result: (SUBL  x y)
 12711  	for {
 12712  		x := v.Args[0]
 12713  		y := v.Args[1]
 12714  		v.reset(Op386SUBL)
 12715  		v.AddArg(x)
 12716  		v.AddArg(y)
 12717  		return true
 12718  	}
 12719  }
 12720  func rewriteValue386_OpSubPtr(v *Value, config *Config) bool {
 12721  	b := v.Block
 12722  	_ = b
 12723  	// match: (SubPtr x y)
 12724  	// cond:
 12725  	// result: (SUBL  x y)
 12726  	for {
 12727  		x := v.Args[0]
 12728  		y := v.Args[1]
 12729  		v.reset(Op386SUBL)
 12730  		v.AddArg(x)
 12731  		v.AddArg(y)
 12732  		return true
 12733  	}
 12734  }
 12735  func rewriteValue386_OpTrunc16to8(v *Value, config *Config) bool {
 12736  	b := v.Block
 12737  	_ = b
 12738  	// match: (Trunc16to8  x)
 12739  	// cond:
 12740  	// result: x
 12741  	for {
 12742  		x := v.Args[0]
 12743  		v.reset(OpCopy)
 12744  		v.Type = x.Type
 12745  		v.AddArg(x)
 12746  		return true
 12747  	}
 12748  }
 12749  func rewriteValue386_OpTrunc32to16(v *Value, config *Config) bool {
 12750  	b := v.Block
 12751  	_ = b
 12752  	// match: (Trunc32to16 x)
 12753  	// cond:
 12754  	// result: x
 12755  	for {
 12756  		x := v.Args[0]
 12757  		v.reset(OpCopy)
 12758  		v.Type = x.Type
 12759  		v.AddArg(x)
 12760  		return true
 12761  	}
 12762  }
 12763  func rewriteValue386_OpTrunc32to8(v *Value, config *Config) bool {
 12764  	b := v.Block
 12765  	_ = b
 12766  	// match: (Trunc32to8  x)
 12767  	// cond:
 12768  	// result: x
 12769  	for {
 12770  		x := v.Args[0]
 12771  		v.reset(OpCopy)
 12772  		v.Type = x.Type
 12773  		v.AddArg(x)
 12774  		return true
 12775  	}
 12776  }
 12777  func rewriteValue386_OpXor16(v *Value, config *Config) bool {
 12778  	b := v.Block
 12779  	_ = b
 12780  	// match: (Xor16 x y)
 12781  	// cond:
 12782  	// result: (XORL x y)
 12783  	for {
 12784  		x := v.Args[0]
 12785  		y := v.Args[1]
 12786  		v.reset(Op386XORL)
 12787  		v.AddArg(x)
 12788  		v.AddArg(y)
 12789  		return true
 12790  	}
 12791  }
 12792  func rewriteValue386_OpXor32(v *Value, config *Config) bool {
 12793  	b := v.Block
 12794  	_ = b
 12795  	// match: (Xor32 x y)
 12796  	// cond:
 12797  	// result: (XORL x y)
 12798  	for {
 12799  		x := v.Args[0]
 12800  		y := v.Args[1]
 12801  		v.reset(Op386XORL)
 12802  		v.AddArg(x)
 12803  		v.AddArg(y)
 12804  		return true
 12805  	}
 12806  }
 12807  func rewriteValue386_OpXor8(v *Value, config *Config) bool {
 12808  	b := v.Block
 12809  	_ = b
 12810  	// match: (Xor8  x y)
 12811  	// cond:
 12812  	// result: (XORL x y)
 12813  	for {
 12814  		x := v.Args[0]
 12815  		y := v.Args[1]
 12816  		v.reset(Op386XORL)
 12817  		v.AddArg(x)
 12818  		v.AddArg(y)
 12819  		return true
 12820  	}
 12821  }
 12822  func rewriteValue386_OpZero(v *Value, config *Config) bool {
 12823  	b := v.Block
 12824  	_ = b
 12825  	// match: (Zero [s] _ mem)
 12826  	// cond: SizeAndAlign(s).Size() == 0
 12827  	// result: mem
 12828  	for {
 12829  		s := v.AuxInt
 12830  		mem := v.Args[1]
 12831  		if !(SizeAndAlign(s).Size() == 0) {
 12832  			break
 12833  		}
 12834  		v.reset(OpCopy)
 12835  		v.Type = mem.Type
 12836  		v.AddArg(mem)
 12837  		return true
 12838  	}
 12839  	// match: (Zero [s] destptr mem)
 12840  	// cond: SizeAndAlign(s).Size() == 1
 12841  	// result: (MOVBstoreconst [0] destptr mem)
 12842  	for {
 12843  		s := v.AuxInt
 12844  		destptr := v.Args[0]
 12845  		mem := v.Args[1]
 12846  		if !(SizeAndAlign(s).Size() == 1) {
 12847  			break
 12848  		}
 12849  		v.reset(Op386MOVBstoreconst)
 12850  		v.AuxInt = 0
 12851  		v.AddArg(destptr)
 12852  		v.AddArg(mem)
 12853  		return true
 12854  	}
 12855  	// match: (Zero [s] destptr mem)
 12856  	// cond: SizeAndAlign(s).Size() == 2
 12857  	// result: (MOVWstoreconst [0] destptr mem)
 12858  	for {
 12859  		s := v.AuxInt
 12860  		destptr := v.Args[0]
 12861  		mem := v.Args[1]
 12862  		if !(SizeAndAlign(s).Size() == 2) {
 12863  			break
 12864  		}
 12865  		v.reset(Op386MOVWstoreconst)
 12866  		v.AuxInt = 0
 12867  		v.AddArg(destptr)
 12868  		v.AddArg(mem)
 12869  		return true
 12870  	}
 12871  	// match: (Zero [s] destptr mem)
 12872  	// cond: SizeAndAlign(s).Size() == 4
 12873  	// result: (MOVLstoreconst [0] destptr mem)
 12874  	for {
 12875  		s := v.AuxInt
 12876  		destptr := v.Args[0]
 12877  		mem := v.Args[1]
 12878  		if !(SizeAndAlign(s).Size() == 4) {
 12879  			break
 12880  		}
 12881  		v.reset(Op386MOVLstoreconst)
 12882  		v.AuxInt = 0
 12883  		v.AddArg(destptr)
 12884  		v.AddArg(mem)
 12885  		return true
 12886  	}
 12887  	// match: (Zero [s] destptr mem)
 12888  	// cond: SizeAndAlign(s).Size() == 3
 12889  	// result: (MOVBstoreconst [makeValAndOff(0,2)] destptr 		(MOVWstoreconst [0] destptr mem))
 12890  	for {
 12891  		s := v.AuxInt
 12892  		destptr := v.Args[0]
 12893  		mem := v.Args[1]
 12894  		if !(SizeAndAlign(s).Size() == 3) {
 12895  			break
 12896  		}
 12897  		v.reset(Op386MOVBstoreconst)
 12898  		v.AuxInt = makeValAndOff(0, 2)
 12899  		v.AddArg(destptr)
 12900  		v0 := b.NewValue0(v.Line, Op386MOVWstoreconst, TypeMem)
 12901  		v0.AuxInt = 0
 12902  		v0.AddArg(destptr)
 12903  		v0.AddArg(mem)
 12904  		v.AddArg(v0)
 12905  		return true
 12906  	}
 12907  	// match: (Zero [s] destptr mem)
 12908  	// cond: SizeAndAlign(s).Size() == 5
 12909  	// result: (MOVBstoreconst [makeValAndOff(0,4)] destptr 		(MOVLstoreconst [0] destptr mem))
 12910  	for {
 12911  		s := v.AuxInt
 12912  		destptr := v.Args[0]
 12913  		mem := v.Args[1]
 12914  		if !(SizeAndAlign(s).Size() == 5) {
 12915  			break
 12916  		}
 12917  		v.reset(Op386MOVBstoreconst)
 12918  		v.AuxInt = makeValAndOff(0, 4)
 12919  		v.AddArg(destptr)
 12920  		v0 := b.NewValue0(v.Line, Op386MOVLstoreconst, TypeMem)
 12921  		v0.AuxInt = 0
 12922  		v0.AddArg(destptr)
 12923  		v0.AddArg(mem)
 12924  		v.AddArg(v0)
 12925  		return true
 12926  	}
 12927  	// match: (Zero [s] destptr mem)
 12928  	// cond: SizeAndAlign(s).Size() == 6
 12929  	// result: (MOVWstoreconst [makeValAndOff(0,4)] destptr 		(MOVLstoreconst [0] destptr mem))
 12930  	for {
 12931  		s := v.AuxInt
 12932  		destptr := v.Args[0]
 12933  		mem := v.Args[1]
 12934  		if !(SizeAndAlign(s).Size() == 6) {
 12935  			break
 12936  		}
 12937  		v.reset(Op386MOVWstoreconst)
 12938  		v.AuxInt = makeValAndOff(0, 4)
 12939  		v.AddArg(destptr)
 12940  		v0 := b.NewValue0(v.Line, Op386MOVLstoreconst, TypeMem)
 12941  		v0.AuxInt = 0
 12942  		v0.AddArg(destptr)
 12943  		v0.AddArg(mem)
 12944  		v.AddArg(v0)
 12945  		return true
 12946  	}
 12947  	// match: (Zero [s] destptr mem)
 12948  	// cond: SizeAndAlign(s).Size() == 7
 12949  	// result: (MOVLstoreconst [makeValAndOff(0,3)] destptr 		(MOVLstoreconst [0] destptr mem))
 12950  	for {
 12951  		s := v.AuxInt
 12952  		destptr := v.Args[0]
 12953  		mem := v.Args[1]
 12954  		if !(SizeAndAlign(s).Size() == 7) {
 12955  			break
 12956  		}
 12957  		v.reset(Op386MOVLstoreconst)
 12958  		v.AuxInt = makeValAndOff(0, 3)
 12959  		v.AddArg(destptr)
 12960  		v0 := b.NewValue0(v.Line, Op386MOVLstoreconst, TypeMem)
 12961  		v0.AuxInt = 0
 12962  		v0.AddArg(destptr)
 12963  		v0.AddArg(mem)
 12964  		v.AddArg(v0)
 12965  		return true
 12966  	}
 12967  	// match: (Zero [s] destptr mem)
 12968  	// cond: SizeAndAlign(s).Size()%4 != 0 && SizeAndAlign(s).Size() > 4
 12969  	// result: (Zero [SizeAndAlign(s).Size()-SizeAndAlign(s).Size()%4] (ADDLconst destptr [SizeAndAlign(s).Size()%4]) 		(MOVLstoreconst [0] destptr mem))
 12970  	for {
 12971  		s := v.AuxInt
 12972  		destptr := v.Args[0]
 12973  		mem := v.Args[1]
 12974  		if !(SizeAndAlign(s).Size()%4 != 0 && SizeAndAlign(s).Size() > 4) {
 12975  			break
 12976  		}
 12977  		v.reset(OpZero)
 12978  		v.AuxInt = SizeAndAlign(s).Size() - SizeAndAlign(s).Size()%4
 12979  		v0 := b.NewValue0(v.Line, Op386ADDLconst, config.fe.TypeUInt32())
 12980  		v0.AuxInt = SizeAndAlign(s).Size() % 4
 12981  		v0.AddArg(destptr)
 12982  		v.AddArg(v0)
 12983  		v1 := b.NewValue0(v.Line, Op386MOVLstoreconst, TypeMem)
 12984  		v1.AuxInt = 0
 12985  		v1.AddArg(destptr)
 12986  		v1.AddArg(mem)
 12987  		v.AddArg(v1)
 12988  		return true
 12989  	}
 12990  	// match: (Zero [s] destptr mem)
 12991  	// cond: SizeAndAlign(s).Size() == 8
 12992  	// result: (MOVLstoreconst [makeValAndOff(0,4)] destptr 		(MOVLstoreconst [0] destptr mem))
 12993  	for {
 12994  		s := v.AuxInt
 12995  		destptr := v.Args[0]
 12996  		mem := v.Args[1]
 12997  		if !(SizeAndAlign(s).Size() == 8) {
 12998  			break
 12999  		}
 13000  		v.reset(Op386MOVLstoreconst)
 13001  		v.AuxInt = makeValAndOff(0, 4)
 13002  		v.AddArg(destptr)
 13003  		v0 := b.NewValue0(v.Line, Op386MOVLstoreconst, TypeMem)
 13004  		v0.AuxInt = 0
 13005  		v0.AddArg(destptr)
 13006  		v0.AddArg(mem)
 13007  		v.AddArg(v0)
 13008  		return true
 13009  	}
 13010  	// match: (Zero [s] destptr mem)
 13011  	// cond: SizeAndAlign(s).Size() == 12
 13012  	// result: (MOVLstoreconst [makeValAndOff(0,8)] destptr 		(MOVLstoreconst [makeValAndOff(0,4)] destptr 			(MOVLstoreconst [0] destptr mem)))
 13013  	for {
 13014  		s := v.AuxInt
 13015  		destptr := v.Args[0]
 13016  		mem := v.Args[1]
 13017  		if !(SizeAndAlign(s).Size() == 12) {
 13018  			break
 13019  		}
 13020  		v.reset(Op386MOVLstoreconst)
 13021  		v.AuxInt = makeValAndOff(0, 8)
 13022  		v.AddArg(destptr)
 13023  		v0 := b.NewValue0(v.Line, Op386MOVLstoreconst, TypeMem)
 13024  		v0.AuxInt = makeValAndOff(0, 4)
 13025  		v0.AddArg(destptr)
 13026  		v1 := b.NewValue0(v.Line, Op386MOVLstoreconst, TypeMem)
 13027  		v1.AuxInt = 0
 13028  		v1.AddArg(destptr)
 13029  		v1.AddArg(mem)
 13030  		v0.AddArg(v1)
 13031  		v.AddArg(v0)
 13032  		return true
 13033  	}
 13034  	// match: (Zero [s] destptr mem)
 13035  	// cond: SizeAndAlign(s).Size() == 16
 13036  	// result: (MOVLstoreconst [makeValAndOff(0,12)] destptr 		(MOVLstoreconst [makeValAndOff(0,8)] destptr 			(MOVLstoreconst [makeValAndOff(0,4)] destptr 				(MOVLstoreconst [0] destptr mem))))
 13037  	for {
 13038  		s := v.AuxInt
 13039  		destptr := v.Args[0]
 13040  		mem := v.Args[1]
 13041  		if !(SizeAndAlign(s).Size() == 16) {
 13042  			break
 13043  		}
 13044  		v.reset(Op386MOVLstoreconst)
 13045  		v.AuxInt = makeValAndOff(0, 12)
 13046  		v.AddArg(destptr)
 13047  		v0 := b.NewValue0(v.Line, Op386MOVLstoreconst, TypeMem)
 13048  		v0.AuxInt = makeValAndOff(0, 8)
 13049  		v0.AddArg(destptr)
 13050  		v1 := b.NewValue0(v.Line, Op386MOVLstoreconst, TypeMem)
 13051  		v1.AuxInt = makeValAndOff(0, 4)
 13052  		v1.AddArg(destptr)
 13053  		v2 := b.NewValue0(v.Line, Op386MOVLstoreconst, TypeMem)
 13054  		v2.AuxInt = 0
 13055  		v2.AddArg(destptr)
 13056  		v2.AddArg(mem)
 13057  		v1.AddArg(v2)
 13058  		v0.AddArg(v1)
 13059  		v.AddArg(v0)
 13060  		return true
 13061  	}
 13062  	// match: (Zero [s] destptr mem)
 13063  	// cond: SizeAndAlign(s).Size() > 16   && SizeAndAlign(s).Size() <= 4*128   && SizeAndAlign(s).Size()%4 == 0   && !config.noDuffDevice
 13064  	// result: (DUFFZERO [1*(128-SizeAndAlign(s).Size()/4)] destptr (MOVLconst [0]) mem)
 13065  	for {
 13066  		s := v.AuxInt
 13067  		destptr := v.Args[0]
 13068  		mem := v.Args[1]
 13069  		if !(SizeAndAlign(s).Size() > 16 && SizeAndAlign(s).Size() <= 4*128 && SizeAndAlign(s).Size()%4 == 0 && !config.noDuffDevice) {
 13070  			break
 13071  		}
 13072  		v.reset(Op386DUFFZERO)
 13073  		v.AuxInt = 1 * (128 - SizeAndAlign(s).Size()/4)
 13074  		v.AddArg(destptr)
 13075  		v0 := b.NewValue0(v.Line, Op386MOVLconst, config.fe.TypeUInt32())
 13076  		v0.AuxInt = 0
 13077  		v.AddArg(v0)
 13078  		v.AddArg(mem)
 13079  		return true
 13080  	}
 13081  	// match: (Zero [s] destptr mem)
 13082  	// cond: (SizeAndAlign(s).Size() > 4*128 || (config.noDuffDevice && SizeAndAlign(s).Size() > 16))   && SizeAndAlign(s).Size()%4 == 0
 13083  	// result: (REPSTOSL destptr (MOVLconst [SizeAndAlign(s).Size()/4]) (MOVLconst [0]) mem)
 13084  	for {
 13085  		s := v.AuxInt
 13086  		destptr := v.Args[0]
 13087  		mem := v.Args[1]
 13088  		if !((SizeAndAlign(s).Size() > 4*128 || (config.noDuffDevice && SizeAndAlign(s).Size() > 16)) && SizeAndAlign(s).Size()%4 == 0) {
 13089  			break
 13090  		}
 13091  		v.reset(Op386REPSTOSL)
 13092  		v.AddArg(destptr)
 13093  		v0 := b.NewValue0(v.Line, Op386MOVLconst, config.fe.TypeUInt32())
 13094  		v0.AuxInt = SizeAndAlign(s).Size() / 4
 13095  		v.AddArg(v0)
 13096  		v1 := b.NewValue0(v.Line, Op386MOVLconst, config.fe.TypeUInt32())
 13097  		v1.AuxInt = 0
 13098  		v.AddArg(v1)
 13099  		v.AddArg(mem)
 13100  		return true
 13101  	}
 13102  	return false
 13103  }
 13104  func rewriteValue386_OpZeroExt16to32(v *Value, config *Config) bool {
 13105  	b := v.Block
 13106  	_ = b
 13107  	// match: (ZeroExt16to32 x)
 13108  	// cond:
 13109  	// result: (MOVWLZX x)
 13110  	for {
 13111  		x := v.Args[0]
 13112  		v.reset(Op386MOVWLZX)
 13113  		v.AddArg(x)
 13114  		return true
 13115  	}
 13116  }
 13117  func rewriteValue386_OpZeroExt8to16(v *Value, config *Config) bool {
 13118  	b := v.Block
 13119  	_ = b
 13120  	// match: (ZeroExt8to16  x)
 13121  	// cond:
 13122  	// result: (MOVBLZX x)
 13123  	for {
 13124  		x := v.Args[0]
 13125  		v.reset(Op386MOVBLZX)
 13126  		v.AddArg(x)
 13127  		return true
 13128  	}
 13129  }
 13130  func rewriteValue386_OpZeroExt8to32(v *Value, config *Config) bool {
 13131  	b := v.Block
 13132  	_ = b
 13133  	// match: (ZeroExt8to32  x)
 13134  	// cond:
 13135  	// result: (MOVBLZX x)
 13136  	for {
 13137  		x := v.Args[0]
 13138  		v.reset(Op386MOVBLZX)
 13139  		v.AddArg(x)
 13140  		return true
 13141  	}
 13142  }
 13143  func rewriteValue386_OpZeromask(v *Value, config *Config) bool {
 13144  	b := v.Block
 13145  	_ = b
 13146  	// match: (Zeromask <t> x)
 13147  	// cond:
 13148  	// result: (XORLconst [-1] (SBBLcarrymask <t> (CMPL x (MOVLconst [1]))))
 13149  	for {
 13150  		t := v.Type
 13151  		x := v.Args[0]
 13152  		v.reset(Op386XORLconst)
 13153  		v.AuxInt = -1
 13154  		v0 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 13155  		v1 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
 13156  		v1.AddArg(x)
 13157  		v2 := b.NewValue0(v.Line, Op386MOVLconst, config.fe.TypeUInt32())
 13158  		v2.AuxInt = 1
 13159  		v1.AddArg(v2)
 13160  		v0.AddArg(v1)
 13161  		v.AddArg(v0)
 13162  		return true
 13163  	}
 13164  }
 13165  func rewriteBlock386(b *Block) bool {
 13166  	switch b.Kind {
 13167  	case Block386EQ:
 13168  		// match: (EQ (InvertFlags cmp) yes no)
 13169  		// cond:
 13170  		// result: (EQ cmp yes no)
 13171  		for {
 13172  			v := b.Control
 13173  			if v.Op != Op386InvertFlags {
 13174  				break
 13175  			}
 13176  			cmp := v.Args[0]
 13177  			yes := b.Succs[0]
 13178  			no := b.Succs[1]
 13179  			b.Kind = Block386EQ
 13180  			b.SetControl(cmp)
 13181  			_ = yes
 13182  			_ = no
 13183  			return true
 13184  		}
 13185  		// match: (EQ (FlagEQ) yes no)
 13186  		// cond:
 13187  		// result: (First nil yes no)
 13188  		for {
 13189  			v := b.Control
 13190  			if v.Op != Op386FlagEQ {
 13191  				break
 13192  			}
 13193  			yes := b.Succs[0]
 13194  			no := b.Succs[1]
 13195  			b.Kind = BlockFirst
 13196  			b.SetControl(nil)
 13197  			_ = yes
 13198  			_ = no
 13199  			return true
 13200  		}
 13201  		// match: (EQ (FlagLT_ULT) yes no)
 13202  		// cond:
 13203  		// result: (First nil no yes)
 13204  		for {
 13205  			v := b.Control
 13206  			if v.Op != Op386FlagLT_ULT {
 13207  				break
 13208  			}
 13209  			yes := b.Succs[0]
 13210  			no := b.Succs[1]
 13211  			b.Kind = BlockFirst
 13212  			b.SetControl(nil)
 13213  			b.swapSuccessors()
 13214  			_ = no
 13215  			_ = yes
 13216  			return true
 13217  		}
 13218  		// match: (EQ (FlagLT_UGT) yes no)
 13219  		// cond:
 13220  		// result: (First nil no yes)
 13221  		for {
 13222  			v := b.Control
 13223  			if v.Op != Op386FlagLT_UGT {
 13224  				break
 13225  			}
 13226  			yes := b.Succs[0]
 13227  			no := b.Succs[1]
 13228  			b.Kind = BlockFirst
 13229  			b.SetControl(nil)
 13230  			b.swapSuccessors()
 13231  			_ = no
 13232  			_ = yes
 13233  			return true
 13234  		}
 13235  		// match: (EQ (FlagGT_ULT) yes no)
 13236  		// cond:
 13237  		// result: (First nil no yes)
 13238  		for {
 13239  			v := b.Control
 13240  			if v.Op != Op386FlagGT_ULT {
 13241  				break
 13242  			}
 13243  			yes := b.Succs[0]
 13244  			no := b.Succs[1]
 13245  			b.Kind = BlockFirst
 13246  			b.SetControl(nil)
 13247  			b.swapSuccessors()
 13248  			_ = no
 13249  			_ = yes
 13250  			return true
 13251  		}
 13252  		// match: (EQ (FlagGT_UGT) yes no)
 13253  		// cond:
 13254  		// result: (First nil no yes)
 13255  		for {
 13256  			v := b.Control
 13257  			if v.Op != Op386FlagGT_UGT {
 13258  				break
 13259  			}
 13260  			yes := b.Succs[0]
 13261  			no := b.Succs[1]
 13262  			b.Kind = BlockFirst
 13263  			b.SetControl(nil)
 13264  			b.swapSuccessors()
 13265  			_ = no
 13266  			_ = yes
 13267  			return true
 13268  		}
 13269  	case Block386GE:
 13270  		// match: (GE (InvertFlags cmp) yes no)
 13271  		// cond:
 13272  		// result: (LE cmp yes no)
 13273  		for {
 13274  			v := b.Control
 13275  			if v.Op != Op386InvertFlags {
 13276  				break
 13277  			}
 13278  			cmp := v.Args[0]
 13279  			yes := b.Succs[0]
 13280  			no := b.Succs[1]
 13281  			b.Kind = Block386LE
 13282  			b.SetControl(cmp)
 13283  			_ = yes
 13284  			_ = no
 13285  			return true
 13286  		}
 13287  		// match: (GE (FlagEQ) yes no)
 13288  		// cond:
 13289  		// result: (First nil yes no)
 13290  		for {
 13291  			v := b.Control
 13292  			if v.Op != Op386FlagEQ {
 13293  				break
 13294  			}
 13295  			yes := b.Succs[0]
 13296  			no := b.Succs[1]
 13297  			b.Kind = BlockFirst
 13298  			b.SetControl(nil)
 13299  			_ = yes
 13300  			_ = no
 13301  			return true
 13302  		}
 13303  		// match: (GE (FlagLT_ULT) yes no)
 13304  		// cond:
 13305  		// result: (First nil no yes)
 13306  		for {
 13307  			v := b.Control
 13308  			if v.Op != Op386FlagLT_ULT {
 13309  				break
 13310  			}
 13311  			yes := b.Succs[0]
 13312  			no := b.Succs[1]
 13313  			b.Kind = BlockFirst
 13314  			b.SetControl(nil)
 13315  			b.swapSuccessors()
 13316  			_ = no
 13317  			_ = yes
 13318  			return true
 13319  		}
 13320  		// match: (GE (FlagLT_UGT) yes no)
 13321  		// cond:
 13322  		// result: (First nil no yes)
 13323  		for {
 13324  			v := b.Control
 13325  			if v.Op != Op386FlagLT_UGT {
 13326  				break
 13327  			}
 13328  			yes := b.Succs[0]
 13329  			no := b.Succs[1]
 13330  			b.Kind = BlockFirst
 13331  			b.SetControl(nil)
 13332  			b.swapSuccessors()
 13333  			_ = no
 13334  			_ = yes
 13335  			return true
 13336  		}
 13337  		// match: (GE (FlagGT_ULT) yes no)
 13338  		// cond:
 13339  		// result: (First nil yes no)
 13340  		for {
 13341  			v := b.Control
 13342  			if v.Op != Op386FlagGT_ULT {
 13343  				break
 13344  			}
 13345  			yes := b.Succs[0]
 13346  			no := b.Succs[1]
 13347  			b.Kind = BlockFirst
 13348  			b.SetControl(nil)
 13349  			_ = yes
 13350  			_ = no
 13351  			return true
 13352  		}
 13353  		// match: (GE (FlagGT_UGT) yes no)
 13354  		// cond:
 13355  		// result: (First nil yes no)
 13356  		for {
 13357  			v := b.Control
 13358  			if v.Op != Op386FlagGT_UGT {
 13359  				break
 13360  			}
 13361  			yes := b.Succs[0]
 13362  			no := b.Succs[1]
 13363  			b.Kind = BlockFirst
 13364  			b.SetControl(nil)
 13365  			_ = yes
 13366  			_ = no
 13367  			return true
 13368  		}
 13369  	case Block386GT:
 13370  		// match: (GT (InvertFlags cmp) yes no)
 13371  		// cond:
 13372  		// result: (LT cmp yes no)
 13373  		for {
 13374  			v := b.Control
 13375  			if v.Op != Op386InvertFlags {
 13376  				break
 13377  			}
 13378  			cmp := v.Args[0]
 13379  			yes := b.Succs[0]
 13380  			no := b.Succs[1]
 13381  			b.Kind = Block386LT
 13382  			b.SetControl(cmp)
 13383  			_ = yes
 13384  			_ = no
 13385  			return true
 13386  		}
 13387  		// match: (GT (FlagEQ) yes no)
 13388  		// cond:
 13389  		// result: (First nil no yes)
 13390  		for {
 13391  			v := b.Control
 13392  			if v.Op != Op386FlagEQ {
 13393  				break
 13394  			}
 13395  			yes := b.Succs[0]
 13396  			no := b.Succs[1]
 13397  			b.Kind = BlockFirst
 13398  			b.SetControl(nil)
 13399  			b.swapSuccessors()
 13400  			_ = no
 13401  			_ = yes
 13402  			return true
 13403  		}
 13404  		// match: (GT (FlagLT_ULT) yes no)
 13405  		// cond:
 13406  		// result: (First nil no yes)
 13407  		for {
 13408  			v := b.Control
 13409  			if v.Op != Op386FlagLT_ULT {
 13410  				break
 13411  			}
 13412  			yes := b.Succs[0]
 13413  			no := b.Succs[1]
 13414  			b.Kind = BlockFirst
 13415  			b.SetControl(nil)
 13416  			b.swapSuccessors()
 13417  			_ = no
 13418  			_ = yes
 13419  			return true
 13420  		}
 13421  		// match: (GT (FlagLT_UGT) yes no)
 13422  		// cond:
 13423  		// result: (First nil no yes)
 13424  		for {
 13425  			v := b.Control
 13426  			if v.Op != Op386FlagLT_UGT {
 13427  				break
 13428  			}
 13429  			yes := b.Succs[0]
 13430  			no := b.Succs[1]
 13431  			b.Kind = BlockFirst
 13432  			b.SetControl(nil)
 13433  			b.swapSuccessors()
 13434  			_ = no
 13435  			_ = yes
 13436  			return true
 13437  		}
 13438  		// match: (GT (FlagGT_ULT) yes no)
 13439  		// cond:
 13440  		// result: (First nil yes no)
 13441  		for {
 13442  			v := b.Control
 13443  			if v.Op != Op386FlagGT_ULT {
 13444  				break
 13445  			}
 13446  			yes := b.Succs[0]
 13447  			no := b.Succs[1]
 13448  			b.Kind = BlockFirst
 13449  			b.SetControl(nil)
 13450  			_ = yes
 13451  			_ = no
 13452  			return true
 13453  		}
 13454  		// match: (GT (FlagGT_UGT) yes no)
 13455  		// cond:
 13456  		// result: (First nil yes no)
 13457  		for {
 13458  			v := b.Control
 13459  			if v.Op != Op386FlagGT_UGT {
 13460  				break
 13461  			}
 13462  			yes := b.Succs[0]
 13463  			no := b.Succs[1]
 13464  			b.Kind = BlockFirst
 13465  			b.SetControl(nil)
 13466  			_ = yes
 13467  			_ = no
 13468  			return true
 13469  		}
 13470  	case BlockIf:
 13471  		// match: (If (SETL  cmp) yes no)
 13472  		// cond:
 13473  		// result: (LT  cmp yes no)
 13474  		for {
 13475  			v := b.Control
 13476  			if v.Op != Op386SETL {
 13477  				break
 13478  			}
 13479  			cmp := v.Args[0]
 13480  			yes := b.Succs[0]
 13481  			no := b.Succs[1]
 13482  			b.Kind = Block386LT
 13483  			b.SetControl(cmp)
 13484  			_ = yes
 13485  			_ = no
 13486  			return true
 13487  		}
 13488  		// match: (If (SETLE cmp) yes no)
 13489  		// cond:
 13490  		// result: (LE  cmp yes no)
 13491  		for {
 13492  			v := b.Control
 13493  			if v.Op != Op386SETLE {
 13494  				break
 13495  			}
 13496  			cmp := v.Args[0]
 13497  			yes := b.Succs[0]
 13498  			no := b.Succs[1]
 13499  			b.Kind = Block386LE
 13500  			b.SetControl(cmp)
 13501  			_ = yes
 13502  			_ = no
 13503  			return true
 13504  		}
 13505  		// match: (If (SETG  cmp) yes no)
 13506  		// cond:
 13507  		// result: (GT  cmp yes no)
 13508  		for {
 13509  			v := b.Control
 13510  			if v.Op != Op386SETG {
 13511  				break
 13512  			}
 13513  			cmp := v.Args[0]
 13514  			yes := b.Succs[0]
 13515  			no := b.Succs[1]
 13516  			b.Kind = Block386GT
 13517  			b.SetControl(cmp)
 13518  			_ = yes
 13519  			_ = no
 13520  			return true
 13521  		}
 13522  		// match: (If (SETGE cmp) yes no)
 13523  		// cond:
 13524  		// result: (GE  cmp yes no)
 13525  		for {
 13526  			v := b.Control
 13527  			if v.Op != Op386SETGE {
 13528  				break
 13529  			}
 13530  			cmp := v.Args[0]
 13531  			yes := b.Succs[0]
 13532  			no := b.Succs[1]
 13533  			b.Kind = Block386GE
 13534  			b.SetControl(cmp)
 13535  			_ = yes
 13536  			_ = no
 13537  			return true
 13538  		}
 13539  		// match: (If (SETEQ cmp) yes no)
 13540  		// cond:
 13541  		// result: (EQ  cmp yes no)
 13542  		for {
 13543  			v := b.Control
 13544  			if v.Op != Op386SETEQ {
 13545  				break
 13546  			}
 13547  			cmp := v.Args[0]
 13548  			yes := b.Succs[0]
 13549  			no := b.Succs[1]
 13550  			b.Kind = Block386EQ
 13551  			b.SetControl(cmp)
 13552  			_ = yes
 13553  			_ = no
 13554  			return true
 13555  		}
 13556  		// match: (If (SETNE cmp) yes no)
 13557  		// cond:
 13558  		// result: (NE  cmp yes no)
 13559  		for {
 13560  			v := b.Control
 13561  			if v.Op != Op386SETNE {
 13562  				break
 13563  			}
 13564  			cmp := v.Args[0]
 13565  			yes := b.Succs[0]
 13566  			no := b.Succs[1]
 13567  			b.Kind = Block386NE
 13568  			b.SetControl(cmp)
 13569  			_ = yes
 13570  			_ = no
 13571  			return true
 13572  		}
 13573  		// match: (If (SETB  cmp) yes no)
 13574  		// cond:
 13575  		// result: (ULT cmp yes no)
 13576  		for {
 13577  			v := b.Control
 13578  			if v.Op != Op386SETB {
 13579  				break
 13580  			}
 13581  			cmp := v.Args[0]
 13582  			yes := b.Succs[0]
 13583  			no := b.Succs[1]
 13584  			b.Kind = Block386ULT
 13585  			b.SetControl(cmp)
 13586  			_ = yes
 13587  			_ = no
 13588  			return true
 13589  		}
 13590  		// match: (If (SETBE cmp) yes no)
 13591  		// cond:
 13592  		// result: (ULE cmp yes no)
 13593  		for {
 13594  			v := b.Control
 13595  			if v.Op != Op386SETBE {
 13596  				break
 13597  			}
 13598  			cmp := v.Args[0]
 13599  			yes := b.Succs[0]
 13600  			no := b.Succs[1]
 13601  			b.Kind = Block386ULE
 13602  			b.SetControl(cmp)
 13603  			_ = yes
 13604  			_ = no
 13605  			return true
 13606  		}
 13607  		// match: (If (SETA  cmp) yes no)
 13608  		// cond:
 13609  		// result: (UGT cmp yes no)
 13610  		for {
 13611  			v := b.Control
 13612  			if v.Op != Op386SETA {
 13613  				break
 13614  			}
 13615  			cmp := v.Args[0]
 13616  			yes := b.Succs[0]
 13617  			no := b.Succs[1]
 13618  			b.Kind = Block386UGT
 13619  			b.SetControl(cmp)
 13620  			_ = yes
 13621  			_ = no
 13622  			return true
 13623  		}
 13624  		// match: (If (SETAE cmp) yes no)
 13625  		// cond:
 13626  		// result: (UGE cmp yes no)
 13627  		for {
 13628  			v := b.Control
 13629  			if v.Op != Op386SETAE {
 13630  				break
 13631  			}
 13632  			cmp := v.Args[0]
 13633  			yes := b.Succs[0]
 13634  			no := b.Succs[1]
 13635  			b.Kind = Block386UGE
 13636  			b.SetControl(cmp)
 13637  			_ = yes
 13638  			_ = no
 13639  			return true
 13640  		}
 13641  		// match: (If (SETGF  cmp) yes no)
 13642  		// cond:
 13643  		// result: (UGT  cmp yes no)
 13644  		for {
 13645  			v := b.Control
 13646  			if v.Op != Op386SETGF {
 13647  				break
 13648  			}
 13649  			cmp := v.Args[0]
 13650  			yes := b.Succs[0]
 13651  			no := b.Succs[1]
 13652  			b.Kind = Block386UGT
 13653  			b.SetControl(cmp)
 13654  			_ = yes
 13655  			_ = no
 13656  			return true
 13657  		}
 13658  		// match: (If (SETGEF cmp) yes no)
 13659  		// cond:
 13660  		// result: (UGE  cmp yes no)
 13661  		for {
 13662  			v := b.Control
 13663  			if v.Op != Op386SETGEF {
 13664  				break
 13665  			}
 13666  			cmp := v.Args[0]
 13667  			yes := b.Succs[0]
 13668  			no := b.Succs[1]
 13669  			b.Kind = Block386UGE
 13670  			b.SetControl(cmp)
 13671  			_ = yes
 13672  			_ = no
 13673  			return true
 13674  		}
 13675  		// match: (If (SETEQF cmp) yes no)
 13676  		// cond:
 13677  		// result: (EQF  cmp yes no)
 13678  		for {
 13679  			v := b.Control
 13680  			if v.Op != Op386SETEQF {
 13681  				break
 13682  			}
 13683  			cmp := v.Args[0]
 13684  			yes := b.Succs[0]
 13685  			no := b.Succs[1]
 13686  			b.Kind = Block386EQF
 13687  			b.SetControl(cmp)
 13688  			_ = yes
 13689  			_ = no
 13690  			return true
 13691  		}
 13692  		// match: (If (SETNEF cmp) yes no)
 13693  		// cond:
 13694  		// result: (NEF  cmp yes no)
 13695  		for {
 13696  			v := b.Control
 13697  			if v.Op != Op386SETNEF {
 13698  				break
 13699  			}
 13700  			cmp := v.Args[0]
 13701  			yes := b.Succs[0]
 13702  			no := b.Succs[1]
 13703  			b.Kind = Block386NEF
 13704  			b.SetControl(cmp)
 13705  			_ = yes
 13706  			_ = no
 13707  			return true
 13708  		}
 13709  		// match: (If cond yes no)
 13710  		// cond:
 13711  		// result: (NE (TESTB cond cond) yes no)
 13712  		for {
 13713  			v := b.Control
 13714  			_ = v
 13715  			cond := b.Control
 13716  			yes := b.Succs[0]
 13717  			no := b.Succs[1]
 13718  			b.Kind = Block386NE
 13719  			v0 := b.NewValue0(v.Line, Op386TESTB, TypeFlags)
 13720  			v0.AddArg(cond)
 13721  			v0.AddArg(cond)
 13722  			b.SetControl(v0)
 13723  			_ = yes
 13724  			_ = no
 13725  			return true
 13726  		}
 13727  	case Block386LE:
 13728  		// match: (LE (InvertFlags cmp) yes no)
 13729  		// cond:
 13730  		// result: (GE cmp yes no)
 13731  		for {
 13732  			v := b.Control
 13733  			if v.Op != Op386InvertFlags {
 13734  				break
 13735  			}
 13736  			cmp := v.Args[0]
 13737  			yes := b.Succs[0]
 13738  			no := b.Succs[1]
 13739  			b.Kind = Block386GE
 13740  			b.SetControl(cmp)
 13741  			_ = yes
 13742  			_ = no
 13743  			return true
 13744  		}
 13745  		// match: (LE (FlagEQ) yes no)
 13746  		// cond:
 13747  		// result: (First nil yes no)
 13748  		for {
 13749  			v := b.Control
 13750  			if v.Op != Op386FlagEQ {
 13751  				break
 13752  			}
 13753  			yes := b.Succs[0]
 13754  			no := b.Succs[1]
 13755  			b.Kind = BlockFirst
 13756  			b.SetControl(nil)
 13757  			_ = yes
 13758  			_ = no
 13759  			return true
 13760  		}
 13761  		// match: (LE (FlagLT_ULT) yes no)
 13762  		// cond:
 13763  		// result: (First nil yes no)
 13764  		for {
 13765  			v := b.Control
 13766  			if v.Op != Op386FlagLT_ULT {
 13767  				break
 13768  			}
 13769  			yes := b.Succs[0]
 13770  			no := b.Succs[1]
 13771  			b.Kind = BlockFirst
 13772  			b.SetControl(nil)
 13773  			_ = yes
 13774  			_ = no
 13775  			return true
 13776  		}
 13777  		// match: (LE (FlagLT_UGT) yes no)
 13778  		// cond:
 13779  		// result: (First nil yes no)
 13780  		for {
 13781  			v := b.Control
 13782  			if v.Op != Op386FlagLT_UGT {
 13783  				break
 13784  			}
 13785  			yes := b.Succs[0]
 13786  			no := b.Succs[1]
 13787  			b.Kind = BlockFirst
 13788  			b.SetControl(nil)
 13789  			_ = yes
 13790  			_ = no
 13791  			return true
 13792  		}
 13793  		// match: (LE (FlagGT_ULT) yes no)
 13794  		// cond:
 13795  		// result: (First nil no yes)
 13796  		for {
 13797  			v := b.Control
 13798  			if v.Op != Op386FlagGT_ULT {
 13799  				break
 13800  			}
 13801  			yes := b.Succs[0]
 13802  			no := b.Succs[1]
 13803  			b.Kind = BlockFirst
 13804  			b.SetControl(nil)
 13805  			b.swapSuccessors()
 13806  			_ = no
 13807  			_ = yes
 13808  			return true
 13809  		}
 13810  		// match: (LE (FlagGT_UGT) yes no)
 13811  		// cond:
 13812  		// result: (First nil no yes)
 13813  		for {
 13814  			v := b.Control
 13815  			if v.Op != Op386FlagGT_UGT {
 13816  				break
 13817  			}
 13818  			yes := b.Succs[0]
 13819  			no := b.Succs[1]
 13820  			b.Kind = BlockFirst
 13821  			b.SetControl(nil)
 13822  			b.swapSuccessors()
 13823  			_ = no
 13824  			_ = yes
 13825  			return true
 13826  		}
 13827  	case Block386LT:
 13828  		// match: (LT (InvertFlags cmp) yes no)
 13829  		// cond:
 13830  		// result: (GT cmp yes no)
 13831  		for {
 13832  			v := b.Control
 13833  			if v.Op != Op386InvertFlags {
 13834  				break
 13835  			}
 13836  			cmp := v.Args[0]
 13837  			yes := b.Succs[0]
 13838  			no := b.Succs[1]
 13839  			b.Kind = Block386GT
 13840  			b.SetControl(cmp)
 13841  			_ = yes
 13842  			_ = no
 13843  			return true
 13844  		}
 13845  		// match: (LT (FlagEQ) yes no)
 13846  		// cond:
 13847  		// result: (First nil no yes)
 13848  		for {
 13849  			v := b.Control
 13850  			if v.Op != Op386FlagEQ {
 13851  				break
 13852  			}
 13853  			yes := b.Succs[0]
 13854  			no := b.Succs[1]
 13855  			b.Kind = BlockFirst
 13856  			b.SetControl(nil)
 13857  			b.swapSuccessors()
 13858  			_ = no
 13859  			_ = yes
 13860  			return true
 13861  		}
 13862  		// match: (LT (FlagLT_ULT) yes no)
 13863  		// cond:
 13864  		// result: (First nil yes no)
 13865  		for {
 13866  			v := b.Control
 13867  			if v.Op != Op386FlagLT_ULT {
 13868  				break
 13869  			}
 13870  			yes := b.Succs[0]
 13871  			no := b.Succs[1]
 13872  			b.Kind = BlockFirst
 13873  			b.SetControl(nil)
 13874  			_ = yes
 13875  			_ = no
 13876  			return true
 13877  		}
 13878  		// match: (LT (FlagLT_UGT) yes no)
 13879  		// cond:
 13880  		// result: (First nil yes no)
 13881  		for {
 13882  			v := b.Control
 13883  			if v.Op != Op386FlagLT_UGT {
 13884  				break
 13885  			}
 13886  			yes := b.Succs[0]
 13887  			no := b.Succs[1]
 13888  			b.Kind = BlockFirst
 13889  			b.SetControl(nil)
 13890  			_ = yes
 13891  			_ = no
 13892  			return true
 13893  		}
 13894  		// match: (LT (FlagGT_ULT) yes no)
 13895  		// cond:
 13896  		// result: (First nil no yes)
 13897  		for {
 13898  			v := b.Control
 13899  			if v.Op != Op386FlagGT_ULT {
 13900  				break
 13901  			}
 13902  			yes := b.Succs[0]
 13903  			no := b.Succs[1]
 13904  			b.Kind = BlockFirst
 13905  			b.SetControl(nil)
 13906  			b.swapSuccessors()
 13907  			_ = no
 13908  			_ = yes
 13909  			return true
 13910  		}
 13911  		// match: (LT (FlagGT_UGT) yes no)
 13912  		// cond:
 13913  		// result: (First nil no yes)
 13914  		for {
 13915  			v := b.Control
 13916  			if v.Op != Op386FlagGT_UGT {
 13917  				break
 13918  			}
 13919  			yes := b.Succs[0]
 13920  			no := b.Succs[1]
 13921  			b.Kind = BlockFirst
 13922  			b.SetControl(nil)
 13923  			b.swapSuccessors()
 13924  			_ = no
 13925  			_ = yes
 13926  			return true
 13927  		}
 13928  	case Block386NE:
 13929  		// match: (NE (TESTB (SETL  cmp) (SETL  cmp)) yes no)
 13930  		// cond:
 13931  		// result: (LT  cmp yes no)
 13932  		for {
 13933  			v := b.Control
 13934  			if v.Op != Op386TESTB {
 13935  				break
 13936  			}
 13937  			v_0 := v.Args[0]
 13938  			if v_0.Op != Op386SETL {
 13939  				break
 13940  			}
 13941  			cmp := v_0.Args[0]
 13942  			v_1 := v.Args[1]
 13943  			if v_1.Op != Op386SETL {
 13944  				break
 13945  			}
 13946  			if cmp != v_1.Args[0] {
 13947  				break
 13948  			}
 13949  			yes := b.Succs[0]
 13950  			no := b.Succs[1]
 13951  			b.Kind = Block386LT
 13952  			b.SetControl(cmp)
 13953  			_ = yes
 13954  			_ = no
 13955  			return true
 13956  		}
 13957  		// match: (NE (TESTB (SETLE cmp) (SETLE cmp)) yes no)
 13958  		// cond:
 13959  		// result: (LE  cmp yes no)
 13960  		for {
 13961  			v := b.Control
 13962  			if v.Op != Op386TESTB {
 13963  				break
 13964  			}
 13965  			v_0 := v.Args[0]
 13966  			if v_0.Op != Op386SETLE {
 13967  				break
 13968  			}
 13969  			cmp := v_0.Args[0]
 13970  			v_1 := v.Args[1]
 13971  			if v_1.Op != Op386SETLE {
 13972  				break
 13973  			}
 13974  			if cmp != v_1.Args[0] {
 13975  				break
 13976  			}
 13977  			yes := b.Succs[0]
 13978  			no := b.Succs[1]
 13979  			b.Kind = Block386LE
 13980  			b.SetControl(cmp)
 13981  			_ = yes
 13982  			_ = no
 13983  			return true
 13984  		}
 13985  		// match: (NE (TESTB (SETG  cmp) (SETG  cmp)) yes no)
 13986  		// cond:
 13987  		// result: (GT  cmp yes no)
 13988  		for {
 13989  			v := b.Control
 13990  			if v.Op != Op386TESTB {
 13991  				break
 13992  			}
 13993  			v_0 := v.Args[0]
 13994  			if v_0.Op != Op386SETG {
 13995  				break
 13996  			}
 13997  			cmp := v_0.Args[0]
 13998  			v_1 := v.Args[1]
 13999  			if v_1.Op != Op386SETG {
 14000  				break
 14001  			}
 14002  			if cmp != v_1.Args[0] {
 14003  				break
 14004  			}
 14005  			yes := b.Succs[0]
 14006  			no := b.Succs[1]
 14007  			b.Kind = Block386GT
 14008  			b.SetControl(cmp)
 14009  			_ = yes
 14010  			_ = no
 14011  			return true
 14012  		}
 14013  		// match: (NE (TESTB (SETGE cmp) (SETGE cmp)) yes no)
 14014  		// cond:
 14015  		// result: (GE  cmp yes no)
 14016  		for {
 14017  			v := b.Control
 14018  			if v.Op != Op386TESTB {
 14019  				break
 14020  			}
 14021  			v_0 := v.Args[0]
 14022  			if v_0.Op != Op386SETGE {
 14023  				break
 14024  			}
 14025  			cmp := v_0.Args[0]
 14026  			v_1 := v.Args[1]
 14027  			if v_1.Op != Op386SETGE {
 14028  				break
 14029  			}
 14030  			if cmp != v_1.Args[0] {
 14031  				break
 14032  			}
 14033  			yes := b.Succs[0]
 14034  			no := b.Succs[1]
 14035  			b.Kind = Block386GE
 14036  			b.SetControl(cmp)
 14037  			_ = yes
 14038  			_ = no
 14039  			return true
 14040  		}
 14041  		// match: (NE (TESTB (SETEQ cmp) (SETEQ cmp)) yes no)
 14042  		// cond:
 14043  		// result: (EQ  cmp yes no)
 14044  		for {
 14045  			v := b.Control
 14046  			if v.Op != Op386TESTB {
 14047  				break
 14048  			}
 14049  			v_0 := v.Args[0]
 14050  			if v_0.Op != Op386SETEQ {
 14051  				break
 14052  			}
 14053  			cmp := v_0.Args[0]
 14054  			v_1 := v.Args[1]
 14055  			if v_1.Op != Op386SETEQ {
 14056  				break
 14057  			}
 14058  			if cmp != v_1.Args[0] {
 14059  				break
 14060  			}
 14061  			yes := b.Succs[0]
 14062  			no := b.Succs[1]
 14063  			b.Kind = Block386EQ
 14064  			b.SetControl(cmp)
 14065  			_ = yes
 14066  			_ = no
 14067  			return true
 14068  		}
 14069  		// match: (NE (TESTB (SETNE cmp) (SETNE cmp)) yes no)
 14070  		// cond:
 14071  		// result: (NE  cmp yes no)
 14072  		for {
 14073  			v := b.Control
 14074  			if v.Op != Op386TESTB {
 14075  				break
 14076  			}
 14077  			v_0 := v.Args[0]
 14078  			if v_0.Op != Op386SETNE {
 14079  				break
 14080  			}
 14081  			cmp := v_0.Args[0]
 14082  			v_1 := v.Args[1]
 14083  			if v_1.Op != Op386SETNE {
 14084  				break
 14085  			}
 14086  			if cmp != v_1.Args[0] {
 14087  				break
 14088  			}
 14089  			yes := b.Succs[0]
 14090  			no := b.Succs[1]
 14091  			b.Kind = Block386NE
 14092  			b.SetControl(cmp)
 14093  			_ = yes
 14094  			_ = no
 14095  			return true
 14096  		}
 14097  		// match: (NE (TESTB (SETB  cmp) (SETB  cmp)) yes no)
 14098  		// cond:
 14099  		// result: (ULT cmp yes no)
 14100  		for {
 14101  			v := b.Control
 14102  			if v.Op != Op386TESTB {
 14103  				break
 14104  			}
 14105  			v_0 := v.Args[0]
 14106  			if v_0.Op != Op386SETB {
 14107  				break
 14108  			}
 14109  			cmp := v_0.Args[0]
 14110  			v_1 := v.Args[1]
 14111  			if v_1.Op != Op386SETB {
 14112  				break
 14113  			}
 14114  			if cmp != v_1.Args[0] {
 14115  				break
 14116  			}
 14117  			yes := b.Succs[0]
 14118  			no := b.Succs[1]
 14119  			b.Kind = Block386ULT
 14120  			b.SetControl(cmp)
 14121  			_ = yes
 14122  			_ = no
 14123  			return true
 14124  		}
 14125  		// match: (NE (TESTB (SETBE cmp) (SETBE cmp)) yes no)
 14126  		// cond:
 14127  		// result: (ULE cmp yes no)
 14128  		for {
 14129  			v := b.Control
 14130  			if v.Op != Op386TESTB {
 14131  				break
 14132  			}
 14133  			v_0 := v.Args[0]
 14134  			if v_0.Op != Op386SETBE {
 14135  				break
 14136  			}
 14137  			cmp := v_0.Args[0]
 14138  			v_1 := v.Args[1]
 14139  			if v_1.Op != Op386SETBE {
 14140  				break
 14141  			}
 14142  			if cmp != v_1.Args[0] {
 14143  				break
 14144  			}
 14145  			yes := b.Succs[0]
 14146  			no := b.Succs[1]
 14147  			b.Kind = Block386ULE
 14148  			b.SetControl(cmp)
 14149  			_ = yes
 14150  			_ = no
 14151  			return true
 14152  		}
 14153  		// match: (NE (TESTB (SETA  cmp) (SETA  cmp)) yes no)
 14154  		// cond:
 14155  		// result: (UGT cmp yes no)
 14156  		for {
 14157  			v := b.Control
 14158  			if v.Op != Op386TESTB {
 14159  				break
 14160  			}
 14161  			v_0 := v.Args[0]
 14162  			if v_0.Op != Op386SETA {
 14163  				break
 14164  			}
 14165  			cmp := v_0.Args[0]
 14166  			v_1 := v.Args[1]
 14167  			if v_1.Op != Op386SETA {
 14168  				break
 14169  			}
 14170  			if cmp != v_1.Args[0] {
 14171  				break
 14172  			}
 14173  			yes := b.Succs[0]
 14174  			no := b.Succs[1]
 14175  			b.Kind = Block386UGT
 14176  			b.SetControl(cmp)
 14177  			_ = yes
 14178  			_ = no
 14179  			return true
 14180  		}
 14181  		// match: (NE (TESTB (SETAE cmp) (SETAE cmp)) yes no)
 14182  		// cond:
 14183  		// result: (UGE cmp yes no)
 14184  		for {
 14185  			v := b.Control
 14186  			if v.Op != Op386TESTB {
 14187  				break
 14188  			}
 14189  			v_0 := v.Args[0]
 14190  			if v_0.Op != Op386SETAE {
 14191  				break
 14192  			}
 14193  			cmp := v_0.Args[0]
 14194  			v_1 := v.Args[1]
 14195  			if v_1.Op != Op386SETAE {
 14196  				break
 14197  			}
 14198  			if cmp != v_1.Args[0] {
 14199  				break
 14200  			}
 14201  			yes := b.Succs[0]
 14202  			no := b.Succs[1]
 14203  			b.Kind = Block386UGE
 14204  			b.SetControl(cmp)
 14205  			_ = yes
 14206  			_ = no
 14207  			return true
 14208  		}
 14209  		// match: (NE (TESTB (SETGF  cmp) (SETGF  cmp)) yes no)
 14210  		// cond:
 14211  		// result: (UGT  cmp yes no)
 14212  		for {
 14213  			v := b.Control
 14214  			if v.Op != Op386TESTB {
 14215  				break
 14216  			}
 14217  			v_0 := v.Args[0]
 14218  			if v_0.Op != Op386SETGF {
 14219  				break
 14220  			}
 14221  			cmp := v_0.Args[0]
 14222  			v_1 := v.Args[1]
 14223  			if v_1.Op != Op386SETGF {
 14224  				break
 14225  			}
 14226  			if cmp != v_1.Args[0] {
 14227  				break
 14228  			}
 14229  			yes := b.Succs[0]
 14230  			no := b.Succs[1]
 14231  			b.Kind = Block386UGT
 14232  			b.SetControl(cmp)
 14233  			_ = yes
 14234  			_ = no
 14235  			return true
 14236  		}
 14237  		// match: (NE (TESTB (SETGEF cmp) (SETGEF cmp)) yes no)
 14238  		// cond:
 14239  		// result: (UGE  cmp yes no)
 14240  		for {
 14241  			v := b.Control
 14242  			if v.Op != Op386TESTB {
 14243  				break
 14244  			}
 14245  			v_0 := v.Args[0]
 14246  			if v_0.Op != Op386SETGEF {
 14247  				break
 14248  			}
 14249  			cmp := v_0.Args[0]
 14250  			v_1 := v.Args[1]
 14251  			if v_1.Op != Op386SETGEF {
 14252  				break
 14253  			}
 14254  			if cmp != v_1.Args[0] {
 14255  				break
 14256  			}
 14257  			yes := b.Succs[0]
 14258  			no := b.Succs[1]
 14259  			b.Kind = Block386UGE
 14260  			b.SetControl(cmp)
 14261  			_ = yes
 14262  			_ = no
 14263  			return true
 14264  		}
 14265  		// match: (NE (TESTB (SETEQF cmp) (SETEQF cmp)) yes no)
 14266  		// cond:
 14267  		// result: (EQF  cmp yes no)
 14268  		for {
 14269  			v := b.Control
 14270  			if v.Op != Op386TESTB {
 14271  				break
 14272  			}
 14273  			v_0 := v.Args[0]
 14274  			if v_0.Op != Op386SETEQF {
 14275  				break
 14276  			}
 14277  			cmp := v_0.Args[0]
 14278  			v_1 := v.Args[1]
 14279  			if v_1.Op != Op386SETEQF {
 14280  				break
 14281  			}
 14282  			if cmp != v_1.Args[0] {
 14283  				break
 14284  			}
 14285  			yes := b.Succs[0]
 14286  			no := b.Succs[1]
 14287  			b.Kind = Block386EQF
 14288  			b.SetControl(cmp)
 14289  			_ = yes
 14290  			_ = no
 14291  			return true
 14292  		}
 14293  		// match: (NE (TESTB (SETNEF cmp) (SETNEF cmp)) yes no)
 14294  		// cond:
 14295  		// result: (NEF  cmp yes no)
 14296  		for {
 14297  			v := b.Control
 14298  			if v.Op != Op386TESTB {
 14299  				break
 14300  			}
 14301  			v_0 := v.Args[0]
 14302  			if v_0.Op != Op386SETNEF {
 14303  				break
 14304  			}
 14305  			cmp := v_0.Args[0]
 14306  			v_1 := v.Args[1]
 14307  			if v_1.Op != Op386SETNEF {
 14308  				break
 14309  			}
 14310  			if cmp != v_1.Args[0] {
 14311  				break
 14312  			}
 14313  			yes := b.Succs[0]
 14314  			no := b.Succs[1]
 14315  			b.Kind = Block386NEF
 14316  			b.SetControl(cmp)
 14317  			_ = yes
 14318  			_ = no
 14319  			return true
 14320  		}
 14321  		// match: (NE (InvertFlags cmp) yes no)
 14322  		// cond:
 14323  		// result: (NE cmp yes no)
 14324  		for {
 14325  			v := b.Control
 14326  			if v.Op != Op386InvertFlags {
 14327  				break
 14328  			}
 14329  			cmp := v.Args[0]
 14330  			yes := b.Succs[0]
 14331  			no := b.Succs[1]
 14332  			b.Kind = Block386NE
 14333  			b.SetControl(cmp)
 14334  			_ = yes
 14335  			_ = no
 14336  			return true
 14337  		}
 14338  		// match: (NE (FlagEQ) yes no)
 14339  		// cond:
 14340  		// result: (First nil no yes)
 14341  		for {
 14342  			v := b.Control
 14343  			if v.Op != Op386FlagEQ {
 14344  				break
 14345  			}
 14346  			yes := b.Succs[0]
 14347  			no := b.Succs[1]
 14348  			b.Kind = BlockFirst
 14349  			b.SetControl(nil)
 14350  			b.swapSuccessors()
 14351  			_ = no
 14352  			_ = yes
 14353  			return true
 14354  		}
 14355  		// match: (NE (FlagLT_ULT) yes no)
 14356  		// cond:
 14357  		// result: (First nil yes no)
 14358  		for {
 14359  			v := b.Control
 14360  			if v.Op != Op386FlagLT_ULT {
 14361  				break
 14362  			}
 14363  			yes := b.Succs[0]
 14364  			no := b.Succs[1]
 14365  			b.Kind = BlockFirst
 14366  			b.SetControl(nil)
 14367  			_ = yes
 14368  			_ = no
 14369  			return true
 14370  		}
 14371  		// match: (NE (FlagLT_UGT) yes no)
 14372  		// cond:
 14373  		// result: (First nil yes no)
 14374  		for {
 14375  			v := b.Control
 14376  			if v.Op != Op386FlagLT_UGT {
 14377  				break
 14378  			}
 14379  			yes := b.Succs[0]
 14380  			no := b.Succs[1]
 14381  			b.Kind = BlockFirst
 14382  			b.SetControl(nil)
 14383  			_ = yes
 14384  			_ = no
 14385  			return true
 14386  		}
 14387  		// match: (NE (FlagGT_ULT) yes no)
 14388  		// cond:
 14389  		// result: (First nil yes no)
 14390  		for {
 14391  			v := b.Control
 14392  			if v.Op != Op386FlagGT_ULT {
 14393  				break
 14394  			}
 14395  			yes := b.Succs[0]
 14396  			no := b.Succs[1]
 14397  			b.Kind = BlockFirst
 14398  			b.SetControl(nil)
 14399  			_ = yes
 14400  			_ = no
 14401  			return true
 14402  		}
 14403  		// match: (NE (FlagGT_UGT) yes no)
 14404  		// cond:
 14405  		// result: (First nil yes no)
 14406  		for {
 14407  			v := b.Control
 14408  			if v.Op != Op386FlagGT_UGT {
 14409  				break
 14410  			}
 14411  			yes := b.Succs[0]
 14412  			no := b.Succs[1]
 14413  			b.Kind = BlockFirst
 14414  			b.SetControl(nil)
 14415  			_ = yes
 14416  			_ = no
 14417  			return true
 14418  		}
 14419  	case Block386UGE:
 14420  		// match: (UGE (InvertFlags cmp) yes no)
 14421  		// cond:
 14422  		// result: (ULE cmp yes no)
 14423  		for {
 14424  			v := b.Control
 14425  			if v.Op != Op386InvertFlags {
 14426  				break
 14427  			}
 14428  			cmp := v.Args[0]
 14429  			yes := b.Succs[0]
 14430  			no := b.Succs[1]
 14431  			b.Kind = Block386ULE
 14432  			b.SetControl(cmp)
 14433  			_ = yes
 14434  			_ = no
 14435  			return true
 14436  		}
 14437  		// match: (UGE (FlagEQ) yes no)
 14438  		// cond:
 14439  		// result: (First nil yes no)
 14440  		for {
 14441  			v := b.Control
 14442  			if v.Op != Op386FlagEQ {
 14443  				break
 14444  			}
 14445  			yes := b.Succs[0]
 14446  			no := b.Succs[1]
 14447  			b.Kind = BlockFirst
 14448  			b.SetControl(nil)
 14449  			_ = yes
 14450  			_ = no
 14451  			return true
 14452  		}
 14453  		// match: (UGE (FlagLT_ULT) yes no)
 14454  		// cond:
 14455  		// result: (First nil no yes)
 14456  		for {
 14457  			v := b.Control
 14458  			if v.Op != Op386FlagLT_ULT {
 14459  				break
 14460  			}
 14461  			yes := b.Succs[0]
 14462  			no := b.Succs[1]
 14463  			b.Kind = BlockFirst
 14464  			b.SetControl(nil)
 14465  			b.swapSuccessors()
 14466  			_ = no
 14467  			_ = yes
 14468  			return true
 14469  		}
 14470  		// match: (UGE (FlagLT_UGT) yes no)
 14471  		// cond:
 14472  		// result: (First nil yes no)
 14473  		for {
 14474  			v := b.Control
 14475  			if v.Op != Op386FlagLT_UGT {
 14476  				break
 14477  			}
 14478  			yes := b.Succs[0]
 14479  			no := b.Succs[1]
 14480  			b.Kind = BlockFirst
 14481  			b.SetControl(nil)
 14482  			_ = yes
 14483  			_ = no
 14484  			return true
 14485  		}
 14486  		// match: (UGE (FlagGT_ULT) yes no)
 14487  		// cond:
 14488  		// result: (First nil no yes)
 14489  		for {
 14490  			v := b.Control
 14491  			if v.Op != Op386FlagGT_ULT {
 14492  				break
 14493  			}
 14494  			yes := b.Succs[0]
 14495  			no := b.Succs[1]
 14496  			b.Kind = BlockFirst
 14497  			b.SetControl(nil)
 14498  			b.swapSuccessors()
 14499  			_ = no
 14500  			_ = yes
 14501  			return true
 14502  		}
 14503  		// match: (UGE (FlagGT_UGT) yes no)
 14504  		// cond:
 14505  		// result: (First nil yes no)
 14506  		for {
 14507  			v := b.Control
 14508  			if v.Op != Op386FlagGT_UGT {
 14509  				break
 14510  			}
 14511  			yes := b.Succs[0]
 14512  			no := b.Succs[1]
 14513  			b.Kind = BlockFirst
 14514  			b.SetControl(nil)
 14515  			_ = yes
 14516  			_ = no
 14517  			return true
 14518  		}
 14519  	case Block386UGT:
 14520  		// match: (UGT (InvertFlags cmp) yes no)
 14521  		// cond:
 14522  		// result: (ULT cmp yes no)
 14523  		for {
 14524  			v := b.Control
 14525  			if v.Op != Op386InvertFlags {
 14526  				break
 14527  			}
 14528  			cmp := v.Args[0]
 14529  			yes := b.Succs[0]
 14530  			no := b.Succs[1]
 14531  			b.Kind = Block386ULT
 14532  			b.SetControl(cmp)
 14533  			_ = yes
 14534  			_ = no
 14535  			return true
 14536  		}
 14537  		// match: (UGT (FlagEQ) yes no)
 14538  		// cond:
 14539  		// result: (First nil no yes)
 14540  		for {
 14541  			v := b.Control
 14542  			if v.Op != Op386FlagEQ {
 14543  				break
 14544  			}
 14545  			yes := b.Succs[0]
 14546  			no := b.Succs[1]
 14547  			b.Kind = BlockFirst
 14548  			b.SetControl(nil)
 14549  			b.swapSuccessors()
 14550  			_ = no
 14551  			_ = yes
 14552  			return true
 14553  		}
 14554  		// match: (UGT (FlagLT_ULT) yes no)
 14555  		// cond:
 14556  		// result: (First nil no yes)
 14557  		for {
 14558  			v := b.Control
 14559  			if v.Op != Op386FlagLT_ULT {
 14560  				break
 14561  			}
 14562  			yes := b.Succs[0]
 14563  			no := b.Succs[1]
 14564  			b.Kind = BlockFirst
 14565  			b.SetControl(nil)
 14566  			b.swapSuccessors()
 14567  			_ = no
 14568  			_ = yes
 14569  			return true
 14570  		}
 14571  		// match: (UGT (FlagLT_UGT) yes no)
 14572  		// cond:
 14573  		// result: (First nil yes no)
 14574  		for {
 14575  			v := b.Control
 14576  			if v.Op != Op386FlagLT_UGT {
 14577  				break
 14578  			}
 14579  			yes := b.Succs[0]
 14580  			no := b.Succs[1]
 14581  			b.Kind = BlockFirst
 14582  			b.SetControl(nil)
 14583  			_ = yes
 14584  			_ = no
 14585  			return true
 14586  		}
 14587  		// match: (UGT (FlagGT_ULT) yes no)
 14588  		// cond:
 14589  		// result: (First nil no yes)
 14590  		for {
 14591  			v := b.Control
 14592  			if v.Op != Op386FlagGT_ULT {
 14593  				break
 14594  			}
 14595  			yes := b.Succs[0]
 14596  			no := b.Succs[1]
 14597  			b.Kind = BlockFirst
 14598  			b.SetControl(nil)
 14599  			b.swapSuccessors()
 14600  			_ = no
 14601  			_ = yes
 14602  			return true
 14603  		}
 14604  		// match: (UGT (FlagGT_UGT) yes no)
 14605  		// cond:
 14606  		// result: (First nil yes no)
 14607  		for {
 14608  			v := b.Control
 14609  			if v.Op != Op386FlagGT_UGT {
 14610  				break
 14611  			}
 14612  			yes := b.Succs[0]
 14613  			no := b.Succs[1]
 14614  			b.Kind = BlockFirst
 14615  			b.SetControl(nil)
 14616  			_ = yes
 14617  			_ = no
 14618  			return true
 14619  		}
 14620  	case Block386ULE:
 14621  		// match: (ULE (InvertFlags cmp) yes no)
 14622  		// cond:
 14623  		// result: (UGE cmp yes no)
 14624  		for {
 14625  			v := b.Control
 14626  			if v.Op != Op386InvertFlags {
 14627  				break
 14628  			}
 14629  			cmp := v.Args[0]
 14630  			yes := b.Succs[0]
 14631  			no := b.Succs[1]
 14632  			b.Kind = Block386UGE
 14633  			b.SetControl(cmp)
 14634  			_ = yes
 14635  			_ = no
 14636  			return true
 14637  		}
 14638  		// match: (ULE (FlagEQ) yes no)
 14639  		// cond:
 14640  		// result: (First nil yes no)
 14641  		for {
 14642  			v := b.Control
 14643  			if v.Op != Op386FlagEQ {
 14644  				break
 14645  			}
 14646  			yes := b.Succs[0]
 14647  			no := b.Succs[1]
 14648  			b.Kind = BlockFirst
 14649  			b.SetControl(nil)
 14650  			_ = yes
 14651  			_ = no
 14652  			return true
 14653  		}
 14654  		// match: (ULE (FlagLT_ULT) yes no)
 14655  		// cond:
 14656  		// result: (First nil yes no)
 14657  		for {
 14658  			v := b.Control
 14659  			if v.Op != Op386FlagLT_ULT {
 14660  				break
 14661  			}
 14662  			yes := b.Succs[0]
 14663  			no := b.Succs[1]
 14664  			b.Kind = BlockFirst
 14665  			b.SetControl(nil)
 14666  			_ = yes
 14667  			_ = no
 14668  			return true
 14669  		}
 14670  		// match: (ULE (FlagLT_UGT) yes no)
 14671  		// cond:
 14672  		// result: (First nil no yes)
 14673  		for {
 14674  			v := b.Control
 14675  			if v.Op != Op386FlagLT_UGT {
 14676  				break
 14677  			}
 14678  			yes := b.Succs[0]
 14679  			no := b.Succs[1]
 14680  			b.Kind = BlockFirst
 14681  			b.SetControl(nil)
 14682  			b.swapSuccessors()
 14683  			_ = no
 14684  			_ = yes
 14685  			return true
 14686  		}
 14687  		// match: (ULE (FlagGT_ULT) yes no)
 14688  		// cond:
 14689  		// result: (First nil yes no)
 14690  		for {
 14691  			v := b.Control
 14692  			if v.Op != Op386FlagGT_ULT {
 14693  				break
 14694  			}
 14695  			yes := b.Succs[0]
 14696  			no := b.Succs[1]
 14697  			b.Kind = BlockFirst
 14698  			b.SetControl(nil)
 14699  			_ = yes
 14700  			_ = no
 14701  			return true
 14702  		}
 14703  		// match: (ULE (FlagGT_UGT) yes no)
 14704  		// cond:
 14705  		// result: (First nil no yes)
 14706  		for {
 14707  			v := b.Control
 14708  			if v.Op != Op386FlagGT_UGT {
 14709  				break
 14710  			}
 14711  			yes := b.Succs[0]
 14712  			no := b.Succs[1]
 14713  			b.Kind = BlockFirst
 14714  			b.SetControl(nil)
 14715  			b.swapSuccessors()
 14716  			_ = no
 14717  			_ = yes
 14718  			return true
 14719  		}
 14720  	case Block386ULT:
 14721  		// match: (ULT (InvertFlags cmp) yes no)
 14722  		// cond:
 14723  		// result: (UGT cmp yes no)
 14724  		for {
 14725  			v := b.Control
 14726  			if v.Op != Op386InvertFlags {
 14727  				break
 14728  			}
 14729  			cmp := v.Args[0]
 14730  			yes := b.Succs[0]
 14731  			no := b.Succs[1]
 14732  			b.Kind = Block386UGT
 14733  			b.SetControl(cmp)
 14734  			_ = yes
 14735  			_ = no
 14736  			return true
 14737  		}
 14738  		// match: (ULT (FlagEQ) yes no)
 14739  		// cond:
 14740  		// result: (First nil no yes)
 14741  		for {
 14742  			v := b.Control
 14743  			if v.Op != Op386FlagEQ {
 14744  				break
 14745  			}
 14746  			yes := b.Succs[0]
 14747  			no := b.Succs[1]
 14748  			b.Kind = BlockFirst
 14749  			b.SetControl(nil)
 14750  			b.swapSuccessors()
 14751  			_ = no
 14752  			_ = yes
 14753  			return true
 14754  		}
 14755  		// match: (ULT (FlagLT_ULT) yes no)
 14756  		// cond:
 14757  		// result: (First nil yes no)
 14758  		for {
 14759  			v := b.Control
 14760  			if v.Op != Op386FlagLT_ULT {
 14761  				break
 14762  			}
 14763  			yes := b.Succs[0]
 14764  			no := b.Succs[1]
 14765  			b.Kind = BlockFirst
 14766  			b.SetControl(nil)
 14767  			_ = yes
 14768  			_ = no
 14769  			return true
 14770  		}
 14771  		// match: (ULT (FlagLT_UGT) yes no)
 14772  		// cond:
 14773  		// result: (First nil no yes)
 14774  		for {
 14775  			v := b.Control
 14776  			if v.Op != Op386FlagLT_UGT {
 14777  				break
 14778  			}
 14779  			yes := b.Succs[0]
 14780  			no := b.Succs[1]
 14781  			b.Kind = BlockFirst
 14782  			b.SetControl(nil)
 14783  			b.swapSuccessors()
 14784  			_ = no
 14785  			_ = yes
 14786  			return true
 14787  		}
 14788  		// match: (ULT (FlagGT_ULT) yes no)
 14789  		// cond:
 14790  		// result: (First nil yes no)
 14791  		for {
 14792  			v := b.Control
 14793  			if v.Op != Op386FlagGT_ULT {
 14794  				break
 14795  			}
 14796  			yes := b.Succs[0]
 14797  			no := b.Succs[1]
 14798  			b.Kind = BlockFirst
 14799  			b.SetControl(nil)
 14800  			_ = yes
 14801  			_ = no
 14802  			return true
 14803  		}
 14804  		// match: (ULT (FlagGT_UGT) yes no)
 14805  		// cond:
 14806  		// result: (First nil no yes)
 14807  		for {
 14808  			v := b.Control
 14809  			if v.Op != Op386FlagGT_UGT {
 14810  				break
 14811  			}
 14812  			yes := b.Succs[0]
 14813  			no := b.Succs[1]
 14814  			b.Kind = BlockFirst
 14815  			b.SetControl(nil)
 14816  			b.swapSuccessors()
 14817  			_ = no
 14818  			_ = yes
 14819  			return true
 14820  		}
 14821  	}
 14822  	return false
 14823  }