github.com/fenixara/go@v0.0.0-20170127160404-96ea0918e670/src/cmd/compile/internal/ssa/rewrite386.go (about)

     1  // autogenerated from gen/386.rules: do not edit!
     2  // generated with: cd gen; go run *.go
     3  
     4  package ssa
     5  
     6  import "math"
     7  
     8  var _ = math.MinInt8 // in case not otherwise used
     9  func rewriteValue386(v *Value, config *Config) bool {
    10  	switch v.Op {
    11  	case Op386ADCL:
    12  		return rewriteValue386_Op386ADCL(v, config)
    13  	case Op386ADDL:
    14  		return rewriteValue386_Op386ADDL(v, config)
    15  	case Op386ADDLcarry:
    16  		return rewriteValue386_Op386ADDLcarry(v, config)
    17  	case Op386ADDLconst:
    18  		return rewriteValue386_Op386ADDLconst(v, config)
    19  	case Op386ANDL:
    20  		return rewriteValue386_Op386ANDL(v, config)
    21  	case Op386ANDLconst:
    22  		return rewriteValue386_Op386ANDLconst(v, config)
    23  	case Op386CMPB:
    24  		return rewriteValue386_Op386CMPB(v, config)
    25  	case Op386CMPBconst:
    26  		return rewriteValue386_Op386CMPBconst(v, config)
    27  	case Op386CMPL:
    28  		return rewriteValue386_Op386CMPL(v, config)
    29  	case Op386CMPLconst:
    30  		return rewriteValue386_Op386CMPLconst(v, config)
    31  	case Op386CMPW:
    32  		return rewriteValue386_Op386CMPW(v, config)
    33  	case Op386CMPWconst:
    34  		return rewriteValue386_Op386CMPWconst(v, config)
    35  	case Op386LEAL:
    36  		return rewriteValue386_Op386LEAL(v, config)
    37  	case Op386LEAL1:
    38  		return rewriteValue386_Op386LEAL1(v, config)
    39  	case Op386LEAL2:
    40  		return rewriteValue386_Op386LEAL2(v, config)
    41  	case Op386LEAL4:
    42  		return rewriteValue386_Op386LEAL4(v, config)
    43  	case Op386LEAL8:
    44  		return rewriteValue386_Op386LEAL8(v, config)
    45  	case Op386MOVBLSX:
    46  		return rewriteValue386_Op386MOVBLSX(v, config)
    47  	case Op386MOVBLSXload:
    48  		return rewriteValue386_Op386MOVBLSXload(v, config)
    49  	case Op386MOVBLZX:
    50  		return rewriteValue386_Op386MOVBLZX(v, config)
    51  	case Op386MOVBload:
    52  		return rewriteValue386_Op386MOVBload(v, config)
    53  	case Op386MOVBloadidx1:
    54  		return rewriteValue386_Op386MOVBloadidx1(v, config)
    55  	case Op386MOVBstore:
    56  		return rewriteValue386_Op386MOVBstore(v, config)
    57  	case Op386MOVBstoreconst:
    58  		return rewriteValue386_Op386MOVBstoreconst(v, config)
    59  	case Op386MOVBstoreconstidx1:
    60  		return rewriteValue386_Op386MOVBstoreconstidx1(v, config)
    61  	case Op386MOVBstoreidx1:
    62  		return rewriteValue386_Op386MOVBstoreidx1(v, config)
    63  	case Op386MOVLload:
    64  		return rewriteValue386_Op386MOVLload(v, config)
    65  	case Op386MOVLloadidx1:
    66  		return rewriteValue386_Op386MOVLloadidx1(v, config)
    67  	case Op386MOVLloadidx4:
    68  		return rewriteValue386_Op386MOVLloadidx4(v, config)
    69  	case Op386MOVLstore:
    70  		return rewriteValue386_Op386MOVLstore(v, config)
    71  	case Op386MOVLstoreconst:
    72  		return rewriteValue386_Op386MOVLstoreconst(v, config)
    73  	case Op386MOVLstoreconstidx1:
    74  		return rewriteValue386_Op386MOVLstoreconstidx1(v, config)
    75  	case Op386MOVLstoreconstidx4:
    76  		return rewriteValue386_Op386MOVLstoreconstidx4(v, config)
    77  	case Op386MOVLstoreidx1:
    78  		return rewriteValue386_Op386MOVLstoreidx1(v, config)
    79  	case Op386MOVLstoreidx4:
    80  		return rewriteValue386_Op386MOVLstoreidx4(v, config)
    81  	case Op386MOVSDconst:
    82  		return rewriteValue386_Op386MOVSDconst(v, config)
    83  	case Op386MOVSDload:
    84  		return rewriteValue386_Op386MOVSDload(v, config)
    85  	case Op386MOVSDloadidx1:
    86  		return rewriteValue386_Op386MOVSDloadidx1(v, config)
    87  	case Op386MOVSDloadidx8:
    88  		return rewriteValue386_Op386MOVSDloadidx8(v, config)
    89  	case Op386MOVSDstore:
    90  		return rewriteValue386_Op386MOVSDstore(v, config)
    91  	case Op386MOVSDstoreidx1:
    92  		return rewriteValue386_Op386MOVSDstoreidx1(v, config)
    93  	case Op386MOVSDstoreidx8:
    94  		return rewriteValue386_Op386MOVSDstoreidx8(v, config)
    95  	case Op386MOVSSconst:
    96  		return rewriteValue386_Op386MOVSSconst(v, config)
    97  	case Op386MOVSSload:
    98  		return rewriteValue386_Op386MOVSSload(v, config)
    99  	case Op386MOVSSloadidx1:
   100  		return rewriteValue386_Op386MOVSSloadidx1(v, config)
   101  	case Op386MOVSSloadidx4:
   102  		return rewriteValue386_Op386MOVSSloadidx4(v, config)
   103  	case Op386MOVSSstore:
   104  		return rewriteValue386_Op386MOVSSstore(v, config)
   105  	case Op386MOVSSstoreidx1:
   106  		return rewriteValue386_Op386MOVSSstoreidx1(v, config)
   107  	case Op386MOVSSstoreidx4:
   108  		return rewriteValue386_Op386MOVSSstoreidx4(v, config)
   109  	case Op386MOVWLSX:
   110  		return rewriteValue386_Op386MOVWLSX(v, config)
   111  	case Op386MOVWLSXload:
   112  		return rewriteValue386_Op386MOVWLSXload(v, config)
   113  	case Op386MOVWLZX:
   114  		return rewriteValue386_Op386MOVWLZX(v, config)
   115  	case Op386MOVWload:
   116  		return rewriteValue386_Op386MOVWload(v, config)
   117  	case Op386MOVWloadidx1:
   118  		return rewriteValue386_Op386MOVWloadidx1(v, config)
   119  	case Op386MOVWloadidx2:
   120  		return rewriteValue386_Op386MOVWloadidx2(v, config)
   121  	case Op386MOVWstore:
   122  		return rewriteValue386_Op386MOVWstore(v, config)
   123  	case Op386MOVWstoreconst:
   124  		return rewriteValue386_Op386MOVWstoreconst(v, config)
   125  	case Op386MOVWstoreconstidx1:
   126  		return rewriteValue386_Op386MOVWstoreconstidx1(v, config)
   127  	case Op386MOVWstoreconstidx2:
   128  		return rewriteValue386_Op386MOVWstoreconstidx2(v, config)
   129  	case Op386MOVWstoreidx1:
   130  		return rewriteValue386_Op386MOVWstoreidx1(v, config)
   131  	case Op386MOVWstoreidx2:
   132  		return rewriteValue386_Op386MOVWstoreidx2(v, config)
   133  	case Op386MULL:
   134  		return rewriteValue386_Op386MULL(v, config)
   135  	case Op386MULLconst:
   136  		return rewriteValue386_Op386MULLconst(v, config)
   137  	case Op386NEGL:
   138  		return rewriteValue386_Op386NEGL(v, config)
   139  	case Op386NOTL:
   140  		return rewriteValue386_Op386NOTL(v, config)
   141  	case Op386ORL:
   142  		return rewriteValue386_Op386ORL(v, config)
   143  	case Op386ORLconst:
   144  		return rewriteValue386_Op386ORLconst(v, config)
   145  	case Op386ROLBconst:
   146  		return rewriteValue386_Op386ROLBconst(v, config)
   147  	case Op386ROLLconst:
   148  		return rewriteValue386_Op386ROLLconst(v, config)
   149  	case Op386ROLWconst:
   150  		return rewriteValue386_Op386ROLWconst(v, config)
   151  	case Op386SARB:
   152  		return rewriteValue386_Op386SARB(v, config)
   153  	case Op386SARBconst:
   154  		return rewriteValue386_Op386SARBconst(v, config)
   155  	case Op386SARL:
   156  		return rewriteValue386_Op386SARL(v, config)
   157  	case Op386SARLconst:
   158  		return rewriteValue386_Op386SARLconst(v, config)
   159  	case Op386SARW:
   160  		return rewriteValue386_Op386SARW(v, config)
   161  	case Op386SARWconst:
   162  		return rewriteValue386_Op386SARWconst(v, config)
   163  	case Op386SBBL:
   164  		return rewriteValue386_Op386SBBL(v, config)
   165  	case Op386SBBLcarrymask:
   166  		return rewriteValue386_Op386SBBLcarrymask(v, config)
   167  	case Op386SETA:
   168  		return rewriteValue386_Op386SETA(v, config)
   169  	case Op386SETAE:
   170  		return rewriteValue386_Op386SETAE(v, config)
   171  	case Op386SETB:
   172  		return rewriteValue386_Op386SETB(v, config)
   173  	case Op386SETBE:
   174  		return rewriteValue386_Op386SETBE(v, config)
   175  	case Op386SETEQ:
   176  		return rewriteValue386_Op386SETEQ(v, config)
   177  	case Op386SETG:
   178  		return rewriteValue386_Op386SETG(v, config)
   179  	case Op386SETGE:
   180  		return rewriteValue386_Op386SETGE(v, config)
   181  	case Op386SETL:
   182  		return rewriteValue386_Op386SETL(v, config)
   183  	case Op386SETLE:
   184  		return rewriteValue386_Op386SETLE(v, config)
   185  	case Op386SETNE:
   186  		return rewriteValue386_Op386SETNE(v, config)
   187  	case Op386SHLL:
   188  		return rewriteValue386_Op386SHLL(v, config)
   189  	case Op386SHRB:
   190  		return rewriteValue386_Op386SHRB(v, config)
   191  	case Op386SHRL:
   192  		return rewriteValue386_Op386SHRL(v, config)
   193  	case Op386SHRW:
   194  		return rewriteValue386_Op386SHRW(v, config)
   195  	case Op386SUBL:
   196  		return rewriteValue386_Op386SUBL(v, config)
   197  	case Op386SUBLcarry:
   198  		return rewriteValue386_Op386SUBLcarry(v, config)
   199  	case Op386SUBLconst:
   200  		return rewriteValue386_Op386SUBLconst(v, config)
   201  	case Op386XORL:
   202  		return rewriteValue386_Op386XORL(v, config)
   203  	case Op386XORLconst:
   204  		return rewriteValue386_Op386XORLconst(v, config)
   205  	case OpAdd16:
   206  		return rewriteValue386_OpAdd16(v, config)
   207  	case OpAdd32:
   208  		return rewriteValue386_OpAdd32(v, config)
   209  	case OpAdd32F:
   210  		return rewriteValue386_OpAdd32F(v, config)
   211  	case OpAdd32carry:
   212  		return rewriteValue386_OpAdd32carry(v, config)
   213  	case OpAdd32withcarry:
   214  		return rewriteValue386_OpAdd32withcarry(v, config)
   215  	case OpAdd64F:
   216  		return rewriteValue386_OpAdd64F(v, config)
   217  	case OpAdd8:
   218  		return rewriteValue386_OpAdd8(v, config)
   219  	case OpAddPtr:
   220  		return rewriteValue386_OpAddPtr(v, config)
   221  	case OpAddr:
   222  		return rewriteValue386_OpAddr(v, config)
   223  	case OpAnd16:
   224  		return rewriteValue386_OpAnd16(v, config)
   225  	case OpAnd32:
   226  		return rewriteValue386_OpAnd32(v, config)
   227  	case OpAnd8:
   228  		return rewriteValue386_OpAnd8(v, config)
   229  	case OpAndB:
   230  		return rewriteValue386_OpAndB(v, config)
   231  	case OpBswap32:
   232  		return rewriteValue386_OpBswap32(v, config)
   233  	case OpClosureCall:
   234  		return rewriteValue386_OpClosureCall(v, config)
   235  	case OpCom16:
   236  		return rewriteValue386_OpCom16(v, config)
   237  	case OpCom32:
   238  		return rewriteValue386_OpCom32(v, config)
   239  	case OpCom8:
   240  		return rewriteValue386_OpCom8(v, config)
   241  	case OpConst16:
   242  		return rewriteValue386_OpConst16(v, config)
   243  	case OpConst32:
   244  		return rewriteValue386_OpConst32(v, config)
   245  	case OpConst32F:
   246  		return rewriteValue386_OpConst32F(v, config)
   247  	case OpConst64F:
   248  		return rewriteValue386_OpConst64F(v, config)
   249  	case OpConst8:
   250  		return rewriteValue386_OpConst8(v, config)
   251  	case OpConstBool:
   252  		return rewriteValue386_OpConstBool(v, config)
   253  	case OpConstNil:
   254  		return rewriteValue386_OpConstNil(v, config)
   255  	case OpConvert:
   256  		return rewriteValue386_OpConvert(v, config)
   257  	case OpCvt32Fto32:
   258  		return rewriteValue386_OpCvt32Fto32(v, config)
   259  	case OpCvt32Fto64F:
   260  		return rewriteValue386_OpCvt32Fto64F(v, config)
   261  	case OpCvt32to32F:
   262  		return rewriteValue386_OpCvt32to32F(v, config)
   263  	case OpCvt32to64F:
   264  		return rewriteValue386_OpCvt32to64F(v, config)
   265  	case OpCvt64Fto32:
   266  		return rewriteValue386_OpCvt64Fto32(v, config)
   267  	case OpCvt64Fto32F:
   268  		return rewriteValue386_OpCvt64Fto32F(v, config)
   269  	case OpDeferCall:
   270  		return rewriteValue386_OpDeferCall(v, config)
   271  	case OpDiv16:
   272  		return rewriteValue386_OpDiv16(v, config)
   273  	case OpDiv16u:
   274  		return rewriteValue386_OpDiv16u(v, config)
   275  	case OpDiv32:
   276  		return rewriteValue386_OpDiv32(v, config)
   277  	case OpDiv32F:
   278  		return rewriteValue386_OpDiv32F(v, config)
   279  	case OpDiv32u:
   280  		return rewriteValue386_OpDiv32u(v, config)
   281  	case OpDiv64F:
   282  		return rewriteValue386_OpDiv64F(v, config)
   283  	case OpDiv8:
   284  		return rewriteValue386_OpDiv8(v, config)
   285  	case OpDiv8u:
   286  		return rewriteValue386_OpDiv8u(v, config)
   287  	case OpEq16:
   288  		return rewriteValue386_OpEq16(v, config)
   289  	case OpEq32:
   290  		return rewriteValue386_OpEq32(v, config)
   291  	case OpEq32F:
   292  		return rewriteValue386_OpEq32F(v, config)
   293  	case OpEq64F:
   294  		return rewriteValue386_OpEq64F(v, config)
   295  	case OpEq8:
   296  		return rewriteValue386_OpEq8(v, config)
   297  	case OpEqB:
   298  		return rewriteValue386_OpEqB(v, config)
   299  	case OpEqPtr:
   300  		return rewriteValue386_OpEqPtr(v, config)
   301  	case OpGeq16:
   302  		return rewriteValue386_OpGeq16(v, config)
   303  	case OpGeq16U:
   304  		return rewriteValue386_OpGeq16U(v, config)
   305  	case OpGeq32:
   306  		return rewriteValue386_OpGeq32(v, config)
   307  	case OpGeq32F:
   308  		return rewriteValue386_OpGeq32F(v, config)
   309  	case OpGeq32U:
   310  		return rewriteValue386_OpGeq32U(v, config)
   311  	case OpGeq64F:
   312  		return rewriteValue386_OpGeq64F(v, config)
   313  	case OpGeq8:
   314  		return rewriteValue386_OpGeq8(v, config)
   315  	case OpGeq8U:
   316  		return rewriteValue386_OpGeq8U(v, config)
   317  	case OpGetClosurePtr:
   318  		return rewriteValue386_OpGetClosurePtr(v, config)
   319  	case OpGetG:
   320  		return rewriteValue386_OpGetG(v, config)
   321  	case OpGoCall:
   322  		return rewriteValue386_OpGoCall(v, config)
   323  	case OpGreater16:
   324  		return rewriteValue386_OpGreater16(v, config)
   325  	case OpGreater16U:
   326  		return rewriteValue386_OpGreater16U(v, config)
   327  	case OpGreater32:
   328  		return rewriteValue386_OpGreater32(v, config)
   329  	case OpGreater32F:
   330  		return rewriteValue386_OpGreater32F(v, config)
   331  	case OpGreater32U:
   332  		return rewriteValue386_OpGreater32U(v, config)
   333  	case OpGreater64F:
   334  		return rewriteValue386_OpGreater64F(v, config)
   335  	case OpGreater8:
   336  		return rewriteValue386_OpGreater8(v, config)
   337  	case OpGreater8U:
   338  		return rewriteValue386_OpGreater8U(v, config)
   339  	case OpHmul16:
   340  		return rewriteValue386_OpHmul16(v, config)
   341  	case OpHmul16u:
   342  		return rewriteValue386_OpHmul16u(v, config)
   343  	case OpHmul32:
   344  		return rewriteValue386_OpHmul32(v, config)
   345  	case OpHmul32u:
   346  		return rewriteValue386_OpHmul32u(v, config)
   347  	case OpHmul8:
   348  		return rewriteValue386_OpHmul8(v, config)
   349  	case OpHmul8u:
   350  		return rewriteValue386_OpHmul8u(v, config)
   351  	case OpInterCall:
   352  		return rewriteValue386_OpInterCall(v, config)
   353  	case OpIsInBounds:
   354  		return rewriteValue386_OpIsInBounds(v, config)
   355  	case OpIsNonNil:
   356  		return rewriteValue386_OpIsNonNil(v, config)
   357  	case OpIsSliceInBounds:
   358  		return rewriteValue386_OpIsSliceInBounds(v, config)
   359  	case OpLeq16:
   360  		return rewriteValue386_OpLeq16(v, config)
   361  	case OpLeq16U:
   362  		return rewriteValue386_OpLeq16U(v, config)
   363  	case OpLeq32:
   364  		return rewriteValue386_OpLeq32(v, config)
   365  	case OpLeq32F:
   366  		return rewriteValue386_OpLeq32F(v, config)
   367  	case OpLeq32U:
   368  		return rewriteValue386_OpLeq32U(v, config)
   369  	case OpLeq64F:
   370  		return rewriteValue386_OpLeq64F(v, config)
   371  	case OpLeq8:
   372  		return rewriteValue386_OpLeq8(v, config)
   373  	case OpLeq8U:
   374  		return rewriteValue386_OpLeq8U(v, config)
   375  	case OpLess16:
   376  		return rewriteValue386_OpLess16(v, config)
   377  	case OpLess16U:
   378  		return rewriteValue386_OpLess16U(v, config)
   379  	case OpLess32:
   380  		return rewriteValue386_OpLess32(v, config)
   381  	case OpLess32F:
   382  		return rewriteValue386_OpLess32F(v, config)
   383  	case OpLess32U:
   384  		return rewriteValue386_OpLess32U(v, config)
   385  	case OpLess64F:
   386  		return rewriteValue386_OpLess64F(v, config)
   387  	case OpLess8:
   388  		return rewriteValue386_OpLess8(v, config)
   389  	case OpLess8U:
   390  		return rewriteValue386_OpLess8U(v, config)
   391  	case OpLoad:
   392  		return rewriteValue386_OpLoad(v, config)
   393  	case OpLrot16:
   394  		return rewriteValue386_OpLrot16(v, config)
   395  	case OpLrot32:
   396  		return rewriteValue386_OpLrot32(v, config)
   397  	case OpLrot8:
   398  		return rewriteValue386_OpLrot8(v, config)
   399  	case OpLsh16x16:
   400  		return rewriteValue386_OpLsh16x16(v, config)
   401  	case OpLsh16x32:
   402  		return rewriteValue386_OpLsh16x32(v, config)
   403  	case OpLsh16x64:
   404  		return rewriteValue386_OpLsh16x64(v, config)
   405  	case OpLsh16x8:
   406  		return rewriteValue386_OpLsh16x8(v, config)
   407  	case OpLsh32x16:
   408  		return rewriteValue386_OpLsh32x16(v, config)
   409  	case OpLsh32x32:
   410  		return rewriteValue386_OpLsh32x32(v, config)
   411  	case OpLsh32x64:
   412  		return rewriteValue386_OpLsh32x64(v, config)
   413  	case OpLsh32x8:
   414  		return rewriteValue386_OpLsh32x8(v, config)
   415  	case OpLsh8x16:
   416  		return rewriteValue386_OpLsh8x16(v, config)
   417  	case OpLsh8x32:
   418  		return rewriteValue386_OpLsh8x32(v, config)
   419  	case OpLsh8x64:
   420  		return rewriteValue386_OpLsh8x64(v, config)
   421  	case OpLsh8x8:
   422  		return rewriteValue386_OpLsh8x8(v, config)
   423  	case OpMod16:
   424  		return rewriteValue386_OpMod16(v, config)
   425  	case OpMod16u:
   426  		return rewriteValue386_OpMod16u(v, config)
   427  	case OpMod32:
   428  		return rewriteValue386_OpMod32(v, config)
   429  	case OpMod32u:
   430  		return rewriteValue386_OpMod32u(v, config)
   431  	case OpMod8:
   432  		return rewriteValue386_OpMod8(v, config)
   433  	case OpMod8u:
   434  		return rewriteValue386_OpMod8u(v, config)
   435  	case OpMove:
   436  		return rewriteValue386_OpMove(v, config)
   437  	case OpMul16:
   438  		return rewriteValue386_OpMul16(v, config)
   439  	case OpMul32:
   440  		return rewriteValue386_OpMul32(v, config)
   441  	case OpMul32F:
   442  		return rewriteValue386_OpMul32F(v, config)
   443  	case OpMul32uhilo:
   444  		return rewriteValue386_OpMul32uhilo(v, config)
   445  	case OpMul64F:
   446  		return rewriteValue386_OpMul64F(v, config)
   447  	case OpMul8:
   448  		return rewriteValue386_OpMul8(v, config)
   449  	case OpNeg16:
   450  		return rewriteValue386_OpNeg16(v, config)
   451  	case OpNeg32:
   452  		return rewriteValue386_OpNeg32(v, config)
   453  	case OpNeg32F:
   454  		return rewriteValue386_OpNeg32F(v, config)
   455  	case OpNeg64F:
   456  		return rewriteValue386_OpNeg64F(v, config)
   457  	case OpNeg8:
   458  		return rewriteValue386_OpNeg8(v, config)
   459  	case OpNeq16:
   460  		return rewriteValue386_OpNeq16(v, config)
   461  	case OpNeq32:
   462  		return rewriteValue386_OpNeq32(v, config)
   463  	case OpNeq32F:
   464  		return rewriteValue386_OpNeq32F(v, config)
   465  	case OpNeq64F:
   466  		return rewriteValue386_OpNeq64F(v, config)
   467  	case OpNeq8:
   468  		return rewriteValue386_OpNeq8(v, config)
   469  	case OpNeqB:
   470  		return rewriteValue386_OpNeqB(v, config)
   471  	case OpNeqPtr:
   472  		return rewriteValue386_OpNeqPtr(v, config)
   473  	case OpNilCheck:
   474  		return rewriteValue386_OpNilCheck(v, config)
   475  	case OpNot:
   476  		return rewriteValue386_OpNot(v, config)
   477  	case OpOffPtr:
   478  		return rewriteValue386_OpOffPtr(v, config)
   479  	case OpOr16:
   480  		return rewriteValue386_OpOr16(v, config)
   481  	case OpOr32:
   482  		return rewriteValue386_OpOr32(v, config)
   483  	case OpOr8:
   484  		return rewriteValue386_OpOr8(v, config)
   485  	case OpOrB:
   486  		return rewriteValue386_OpOrB(v, config)
   487  	case OpRsh16Ux16:
   488  		return rewriteValue386_OpRsh16Ux16(v, config)
   489  	case OpRsh16Ux32:
   490  		return rewriteValue386_OpRsh16Ux32(v, config)
   491  	case OpRsh16Ux64:
   492  		return rewriteValue386_OpRsh16Ux64(v, config)
   493  	case OpRsh16Ux8:
   494  		return rewriteValue386_OpRsh16Ux8(v, config)
   495  	case OpRsh16x16:
   496  		return rewriteValue386_OpRsh16x16(v, config)
   497  	case OpRsh16x32:
   498  		return rewriteValue386_OpRsh16x32(v, config)
   499  	case OpRsh16x64:
   500  		return rewriteValue386_OpRsh16x64(v, config)
   501  	case OpRsh16x8:
   502  		return rewriteValue386_OpRsh16x8(v, config)
   503  	case OpRsh32Ux16:
   504  		return rewriteValue386_OpRsh32Ux16(v, config)
   505  	case OpRsh32Ux32:
   506  		return rewriteValue386_OpRsh32Ux32(v, config)
   507  	case OpRsh32Ux64:
   508  		return rewriteValue386_OpRsh32Ux64(v, config)
   509  	case OpRsh32Ux8:
   510  		return rewriteValue386_OpRsh32Ux8(v, config)
   511  	case OpRsh32x16:
   512  		return rewriteValue386_OpRsh32x16(v, config)
   513  	case OpRsh32x32:
   514  		return rewriteValue386_OpRsh32x32(v, config)
   515  	case OpRsh32x64:
   516  		return rewriteValue386_OpRsh32x64(v, config)
   517  	case OpRsh32x8:
   518  		return rewriteValue386_OpRsh32x8(v, config)
   519  	case OpRsh8Ux16:
   520  		return rewriteValue386_OpRsh8Ux16(v, config)
   521  	case OpRsh8Ux32:
   522  		return rewriteValue386_OpRsh8Ux32(v, config)
   523  	case OpRsh8Ux64:
   524  		return rewriteValue386_OpRsh8Ux64(v, config)
   525  	case OpRsh8Ux8:
   526  		return rewriteValue386_OpRsh8Ux8(v, config)
   527  	case OpRsh8x16:
   528  		return rewriteValue386_OpRsh8x16(v, config)
   529  	case OpRsh8x32:
   530  		return rewriteValue386_OpRsh8x32(v, config)
   531  	case OpRsh8x64:
   532  		return rewriteValue386_OpRsh8x64(v, config)
   533  	case OpRsh8x8:
   534  		return rewriteValue386_OpRsh8x8(v, config)
   535  	case OpSignExt16to32:
   536  		return rewriteValue386_OpSignExt16to32(v, config)
   537  	case OpSignExt8to16:
   538  		return rewriteValue386_OpSignExt8to16(v, config)
   539  	case OpSignExt8to32:
   540  		return rewriteValue386_OpSignExt8to32(v, config)
   541  	case OpSignmask:
   542  		return rewriteValue386_OpSignmask(v, config)
   543  	case OpSlicemask:
   544  		return rewriteValue386_OpSlicemask(v, config)
   545  	case OpSqrt:
   546  		return rewriteValue386_OpSqrt(v, config)
   547  	case OpStaticCall:
   548  		return rewriteValue386_OpStaticCall(v, config)
   549  	case OpStore:
   550  		return rewriteValue386_OpStore(v, config)
   551  	case OpSub16:
   552  		return rewriteValue386_OpSub16(v, config)
   553  	case OpSub32:
   554  		return rewriteValue386_OpSub32(v, config)
   555  	case OpSub32F:
   556  		return rewriteValue386_OpSub32F(v, config)
   557  	case OpSub32carry:
   558  		return rewriteValue386_OpSub32carry(v, config)
   559  	case OpSub32withcarry:
   560  		return rewriteValue386_OpSub32withcarry(v, config)
   561  	case OpSub64F:
   562  		return rewriteValue386_OpSub64F(v, config)
   563  	case OpSub8:
   564  		return rewriteValue386_OpSub8(v, config)
   565  	case OpSubPtr:
   566  		return rewriteValue386_OpSubPtr(v, config)
   567  	case OpTrunc16to8:
   568  		return rewriteValue386_OpTrunc16to8(v, config)
   569  	case OpTrunc32to16:
   570  		return rewriteValue386_OpTrunc32to16(v, config)
   571  	case OpTrunc32to8:
   572  		return rewriteValue386_OpTrunc32to8(v, config)
   573  	case OpXor16:
   574  		return rewriteValue386_OpXor16(v, config)
   575  	case OpXor32:
   576  		return rewriteValue386_OpXor32(v, config)
   577  	case OpXor8:
   578  		return rewriteValue386_OpXor8(v, config)
   579  	case OpZero:
   580  		return rewriteValue386_OpZero(v, config)
   581  	case OpZeroExt16to32:
   582  		return rewriteValue386_OpZeroExt16to32(v, config)
   583  	case OpZeroExt8to16:
   584  		return rewriteValue386_OpZeroExt8to16(v, config)
   585  	case OpZeroExt8to32:
   586  		return rewriteValue386_OpZeroExt8to32(v, config)
   587  	case OpZeromask:
   588  		return rewriteValue386_OpZeromask(v, config)
   589  	}
   590  	return false
   591  }
   592  func rewriteValue386_Op386ADCL(v *Value, config *Config) bool {
   593  	b := v.Block
   594  	_ = b
   595  	// match: (ADCL x (MOVLconst [c]) f)
   596  	// cond:
   597  	// result: (ADCLconst [c] x f)
   598  	for {
   599  		x := v.Args[0]
   600  		v_1 := v.Args[1]
   601  		if v_1.Op != Op386MOVLconst {
   602  			break
   603  		}
   604  		c := v_1.AuxInt
   605  		f := v.Args[2]
   606  		v.reset(Op386ADCLconst)
   607  		v.AuxInt = c
   608  		v.AddArg(x)
   609  		v.AddArg(f)
   610  		return true
   611  	}
   612  	// match: (ADCL (MOVLconst [c]) x f)
   613  	// cond:
   614  	// result: (ADCLconst [c] x f)
   615  	for {
   616  		v_0 := v.Args[0]
   617  		if v_0.Op != Op386MOVLconst {
   618  			break
   619  		}
   620  		c := v_0.AuxInt
   621  		x := v.Args[1]
   622  		f := v.Args[2]
   623  		v.reset(Op386ADCLconst)
   624  		v.AuxInt = c
   625  		v.AddArg(x)
   626  		v.AddArg(f)
   627  		return true
   628  	}
   629  	return false
   630  }
   631  func rewriteValue386_Op386ADDL(v *Value, config *Config) bool {
   632  	b := v.Block
   633  	_ = b
   634  	// match: (ADDL x (MOVLconst [c]))
   635  	// cond:
   636  	// result: (ADDLconst [c] x)
   637  	for {
   638  		x := v.Args[0]
   639  		v_1 := v.Args[1]
   640  		if v_1.Op != Op386MOVLconst {
   641  			break
   642  		}
   643  		c := v_1.AuxInt
   644  		v.reset(Op386ADDLconst)
   645  		v.AuxInt = c
   646  		v.AddArg(x)
   647  		return true
   648  	}
   649  	// match: (ADDL (MOVLconst [c]) x)
   650  	// cond:
   651  	// result: (ADDLconst [c] x)
   652  	for {
   653  		v_0 := v.Args[0]
   654  		if v_0.Op != Op386MOVLconst {
   655  			break
   656  		}
   657  		c := v_0.AuxInt
   658  		x := v.Args[1]
   659  		v.reset(Op386ADDLconst)
   660  		v.AuxInt = c
   661  		v.AddArg(x)
   662  		return true
   663  	}
   664  	// match: (ADDL x (SHLLconst [3] y))
   665  	// cond:
   666  	// result: (LEAL8 x y)
   667  	for {
   668  		x := v.Args[0]
   669  		v_1 := v.Args[1]
   670  		if v_1.Op != Op386SHLLconst {
   671  			break
   672  		}
   673  		if v_1.AuxInt != 3 {
   674  			break
   675  		}
   676  		y := v_1.Args[0]
   677  		v.reset(Op386LEAL8)
   678  		v.AddArg(x)
   679  		v.AddArg(y)
   680  		return true
   681  	}
   682  	// match: (ADDL x (SHLLconst [2] y))
   683  	// cond:
   684  	// result: (LEAL4 x y)
   685  	for {
   686  		x := v.Args[0]
   687  		v_1 := v.Args[1]
   688  		if v_1.Op != Op386SHLLconst {
   689  			break
   690  		}
   691  		if v_1.AuxInt != 2 {
   692  			break
   693  		}
   694  		y := v_1.Args[0]
   695  		v.reset(Op386LEAL4)
   696  		v.AddArg(x)
   697  		v.AddArg(y)
   698  		return true
   699  	}
   700  	// match: (ADDL x (SHLLconst [1] y))
   701  	// cond:
   702  	// result: (LEAL2 x y)
   703  	for {
   704  		x := v.Args[0]
   705  		v_1 := v.Args[1]
   706  		if v_1.Op != Op386SHLLconst {
   707  			break
   708  		}
   709  		if v_1.AuxInt != 1 {
   710  			break
   711  		}
   712  		y := v_1.Args[0]
   713  		v.reset(Op386LEAL2)
   714  		v.AddArg(x)
   715  		v.AddArg(y)
   716  		return true
   717  	}
   718  	// match: (ADDL x (ADDL y y))
   719  	// cond:
   720  	// result: (LEAL2 x y)
   721  	for {
   722  		x := v.Args[0]
   723  		v_1 := v.Args[1]
   724  		if v_1.Op != Op386ADDL {
   725  			break
   726  		}
   727  		y := v_1.Args[0]
   728  		if y != v_1.Args[1] {
   729  			break
   730  		}
   731  		v.reset(Op386LEAL2)
   732  		v.AddArg(x)
   733  		v.AddArg(y)
   734  		return true
   735  	}
   736  	// match: (ADDL x (ADDL x y))
   737  	// cond:
   738  	// result: (LEAL2 y x)
   739  	for {
   740  		x := v.Args[0]
   741  		v_1 := v.Args[1]
   742  		if v_1.Op != Op386ADDL {
   743  			break
   744  		}
   745  		if x != v_1.Args[0] {
   746  			break
   747  		}
   748  		y := v_1.Args[1]
   749  		v.reset(Op386LEAL2)
   750  		v.AddArg(y)
   751  		v.AddArg(x)
   752  		return true
   753  	}
   754  	// match: (ADDL x (ADDL y x))
   755  	// cond:
   756  	// result: (LEAL2 y x)
   757  	for {
   758  		x := v.Args[0]
   759  		v_1 := v.Args[1]
   760  		if v_1.Op != Op386ADDL {
   761  			break
   762  		}
   763  		y := v_1.Args[0]
   764  		if x != v_1.Args[1] {
   765  			break
   766  		}
   767  		v.reset(Op386LEAL2)
   768  		v.AddArg(y)
   769  		v.AddArg(x)
   770  		return true
   771  	}
   772  	// match: (ADDL (ADDLconst [c] x) y)
   773  	// cond:
   774  	// result: (LEAL1 [c] x y)
   775  	for {
   776  		v_0 := v.Args[0]
   777  		if v_0.Op != Op386ADDLconst {
   778  			break
   779  		}
   780  		c := v_0.AuxInt
   781  		x := v_0.Args[0]
   782  		y := v.Args[1]
   783  		v.reset(Op386LEAL1)
   784  		v.AuxInt = c
   785  		v.AddArg(x)
   786  		v.AddArg(y)
   787  		return true
   788  	}
   789  	// match: (ADDL x (ADDLconst [c] y))
   790  	// cond:
   791  	// result: (LEAL1 [c] x y)
   792  	for {
   793  		x := v.Args[0]
   794  		v_1 := v.Args[1]
   795  		if v_1.Op != Op386ADDLconst {
   796  			break
   797  		}
   798  		c := v_1.AuxInt
   799  		y := v_1.Args[0]
   800  		v.reset(Op386LEAL1)
   801  		v.AuxInt = c
   802  		v.AddArg(x)
   803  		v.AddArg(y)
   804  		return true
   805  	}
   806  	// match: (ADDL x (LEAL [c] {s} y))
   807  	// cond: x.Op != OpSB && y.Op != OpSB
   808  	// result: (LEAL1 [c] {s} x y)
   809  	for {
   810  		x := v.Args[0]
   811  		v_1 := v.Args[1]
   812  		if v_1.Op != Op386LEAL {
   813  			break
   814  		}
   815  		c := v_1.AuxInt
   816  		s := v_1.Aux
   817  		y := v_1.Args[0]
   818  		if !(x.Op != OpSB && y.Op != OpSB) {
   819  			break
   820  		}
   821  		v.reset(Op386LEAL1)
   822  		v.AuxInt = c
   823  		v.Aux = s
   824  		v.AddArg(x)
   825  		v.AddArg(y)
   826  		return true
   827  	}
   828  	// match: (ADDL (LEAL [c] {s} x) y)
   829  	// cond: x.Op != OpSB && y.Op != OpSB
   830  	// result: (LEAL1 [c] {s} x y)
   831  	for {
   832  		v_0 := v.Args[0]
   833  		if v_0.Op != Op386LEAL {
   834  			break
   835  		}
   836  		c := v_0.AuxInt
   837  		s := v_0.Aux
   838  		x := v_0.Args[0]
   839  		y := v.Args[1]
   840  		if !(x.Op != OpSB && y.Op != OpSB) {
   841  			break
   842  		}
   843  		v.reset(Op386LEAL1)
   844  		v.AuxInt = c
   845  		v.Aux = s
   846  		v.AddArg(x)
   847  		v.AddArg(y)
   848  		return true
   849  	}
   850  	// match: (ADDL x (NEGL y))
   851  	// cond:
   852  	// result: (SUBL x y)
   853  	for {
   854  		x := v.Args[0]
   855  		v_1 := v.Args[1]
   856  		if v_1.Op != Op386NEGL {
   857  			break
   858  		}
   859  		y := v_1.Args[0]
   860  		v.reset(Op386SUBL)
   861  		v.AddArg(x)
   862  		v.AddArg(y)
   863  		return true
   864  	}
   865  	return false
   866  }
   867  func rewriteValue386_Op386ADDLcarry(v *Value, config *Config) bool {
   868  	b := v.Block
   869  	_ = b
   870  	// match: (ADDLcarry x (MOVLconst [c]))
   871  	// cond:
   872  	// result: (ADDLconstcarry [c] x)
   873  	for {
   874  		x := v.Args[0]
   875  		v_1 := v.Args[1]
   876  		if v_1.Op != Op386MOVLconst {
   877  			break
   878  		}
   879  		c := v_1.AuxInt
   880  		v.reset(Op386ADDLconstcarry)
   881  		v.AuxInt = c
   882  		v.AddArg(x)
   883  		return true
   884  	}
   885  	// match: (ADDLcarry (MOVLconst [c]) x)
   886  	// cond:
   887  	// result: (ADDLconstcarry [c] x)
   888  	for {
   889  		v_0 := v.Args[0]
   890  		if v_0.Op != Op386MOVLconst {
   891  			break
   892  		}
   893  		c := v_0.AuxInt
   894  		x := v.Args[1]
   895  		v.reset(Op386ADDLconstcarry)
   896  		v.AuxInt = c
   897  		v.AddArg(x)
   898  		return true
   899  	}
   900  	return false
   901  }
   902  func rewriteValue386_Op386ADDLconst(v *Value, config *Config) bool {
   903  	b := v.Block
   904  	_ = b
   905  	// match: (ADDLconst [c] (ADDL x y))
   906  	// cond:
   907  	// result: (LEAL1 [c] x y)
   908  	for {
   909  		c := v.AuxInt
   910  		v_0 := v.Args[0]
   911  		if v_0.Op != Op386ADDL {
   912  			break
   913  		}
   914  		x := v_0.Args[0]
   915  		y := v_0.Args[1]
   916  		v.reset(Op386LEAL1)
   917  		v.AuxInt = c
   918  		v.AddArg(x)
   919  		v.AddArg(y)
   920  		return true
   921  	}
   922  	// match: (ADDLconst [c] (LEAL [d] {s} x))
   923  	// cond: is32Bit(c+d)
   924  	// result: (LEAL [c+d] {s} x)
   925  	for {
   926  		c := v.AuxInt
   927  		v_0 := v.Args[0]
   928  		if v_0.Op != Op386LEAL {
   929  			break
   930  		}
   931  		d := v_0.AuxInt
   932  		s := v_0.Aux
   933  		x := v_0.Args[0]
   934  		if !(is32Bit(c + d)) {
   935  			break
   936  		}
   937  		v.reset(Op386LEAL)
   938  		v.AuxInt = c + d
   939  		v.Aux = s
   940  		v.AddArg(x)
   941  		return true
   942  	}
   943  	// match: (ADDLconst [c] (LEAL1 [d] {s} x y))
   944  	// cond: is32Bit(c+d)
   945  	// result: (LEAL1 [c+d] {s} x y)
   946  	for {
   947  		c := v.AuxInt
   948  		v_0 := v.Args[0]
   949  		if v_0.Op != Op386LEAL1 {
   950  			break
   951  		}
   952  		d := v_0.AuxInt
   953  		s := v_0.Aux
   954  		x := v_0.Args[0]
   955  		y := v_0.Args[1]
   956  		if !(is32Bit(c + d)) {
   957  			break
   958  		}
   959  		v.reset(Op386LEAL1)
   960  		v.AuxInt = c + d
   961  		v.Aux = s
   962  		v.AddArg(x)
   963  		v.AddArg(y)
   964  		return true
   965  	}
   966  	// match: (ADDLconst [c] (LEAL2 [d] {s} x y))
   967  	// cond: is32Bit(c+d)
   968  	// result: (LEAL2 [c+d] {s} x y)
   969  	for {
   970  		c := v.AuxInt
   971  		v_0 := v.Args[0]
   972  		if v_0.Op != Op386LEAL2 {
   973  			break
   974  		}
   975  		d := v_0.AuxInt
   976  		s := v_0.Aux
   977  		x := v_0.Args[0]
   978  		y := v_0.Args[1]
   979  		if !(is32Bit(c + d)) {
   980  			break
   981  		}
   982  		v.reset(Op386LEAL2)
   983  		v.AuxInt = c + d
   984  		v.Aux = s
   985  		v.AddArg(x)
   986  		v.AddArg(y)
   987  		return true
   988  	}
   989  	// match: (ADDLconst [c] (LEAL4 [d] {s} x y))
   990  	// cond: is32Bit(c+d)
   991  	// result: (LEAL4 [c+d] {s} x y)
   992  	for {
   993  		c := v.AuxInt
   994  		v_0 := v.Args[0]
   995  		if v_0.Op != Op386LEAL4 {
   996  			break
   997  		}
   998  		d := v_0.AuxInt
   999  		s := v_0.Aux
  1000  		x := v_0.Args[0]
  1001  		y := v_0.Args[1]
  1002  		if !(is32Bit(c + d)) {
  1003  			break
  1004  		}
  1005  		v.reset(Op386LEAL4)
  1006  		v.AuxInt = c + d
  1007  		v.Aux = s
  1008  		v.AddArg(x)
  1009  		v.AddArg(y)
  1010  		return true
  1011  	}
  1012  	// match: (ADDLconst [c] (LEAL8 [d] {s} x y))
  1013  	// cond: is32Bit(c+d)
  1014  	// result: (LEAL8 [c+d] {s} x y)
  1015  	for {
  1016  		c := v.AuxInt
  1017  		v_0 := v.Args[0]
  1018  		if v_0.Op != Op386LEAL8 {
  1019  			break
  1020  		}
  1021  		d := v_0.AuxInt
  1022  		s := v_0.Aux
  1023  		x := v_0.Args[0]
  1024  		y := v_0.Args[1]
  1025  		if !(is32Bit(c + d)) {
  1026  			break
  1027  		}
  1028  		v.reset(Op386LEAL8)
  1029  		v.AuxInt = c + d
  1030  		v.Aux = s
  1031  		v.AddArg(x)
  1032  		v.AddArg(y)
  1033  		return true
  1034  	}
  1035  	// match: (ADDLconst [c] x)
  1036  	// cond: int32(c)==0
  1037  	// result: x
  1038  	for {
  1039  		c := v.AuxInt
  1040  		x := v.Args[0]
  1041  		if !(int32(c) == 0) {
  1042  			break
  1043  		}
  1044  		v.reset(OpCopy)
  1045  		v.Type = x.Type
  1046  		v.AddArg(x)
  1047  		return true
  1048  	}
  1049  	// match: (ADDLconst [c] (MOVLconst [d]))
  1050  	// cond:
  1051  	// result: (MOVLconst [int64(int32(c+d))])
  1052  	for {
  1053  		c := v.AuxInt
  1054  		v_0 := v.Args[0]
  1055  		if v_0.Op != Op386MOVLconst {
  1056  			break
  1057  		}
  1058  		d := v_0.AuxInt
  1059  		v.reset(Op386MOVLconst)
  1060  		v.AuxInt = int64(int32(c + d))
  1061  		return true
  1062  	}
  1063  	// match: (ADDLconst [c] (ADDLconst [d] x))
  1064  	// cond:
  1065  	// result: (ADDLconst [int64(int32(c+d))] x)
  1066  	for {
  1067  		c := v.AuxInt
  1068  		v_0 := v.Args[0]
  1069  		if v_0.Op != Op386ADDLconst {
  1070  			break
  1071  		}
  1072  		d := v_0.AuxInt
  1073  		x := v_0.Args[0]
  1074  		v.reset(Op386ADDLconst)
  1075  		v.AuxInt = int64(int32(c + d))
  1076  		v.AddArg(x)
  1077  		return true
  1078  	}
  1079  	return false
  1080  }
  1081  func rewriteValue386_Op386ANDL(v *Value, config *Config) bool {
  1082  	b := v.Block
  1083  	_ = b
  1084  	// match: (ANDL x (MOVLconst [c]))
  1085  	// cond:
  1086  	// result: (ANDLconst [c] x)
  1087  	for {
  1088  		x := v.Args[0]
  1089  		v_1 := v.Args[1]
  1090  		if v_1.Op != Op386MOVLconst {
  1091  			break
  1092  		}
  1093  		c := v_1.AuxInt
  1094  		v.reset(Op386ANDLconst)
  1095  		v.AuxInt = c
  1096  		v.AddArg(x)
  1097  		return true
  1098  	}
  1099  	// match: (ANDL (MOVLconst [c]) x)
  1100  	// cond:
  1101  	// result: (ANDLconst [c] x)
  1102  	for {
  1103  		v_0 := v.Args[0]
  1104  		if v_0.Op != Op386MOVLconst {
  1105  			break
  1106  		}
  1107  		c := v_0.AuxInt
  1108  		x := v.Args[1]
  1109  		v.reset(Op386ANDLconst)
  1110  		v.AuxInt = c
  1111  		v.AddArg(x)
  1112  		return true
  1113  	}
  1114  	// match: (ANDL x x)
  1115  	// cond:
  1116  	// result: x
  1117  	for {
  1118  		x := v.Args[0]
  1119  		if x != v.Args[1] {
  1120  			break
  1121  		}
  1122  		v.reset(OpCopy)
  1123  		v.Type = x.Type
  1124  		v.AddArg(x)
  1125  		return true
  1126  	}
  1127  	return false
  1128  }
  1129  func rewriteValue386_Op386ANDLconst(v *Value, config *Config) bool {
  1130  	b := v.Block
  1131  	_ = b
  1132  	// match: (ANDLconst [c] (ANDLconst [d] x))
  1133  	// cond:
  1134  	// result: (ANDLconst [c & d] x)
  1135  	for {
  1136  		c := v.AuxInt
  1137  		v_0 := v.Args[0]
  1138  		if v_0.Op != Op386ANDLconst {
  1139  			break
  1140  		}
  1141  		d := v_0.AuxInt
  1142  		x := v_0.Args[0]
  1143  		v.reset(Op386ANDLconst)
  1144  		v.AuxInt = c & d
  1145  		v.AddArg(x)
  1146  		return true
  1147  	}
  1148  	// match: (ANDLconst [c] _)
  1149  	// cond: int32(c)==0
  1150  	// result: (MOVLconst [0])
  1151  	for {
  1152  		c := v.AuxInt
  1153  		if !(int32(c) == 0) {
  1154  			break
  1155  		}
  1156  		v.reset(Op386MOVLconst)
  1157  		v.AuxInt = 0
  1158  		return true
  1159  	}
  1160  	// match: (ANDLconst [c] x)
  1161  	// cond: int32(c)==-1
  1162  	// result: x
  1163  	for {
  1164  		c := v.AuxInt
  1165  		x := v.Args[0]
  1166  		if !(int32(c) == -1) {
  1167  			break
  1168  		}
  1169  		v.reset(OpCopy)
  1170  		v.Type = x.Type
  1171  		v.AddArg(x)
  1172  		return true
  1173  	}
  1174  	// match: (ANDLconst [c] (MOVLconst [d]))
  1175  	// cond:
  1176  	// result: (MOVLconst [c&d])
  1177  	for {
  1178  		c := v.AuxInt
  1179  		v_0 := v.Args[0]
  1180  		if v_0.Op != Op386MOVLconst {
  1181  			break
  1182  		}
  1183  		d := v_0.AuxInt
  1184  		v.reset(Op386MOVLconst)
  1185  		v.AuxInt = c & d
  1186  		return true
  1187  	}
  1188  	return false
  1189  }
  1190  func rewriteValue386_Op386CMPB(v *Value, config *Config) bool {
  1191  	b := v.Block
  1192  	_ = b
  1193  	// match: (CMPB x (MOVLconst [c]))
  1194  	// cond:
  1195  	// result: (CMPBconst x [int64(int8(c))])
  1196  	for {
  1197  		x := v.Args[0]
  1198  		v_1 := v.Args[1]
  1199  		if v_1.Op != Op386MOVLconst {
  1200  			break
  1201  		}
  1202  		c := v_1.AuxInt
  1203  		v.reset(Op386CMPBconst)
  1204  		v.AuxInt = int64(int8(c))
  1205  		v.AddArg(x)
  1206  		return true
  1207  	}
  1208  	// match: (CMPB (MOVLconst [c]) x)
  1209  	// cond:
  1210  	// result: (InvertFlags (CMPBconst x [int64(int8(c))]))
  1211  	for {
  1212  		v_0 := v.Args[0]
  1213  		if v_0.Op != Op386MOVLconst {
  1214  			break
  1215  		}
  1216  		c := v_0.AuxInt
  1217  		x := v.Args[1]
  1218  		v.reset(Op386InvertFlags)
  1219  		v0 := b.NewValue0(v.Line, Op386CMPBconst, TypeFlags)
  1220  		v0.AuxInt = int64(int8(c))
  1221  		v0.AddArg(x)
  1222  		v.AddArg(v0)
  1223  		return true
  1224  	}
  1225  	return false
  1226  }
  1227  func rewriteValue386_Op386CMPBconst(v *Value, config *Config) bool {
  1228  	b := v.Block
  1229  	_ = b
  1230  	// match: (CMPBconst (MOVLconst [x]) [y])
  1231  	// cond: int8(x)==int8(y)
  1232  	// result: (FlagEQ)
  1233  	for {
  1234  		y := v.AuxInt
  1235  		v_0 := v.Args[0]
  1236  		if v_0.Op != Op386MOVLconst {
  1237  			break
  1238  		}
  1239  		x := v_0.AuxInt
  1240  		if !(int8(x) == int8(y)) {
  1241  			break
  1242  		}
  1243  		v.reset(Op386FlagEQ)
  1244  		return true
  1245  	}
  1246  	// match: (CMPBconst (MOVLconst [x]) [y])
  1247  	// cond: int8(x)<int8(y) && uint8(x)<uint8(y)
  1248  	// result: (FlagLT_ULT)
  1249  	for {
  1250  		y := v.AuxInt
  1251  		v_0 := v.Args[0]
  1252  		if v_0.Op != Op386MOVLconst {
  1253  			break
  1254  		}
  1255  		x := v_0.AuxInt
  1256  		if !(int8(x) < int8(y) && uint8(x) < uint8(y)) {
  1257  			break
  1258  		}
  1259  		v.reset(Op386FlagLT_ULT)
  1260  		return true
  1261  	}
  1262  	// match: (CMPBconst (MOVLconst [x]) [y])
  1263  	// cond: int8(x)<int8(y) && uint8(x)>uint8(y)
  1264  	// result: (FlagLT_UGT)
  1265  	for {
  1266  		y := v.AuxInt
  1267  		v_0 := v.Args[0]
  1268  		if v_0.Op != Op386MOVLconst {
  1269  			break
  1270  		}
  1271  		x := v_0.AuxInt
  1272  		if !(int8(x) < int8(y) && uint8(x) > uint8(y)) {
  1273  			break
  1274  		}
  1275  		v.reset(Op386FlagLT_UGT)
  1276  		return true
  1277  	}
  1278  	// match: (CMPBconst (MOVLconst [x]) [y])
  1279  	// cond: int8(x)>int8(y) && uint8(x)<uint8(y)
  1280  	// result: (FlagGT_ULT)
  1281  	for {
  1282  		y := v.AuxInt
  1283  		v_0 := v.Args[0]
  1284  		if v_0.Op != Op386MOVLconst {
  1285  			break
  1286  		}
  1287  		x := v_0.AuxInt
  1288  		if !(int8(x) > int8(y) && uint8(x) < uint8(y)) {
  1289  			break
  1290  		}
  1291  		v.reset(Op386FlagGT_ULT)
  1292  		return true
  1293  	}
  1294  	// match: (CMPBconst (MOVLconst [x]) [y])
  1295  	// cond: int8(x)>int8(y) && uint8(x)>uint8(y)
  1296  	// result: (FlagGT_UGT)
  1297  	for {
  1298  		y := v.AuxInt
  1299  		v_0 := v.Args[0]
  1300  		if v_0.Op != Op386MOVLconst {
  1301  			break
  1302  		}
  1303  		x := v_0.AuxInt
  1304  		if !(int8(x) > int8(y) && uint8(x) > uint8(y)) {
  1305  			break
  1306  		}
  1307  		v.reset(Op386FlagGT_UGT)
  1308  		return true
  1309  	}
  1310  	// match: (CMPBconst (ANDLconst _ [m]) [n])
  1311  	// cond: 0 <= int8(m) && int8(m) < int8(n)
  1312  	// result: (FlagLT_ULT)
  1313  	for {
  1314  		n := v.AuxInt
  1315  		v_0 := v.Args[0]
  1316  		if v_0.Op != Op386ANDLconst {
  1317  			break
  1318  		}
  1319  		m := v_0.AuxInt
  1320  		if !(0 <= int8(m) && int8(m) < int8(n)) {
  1321  			break
  1322  		}
  1323  		v.reset(Op386FlagLT_ULT)
  1324  		return true
  1325  	}
  1326  	// match: (CMPBconst (ANDL x y) [0])
  1327  	// cond:
  1328  	// result: (TESTB x y)
  1329  	for {
  1330  		if v.AuxInt != 0 {
  1331  			break
  1332  		}
  1333  		v_0 := v.Args[0]
  1334  		if v_0.Op != Op386ANDL {
  1335  			break
  1336  		}
  1337  		x := v_0.Args[0]
  1338  		y := v_0.Args[1]
  1339  		v.reset(Op386TESTB)
  1340  		v.AddArg(x)
  1341  		v.AddArg(y)
  1342  		return true
  1343  	}
  1344  	// match: (CMPBconst (ANDLconst [c] x) [0])
  1345  	// cond:
  1346  	// result: (TESTBconst [int64(int8(c))] x)
  1347  	for {
  1348  		if v.AuxInt != 0 {
  1349  			break
  1350  		}
  1351  		v_0 := v.Args[0]
  1352  		if v_0.Op != Op386ANDLconst {
  1353  			break
  1354  		}
  1355  		c := v_0.AuxInt
  1356  		x := v_0.Args[0]
  1357  		v.reset(Op386TESTBconst)
  1358  		v.AuxInt = int64(int8(c))
  1359  		v.AddArg(x)
  1360  		return true
  1361  	}
  1362  	// match: (CMPBconst x [0])
  1363  	// cond:
  1364  	// result: (TESTB x x)
  1365  	for {
  1366  		if v.AuxInt != 0 {
  1367  			break
  1368  		}
  1369  		x := v.Args[0]
  1370  		v.reset(Op386TESTB)
  1371  		v.AddArg(x)
  1372  		v.AddArg(x)
  1373  		return true
  1374  	}
  1375  	return false
  1376  }
  1377  func rewriteValue386_Op386CMPL(v *Value, config *Config) bool {
  1378  	b := v.Block
  1379  	_ = b
  1380  	// match: (CMPL x (MOVLconst [c]))
  1381  	// cond:
  1382  	// result: (CMPLconst x [c])
  1383  	for {
  1384  		x := v.Args[0]
  1385  		v_1 := v.Args[1]
  1386  		if v_1.Op != Op386MOVLconst {
  1387  			break
  1388  		}
  1389  		c := v_1.AuxInt
  1390  		v.reset(Op386CMPLconst)
  1391  		v.AuxInt = c
  1392  		v.AddArg(x)
  1393  		return true
  1394  	}
  1395  	// match: (CMPL (MOVLconst [c]) x)
  1396  	// cond:
  1397  	// result: (InvertFlags (CMPLconst x [c]))
  1398  	for {
  1399  		v_0 := v.Args[0]
  1400  		if v_0.Op != Op386MOVLconst {
  1401  			break
  1402  		}
  1403  		c := v_0.AuxInt
  1404  		x := v.Args[1]
  1405  		v.reset(Op386InvertFlags)
  1406  		v0 := b.NewValue0(v.Line, Op386CMPLconst, TypeFlags)
  1407  		v0.AuxInt = c
  1408  		v0.AddArg(x)
  1409  		v.AddArg(v0)
  1410  		return true
  1411  	}
  1412  	return false
  1413  }
  1414  func rewriteValue386_Op386CMPLconst(v *Value, config *Config) bool {
  1415  	b := v.Block
  1416  	_ = b
  1417  	// match: (CMPLconst (MOVLconst [x]) [y])
  1418  	// cond: int32(x)==int32(y)
  1419  	// result: (FlagEQ)
  1420  	for {
  1421  		y := v.AuxInt
  1422  		v_0 := v.Args[0]
  1423  		if v_0.Op != Op386MOVLconst {
  1424  			break
  1425  		}
  1426  		x := v_0.AuxInt
  1427  		if !(int32(x) == int32(y)) {
  1428  			break
  1429  		}
  1430  		v.reset(Op386FlagEQ)
  1431  		return true
  1432  	}
  1433  	// match: (CMPLconst (MOVLconst [x]) [y])
  1434  	// cond: int32(x)<int32(y) && uint32(x)<uint32(y)
  1435  	// result: (FlagLT_ULT)
  1436  	for {
  1437  		y := v.AuxInt
  1438  		v_0 := v.Args[0]
  1439  		if v_0.Op != Op386MOVLconst {
  1440  			break
  1441  		}
  1442  		x := v_0.AuxInt
  1443  		if !(int32(x) < int32(y) && uint32(x) < uint32(y)) {
  1444  			break
  1445  		}
  1446  		v.reset(Op386FlagLT_ULT)
  1447  		return true
  1448  	}
  1449  	// match: (CMPLconst (MOVLconst [x]) [y])
  1450  	// cond: int32(x)<int32(y) && uint32(x)>uint32(y)
  1451  	// result: (FlagLT_UGT)
  1452  	for {
  1453  		y := v.AuxInt
  1454  		v_0 := v.Args[0]
  1455  		if v_0.Op != Op386MOVLconst {
  1456  			break
  1457  		}
  1458  		x := v_0.AuxInt
  1459  		if !(int32(x) < int32(y) && uint32(x) > uint32(y)) {
  1460  			break
  1461  		}
  1462  		v.reset(Op386FlagLT_UGT)
  1463  		return true
  1464  	}
  1465  	// match: (CMPLconst (MOVLconst [x]) [y])
  1466  	// cond: int32(x)>int32(y) && uint32(x)<uint32(y)
  1467  	// result: (FlagGT_ULT)
  1468  	for {
  1469  		y := v.AuxInt
  1470  		v_0 := v.Args[0]
  1471  		if v_0.Op != Op386MOVLconst {
  1472  			break
  1473  		}
  1474  		x := v_0.AuxInt
  1475  		if !(int32(x) > int32(y) && uint32(x) < uint32(y)) {
  1476  			break
  1477  		}
  1478  		v.reset(Op386FlagGT_ULT)
  1479  		return true
  1480  	}
  1481  	// match: (CMPLconst (MOVLconst [x]) [y])
  1482  	// cond: int32(x)>int32(y) && uint32(x)>uint32(y)
  1483  	// result: (FlagGT_UGT)
  1484  	for {
  1485  		y := v.AuxInt
  1486  		v_0 := v.Args[0]
  1487  		if v_0.Op != Op386MOVLconst {
  1488  			break
  1489  		}
  1490  		x := v_0.AuxInt
  1491  		if !(int32(x) > int32(y) && uint32(x) > uint32(y)) {
  1492  			break
  1493  		}
  1494  		v.reset(Op386FlagGT_UGT)
  1495  		return true
  1496  	}
  1497  	// match: (CMPLconst (SHRLconst _ [c]) [n])
  1498  	// cond: 0 <= n && 0 < c && c <= 32 && (1<<uint64(32-c)) <= uint64(n)
  1499  	// result: (FlagLT_ULT)
  1500  	for {
  1501  		n := v.AuxInt
  1502  		v_0 := v.Args[0]
  1503  		if v_0.Op != Op386SHRLconst {
  1504  			break
  1505  		}
  1506  		c := v_0.AuxInt
  1507  		if !(0 <= n && 0 < c && c <= 32 && (1<<uint64(32-c)) <= uint64(n)) {
  1508  			break
  1509  		}
  1510  		v.reset(Op386FlagLT_ULT)
  1511  		return true
  1512  	}
  1513  	// match: (CMPLconst (ANDLconst _ [m]) [n])
  1514  	// cond: 0 <= int32(m) && int32(m) < int32(n)
  1515  	// result: (FlagLT_ULT)
  1516  	for {
  1517  		n := v.AuxInt
  1518  		v_0 := v.Args[0]
  1519  		if v_0.Op != Op386ANDLconst {
  1520  			break
  1521  		}
  1522  		m := v_0.AuxInt
  1523  		if !(0 <= int32(m) && int32(m) < int32(n)) {
  1524  			break
  1525  		}
  1526  		v.reset(Op386FlagLT_ULT)
  1527  		return true
  1528  	}
  1529  	// match: (CMPLconst (ANDL x y) [0])
  1530  	// cond:
  1531  	// result: (TESTL x y)
  1532  	for {
  1533  		if v.AuxInt != 0 {
  1534  			break
  1535  		}
  1536  		v_0 := v.Args[0]
  1537  		if v_0.Op != Op386ANDL {
  1538  			break
  1539  		}
  1540  		x := v_0.Args[0]
  1541  		y := v_0.Args[1]
  1542  		v.reset(Op386TESTL)
  1543  		v.AddArg(x)
  1544  		v.AddArg(y)
  1545  		return true
  1546  	}
  1547  	// match: (CMPLconst (ANDLconst [c] x) [0])
  1548  	// cond:
  1549  	// result: (TESTLconst [c] x)
  1550  	for {
  1551  		if v.AuxInt != 0 {
  1552  			break
  1553  		}
  1554  		v_0 := v.Args[0]
  1555  		if v_0.Op != Op386ANDLconst {
  1556  			break
  1557  		}
  1558  		c := v_0.AuxInt
  1559  		x := v_0.Args[0]
  1560  		v.reset(Op386TESTLconst)
  1561  		v.AuxInt = c
  1562  		v.AddArg(x)
  1563  		return true
  1564  	}
  1565  	// match: (CMPLconst x [0])
  1566  	// cond:
  1567  	// result: (TESTL x x)
  1568  	for {
  1569  		if v.AuxInt != 0 {
  1570  			break
  1571  		}
  1572  		x := v.Args[0]
  1573  		v.reset(Op386TESTL)
  1574  		v.AddArg(x)
  1575  		v.AddArg(x)
  1576  		return true
  1577  	}
  1578  	return false
  1579  }
  1580  func rewriteValue386_Op386CMPW(v *Value, config *Config) bool {
  1581  	b := v.Block
  1582  	_ = b
  1583  	// match: (CMPW x (MOVLconst [c]))
  1584  	// cond:
  1585  	// result: (CMPWconst x [int64(int16(c))])
  1586  	for {
  1587  		x := v.Args[0]
  1588  		v_1 := v.Args[1]
  1589  		if v_1.Op != Op386MOVLconst {
  1590  			break
  1591  		}
  1592  		c := v_1.AuxInt
  1593  		v.reset(Op386CMPWconst)
  1594  		v.AuxInt = int64(int16(c))
  1595  		v.AddArg(x)
  1596  		return true
  1597  	}
  1598  	// match: (CMPW (MOVLconst [c]) x)
  1599  	// cond:
  1600  	// result: (InvertFlags (CMPWconst x [int64(int16(c))]))
  1601  	for {
  1602  		v_0 := v.Args[0]
  1603  		if v_0.Op != Op386MOVLconst {
  1604  			break
  1605  		}
  1606  		c := v_0.AuxInt
  1607  		x := v.Args[1]
  1608  		v.reset(Op386InvertFlags)
  1609  		v0 := b.NewValue0(v.Line, Op386CMPWconst, TypeFlags)
  1610  		v0.AuxInt = int64(int16(c))
  1611  		v0.AddArg(x)
  1612  		v.AddArg(v0)
  1613  		return true
  1614  	}
  1615  	return false
  1616  }
  1617  func rewriteValue386_Op386CMPWconst(v *Value, config *Config) bool {
  1618  	b := v.Block
  1619  	_ = b
  1620  	// match: (CMPWconst (MOVLconst [x]) [y])
  1621  	// cond: int16(x)==int16(y)
  1622  	// result: (FlagEQ)
  1623  	for {
  1624  		y := v.AuxInt
  1625  		v_0 := v.Args[0]
  1626  		if v_0.Op != Op386MOVLconst {
  1627  			break
  1628  		}
  1629  		x := v_0.AuxInt
  1630  		if !(int16(x) == int16(y)) {
  1631  			break
  1632  		}
  1633  		v.reset(Op386FlagEQ)
  1634  		return true
  1635  	}
  1636  	// match: (CMPWconst (MOVLconst [x]) [y])
  1637  	// cond: int16(x)<int16(y) && uint16(x)<uint16(y)
  1638  	// result: (FlagLT_ULT)
  1639  	for {
  1640  		y := v.AuxInt
  1641  		v_0 := v.Args[0]
  1642  		if v_0.Op != Op386MOVLconst {
  1643  			break
  1644  		}
  1645  		x := v_0.AuxInt
  1646  		if !(int16(x) < int16(y) && uint16(x) < uint16(y)) {
  1647  			break
  1648  		}
  1649  		v.reset(Op386FlagLT_ULT)
  1650  		return true
  1651  	}
  1652  	// match: (CMPWconst (MOVLconst [x]) [y])
  1653  	// cond: int16(x)<int16(y) && uint16(x)>uint16(y)
  1654  	// result: (FlagLT_UGT)
  1655  	for {
  1656  		y := v.AuxInt
  1657  		v_0 := v.Args[0]
  1658  		if v_0.Op != Op386MOVLconst {
  1659  			break
  1660  		}
  1661  		x := v_0.AuxInt
  1662  		if !(int16(x) < int16(y) && uint16(x) > uint16(y)) {
  1663  			break
  1664  		}
  1665  		v.reset(Op386FlagLT_UGT)
  1666  		return true
  1667  	}
  1668  	// match: (CMPWconst (MOVLconst [x]) [y])
  1669  	// cond: int16(x)>int16(y) && uint16(x)<uint16(y)
  1670  	// result: (FlagGT_ULT)
  1671  	for {
  1672  		y := v.AuxInt
  1673  		v_0 := v.Args[0]
  1674  		if v_0.Op != Op386MOVLconst {
  1675  			break
  1676  		}
  1677  		x := v_0.AuxInt
  1678  		if !(int16(x) > int16(y) && uint16(x) < uint16(y)) {
  1679  			break
  1680  		}
  1681  		v.reset(Op386FlagGT_ULT)
  1682  		return true
  1683  	}
  1684  	// match: (CMPWconst (MOVLconst [x]) [y])
  1685  	// cond: int16(x)>int16(y) && uint16(x)>uint16(y)
  1686  	// result: (FlagGT_UGT)
  1687  	for {
  1688  		y := v.AuxInt
  1689  		v_0 := v.Args[0]
  1690  		if v_0.Op != Op386MOVLconst {
  1691  			break
  1692  		}
  1693  		x := v_0.AuxInt
  1694  		if !(int16(x) > int16(y) && uint16(x) > uint16(y)) {
  1695  			break
  1696  		}
  1697  		v.reset(Op386FlagGT_UGT)
  1698  		return true
  1699  	}
  1700  	// match: (CMPWconst (ANDLconst _ [m]) [n])
  1701  	// cond: 0 <= int16(m) && int16(m) < int16(n)
  1702  	// result: (FlagLT_ULT)
  1703  	for {
  1704  		n := v.AuxInt
  1705  		v_0 := v.Args[0]
  1706  		if v_0.Op != Op386ANDLconst {
  1707  			break
  1708  		}
  1709  		m := v_0.AuxInt
  1710  		if !(0 <= int16(m) && int16(m) < int16(n)) {
  1711  			break
  1712  		}
  1713  		v.reset(Op386FlagLT_ULT)
  1714  		return true
  1715  	}
  1716  	// match: (CMPWconst (ANDL x y) [0])
  1717  	// cond:
  1718  	// result: (TESTW x y)
  1719  	for {
  1720  		if v.AuxInt != 0 {
  1721  			break
  1722  		}
  1723  		v_0 := v.Args[0]
  1724  		if v_0.Op != Op386ANDL {
  1725  			break
  1726  		}
  1727  		x := v_0.Args[0]
  1728  		y := v_0.Args[1]
  1729  		v.reset(Op386TESTW)
  1730  		v.AddArg(x)
  1731  		v.AddArg(y)
  1732  		return true
  1733  	}
  1734  	// match: (CMPWconst (ANDLconst [c] x) [0])
  1735  	// cond:
  1736  	// result: (TESTWconst [int64(int16(c))] x)
  1737  	for {
  1738  		if v.AuxInt != 0 {
  1739  			break
  1740  		}
  1741  		v_0 := v.Args[0]
  1742  		if v_0.Op != Op386ANDLconst {
  1743  			break
  1744  		}
  1745  		c := v_0.AuxInt
  1746  		x := v_0.Args[0]
  1747  		v.reset(Op386TESTWconst)
  1748  		v.AuxInt = int64(int16(c))
  1749  		v.AddArg(x)
  1750  		return true
  1751  	}
  1752  	// match: (CMPWconst x [0])
  1753  	// cond:
  1754  	// result: (TESTW x x)
  1755  	for {
  1756  		if v.AuxInt != 0 {
  1757  			break
  1758  		}
  1759  		x := v.Args[0]
  1760  		v.reset(Op386TESTW)
  1761  		v.AddArg(x)
  1762  		v.AddArg(x)
  1763  		return true
  1764  	}
  1765  	return false
  1766  }
  1767  func rewriteValue386_Op386LEAL(v *Value, config *Config) bool {
  1768  	b := v.Block
  1769  	_ = b
  1770  	// match: (LEAL [c] {s} (ADDLconst [d] x))
  1771  	// cond: is32Bit(c+d)
  1772  	// result: (LEAL [c+d] {s} x)
  1773  	for {
  1774  		c := v.AuxInt
  1775  		s := v.Aux
  1776  		v_0 := v.Args[0]
  1777  		if v_0.Op != Op386ADDLconst {
  1778  			break
  1779  		}
  1780  		d := v_0.AuxInt
  1781  		x := v_0.Args[0]
  1782  		if !(is32Bit(c + d)) {
  1783  			break
  1784  		}
  1785  		v.reset(Op386LEAL)
  1786  		v.AuxInt = c + d
  1787  		v.Aux = s
  1788  		v.AddArg(x)
  1789  		return true
  1790  	}
  1791  	// match: (LEAL [c] {s} (ADDL x y))
  1792  	// cond: x.Op != OpSB && y.Op != OpSB
  1793  	// result: (LEAL1 [c] {s} x y)
  1794  	for {
  1795  		c := v.AuxInt
  1796  		s := v.Aux
  1797  		v_0 := v.Args[0]
  1798  		if v_0.Op != Op386ADDL {
  1799  			break
  1800  		}
  1801  		x := v_0.Args[0]
  1802  		y := v_0.Args[1]
  1803  		if !(x.Op != OpSB && y.Op != OpSB) {
  1804  			break
  1805  		}
  1806  		v.reset(Op386LEAL1)
  1807  		v.AuxInt = c
  1808  		v.Aux = s
  1809  		v.AddArg(x)
  1810  		v.AddArg(y)
  1811  		return true
  1812  	}
  1813  	// match: (LEAL [off1] {sym1} (LEAL [off2] {sym2} x))
  1814  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  1815  	// result: (LEAL [off1+off2] {mergeSym(sym1,sym2)} x)
  1816  	for {
  1817  		off1 := v.AuxInt
  1818  		sym1 := v.Aux
  1819  		v_0 := v.Args[0]
  1820  		if v_0.Op != Op386LEAL {
  1821  			break
  1822  		}
  1823  		off2 := v_0.AuxInt
  1824  		sym2 := v_0.Aux
  1825  		x := v_0.Args[0]
  1826  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  1827  			break
  1828  		}
  1829  		v.reset(Op386LEAL)
  1830  		v.AuxInt = off1 + off2
  1831  		v.Aux = mergeSym(sym1, sym2)
  1832  		v.AddArg(x)
  1833  		return true
  1834  	}
  1835  	// match: (LEAL [off1] {sym1} (LEAL1 [off2] {sym2} x y))
  1836  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  1837  	// result: (LEAL1 [off1+off2] {mergeSym(sym1,sym2)} x y)
  1838  	for {
  1839  		off1 := v.AuxInt
  1840  		sym1 := v.Aux
  1841  		v_0 := v.Args[0]
  1842  		if v_0.Op != Op386LEAL1 {
  1843  			break
  1844  		}
  1845  		off2 := v_0.AuxInt
  1846  		sym2 := v_0.Aux
  1847  		x := v_0.Args[0]
  1848  		y := v_0.Args[1]
  1849  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  1850  			break
  1851  		}
  1852  		v.reset(Op386LEAL1)
  1853  		v.AuxInt = off1 + off2
  1854  		v.Aux = mergeSym(sym1, sym2)
  1855  		v.AddArg(x)
  1856  		v.AddArg(y)
  1857  		return true
  1858  	}
  1859  	// match: (LEAL [off1] {sym1} (LEAL2 [off2] {sym2} x y))
  1860  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  1861  	// result: (LEAL2 [off1+off2] {mergeSym(sym1,sym2)} x y)
  1862  	for {
  1863  		off1 := v.AuxInt
  1864  		sym1 := v.Aux
  1865  		v_0 := v.Args[0]
  1866  		if v_0.Op != Op386LEAL2 {
  1867  			break
  1868  		}
  1869  		off2 := v_0.AuxInt
  1870  		sym2 := v_0.Aux
  1871  		x := v_0.Args[0]
  1872  		y := v_0.Args[1]
  1873  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  1874  			break
  1875  		}
  1876  		v.reset(Op386LEAL2)
  1877  		v.AuxInt = off1 + off2
  1878  		v.Aux = mergeSym(sym1, sym2)
  1879  		v.AddArg(x)
  1880  		v.AddArg(y)
  1881  		return true
  1882  	}
  1883  	// match: (LEAL [off1] {sym1} (LEAL4 [off2] {sym2} x y))
  1884  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  1885  	// result: (LEAL4 [off1+off2] {mergeSym(sym1,sym2)} x y)
  1886  	for {
  1887  		off1 := v.AuxInt
  1888  		sym1 := v.Aux
  1889  		v_0 := v.Args[0]
  1890  		if v_0.Op != Op386LEAL4 {
  1891  			break
  1892  		}
  1893  		off2 := v_0.AuxInt
  1894  		sym2 := v_0.Aux
  1895  		x := v_0.Args[0]
  1896  		y := v_0.Args[1]
  1897  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  1898  			break
  1899  		}
  1900  		v.reset(Op386LEAL4)
  1901  		v.AuxInt = off1 + off2
  1902  		v.Aux = mergeSym(sym1, sym2)
  1903  		v.AddArg(x)
  1904  		v.AddArg(y)
  1905  		return true
  1906  	}
  1907  	// match: (LEAL [off1] {sym1} (LEAL8 [off2] {sym2} x y))
  1908  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  1909  	// result: (LEAL8 [off1+off2] {mergeSym(sym1,sym2)} x y)
  1910  	for {
  1911  		off1 := v.AuxInt
  1912  		sym1 := v.Aux
  1913  		v_0 := v.Args[0]
  1914  		if v_0.Op != Op386LEAL8 {
  1915  			break
  1916  		}
  1917  		off2 := v_0.AuxInt
  1918  		sym2 := v_0.Aux
  1919  		x := v_0.Args[0]
  1920  		y := v_0.Args[1]
  1921  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  1922  			break
  1923  		}
  1924  		v.reset(Op386LEAL8)
  1925  		v.AuxInt = off1 + off2
  1926  		v.Aux = mergeSym(sym1, sym2)
  1927  		v.AddArg(x)
  1928  		v.AddArg(y)
  1929  		return true
  1930  	}
  1931  	return false
  1932  }
  1933  func rewriteValue386_Op386LEAL1(v *Value, config *Config) bool {
  1934  	b := v.Block
  1935  	_ = b
  1936  	// match: (LEAL1 [c] {s} (ADDLconst [d] x) y)
  1937  	// cond: is32Bit(c+d)   && x.Op != OpSB
  1938  	// result: (LEAL1 [c+d] {s} x y)
  1939  	for {
  1940  		c := v.AuxInt
  1941  		s := v.Aux
  1942  		v_0 := v.Args[0]
  1943  		if v_0.Op != Op386ADDLconst {
  1944  			break
  1945  		}
  1946  		d := v_0.AuxInt
  1947  		x := v_0.Args[0]
  1948  		y := v.Args[1]
  1949  		if !(is32Bit(c+d) && x.Op != OpSB) {
  1950  			break
  1951  		}
  1952  		v.reset(Op386LEAL1)
  1953  		v.AuxInt = c + d
  1954  		v.Aux = s
  1955  		v.AddArg(x)
  1956  		v.AddArg(y)
  1957  		return true
  1958  	}
  1959  	// match: (LEAL1 [c] {s} x (ADDLconst [d] y))
  1960  	// cond: is32Bit(c+d)   && y.Op != OpSB
  1961  	// result: (LEAL1 [c+d] {s} x y)
  1962  	for {
  1963  		c := v.AuxInt
  1964  		s := v.Aux
  1965  		x := v.Args[0]
  1966  		v_1 := v.Args[1]
  1967  		if v_1.Op != Op386ADDLconst {
  1968  			break
  1969  		}
  1970  		d := v_1.AuxInt
  1971  		y := v_1.Args[0]
  1972  		if !(is32Bit(c+d) && y.Op != OpSB) {
  1973  			break
  1974  		}
  1975  		v.reset(Op386LEAL1)
  1976  		v.AuxInt = c + d
  1977  		v.Aux = s
  1978  		v.AddArg(x)
  1979  		v.AddArg(y)
  1980  		return true
  1981  	}
  1982  	// match: (LEAL1 [c] {s} x (SHLLconst [1] y))
  1983  	// cond:
  1984  	// result: (LEAL2 [c] {s} x y)
  1985  	for {
  1986  		c := v.AuxInt
  1987  		s := v.Aux
  1988  		x := v.Args[0]
  1989  		v_1 := v.Args[1]
  1990  		if v_1.Op != Op386SHLLconst {
  1991  			break
  1992  		}
  1993  		if v_1.AuxInt != 1 {
  1994  			break
  1995  		}
  1996  		y := v_1.Args[0]
  1997  		v.reset(Op386LEAL2)
  1998  		v.AuxInt = c
  1999  		v.Aux = s
  2000  		v.AddArg(x)
  2001  		v.AddArg(y)
  2002  		return true
  2003  	}
  2004  	// match: (LEAL1 [c] {s} (SHLLconst [1] x) y)
  2005  	// cond:
  2006  	// result: (LEAL2 [c] {s} y x)
  2007  	for {
  2008  		c := v.AuxInt
  2009  		s := v.Aux
  2010  		v_0 := v.Args[0]
  2011  		if v_0.Op != Op386SHLLconst {
  2012  			break
  2013  		}
  2014  		if v_0.AuxInt != 1 {
  2015  			break
  2016  		}
  2017  		x := v_0.Args[0]
  2018  		y := v.Args[1]
  2019  		v.reset(Op386LEAL2)
  2020  		v.AuxInt = c
  2021  		v.Aux = s
  2022  		v.AddArg(y)
  2023  		v.AddArg(x)
  2024  		return true
  2025  	}
  2026  	// match: (LEAL1 [c] {s} x (SHLLconst [2] y))
  2027  	// cond:
  2028  	// result: (LEAL4 [c] {s} x y)
  2029  	for {
  2030  		c := v.AuxInt
  2031  		s := v.Aux
  2032  		x := v.Args[0]
  2033  		v_1 := v.Args[1]
  2034  		if v_1.Op != Op386SHLLconst {
  2035  			break
  2036  		}
  2037  		if v_1.AuxInt != 2 {
  2038  			break
  2039  		}
  2040  		y := v_1.Args[0]
  2041  		v.reset(Op386LEAL4)
  2042  		v.AuxInt = c
  2043  		v.Aux = s
  2044  		v.AddArg(x)
  2045  		v.AddArg(y)
  2046  		return true
  2047  	}
  2048  	// match: (LEAL1 [c] {s} (SHLLconst [2] x) y)
  2049  	// cond:
  2050  	// result: (LEAL4 [c] {s} y x)
  2051  	for {
  2052  		c := v.AuxInt
  2053  		s := v.Aux
  2054  		v_0 := v.Args[0]
  2055  		if v_0.Op != Op386SHLLconst {
  2056  			break
  2057  		}
  2058  		if v_0.AuxInt != 2 {
  2059  			break
  2060  		}
  2061  		x := v_0.Args[0]
  2062  		y := v.Args[1]
  2063  		v.reset(Op386LEAL4)
  2064  		v.AuxInt = c
  2065  		v.Aux = s
  2066  		v.AddArg(y)
  2067  		v.AddArg(x)
  2068  		return true
  2069  	}
  2070  	// match: (LEAL1 [c] {s} x (SHLLconst [3] y))
  2071  	// cond:
  2072  	// result: (LEAL8 [c] {s} x y)
  2073  	for {
  2074  		c := v.AuxInt
  2075  		s := v.Aux
  2076  		x := v.Args[0]
  2077  		v_1 := v.Args[1]
  2078  		if v_1.Op != Op386SHLLconst {
  2079  			break
  2080  		}
  2081  		if v_1.AuxInt != 3 {
  2082  			break
  2083  		}
  2084  		y := v_1.Args[0]
  2085  		v.reset(Op386LEAL8)
  2086  		v.AuxInt = c
  2087  		v.Aux = s
  2088  		v.AddArg(x)
  2089  		v.AddArg(y)
  2090  		return true
  2091  	}
  2092  	// match: (LEAL1 [c] {s} (SHLLconst [3] x) y)
  2093  	// cond:
  2094  	// result: (LEAL8 [c] {s} y x)
  2095  	for {
  2096  		c := v.AuxInt
  2097  		s := v.Aux
  2098  		v_0 := v.Args[0]
  2099  		if v_0.Op != Op386SHLLconst {
  2100  			break
  2101  		}
  2102  		if v_0.AuxInt != 3 {
  2103  			break
  2104  		}
  2105  		x := v_0.Args[0]
  2106  		y := v.Args[1]
  2107  		v.reset(Op386LEAL8)
  2108  		v.AuxInt = c
  2109  		v.Aux = s
  2110  		v.AddArg(y)
  2111  		v.AddArg(x)
  2112  		return true
  2113  	}
  2114  	// match: (LEAL1 [off1] {sym1} (LEAL [off2] {sym2} x) y)
  2115  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2) && x.Op != OpSB
  2116  	// result: (LEAL1 [off1+off2] {mergeSym(sym1,sym2)} x y)
  2117  	for {
  2118  		off1 := v.AuxInt
  2119  		sym1 := v.Aux
  2120  		v_0 := v.Args[0]
  2121  		if v_0.Op != Op386LEAL {
  2122  			break
  2123  		}
  2124  		off2 := v_0.AuxInt
  2125  		sym2 := v_0.Aux
  2126  		x := v_0.Args[0]
  2127  		y := v.Args[1]
  2128  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && x.Op != OpSB) {
  2129  			break
  2130  		}
  2131  		v.reset(Op386LEAL1)
  2132  		v.AuxInt = off1 + off2
  2133  		v.Aux = mergeSym(sym1, sym2)
  2134  		v.AddArg(x)
  2135  		v.AddArg(y)
  2136  		return true
  2137  	}
  2138  	// match: (LEAL1 [off1] {sym1} x (LEAL [off2] {sym2} y))
  2139  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2) && y.Op != OpSB
  2140  	// result: (LEAL1 [off1+off2] {mergeSym(sym1,sym2)} x y)
  2141  	for {
  2142  		off1 := v.AuxInt
  2143  		sym1 := v.Aux
  2144  		x := v.Args[0]
  2145  		v_1 := v.Args[1]
  2146  		if v_1.Op != Op386LEAL {
  2147  			break
  2148  		}
  2149  		off2 := v_1.AuxInt
  2150  		sym2 := v_1.Aux
  2151  		y := v_1.Args[0]
  2152  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && y.Op != OpSB) {
  2153  			break
  2154  		}
  2155  		v.reset(Op386LEAL1)
  2156  		v.AuxInt = off1 + off2
  2157  		v.Aux = mergeSym(sym1, sym2)
  2158  		v.AddArg(x)
  2159  		v.AddArg(y)
  2160  		return true
  2161  	}
  2162  	return false
  2163  }
  2164  func rewriteValue386_Op386LEAL2(v *Value, config *Config) bool {
  2165  	b := v.Block
  2166  	_ = b
  2167  	// match: (LEAL2 [c] {s} (ADDLconst [d] x) y)
  2168  	// cond: is32Bit(c+d)   && x.Op != OpSB
  2169  	// result: (LEAL2 [c+d] {s} x y)
  2170  	for {
  2171  		c := v.AuxInt
  2172  		s := v.Aux
  2173  		v_0 := v.Args[0]
  2174  		if v_0.Op != Op386ADDLconst {
  2175  			break
  2176  		}
  2177  		d := v_0.AuxInt
  2178  		x := v_0.Args[0]
  2179  		y := v.Args[1]
  2180  		if !(is32Bit(c+d) && x.Op != OpSB) {
  2181  			break
  2182  		}
  2183  		v.reset(Op386LEAL2)
  2184  		v.AuxInt = c + d
  2185  		v.Aux = s
  2186  		v.AddArg(x)
  2187  		v.AddArg(y)
  2188  		return true
  2189  	}
  2190  	// match: (LEAL2 [c] {s} x (ADDLconst [d] y))
  2191  	// cond: is32Bit(c+2*d) && y.Op != OpSB
  2192  	// result: (LEAL2 [c+2*d] {s} x y)
  2193  	for {
  2194  		c := v.AuxInt
  2195  		s := v.Aux
  2196  		x := v.Args[0]
  2197  		v_1 := v.Args[1]
  2198  		if v_1.Op != Op386ADDLconst {
  2199  			break
  2200  		}
  2201  		d := v_1.AuxInt
  2202  		y := v_1.Args[0]
  2203  		if !(is32Bit(c+2*d) && y.Op != OpSB) {
  2204  			break
  2205  		}
  2206  		v.reset(Op386LEAL2)
  2207  		v.AuxInt = c + 2*d
  2208  		v.Aux = s
  2209  		v.AddArg(x)
  2210  		v.AddArg(y)
  2211  		return true
  2212  	}
  2213  	// match: (LEAL2 [c] {s} x (SHLLconst [1] y))
  2214  	// cond:
  2215  	// result: (LEAL4 [c] {s} x y)
  2216  	for {
  2217  		c := v.AuxInt
  2218  		s := v.Aux
  2219  		x := v.Args[0]
  2220  		v_1 := v.Args[1]
  2221  		if v_1.Op != Op386SHLLconst {
  2222  			break
  2223  		}
  2224  		if v_1.AuxInt != 1 {
  2225  			break
  2226  		}
  2227  		y := v_1.Args[0]
  2228  		v.reset(Op386LEAL4)
  2229  		v.AuxInt = c
  2230  		v.Aux = s
  2231  		v.AddArg(x)
  2232  		v.AddArg(y)
  2233  		return true
  2234  	}
  2235  	// match: (LEAL2 [c] {s} x (SHLLconst [2] y))
  2236  	// cond:
  2237  	// result: (LEAL8 [c] {s} x y)
  2238  	for {
  2239  		c := v.AuxInt
  2240  		s := v.Aux
  2241  		x := v.Args[0]
  2242  		v_1 := v.Args[1]
  2243  		if v_1.Op != Op386SHLLconst {
  2244  			break
  2245  		}
  2246  		if v_1.AuxInt != 2 {
  2247  			break
  2248  		}
  2249  		y := v_1.Args[0]
  2250  		v.reset(Op386LEAL8)
  2251  		v.AuxInt = c
  2252  		v.Aux = s
  2253  		v.AddArg(x)
  2254  		v.AddArg(y)
  2255  		return true
  2256  	}
  2257  	// match: (LEAL2 [off1] {sym1} (LEAL [off2] {sym2} x) y)
  2258  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2) && x.Op != OpSB
  2259  	// result: (LEAL2 [off1+off2] {mergeSym(sym1,sym2)} x y)
  2260  	for {
  2261  		off1 := v.AuxInt
  2262  		sym1 := v.Aux
  2263  		v_0 := v.Args[0]
  2264  		if v_0.Op != Op386LEAL {
  2265  			break
  2266  		}
  2267  		off2 := v_0.AuxInt
  2268  		sym2 := v_0.Aux
  2269  		x := v_0.Args[0]
  2270  		y := v.Args[1]
  2271  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && x.Op != OpSB) {
  2272  			break
  2273  		}
  2274  		v.reset(Op386LEAL2)
  2275  		v.AuxInt = off1 + off2
  2276  		v.Aux = mergeSym(sym1, sym2)
  2277  		v.AddArg(x)
  2278  		v.AddArg(y)
  2279  		return true
  2280  	}
  2281  	return false
  2282  }
  2283  func rewriteValue386_Op386LEAL4(v *Value, config *Config) bool {
  2284  	b := v.Block
  2285  	_ = b
  2286  	// match: (LEAL4 [c] {s} (ADDLconst [d] x) y)
  2287  	// cond: is32Bit(c+d)   && x.Op != OpSB
  2288  	// result: (LEAL4 [c+d] {s} x y)
  2289  	for {
  2290  		c := v.AuxInt
  2291  		s := v.Aux
  2292  		v_0 := v.Args[0]
  2293  		if v_0.Op != Op386ADDLconst {
  2294  			break
  2295  		}
  2296  		d := v_0.AuxInt
  2297  		x := v_0.Args[0]
  2298  		y := v.Args[1]
  2299  		if !(is32Bit(c+d) && x.Op != OpSB) {
  2300  			break
  2301  		}
  2302  		v.reset(Op386LEAL4)
  2303  		v.AuxInt = c + d
  2304  		v.Aux = s
  2305  		v.AddArg(x)
  2306  		v.AddArg(y)
  2307  		return true
  2308  	}
  2309  	// match: (LEAL4 [c] {s} x (ADDLconst [d] y))
  2310  	// cond: is32Bit(c+4*d) && y.Op != OpSB
  2311  	// result: (LEAL4 [c+4*d] {s} x y)
  2312  	for {
  2313  		c := v.AuxInt
  2314  		s := v.Aux
  2315  		x := v.Args[0]
  2316  		v_1 := v.Args[1]
  2317  		if v_1.Op != Op386ADDLconst {
  2318  			break
  2319  		}
  2320  		d := v_1.AuxInt
  2321  		y := v_1.Args[0]
  2322  		if !(is32Bit(c+4*d) && y.Op != OpSB) {
  2323  			break
  2324  		}
  2325  		v.reset(Op386LEAL4)
  2326  		v.AuxInt = c + 4*d
  2327  		v.Aux = s
  2328  		v.AddArg(x)
  2329  		v.AddArg(y)
  2330  		return true
  2331  	}
  2332  	// match: (LEAL4 [c] {s} x (SHLLconst [1] y))
  2333  	// cond:
  2334  	// result: (LEAL8 [c] {s} x y)
  2335  	for {
  2336  		c := v.AuxInt
  2337  		s := v.Aux
  2338  		x := v.Args[0]
  2339  		v_1 := v.Args[1]
  2340  		if v_1.Op != Op386SHLLconst {
  2341  			break
  2342  		}
  2343  		if v_1.AuxInt != 1 {
  2344  			break
  2345  		}
  2346  		y := v_1.Args[0]
  2347  		v.reset(Op386LEAL8)
  2348  		v.AuxInt = c
  2349  		v.Aux = s
  2350  		v.AddArg(x)
  2351  		v.AddArg(y)
  2352  		return true
  2353  	}
  2354  	// match: (LEAL4 [off1] {sym1} (LEAL [off2] {sym2} x) y)
  2355  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2) && x.Op != OpSB
  2356  	// result: (LEAL4 [off1+off2] {mergeSym(sym1,sym2)} x y)
  2357  	for {
  2358  		off1 := v.AuxInt
  2359  		sym1 := v.Aux
  2360  		v_0 := v.Args[0]
  2361  		if v_0.Op != Op386LEAL {
  2362  			break
  2363  		}
  2364  		off2 := v_0.AuxInt
  2365  		sym2 := v_0.Aux
  2366  		x := v_0.Args[0]
  2367  		y := v.Args[1]
  2368  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && x.Op != OpSB) {
  2369  			break
  2370  		}
  2371  		v.reset(Op386LEAL4)
  2372  		v.AuxInt = off1 + off2
  2373  		v.Aux = mergeSym(sym1, sym2)
  2374  		v.AddArg(x)
  2375  		v.AddArg(y)
  2376  		return true
  2377  	}
  2378  	return false
  2379  }
  2380  func rewriteValue386_Op386LEAL8(v *Value, config *Config) bool {
  2381  	b := v.Block
  2382  	_ = b
  2383  	// match: (LEAL8 [c] {s} (ADDLconst [d] x) y)
  2384  	// cond: is32Bit(c+d)   && x.Op != OpSB
  2385  	// result: (LEAL8 [c+d] {s} x y)
  2386  	for {
  2387  		c := v.AuxInt
  2388  		s := v.Aux
  2389  		v_0 := v.Args[0]
  2390  		if v_0.Op != Op386ADDLconst {
  2391  			break
  2392  		}
  2393  		d := v_0.AuxInt
  2394  		x := v_0.Args[0]
  2395  		y := v.Args[1]
  2396  		if !(is32Bit(c+d) && x.Op != OpSB) {
  2397  			break
  2398  		}
  2399  		v.reset(Op386LEAL8)
  2400  		v.AuxInt = c + d
  2401  		v.Aux = s
  2402  		v.AddArg(x)
  2403  		v.AddArg(y)
  2404  		return true
  2405  	}
  2406  	// match: (LEAL8 [c] {s} x (ADDLconst [d] y))
  2407  	// cond: is32Bit(c+8*d) && y.Op != OpSB
  2408  	// result: (LEAL8 [c+8*d] {s} x y)
  2409  	for {
  2410  		c := v.AuxInt
  2411  		s := v.Aux
  2412  		x := v.Args[0]
  2413  		v_1 := v.Args[1]
  2414  		if v_1.Op != Op386ADDLconst {
  2415  			break
  2416  		}
  2417  		d := v_1.AuxInt
  2418  		y := v_1.Args[0]
  2419  		if !(is32Bit(c+8*d) && y.Op != OpSB) {
  2420  			break
  2421  		}
  2422  		v.reset(Op386LEAL8)
  2423  		v.AuxInt = c + 8*d
  2424  		v.Aux = s
  2425  		v.AddArg(x)
  2426  		v.AddArg(y)
  2427  		return true
  2428  	}
  2429  	// match: (LEAL8 [off1] {sym1} (LEAL [off2] {sym2} x) y)
  2430  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2) && x.Op != OpSB
  2431  	// result: (LEAL8 [off1+off2] {mergeSym(sym1,sym2)} x y)
  2432  	for {
  2433  		off1 := v.AuxInt
  2434  		sym1 := v.Aux
  2435  		v_0 := v.Args[0]
  2436  		if v_0.Op != Op386LEAL {
  2437  			break
  2438  		}
  2439  		off2 := v_0.AuxInt
  2440  		sym2 := v_0.Aux
  2441  		x := v_0.Args[0]
  2442  		y := v.Args[1]
  2443  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && x.Op != OpSB) {
  2444  			break
  2445  		}
  2446  		v.reset(Op386LEAL8)
  2447  		v.AuxInt = off1 + off2
  2448  		v.Aux = mergeSym(sym1, sym2)
  2449  		v.AddArg(x)
  2450  		v.AddArg(y)
  2451  		return true
  2452  	}
  2453  	return false
  2454  }
  2455  func rewriteValue386_Op386MOVBLSX(v *Value, config *Config) bool {
  2456  	b := v.Block
  2457  	_ = b
  2458  	// match: (MOVBLSX x:(MOVBload [off] {sym} ptr mem))
  2459  	// cond: x.Uses == 1 && clobber(x)
  2460  	// result: @x.Block (MOVBLSXload <v.Type> [off] {sym} ptr mem)
  2461  	for {
  2462  		x := v.Args[0]
  2463  		if x.Op != Op386MOVBload {
  2464  			break
  2465  		}
  2466  		off := x.AuxInt
  2467  		sym := x.Aux
  2468  		ptr := x.Args[0]
  2469  		mem := x.Args[1]
  2470  		if !(x.Uses == 1 && clobber(x)) {
  2471  			break
  2472  		}
  2473  		b = x.Block
  2474  		v0 := b.NewValue0(v.Line, Op386MOVBLSXload, v.Type)
  2475  		v.reset(OpCopy)
  2476  		v.AddArg(v0)
  2477  		v0.AuxInt = off
  2478  		v0.Aux = sym
  2479  		v0.AddArg(ptr)
  2480  		v0.AddArg(mem)
  2481  		return true
  2482  	}
  2483  	// match: (MOVBLSX (ANDLconst [c] x))
  2484  	// cond: c & 0x80 == 0
  2485  	// result: (ANDLconst [c & 0x7f] x)
  2486  	for {
  2487  		v_0 := v.Args[0]
  2488  		if v_0.Op != Op386ANDLconst {
  2489  			break
  2490  		}
  2491  		c := v_0.AuxInt
  2492  		x := v_0.Args[0]
  2493  		if !(c&0x80 == 0) {
  2494  			break
  2495  		}
  2496  		v.reset(Op386ANDLconst)
  2497  		v.AuxInt = c & 0x7f
  2498  		v.AddArg(x)
  2499  		return true
  2500  	}
  2501  	return false
  2502  }
  2503  func rewriteValue386_Op386MOVBLSXload(v *Value, config *Config) bool {
  2504  	b := v.Block
  2505  	_ = b
  2506  	// match: (MOVBLSXload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  2507  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  2508  	// result: (MOVBLSXload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  2509  	for {
  2510  		off1 := v.AuxInt
  2511  		sym1 := v.Aux
  2512  		v_0 := v.Args[0]
  2513  		if v_0.Op != Op386LEAL {
  2514  			break
  2515  		}
  2516  		off2 := v_0.AuxInt
  2517  		sym2 := v_0.Aux
  2518  		base := v_0.Args[0]
  2519  		mem := v.Args[1]
  2520  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  2521  			break
  2522  		}
  2523  		v.reset(Op386MOVBLSXload)
  2524  		v.AuxInt = off1 + off2
  2525  		v.Aux = mergeSym(sym1, sym2)
  2526  		v.AddArg(base)
  2527  		v.AddArg(mem)
  2528  		return true
  2529  	}
  2530  	return false
  2531  }
  2532  func rewriteValue386_Op386MOVBLZX(v *Value, config *Config) bool {
  2533  	b := v.Block
  2534  	_ = b
  2535  	// match: (MOVBLZX x:(MOVBload [off] {sym} ptr mem))
  2536  	// cond: x.Uses == 1 && clobber(x)
  2537  	// result: @x.Block (MOVBload <v.Type> [off] {sym} ptr mem)
  2538  	for {
  2539  		x := v.Args[0]
  2540  		if x.Op != Op386MOVBload {
  2541  			break
  2542  		}
  2543  		off := x.AuxInt
  2544  		sym := x.Aux
  2545  		ptr := x.Args[0]
  2546  		mem := x.Args[1]
  2547  		if !(x.Uses == 1 && clobber(x)) {
  2548  			break
  2549  		}
  2550  		b = x.Block
  2551  		v0 := b.NewValue0(v.Line, Op386MOVBload, v.Type)
  2552  		v.reset(OpCopy)
  2553  		v.AddArg(v0)
  2554  		v0.AuxInt = off
  2555  		v0.Aux = sym
  2556  		v0.AddArg(ptr)
  2557  		v0.AddArg(mem)
  2558  		return true
  2559  	}
  2560  	// match: (MOVBLZX x:(MOVBloadidx1 [off] {sym} ptr idx mem))
  2561  	// cond: x.Uses == 1 && clobber(x)
  2562  	// result: @x.Block (MOVBloadidx1 <v.Type> [off] {sym} ptr idx mem)
  2563  	for {
  2564  		x := v.Args[0]
  2565  		if x.Op != Op386MOVBloadidx1 {
  2566  			break
  2567  		}
  2568  		off := x.AuxInt
  2569  		sym := x.Aux
  2570  		ptr := x.Args[0]
  2571  		idx := x.Args[1]
  2572  		mem := x.Args[2]
  2573  		if !(x.Uses == 1 && clobber(x)) {
  2574  			break
  2575  		}
  2576  		b = x.Block
  2577  		v0 := b.NewValue0(v.Line, Op386MOVBloadidx1, v.Type)
  2578  		v.reset(OpCopy)
  2579  		v.AddArg(v0)
  2580  		v0.AuxInt = off
  2581  		v0.Aux = sym
  2582  		v0.AddArg(ptr)
  2583  		v0.AddArg(idx)
  2584  		v0.AddArg(mem)
  2585  		return true
  2586  	}
  2587  	// match: (MOVBLZX (ANDLconst [c] x))
  2588  	// cond:
  2589  	// result: (ANDLconst [c & 0xff] x)
  2590  	for {
  2591  		v_0 := v.Args[0]
  2592  		if v_0.Op != Op386ANDLconst {
  2593  			break
  2594  		}
  2595  		c := v_0.AuxInt
  2596  		x := v_0.Args[0]
  2597  		v.reset(Op386ANDLconst)
  2598  		v.AuxInt = c & 0xff
  2599  		v.AddArg(x)
  2600  		return true
  2601  	}
  2602  	return false
  2603  }
  2604  func rewriteValue386_Op386MOVBload(v *Value, config *Config) bool {
  2605  	b := v.Block
  2606  	_ = b
  2607  	// match: (MOVBload [off] {sym} ptr (MOVBstore [off2] {sym2} ptr2 x _))
  2608  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  2609  	// result: x
  2610  	for {
  2611  		off := v.AuxInt
  2612  		sym := v.Aux
  2613  		ptr := v.Args[0]
  2614  		v_1 := v.Args[1]
  2615  		if v_1.Op != Op386MOVBstore {
  2616  			break
  2617  		}
  2618  		off2 := v_1.AuxInt
  2619  		sym2 := v_1.Aux
  2620  		ptr2 := v_1.Args[0]
  2621  		x := v_1.Args[1]
  2622  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  2623  			break
  2624  		}
  2625  		v.reset(OpCopy)
  2626  		v.Type = x.Type
  2627  		v.AddArg(x)
  2628  		return true
  2629  	}
  2630  	// match: (MOVBload  [off1] {sym} (ADDLconst [off2] ptr) mem)
  2631  	// cond: is32Bit(off1+off2)
  2632  	// result: (MOVBload  [off1+off2] {sym} ptr mem)
  2633  	for {
  2634  		off1 := v.AuxInt
  2635  		sym := v.Aux
  2636  		v_0 := v.Args[0]
  2637  		if v_0.Op != Op386ADDLconst {
  2638  			break
  2639  		}
  2640  		off2 := v_0.AuxInt
  2641  		ptr := v_0.Args[0]
  2642  		mem := v.Args[1]
  2643  		if !(is32Bit(off1 + off2)) {
  2644  			break
  2645  		}
  2646  		v.reset(Op386MOVBload)
  2647  		v.AuxInt = off1 + off2
  2648  		v.Aux = sym
  2649  		v.AddArg(ptr)
  2650  		v.AddArg(mem)
  2651  		return true
  2652  	}
  2653  	// match: (MOVBload  [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  2654  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  2655  	// result: (MOVBload  [off1+off2] {mergeSym(sym1,sym2)} base mem)
  2656  	for {
  2657  		off1 := v.AuxInt
  2658  		sym1 := v.Aux
  2659  		v_0 := v.Args[0]
  2660  		if v_0.Op != Op386LEAL {
  2661  			break
  2662  		}
  2663  		off2 := v_0.AuxInt
  2664  		sym2 := v_0.Aux
  2665  		base := v_0.Args[0]
  2666  		mem := v.Args[1]
  2667  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  2668  			break
  2669  		}
  2670  		v.reset(Op386MOVBload)
  2671  		v.AuxInt = off1 + off2
  2672  		v.Aux = mergeSym(sym1, sym2)
  2673  		v.AddArg(base)
  2674  		v.AddArg(mem)
  2675  		return true
  2676  	}
  2677  	// match: (MOVBload [off1] {sym1} (LEAL1 [off2] {sym2} ptr idx) mem)
  2678  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  2679  	// result: (MOVBloadidx1 [off1+off2] {mergeSym(sym1,sym2)} ptr idx mem)
  2680  	for {
  2681  		off1 := v.AuxInt
  2682  		sym1 := v.Aux
  2683  		v_0 := v.Args[0]
  2684  		if v_0.Op != Op386LEAL1 {
  2685  			break
  2686  		}
  2687  		off2 := v_0.AuxInt
  2688  		sym2 := v_0.Aux
  2689  		ptr := v_0.Args[0]
  2690  		idx := v_0.Args[1]
  2691  		mem := v.Args[1]
  2692  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  2693  			break
  2694  		}
  2695  		v.reset(Op386MOVBloadidx1)
  2696  		v.AuxInt = off1 + off2
  2697  		v.Aux = mergeSym(sym1, sym2)
  2698  		v.AddArg(ptr)
  2699  		v.AddArg(idx)
  2700  		v.AddArg(mem)
  2701  		return true
  2702  	}
  2703  	// match: (MOVBload [off] {sym} (ADDL ptr idx) mem)
  2704  	// cond: ptr.Op != OpSB
  2705  	// result: (MOVBloadidx1 [off] {sym} ptr idx mem)
  2706  	for {
  2707  		off := v.AuxInt
  2708  		sym := v.Aux
  2709  		v_0 := v.Args[0]
  2710  		if v_0.Op != Op386ADDL {
  2711  			break
  2712  		}
  2713  		ptr := v_0.Args[0]
  2714  		idx := v_0.Args[1]
  2715  		mem := v.Args[1]
  2716  		if !(ptr.Op != OpSB) {
  2717  			break
  2718  		}
  2719  		v.reset(Op386MOVBloadidx1)
  2720  		v.AuxInt = off
  2721  		v.Aux = sym
  2722  		v.AddArg(ptr)
  2723  		v.AddArg(idx)
  2724  		v.AddArg(mem)
  2725  		return true
  2726  	}
  2727  	return false
  2728  }
  2729  func rewriteValue386_Op386MOVBloadidx1(v *Value, config *Config) bool {
  2730  	b := v.Block
  2731  	_ = b
  2732  	// match: (MOVBloadidx1 [c] {sym} (ADDLconst [d] ptr) idx mem)
  2733  	// cond:
  2734  	// result: (MOVBloadidx1 [c+d] {sym} ptr idx mem)
  2735  	for {
  2736  		c := v.AuxInt
  2737  		sym := v.Aux
  2738  		v_0 := v.Args[0]
  2739  		if v_0.Op != Op386ADDLconst {
  2740  			break
  2741  		}
  2742  		d := v_0.AuxInt
  2743  		ptr := v_0.Args[0]
  2744  		idx := v.Args[1]
  2745  		mem := v.Args[2]
  2746  		v.reset(Op386MOVBloadidx1)
  2747  		v.AuxInt = c + d
  2748  		v.Aux = sym
  2749  		v.AddArg(ptr)
  2750  		v.AddArg(idx)
  2751  		v.AddArg(mem)
  2752  		return true
  2753  	}
  2754  	// match: (MOVBloadidx1 [c] {sym} ptr (ADDLconst [d] idx) mem)
  2755  	// cond:
  2756  	// result: (MOVBloadidx1 [c+d] {sym} ptr idx mem)
  2757  	for {
  2758  		c := v.AuxInt
  2759  		sym := v.Aux
  2760  		ptr := v.Args[0]
  2761  		v_1 := v.Args[1]
  2762  		if v_1.Op != Op386ADDLconst {
  2763  			break
  2764  		}
  2765  		d := v_1.AuxInt
  2766  		idx := v_1.Args[0]
  2767  		mem := v.Args[2]
  2768  		v.reset(Op386MOVBloadidx1)
  2769  		v.AuxInt = c + d
  2770  		v.Aux = sym
  2771  		v.AddArg(ptr)
  2772  		v.AddArg(idx)
  2773  		v.AddArg(mem)
  2774  		return true
  2775  	}
  2776  	return false
  2777  }
  2778  func rewriteValue386_Op386MOVBstore(v *Value, config *Config) bool {
  2779  	b := v.Block
  2780  	_ = b
  2781  	// match: (MOVBstore [off] {sym} ptr (MOVBLSX x) mem)
  2782  	// cond:
  2783  	// result: (MOVBstore [off] {sym} ptr x mem)
  2784  	for {
  2785  		off := v.AuxInt
  2786  		sym := v.Aux
  2787  		ptr := v.Args[0]
  2788  		v_1 := v.Args[1]
  2789  		if v_1.Op != Op386MOVBLSX {
  2790  			break
  2791  		}
  2792  		x := v_1.Args[0]
  2793  		mem := v.Args[2]
  2794  		v.reset(Op386MOVBstore)
  2795  		v.AuxInt = off
  2796  		v.Aux = sym
  2797  		v.AddArg(ptr)
  2798  		v.AddArg(x)
  2799  		v.AddArg(mem)
  2800  		return true
  2801  	}
  2802  	// match: (MOVBstore [off] {sym} ptr (MOVBLZX x) mem)
  2803  	// cond:
  2804  	// result: (MOVBstore [off] {sym} ptr x mem)
  2805  	for {
  2806  		off := v.AuxInt
  2807  		sym := v.Aux
  2808  		ptr := v.Args[0]
  2809  		v_1 := v.Args[1]
  2810  		if v_1.Op != Op386MOVBLZX {
  2811  			break
  2812  		}
  2813  		x := v_1.Args[0]
  2814  		mem := v.Args[2]
  2815  		v.reset(Op386MOVBstore)
  2816  		v.AuxInt = off
  2817  		v.Aux = sym
  2818  		v.AddArg(ptr)
  2819  		v.AddArg(x)
  2820  		v.AddArg(mem)
  2821  		return true
  2822  	}
  2823  	// match: (MOVBstore  [off1] {sym} (ADDLconst [off2] ptr) val mem)
  2824  	// cond: is32Bit(off1+off2)
  2825  	// result: (MOVBstore  [off1+off2] {sym} ptr val mem)
  2826  	for {
  2827  		off1 := v.AuxInt
  2828  		sym := v.Aux
  2829  		v_0 := v.Args[0]
  2830  		if v_0.Op != Op386ADDLconst {
  2831  			break
  2832  		}
  2833  		off2 := v_0.AuxInt
  2834  		ptr := v_0.Args[0]
  2835  		val := v.Args[1]
  2836  		mem := v.Args[2]
  2837  		if !(is32Bit(off1 + off2)) {
  2838  			break
  2839  		}
  2840  		v.reset(Op386MOVBstore)
  2841  		v.AuxInt = off1 + off2
  2842  		v.Aux = sym
  2843  		v.AddArg(ptr)
  2844  		v.AddArg(val)
  2845  		v.AddArg(mem)
  2846  		return true
  2847  	}
  2848  	// match: (MOVBstore [off] {sym} ptr (MOVLconst [c]) mem)
  2849  	// cond: validOff(off)
  2850  	// result: (MOVBstoreconst [makeValAndOff(int64(int8(c)),off)] {sym} ptr mem)
  2851  	for {
  2852  		off := v.AuxInt
  2853  		sym := v.Aux
  2854  		ptr := v.Args[0]
  2855  		v_1 := v.Args[1]
  2856  		if v_1.Op != Op386MOVLconst {
  2857  			break
  2858  		}
  2859  		c := v_1.AuxInt
  2860  		mem := v.Args[2]
  2861  		if !(validOff(off)) {
  2862  			break
  2863  		}
  2864  		v.reset(Op386MOVBstoreconst)
  2865  		v.AuxInt = makeValAndOff(int64(int8(c)), off)
  2866  		v.Aux = sym
  2867  		v.AddArg(ptr)
  2868  		v.AddArg(mem)
  2869  		return true
  2870  	}
  2871  	// match: (MOVBstore  [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  2872  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  2873  	// result: (MOVBstore  [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  2874  	for {
  2875  		off1 := v.AuxInt
  2876  		sym1 := v.Aux
  2877  		v_0 := v.Args[0]
  2878  		if v_0.Op != Op386LEAL {
  2879  			break
  2880  		}
  2881  		off2 := v_0.AuxInt
  2882  		sym2 := v_0.Aux
  2883  		base := v_0.Args[0]
  2884  		val := v.Args[1]
  2885  		mem := v.Args[2]
  2886  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  2887  			break
  2888  		}
  2889  		v.reset(Op386MOVBstore)
  2890  		v.AuxInt = off1 + off2
  2891  		v.Aux = mergeSym(sym1, sym2)
  2892  		v.AddArg(base)
  2893  		v.AddArg(val)
  2894  		v.AddArg(mem)
  2895  		return true
  2896  	}
  2897  	// match: (MOVBstore [off1] {sym1} (LEAL1 [off2] {sym2} ptr idx) val mem)
  2898  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  2899  	// result: (MOVBstoreidx1 [off1+off2] {mergeSym(sym1,sym2)} ptr idx val mem)
  2900  	for {
  2901  		off1 := v.AuxInt
  2902  		sym1 := v.Aux
  2903  		v_0 := v.Args[0]
  2904  		if v_0.Op != Op386LEAL1 {
  2905  			break
  2906  		}
  2907  		off2 := v_0.AuxInt
  2908  		sym2 := v_0.Aux
  2909  		ptr := v_0.Args[0]
  2910  		idx := v_0.Args[1]
  2911  		val := v.Args[1]
  2912  		mem := v.Args[2]
  2913  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  2914  			break
  2915  		}
  2916  		v.reset(Op386MOVBstoreidx1)
  2917  		v.AuxInt = off1 + off2
  2918  		v.Aux = mergeSym(sym1, sym2)
  2919  		v.AddArg(ptr)
  2920  		v.AddArg(idx)
  2921  		v.AddArg(val)
  2922  		v.AddArg(mem)
  2923  		return true
  2924  	}
  2925  	// match: (MOVBstore [off] {sym} (ADDL ptr idx) val mem)
  2926  	// cond: ptr.Op != OpSB
  2927  	// result: (MOVBstoreidx1 [off] {sym} ptr idx val mem)
  2928  	for {
  2929  		off := v.AuxInt
  2930  		sym := v.Aux
  2931  		v_0 := v.Args[0]
  2932  		if v_0.Op != Op386ADDL {
  2933  			break
  2934  		}
  2935  		ptr := v_0.Args[0]
  2936  		idx := v_0.Args[1]
  2937  		val := v.Args[1]
  2938  		mem := v.Args[2]
  2939  		if !(ptr.Op != OpSB) {
  2940  			break
  2941  		}
  2942  		v.reset(Op386MOVBstoreidx1)
  2943  		v.AuxInt = off
  2944  		v.Aux = sym
  2945  		v.AddArg(ptr)
  2946  		v.AddArg(idx)
  2947  		v.AddArg(val)
  2948  		v.AddArg(mem)
  2949  		return true
  2950  	}
  2951  	// match: (MOVBstore [i] {s} p (SHRLconst [8] w) x:(MOVBstore [i-1] {s} p w mem))
  2952  	// cond: x.Uses == 1   && clobber(x)
  2953  	// result: (MOVWstore [i-1] {s} p w mem)
  2954  	for {
  2955  		i := v.AuxInt
  2956  		s := v.Aux
  2957  		p := v.Args[0]
  2958  		v_1 := v.Args[1]
  2959  		if v_1.Op != Op386SHRLconst {
  2960  			break
  2961  		}
  2962  		if v_1.AuxInt != 8 {
  2963  			break
  2964  		}
  2965  		w := v_1.Args[0]
  2966  		x := v.Args[2]
  2967  		if x.Op != Op386MOVBstore {
  2968  			break
  2969  		}
  2970  		if x.AuxInt != i-1 {
  2971  			break
  2972  		}
  2973  		if x.Aux != s {
  2974  			break
  2975  		}
  2976  		if p != x.Args[0] {
  2977  			break
  2978  		}
  2979  		if w != x.Args[1] {
  2980  			break
  2981  		}
  2982  		mem := x.Args[2]
  2983  		if !(x.Uses == 1 && clobber(x)) {
  2984  			break
  2985  		}
  2986  		v.reset(Op386MOVWstore)
  2987  		v.AuxInt = i - 1
  2988  		v.Aux = s
  2989  		v.AddArg(p)
  2990  		v.AddArg(w)
  2991  		v.AddArg(mem)
  2992  		return true
  2993  	}
  2994  	// match: (MOVBstore [i] {s} p (SHRLconst [j] w) x:(MOVBstore [i-1] {s} p w0:(SHRLconst [j-8] w) mem))
  2995  	// cond: x.Uses == 1   && clobber(x)
  2996  	// result: (MOVWstore [i-1] {s} p w0 mem)
  2997  	for {
  2998  		i := v.AuxInt
  2999  		s := v.Aux
  3000  		p := v.Args[0]
  3001  		v_1 := v.Args[1]
  3002  		if v_1.Op != Op386SHRLconst {
  3003  			break
  3004  		}
  3005  		j := v_1.AuxInt
  3006  		w := v_1.Args[0]
  3007  		x := v.Args[2]
  3008  		if x.Op != Op386MOVBstore {
  3009  			break
  3010  		}
  3011  		if x.AuxInt != i-1 {
  3012  			break
  3013  		}
  3014  		if x.Aux != s {
  3015  			break
  3016  		}
  3017  		if p != x.Args[0] {
  3018  			break
  3019  		}
  3020  		w0 := x.Args[1]
  3021  		if w0.Op != Op386SHRLconst {
  3022  			break
  3023  		}
  3024  		if w0.AuxInt != j-8 {
  3025  			break
  3026  		}
  3027  		if w != w0.Args[0] {
  3028  			break
  3029  		}
  3030  		mem := x.Args[2]
  3031  		if !(x.Uses == 1 && clobber(x)) {
  3032  			break
  3033  		}
  3034  		v.reset(Op386MOVWstore)
  3035  		v.AuxInt = i - 1
  3036  		v.Aux = s
  3037  		v.AddArg(p)
  3038  		v.AddArg(w0)
  3039  		v.AddArg(mem)
  3040  		return true
  3041  	}
  3042  	return false
  3043  }
  3044  func rewriteValue386_Op386MOVBstoreconst(v *Value, config *Config) bool {
  3045  	b := v.Block
  3046  	_ = b
  3047  	// match: (MOVBstoreconst [sc] {s} (ADDLconst [off] ptr) mem)
  3048  	// cond: ValAndOff(sc).canAdd(off)
  3049  	// result: (MOVBstoreconst [ValAndOff(sc).add(off)] {s} ptr mem)
  3050  	for {
  3051  		sc := v.AuxInt
  3052  		s := v.Aux
  3053  		v_0 := v.Args[0]
  3054  		if v_0.Op != Op386ADDLconst {
  3055  			break
  3056  		}
  3057  		off := v_0.AuxInt
  3058  		ptr := v_0.Args[0]
  3059  		mem := v.Args[1]
  3060  		if !(ValAndOff(sc).canAdd(off)) {
  3061  			break
  3062  		}
  3063  		v.reset(Op386MOVBstoreconst)
  3064  		v.AuxInt = ValAndOff(sc).add(off)
  3065  		v.Aux = s
  3066  		v.AddArg(ptr)
  3067  		v.AddArg(mem)
  3068  		return true
  3069  	}
  3070  	// match: (MOVBstoreconst [sc] {sym1} (LEAL [off] {sym2} ptr) mem)
  3071  	// cond: canMergeSym(sym1, sym2) && ValAndOff(sc).canAdd(off)   && (ptr.Op != OpSB || !config.ctxt.Flag_shared)
  3072  	// result: (MOVBstoreconst [ValAndOff(sc).add(off)] {mergeSym(sym1, sym2)} ptr mem)
  3073  	for {
  3074  		sc := v.AuxInt
  3075  		sym1 := v.Aux
  3076  		v_0 := v.Args[0]
  3077  		if v_0.Op != Op386LEAL {
  3078  			break
  3079  		}
  3080  		off := v_0.AuxInt
  3081  		sym2 := v_0.Aux
  3082  		ptr := v_0.Args[0]
  3083  		mem := v.Args[1]
  3084  		if !(canMergeSym(sym1, sym2) && ValAndOff(sc).canAdd(off) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
  3085  			break
  3086  		}
  3087  		v.reset(Op386MOVBstoreconst)
  3088  		v.AuxInt = ValAndOff(sc).add(off)
  3089  		v.Aux = mergeSym(sym1, sym2)
  3090  		v.AddArg(ptr)
  3091  		v.AddArg(mem)
  3092  		return true
  3093  	}
  3094  	// match: (MOVBstoreconst [x] {sym1} (LEAL1 [off] {sym2} ptr idx) mem)
  3095  	// cond: canMergeSym(sym1, sym2)
  3096  	// result: (MOVBstoreconstidx1 [ValAndOff(x).add(off)] {mergeSym(sym1,sym2)} ptr idx mem)
  3097  	for {
  3098  		x := v.AuxInt
  3099  		sym1 := v.Aux
  3100  		v_0 := v.Args[0]
  3101  		if v_0.Op != Op386LEAL1 {
  3102  			break
  3103  		}
  3104  		off := v_0.AuxInt
  3105  		sym2 := v_0.Aux
  3106  		ptr := v_0.Args[0]
  3107  		idx := v_0.Args[1]
  3108  		mem := v.Args[1]
  3109  		if !(canMergeSym(sym1, sym2)) {
  3110  			break
  3111  		}
  3112  		v.reset(Op386MOVBstoreconstidx1)
  3113  		v.AuxInt = ValAndOff(x).add(off)
  3114  		v.Aux = mergeSym(sym1, sym2)
  3115  		v.AddArg(ptr)
  3116  		v.AddArg(idx)
  3117  		v.AddArg(mem)
  3118  		return true
  3119  	}
  3120  	// match: (MOVBstoreconst [x] {sym} (ADDL ptr idx) mem)
  3121  	// cond:
  3122  	// result: (MOVBstoreconstidx1 [x] {sym} ptr idx mem)
  3123  	for {
  3124  		x := v.AuxInt
  3125  		sym := v.Aux
  3126  		v_0 := v.Args[0]
  3127  		if v_0.Op != Op386ADDL {
  3128  			break
  3129  		}
  3130  		ptr := v_0.Args[0]
  3131  		idx := v_0.Args[1]
  3132  		mem := v.Args[1]
  3133  		v.reset(Op386MOVBstoreconstidx1)
  3134  		v.AuxInt = x
  3135  		v.Aux = sym
  3136  		v.AddArg(ptr)
  3137  		v.AddArg(idx)
  3138  		v.AddArg(mem)
  3139  		return true
  3140  	}
  3141  	// match: (MOVBstoreconst [c] {s} p x:(MOVBstoreconst [a] {s} p mem))
  3142  	// cond: x.Uses == 1   && ValAndOff(a).Off() + 1 == ValAndOff(c).Off()   && clobber(x)
  3143  	// result: (MOVWstoreconst [makeValAndOff(ValAndOff(a).Val()&0xff | ValAndOff(c).Val()<<8, ValAndOff(a).Off())] {s} p mem)
  3144  	for {
  3145  		c := v.AuxInt
  3146  		s := v.Aux
  3147  		p := v.Args[0]
  3148  		x := v.Args[1]
  3149  		if x.Op != Op386MOVBstoreconst {
  3150  			break
  3151  		}
  3152  		a := x.AuxInt
  3153  		if x.Aux != s {
  3154  			break
  3155  		}
  3156  		if p != x.Args[0] {
  3157  			break
  3158  		}
  3159  		mem := x.Args[1]
  3160  		if !(x.Uses == 1 && ValAndOff(a).Off()+1 == ValAndOff(c).Off() && clobber(x)) {
  3161  			break
  3162  		}
  3163  		v.reset(Op386MOVWstoreconst)
  3164  		v.AuxInt = makeValAndOff(ValAndOff(a).Val()&0xff|ValAndOff(c).Val()<<8, ValAndOff(a).Off())
  3165  		v.Aux = s
  3166  		v.AddArg(p)
  3167  		v.AddArg(mem)
  3168  		return true
  3169  	}
  3170  	return false
  3171  }
  3172  func rewriteValue386_Op386MOVBstoreconstidx1(v *Value, config *Config) bool {
  3173  	b := v.Block
  3174  	_ = b
  3175  	// match: (MOVBstoreconstidx1 [x] {sym} (ADDLconst [c] ptr) idx mem)
  3176  	// cond:
  3177  	// result: (MOVBstoreconstidx1 [ValAndOff(x).add(c)] {sym} ptr idx mem)
  3178  	for {
  3179  		x := v.AuxInt
  3180  		sym := v.Aux
  3181  		v_0 := v.Args[0]
  3182  		if v_0.Op != Op386ADDLconst {
  3183  			break
  3184  		}
  3185  		c := v_0.AuxInt
  3186  		ptr := v_0.Args[0]
  3187  		idx := v.Args[1]
  3188  		mem := v.Args[2]
  3189  		v.reset(Op386MOVBstoreconstidx1)
  3190  		v.AuxInt = ValAndOff(x).add(c)
  3191  		v.Aux = sym
  3192  		v.AddArg(ptr)
  3193  		v.AddArg(idx)
  3194  		v.AddArg(mem)
  3195  		return true
  3196  	}
  3197  	// match: (MOVBstoreconstidx1 [x] {sym} ptr (ADDLconst [c] idx) mem)
  3198  	// cond:
  3199  	// result: (MOVBstoreconstidx1 [ValAndOff(x).add(c)] {sym} ptr idx mem)
  3200  	for {
  3201  		x := v.AuxInt
  3202  		sym := v.Aux
  3203  		ptr := v.Args[0]
  3204  		v_1 := v.Args[1]
  3205  		if v_1.Op != Op386ADDLconst {
  3206  			break
  3207  		}
  3208  		c := v_1.AuxInt
  3209  		idx := v_1.Args[0]
  3210  		mem := v.Args[2]
  3211  		v.reset(Op386MOVBstoreconstidx1)
  3212  		v.AuxInt = ValAndOff(x).add(c)
  3213  		v.Aux = sym
  3214  		v.AddArg(ptr)
  3215  		v.AddArg(idx)
  3216  		v.AddArg(mem)
  3217  		return true
  3218  	}
  3219  	// match: (MOVBstoreconstidx1 [c] {s} p i x:(MOVBstoreconstidx1 [a] {s} p i mem))
  3220  	// cond: x.Uses == 1   && ValAndOff(a).Off() + 1 == ValAndOff(c).Off()   && clobber(x)
  3221  	// result: (MOVWstoreconstidx1 [makeValAndOff(ValAndOff(a).Val()&0xff | ValAndOff(c).Val()<<8, ValAndOff(a).Off())] {s} p i mem)
  3222  	for {
  3223  		c := v.AuxInt
  3224  		s := v.Aux
  3225  		p := v.Args[0]
  3226  		i := v.Args[1]
  3227  		x := v.Args[2]
  3228  		if x.Op != Op386MOVBstoreconstidx1 {
  3229  			break
  3230  		}
  3231  		a := x.AuxInt
  3232  		if x.Aux != s {
  3233  			break
  3234  		}
  3235  		if p != x.Args[0] {
  3236  			break
  3237  		}
  3238  		if i != x.Args[1] {
  3239  			break
  3240  		}
  3241  		mem := x.Args[2]
  3242  		if !(x.Uses == 1 && ValAndOff(a).Off()+1 == ValAndOff(c).Off() && clobber(x)) {
  3243  			break
  3244  		}
  3245  		v.reset(Op386MOVWstoreconstidx1)
  3246  		v.AuxInt = makeValAndOff(ValAndOff(a).Val()&0xff|ValAndOff(c).Val()<<8, ValAndOff(a).Off())
  3247  		v.Aux = s
  3248  		v.AddArg(p)
  3249  		v.AddArg(i)
  3250  		v.AddArg(mem)
  3251  		return true
  3252  	}
  3253  	return false
  3254  }
  3255  func rewriteValue386_Op386MOVBstoreidx1(v *Value, config *Config) bool {
  3256  	b := v.Block
  3257  	_ = b
  3258  	// match: (MOVBstoreidx1 [c] {sym} (ADDLconst [d] ptr) idx val mem)
  3259  	// cond:
  3260  	// result: (MOVBstoreidx1 [c+d] {sym} ptr idx val mem)
  3261  	for {
  3262  		c := v.AuxInt
  3263  		sym := v.Aux
  3264  		v_0 := v.Args[0]
  3265  		if v_0.Op != Op386ADDLconst {
  3266  			break
  3267  		}
  3268  		d := v_0.AuxInt
  3269  		ptr := v_0.Args[0]
  3270  		idx := v.Args[1]
  3271  		val := v.Args[2]
  3272  		mem := v.Args[3]
  3273  		v.reset(Op386MOVBstoreidx1)
  3274  		v.AuxInt = c + d
  3275  		v.Aux = sym
  3276  		v.AddArg(ptr)
  3277  		v.AddArg(idx)
  3278  		v.AddArg(val)
  3279  		v.AddArg(mem)
  3280  		return true
  3281  	}
  3282  	// match: (MOVBstoreidx1 [c] {sym} ptr (ADDLconst [d] idx) val mem)
  3283  	// cond:
  3284  	// result: (MOVBstoreidx1 [c+d] {sym} ptr idx val mem)
  3285  	for {
  3286  		c := v.AuxInt
  3287  		sym := v.Aux
  3288  		ptr := v.Args[0]
  3289  		v_1 := v.Args[1]
  3290  		if v_1.Op != Op386ADDLconst {
  3291  			break
  3292  		}
  3293  		d := v_1.AuxInt
  3294  		idx := v_1.Args[0]
  3295  		val := v.Args[2]
  3296  		mem := v.Args[3]
  3297  		v.reset(Op386MOVBstoreidx1)
  3298  		v.AuxInt = c + d
  3299  		v.Aux = sym
  3300  		v.AddArg(ptr)
  3301  		v.AddArg(idx)
  3302  		v.AddArg(val)
  3303  		v.AddArg(mem)
  3304  		return true
  3305  	}
  3306  	// match: (MOVBstoreidx1 [i] {s} p idx (SHRLconst [8] w) x:(MOVBstoreidx1 [i-1] {s} p idx w mem))
  3307  	// cond: x.Uses == 1   && clobber(x)
  3308  	// result: (MOVWstoreidx1 [i-1] {s} p idx w mem)
  3309  	for {
  3310  		i := v.AuxInt
  3311  		s := v.Aux
  3312  		p := v.Args[0]
  3313  		idx := v.Args[1]
  3314  		v_2 := v.Args[2]
  3315  		if v_2.Op != Op386SHRLconst {
  3316  			break
  3317  		}
  3318  		if v_2.AuxInt != 8 {
  3319  			break
  3320  		}
  3321  		w := v_2.Args[0]
  3322  		x := v.Args[3]
  3323  		if x.Op != Op386MOVBstoreidx1 {
  3324  			break
  3325  		}
  3326  		if x.AuxInt != i-1 {
  3327  			break
  3328  		}
  3329  		if x.Aux != s {
  3330  			break
  3331  		}
  3332  		if p != x.Args[0] {
  3333  			break
  3334  		}
  3335  		if idx != x.Args[1] {
  3336  			break
  3337  		}
  3338  		if w != x.Args[2] {
  3339  			break
  3340  		}
  3341  		mem := x.Args[3]
  3342  		if !(x.Uses == 1 && clobber(x)) {
  3343  			break
  3344  		}
  3345  		v.reset(Op386MOVWstoreidx1)
  3346  		v.AuxInt = i - 1
  3347  		v.Aux = s
  3348  		v.AddArg(p)
  3349  		v.AddArg(idx)
  3350  		v.AddArg(w)
  3351  		v.AddArg(mem)
  3352  		return true
  3353  	}
  3354  	// match: (MOVBstoreidx1 [i] {s} p idx (SHRLconst [j] w) x:(MOVBstoreidx1 [i-1] {s} p idx w0:(SHRLconst [j-8] w) mem))
  3355  	// cond: x.Uses == 1   && clobber(x)
  3356  	// result: (MOVWstoreidx1 [i-1] {s} p idx w0 mem)
  3357  	for {
  3358  		i := v.AuxInt
  3359  		s := v.Aux
  3360  		p := v.Args[0]
  3361  		idx := v.Args[1]
  3362  		v_2 := v.Args[2]
  3363  		if v_2.Op != Op386SHRLconst {
  3364  			break
  3365  		}
  3366  		j := v_2.AuxInt
  3367  		w := v_2.Args[0]
  3368  		x := v.Args[3]
  3369  		if x.Op != Op386MOVBstoreidx1 {
  3370  			break
  3371  		}
  3372  		if x.AuxInt != i-1 {
  3373  			break
  3374  		}
  3375  		if x.Aux != s {
  3376  			break
  3377  		}
  3378  		if p != x.Args[0] {
  3379  			break
  3380  		}
  3381  		if idx != x.Args[1] {
  3382  			break
  3383  		}
  3384  		w0 := x.Args[2]
  3385  		if w0.Op != Op386SHRLconst {
  3386  			break
  3387  		}
  3388  		if w0.AuxInt != j-8 {
  3389  			break
  3390  		}
  3391  		if w != w0.Args[0] {
  3392  			break
  3393  		}
  3394  		mem := x.Args[3]
  3395  		if !(x.Uses == 1 && clobber(x)) {
  3396  			break
  3397  		}
  3398  		v.reset(Op386MOVWstoreidx1)
  3399  		v.AuxInt = i - 1
  3400  		v.Aux = s
  3401  		v.AddArg(p)
  3402  		v.AddArg(idx)
  3403  		v.AddArg(w0)
  3404  		v.AddArg(mem)
  3405  		return true
  3406  	}
  3407  	return false
  3408  }
  3409  func rewriteValue386_Op386MOVLload(v *Value, config *Config) bool {
  3410  	b := v.Block
  3411  	_ = b
  3412  	// match: (MOVLload [off] {sym} ptr (MOVLstore [off2] {sym2} ptr2 x _))
  3413  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  3414  	// result: x
  3415  	for {
  3416  		off := v.AuxInt
  3417  		sym := v.Aux
  3418  		ptr := v.Args[0]
  3419  		v_1 := v.Args[1]
  3420  		if v_1.Op != Op386MOVLstore {
  3421  			break
  3422  		}
  3423  		off2 := v_1.AuxInt
  3424  		sym2 := v_1.Aux
  3425  		ptr2 := v_1.Args[0]
  3426  		x := v_1.Args[1]
  3427  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  3428  			break
  3429  		}
  3430  		v.reset(OpCopy)
  3431  		v.Type = x.Type
  3432  		v.AddArg(x)
  3433  		return true
  3434  	}
  3435  	// match: (MOVLload  [off1] {sym} (ADDLconst [off2] ptr) mem)
  3436  	// cond: is32Bit(off1+off2)
  3437  	// result: (MOVLload  [off1+off2] {sym} ptr mem)
  3438  	for {
  3439  		off1 := v.AuxInt
  3440  		sym := v.Aux
  3441  		v_0 := v.Args[0]
  3442  		if v_0.Op != Op386ADDLconst {
  3443  			break
  3444  		}
  3445  		off2 := v_0.AuxInt
  3446  		ptr := v_0.Args[0]
  3447  		mem := v.Args[1]
  3448  		if !(is32Bit(off1 + off2)) {
  3449  			break
  3450  		}
  3451  		v.reset(Op386MOVLload)
  3452  		v.AuxInt = off1 + off2
  3453  		v.Aux = sym
  3454  		v.AddArg(ptr)
  3455  		v.AddArg(mem)
  3456  		return true
  3457  	}
  3458  	// match: (MOVLload  [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  3459  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  3460  	// result: (MOVLload  [off1+off2] {mergeSym(sym1,sym2)} base mem)
  3461  	for {
  3462  		off1 := v.AuxInt
  3463  		sym1 := v.Aux
  3464  		v_0 := v.Args[0]
  3465  		if v_0.Op != Op386LEAL {
  3466  			break
  3467  		}
  3468  		off2 := v_0.AuxInt
  3469  		sym2 := v_0.Aux
  3470  		base := v_0.Args[0]
  3471  		mem := v.Args[1]
  3472  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  3473  			break
  3474  		}
  3475  		v.reset(Op386MOVLload)
  3476  		v.AuxInt = off1 + off2
  3477  		v.Aux = mergeSym(sym1, sym2)
  3478  		v.AddArg(base)
  3479  		v.AddArg(mem)
  3480  		return true
  3481  	}
  3482  	// match: (MOVLload [off1] {sym1} (LEAL1 [off2] {sym2} ptr idx) mem)
  3483  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  3484  	// result: (MOVLloadidx1 [off1+off2] {mergeSym(sym1,sym2)} ptr idx mem)
  3485  	for {
  3486  		off1 := v.AuxInt
  3487  		sym1 := v.Aux
  3488  		v_0 := v.Args[0]
  3489  		if v_0.Op != Op386LEAL1 {
  3490  			break
  3491  		}
  3492  		off2 := v_0.AuxInt
  3493  		sym2 := v_0.Aux
  3494  		ptr := v_0.Args[0]
  3495  		idx := v_0.Args[1]
  3496  		mem := v.Args[1]
  3497  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  3498  			break
  3499  		}
  3500  		v.reset(Op386MOVLloadidx1)
  3501  		v.AuxInt = off1 + off2
  3502  		v.Aux = mergeSym(sym1, sym2)
  3503  		v.AddArg(ptr)
  3504  		v.AddArg(idx)
  3505  		v.AddArg(mem)
  3506  		return true
  3507  	}
  3508  	// match: (MOVLload [off1] {sym1} (LEAL4 [off2] {sym2} ptr idx) mem)
  3509  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  3510  	// result: (MOVLloadidx4 [off1+off2] {mergeSym(sym1,sym2)} ptr idx mem)
  3511  	for {
  3512  		off1 := v.AuxInt
  3513  		sym1 := v.Aux
  3514  		v_0 := v.Args[0]
  3515  		if v_0.Op != Op386LEAL4 {
  3516  			break
  3517  		}
  3518  		off2 := v_0.AuxInt
  3519  		sym2 := v_0.Aux
  3520  		ptr := v_0.Args[0]
  3521  		idx := v_0.Args[1]
  3522  		mem := v.Args[1]
  3523  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  3524  			break
  3525  		}
  3526  		v.reset(Op386MOVLloadidx4)
  3527  		v.AuxInt = off1 + off2
  3528  		v.Aux = mergeSym(sym1, sym2)
  3529  		v.AddArg(ptr)
  3530  		v.AddArg(idx)
  3531  		v.AddArg(mem)
  3532  		return true
  3533  	}
  3534  	// match: (MOVLload [off] {sym} (ADDL ptr idx) mem)
  3535  	// cond: ptr.Op != OpSB
  3536  	// result: (MOVLloadidx1 [off] {sym} ptr idx mem)
  3537  	for {
  3538  		off := v.AuxInt
  3539  		sym := v.Aux
  3540  		v_0 := v.Args[0]
  3541  		if v_0.Op != Op386ADDL {
  3542  			break
  3543  		}
  3544  		ptr := v_0.Args[0]
  3545  		idx := v_0.Args[1]
  3546  		mem := v.Args[1]
  3547  		if !(ptr.Op != OpSB) {
  3548  			break
  3549  		}
  3550  		v.reset(Op386MOVLloadidx1)
  3551  		v.AuxInt = off
  3552  		v.Aux = sym
  3553  		v.AddArg(ptr)
  3554  		v.AddArg(idx)
  3555  		v.AddArg(mem)
  3556  		return true
  3557  	}
  3558  	return false
  3559  }
  3560  func rewriteValue386_Op386MOVLloadidx1(v *Value, config *Config) bool {
  3561  	b := v.Block
  3562  	_ = b
  3563  	// match: (MOVLloadidx1 [c] {sym} ptr (SHLLconst [2] idx) mem)
  3564  	// cond:
  3565  	// result: (MOVLloadidx4 [c] {sym} ptr idx mem)
  3566  	for {
  3567  		c := v.AuxInt
  3568  		sym := v.Aux
  3569  		ptr := v.Args[0]
  3570  		v_1 := v.Args[1]
  3571  		if v_1.Op != Op386SHLLconst {
  3572  			break
  3573  		}
  3574  		if v_1.AuxInt != 2 {
  3575  			break
  3576  		}
  3577  		idx := v_1.Args[0]
  3578  		mem := v.Args[2]
  3579  		v.reset(Op386MOVLloadidx4)
  3580  		v.AuxInt = c
  3581  		v.Aux = sym
  3582  		v.AddArg(ptr)
  3583  		v.AddArg(idx)
  3584  		v.AddArg(mem)
  3585  		return true
  3586  	}
  3587  	// match: (MOVLloadidx1 [c] {sym} (ADDLconst [d] ptr) idx mem)
  3588  	// cond:
  3589  	// result: (MOVLloadidx1 [c+d] {sym} ptr idx mem)
  3590  	for {
  3591  		c := v.AuxInt
  3592  		sym := v.Aux
  3593  		v_0 := v.Args[0]
  3594  		if v_0.Op != Op386ADDLconst {
  3595  			break
  3596  		}
  3597  		d := v_0.AuxInt
  3598  		ptr := v_0.Args[0]
  3599  		idx := v.Args[1]
  3600  		mem := v.Args[2]
  3601  		v.reset(Op386MOVLloadidx1)
  3602  		v.AuxInt = c + d
  3603  		v.Aux = sym
  3604  		v.AddArg(ptr)
  3605  		v.AddArg(idx)
  3606  		v.AddArg(mem)
  3607  		return true
  3608  	}
  3609  	// match: (MOVLloadidx1 [c] {sym} ptr (ADDLconst [d] idx) mem)
  3610  	// cond:
  3611  	// result: (MOVLloadidx1 [c+d] {sym} ptr idx mem)
  3612  	for {
  3613  		c := v.AuxInt
  3614  		sym := v.Aux
  3615  		ptr := v.Args[0]
  3616  		v_1 := v.Args[1]
  3617  		if v_1.Op != Op386ADDLconst {
  3618  			break
  3619  		}
  3620  		d := v_1.AuxInt
  3621  		idx := v_1.Args[0]
  3622  		mem := v.Args[2]
  3623  		v.reset(Op386MOVLloadidx1)
  3624  		v.AuxInt = c + d
  3625  		v.Aux = sym
  3626  		v.AddArg(ptr)
  3627  		v.AddArg(idx)
  3628  		v.AddArg(mem)
  3629  		return true
  3630  	}
  3631  	return false
  3632  }
  3633  func rewriteValue386_Op386MOVLloadidx4(v *Value, config *Config) bool {
  3634  	b := v.Block
  3635  	_ = b
  3636  	// match: (MOVLloadidx4 [c] {sym} (ADDLconst [d] ptr) idx mem)
  3637  	// cond:
  3638  	// result: (MOVLloadidx4 [c+d] {sym} ptr idx mem)
  3639  	for {
  3640  		c := v.AuxInt
  3641  		sym := v.Aux
  3642  		v_0 := v.Args[0]
  3643  		if v_0.Op != Op386ADDLconst {
  3644  			break
  3645  		}
  3646  		d := v_0.AuxInt
  3647  		ptr := v_0.Args[0]
  3648  		idx := v.Args[1]
  3649  		mem := v.Args[2]
  3650  		v.reset(Op386MOVLloadidx4)
  3651  		v.AuxInt = c + d
  3652  		v.Aux = sym
  3653  		v.AddArg(ptr)
  3654  		v.AddArg(idx)
  3655  		v.AddArg(mem)
  3656  		return true
  3657  	}
  3658  	// match: (MOVLloadidx4 [c] {sym} ptr (ADDLconst [d] idx) mem)
  3659  	// cond:
  3660  	// result: (MOVLloadidx4 [c+4*d] {sym} ptr idx mem)
  3661  	for {
  3662  		c := v.AuxInt
  3663  		sym := v.Aux
  3664  		ptr := v.Args[0]
  3665  		v_1 := v.Args[1]
  3666  		if v_1.Op != Op386ADDLconst {
  3667  			break
  3668  		}
  3669  		d := v_1.AuxInt
  3670  		idx := v_1.Args[0]
  3671  		mem := v.Args[2]
  3672  		v.reset(Op386MOVLloadidx4)
  3673  		v.AuxInt = c + 4*d
  3674  		v.Aux = sym
  3675  		v.AddArg(ptr)
  3676  		v.AddArg(idx)
  3677  		v.AddArg(mem)
  3678  		return true
  3679  	}
  3680  	return false
  3681  }
  3682  func rewriteValue386_Op386MOVLstore(v *Value, config *Config) bool {
  3683  	b := v.Block
  3684  	_ = b
  3685  	// match: (MOVLstore  [off1] {sym} (ADDLconst [off2] ptr) val mem)
  3686  	// cond: is32Bit(off1+off2)
  3687  	// result: (MOVLstore  [off1+off2] {sym} ptr val mem)
  3688  	for {
  3689  		off1 := v.AuxInt
  3690  		sym := v.Aux
  3691  		v_0 := v.Args[0]
  3692  		if v_0.Op != Op386ADDLconst {
  3693  			break
  3694  		}
  3695  		off2 := v_0.AuxInt
  3696  		ptr := v_0.Args[0]
  3697  		val := v.Args[1]
  3698  		mem := v.Args[2]
  3699  		if !(is32Bit(off1 + off2)) {
  3700  			break
  3701  		}
  3702  		v.reset(Op386MOVLstore)
  3703  		v.AuxInt = off1 + off2
  3704  		v.Aux = sym
  3705  		v.AddArg(ptr)
  3706  		v.AddArg(val)
  3707  		v.AddArg(mem)
  3708  		return true
  3709  	}
  3710  	// match: (MOVLstore [off] {sym} ptr (MOVLconst [c]) mem)
  3711  	// cond: validOff(off)
  3712  	// result: (MOVLstoreconst [makeValAndOff(int64(int32(c)),off)] {sym} ptr mem)
  3713  	for {
  3714  		off := v.AuxInt
  3715  		sym := v.Aux
  3716  		ptr := v.Args[0]
  3717  		v_1 := v.Args[1]
  3718  		if v_1.Op != Op386MOVLconst {
  3719  			break
  3720  		}
  3721  		c := v_1.AuxInt
  3722  		mem := v.Args[2]
  3723  		if !(validOff(off)) {
  3724  			break
  3725  		}
  3726  		v.reset(Op386MOVLstoreconst)
  3727  		v.AuxInt = makeValAndOff(int64(int32(c)), off)
  3728  		v.Aux = sym
  3729  		v.AddArg(ptr)
  3730  		v.AddArg(mem)
  3731  		return true
  3732  	}
  3733  	// match: (MOVLstore  [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  3734  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  3735  	// result: (MOVLstore  [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  3736  	for {
  3737  		off1 := v.AuxInt
  3738  		sym1 := v.Aux
  3739  		v_0 := v.Args[0]
  3740  		if v_0.Op != Op386LEAL {
  3741  			break
  3742  		}
  3743  		off2 := v_0.AuxInt
  3744  		sym2 := v_0.Aux
  3745  		base := v_0.Args[0]
  3746  		val := v.Args[1]
  3747  		mem := v.Args[2]
  3748  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  3749  			break
  3750  		}
  3751  		v.reset(Op386MOVLstore)
  3752  		v.AuxInt = off1 + off2
  3753  		v.Aux = mergeSym(sym1, sym2)
  3754  		v.AddArg(base)
  3755  		v.AddArg(val)
  3756  		v.AddArg(mem)
  3757  		return true
  3758  	}
  3759  	// match: (MOVLstore [off1] {sym1} (LEAL1 [off2] {sym2} ptr idx) val mem)
  3760  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  3761  	// result: (MOVLstoreidx1 [off1+off2] {mergeSym(sym1,sym2)} ptr idx val mem)
  3762  	for {
  3763  		off1 := v.AuxInt
  3764  		sym1 := v.Aux
  3765  		v_0 := v.Args[0]
  3766  		if v_0.Op != Op386LEAL1 {
  3767  			break
  3768  		}
  3769  		off2 := v_0.AuxInt
  3770  		sym2 := v_0.Aux
  3771  		ptr := v_0.Args[0]
  3772  		idx := v_0.Args[1]
  3773  		val := v.Args[1]
  3774  		mem := v.Args[2]
  3775  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  3776  			break
  3777  		}
  3778  		v.reset(Op386MOVLstoreidx1)
  3779  		v.AuxInt = off1 + off2
  3780  		v.Aux = mergeSym(sym1, sym2)
  3781  		v.AddArg(ptr)
  3782  		v.AddArg(idx)
  3783  		v.AddArg(val)
  3784  		v.AddArg(mem)
  3785  		return true
  3786  	}
  3787  	// match: (MOVLstore [off1] {sym1} (LEAL4 [off2] {sym2} ptr idx) val mem)
  3788  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  3789  	// result: (MOVLstoreidx4 [off1+off2] {mergeSym(sym1,sym2)} ptr idx val mem)
  3790  	for {
  3791  		off1 := v.AuxInt
  3792  		sym1 := v.Aux
  3793  		v_0 := v.Args[0]
  3794  		if v_0.Op != Op386LEAL4 {
  3795  			break
  3796  		}
  3797  		off2 := v_0.AuxInt
  3798  		sym2 := v_0.Aux
  3799  		ptr := v_0.Args[0]
  3800  		idx := v_0.Args[1]
  3801  		val := v.Args[1]
  3802  		mem := v.Args[2]
  3803  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  3804  			break
  3805  		}
  3806  		v.reset(Op386MOVLstoreidx4)
  3807  		v.AuxInt = off1 + off2
  3808  		v.Aux = mergeSym(sym1, sym2)
  3809  		v.AddArg(ptr)
  3810  		v.AddArg(idx)
  3811  		v.AddArg(val)
  3812  		v.AddArg(mem)
  3813  		return true
  3814  	}
  3815  	// match: (MOVLstore [off] {sym} (ADDL ptr idx) val mem)
  3816  	// cond: ptr.Op != OpSB
  3817  	// result: (MOVLstoreidx1 [off] {sym} ptr idx val mem)
  3818  	for {
  3819  		off := v.AuxInt
  3820  		sym := v.Aux
  3821  		v_0 := v.Args[0]
  3822  		if v_0.Op != Op386ADDL {
  3823  			break
  3824  		}
  3825  		ptr := v_0.Args[0]
  3826  		idx := v_0.Args[1]
  3827  		val := v.Args[1]
  3828  		mem := v.Args[2]
  3829  		if !(ptr.Op != OpSB) {
  3830  			break
  3831  		}
  3832  		v.reset(Op386MOVLstoreidx1)
  3833  		v.AuxInt = off
  3834  		v.Aux = sym
  3835  		v.AddArg(ptr)
  3836  		v.AddArg(idx)
  3837  		v.AddArg(val)
  3838  		v.AddArg(mem)
  3839  		return true
  3840  	}
  3841  	return false
  3842  }
  3843  func rewriteValue386_Op386MOVLstoreconst(v *Value, config *Config) bool {
  3844  	b := v.Block
  3845  	_ = b
  3846  	// match: (MOVLstoreconst [sc] {s} (ADDLconst [off] ptr) mem)
  3847  	// cond: ValAndOff(sc).canAdd(off)
  3848  	// result: (MOVLstoreconst [ValAndOff(sc).add(off)] {s} ptr mem)
  3849  	for {
  3850  		sc := v.AuxInt
  3851  		s := v.Aux
  3852  		v_0 := v.Args[0]
  3853  		if v_0.Op != Op386ADDLconst {
  3854  			break
  3855  		}
  3856  		off := v_0.AuxInt
  3857  		ptr := v_0.Args[0]
  3858  		mem := v.Args[1]
  3859  		if !(ValAndOff(sc).canAdd(off)) {
  3860  			break
  3861  		}
  3862  		v.reset(Op386MOVLstoreconst)
  3863  		v.AuxInt = ValAndOff(sc).add(off)
  3864  		v.Aux = s
  3865  		v.AddArg(ptr)
  3866  		v.AddArg(mem)
  3867  		return true
  3868  	}
  3869  	// match: (MOVLstoreconst [sc] {sym1} (LEAL [off] {sym2} ptr) mem)
  3870  	// cond: canMergeSym(sym1, sym2) && ValAndOff(sc).canAdd(off)   && (ptr.Op != OpSB || !config.ctxt.Flag_shared)
  3871  	// result: (MOVLstoreconst [ValAndOff(sc).add(off)] {mergeSym(sym1, sym2)} ptr mem)
  3872  	for {
  3873  		sc := v.AuxInt
  3874  		sym1 := v.Aux
  3875  		v_0 := v.Args[0]
  3876  		if v_0.Op != Op386LEAL {
  3877  			break
  3878  		}
  3879  		off := v_0.AuxInt
  3880  		sym2 := v_0.Aux
  3881  		ptr := v_0.Args[0]
  3882  		mem := v.Args[1]
  3883  		if !(canMergeSym(sym1, sym2) && ValAndOff(sc).canAdd(off) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
  3884  			break
  3885  		}
  3886  		v.reset(Op386MOVLstoreconst)
  3887  		v.AuxInt = ValAndOff(sc).add(off)
  3888  		v.Aux = mergeSym(sym1, sym2)
  3889  		v.AddArg(ptr)
  3890  		v.AddArg(mem)
  3891  		return true
  3892  	}
  3893  	// match: (MOVLstoreconst [x] {sym1} (LEAL1 [off] {sym2} ptr idx) mem)
  3894  	// cond: canMergeSym(sym1, sym2)
  3895  	// result: (MOVLstoreconstidx1 [ValAndOff(x).add(off)] {mergeSym(sym1,sym2)} ptr idx mem)
  3896  	for {
  3897  		x := v.AuxInt
  3898  		sym1 := v.Aux
  3899  		v_0 := v.Args[0]
  3900  		if v_0.Op != Op386LEAL1 {
  3901  			break
  3902  		}
  3903  		off := v_0.AuxInt
  3904  		sym2 := v_0.Aux
  3905  		ptr := v_0.Args[0]
  3906  		idx := v_0.Args[1]
  3907  		mem := v.Args[1]
  3908  		if !(canMergeSym(sym1, sym2)) {
  3909  			break
  3910  		}
  3911  		v.reset(Op386MOVLstoreconstidx1)
  3912  		v.AuxInt = ValAndOff(x).add(off)
  3913  		v.Aux = mergeSym(sym1, sym2)
  3914  		v.AddArg(ptr)
  3915  		v.AddArg(idx)
  3916  		v.AddArg(mem)
  3917  		return true
  3918  	}
  3919  	// match: (MOVLstoreconst [x] {sym1} (LEAL4 [off] {sym2} ptr idx) mem)
  3920  	// cond: canMergeSym(sym1, sym2)
  3921  	// result: (MOVLstoreconstidx4 [ValAndOff(x).add(off)] {mergeSym(sym1,sym2)} ptr idx mem)
  3922  	for {
  3923  		x := v.AuxInt
  3924  		sym1 := v.Aux
  3925  		v_0 := v.Args[0]
  3926  		if v_0.Op != Op386LEAL4 {
  3927  			break
  3928  		}
  3929  		off := v_0.AuxInt
  3930  		sym2 := v_0.Aux
  3931  		ptr := v_0.Args[0]
  3932  		idx := v_0.Args[1]
  3933  		mem := v.Args[1]
  3934  		if !(canMergeSym(sym1, sym2)) {
  3935  			break
  3936  		}
  3937  		v.reset(Op386MOVLstoreconstidx4)
  3938  		v.AuxInt = ValAndOff(x).add(off)
  3939  		v.Aux = mergeSym(sym1, sym2)
  3940  		v.AddArg(ptr)
  3941  		v.AddArg(idx)
  3942  		v.AddArg(mem)
  3943  		return true
  3944  	}
  3945  	// match: (MOVLstoreconst [x] {sym} (ADDL ptr idx) mem)
  3946  	// cond:
  3947  	// result: (MOVLstoreconstidx1 [x] {sym} ptr idx mem)
  3948  	for {
  3949  		x := v.AuxInt
  3950  		sym := v.Aux
  3951  		v_0 := v.Args[0]
  3952  		if v_0.Op != Op386ADDL {
  3953  			break
  3954  		}
  3955  		ptr := v_0.Args[0]
  3956  		idx := v_0.Args[1]
  3957  		mem := v.Args[1]
  3958  		v.reset(Op386MOVLstoreconstidx1)
  3959  		v.AuxInt = x
  3960  		v.Aux = sym
  3961  		v.AddArg(ptr)
  3962  		v.AddArg(idx)
  3963  		v.AddArg(mem)
  3964  		return true
  3965  	}
  3966  	return false
  3967  }
  3968  func rewriteValue386_Op386MOVLstoreconstidx1(v *Value, config *Config) bool {
  3969  	b := v.Block
  3970  	_ = b
  3971  	// match: (MOVLstoreconstidx1 [c] {sym} ptr (SHLLconst [2] idx) mem)
  3972  	// cond:
  3973  	// result: (MOVLstoreconstidx4 [c] {sym} ptr idx mem)
  3974  	for {
  3975  		c := v.AuxInt
  3976  		sym := v.Aux
  3977  		ptr := v.Args[0]
  3978  		v_1 := v.Args[1]
  3979  		if v_1.Op != Op386SHLLconst {
  3980  			break
  3981  		}
  3982  		if v_1.AuxInt != 2 {
  3983  			break
  3984  		}
  3985  		idx := v_1.Args[0]
  3986  		mem := v.Args[2]
  3987  		v.reset(Op386MOVLstoreconstidx4)
  3988  		v.AuxInt = c
  3989  		v.Aux = sym
  3990  		v.AddArg(ptr)
  3991  		v.AddArg(idx)
  3992  		v.AddArg(mem)
  3993  		return true
  3994  	}
  3995  	// match: (MOVLstoreconstidx1 [x] {sym} (ADDLconst [c] ptr) idx mem)
  3996  	// cond:
  3997  	// result: (MOVLstoreconstidx1 [ValAndOff(x).add(c)] {sym} ptr idx mem)
  3998  	for {
  3999  		x := v.AuxInt
  4000  		sym := v.Aux
  4001  		v_0 := v.Args[0]
  4002  		if v_0.Op != Op386ADDLconst {
  4003  			break
  4004  		}
  4005  		c := v_0.AuxInt
  4006  		ptr := v_0.Args[0]
  4007  		idx := v.Args[1]
  4008  		mem := v.Args[2]
  4009  		v.reset(Op386MOVLstoreconstidx1)
  4010  		v.AuxInt = ValAndOff(x).add(c)
  4011  		v.Aux = sym
  4012  		v.AddArg(ptr)
  4013  		v.AddArg(idx)
  4014  		v.AddArg(mem)
  4015  		return true
  4016  	}
  4017  	// match: (MOVLstoreconstidx1 [x] {sym} ptr (ADDLconst [c] idx) mem)
  4018  	// cond:
  4019  	// result: (MOVLstoreconstidx1 [ValAndOff(x).add(c)] {sym} ptr idx mem)
  4020  	for {
  4021  		x := v.AuxInt
  4022  		sym := v.Aux
  4023  		ptr := v.Args[0]
  4024  		v_1 := v.Args[1]
  4025  		if v_1.Op != Op386ADDLconst {
  4026  			break
  4027  		}
  4028  		c := v_1.AuxInt
  4029  		idx := v_1.Args[0]
  4030  		mem := v.Args[2]
  4031  		v.reset(Op386MOVLstoreconstidx1)
  4032  		v.AuxInt = ValAndOff(x).add(c)
  4033  		v.Aux = sym
  4034  		v.AddArg(ptr)
  4035  		v.AddArg(idx)
  4036  		v.AddArg(mem)
  4037  		return true
  4038  	}
  4039  	return false
  4040  }
  4041  func rewriteValue386_Op386MOVLstoreconstidx4(v *Value, config *Config) bool {
  4042  	b := v.Block
  4043  	_ = b
  4044  	// match: (MOVLstoreconstidx4 [x] {sym} (ADDLconst [c] ptr) idx mem)
  4045  	// cond:
  4046  	// result: (MOVLstoreconstidx4 [ValAndOff(x).add(c)] {sym} ptr idx mem)
  4047  	for {
  4048  		x := v.AuxInt
  4049  		sym := v.Aux
  4050  		v_0 := v.Args[0]
  4051  		if v_0.Op != Op386ADDLconst {
  4052  			break
  4053  		}
  4054  		c := v_0.AuxInt
  4055  		ptr := v_0.Args[0]
  4056  		idx := v.Args[1]
  4057  		mem := v.Args[2]
  4058  		v.reset(Op386MOVLstoreconstidx4)
  4059  		v.AuxInt = ValAndOff(x).add(c)
  4060  		v.Aux = sym
  4061  		v.AddArg(ptr)
  4062  		v.AddArg(idx)
  4063  		v.AddArg(mem)
  4064  		return true
  4065  	}
  4066  	// match: (MOVLstoreconstidx4 [x] {sym} ptr (ADDLconst [c] idx) mem)
  4067  	// cond:
  4068  	// result: (MOVLstoreconstidx4 [ValAndOff(x).add(4*c)] {sym} ptr idx mem)
  4069  	for {
  4070  		x := v.AuxInt
  4071  		sym := v.Aux
  4072  		ptr := v.Args[0]
  4073  		v_1 := v.Args[1]
  4074  		if v_1.Op != Op386ADDLconst {
  4075  			break
  4076  		}
  4077  		c := v_1.AuxInt
  4078  		idx := v_1.Args[0]
  4079  		mem := v.Args[2]
  4080  		v.reset(Op386MOVLstoreconstidx4)
  4081  		v.AuxInt = ValAndOff(x).add(4 * c)
  4082  		v.Aux = sym
  4083  		v.AddArg(ptr)
  4084  		v.AddArg(idx)
  4085  		v.AddArg(mem)
  4086  		return true
  4087  	}
  4088  	return false
  4089  }
  4090  func rewriteValue386_Op386MOVLstoreidx1(v *Value, config *Config) bool {
  4091  	b := v.Block
  4092  	_ = b
  4093  	// match: (MOVLstoreidx1 [c] {sym} ptr (SHLLconst [2] idx) val mem)
  4094  	// cond:
  4095  	// result: (MOVLstoreidx4 [c] {sym} ptr idx val mem)
  4096  	for {
  4097  		c := v.AuxInt
  4098  		sym := v.Aux
  4099  		ptr := v.Args[0]
  4100  		v_1 := v.Args[1]
  4101  		if v_1.Op != Op386SHLLconst {
  4102  			break
  4103  		}
  4104  		if v_1.AuxInt != 2 {
  4105  			break
  4106  		}
  4107  		idx := v_1.Args[0]
  4108  		val := v.Args[2]
  4109  		mem := v.Args[3]
  4110  		v.reset(Op386MOVLstoreidx4)
  4111  		v.AuxInt = c
  4112  		v.Aux = sym
  4113  		v.AddArg(ptr)
  4114  		v.AddArg(idx)
  4115  		v.AddArg(val)
  4116  		v.AddArg(mem)
  4117  		return true
  4118  	}
  4119  	// match: (MOVLstoreidx1 [c] {sym} (ADDLconst [d] ptr) idx val mem)
  4120  	// cond:
  4121  	// result: (MOVLstoreidx1 [c+d] {sym} ptr idx val mem)
  4122  	for {
  4123  		c := v.AuxInt
  4124  		sym := v.Aux
  4125  		v_0 := v.Args[0]
  4126  		if v_0.Op != Op386ADDLconst {
  4127  			break
  4128  		}
  4129  		d := v_0.AuxInt
  4130  		ptr := v_0.Args[0]
  4131  		idx := v.Args[1]
  4132  		val := v.Args[2]
  4133  		mem := v.Args[3]
  4134  		v.reset(Op386MOVLstoreidx1)
  4135  		v.AuxInt = c + d
  4136  		v.Aux = sym
  4137  		v.AddArg(ptr)
  4138  		v.AddArg(idx)
  4139  		v.AddArg(val)
  4140  		v.AddArg(mem)
  4141  		return true
  4142  	}
  4143  	// match: (MOVLstoreidx1 [c] {sym} ptr (ADDLconst [d] idx) val mem)
  4144  	// cond:
  4145  	// result: (MOVLstoreidx1 [c+d] {sym} ptr idx val mem)
  4146  	for {
  4147  		c := v.AuxInt
  4148  		sym := v.Aux
  4149  		ptr := v.Args[0]
  4150  		v_1 := v.Args[1]
  4151  		if v_1.Op != Op386ADDLconst {
  4152  			break
  4153  		}
  4154  		d := v_1.AuxInt
  4155  		idx := v_1.Args[0]
  4156  		val := v.Args[2]
  4157  		mem := v.Args[3]
  4158  		v.reset(Op386MOVLstoreidx1)
  4159  		v.AuxInt = c + d
  4160  		v.Aux = sym
  4161  		v.AddArg(ptr)
  4162  		v.AddArg(idx)
  4163  		v.AddArg(val)
  4164  		v.AddArg(mem)
  4165  		return true
  4166  	}
  4167  	return false
  4168  }
  4169  func rewriteValue386_Op386MOVLstoreidx4(v *Value, config *Config) bool {
  4170  	b := v.Block
  4171  	_ = b
  4172  	// match: (MOVLstoreidx4 [c] {sym} (ADDLconst [d] ptr) idx val mem)
  4173  	// cond:
  4174  	// result: (MOVLstoreidx4 [c+d] {sym} ptr idx val mem)
  4175  	for {
  4176  		c := v.AuxInt
  4177  		sym := v.Aux
  4178  		v_0 := v.Args[0]
  4179  		if v_0.Op != Op386ADDLconst {
  4180  			break
  4181  		}
  4182  		d := v_0.AuxInt
  4183  		ptr := v_0.Args[0]
  4184  		idx := v.Args[1]
  4185  		val := v.Args[2]
  4186  		mem := v.Args[3]
  4187  		v.reset(Op386MOVLstoreidx4)
  4188  		v.AuxInt = c + d
  4189  		v.Aux = sym
  4190  		v.AddArg(ptr)
  4191  		v.AddArg(idx)
  4192  		v.AddArg(val)
  4193  		v.AddArg(mem)
  4194  		return true
  4195  	}
  4196  	// match: (MOVLstoreidx4 [c] {sym} ptr (ADDLconst [d] idx) val mem)
  4197  	// cond:
  4198  	// result: (MOVLstoreidx4 [c+4*d] {sym} ptr idx val mem)
  4199  	for {
  4200  		c := v.AuxInt
  4201  		sym := v.Aux
  4202  		ptr := v.Args[0]
  4203  		v_1 := v.Args[1]
  4204  		if v_1.Op != Op386ADDLconst {
  4205  			break
  4206  		}
  4207  		d := v_1.AuxInt
  4208  		idx := v_1.Args[0]
  4209  		val := v.Args[2]
  4210  		mem := v.Args[3]
  4211  		v.reset(Op386MOVLstoreidx4)
  4212  		v.AuxInt = c + 4*d
  4213  		v.Aux = sym
  4214  		v.AddArg(ptr)
  4215  		v.AddArg(idx)
  4216  		v.AddArg(val)
  4217  		v.AddArg(mem)
  4218  		return true
  4219  	}
  4220  	return false
  4221  }
  4222  func rewriteValue386_Op386MOVSDconst(v *Value, config *Config) bool {
  4223  	b := v.Block
  4224  	_ = b
  4225  	// match: (MOVSDconst [c])
  4226  	// cond: config.ctxt.Flag_shared
  4227  	// result: (MOVSDconst2 (MOVSDconst1 [c]))
  4228  	for {
  4229  		c := v.AuxInt
  4230  		if !(config.ctxt.Flag_shared) {
  4231  			break
  4232  		}
  4233  		v.reset(Op386MOVSDconst2)
  4234  		v0 := b.NewValue0(v.Line, Op386MOVSDconst1, config.fe.TypeUInt32())
  4235  		v0.AuxInt = c
  4236  		v.AddArg(v0)
  4237  		return true
  4238  	}
  4239  	return false
  4240  }
  4241  func rewriteValue386_Op386MOVSDload(v *Value, config *Config) bool {
  4242  	b := v.Block
  4243  	_ = b
  4244  	// match: (MOVSDload [off1] {sym} (ADDLconst [off2] ptr) mem)
  4245  	// cond: is32Bit(off1+off2)
  4246  	// result: (MOVSDload [off1+off2] {sym} ptr mem)
  4247  	for {
  4248  		off1 := v.AuxInt
  4249  		sym := v.Aux
  4250  		v_0 := v.Args[0]
  4251  		if v_0.Op != Op386ADDLconst {
  4252  			break
  4253  		}
  4254  		off2 := v_0.AuxInt
  4255  		ptr := v_0.Args[0]
  4256  		mem := v.Args[1]
  4257  		if !(is32Bit(off1 + off2)) {
  4258  			break
  4259  		}
  4260  		v.reset(Op386MOVSDload)
  4261  		v.AuxInt = off1 + off2
  4262  		v.Aux = sym
  4263  		v.AddArg(ptr)
  4264  		v.AddArg(mem)
  4265  		return true
  4266  	}
  4267  	// match: (MOVSDload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  4268  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  4269  	// result: (MOVSDload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  4270  	for {
  4271  		off1 := v.AuxInt
  4272  		sym1 := v.Aux
  4273  		v_0 := v.Args[0]
  4274  		if v_0.Op != Op386LEAL {
  4275  			break
  4276  		}
  4277  		off2 := v_0.AuxInt
  4278  		sym2 := v_0.Aux
  4279  		base := v_0.Args[0]
  4280  		mem := v.Args[1]
  4281  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  4282  			break
  4283  		}
  4284  		v.reset(Op386MOVSDload)
  4285  		v.AuxInt = off1 + off2
  4286  		v.Aux = mergeSym(sym1, sym2)
  4287  		v.AddArg(base)
  4288  		v.AddArg(mem)
  4289  		return true
  4290  	}
  4291  	// match: (MOVSDload [off1] {sym1} (LEAL1 [off2] {sym2} ptr idx) mem)
  4292  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  4293  	// result: (MOVSDloadidx1 [off1+off2] {mergeSym(sym1,sym2)} ptr idx mem)
  4294  	for {
  4295  		off1 := v.AuxInt
  4296  		sym1 := v.Aux
  4297  		v_0 := v.Args[0]
  4298  		if v_0.Op != Op386LEAL1 {
  4299  			break
  4300  		}
  4301  		off2 := v_0.AuxInt
  4302  		sym2 := v_0.Aux
  4303  		ptr := v_0.Args[0]
  4304  		idx := v_0.Args[1]
  4305  		mem := v.Args[1]
  4306  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  4307  			break
  4308  		}
  4309  		v.reset(Op386MOVSDloadidx1)
  4310  		v.AuxInt = off1 + off2
  4311  		v.Aux = mergeSym(sym1, sym2)
  4312  		v.AddArg(ptr)
  4313  		v.AddArg(idx)
  4314  		v.AddArg(mem)
  4315  		return true
  4316  	}
  4317  	// match: (MOVSDload [off1] {sym1} (LEAL8 [off2] {sym2} ptr idx) mem)
  4318  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  4319  	// result: (MOVSDloadidx8 [off1+off2] {mergeSym(sym1,sym2)} ptr idx mem)
  4320  	for {
  4321  		off1 := v.AuxInt
  4322  		sym1 := v.Aux
  4323  		v_0 := v.Args[0]
  4324  		if v_0.Op != Op386LEAL8 {
  4325  			break
  4326  		}
  4327  		off2 := v_0.AuxInt
  4328  		sym2 := v_0.Aux
  4329  		ptr := v_0.Args[0]
  4330  		idx := v_0.Args[1]
  4331  		mem := v.Args[1]
  4332  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  4333  			break
  4334  		}
  4335  		v.reset(Op386MOVSDloadidx8)
  4336  		v.AuxInt = off1 + off2
  4337  		v.Aux = mergeSym(sym1, sym2)
  4338  		v.AddArg(ptr)
  4339  		v.AddArg(idx)
  4340  		v.AddArg(mem)
  4341  		return true
  4342  	}
  4343  	// match: (MOVSDload [off] {sym} (ADDL ptr idx) mem)
  4344  	// cond: ptr.Op != OpSB
  4345  	// result: (MOVSDloadidx1 [off] {sym} ptr idx mem)
  4346  	for {
  4347  		off := v.AuxInt
  4348  		sym := v.Aux
  4349  		v_0 := v.Args[0]
  4350  		if v_0.Op != Op386ADDL {
  4351  			break
  4352  		}
  4353  		ptr := v_0.Args[0]
  4354  		idx := v_0.Args[1]
  4355  		mem := v.Args[1]
  4356  		if !(ptr.Op != OpSB) {
  4357  			break
  4358  		}
  4359  		v.reset(Op386MOVSDloadidx1)
  4360  		v.AuxInt = off
  4361  		v.Aux = sym
  4362  		v.AddArg(ptr)
  4363  		v.AddArg(idx)
  4364  		v.AddArg(mem)
  4365  		return true
  4366  	}
  4367  	return false
  4368  }
  4369  func rewriteValue386_Op386MOVSDloadidx1(v *Value, config *Config) bool {
  4370  	b := v.Block
  4371  	_ = b
  4372  	// match: (MOVSDloadidx1 [c] {sym} (ADDLconst [d] ptr) idx mem)
  4373  	// cond:
  4374  	// result: (MOVSDloadidx1 [c+d] {sym} ptr idx mem)
  4375  	for {
  4376  		c := v.AuxInt
  4377  		sym := v.Aux
  4378  		v_0 := v.Args[0]
  4379  		if v_0.Op != Op386ADDLconst {
  4380  			break
  4381  		}
  4382  		d := v_0.AuxInt
  4383  		ptr := v_0.Args[0]
  4384  		idx := v.Args[1]
  4385  		mem := v.Args[2]
  4386  		v.reset(Op386MOVSDloadidx1)
  4387  		v.AuxInt = c + d
  4388  		v.Aux = sym
  4389  		v.AddArg(ptr)
  4390  		v.AddArg(idx)
  4391  		v.AddArg(mem)
  4392  		return true
  4393  	}
  4394  	// match: (MOVSDloadidx1 [c] {sym} ptr (ADDLconst [d] idx) mem)
  4395  	// cond:
  4396  	// result: (MOVSDloadidx1 [c+d] {sym} ptr idx mem)
  4397  	for {
  4398  		c := v.AuxInt
  4399  		sym := v.Aux
  4400  		ptr := v.Args[0]
  4401  		v_1 := v.Args[1]
  4402  		if v_1.Op != Op386ADDLconst {
  4403  			break
  4404  		}
  4405  		d := v_1.AuxInt
  4406  		idx := v_1.Args[0]
  4407  		mem := v.Args[2]
  4408  		v.reset(Op386MOVSDloadidx1)
  4409  		v.AuxInt = c + d
  4410  		v.Aux = sym
  4411  		v.AddArg(ptr)
  4412  		v.AddArg(idx)
  4413  		v.AddArg(mem)
  4414  		return true
  4415  	}
  4416  	return false
  4417  }
  4418  func rewriteValue386_Op386MOVSDloadidx8(v *Value, config *Config) bool {
  4419  	b := v.Block
  4420  	_ = b
  4421  	// match: (MOVSDloadidx8 [c] {sym} (ADDLconst [d] ptr) idx mem)
  4422  	// cond:
  4423  	// result: (MOVSDloadidx8 [c+d] {sym} ptr idx mem)
  4424  	for {
  4425  		c := v.AuxInt
  4426  		sym := v.Aux
  4427  		v_0 := v.Args[0]
  4428  		if v_0.Op != Op386ADDLconst {
  4429  			break
  4430  		}
  4431  		d := v_0.AuxInt
  4432  		ptr := v_0.Args[0]
  4433  		idx := v.Args[1]
  4434  		mem := v.Args[2]
  4435  		v.reset(Op386MOVSDloadidx8)
  4436  		v.AuxInt = c + d
  4437  		v.Aux = sym
  4438  		v.AddArg(ptr)
  4439  		v.AddArg(idx)
  4440  		v.AddArg(mem)
  4441  		return true
  4442  	}
  4443  	// match: (MOVSDloadidx8 [c] {sym} ptr (ADDLconst [d] idx) mem)
  4444  	// cond:
  4445  	// result: (MOVSDloadidx8 [c+8*d] {sym} ptr idx mem)
  4446  	for {
  4447  		c := v.AuxInt
  4448  		sym := v.Aux
  4449  		ptr := v.Args[0]
  4450  		v_1 := v.Args[1]
  4451  		if v_1.Op != Op386ADDLconst {
  4452  			break
  4453  		}
  4454  		d := v_1.AuxInt
  4455  		idx := v_1.Args[0]
  4456  		mem := v.Args[2]
  4457  		v.reset(Op386MOVSDloadidx8)
  4458  		v.AuxInt = c + 8*d
  4459  		v.Aux = sym
  4460  		v.AddArg(ptr)
  4461  		v.AddArg(idx)
  4462  		v.AddArg(mem)
  4463  		return true
  4464  	}
  4465  	return false
  4466  }
  4467  func rewriteValue386_Op386MOVSDstore(v *Value, config *Config) bool {
  4468  	b := v.Block
  4469  	_ = b
  4470  	// match: (MOVSDstore [off1] {sym} (ADDLconst [off2] ptr) val mem)
  4471  	// cond: is32Bit(off1+off2)
  4472  	// result: (MOVSDstore [off1+off2] {sym} ptr val mem)
  4473  	for {
  4474  		off1 := v.AuxInt
  4475  		sym := v.Aux
  4476  		v_0 := v.Args[0]
  4477  		if v_0.Op != Op386ADDLconst {
  4478  			break
  4479  		}
  4480  		off2 := v_0.AuxInt
  4481  		ptr := v_0.Args[0]
  4482  		val := v.Args[1]
  4483  		mem := v.Args[2]
  4484  		if !(is32Bit(off1 + off2)) {
  4485  			break
  4486  		}
  4487  		v.reset(Op386MOVSDstore)
  4488  		v.AuxInt = off1 + off2
  4489  		v.Aux = sym
  4490  		v.AddArg(ptr)
  4491  		v.AddArg(val)
  4492  		v.AddArg(mem)
  4493  		return true
  4494  	}
  4495  	// match: (MOVSDstore [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  4496  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  4497  	// result: (MOVSDstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  4498  	for {
  4499  		off1 := v.AuxInt
  4500  		sym1 := v.Aux
  4501  		v_0 := v.Args[0]
  4502  		if v_0.Op != Op386LEAL {
  4503  			break
  4504  		}
  4505  		off2 := v_0.AuxInt
  4506  		sym2 := v_0.Aux
  4507  		base := v_0.Args[0]
  4508  		val := v.Args[1]
  4509  		mem := v.Args[2]
  4510  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  4511  			break
  4512  		}
  4513  		v.reset(Op386MOVSDstore)
  4514  		v.AuxInt = off1 + off2
  4515  		v.Aux = mergeSym(sym1, sym2)
  4516  		v.AddArg(base)
  4517  		v.AddArg(val)
  4518  		v.AddArg(mem)
  4519  		return true
  4520  	}
  4521  	// match: (MOVSDstore [off1] {sym1} (LEAL1 [off2] {sym2} ptr idx) val mem)
  4522  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  4523  	// result: (MOVSDstoreidx1 [off1+off2] {mergeSym(sym1,sym2)} ptr idx val mem)
  4524  	for {
  4525  		off1 := v.AuxInt
  4526  		sym1 := v.Aux
  4527  		v_0 := v.Args[0]
  4528  		if v_0.Op != Op386LEAL1 {
  4529  			break
  4530  		}
  4531  		off2 := v_0.AuxInt
  4532  		sym2 := v_0.Aux
  4533  		ptr := v_0.Args[0]
  4534  		idx := v_0.Args[1]
  4535  		val := v.Args[1]
  4536  		mem := v.Args[2]
  4537  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  4538  			break
  4539  		}
  4540  		v.reset(Op386MOVSDstoreidx1)
  4541  		v.AuxInt = off1 + off2
  4542  		v.Aux = mergeSym(sym1, sym2)
  4543  		v.AddArg(ptr)
  4544  		v.AddArg(idx)
  4545  		v.AddArg(val)
  4546  		v.AddArg(mem)
  4547  		return true
  4548  	}
  4549  	// match: (MOVSDstore [off1] {sym1} (LEAL8 [off2] {sym2} ptr idx) val mem)
  4550  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  4551  	// result: (MOVSDstoreidx8 [off1+off2] {mergeSym(sym1,sym2)} ptr idx val mem)
  4552  	for {
  4553  		off1 := v.AuxInt
  4554  		sym1 := v.Aux
  4555  		v_0 := v.Args[0]
  4556  		if v_0.Op != Op386LEAL8 {
  4557  			break
  4558  		}
  4559  		off2 := v_0.AuxInt
  4560  		sym2 := v_0.Aux
  4561  		ptr := v_0.Args[0]
  4562  		idx := v_0.Args[1]
  4563  		val := v.Args[1]
  4564  		mem := v.Args[2]
  4565  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  4566  			break
  4567  		}
  4568  		v.reset(Op386MOVSDstoreidx8)
  4569  		v.AuxInt = off1 + off2
  4570  		v.Aux = mergeSym(sym1, sym2)
  4571  		v.AddArg(ptr)
  4572  		v.AddArg(idx)
  4573  		v.AddArg(val)
  4574  		v.AddArg(mem)
  4575  		return true
  4576  	}
  4577  	// match: (MOVSDstore [off] {sym} (ADDL ptr idx) val mem)
  4578  	// cond: ptr.Op != OpSB
  4579  	// result: (MOVSDstoreidx1 [off] {sym} ptr idx val mem)
  4580  	for {
  4581  		off := v.AuxInt
  4582  		sym := v.Aux
  4583  		v_0 := v.Args[0]
  4584  		if v_0.Op != Op386ADDL {
  4585  			break
  4586  		}
  4587  		ptr := v_0.Args[0]
  4588  		idx := v_0.Args[1]
  4589  		val := v.Args[1]
  4590  		mem := v.Args[2]
  4591  		if !(ptr.Op != OpSB) {
  4592  			break
  4593  		}
  4594  		v.reset(Op386MOVSDstoreidx1)
  4595  		v.AuxInt = off
  4596  		v.Aux = sym
  4597  		v.AddArg(ptr)
  4598  		v.AddArg(idx)
  4599  		v.AddArg(val)
  4600  		v.AddArg(mem)
  4601  		return true
  4602  	}
  4603  	return false
  4604  }
  4605  func rewriteValue386_Op386MOVSDstoreidx1(v *Value, config *Config) bool {
  4606  	b := v.Block
  4607  	_ = b
  4608  	// match: (MOVSDstoreidx1 [c] {sym} (ADDLconst [d] ptr) idx val mem)
  4609  	// cond:
  4610  	// result: (MOVSDstoreidx1 [c+d] {sym} ptr idx val mem)
  4611  	for {
  4612  		c := v.AuxInt
  4613  		sym := v.Aux
  4614  		v_0 := v.Args[0]
  4615  		if v_0.Op != Op386ADDLconst {
  4616  			break
  4617  		}
  4618  		d := v_0.AuxInt
  4619  		ptr := v_0.Args[0]
  4620  		idx := v.Args[1]
  4621  		val := v.Args[2]
  4622  		mem := v.Args[3]
  4623  		v.reset(Op386MOVSDstoreidx1)
  4624  		v.AuxInt = c + d
  4625  		v.Aux = sym
  4626  		v.AddArg(ptr)
  4627  		v.AddArg(idx)
  4628  		v.AddArg(val)
  4629  		v.AddArg(mem)
  4630  		return true
  4631  	}
  4632  	// match: (MOVSDstoreidx1 [c] {sym} ptr (ADDLconst [d] idx) val mem)
  4633  	// cond:
  4634  	// result: (MOVSDstoreidx1 [c+d] {sym} ptr idx val mem)
  4635  	for {
  4636  		c := v.AuxInt
  4637  		sym := v.Aux
  4638  		ptr := v.Args[0]
  4639  		v_1 := v.Args[1]
  4640  		if v_1.Op != Op386ADDLconst {
  4641  			break
  4642  		}
  4643  		d := v_1.AuxInt
  4644  		idx := v_1.Args[0]
  4645  		val := v.Args[2]
  4646  		mem := v.Args[3]
  4647  		v.reset(Op386MOVSDstoreidx1)
  4648  		v.AuxInt = c + d
  4649  		v.Aux = sym
  4650  		v.AddArg(ptr)
  4651  		v.AddArg(idx)
  4652  		v.AddArg(val)
  4653  		v.AddArg(mem)
  4654  		return true
  4655  	}
  4656  	return false
  4657  }
  4658  func rewriteValue386_Op386MOVSDstoreidx8(v *Value, config *Config) bool {
  4659  	b := v.Block
  4660  	_ = b
  4661  	// match: (MOVSDstoreidx8 [c] {sym} (ADDLconst [d] ptr) idx val mem)
  4662  	// cond:
  4663  	// result: (MOVSDstoreidx8 [c+d] {sym} ptr idx val mem)
  4664  	for {
  4665  		c := v.AuxInt
  4666  		sym := v.Aux
  4667  		v_0 := v.Args[0]
  4668  		if v_0.Op != Op386ADDLconst {
  4669  			break
  4670  		}
  4671  		d := v_0.AuxInt
  4672  		ptr := v_0.Args[0]
  4673  		idx := v.Args[1]
  4674  		val := v.Args[2]
  4675  		mem := v.Args[3]
  4676  		v.reset(Op386MOVSDstoreidx8)
  4677  		v.AuxInt = c + d
  4678  		v.Aux = sym
  4679  		v.AddArg(ptr)
  4680  		v.AddArg(idx)
  4681  		v.AddArg(val)
  4682  		v.AddArg(mem)
  4683  		return true
  4684  	}
  4685  	// match: (MOVSDstoreidx8 [c] {sym} ptr (ADDLconst [d] idx) val mem)
  4686  	// cond:
  4687  	// result: (MOVSDstoreidx8 [c+8*d] {sym} ptr idx val mem)
  4688  	for {
  4689  		c := v.AuxInt
  4690  		sym := v.Aux
  4691  		ptr := v.Args[0]
  4692  		v_1 := v.Args[1]
  4693  		if v_1.Op != Op386ADDLconst {
  4694  			break
  4695  		}
  4696  		d := v_1.AuxInt
  4697  		idx := v_1.Args[0]
  4698  		val := v.Args[2]
  4699  		mem := v.Args[3]
  4700  		v.reset(Op386MOVSDstoreidx8)
  4701  		v.AuxInt = c + 8*d
  4702  		v.Aux = sym
  4703  		v.AddArg(ptr)
  4704  		v.AddArg(idx)
  4705  		v.AddArg(val)
  4706  		v.AddArg(mem)
  4707  		return true
  4708  	}
  4709  	return false
  4710  }
  4711  func rewriteValue386_Op386MOVSSconst(v *Value, config *Config) bool {
  4712  	b := v.Block
  4713  	_ = b
  4714  	// match: (MOVSSconst [c])
  4715  	// cond: config.ctxt.Flag_shared
  4716  	// result: (MOVSSconst2 (MOVSSconst1 [c]))
  4717  	for {
  4718  		c := v.AuxInt
  4719  		if !(config.ctxt.Flag_shared) {
  4720  			break
  4721  		}
  4722  		v.reset(Op386MOVSSconst2)
  4723  		v0 := b.NewValue0(v.Line, Op386MOVSSconst1, config.fe.TypeUInt32())
  4724  		v0.AuxInt = c
  4725  		v.AddArg(v0)
  4726  		return true
  4727  	}
  4728  	return false
  4729  }
  4730  func rewriteValue386_Op386MOVSSload(v *Value, config *Config) bool {
  4731  	b := v.Block
  4732  	_ = b
  4733  	// match: (MOVSSload [off1] {sym} (ADDLconst [off2] ptr) mem)
  4734  	// cond: is32Bit(off1+off2)
  4735  	// result: (MOVSSload [off1+off2] {sym} ptr mem)
  4736  	for {
  4737  		off1 := v.AuxInt
  4738  		sym := v.Aux
  4739  		v_0 := v.Args[0]
  4740  		if v_0.Op != Op386ADDLconst {
  4741  			break
  4742  		}
  4743  		off2 := v_0.AuxInt
  4744  		ptr := v_0.Args[0]
  4745  		mem := v.Args[1]
  4746  		if !(is32Bit(off1 + off2)) {
  4747  			break
  4748  		}
  4749  		v.reset(Op386MOVSSload)
  4750  		v.AuxInt = off1 + off2
  4751  		v.Aux = sym
  4752  		v.AddArg(ptr)
  4753  		v.AddArg(mem)
  4754  		return true
  4755  	}
  4756  	// match: (MOVSSload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  4757  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  4758  	// result: (MOVSSload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  4759  	for {
  4760  		off1 := v.AuxInt
  4761  		sym1 := v.Aux
  4762  		v_0 := v.Args[0]
  4763  		if v_0.Op != Op386LEAL {
  4764  			break
  4765  		}
  4766  		off2 := v_0.AuxInt
  4767  		sym2 := v_0.Aux
  4768  		base := v_0.Args[0]
  4769  		mem := v.Args[1]
  4770  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  4771  			break
  4772  		}
  4773  		v.reset(Op386MOVSSload)
  4774  		v.AuxInt = off1 + off2
  4775  		v.Aux = mergeSym(sym1, sym2)
  4776  		v.AddArg(base)
  4777  		v.AddArg(mem)
  4778  		return true
  4779  	}
  4780  	// match: (MOVSSload [off1] {sym1} (LEAL1 [off2] {sym2} ptr idx) mem)
  4781  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  4782  	// result: (MOVSSloadidx1 [off1+off2] {mergeSym(sym1,sym2)} ptr idx mem)
  4783  	for {
  4784  		off1 := v.AuxInt
  4785  		sym1 := v.Aux
  4786  		v_0 := v.Args[0]
  4787  		if v_0.Op != Op386LEAL1 {
  4788  			break
  4789  		}
  4790  		off2 := v_0.AuxInt
  4791  		sym2 := v_0.Aux
  4792  		ptr := v_0.Args[0]
  4793  		idx := v_0.Args[1]
  4794  		mem := v.Args[1]
  4795  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  4796  			break
  4797  		}
  4798  		v.reset(Op386MOVSSloadidx1)
  4799  		v.AuxInt = off1 + off2
  4800  		v.Aux = mergeSym(sym1, sym2)
  4801  		v.AddArg(ptr)
  4802  		v.AddArg(idx)
  4803  		v.AddArg(mem)
  4804  		return true
  4805  	}
  4806  	// match: (MOVSSload [off1] {sym1} (LEAL4 [off2] {sym2} ptr idx) mem)
  4807  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  4808  	// result: (MOVSSloadidx4 [off1+off2] {mergeSym(sym1,sym2)} ptr idx mem)
  4809  	for {
  4810  		off1 := v.AuxInt
  4811  		sym1 := v.Aux
  4812  		v_0 := v.Args[0]
  4813  		if v_0.Op != Op386LEAL4 {
  4814  			break
  4815  		}
  4816  		off2 := v_0.AuxInt
  4817  		sym2 := v_0.Aux
  4818  		ptr := v_0.Args[0]
  4819  		idx := v_0.Args[1]
  4820  		mem := v.Args[1]
  4821  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  4822  			break
  4823  		}
  4824  		v.reset(Op386MOVSSloadidx4)
  4825  		v.AuxInt = off1 + off2
  4826  		v.Aux = mergeSym(sym1, sym2)
  4827  		v.AddArg(ptr)
  4828  		v.AddArg(idx)
  4829  		v.AddArg(mem)
  4830  		return true
  4831  	}
  4832  	// match: (MOVSSload [off] {sym} (ADDL ptr idx) mem)
  4833  	// cond: ptr.Op != OpSB
  4834  	// result: (MOVSSloadidx1 [off] {sym} ptr idx mem)
  4835  	for {
  4836  		off := v.AuxInt
  4837  		sym := v.Aux
  4838  		v_0 := v.Args[0]
  4839  		if v_0.Op != Op386ADDL {
  4840  			break
  4841  		}
  4842  		ptr := v_0.Args[0]
  4843  		idx := v_0.Args[1]
  4844  		mem := v.Args[1]
  4845  		if !(ptr.Op != OpSB) {
  4846  			break
  4847  		}
  4848  		v.reset(Op386MOVSSloadidx1)
  4849  		v.AuxInt = off
  4850  		v.Aux = sym
  4851  		v.AddArg(ptr)
  4852  		v.AddArg(idx)
  4853  		v.AddArg(mem)
  4854  		return true
  4855  	}
  4856  	return false
  4857  }
  4858  func rewriteValue386_Op386MOVSSloadidx1(v *Value, config *Config) bool {
  4859  	b := v.Block
  4860  	_ = b
  4861  	// match: (MOVSSloadidx1 [c] {sym} (ADDLconst [d] ptr) idx mem)
  4862  	// cond:
  4863  	// result: (MOVSSloadidx1 [c+d] {sym} ptr idx mem)
  4864  	for {
  4865  		c := v.AuxInt
  4866  		sym := v.Aux
  4867  		v_0 := v.Args[0]
  4868  		if v_0.Op != Op386ADDLconst {
  4869  			break
  4870  		}
  4871  		d := v_0.AuxInt
  4872  		ptr := v_0.Args[0]
  4873  		idx := v.Args[1]
  4874  		mem := v.Args[2]
  4875  		v.reset(Op386MOVSSloadidx1)
  4876  		v.AuxInt = c + d
  4877  		v.Aux = sym
  4878  		v.AddArg(ptr)
  4879  		v.AddArg(idx)
  4880  		v.AddArg(mem)
  4881  		return true
  4882  	}
  4883  	// match: (MOVSSloadidx1 [c] {sym} ptr (ADDLconst [d] idx) mem)
  4884  	// cond:
  4885  	// result: (MOVSSloadidx1 [c+d] {sym} ptr idx mem)
  4886  	for {
  4887  		c := v.AuxInt
  4888  		sym := v.Aux
  4889  		ptr := v.Args[0]
  4890  		v_1 := v.Args[1]
  4891  		if v_1.Op != Op386ADDLconst {
  4892  			break
  4893  		}
  4894  		d := v_1.AuxInt
  4895  		idx := v_1.Args[0]
  4896  		mem := v.Args[2]
  4897  		v.reset(Op386MOVSSloadidx1)
  4898  		v.AuxInt = c + d
  4899  		v.Aux = sym
  4900  		v.AddArg(ptr)
  4901  		v.AddArg(idx)
  4902  		v.AddArg(mem)
  4903  		return true
  4904  	}
  4905  	return false
  4906  }
  4907  func rewriteValue386_Op386MOVSSloadidx4(v *Value, config *Config) bool {
  4908  	b := v.Block
  4909  	_ = b
  4910  	// match: (MOVSSloadidx4 [c] {sym} (ADDLconst [d] ptr) idx mem)
  4911  	// cond:
  4912  	// result: (MOVSSloadidx4 [c+d] {sym} ptr idx mem)
  4913  	for {
  4914  		c := v.AuxInt
  4915  		sym := v.Aux
  4916  		v_0 := v.Args[0]
  4917  		if v_0.Op != Op386ADDLconst {
  4918  			break
  4919  		}
  4920  		d := v_0.AuxInt
  4921  		ptr := v_0.Args[0]
  4922  		idx := v.Args[1]
  4923  		mem := v.Args[2]
  4924  		v.reset(Op386MOVSSloadidx4)
  4925  		v.AuxInt = c + d
  4926  		v.Aux = sym
  4927  		v.AddArg(ptr)
  4928  		v.AddArg(idx)
  4929  		v.AddArg(mem)
  4930  		return true
  4931  	}
  4932  	// match: (MOVSSloadidx4 [c] {sym} ptr (ADDLconst [d] idx) mem)
  4933  	// cond:
  4934  	// result: (MOVSSloadidx4 [c+4*d] {sym} ptr idx mem)
  4935  	for {
  4936  		c := v.AuxInt
  4937  		sym := v.Aux
  4938  		ptr := v.Args[0]
  4939  		v_1 := v.Args[1]
  4940  		if v_1.Op != Op386ADDLconst {
  4941  			break
  4942  		}
  4943  		d := v_1.AuxInt
  4944  		idx := v_1.Args[0]
  4945  		mem := v.Args[2]
  4946  		v.reset(Op386MOVSSloadidx4)
  4947  		v.AuxInt = c + 4*d
  4948  		v.Aux = sym
  4949  		v.AddArg(ptr)
  4950  		v.AddArg(idx)
  4951  		v.AddArg(mem)
  4952  		return true
  4953  	}
  4954  	return false
  4955  }
  4956  func rewriteValue386_Op386MOVSSstore(v *Value, config *Config) bool {
  4957  	b := v.Block
  4958  	_ = b
  4959  	// match: (MOVSSstore [off1] {sym} (ADDLconst [off2] ptr) val mem)
  4960  	// cond: is32Bit(off1+off2)
  4961  	// result: (MOVSSstore [off1+off2] {sym} ptr val mem)
  4962  	for {
  4963  		off1 := v.AuxInt
  4964  		sym := v.Aux
  4965  		v_0 := v.Args[0]
  4966  		if v_0.Op != Op386ADDLconst {
  4967  			break
  4968  		}
  4969  		off2 := v_0.AuxInt
  4970  		ptr := v_0.Args[0]
  4971  		val := v.Args[1]
  4972  		mem := v.Args[2]
  4973  		if !(is32Bit(off1 + off2)) {
  4974  			break
  4975  		}
  4976  		v.reset(Op386MOVSSstore)
  4977  		v.AuxInt = off1 + off2
  4978  		v.Aux = sym
  4979  		v.AddArg(ptr)
  4980  		v.AddArg(val)
  4981  		v.AddArg(mem)
  4982  		return true
  4983  	}
  4984  	// match: (MOVSSstore [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  4985  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  4986  	// result: (MOVSSstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  4987  	for {
  4988  		off1 := v.AuxInt
  4989  		sym1 := v.Aux
  4990  		v_0 := v.Args[0]
  4991  		if v_0.Op != Op386LEAL {
  4992  			break
  4993  		}
  4994  		off2 := v_0.AuxInt
  4995  		sym2 := v_0.Aux
  4996  		base := v_0.Args[0]
  4997  		val := v.Args[1]
  4998  		mem := v.Args[2]
  4999  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  5000  			break
  5001  		}
  5002  		v.reset(Op386MOVSSstore)
  5003  		v.AuxInt = off1 + off2
  5004  		v.Aux = mergeSym(sym1, sym2)
  5005  		v.AddArg(base)
  5006  		v.AddArg(val)
  5007  		v.AddArg(mem)
  5008  		return true
  5009  	}
  5010  	// match: (MOVSSstore [off1] {sym1} (LEAL1 [off2] {sym2} ptr idx) val mem)
  5011  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  5012  	// result: (MOVSSstoreidx1 [off1+off2] {mergeSym(sym1,sym2)} ptr idx val mem)
  5013  	for {
  5014  		off1 := v.AuxInt
  5015  		sym1 := v.Aux
  5016  		v_0 := v.Args[0]
  5017  		if v_0.Op != Op386LEAL1 {
  5018  			break
  5019  		}
  5020  		off2 := v_0.AuxInt
  5021  		sym2 := v_0.Aux
  5022  		ptr := v_0.Args[0]
  5023  		idx := v_0.Args[1]
  5024  		val := v.Args[1]
  5025  		mem := v.Args[2]
  5026  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  5027  			break
  5028  		}
  5029  		v.reset(Op386MOVSSstoreidx1)
  5030  		v.AuxInt = off1 + off2
  5031  		v.Aux = mergeSym(sym1, sym2)
  5032  		v.AddArg(ptr)
  5033  		v.AddArg(idx)
  5034  		v.AddArg(val)
  5035  		v.AddArg(mem)
  5036  		return true
  5037  	}
  5038  	// match: (MOVSSstore [off1] {sym1} (LEAL4 [off2] {sym2} ptr idx) val mem)
  5039  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  5040  	// result: (MOVSSstoreidx4 [off1+off2] {mergeSym(sym1,sym2)} ptr idx val mem)
  5041  	for {
  5042  		off1 := v.AuxInt
  5043  		sym1 := v.Aux
  5044  		v_0 := v.Args[0]
  5045  		if v_0.Op != Op386LEAL4 {
  5046  			break
  5047  		}
  5048  		off2 := v_0.AuxInt
  5049  		sym2 := v_0.Aux
  5050  		ptr := v_0.Args[0]
  5051  		idx := v_0.Args[1]
  5052  		val := v.Args[1]
  5053  		mem := v.Args[2]
  5054  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  5055  			break
  5056  		}
  5057  		v.reset(Op386MOVSSstoreidx4)
  5058  		v.AuxInt = off1 + off2
  5059  		v.Aux = mergeSym(sym1, sym2)
  5060  		v.AddArg(ptr)
  5061  		v.AddArg(idx)
  5062  		v.AddArg(val)
  5063  		v.AddArg(mem)
  5064  		return true
  5065  	}
  5066  	// match: (MOVSSstore [off] {sym} (ADDL ptr idx) val mem)
  5067  	// cond: ptr.Op != OpSB
  5068  	// result: (MOVSSstoreidx1 [off] {sym} ptr idx val mem)
  5069  	for {
  5070  		off := v.AuxInt
  5071  		sym := v.Aux
  5072  		v_0 := v.Args[0]
  5073  		if v_0.Op != Op386ADDL {
  5074  			break
  5075  		}
  5076  		ptr := v_0.Args[0]
  5077  		idx := v_0.Args[1]
  5078  		val := v.Args[1]
  5079  		mem := v.Args[2]
  5080  		if !(ptr.Op != OpSB) {
  5081  			break
  5082  		}
  5083  		v.reset(Op386MOVSSstoreidx1)
  5084  		v.AuxInt = off
  5085  		v.Aux = sym
  5086  		v.AddArg(ptr)
  5087  		v.AddArg(idx)
  5088  		v.AddArg(val)
  5089  		v.AddArg(mem)
  5090  		return true
  5091  	}
  5092  	return false
  5093  }
  5094  func rewriteValue386_Op386MOVSSstoreidx1(v *Value, config *Config) bool {
  5095  	b := v.Block
  5096  	_ = b
  5097  	// match: (MOVSSstoreidx1 [c] {sym} (ADDLconst [d] ptr) idx val mem)
  5098  	// cond:
  5099  	// result: (MOVSSstoreidx1 [c+d] {sym} ptr idx val mem)
  5100  	for {
  5101  		c := v.AuxInt
  5102  		sym := v.Aux
  5103  		v_0 := v.Args[0]
  5104  		if v_0.Op != Op386ADDLconst {
  5105  			break
  5106  		}
  5107  		d := v_0.AuxInt
  5108  		ptr := v_0.Args[0]
  5109  		idx := v.Args[1]
  5110  		val := v.Args[2]
  5111  		mem := v.Args[3]
  5112  		v.reset(Op386MOVSSstoreidx1)
  5113  		v.AuxInt = c + d
  5114  		v.Aux = sym
  5115  		v.AddArg(ptr)
  5116  		v.AddArg(idx)
  5117  		v.AddArg(val)
  5118  		v.AddArg(mem)
  5119  		return true
  5120  	}
  5121  	// match: (MOVSSstoreidx1 [c] {sym} ptr (ADDLconst [d] idx) val mem)
  5122  	// cond:
  5123  	// result: (MOVSSstoreidx1 [c+d] {sym} ptr idx val mem)
  5124  	for {
  5125  		c := v.AuxInt
  5126  		sym := v.Aux
  5127  		ptr := v.Args[0]
  5128  		v_1 := v.Args[1]
  5129  		if v_1.Op != Op386ADDLconst {
  5130  			break
  5131  		}
  5132  		d := v_1.AuxInt
  5133  		idx := v_1.Args[0]
  5134  		val := v.Args[2]
  5135  		mem := v.Args[3]
  5136  		v.reset(Op386MOVSSstoreidx1)
  5137  		v.AuxInt = c + d
  5138  		v.Aux = sym
  5139  		v.AddArg(ptr)
  5140  		v.AddArg(idx)
  5141  		v.AddArg(val)
  5142  		v.AddArg(mem)
  5143  		return true
  5144  	}
  5145  	return false
  5146  }
  5147  func rewriteValue386_Op386MOVSSstoreidx4(v *Value, config *Config) bool {
  5148  	b := v.Block
  5149  	_ = b
  5150  	// match: (MOVSSstoreidx4 [c] {sym} (ADDLconst [d] ptr) idx val mem)
  5151  	// cond:
  5152  	// result: (MOVSSstoreidx4 [c+d] {sym} ptr idx val mem)
  5153  	for {
  5154  		c := v.AuxInt
  5155  		sym := v.Aux
  5156  		v_0 := v.Args[0]
  5157  		if v_0.Op != Op386ADDLconst {
  5158  			break
  5159  		}
  5160  		d := v_0.AuxInt
  5161  		ptr := v_0.Args[0]
  5162  		idx := v.Args[1]
  5163  		val := v.Args[2]
  5164  		mem := v.Args[3]
  5165  		v.reset(Op386MOVSSstoreidx4)
  5166  		v.AuxInt = c + d
  5167  		v.Aux = sym
  5168  		v.AddArg(ptr)
  5169  		v.AddArg(idx)
  5170  		v.AddArg(val)
  5171  		v.AddArg(mem)
  5172  		return true
  5173  	}
  5174  	// match: (MOVSSstoreidx4 [c] {sym} ptr (ADDLconst [d] idx) val mem)
  5175  	// cond:
  5176  	// result: (MOVSSstoreidx4 [c+4*d] {sym} ptr idx val mem)
  5177  	for {
  5178  		c := v.AuxInt
  5179  		sym := v.Aux
  5180  		ptr := v.Args[0]
  5181  		v_1 := v.Args[1]
  5182  		if v_1.Op != Op386ADDLconst {
  5183  			break
  5184  		}
  5185  		d := v_1.AuxInt
  5186  		idx := v_1.Args[0]
  5187  		val := v.Args[2]
  5188  		mem := v.Args[3]
  5189  		v.reset(Op386MOVSSstoreidx4)
  5190  		v.AuxInt = c + 4*d
  5191  		v.Aux = sym
  5192  		v.AddArg(ptr)
  5193  		v.AddArg(idx)
  5194  		v.AddArg(val)
  5195  		v.AddArg(mem)
  5196  		return true
  5197  	}
  5198  	return false
  5199  }
  5200  func rewriteValue386_Op386MOVWLSX(v *Value, config *Config) bool {
  5201  	b := v.Block
  5202  	_ = b
  5203  	// match: (MOVWLSX x:(MOVWload [off] {sym} ptr mem))
  5204  	// cond: x.Uses == 1 && clobber(x)
  5205  	// result: @x.Block (MOVWLSXload <v.Type> [off] {sym} ptr mem)
  5206  	for {
  5207  		x := v.Args[0]
  5208  		if x.Op != Op386MOVWload {
  5209  			break
  5210  		}
  5211  		off := x.AuxInt
  5212  		sym := x.Aux
  5213  		ptr := x.Args[0]
  5214  		mem := x.Args[1]
  5215  		if !(x.Uses == 1 && clobber(x)) {
  5216  			break
  5217  		}
  5218  		b = x.Block
  5219  		v0 := b.NewValue0(v.Line, Op386MOVWLSXload, v.Type)
  5220  		v.reset(OpCopy)
  5221  		v.AddArg(v0)
  5222  		v0.AuxInt = off
  5223  		v0.Aux = sym
  5224  		v0.AddArg(ptr)
  5225  		v0.AddArg(mem)
  5226  		return true
  5227  	}
  5228  	// match: (MOVWLSX (ANDLconst [c] x))
  5229  	// cond: c & 0x8000 == 0
  5230  	// result: (ANDLconst [c & 0x7fff] x)
  5231  	for {
  5232  		v_0 := v.Args[0]
  5233  		if v_0.Op != Op386ANDLconst {
  5234  			break
  5235  		}
  5236  		c := v_0.AuxInt
  5237  		x := v_0.Args[0]
  5238  		if !(c&0x8000 == 0) {
  5239  			break
  5240  		}
  5241  		v.reset(Op386ANDLconst)
  5242  		v.AuxInt = c & 0x7fff
  5243  		v.AddArg(x)
  5244  		return true
  5245  	}
  5246  	return false
  5247  }
  5248  func rewriteValue386_Op386MOVWLSXload(v *Value, config *Config) bool {
  5249  	b := v.Block
  5250  	_ = b
  5251  	// match: (MOVWLSXload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  5252  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  5253  	// result: (MOVWLSXload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  5254  	for {
  5255  		off1 := v.AuxInt
  5256  		sym1 := v.Aux
  5257  		v_0 := v.Args[0]
  5258  		if v_0.Op != Op386LEAL {
  5259  			break
  5260  		}
  5261  		off2 := v_0.AuxInt
  5262  		sym2 := v_0.Aux
  5263  		base := v_0.Args[0]
  5264  		mem := v.Args[1]
  5265  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  5266  			break
  5267  		}
  5268  		v.reset(Op386MOVWLSXload)
  5269  		v.AuxInt = off1 + off2
  5270  		v.Aux = mergeSym(sym1, sym2)
  5271  		v.AddArg(base)
  5272  		v.AddArg(mem)
  5273  		return true
  5274  	}
  5275  	return false
  5276  }
  5277  func rewriteValue386_Op386MOVWLZX(v *Value, config *Config) bool {
  5278  	b := v.Block
  5279  	_ = b
  5280  	// match: (MOVWLZX x:(MOVWload [off] {sym} ptr mem))
  5281  	// cond: x.Uses == 1 && clobber(x)
  5282  	// result: @x.Block (MOVWload <v.Type> [off] {sym} ptr mem)
  5283  	for {
  5284  		x := v.Args[0]
  5285  		if x.Op != Op386MOVWload {
  5286  			break
  5287  		}
  5288  		off := x.AuxInt
  5289  		sym := x.Aux
  5290  		ptr := x.Args[0]
  5291  		mem := x.Args[1]
  5292  		if !(x.Uses == 1 && clobber(x)) {
  5293  			break
  5294  		}
  5295  		b = x.Block
  5296  		v0 := b.NewValue0(v.Line, Op386MOVWload, v.Type)
  5297  		v.reset(OpCopy)
  5298  		v.AddArg(v0)
  5299  		v0.AuxInt = off
  5300  		v0.Aux = sym
  5301  		v0.AddArg(ptr)
  5302  		v0.AddArg(mem)
  5303  		return true
  5304  	}
  5305  	// match: (MOVWLZX x:(MOVWloadidx1 [off] {sym} ptr idx mem))
  5306  	// cond: x.Uses == 1 && clobber(x)
  5307  	// result: @x.Block (MOVWloadidx1 <v.Type> [off] {sym} ptr idx mem)
  5308  	for {
  5309  		x := v.Args[0]
  5310  		if x.Op != Op386MOVWloadidx1 {
  5311  			break
  5312  		}
  5313  		off := x.AuxInt
  5314  		sym := x.Aux
  5315  		ptr := x.Args[0]
  5316  		idx := x.Args[1]
  5317  		mem := x.Args[2]
  5318  		if !(x.Uses == 1 && clobber(x)) {
  5319  			break
  5320  		}
  5321  		b = x.Block
  5322  		v0 := b.NewValue0(v.Line, Op386MOVWloadidx1, v.Type)
  5323  		v.reset(OpCopy)
  5324  		v.AddArg(v0)
  5325  		v0.AuxInt = off
  5326  		v0.Aux = sym
  5327  		v0.AddArg(ptr)
  5328  		v0.AddArg(idx)
  5329  		v0.AddArg(mem)
  5330  		return true
  5331  	}
  5332  	// match: (MOVWLZX x:(MOVWloadidx2 [off] {sym} ptr idx mem))
  5333  	// cond: x.Uses == 1 && clobber(x)
  5334  	// result: @x.Block (MOVWloadidx2 <v.Type> [off] {sym} ptr idx mem)
  5335  	for {
  5336  		x := v.Args[0]
  5337  		if x.Op != Op386MOVWloadidx2 {
  5338  			break
  5339  		}
  5340  		off := x.AuxInt
  5341  		sym := x.Aux
  5342  		ptr := x.Args[0]
  5343  		idx := x.Args[1]
  5344  		mem := x.Args[2]
  5345  		if !(x.Uses == 1 && clobber(x)) {
  5346  			break
  5347  		}
  5348  		b = x.Block
  5349  		v0 := b.NewValue0(v.Line, Op386MOVWloadidx2, v.Type)
  5350  		v.reset(OpCopy)
  5351  		v.AddArg(v0)
  5352  		v0.AuxInt = off
  5353  		v0.Aux = sym
  5354  		v0.AddArg(ptr)
  5355  		v0.AddArg(idx)
  5356  		v0.AddArg(mem)
  5357  		return true
  5358  	}
  5359  	// match: (MOVWLZX (ANDLconst [c] x))
  5360  	// cond:
  5361  	// result: (ANDLconst [c & 0xffff] x)
  5362  	for {
  5363  		v_0 := v.Args[0]
  5364  		if v_0.Op != Op386ANDLconst {
  5365  			break
  5366  		}
  5367  		c := v_0.AuxInt
  5368  		x := v_0.Args[0]
  5369  		v.reset(Op386ANDLconst)
  5370  		v.AuxInt = c & 0xffff
  5371  		v.AddArg(x)
  5372  		return true
  5373  	}
  5374  	return false
  5375  }
  5376  func rewriteValue386_Op386MOVWload(v *Value, config *Config) bool {
  5377  	b := v.Block
  5378  	_ = b
  5379  	// match: (MOVWload [off] {sym} ptr (MOVWstore [off2] {sym2} ptr2 x _))
  5380  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  5381  	// result: x
  5382  	for {
  5383  		off := v.AuxInt
  5384  		sym := v.Aux
  5385  		ptr := v.Args[0]
  5386  		v_1 := v.Args[1]
  5387  		if v_1.Op != Op386MOVWstore {
  5388  			break
  5389  		}
  5390  		off2 := v_1.AuxInt
  5391  		sym2 := v_1.Aux
  5392  		ptr2 := v_1.Args[0]
  5393  		x := v_1.Args[1]
  5394  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  5395  			break
  5396  		}
  5397  		v.reset(OpCopy)
  5398  		v.Type = x.Type
  5399  		v.AddArg(x)
  5400  		return true
  5401  	}
  5402  	// match: (MOVWload  [off1] {sym} (ADDLconst [off2] ptr) mem)
  5403  	// cond: is32Bit(off1+off2)
  5404  	// result: (MOVWload  [off1+off2] {sym} ptr mem)
  5405  	for {
  5406  		off1 := v.AuxInt
  5407  		sym := v.Aux
  5408  		v_0 := v.Args[0]
  5409  		if v_0.Op != Op386ADDLconst {
  5410  			break
  5411  		}
  5412  		off2 := v_0.AuxInt
  5413  		ptr := v_0.Args[0]
  5414  		mem := v.Args[1]
  5415  		if !(is32Bit(off1 + off2)) {
  5416  			break
  5417  		}
  5418  		v.reset(Op386MOVWload)
  5419  		v.AuxInt = off1 + off2
  5420  		v.Aux = sym
  5421  		v.AddArg(ptr)
  5422  		v.AddArg(mem)
  5423  		return true
  5424  	}
  5425  	// match: (MOVWload  [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  5426  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  5427  	// result: (MOVWload  [off1+off2] {mergeSym(sym1,sym2)} base mem)
  5428  	for {
  5429  		off1 := v.AuxInt
  5430  		sym1 := v.Aux
  5431  		v_0 := v.Args[0]
  5432  		if v_0.Op != Op386LEAL {
  5433  			break
  5434  		}
  5435  		off2 := v_0.AuxInt
  5436  		sym2 := v_0.Aux
  5437  		base := v_0.Args[0]
  5438  		mem := v.Args[1]
  5439  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  5440  			break
  5441  		}
  5442  		v.reset(Op386MOVWload)
  5443  		v.AuxInt = off1 + off2
  5444  		v.Aux = mergeSym(sym1, sym2)
  5445  		v.AddArg(base)
  5446  		v.AddArg(mem)
  5447  		return true
  5448  	}
  5449  	// match: (MOVWload [off1] {sym1} (LEAL1 [off2] {sym2} ptr idx) mem)
  5450  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  5451  	// result: (MOVWloadidx1 [off1+off2] {mergeSym(sym1,sym2)} ptr idx mem)
  5452  	for {
  5453  		off1 := v.AuxInt
  5454  		sym1 := v.Aux
  5455  		v_0 := v.Args[0]
  5456  		if v_0.Op != Op386LEAL1 {
  5457  			break
  5458  		}
  5459  		off2 := v_0.AuxInt
  5460  		sym2 := v_0.Aux
  5461  		ptr := v_0.Args[0]
  5462  		idx := v_0.Args[1]
  5463  		mem := v.Args[1]
  5464  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  5465  			break
  5466  		}
  5467  		v.reset(Op386MOVWloadidx1)
  5468  		v.AuxInt = off1 + off2
  5469  		v.Aux = mergeSym(sym1, sym2)
  5470  		v.AddArg(ptr)
  5471  		v.AddArg(idx)
  5472  		v.AddArg(mem)
  5473  		return true
  5474  	}
  5475  	// match: (MOVWload [off1] {sym1} (LEAL2 [off2] {sym2} ptr idx) mem)
  5476  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  5477  	// result: (MOVWloadidx2 [off1+off2] {mergeSym(sym1,sym2)} ptr idx mem)
  5478  	for {
  5479  		off1 := v.AuxInt
  5480  		sym1 := v.Aux
  5481  		v_0 := v.Args[0]
  5482  		if v_0.Op != Op386LEAL2 {
  5483  			break
  5484  		}
  5485  		off2 := v_0.AuxInt
  5486  		sym2 := v_0.Aux
  5487  		ptr := v_0.Args[0]
  5488  		idx := v_0.Args[1]
  5489  		mem := v.Args[1]
  5490  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  5491  			break
  5492  		}
  5493  		v.reset(Op386MOVWloadidx2)
  5494  		v.AuxInt = off1 + off2
  5495  		v.Aux = mergeSym(sym1, sym2)
  5496  		v.AddArg(ptr)
  5497  		v.AddArg(idx)
  5498  		v.AddArg(mem)
  5499  		return true
  5500  	}
  5501  	// match: (MOVWload [off] {sym} (ADDL ptr idx) mem)
  5502  	// cond: ptr.Op != OpSB
  5503  	// result: (MOVWloadidx1 [off] {sym} ptr idx mem)
  5504  	for {
  5505  		off := v.AuxInt
  5506  		sym := v.Aux
  5507  		v_0 := v.Args[0]
  5508  		if v_0.Op != Op386ADDL {
  5509  			break
  5510  		}
  5511  		ptr := v_0.Args[0]
  5512  		idx := v_0.Args[1]
  5513  		mem := v.Args[1]
  5514  		if !(ptr.Op != OpSB) {
  5515  			break
  5516  		}
  5517  		v.reset(Op386MOVWloadidx1)
  5518  		v.AuxInt = off
  5519  		v.Aux = sym
  5520  		v.AddArg(ptr)
  5521  		v.AddArg(idx)
  5522  		v.AddArg(mem)
  5523  		return true
  5524  	}
  5525  	return false
  5526  }
  5527  func rewriteValue386_Op386MOVWloadidx1(v *Value, config *Config) bool {
  5528  	b := v.Block
  5529  	_ = b
  5530  	// match: (MOVWloadidx1 [c] {sym} ptr (SHLLconst [1] idx) mem)
  5531  	// cond:
  5532  	// result: (MOVWloadidx2 [c] {sym} ptr idx mem)
  5533  	for {
  5534  		c := v.AuxInt
  5535  		sym := v.Aux
  5536  		ptr := v.Args[0]
  5537  		v_1 := v.Args[1]
  5538  		if v_1.Op != Op386SHLLconst {
  5539  			break
  5540  		}
  5541  		if v_1.AuxInt != 1 {
  5542  			break
  5543  		}
  5544  		idx := v_1.Args[0]
  5545  		mem := v.Args[2]
  5546  		v.reset(Op386MOVWloadidx2)
  5547  		v.AuxInt = c
  5548  		v.Aux = sym
  5549  		v.AddArg(ptr)
  5550  		v.AddArg(idx)
  5551  		v.AddArg(mem)
  5552  		return true
  5553  	}
  5554  	// match: (MOVWloadidx1 [c] {sym} (ADDLconst [d] ptr) idx mem)
  5555  	// cond:
  5556  	// result: (MOVWloadidx1 [c+d] {sym} ptr idx mem)
  5557  	for {
  5558  		c := v.AuxInt
  5559  		sym := v.Aux
  5560  		v_0 := v.Args[0]
  5561  		if v_0.Op != Op386ADDLconst {
  5562  			break
  5563  		}
  5564  		d := v_0.AuxInt
  5565  		ptr := v_0.Args[0]
  5566  		idx := v.Args[1]
  5567  		mem := v.Args[2]
  5568  		v.reset(Op386MOVWloadidx1)
  5569  		v.AuxInt = c + d
  5570  		v.Aux = sym
  5571  		v.AddArg(ptr)
  5572  		v.AddArg(idx)
  5573  		v.AddArg(mem)
  5574  		return true
  5575  	}
  5576  	// match: (MOVWloadidx1 [c] {sym} ptr (ADDLconst [d] idx) mem)
  5577  	// cond:
  5578  	// result: (MOVWloadidx1 [c+d] {sym} ptr idx mem)
  5579  	for {
  5580  		c := v.AuxInt
  5581  		sym := v.Aux
  5582  		ptr := v.Args[0]
  5583  		v_1 := v.Args[1]
  5584  		if v_1.Op != Op386ADDLconst {
  5585  			break
  5586  		}
  5587  		d := v_1.AuxInt
  5588  		idx := v_1.Args[0]
  5589  		mem := v.Args[2]
  5590  		v.reset(Op386MOVWloadidx1)
  5591  		v.AuxInt = c + d
  5592  		v.Aux = sym
  5593  		v.AddArg(ptr)
  5594  		v.AddArg(idx)
  5595  		v.AddArg(mem)
  5596  		return true
  5597  	}
  5598  	return false
  5599  }
  5600  func rewriteValue386_Op386MOVWloadidx2(v *Value, config *Config) bool {
  5601  	b := v.Block
  5602  	_ = b
  5603  	// match: (MOVWloadidx2 [c] {sym} (ADDLconst [d] ptr) idx mem)
  5604  	// cond:
  5605  	// result: (MOVWloadidx2 [c+d] {sym} ptr idx mem)
  5606  	for {
  5607  		c := v.AuxInt
  5608  		sym := v.Aux
  5609  		v_0 := v.Args[0]
  5610  		if v_0.Op != Op386ADDLconst {
  5611  			break
  5612  		}
  5613  		d := v_0.AuxInt
  5614  		ptr := v_0.Args[0]
  5615  		idx := v.Args[1]
  5616  		mem := v.Args[2]
  5617  		v.reset(Op386MOVWloadidx2)
  5618  		v.AuxInt = c + d
  5619  		v.Aux = sym
  5620  		v.AddArg(ptr)
  5621  		v.AddArg(idx)
  5622  		v.AddArg(mem)
  5623  		return true
  5624  	}
  5625  	// match: (MOVWloadidx2 [c] {sym} ptr (ADDLconst [d] idx) mem)
  5626  	// cond:
  5627  	// result: (MOVWloadidx2 [c+2*d] {sym} ptr idx mem)
  5628  	for {
  5629  		c := v.AuxInt
  5630  		sym := v.Aux
  5631  		ptr := v.Args[0]
  5632  		v_1 := v.Args[1]
  5633  		if v_1.Op != Op386ADDLconst {
  5634  			break
  5635  		}
  5636  		d := v_1.AuxInt
  5637  		idx := v_1.Args[0]
  5638  		mem := v.Args[2]
  5639  		v.reset(Op386MOVWloadidx2)
  5640  		v.AuxInt = c + 2*d
  5641  		v.Aux = sym
  5642  		v.AddArg(ptr)
  5643  		v.AddArg(idx)
  5644  		v.AddArg(mem)
  5645  		return true
  5646  	}
  5647  	return false
  5648  }
  5649  func rewriteValue386_Op386MOVWstore(v *Value, config *Config) bool {
  5650  	b := v.Block
  5651  	_ = b
  5652  	// match: (MOVWstore [off] {sym} ptr (MOVWLSX x) mem)
  5653  	// cond:
  5654  	// result: (MOVWstore [off] {sym} ptr x mem)
  5655  	for {
  5656  		off := v.AuxInt
  5657  		sym := v.Aux
  5658  		ptr := v.Args[0]
  5659  		v_1 := v.Args[1]
  5660  		if v_1.Op != Op386MOVWLSX {
  5661  			break
  5662  		}
  5663  		x := v_1.Args[0]
  5664  		mem := v.Args[2]
  5665  		v.reset(Op386MOVWstore)
  5666  		v.AuxInt = off
  5667  		v.Aux = sym
  5668  		v.AddArg(ptr)
  5669  		v.AddArg(x)
  5670  		v.AddArg(mem)
  5671  		return true
  5672  	}
  5673  	// match: (MOVWstore [off] {sym} ptr (MOVWLZX x) mem)
  5674  	// cond:
  5675  	// result: (MOVWstore [off] {sym} ptr x mem)
  5676  	for {
  5677  		off := v.AuxInt
  5678  		sym := v.Aux
  5679  		ptr := v.Args[0]
  5680  		v_1 := v.Args[1]
  5681  		if v_1.Op != Op386MOVWLZX {
  5682  			break
  5683  		}
  5684  		x := v_1.Args[0]
  5685  		mem := v.Args[2]
  5686  		v.reset(Op386MOVWstore)
  5687  		v.AuxInt = off
  5688  		v.Aux = sym
  5689  		v.AddArg(ptr)
  5690  		v.AddArg(x)
  5691  		v.AddArg(mem)
  5692  		return true
  5693  	}
  5694  	// match: (MOVWstore  [off1] {sym} (ADDLconst [off2] ptr) val mem)
  5695  	// cond: is32Bit(off1+off2)
  5696  	// result: (MOVWstore  [off1+off2] {sym} ptr val mem)
  5697  	for {
  5698  		off1 := v.AuxInt
  5699  		sym := v.Aux
  5700  		v_0 := v.Args[0]
  5701  		if v_0.Op != Op386ADDLconst {
  5702  			break
  5703  		}
  5704  		off2 := v_0.AuxInt
  5705  		ptr := v_0.Args[0]
  5706  		val := v.Args[1]
  5707  		mem := v.Args[2]
  5708  		if !(is32Bit(off1 + off2)) {
  5709  			break
  5710  		}
  5711  		v.reset(Op386MOVWstore)
  5712  		v.AuxInt = off1 + off2
  5713  		v.Aux = sym
  5714  		v.AddArg(ptr)
  5715  		v.AddArg(val)
  5716  		v.AddArg(mem)
  5717  		return true
  5718  	}
  5719  	// match: (MOVWstore [off] {sym} ptr (MOVLconst [c]) mem)
  5720  	// cond: validOff(off)
  5721  	// result: (MOVWstoreconst [makeValAndOff(int64(int16(c)),off)] {sym} ptr mem)
  5722  	for {
  5723  		off := v.AuxInt
  5724  		sym := v.Aux
  5725  		ptr := v.Args[0]
  5726  		v_1 := v.Args[1]
  5727  		if v_1.Op != Op386MOVLconst {
  5728  			break
  5729  		}
  5730  		c := v_1.AuxInt
  5731  		mem := v.Args[2]
  5732  		if !(validOff(off)) {
  5733  			break
  5734  		}
  5735  		v.reset(Op386MOVWstoreconst)
  5736  		v.AuxInt = makeValAndOff(int64(int16(c)), off)
  5737  		v.Aux = sym
  5738  		v.AddArg(ptr)
  5739  		v.AddArg(mem)
  5740  		return true
  5741  	}
  5742  	// match: (MOVWstore  [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  5743  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)   && (base.Op != OpSB || !config.ctxt.Flag_shared)
  5744  	// result: (MOVWstore  [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  5745  	for {
  5746  		off1 := v.AuxInt
  5747  		sym1 := v.Aux
  5748  		v_0 := v.Args[0]
  5749  		if v_0.Op != Op386LEAL {
  5750  			break
  5751  		}
  5752  		off2 := v_0.AuxInt
  5753  		sym2 := v_0.Aux
  5754  		base := v_0.Args[0]
  5755  		val := v.Args[1]
  5756  		mem := v.Args[2]
  5757  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  5758  			break
  5759  		}
  5760  		v.reset(Op386MOVWstore)
  5761  		v.AuxInt = off1 + off2
  5762  		v.Aux = mergeSym(sym1, sym2)
  5763  		v.AddArg(base)
  5764  		v.AddArg(val)
  5765  		v.AddArg(mem)
  5766  		return true
  5767  	}
  5768  	// match: (MOVWstore [off1] {sym1} (LEAL1 [off2] {sym2} ptr idx) val mem)
  5769  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  5770  	// result: (MOVWstoreidx1 [off1+off2] {mergeSym(sym1,sym2)} ptr idx val mem)
  5771  	for {
  5772  		off1 := v.AuxInt
  5773  		sym1 := v.Aux
  5774  		v_0 := v.Args[0]
  5775  		if v_0.Op != Op386LEAL1 {
  5776  			break
  5777  		}
  5778  		off2 := v_0.AuxInt
  5779  		sym2 := v_0.Aux
  5780  		ptr := v_0.Args[0]
  5781  		idx := v_0.Args[1]
  5782  		val := v.Args[1]
  5783  		mem := v.Args[2]
  5784  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  5785  			break
  5786  		}
  5787  		v.reset(Op386MOVWstoreidx1)
  5788  		v.AuxInt = off1 + off2
  5789  		v.Aux = mergeSym(sym1, sym2)
  5790  		v.AddArg(ptr)
  5791  		v.AddArg(idx)
  5792  		v.AddArg(val)
  5793  		v.AddArg(mem)
  5794  		return true
  5795  	}
  5796  	// match: (MOVWstore [off1] {sym1} (LEAL2 [off2] {sym2} ptr idx) val mem)
  5797  	// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
  5798  	// result: (MOVWstoreidx2 [off1+off2] {mergeSym(sym1,sym2)} ptr idx val mem)
  5799  	for {
  5800  		off1 := v.AuxInt
  5801  		sym1 := v.Aux
  5802  		v_0 := v.Args[0]
  5803  		if v_0.Op != Op386LEAL2 {
  5804  			break
  5805  		}
  5806  		off2 := v_0.AuxInt
  5807  		sym2 := v_0.Aux
  5808  		ptr := v_0.Args[0]
  5809  		idx := v_0.Args[1]
  5810  		val := v.Args[1]
  5811  		mem := v.Args[2]
  5812  		if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
  5813  			break
  5814  		}
  5815  		v.reset(Op386MOVWstoreidx2)
  5816  		v.AuxInt = off1 + off2
  5817  		v.Aux = mergeSym(sym1, sym2)
  5818  		v.AddArg(ptr)
  5819  		v.AddArg(idx)
  5820  		v.AddArg(val)
  5821  		v.AddArg(mem)
  5822  		return true
  5823  	}
  5824  	// match: (MOVWstore [off] {sym} (ADDL ptr idx) val mem)
  5825  	// cond: ptr.Op != OpSB
  5826  	// result: (MOVWstoreidx1 [off] {sym} ptr idx val mem)
  5827  	for {
  5828  		off := v.AuxInt
  5829  		sym := v.Aux
  5830  		v_0 := v.Args[0]
  5831  		if v_0.Op != Op386ADDL {
  5832  			break
  5833  		}
  5834  		ptr := v_0.Args[0]
  5835  		idx := v_0.Args[1]
  5836  		val := v.Args[1]
  5837  		mem := v.Args[2]
  5838  		if !(ptr.Op != OpSB) {
  5839  			break
  5840  		}
  5841  		v.reset(Op386MOVWstoreidx1)
  5842  		v.AuxInt = off
  5843  		v.Aux = sym
  5844  		v.AddArg(ptr)
  5845  		v.AddArg(idx)
  5846  		v.AddArg(val)
  5847  		v.AddArg(mem)
  5848  		return true
  5849  	}
  5850  	// match: (MOVWstore [i] {s} p (SHRLconst [16] w) x:(MOVWstore [i-2] {s} p w mem))
  5851  	// cond: x.Uses == 1   && clobber(x)
  5852  	// result: (MOVLstore [i-2] {s} p w mem)
  5853  	for {
  5854  		i := v.AuxInt
  5855  		s := v.Aux
  5856  		p := v.Args[0]
  5857  		v_1 := v.Args[1]
  5858  		if v_1.Op != Op386SHRLconst {
  5859  			break
  5860  		}
  5861  		if v_1.AuxInt != 16 {
  5862  			break
  5863  		}
  5864  		w := v_1.Args[0]
  5865  		x := v.Args[2]
  5866  		if x.Op != Op386MOVWstore {
  5867  			break
  5868  		}
  5869  		if x.AuxInt != i-2 {
  5870  			break
  5871  		}
  5872  		if x.Aux != s {
  5873  			break
  5874  		}
  5875  		if p != x.Args[0] {
  5876  			break
  5877  		}
  5878  		if w != x.Args[1] {
  5879  			break
  5880  		}
  5881  		mem := x.Args[2]
  5882  		if !(x.Uses == 1 && clobber(x)) {
  5883  			break
  5884  		}
  5885  		v.reset(Op386MOVLstore)
  5886  		v.AuxInt = i - 2
  5887  		v.Aux = s
  5888  		v.AddArg(p)
  5889  		v.AddArg(w)
  5890  		v.AddArg(mem)
  5891  		return true
  5892  	}
  5893  	// match: (MOVWstore [i] {s} p (SHRLconst [j] w) x:(MOVWstore [i-2] {s} p w0:(SHRLconst [j-16] w) mem))
  5894  	// cond: x.Uses == 1   && clobber(x)
  5895  	// result: (MOVLstore [i-2] {s} p w0 mem)
  5896  	for {
  5897  		i := v.AuxInt
  5898  		s := v.Aux
  5899  		p := v.Args[0]
  5900  		v_1 := v.Args[1]
  5901  		if v_1.Op != Op386SHRLconst {
  5902  			break
  5903  		}
  5904  		j := v_1.AuxInt
  5905  		w := v_1.Args[0]
  5906  		x := v.Args[2]
  5907  		if x.Op != Op386MOVWstore {
  5908  			break
  5909  		}
  5910  		if x.AuxInt != i-2 {
  5911  			break
  5912  		}
  5913  		if x.Aux != s {
  5914  			break
  5915  		}
  5916  		if p != x.Args[0] {
  5917  			break
  5918  		}
  5919  		w0 := x.Args[1]
  5920  		if w0.Op != Op386SHRLconst {
  5921  			break
  5922  		}
  5923  		if w0.AuxInt != j-16 {
  5924  			break
  5925  		}
  5926  		if w != w0.Args[0] {
  5927  			break
  5928  		}
  5929  		mem := x.Args[2]
  5930  		if !(x.Uses == 1 && clobber(x)) {
  5931  			break
  5932  		}
  5933  		v.reset(Op386MOVLstore)
  5934  		v.AuxInt = i - 2
  5935  		v.Aux = s
  5936  		v.AddArg(p)
  5937  		v.AddArg(w0)
  5938  		v.AddArg(mem)
  5939  		return true
  5940  	}
  5941  	return false
  5942  }
  5943  func rewriteValue386_Op386MOVWstoreconst(v *Value, config *Config) bool {
  5944  	b := v.Block
  5945  	_ = b
  5946  	// match: (MOVWstoreconst [sc] {s} (ADDLconst [off] ptr) mem)
  5947  	// cond: ValAndOff(sc).canAdd(off)
  5948  	// result: (MOVWstoreconst [ValAndOff(sc).add(off)] {s} ptr mem)
  5949  	for {
  5950  		sc := v.AuxInt
  5951  		s := v.Aux
  5952  		v_0 := v.Args[0]
  5953  		if v_0.Op != Op386ADDLconst {
  5954  			break
  5955  		}
  5956  		off := v_0.AuxInt
  5957  		ptr := v_0.Args[0]
  5958  		mem := v.Args[1]
  5959  		if !(ValAndOff(sc).canAdd(off)) {
  5960  			break
  5961  		}
  5962  		v.reset(Op386MOVWstoreconst)
  5963  		v.AuxInt = ValAndOff(sc).add(off)
  5964  		v.Aux = s
  5965  		v.AddArg(ptr)
  5966  		v.AddArg(mem)
  5967  		return true
  5968  	}
  5969  	// match: (MOVWstoreconst [sc] {sym1} (LEAL [off] {sym2} ptr) mem)
  5970  	// cond: canMergeSym(sym1, sym2) && ValAndOff(sc).canAdd(off)   && (ptr.Op != OpSB || !config.ctxt.Flag_shared)
  5971  	// result: (MOVWstoreconst [ValAndOff(sc).add(off)] {mergeSym(sym1, sym2)} ptr mem)
  5972  	for {
  5973  		sc := v.AuxInt
  5974  		sym1 := v.Aux
  5975  		v_0 := v.Args[0]
  5976  		if v_0.Op != Op386LEAL {
  5977  			break
  5978  		}
  5979  		off := v_0.AuxInt
  5980  		sym2 := v_0.Aux
  5981  		ptr := v_0.Args[0]
  5982  		mem := v.Args[1]
  5983  		if !(canMergeSym(sym1, sym2) && ValAndOff(sc).canAdd(off) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
  5984  			break
  5985  		}
  5986  		v.reset(Op386MOVWstoreconst)
  5987  		v.AuxInt = ValAndOff(sc).add(off)
  5988  		v.Aux = mergeSym(sym1, sym2)
  5989  		v.AddArg(ptr)
  5990  		v.AddArg(mem)
  5991  		return true
  5992  	}
  5993  	// match: (MOVWstoreconst [x] {sym1} (LEAL1 [off] {sym2} ptr idx) mem)
  5994  	// cond: canMergeSym(sym1, sym2)
  5995  	// result: (MOVWstoreconstidx1 [ValAndOff(x).add(off)] {mergeSym(sym1,sym2)} ptr idx mem)
  5996  	for {
  5997  		x := v.AuxInt
  5998  		sym1 := v.Aux
  5999  		v_0 := v.Args[0]
  6000  		if v_0.Op != Op386LEAL1 {
  6001  			break
  6002  		}
  6003  		off := v_0.AuxInt
  6004  		sym2 := v_0.Aux
  6005  		ptr := v_0.Args[0]
  6006  		idx := v_0.Args[1]
  6007  		mem := v.Args[1]
  6008  		if !(canMergeSym(sym1, sym2)) {
  6009  			break
  6010  		}
  6011  		v.reset(Op386MOVWstoreconstidx1)
  6012  		v.AuxInt = ValAndOff(x).add(off)
  6013  		v.Aux = mergeSym(sym1, sym2)
  6014  		v.AddArg(ptr)
  6015  		v.AddArg(idx)
  6016  		v.AddArg(mem)
  6017  		return true
  6018  	}
  6019  	// match: (MOVWstoreconst [x] {sym1} (LEAL2 [off] {sym2} ptr idx) mem)
  6020  	// cond: canMergeSym(sym1, sym2)
  6021  	// result: (MOVWstoreconstidx2 [ValAndOff(x).add(off)] {mergeSym(sym1,sym2)} ptr idx mem)
  6022  	for {
  6023  		x := v.AuxInt
  6024  		sym1 := v.Aux
  6025  		v_0 := v.Args[0]
  6026  		if v_0.Op != Op386LEAL2 {
  6027  			break
  6028  		}
  6029  		off := v_0.AuxInt
  6030  		sym2 := v_0.Aux
  6031  		ptr := v_0.Args[0]
  6032  		idx := v_0.Args[1]
  6033  		mem := v.Args[1]
  6034  		if !(canMergeSym(sym1, sym2)) {
  6035  			break
  6036  		}
  6037  		v.reset(Op386MOVWstoreconstidx2)
  6038  		v.AuxInt = ValAndOff(x).add(off)
  6039  		v.Aux = mergeSym(sym1, sym2)
  6040  		v.AddArg(ptr)
  6041  		v.AddArg(idx)
  6042  		v.AddArg(mem)
  6043  		return true
  6044  	}
  6045  	// match: (MOVWstoreconst [x] {sym} (ADDL ptr idx) mem)
  6046  	// cond:
  6047  	// result: (MOVWstoreconstidx1 [x] {sym} ptr idx mem)
  6048  	for {
  6049  		x := v.AuxInt
  6050  		sym := v.Aux
  6051  		v_0 := v.Args[0]
  6052  		if v_0.Op != Op386ADDL {
  6053  			break
  6054  		}
  6055  		ptr := v_0.Args[0]
  6056  		idx := v_0.Args[1]
  6057  		mem := v.Args[1]
  6058  		v.reset(Op386MOVWstoreconstidx1)
  6059  		v.AuxInt = x
  6060  		v.Aux = sym
  6061  		v.AddArg(ptr)
  6062  		v.AddArg(idx)
  6063  		v.AddArg(mem)
  6064  		return true
  6065  	}
  6066  	// match: (MOVWstoreconst [c] {s} p x:(MOVWstoreconst [a] {s} p mem))
  6067  	// cond: x.Uses == 1   && ValAndOff(a).Off() + 2 == ValAndOff(c).Off()   && clobber(x)
  6068  	// result: (MOVLstoreconst [makeValAndOff(ValAndOff(a).Val()&0xffff | ValAndOff(c).Val()<<16, ValAndOff(a).Off())] {s} p mem)
  6069  	for {
  6070  		c := v.AuxInt
  6071  		s := v.Aux
  6072  		p := v.Args[0]
  6073  		x := v.Args[1]
  6074  		if x.Op != Op386MOVWstoreconst {
  6075  			break
  6076  		}
  6077  		a := x.AuxInt
  6078  		if x.Aux != s {
  6079  			break
  6080  		}
  6081  		if p != x.Args[0] {
  6082  			break
  6083  		}
  6084  		mem := x.Args[1]
  6085  		if !(x.Uses == 1 && ValAndOff(a).Off()+2 == ValAndOff(c).Off() && clobber(x)) {
  6086  			break
  6087  		}
  6088  		v.reset(Op386MOVLstoreconst)
  6089  		v.AuxInt = makeValAndOff(ValAndOff(a).Val()&0xffff|ValAndOff(c).Val()<<16, ValAndOff(a).Off())
  6090  		v.Aux = s
  6091  		v.AddArg(p)
  6092  		v.AddArg(mem)
  6093  		return true
  6094  	}
  6095  	return false
  6096  }
  6097  func rewriteValue386_Op386MOVWstoreconstidx1(v *Value, config *Config) bool {
  6098  	b := v.Block
  6099  	_ = b
  6100  	// match: (MOVWstoreconstidx1 [c] {sym} ptr (SHLLconst [1] idx) mem)
  6101  	// cond:
  6102  	// result: (MOVWstoreconstidx2 [c] {sym} ptr idx mem)
  6103  	for {
  6104  		c := v.AuxInt
  6105  		sym := v.Aux
  6106  		ptr := v.Args[0]
  6107  		v_1 := v.Args[1]
  6108  		if v_1.Op != Op386SHLLconst {
  6109  			break
  6110  		}
  6111  		if v_1.AuxInt != 1 {
  6112  			break
  6113  		}
  6114  		idx := v_1.Args[0]
  6115  		mem := v.Args[2]
  6116  		v.reset(Op386MOVWstoreconstidx2)
  6117  		v.AuxInt = c
  6118  		v.Aux = sym
  6119  		v.AddArg(ptr)
  6120  		v.AddArg(idx)
  6121  		v.AddArg(mem)
  6122  		return true
  6123  	}
  6124  	// match: (MOVWstoreconstidx1 [x] {sym} (ADDLconst [c] ptr) idx mem)
  6125  	// cond:
  6126  	// result: (MOVWstoreconstidx1 [ValAndOff(x).add(c)] {sym} ptr idx mem)
  6127  	for {
  6128  		x := v.AuxInt
  6129  		sym := v.Aux
  6130  		v_0 := v.Args[0]
  6131  		if v_0.Op != Op386ADDLconst {
  6132  			break
  6133  		}
  6134  		c := v_0.AuxInt
  6135  		ptr := v_0.Args[0]
  6136  		idx := v.Args[1]
  6137  		mem := v.Args[2]
  6138  		v.reset(Op386MOVWstoreconstidx1)
  6139  		v.AuxInt = ValAndOff(x).add(c)
  6140  		v.Aux = sym
  6141  		v.AddArg(ptr)
  6142  		v.AddArg(idx)
  6143  		v.AddArg(mem)
  6144  		return true
  6145  	}
  6146  	// match: (MOVWstoreconstidx1 [x] {sym} ptr (ADDLconst [c] idx) mem)
  6147  	// cond:
  6148  	// result: (MOVWstoreconstidx1 [ValAndOff(x).add(c)] {sym} ptr idx mem)
  6149  	for {
  6150  		x := v.AuxInt
  6151  		sym := v.Aux
  6152  		ptr := v.Args[0]
  6153  		v_1 := v.Args[1]
  6154  		if v_1.Op != Op386ADDLconst {
  6155  			break
  6156  		}
  6157  		c := v_1.AuxInt
  6158  		idx := v_1.Args[0]
  6159  		mem := v.Args[2]
  6160  		v.reset(Op386MOVWstoreconstidx1)
  6161  		v.AuxInt = ValAndOff(x).add(c)
  6162  		v.Aux = sym
  6163  		v.AddArg(ptr)
  6164  		v.AddArg(idx)
  6165  		v.AddArg(mem)
  6166  		return true
  6167  	}
  6168  	// match: (MOVWstoreconstidx1 [c] {s} p i x:(MOVWstoreconstidx1 [a] {s} p i mem))
  6169  	// cond: x.Uses == 1   && ValAndOff(a).Off() + 2 == ValAndOff(c).Off()   && clobber(x)
  6170  	// result: (MOVLstoreconstidx1 [makeValAndOff(ValAndOff(a).Val()&0xffff | ValAndOff(c).Val()<<16, ValAndOff(a).Off())] {s} p i mem)
  6171  	for {
  6172  		c := v.AuxInt
  6173  		s := v.Aux
  6174  		p := v.Args[0]
  6175  		i := v.Args[1]
  6176  		x := v.Args[2]
  6177  		if x.Op != Op386MOVWstoreconstidx1 {
  6178  			break
  6179  		}
  6180  		a := x.AuxInt
  6181  		if x.Aux != s {
  6182  			break
  6183  		}
  6184  		if p != x.Args[0] {
  6185  			break
  6186  		}
  6187  		if i != x.Args[1] {
  6188  			break
  6189  		}
  6190  		mem := x.Args[2]
  6191  		if !(x.Uses == 1 && ValAndOff(a).Off()+2 == ValAndOff(c).Off() && clobber(x)) {
  6192  			break
  6193  		}
  6194  		v.reset(Op386MOVLstoreconstidx1)
  6195  		v.AuxInt = makeValAndOff(ValAndOff(a).Val()&0xffff|ValAndOff(c).Val()<<16, ValAndOff(a).Off())
  6196  		v.Aux = s
  6197  		v.AddArg(p)
  6198  		v.AddArg(i)
  6199  		v.AddArg(mem)
  6200  		return true
  6201  	}
  6202  	return false
  6203  }
  6204  func rewriteValue386_Op386MOVWstoreconstidx2(v *Value, config *Config) bool {
  6205  	b := v.Block
  6206  	_ = b
  6207  	// match: (MOVWstoreconstidx2 [x] {sym} (ADDLconst [c] ptr) idx mem)
  6208  	// cond:
  6209  	// result: (MOVWstoreconstidx2 [ValAndOff(x).add(c)] {sym} ptr idx mem)
  6210  	for {
  6211  		x := v.AuxInt
  6212  		sym := v.Aux
  6213  		v_0 := v.Args[0]
  6214  		if v_0.Op != Op386ADDLconst {
  6215  			break
  6216  		}
  6217  		c := v_0.AuxInt
  6218  		ptr := v_0.Args[0]
  6219  		idx := v.Args[1]
  6220  		mem := v.Args[2]
  6221  		v.reset(Op386MOVWstoreconstidx2)
  6222  		v.AuxInt = ValAndOff(x).add(c)
  6223  		v.Aux = sym
  6224  		v.AddArg(ptr)
  6225  		v.AddArg(idx)
  6226  		v.AddArg(mem)
  6227  		return true
  6228  	}
  6229  	// match: (MOVWstoreconstidx2 [x] {sym} ptr (ADDLconst [c] idx) mem)
  6230  	// cond:
  6231  	// result: (MOVWstoreconstidx2 [ValAndOff(x).add(2*c)] {sym} ptr idx mem)
  6232  	for {
  6233  		x := v.AuxInt
  6234  		sym := v.Aux
  6235  		ptr := v.Args[0]
  6236  		v_1 := v.Args[1]
  6237  		if v_1.Op != Op386ADDLconst {
  6238  			break
  6239  		}
  6240  		c := v_1.AuxInt
  6241  		idx := v_1.Args[0]
  6242  		mem := v.Args[2]
  6243  		v.reset(Op386MOVWstoreconstidx2)
  6244  		v.AuxInt = ValAndOff(x).add(2 * c)
  6245  		v.Aux = sym
  6246  		v.AddArg(ptr)
  6247  		v.AddArg(idx)
  6248  		v.AddArg(mem)
  6249  		return true
  6250  	}
  6251  	// match: (MOVWstoreconstidx2 [c] {s} p i x:(MOVWstoreconstidx2 [a] {s} p i mem))
  6252  	// cond: x.Uses == 1   && ValAndOff(a).Off() + 2 == ValAndOff(c).Off()   && clobber(x)
  6253  	// result: (MOVLstoreconstidx1 [makeValAndOff(ValAndOff(a).Val()&0xffff | ValAndOff(c).Val()<<16, ValAndOff(a).Off())] {s} p (SHLLconst <i.Type> [1] i) mem)
  6254  	for {
  6255  		c := v.AuxInt
  6256  		s := v.Aux
  6257  		p := v.Args[0]
  6258  		i := v.Args[1]
  6259  		x := v.Args[2]
  6260  		if x.Op != Op386MOVWstoreconstidx2 {
  6261  			break
  6262  		}
  6263  		a := x.AuxInt
  6264  		if x.Aux != s {
  6265  			break
  6266  		}
  6267  		if p != x.Args[0] {
  6268  			break
  6269  		}
  6270  		if i != x.Args[1] {
  6271  			break
  6272  		}
  6273  		mem := x.Args[2]
  6274  		if !(x.Uses == 1 && ValAndOff(a).Off()+2 == ValAndOff(c).Off() && clobber(x)) {
  6275  			break
  6276  		}
  6277  		v.reset(Op386MOVLstoreconstidx1)
  6278  		v.AuxInt = makeValAndOff(ValAndOff(a).Val()&0xffff|ValAndOff(c).Val()<<16, ValAndOff(a).Off())
  6279  		v.Aux = s
  6280  		v.AddArg(p)
  6281  		v0 := b.NewValue0(v.Line, Op386SHLLconst, i.Type)
  6282  		v0.AuxInt = 1
  6283  		v0.AddArg(i)
  6284  		v.AddArg(v0)
  6285  		v.AddArg(mem)
  6286  		return true
  6287  	}
  6288  	return false
  6289  }
  6290  func rewriteValue386_Op386MOVWstoreidx1(v *Value, config *Config) bool {
  6291  	b := v.Block
  6292  	_ = b
  6293  	// match: (MOVWstoreidx1 [c] {sym} ptr (SHLLconst [1] idx) val mem)
  6294  	// cond:
  6295  	// result: (MOVWstoreidx2 [c] {sym} ptr idx val mem)
  6296  	for {
  6297  		c := v.AuxInt
  6298  		sym := v.Aux
  6299  		ptr := v.Args[0]
  6300  		v_1 := v.Args[1]
  6301  		if v_1.Op != Op386SHLLconst {
  6302  			break
  6303  		}
  6304  		if v_1.AuxInt != 1 {
  6305  			break
  6306  		}
  6307  		idx := v_1.Args[0]
  6308  		val := v.Args[2]
  6309  		mem := v.Args[3]
  6310  		v.reset(Op386MOVWstoreidx2)
  6311  		v.AuxInt = c
  6312  		v.Aux = sym
  6313  		v.AddArg(ptr)
  6314  		v.AddArg(idx)
  6315  		v.AddArg(val)
  6316  		v.AddArg(mem)
  6317  		return true
  6318  	}
  6319  	// match: (MOVWstoreidx1 [c] {sym} (ADDLconst [d] ptr) idx val mem)
  6320  	// cond:
  6321  	// result: (MOVWstoreidx1 [c+d] {sym} ptr idx val mem)
  6322  	for {
  6323  		c := v.AuxInt
  6324  		sym := v.Aux
  6325  		v_0 := v.Args[0]
  6326  		if v_0.Op != Op386ADDLconst {
  6327  			break
  6328  		}
  6329  		d := v_0.AuxInt
  6330  		ptr := v_0.Args[0]
  6331  		idx := v.Args[1]
  6332  		val := v.Args[2]
  6333  		mem := v.Args[3]
  6334  		v.reset(Op386MOVWstoreidx1)
  6335  		v.AuxInt = c + d
  6336  		v.Aux = sym
  6337  		v.AddArg(ptr)
  6338  		v.AddArg(idx)
  6339  		v.AddArg(val)
  6340  		v.AddArg(mem)
  6341  		return true
  6342  	}
  6343  	// match: (MOVWstoreidx1 [c] {sym} ptr (ADDLconst [d] idx) val mem)
  6344  	// cond:
  6345  	// result: (MOVWstoreidx1 [c+d] {sym} ptr idx val mem)
  6346  	for {
  6347  		c := v.AuxInt
  6348  		sym := v.Aux
  6349  		ptr := v.Args[0]
  6350  		v_1 := v.Args[1]
  6351  		if v_1.Op != Op386ADDLconst {
  6352  			break
  6353  		}
  6354  		d := v_1.AuxInt
  6355  		idx := v_1.Args[0]
  6356  		val := v.Args[2]
  6357  		mem := v.Args[3]
  6358  		v.reset(Op386MOVWstoreidx1)
  6359  		v.AuxInt = c + d
  6360  		v.Aux = sym
  6361  		v.AddArg(ptr)
  6362  		v.AddArg(idx)
  6363  		v.AddArg(val)
  6364  		v.AddArg(mem)
  6365  		return true
  6366  	}
  6367  	// match: (MOVWstoreidx1 [i] {s} p idx (SHRLconst [16] w) x:(MOVWstoreidx1 [i-2] {s} p idx w mem))
  6368  	// cond: x.Uses == 1   && clobber(x)
  6369  	// result: (MOVLstoreidx1 [i-2] {s} p idx w mem)
  6370  	for {
  6371  		i := v.AuxInt
  6372  		s := v.Aux
  6373  		p := v.Args[0]
  6374  		idx := v.Args[1]
  6375  		v_2 := v.Args[2]
  6376  		if v_2.Op != Op386SHRLconst {
  6377  			break
  6378  		}
  6379  		if v_2.AuxInt != 16 {
  6380  			break
  6381  		}
  6382  		w := v_2.Args[0]
  6383  		x := v.Args[3]
  6384  		if x.Op != Op386MOVWstoreidx1 {
  6385  			break
  6386  		}
  6387  		if x.AuxInt != i-2 {
  6388  			break
  6389  		}
  6390  		if x.Aux != s {
  6391  			break
  6392  		}
  6393  		if p != x.Args[0] {
  6394  			break
  6395  		}
  6396  		if idx != x.Args[1] {
  6397  			break
  6398  		}
  6399  		if w != x.Args[2] {
  6400  			break
  6401  		}
  6402  		mem := x.Args[3]
  6403  		if !(x.Uses == 1 && clobber(x)) {
  6404  			break
  6405  		}
  6406  		v.reset(Op386MOVLstoreidx1)
  6407  		v.AuxInt = i - 2
  6408  		v.Aux = s
  6409  		v.AddArg(p)
  6410  		v.AddArg(idx)
  6411  		v.AddArg(w)
  6412  		v.AddArg(mem)
  6413  		return true
  6414  	}
  6415  	// match: (MOVWstoreidx1 [i] {s} p idx (SHRLconst [j] w) x:(MOVWstoreidx1 [i-2] {s} p idx w0:(SHRLconst [j-16] w) mem))
  6416  	// cond: x.Uses == 1   && clobber(x)
  6417  	// result: (MOVLstoreidx1 [i-2] {s} p idx w0 mem)
  6418  	for {
  6419  		i := v.AuxInt
  6420  		s := v.Aux
  6421  		p := v.Args[0]
  6422  		idx := v.Args[1]
  6423  		v_2 := v.Args[2]
  6424  		if v_2.Op != Op386SHRLconst {
  6425  			break
  6426  		}
  6427  		j := v_2.AuxInt
  6428  		w := v_2.Args[0]
  6429  		x := v.Args[3]
  6430  		if x.Op != Op386MOVWstoreidx1 {
  6431  			break
  6432  		}
  6433  		if x.AuxInt != i-2 {
  6434  			break
  6435  		}
  6436  		if x.Aux != s {
  6437  			break
  6438  		}
  6439  		if p != x.Args[0] {
  6440  			break
  6441  		}
  6442  		if idx != x.Args[1] {
  6443  			break
  6444  		}
  6445  		w0 := x.Args[2]
  6446  		if w0.Op != Op386SHRLconst {
  6447  			break
  6448  		}
  6449  		if w0.AuxInt != j-16 {
  6450  			break
  6451  		}
  6452  		if w != w0.Args[0] {
  6453  			break
  6454  		}
  6455  		mem := x.Args[3]
  6456  		if !(x.Uses == 1 && clobber(x)) {
  6457  			break
  6458  		}
  6459  		v.reset(Op386MOVLstoreidx1)
  6460  		v.AuxInt = i - 2
  6461  		v.Aux = s
  6462  		v.AddArg(p)
  6463  		v.AddArg(idx)
  6464  		v.AddArg(w0)
  6465  		v.AddArg(mem)
  6466  		return true
  6467  	}
  6468  	return false
  6469  }
  6470  func rewriteValue386_Op386MOVWstoreidx2(v *Value, config *Config) bool {
  6471  	b := v.Block
  6472  	_ = b
  6473  	// match: (MOVWstoreidx2 [c] {sym} (ADDLconst [d] ptr) idx val mem)
  6474  	// cond:
  6475  	// result: (MOVWstoreidx2 [c+d] {sym} ptr idx val mem)
  6476  	for {
  6477  		c := v.AuxInt
  6478  		sym := v.Aux
  6479  		v_0 := v.Args[0]
  6480  		if v_0.Op != Op386ADDLconst {
  6481  			break
  6482  		}
  6483  		d := v_0.AuxInt
  6484  		ptr := v_0.Args[0]
  6485  		idx := v.Args[1]
  6486  		val := v.Args[2]
  6487  		mem := v.Args[3]
  6488  		v.reset(Op386MOVWstoreidx2)
  6489  		v.AuxInt = c + d
  6490  		v.Aux = sym
  6491  		v.AddArg(ptr)
  6492  		v.AddArg(idx)
  6493  		v.AddArg(val)
  6494  		v.AddArg(mem)
  6495  		return true
  6496  	}
  6497  	// match: (MOVWstoreidx2 [c] {sym} ptr (ADDLconst [d] idx) val mem)
  6498  	// cond:
  6499  	// result: (MOVWstoreidx2 [c+2*d] {sym} ptr idx val mem)
  6500  	for {
  6501  		c := v.AuxInt
  6502  		sym := v.Aux
  6503  		ptr := v.Args[0]
  6504  		v_1 := v.Args[1]
  6505  		if v_1.Op != Op386ADDLconst {
  6506  			break
  6507  		}
  6508  		d := v_1.AuxInt
  6509  		idx := v_1.Args[0]
  6510  		val := v.Args[2]
  6511  		mem := v.Args[3]
  6512  		v.reset(Op386MOVWstoreidx2)
  6513  		v.AuxInt = c + 2*d
  6514  		v.Aux = sym
  6515  		v.AddArg(ptr)
  6516  		v.AddArg(idx)
  6517  		v.AddArg(val)
  6518  		v.AddArg(mem)
  6519  		return true
  6520  	}
  6521  	// match: (MOVWstoreidx2 [i] {s} p idx (SHRLconst [16] w) x:(MOVWstoreidx2 [i-2] {s} p idx w mem))
  6522  	// cond: x.Uses == 1   && clobber(x)
  6523  	// result: (MOVLstoreidx1 [i-2] {s} p (SHLLconst <idx.Type> [1] idx) w mem)
  6524  	for {
  6525  		i := v.AuxInt
  6526  		s := v.Aux
  6527  		p := v.Args[0]
  6528  		idx := v.Args[1]
  6529  		v_2 := v.Args[2]
  6530  		if v_2.Op != Op386SHRLconst {
  6531  			break
  6532  		}
  6533  		if v_2.AuxInt != 16 {
  6534  			break
  6535  		}
  6536  		w := v_2.Args[0]
  6537  		x := v.Args[3]
  6538  		if x.Op != Op386MOVWstoreidx2 {
  6539  			break
  6540  		}
  6541  		if x.AuxInt != i-2 {
  6542  			break
  6543  		}
  6544  		if x.Aux != s {
  6545  			break
  6546  		}
  6547  		if p != x.Args[0] {
  6548  			break
  6549  		}
  6550  		if idx != x.Args[1] {
  6551  			break
  6552  		}
  6553  		if w != x.Args[2] {
  6554  			break
  6555  		}
  6556  		mem := x.Args[3]
  6557  		if !(x.Uses == 1 && clobber(x)) {
  6558  			break
  6559  		}
  6560  		v.reset(Op386MOVLstoreidx1)
  6561  		v.AuxInt = i - 2
  6562  		v.Aux = s
  6563  		v.AddArg(p)
  6564  		v0 := b.NewValue0(v.Line, Op386SHLLconst, idx.Type)
  6565  		v0.AuxInt = 1
  6566  		v0.AddArg(idx)
  6567  		v.AddArg(v0)
  6568  		v.AddArg(w)
  6569  		v.AddArg(mem)
  6570  		return true
  6571  	}
  6572  	// match: (MOVWstoreidx2 [i] {s} p idx (SHRLconst [j] w) x:(MOVWstoreidx2 [i-2] {s} p idx w0:(SHRLconst [j-16] w) mem))
  6573  	// cond: x.Uses == 1   && clobber(x)
  6574  	// result: (MOVLstoreidx1 [i-2] {s} p (SHLLconst <idx.Type> [1] idx) w0 mem)
  6575  	for {
  6576  		i := v.AuxInt
  6577  		s := v.Aux
  6578  		p := v.Args[0]
  6579  		idx := v.Args[1]
  6580  		v_2 := v.Args[2]
  6581  		if v_2.Op != Op386SHRLconst {
  6582  			break
  6583  		}
  6584  		j := v_2.AuxInt
  6585  		w := v_2.Args[0]
  6586  		x := v.Args[3]
  6587  		if x.Op != Op386MOVWstoreidx2 {
  6588  			break
  6589  		}
  6590  		if x.AuxInt != i-2 {
  6591  			break
  6592  		}
  6593  		if x.Aux != s {
  6594  			break
  6595  		}
  6596  		if p != x.Args[0] {
  6597  			break
  6598  		}
  6599  		if idx != x.Args[1] {
  6600  			break
  6601  		}
  6602  		w0 := x.Args[2]
  6603  		if w0.Op != Op386SHRLconst {
  6604  			break
  6605  		}
  6606  		if w0.AuxInt != j-16 {
  6607  			break
  6608  		}
  6609  		if w != w0.Args[0] {
  6610  			break
  6611  		}
  6612  		mem := x.Args[3]
  6613  		if !(x.Uses == 1 && clobber(x)) {
  6614  			break
  6615  		}
  6616  		v.reset(Op386MOVLstoreidx1)
  6617  		v.AuxInt = i - 2
  6618  		v.Aux = s
  6619  		v.AddArg(p)
  6620  		v0 := b.NewValue0(v.Line, Op386SHLLconst, idx.Type)
  6621  		v0.AuxInt = 1
  6622  		v0.AddArg(idx)
  6623  		v.AddArg(v0)
  6624  		v.AddArg(w0)
  6625  		v.AddArg(mem)
  6626  		return true
  6627  	}
  6628  	return false
  6629  }
  6630  func rewriteValue386_Op386MULL(v *Value, config *Config) bool {
  6631  	b := v.Block
  6632  	_ = b
  6633  	// match: (MULL x (MOVLconst [c]))
  6634  	// cond:
  6635  	// result: (MULLconst [c] x)
  6636  	for {
  6637  		x := v.Args[0]
  6638  		v_1 := v.Args[1]
  6639  		if v_1.Op != Op386MOVLconst {
  6640  			break
  6641  		}
  6642  		c := v_1.AuxInt
  6643  		v.reset(Op386MULLconst)
  6644  		v.AuxInt = c
  6645  		v.AddArg(x)
  6646  		return true
  6647  	}
  6648  	// match: (MULL (MOVLconst [c]) x)
  6649  	// cond:
  6650  	// result: (MULLconst [c] x)
  6651  	for {
  6652  		v_0 := v.Args[0]
  6653  		if v_0.Op != Op386MOVLconst {
  6654  			break
  6655  		}
  6656  		c := v_0.AuxInt
  6657  		x := v.Args[1]
  6658  		v.reset(Op386MULLconst)
  6659  		v.AuxInt = c
  6660  		v.AddArg(x)
  6661  		return true
  6662  	}
  6663  	return false
  6664  }
  6665  func rewriteValue386_Op386MULLconst(v *Value, config *Config) bool {
  6666  	b := v.Block
  6667  	_ = b
  6668  	// match: (MULLconst [c] (MULLconst [d] x))
  6669  	// cond:
  6670  	// result: (MULLconst [int64(int32(c * d))] x)
  6671  	for {
  6672  		c := v.AuxInt
  6673  		v_0 := v.Args[0]
  6674  		if v_0.Op != Op386MULLconst {
  6675  			break
  6676  		}
  6677  		d := v_0.AuxInt
  6678  		x := v_0.Args[0]
  6679  		v.reset(Op386MULLconst)
  6680  		v.AuxInt = int64(int32(c * d))
  6681  		v.AddArg(x)
  6682  		return true
  6683  	}
  6684  	// match: (MULLconst [-1] x)
  6685  	// cond:
  6686  	// result: (NEGL x)
  6687  	for {
  6688  		if v.AuxInt != -1 {
  6689  			break
  6690  		}
  6691  		x := v.Args[0]
  6692  		v.reset(Op386NEGL)
  6693  		v.AddArg(x)
  6694  		return true
  6695  	}
  6696  	// match: (MULLconst [0] _)
  6697  	// cond:
  6698  	// result: (MOVLconst [0])
  6699  	for {
  6700  		if v.AuxInt != 0 {
  6701  			break
  6702  		}
  6703  		v.reset(Op386MOVLconst)
  6704  		v.AuxInt = 0
  6705  		return true
  6706  	}
  6707  	// match: (MULLconst [1] x)
  6708  	// cond:
  6709  	// result: x
  6710  	for {
  6711  		if v.AuxInt != 1 {
  6712  			break
  6713  		}
  6714  		x := v.Args[0]
  6715  		v.reset(OpCopy)
  6716  		v.Type = x.Type
  6717  		v.AddArg(x)
  6718  		return true
  6719  	}
  6720  	// match: (MULLconst [3] x)
  6721  	// cond:
  6722  	// result: (LEAL2 x x)
  6723  	for {
  6724  		if v.AuxInt != 3 {
  6725  			break
  6726  		}
  6727  		x := v.Args[0]
  6728  		v.reset(Op386LEAL2)
  6729  		v.AddArg(x)
  6730  		v.AddArg(x)
  6731  		return true
  6732  	}
  6733  	// match: (MULLconst [5] x)
  6734  	// cond:
  6735  	// result: (LEAL4 x x)
  6736  	for {
  6737  		if v.AuxInt != 5 {
  6738  			break
  6739  		}
  6740  		x := v.Args[0]
  6741  		v.reset(Op386LEAL4)
  6742  		v.AddArg(x)
  6743  		v.AddArg(x)
  6744  		return true
  6745  	}
  6746  	// match: (MULLconst [7] x)
  6747  	// cond:
  6748  	// result: (LEAL8 (NEGL <v.Type> x) x)
  6749  	for {
  6750  		if v.AuxInt != 7 {
  6751  			break
  6752  		}
  6753  		x := v.Args[0]
  6754  		v.reset(Op386LEAL8)
  6755  		v0 := b.NewValue0(v.Line, Op386NEGL, v.Type)
  6756  		v0.AddArg(x)
  6757  		v.AddArg(v0)
  6758  		v.AddArg(x)
  6759  		return true
  6760  	}
  6761  	// match: (MULLconst [9] x)
  6762  	// cond:
  6763  	// result: (LEAL8 x x)
  6764  	for {
  6765  		if v.AuxInt != 9 {
  6766  			break
  6767  		}
  6768  		x := v.Args[0]
  6769  		v.reset(Op386LEAL8)
  6770  		v.AddArg(x)
  6771  		v.AddArg(x)
  6772  		return true
  6773  	}
  6774  	// match: (MULLconst [11] x)
  6775  	// cond:
  6776  	// result: (LEAL2 x (LEAL4 <v.Type> x x))
  6777  	for {
  6778  		if v.AuxInt != 11 {
  6779  			break
  6780  		}
  6781  		x := v.Args[0]
  6782  		v.reset(Op386LEAL2)
  6783  		v.AddArg(x)
  6784  		v0 := b.NewValue0(v.Line, Op386LEAL4, v.Type)
  6785  		v0.AddArg(x)
  6786  		v0.AddArg(x)
  6787  		v.AddArg(v0)
  6788  		return true
  6789  	}
  6790  	// match: (MULLconst [13] x)
  6791  	// cond:
  6792  	// result: (LEAL4 x (LEAL2 <v.Type> x x))
  6793  	for {
  6794  		if v.AuxInt != 13 {
  6795  			break
  6796  		}
  6797  		x := v.Args[0]
  6798  		v.reset(Op386LEAL4)
  6799  		v.AddArg(x)
  6800  		v0 := b.NewValue0(v.Line, Op386LEAL2, v.Type)
  6801  		v0.AddArg(x)
  6802  		v0.AddArg(x)
  6803  		v.AddArg(v0)
  6804  		return true
  6805  	}
  6806  	// match: (MULLconst [21] x)
  6807  	// cond:
  6808  	// result: (LEAL4 x (LEAL4 <v.Type> x x))
  6809  	for {
  6810  		if v.AuxInt != 21 {
  6811  			break
  6812  		}
  6813  		x := v.Args[0]
  6814  		v.reset(Op386LEAL4)
  6815  		v.AddArg(x)
  6816  		v0 := b.NewValue0(v.Line, Op386LEAL4, v.Type)
  6817  		v0.AddArg(x)
  6818  		v0.AddArg(x)
  6819  		v.AddArg(v0)
  6820  		return true
  6821  	}
  6822  	// match: (MULLconst [25] x)
  6823  	// cond:
  6824  	// result: (LEAL8 x (LEAL2 <v.Type> x x))
  6825  	for {
  6826  		if v.AuxInt != 25 {
  6827  			break
  6828  		}
  6829  		x := v.Args[0]
  6830  		v.reset(Op386LEAL8)
  6831  		v.AddArg(x)
  6832  		v0 := b.NewValue0(v.Line, Op386LEAL2, v.Type)
  6833  		v0.AddArg(x)
  6834  		v0.AddArg(x)
  6835  		v.AddArg(v0)
  6836  		return true
  6837  	}
  6838  	// match: (MULLconst [37] x)
  6839  	// cond:
  6840  	// result: (LEAL4 x (LEAL8 <v.Type> x x))
  6841  	for {
  6842  		if v.AuxInt != 37 {
  6843  			break
  6844  		}
  6845  		x := v.Args[0]
  6846  		v.reset(Op386LEAL4)
  6847  		v.AddArg(x)
  6848  		v0 := b.NewValue0(v.Line, Op386LEAL8, v.Type)
  6849  		v0.AddArg(x)
  6850  		v0.AddArg(x)
  6851  		v.AddArg(v0)
  6852  		return true
  6853  	}
  6854  	// match: (MULLconst [41] x)
  6855  	// cond:
  6856  	// result: (LEAL8 x (LEAL4 <v.Type> x x))
  6857  	for {
  6858  		if v.AuxInt != 41 {
  6859  			break
  6860  		}
  6861  		x := v.Args[0]
  6862  		v.reset(Op386LEAL8)
  6863  		v.AddArg(x)
  6864  		v0 := b.NewValue0(v.Line, Op386LEAL4, v.Type)
  6865  		v0.AddArg(x)
  6866  		v0.AddArg(x)
  6867  		v.AddArg(v0)
  6868  		return true
  6869  	}
  6870  	// match: (MULLconst [73] x)
  6871  	// cond:
  6872  	// result: (LEAL8 x (LEAL8 <v.Type> x x))
  6873  	for {
  6874  		if v.AuxInt != 73 {
  6875  			break
  6876  		}
  6877  		x := v.Args[0]
  6878  		v.reset(Op386LEAL8)
  6879  		v.AddArg(x)
  6880  		v0 := b.NewValue0(v.Line, Op386LEAL8, v.Type)
  6881  		v0.AddArg(x)
  6882  		v0.AddArg(x)
  6883  		v.AddArg(v0)
  6884  		return true
  6885  	}
  6886  	// match: (MULLconst [c] x)
  6887  	// cond: isPowerOfTwo(c)
  6888  	// result: (SHLLconst [log2(c)] x)
  6889  	for {
  6890  		c := v.AuxInt
  6891  		x := v.Args[0]
  6892  		if !(isPowerOfTwo(c)) {
  6893  			break
  6894  		}
  6895  		v.reset(Op386SHLLconst)
  6896  		v.AuxInt = log2(c)
  6897  		v.AddArg(x)
  6898  		return true
  6899  	}
  6900  	// match: (MULLconst [c] x)
  6901  	// cond: isPowerOfTwo(c+1) && c >= 15
  6902  	// result: (SUBL (SHLLconst <v.Type> [log2(c+1)] x) x)
  6903  	for {
  6904  		c := v.AuxInt
  6905  		x := v.Args[0]
  6906  		if !(isPowerOfTwo(c+1) && c >= 15) {
  6907  			break
  6908  		}
  6909  		v.reset(Op386SUBL)
  6910  		v0 := b.NewValue0(v.Line, Op386SHLLconst, v.Type)
  6911  		v0.AuxInt = log2(c + 1)
  6912  		v0.AddArg(x)
  6913  		v.AddArg(v0)
  6914  		v.AddArg(x)
  6915  		return true
  6916  	}
  6917  	// match: (MULLconst [c] x)
  6918  	// cond: isPowerOfTwo(c-1) && c >= 17
  6919  	// result: (LEAL1 (SHLLconst <v.Type> [log2(c-1)] x) x)
  6920  	for {
  6921  		c := v.AuxInt
  6922  		x := v.Args[0]
  6923  		if !(isPowerOfTwo(c-1) && c >= 17) {
  6924  			break
  6925  		}
  6926  		v.reset(Op386LEAL1)
  6927  		v0 := b.NewValue0(v.Line, Op386SHLLconst, v.Type)
  6928  		v0.AuxInt = log2(c - 1)
  6929  		v0.AddArg(x)
  6930  		v.AddArg(v0)
  6931  		v.AddArg(x)
  6932  		return true
  6933  	}
  6934  	// match: (MULLconst [c] x)
  6935  	// cond: isPowerOfTwo(c-2) && c >= 34
  6936  	// result: (LEAL2 (SHLLconst <v.Type> [log2(c-2)] x) x)
  6937  	for {
  6938  		c := v.AuxInt
  6939  		x := v.Args[0]
  6940  		if !(isPowerOfTwo(c-2) && c >= 34) {
  6941  			break
  6942  		}
  6943  		v.reset(Op386LEAL2)
  6944  		v0 := b.NewValue0(v.Line, Op386SHLLconst, v.Type)
  6945  		v0.AuxInt = log2(c - 2)
  6946  		v0.AddArg(x)
  6947  		v.AddArg(v0)
  6948  		v.AddArg(x)
  6949  		return true
  6950  	}
  6951  	// match: (MULLconst [c] x)
  6952  	// cond: isPowerOfTwo(c-4) && c >= 68
  6953  	// result: (LEAL4 (SHLLconst <v.Type> [log2(c-4)] x) x)
  6954  	for {
  6955  		c := v.AuxInt
  6956  		x := v.Args[0]
  6957  		if !(isPowerOfTwo(c-4) && c >= 68) {
  6958  			break
  6959  		}
  6960  		v.reset(Op386LEAL4)
  6961  		v0 := b.NewValue0(v.Line, Op386SHLLconst, v.Type)
  6962  		v0.AuxInt = log2(c - 4)
  6963  		v0.AddArg(x)
  6964  		v.AddArg(v0)
  6965  		v.AddArg(x)
  6966  		return true
  6967  	}
  6968  	// match: (MULLconst [c] x)
  6969  	// cond: isPowerOfTwo(c-8) && c >= 136
  6970  	// result: (LEAL8 (SHLLconst <v.Type> [log2(c-8)] x) x)
  6971  	for {
  6972  		c := v.AuxInt
  6973  		x := v.Args[0]
  6974  		if !(isPowerOfTwo(c-8) && c >= 136) {
  6975  			break
  6976  		}
  6977  		v.reset(Op386LEAL8)
  6978  		v0 := b.NewValue0(v.Line, Op386SHLLconst, v.Type)
  6979  		v0.AuxInt = log2(c - 8)
  6980  		v0.AddArg(x)
  6981  		v.AddArg(v0)
  6982  		v.AddArg(x)
  6983  		return true
  6984  	}
  6985  	// match: (MULLconst [c] x)
  6986  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
  6987  	// result: (SHLLconst [log2(c/3)] (LEAL2 <v.Type> x x))
  6988  	for {
  6989  		c := v.AuxInt
  6990  		x := v.Args[0]
  6991  		if !(c%3 == 0 && isPowerOfTwo(c/3)) {
  6992  			break
  6993  		}
  6994  		v.reset(Op386SHLLconst)
  6995  		v.AuxInt = log2(c / 3)
  6996  		v0 := b.NewValue0(v.Line, Op386LEAL2, v.Type)
  6997  		v0.AddArg(x)
  6998  		v0.AddArg(x)
  6999  		v.AddArg(v0)
  7000  		return true
  7001  	}
  7002  	// match: (MULLconst [c] x)
  7003  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
  7004  	// result: (SHLLconst [log2(c/5)] (LEAL4 <v.Type> x x))
  7005  	for {
  7006  		c := v.AuxInt
  7007  		x := v.Args[0]
  7008  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
  7009  			break
  7010  		}
  7011  		v.reset(Op386SHLLconst)
  7012  		v.AuxInt = log2(c / 5)
  7013  		v0 := b.NewValue0(v.Line, Op386LEAL4, v.Type)
  7014  		v0.AddArg(x)
  7015  		v0.AddArg(x)
  7016  		v.AddArg(v0)
  7017  		return true
  7018  	}
  7019  	// match: (MULLconst [c] x)
  7020  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
  7021  	// result: (SHLLconst [log2(c/9)] (LEAL8 <v.Type> x x))
  7022  	for {
  7023  		c := v.AuxInt
  7024  		x := v.Args[0]
  7025  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
  7026  			break
  7027  		}
  7028  		v.reset(Op386SHLLconst)
  7029  		v.AuxInt = log2(c / 9)
  7030  		v0 := b.NewValue0(v.Line, Op386LEAL8, v.Type)
  7031  		v0.AddArg(x)
  7032  		v0.AddArg(x)
  7033  		v.AddArg(v0)
  7034  		return true
  7035  	}
  7036  	// match: (MULLconst [c] (MOVLconst [d]))
  7037  	// cond:
  7038  	// result: (MOVLconst [int64(int32(c*d))])
  7039  	for {
  7040  		c := v.AuxInt
  7041  		v_0 := v.Args[0]
  7042  		if v_0.Op != Op386MOVLconst {
  7043  			break
  7044  		}
  7045  		d := v_0.AuxInt
  7046  		v.reset(Op386MOVLconst)
  7047  		v.AuxInt = int64(int32(c * d))
  7048  		return true
  7049  	}
  7050  	return false
  7051  }
  7052  func rewriteValue386_Op386NEGL(v *Value, config *Config) bool {
  7053  	b := v.Block
  7054  	_ = b
  7055  	// match: (NEGL (MOVLconst [c]))
  7056  	// cond:
  7057  	// result: (MOVLconst [int64(int32(-c))])
  7058  	for {
  7059  		v_0 := v.Args[0]
  7060  		if v_0.Op != Op386MOVLconst {
  7061  			break
  7062  		}
  7063  		c := v_0.AuxInt
  7064  		v.reset(Op386MOVLconst)
  7065  		v.AuxInt = int64(int32(-c))
  7066  		return true
  7067  	}
  7068  	return false
  7069  }
  7070  func rewriteValue386_Op386NOTL(v *Value, config *Config) bool {
  7071  	b := v.Block
  7072  	_ = b
  7073  	// match: (NOTL (MOVLconst [c]))
  7074  	// cond:
  7075  	// result: (MOVLconst [^c])
  7076  	for {
  7077  		v_0 := v.Args[0]
  7078  		if v_0.Op != Op386MOVLconst {
  7079  			break
  7080  		}
  7081  		c := v_0.AuxInt
  7082  		v.reset(Op386MOVLconst)
  7083  		v.AuxInt = ^c
  7084  		return true
  7085  	}
  7086  	return false
  7087  }
  7088  func rewriteValue386_Op386ORL(v *Value, config *Config) bool {
  7089  	b := v.Block
  7090  	_ = b
  7091  	// match: (ORL x (MOVLconst [c]))
  7092  	// cond:
  7093  	// result: (ORLconst [c] x)
  7094  	for {
  7095  		x := v.Args[0]
  7096  		v_1 := v.Args[1]
  7097  		if v_1.Op != Op386MOVLconst {
  7098  			break
  7099  		}
  7100  		c := v_1.AuxInt
  7101  		v.reset(Op386ORLconst)
  7102  		v.AuxInt = c
  7103  		v.AddArg(x)
  7104  		return true
  7105  	}
  7106  	// match: (ORL (MOVLconst [c]) x)
  7107  	// cond:
  7108  	// result: (ORLconst [c] x)
  7109  	for {
  7110  		v_0 := v.Args[0]
  7111  		if v_0.Op != Op386MOVLconst {
  7112  			break
  7113  		}
  7114  		c := v_0.AuxInt
  7115  		x := v.Args[1]
  7116  		v.reset(Op386ORLconst)
  7117  		v.AuxInt = c
  7118  		v.AddArg(x)
  7119  		return true
  7120  	}
  7121  	// match: (ORL x x)
  7122  	// cond:
  7123  	// result: x
  7124  	for {
  7125  		x := v.Args[0]
  7126  		if x != v.Args[1] {
  7127  			break
  7128  		}
  7129  		v.reset(OpCopy)
  7130  		v.Type = x.Type
  7131  		v.AddArg(x)
  7132  		return true
  7133  	}
  7134  	// match: (ORL                  x0:(MOVBload [i]   {s} p mem)     s0:(SHLLconst [8] x1:(MOVBload [i+1] {s} p mem)))
  7135  	// cond: x0.Uses == 1   && x1.Uses == 1   && s0.Uses == 1   && mergePoint(b,x0,x1) != nil   && clobber(x0)   && clobber(x1)   && clobber(s0)
  7136  	// result: @mergePoint(b,x0,x1) (MOVWload [i] {s} p mem)
  7137  	for {
  7138  		x0 := v.Args[0]
  7139  		if x0.Op != Op386MOVBload {
  7140  			break
  7141  		}
  7142  		i := x0.AuxInt
  7143  		s := x0.Aux
  7144  		p := x0.Args[0]
  7145  		mem := x0.Args[1]
  7146  		s0 := v.Args[1]
  7147  		if s0.Op != Op386SHLLconst {
  7148  			break
  7149  		}
  7150  		if s0.AuxInt != 8 {
  7151  			break
  7152  		}
  7153  		x1 := s0.Args[0]
  7154  		if x1.Op != Op386MOVBload {
  7155  			break
  7156  		}
  7157  		if x1.AuxInt != i+1 {
  7158  			break
  7159  		}
  7160  		if x1.Aux != s {
  7161  			break
  7162  		}
  7163  		if p != x1.Args[0] {
  7164  			break
  7165  		}
  7166  		if mem != x1.Args[1] {
  7167  			break
  7168  		}
  7169  		if !(x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0) && clobber(x1) && clobber(s0)) {
  7170  			break
  7171  		}
  7172  		b = mergePoint(b, x0, x1)
  7173  		v0 := b.NewValue0(v.Line, Op386MOVWload, config.fe.TypeUInt16())
  7174  		v.reset(OpCopy)
  7175  		v.AddArg(v0)
  7176  		v0.AuxInt = i
  7177  		v0.Aux = s
  7178  		v0.AddArg(p)
  7179  		v0.AddArg(mem)
  7180  		return true
  7181  	}
  7182  	// match: (ORL o0:(ORL                        x0:(MOVWload [i]   {s} p mem)     s0:(SHLLconst [16] x1:(MOVBload [i+2] {s} p mem)))     s1:(SHLLconst [24] x2:(MOVBload [i+3] {s} p mem)))
  7183  	// cond: x0.Uses == 1   && x1.Uses == 1   && x2.Uses == 1   && s0.Uses == 1   && s1.Uses == 1   && o0.Uses == 1   && mergePoint(b,x0,x1,x2) != nil   && clobber(x0)   && clobber(x1)   && clobber(x2)   && clobber(s0)   && clobber(s1)   && clobber(o0)
  7184  	// result: @mergePoint(b,x0,x1,x2) (MOVLload [i] {s} p mem)
  7185  	for {
  7186  		o0 := v.Args[0]
  7187  		if o0.Op != Op386ORL {
  7188  			break
  7189  		}
  7190  		x0 := o0.Args[0]
  7191  		if x0.Op != Op386MOVWload {
  7192  			break
  7193  		}
  7194  		i := x0.AuxInt
  7195  		s := x0.Aux
  7196  		p := x0.Args[0]
  7197  		mem := x0.Args[1]
  7198  		s0 := o0.Args[1]
  7199  		if s0.Op != Op386SHLLconst {
  7200  			break
  7201  		}
  7202  		if s0.AuxInt != 16 {
  7203  			break
  7204  		}
  7205  		x1 := s0.Args[0]
  7206  		if x1.Op != Op386MOVBload {
  7207  			break
  7208  		}
  7209  		if x1.AuxInt != i+2 {
  7210  			break
  7211  		}
  7212  		if x1.Aux != s {
  7213  			break
  7214  		}
  7215  		if p != x1.Args[0] {
  7216  			break
  7217  		}
  7218  		if mem != x1.Args[1] {
  7219  			break
  7220  		}
  7221  		s1 := v.Args[1]
  7222  		if s1.Op != Op386SHLLconst {
  7223  			break
  7224  		}
  7225  		if s1.AuxInt != 24 {
  7226  			break
  7227  		}
  7228  		x2 := s1.Args[0]
  7229  		if x2.Op != Op386MOVBload {
  7230  			break
  7231  		}
  7232  		if x2.AuxInt != i+3 {
  7233  			break
  7234  		}
  7235  		if x2.Aux != s {
  7236  			break
  7237  		}
  7238  		if p != x2.Args[0] {
  7239  			break
  7240  		}
  7241  		if mem != x2.Args[1] {
  7242  			break
  7243  		}
  7244  		if !(x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && o0.Uses == 1 && mergePoint(b, x0, x1, x2) != nil && clobber(x0) && clobber(x1) && clobber(x2) && clobber(s0) && clobber(s1) && clobber(o0)) {
  7245  			break
  7246  		}
  7247  		b = mergePoint(b, x0, x1, x2)
  7248  		v0 := b.NewValue0(v.Line, Op386MOVLload, config.fe.TypeUInt32())
  7249  		v.reset(OpCopy)
  7250  		v.AddArg(v0)
  7251  		v0.AuxInt = i
  7252  		v0.Aux = s
  7253  		v0.AddArg(p)
  7254  		v0.AddArg(mem)
  7255  		return true
  7256  	}
  7257  	// match: (ORL                  x0:(MOVBloadidx1 [i]   {s} p idx mem)     s0:(SHLLconst [8] x1:(MOVBloadidx1 [i+1] {s} p idx mem)))
  7258  	// cond: x0.Uses == 1   && x1.Uses == 1   && s0.Uses == 1   && mergePoint(b,x0,x1) != nil   && clobber(x0)   && clobber(x1)   && clobber(s0)
  7259  	// result: @mergePoint(b,x0,x1) (MOVWloadidx1 <v.Type> [i] {s} p idx mem)
  7260  	for {
  7261  		x0 := v.Args[0]
  7262  		if x0.Op != Op386MOVBloadidx1 {
  7263  			break
  7264  		}
  7265  		i := x0.AuxInt
  7266  		s := x0.Aux
  7267  		p := x0.Args[0]
  7268  		idx := x0.Args[1]
  7269  		mem := x0.Args[2]
  7270  		s0 := v.Args[1]
  7271  		if s0.Op != Op386SHLLconst {
  7272  			break
  7273  		}
  7274  		if s0.AuxInt != 8 {
  7275  			break
  7276  		}
  7277  		x1 := s0.Args[0]
  7278  		if x1.Op != Op386MOVBloadidx1 {
  7279  			break
  7280  		}
  7281  		if x1.AuxInt != i+1 {
  7282  			break
  7283  		}
  7284  		if x1.Aux != s {
  7285  			break
  7286  		}
  7287  		if p != x1.Args[0] {
  7288  			break
  7289  		}
  7290  		if idx != x1.Args[1] {
  7291  			break
  7292  		}
  7293  		if mem != x1.Args[2] {
  7294  			break
  7295  		}
  7296  		if !(x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0) && clobber(x1) && clobber(s0)) {
  7297  			break
  7298  		}
  7299  		b = mergePoint(b, x0, x1)
  7300  		v0 := b.NewValue0(v.Line, Op386MOVWloadidx1, v.Type)
  7301  		v.reset(OpCopy)
  7302  		v.AddArg(v0)
  7303  		v0.AuxInt = i
  7304  		v0.Aux = s
  7305  		v0.AddArg(p)
  7306  		v0.AddArg(idx)
  7307  		v0.AddArg(mem)
  7308  		return true
  7309  	}
  7310  	// match: (ORL o0:(ORL                        x0:(MOVWloadidx1 [i]   {s} p idx mem)     s0:(SHLLconst [16] x1:(MOVBloadidx1 [i+2] {s} p idx mem)))     s1:(SHLLconst [24] x2:(MOVBloadidx1 [i+3] {s} p idx mem)))
  7311  	// cond: x0.Uses == 1   && x1.Uses == 1   && x2.Uses == 1   && s0.Uses == 1   && s1.Uses == 1   && o0.Uses == 1   && mergePoint(b,x0,x1,x2) != nil   && clobber(x0)   && clobber(x1)   && clobber(x2)   && clobber(s0)   && clobber(s1)   && clobber(o0)
  7312  	// result: @mergePoint(b,x0,x1,x2) (MOVLloadidx1 <v.Type> [i] {s} p idx mem)
  7313  	for {
  7314  		o0 := v.Args[0]
  7315  		if o0.Op != Op386ORL {
  7316  			break
  7317  		}
  7318  		x0 := o0.Args[0]
  7319  		if x0.Op != Op386MOVWloadidx1 {
  7320  			break
  7321  		}
  7322  		i := x0.AuxInt
  7323  		s := x0.Aux
  7324  		p := x0.Args[0]
  7325  		idx := x0.Args[1]
  7326  		mem := x0.Args[2]
  7327  		s0 := o0.Args[1]
  7328  		if s0.Op != Op386SHLLconst {
  7329  			break
  7330  		}
  7331  		if s0.AuxInt != 16 {
  7332  			break
  7333  		}
  7334  		x1 := s0.Args[0]
  7335  		if x1.Op != Op386MOVBloadidx1 {
  7336  			break
  7337  		}
  7338  		if x1.AuxInt != i+2 {
  7339  			break
  7340  		}
  7341  		if x1.Aux != s {
  7342  			break
  7343  		}
  7344  		if p != x1.Args[0] {
  7345  			break
  7346  		}
  7347  		if idx != x1.Args[1] {
  7348  			break
  7349  		}
  7350  		if mem != x1.Args[2] {
  7351  			break
  7352  		}
  7353  		s1 := v.Args[1]
  7354  		if s1.Op != Op386SHLLconst {
  7355  			break
  7356  		}
  7357  		if s1.AuxInt != 24 {
  7358  			break
  7359  		}
  7360  		x2 := s1.Args[0]
  7361  		if x2.Op != Op386MOVBloadidx1 {
  7362  			break
  7363  		}
  7364  		if x2.AuxInt != i+3 {
  7365  			break
  7366  		}
  7367  		if x2.Aux != s {
  7368  			break
  7369  		}
  7370  		if p != x2.Args[0] {
  7371  			break
  7372  		}
  7373  		if idx != x2.Args[1] {
  7374  			break
  7375  		}
  7376  		if mem != x2.Args[2] {
  7377  			break
  7378  		}
  7379  		if !(x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && o0.Uses == 1 && mergePoint(b, x0, x1, x2) != nil && clobber(x0) && clobber(x1) && clobber(x2) && clobber(s0) && clobber(s1) && clobber(o0)) {
  7380  			break
  7381  		}
  7382  		b = mergePoint(b, x0, x1, x2)
  7383  		v0 := b.NewValue0(v.Line, Op386MOVLloadidx1, v.Type)
  7384  		v.reset(OpCopy)
  7385  		v.AddArg(v0)
  7386  		v0.AuxInt = i
  7387  		v0.Aux = s
  7388  		v0.AddArg(p)
  7389  		v0.AddArg(idx)
  7390  		v0.AddArg(mem)
  7391  		return true
  7392  	}
  7393  	return false
  7394  }
  7395  func rewriteValue386_Op386ORLconst(v *Value, config *Config) bool {
  7396  	b := v.Block
  7397  	_ = b
  7398  	// match: (ORLconst [c] x)
  7399  	// cond: int32(c)==0
  7400  	// result: x
  7401  	for {
  7402  		c := v.AuxInt
  7403  		x := v.Args[0]
  7404  		if !(int32(c) == 0) {
  7405  			break
  7406  		}
  7407  		v.reset(OpCopy)
  7408  		v.Type = x.Type
  7409  		v.AddArg(x)
  7410  		return true
  7411  	}
  7412  	// match: (ORLconst [c] _)
  7413  	// cond: int32(c)==-1
  7414  	// result: (MOVLconst [-1])
  7415  	for {
  7416  		c := v.AuxInt
  7417  		if !(int32(c) == -1) {
  7418  			break
  7419  		}
  7420  		v.reset(Op386MOVLconst)
  7421  		v.AuxInt = -1
  7422  		return true
  7423  	}
  7424  	// match: (ORLconst [c] (MOVLconst [d]))
  7425  	// cond:
  7426  	// result: (MOVLconst [c|d])
  7427  	for {
  7428  		c := v.AuxInt
  7429  		v_0 := v.Args[0]
  7430  		if v_0.Op != Op386MOVLconst {
  7431  			break
  7432  		}
  7433  		d := v_0.AuxInt
  7434  		v.reset(Op386MOVLconst)
  7435  		v.AuxInt = c | d
  7436  		return true
  7437  	}
  7438  	return false
  7439  }
  7440  func rewriteValue386_Op386ROLBconst(v *Value, config *Config) bool {
  7441  	b := v.Block
  7442  	_ = b
  7443  	// match: (ROLBconst [c] (ROLBconst [d] x))
  7444  	// cond:
  7445  	// result: (ROLBconst [(c+d)& 7] x)
  7446  	for {
  7447  		c := v.AuxInt
  7448  		v_0 := v.Args[0]
  7449  		if v_0.Op != Op386ROLBconst {
  7450  			break
  7451  		}
  7452  		d := v_0.AuxInt
  7453  		x := v_0.Args[0]
  7454  		v.reset(Op386ROLBconst)
  7455  		v.AuxInt = (c + d) & 7
  7456  		v.AddArg(x)
  7457  		return true
  7458  	}
  7459  	// match: (ROLBconst [0] x)
  7460  	// cond:
  7461  	// result: x
  7462  	for {
  7463  		if v.AuxInt != 0 {
  7464  			break
  7465  		}
  7466  		x := v.Args[0]
  7467  		v.reset(OpCopy)
  7468  		v.Type = x.Type
  7469  		v.AddArg(x)
  7470  		return true
  7471  	}
  7472  	return false
  7473  }
  7474  func rewriteValue386_Op386ROLLconst(v *Value, config *Config) bool {
  7475  	b := v.Block
  7476  	_ = b
  7477  	// match: (ROLLconst [c] (ROLLconst [d] x))
  7478  	// cond:
  7479  	// result: (ROLLconst [(c+d)&31] x)
  7480  	for {
  7481  		c := v.AuxInt
  7482  		v_0 := v.Args[0]
  7483  		if v_0.Op != Op386ROLLconst {
  7484  			break
  7485  		}
  7486  		d := v_0.AuxInt
  7487  		x := v_0.Args[0]
  7488  		v.reset(Op386ROLLconst)
  7489  		v.AuxInt = (c + d) & 31
  7490  		v.AddArg(x)
  7491  		return true
  7492  	}
  7493  	// match: (ROLLconst [0] x)
  7494  	// cond:
  7495  	// result: x
  7496  	for {
  7497  		if v.AuxInt != 0 {
  7498  			break
  7499  		}
  7500  		x := v.Args[0]
  7501  		v.reset(OpCopy)
  7502  		v.Type = x.Type
  7503  		v.AddArg(x)
  7504  		return true
  7505  	}
  7506  	return false
  7507  }
  7508  func rewriteValue386_Op386ROLWconst(v *Value, config *Config) bool {
  7509  	b := v.Block
  7510  	_ = b
  7511  	// match: (ROLWconst [c] (ROLWconst [d] x))
  7512  	// cond:
  7513  	// result: (ROLWconst [(c+d)&15] x)
  7514  	for {
  7515  		c := v.AuxInt
  7516  		v_0 := v.Args[0]
  7517  		if v_0.Op != Op386ROLWconst {
  7518  			break
  7519  		}
  7520  		d := v_0.AuxInt
  7521  		x := v_0.Args[0]
  7522  		v.reset(Op386ROLWconst)
  7523  		v.AuxInt = (c + d) & 15
  7524  		v.AddArg(x)
  7525  		return true
  7526  	}
  7527  	// match: (ROLWconst [0] x)
  7528  	// cond:
  7529  	// result: x
  7530  	for {
  7531  		if v.AuxInt != 0 {
  7532  			break
  7533  		}
  7534  		x := v.Args[0]
  7535  		v.reset(OpCopy)
  7536  		v.Type = x.Type
  7537  		v.AddArg(x)
  7538  		return true
  7539  	}
  7540  	return false
  7541  }
  7542  func rewriteValue386_Op386SARB(v *Value, config *Config) bool {
  7543  	b := v.Block
  7544  	_ = b
  7545  	// match: (SARB x (MOVLconst [c]))
  7546  	// cond:
  7547  	// result: (SARBconst [c&31] x)
  7548  	for {
  7549  		x := v.Args[0]
  7550  		v_1 := v.Args[1]
  7551  		if v_1.Op != Op386MOVLconst {
  7552  			break
  7553  		}
  7554  		c := v_1.AuxInt
  7555  		v.reset(Op386SARBconst)
  7556  		v.AuxInt = c & 31
  7557  		v.AddArg(x)
  7558  		return true
  7559  	}
  7560  	// match: (SARB x (MOVLconst [c]))
  7561  	// cond:
  7562  	// result: (SARBconst [c&31] x)
  7563  	for {
  7564  		x := v.Args[0]
  7565  		v_1 := v.Args[1]
  7566  		if v_1.Op != Op386MOVLconst {
  7567  			break
  7568  		}
  7569  		c := v_1.AuxInt
  7570  		v.reset(Op386SARBconst)
  7571  		v.AuxInt = c & 31
  7572  		v.AddArg(x)
  7573  		return true
  7574  	}
  7575  	return false
  7576  }
  7577  func rewriteValue386_Op386SARBconst(v *Value, config *Config) bool {
  7578  	b := v.Block
  7579  	_ = b
  7580  	// match: (SARBconst [c] (MOVLconst [d]))
  7581  	// cond:
  7582  	// result: (MOVLconst [d>>uint64(c)])
  7583  	for {
  7584  		c := v.AuxInt
  7585  		v_0 := v.Args[0]
  7586  		if v_0.Op != Op386MOVLconst {
  7587  			break
  7588  		}
  7589  		d := v_0.AuxInt
  7590  		v.reset(Op386MOVLconst)
  7591  		v.AuxInt = d >> uint64(c)
  7592  		return true
  7593  	}
  7594  	return false
  7595  }
  7596  func rewriteValue386_Op386SARL(v *Value, config *Config) bool {
  7597  	b := v.Block
  7598  	_ = b
  7599  	// match: (SARL x (MOVLconst [c]))
  7600  	// cond:
  7601  	// result: (SARLconst [c&31] x)
  7602  	for {
  7603  		x := v.Args[0]
  7604  		v_1 := v.Args[1]
  7605  		if v_1.Op != Op386MOVLconst {
  7606  			break
  7607  		}
  7608  		c := v_1.AuxInt
  7609  		v.reset(Op386SARLconst)
  7610  		v.AuxInt = c & 31
  7611  		v.AddArg(x)
  7612  		return true
  7613  	}
  7614  	// match: (SARL x (MOVLconst [c]))
  7615  	// cond:
  7616  	// result: (SARLconst [c&31] x)
  7617  	for {
  7618  		x := v.Args[0]
  7619  		v_1 := v.Args[1]
  7620  		if v_1.Op != Op386MOVLconst {
  7621  			break
  7622  		}
  7623  		c := v_1.AuxInt
  7624  		v.reset(Op386SARLconst)
  7625  		v.AuxInt = c & 31
  7626  		v.AddArg(x)
  7627  		return true
  7628  	}
  7629  	// match: (SARL x (ANDLconst [31] y))
  7630  	// cond:
  7631  	// result: (SARL x y)
  7632  	for {
  7633  		x := v.Args[0]
  7634  		v_1 := v.Args[1]
  7635  		if v_1.Op != Op386ANDLconst {
  7636  			break
  7637  		}
  7638  		if v_1.AuxInt != 31 {
  7639  			break
  7640  		}
  7641  		y := v_1.Args[0]
  7642  		v.reset(Op386SARL)
  7643  		v.AddArg(x)
  7644  		v.AddArg(y)
  7645  		return true
  7646  	}
  7647  	return false
  7648  }
  7649  func rewriteValue386_Op386SARLconst(v *Value, config *Config) bool {
  7650  	b := v.Block
  7651  	_ = b
  7652  	// match: (SARLconst [c] (MOVLconst [d]))
  7653  	// cond:
  7654  	// result: (MOVLconst [d>>uint64(c)])
  7655  	for {
  7656  		c := v.AuxInt
  7657  		v_0 := v.Args[0]
  7658  		if v_0.Op != Op386MOVLconst {
  7659  			break
  7660  		}
  7661  		d := v_0.AuxInt
  7662  		v.reset(Op386MOVLconst)
  7663  		v.AuxInt = d >> uint64(c)
  7664  		return true
  7665  	}
  7666  	return false
  7667  }
  7668  func rewriteValue386_Op386SARW(v *Value, config *Config) bool {
  7669  	b := v.Block
  7670  	_ = b
  7671  	// match: (SARW x (MOVLconst [c]))
  7672  	// cond:
  7673  	// result: (SARWconst [c&31] x)
  7674  	for {
  7675  		x := v.Args[0]
  7676  		v_1 := v.Args[1]
  7677  		if v_1.Op != Op386MOVLconst {
  7678  			break
  7679  		}
  7680  		c := v_1.AuxInt
  7681  		v.reset(Op386SARWconst)
  7682  		v.AuxInt = c & 31
  7683  		v.AddArg(x)
  7684  		return true
  7685  	}
  7686  	// match: (SARW x (MOVLconst [c]))
  7687  	// cond:
  7688  	// result: (SARWconst [c&31] x)
  7689  	for {
  7690  		x := v.Args[0]
  7691  		v_1 := v.Args[1]
  7692  		if v_1.Op != Op386MOVLconst {
  7693  			break
  7694  		}
  7695  		c := v_1.AuxInt
  7696  		v.reset(Op386SARWconst)
  7697  		v.AuxInt = c & 31
  7698  		v.AddArg(x)
  7699  		return true
  7700  	}
  7701  	return false
  7702  }
  7703  func rewriteValue386_Op386SARWconst(v *Value, config *Config) bool {
  7704  	b := v.Block
  7705  	_ = b
  7706  	// match: (SARWconst [c] (MOVLconst [d]))
  7707  	// cond:
  7708  	// result: (MOVLconst [d>>uint64(c)])
  7709  	for {
  7710  		c := v.AuxInt
  7711  		v_0 := v.Args[0]
  7712  		if v_0.Op != Op386MOVLconst {
  7713  			break
  7714  		}
  7715  		d := v_0.AuxInt
  7716  		v.reset(Op386MOVLconst)
  7717  		v.AuxInt = d >> uint64(c)
  7718  		return true
  7719  	}
  7720  	return false
  7721  }
  7722  func rewriteValue386_Op386SBBL(v *Value, config *Config) bool {
  7723  	b := v.Block
  7724  	_ = b
  7725  	// match: (SBBL x (MOVLconst [c]) f)
  7726  	// cond:
  7727  	// result: (SBBLconst [c] x f)
  7728  	for {
  7729  		x := v.Args[0]
  7730  		v_1 := v.Args[1]
  7731  		if v_1.Op != Op386MOVLconst {
  7732  			break
  7733  		}
  7734  		c := v_1.AuxInt
  7735  		f := v.Args[2]
  7736  		v.reset(Op386SBBLconst)
  7737  		v.AuxInt = c
  7738  		v.AddArg(x)
  7739  		v.AddArg(f)
  7740  		return true
  7741  	}
  7742  	return false
  7743  }
  7744  func rewriteValue386_Op386SBBLcarrymask(v *Value, config *Config) bool {
  7745  	b := v.Block
  7746  	_ = b
  7747  	// match: (SBBLcarrymask (FlagEQ))
  7748  	// cond:
  7749  	// result: (MOVLconst [0])
  7750  	for {
  7751  		v_0 := v.Args[0]
  7752  		if v_0.Op != Op386FlagEQ {
  7753  			break
  7754  		}
  7755  		v.reset(Op386MOVLconst)
  7756  		v.AuxInt = 0
  7757  		return true
  7758  	}
  7759  	// match: (SBBLcarrymask (FlagLT_ULT))
  7760  	// cond:
  7761  	// result: (MOVLconst [-1])
  7762  	for {
  7763  		v_0 := v.Args[0]
  7764  		if v_0.Op != Op386FlagLT_ULT {
  7765  			break
  7766  		}
  7767  		v.reset(Op386MOVLconst)
  7768  		v.AuxInt = -1
  7769  		return true
  7770  	}
  7771  	// match: (SBBLcarrymask (FlagLT_UGT))
  7772  	// cond:
  7773  	// result: (MOVLconst [0])
  7774  	for {
  7775  		v_0 := v.Args[0]
  7776  		if v_0.Op != Op386FlagLT_UGT {
  7777  			break
  7778  		}
  7779  		v.reset(Op386MOVLconst)
  7780  		v.AuxInt = 0
  7781  		return true
  7782  	}
  7783  	// match: (SBBLcarrymask (FlagGT_ULT))
  7784  	// cond:
  7785  	// result: (MOVLconst [-1])
  7786  	for {
  7787  		v_0 := v.Args[0]
  7788  		if v_0.Op != Op386FlagGT_ULT {
  7789  			break
  7790  		}
  7791  		v.reset(Op386MOVLconst)
  7792  		v.AuxInt = -1
  7793  		return true
  7794  	}
  7795  	// match: (SBBLcarrymask (FlagGT_UGT))
  7796  	// cond:
  7797  	// result: (MOVLconst [0])
  7798  	for {
  7799  		v_0 := v.Args[0]
  7800  		if v_0.Op != Op386FlagGT_UGT {
  7801  			break
  7802  		}
  7803  		v.reset(Op386MOVLconst)
  7804  		v.AuxInt = 0
  7805  		return true
  7806  	}
  7807  	return false
  7808  }
  7809  func rewriteValue386_Op386SETA(v *Value, config *Config) bool {
  7810  	b := v.Block
  7811  	_ = b
  7812  	// match: (SETA (InvertFlags x))
  7813  	// cond:
  7814  	// result: (SETB x)
  7815  	for {
  7816  		v_0 := v.Args[0]
  7817  		if v_0.Op != Op386InvertFlags {
  7818  			break
  7819  		}
  7820  		x := v_0.Args[0]
  7821  		v.reset(Op386SETB)
  7822  		v.AddArg(x)
  7823  		return true
  7824  	}
  7825  	// match: (SETA (FlagEQ))
  7826  	// cond:
  7827  	// result: (MOVLconst [0])
  7828  	for {
  7829  		v_0 := v.Args[0]
  7830  		if v_0.Op != Op386FlagEQ {
  7831  			break
  7832  		}
  7833  		v.reset(Op386MOVLconst)
  7834  		v.AuxInt = 0
  7835  		return true
  7836  	}
  7837  	// match: (SETA (FlagLT_ULT))
  7838  	// cond:
  7839  	// result: (MOVLconst [0])
  7840  	for {
  7841  		v_0 := v.Args[0]
  7842  		if v_0.Op != Op386FlagLT_ULT {
  7843  			break
  7844  		}
  7845  		v.reset(Op386MOVLconst)
  7846  		v.AuxInt = 0
  7847  		return true
  7848  	}
  7849  	// match: (SETA (FlagLT_UGT))
  7850  	// cond:
  7851  	// result: (MOVLconst [1])
  7852  	for {
  7853  		v_0 := v.Args[0]
  7854  		if v_0.Op != Op386FlagLT_UGT {
  7855  			break
  7856  		}
  7857  		v.reset(Op386MOVLconst)
  7858  		v.AuxInt = 1
  7859  		return true
  7860  	}
  7861  	// match: (SETA (FlagGT_ULT))
  7862  	// cond:
  7863  	// result: (MOVLconst [0])
  7864  	for {
  7865  		v_0 := v.Args[0]
  7866  		if v_0.Op != Op386FlagGT_ULT {
  7867  			break
  7868  		}
  7869  		v.reset(Op386MOVLconst)
  7870  		v.AuxInt = 0
  7871  		return true
  7872  	}
  7873  	// match: (SETA (FlagGT_UGT))
  7874  	// cond:
  7875  	// result: (MOVLconst [1])
  7876  	for {
  7877  		v_0 := v.Args[0]
  7878  		if v_0.Op != Op386FlagGT_UGT {
  7879  			break
  7880  		}
  7881  		v.reset(Op386MOVLconst)
  7882  		v.AuxInt = 1
  7883  		return true
  7884  	}
  7885  	return false
  7886  }
  7887  func rewriteValue386_Op386SETAE(v *Value, config *Config) bool {
  7888  	b := v.Block
  7889  	_ = b
  7890  	// match: (SETAE (InvertFlags x))
  7891  	// cond:
  7892  	// result: (SETBE x)
  7893  	for {
  7894  		v_0 := v.Args[0]
  7895  		if v_0.Op != Op386InvertFlags {
  7896  			break
  7897  		}
  7898  		x := v_0.Args[0]
  7899  		v.reset(Op386SETBE)
  7900  		v.AddArg(x)
  7901  		return true
  7902  	}
  7903  	// match: (SETAE (FlagEQ))
  7904  	// cond:
  7905  	// result: (MOVLconst [1])
  7906  	for {
  7907  		v_0 := v.Args[0]
  7908  		if v_0.Op != Op386FlagEQ {
  7909  			break
  7910  		}
  7911  		v.reset(Op386MOVLconst)
  7912  		v.AuxInt = 1
  7913  		return true
  7914  	}
  7915  	// match: (SETAE (FlagLT_ULT))
  7916  	// cond:
  7917  	// result: (MOVLconst [0])
  7918  	for {
  7919  		v_0 := v.Args[0]
  7920  		if v_0.Op != Op386FlagLT_ULT {
  7921  			break
  7922  		}
  7923  		v.reset(Op386MOVLconst)
  7924  		v.AuxInt = 0
  7925  		return true
  7926  	}
  7927  	// match: (SETAE (FlagLT_UGT))
  7928  	// cond:
  7929  	// result: (MOVLconst [1])
  7930  	for {
  7931  		v_0 := v.Args[0]
  7932  		if v_0.Op != Op386FlagLT_UGT {
  7933  			break
  7934  		}
  7935  		v.reset(Op386MOVLconst)
  7936  		v.AuxInt = 1
  7937  		return true
  7938  	}
  7939  	// match: (SETAE (FlagGT_ULT))
  7940  	// cond:
  7941  	// result: (MOVLconst [0])
  7942  	for {
  7943  		v_0 := v.Args[0]
  7944  		if v_0.Op != Op386FlagGT_ULT {
  7945  			break
  7946  		}
  7947  		v.reset(Op386MOVLconst)
  7948  		v.AuxInt = 0
  7949  		return true
  7950  	}
  7951  	// match: (SETAE (FlagGT_UGT))
  7952  	// cond:
  7953  	// result: (MOVLconst [1])
  7954  	for {
  7955  		v_0 := v.Args[0]
  7956  		if v_0.Op != Op386FlagGT_UGT {
  7957  			break
  7958  		}
  7959  		v.reset(Op386MOVLconst)
  7960  		v.AuxInt = 1
  7961  		return true
  7962  	}
  7963  	return false
  7964  }
  7965  func rewriteValue386_Op386SETB(v *Value, config *Config) bool {
  7966  	b := v.Block
  7967  	_ = b
  7968  	// match: (SETB (InvertFlags x))
  7969  	// cond:
  7970  	// result: (SETA x)
  7971  	for {
  7972  		v_0 := v.Args[0]
  7973  		if v_0.Op != Op386InvertFlags {
  7974  			break
  7975  		}
  7976  		x := v_0.Args[0]
  7977  		v.reset(Op386SETA)
  7978  		v.AddArg(x)
  7979  		return true
  7980  	}
  7981  	// match: (SETB (FlagEQ))
  7982  	// cond:
  7983  	// result: (MOVLconst [0])
  7984  	for {
  7985  		v_0 := v.Args[0]
  7986  		if v_0.Op != Op386FlagEQ {
  7987  			break
  7988  		}
  7989  		v.reset(Op386MOVLconst)
  7990  		v.AuxInt = 0
  7991  		return true
  7992  	}
  7993  	// match: (SETB (FlagLT_ULT))
  7994  	// cond:
  7995  	// result: (MOVLconst [1])
  7996  	for {
  7997  		v_0 := v.Args[0]
  7998  		if v_0.Op != Op386FlagLT_ULT {
  7999  			break
  8000  		}
  8001  		v.reset(Op386MOVLconst)
  8002  		v.AuxInt = 1
  8003  		return true
  8004  	}
  8005  	// match: (SETB (FlagLT_UGT))
  8006  	// cond:
  8007  	// result: (MOVLconst [0])
  8008  	for {
  8009  		v_0 := v.Args[0]
  8010  		if v_0.Op != Op386FlagLT_UGT {
  8011  			break
  8012  		}
  8013  		v.reset(Op386MOVLconst)
  8014  		v.AuxInt = 0
  8015  		return true
  8016  	}
  8017  	// match: (SETB (FlagGT_ULT))
  8018  	// cond:
  8019  	// result: (MOVLconst [1])
  8020  	for {
  8021  		v_0 := v.Args[0]
  8022  		if v_0.Op != Op386FlagGT_ULT {
  8023  			break
  8024  		}
  8025  		v.reset(Op386MOVLconst)
  8026  		v.AuxInt = 1
  8027  		return true
  8028  	}
  8029  	// match: (SETB (FlagGT_UGT))
  8030  	// cond:
  8031  	// result: (MOVLconst [0])
  8032  	for {
  8033  		v_0 := v.Args[0]
  8034  		if v_0.Op != Op386FlagGT_UGT {
  8035  			break
  8036  		}
  8037  		v.reset(Op386MOVLconst)
  8038  		v.AuxInt = 0
  8039  		return true
  8040  	}
  8041  	return false
  8042  }
  8043  func rewriteValue386_Op386SETBE(v *Value, config *Config) bool {
  8044  	b := v.Block
  8045  	_ = b
  8046  	// match: (SETBE (InvertFlags x))
  8047  	// cond:
  8048  	// result: (SETAE x)
  8049  	for {
  8050  		v_0 := v.Args[0]
  8051  		if v_0.Op != Op386InvertFlags {
  8052  			break
  8053  		}
  8054  		x := v_0.Args[0]
  8055  		v.reset(Op386SETAE)
  8056  		v.AddArg(x)
  8057  		return true
  8058  	}
  8059  	// match: (SETBE (FlagEQ))
  8060  	// cond:
  8061  	// result: (MOVLconst [1])
  8062  	for {
  8063  		v_0 := v.Args[0]
  8064  		if v_0.Op != Op386FlagEQ {
  8065  			break
  8066  		}
  8067  		v.reset(Op386MOVLconst)
  8068  		v.AuxInt = 1
  8069  		return true
  8070  	}
  8071  	// match: (SETBE (FlagLT_ULT))
  8072  	// cond:
  8073  	// result: (MOVLconst [1])
  8074  	for {
  8075  		v_0 := v.Args[0]
  8076  		if v_0.Op != Op386FlagLT_ULT {
  8077  			break
  8078  		}
  8079  		v.reset(Op386MOVLconst)
  8080  		v.AuxInt = 1
  8081  		return true
  8082  	}
  8083  	// match: (SETBE (FlagLT_UGT))
  8084  	// cond:
  8085  	// result: (MOVLconst [0])
  8086  	for {
  8087  		v_0 := v.Args[0]
  8088  		if v_0.Op != Op386FlagLT_UGT {
  8089  			break
  8090  		}
  8091  		v.reset(Op386MOVLconst)
  8092  		v.AuxInt = 0
  8093  		return true
  8094  	}
  8095  	// match: (SETBE (FlagGT_ULT))
  8096  	// cond:
  8097  	// result: (MOVLconst [1])
  8098  	for {
  8099  		v_0 := v.Args[0]
  8100  		if v_0.Op != Op386FlagGT_ULT {
  8101  			break
  8102  		}
  8103  		v.reset(Op386MOVLconst)
  8104  		v.AuxInt = 1
  8105  		return true
  8106  	}
  8107  	// match: (SETBE (FlagGT_UGT))
  8108  	// cond:
  8109  	// result: (MOVLconst [0])
  8110  	for {
  8111  		v_0 := v.Args[0]
  8112  		if v_0.Op != Op386FlagGT_UGT {
  8113  			break
  8114  		}
  8115  		v.reset(Op386MOVLconst)
  8116  		v.AuxInt = 0
  8117  		return true
  8118  	}
  8119  	return false
  8120  }
  8121  func rewriteValue386_Op386SETEQ(v *Value, config *Config) bool {
  8122  	b := v.Block
  8123  	_ = b
  8124  	// match: (SETEQ (InvertFlags x))
  8125  	// cond:
  8126  	// result: (SETEQ x)
  8127  	for {
  8128  		v_0 := v.Args[0]
  8129  		if v_0.Op != Op386InvertFlags {
  8130  			break
  8131  		}
  8132  		x := v_0.Args[0]
  8133  		v.reset(Op386SETEQ)
  8134  		v.AddArg(x)
  8135  		return true
  8136  	}
  8137  	// match: (SETEQ (FlagEQ))
  8138  	// cond:
  8139  	// result: (MOVLconst [1])
  8140  	for {
  8141  		v_0 := v.Args[0]
  8142  		if v_0.Op != Op386FlagEQ {
  8143  			break
  8144  		}
  8145  		v.reset(Op386MOVLconst)
  8146  		v.AuxInt = 1
  8147  		return true
  8148  	}
  8149  	// match: (SETEQ (FlagLT_ULT))
  8150  	// cond:
  8151  	// result: (MOVLconst [0])
  8152  	for {
  8153  		v_0 := v.Args[0]
  8154  		if v_0.Op != Op386FlagLT_ULT {
  8155  			break
  8156  		}
  8157  		v.reset(Op386MOVLconst)
  8158  		v.AuxInt = 0
  8159  		return true
  8160  	}
  8161  	// match: (SETEQ (FlagLT_UGT))
  8162  	// cond:
  8163  	// result: (MOVLconst [0])
  8164  	for {
  8165  		v_0 := v.Args[0]
  8166  		if v_0.Op != Op386FlagLT_UGT {
  8167  			break
  8168  		}
  8169  		v.reset(Op386MOVLconst)
  8170  		v.AuxInt = 0
  8171  		return true
  8172  	}
  8173  	// match: (SETEQ (FlagGT_ULT))
  8174  	// cond:
  8175  	// result: (MOVLconst [0])
  8176  	for {
  8177  		v_0 := v.Args[0]
  8178  		if v_0.Op != Op386FlagGT_ULT {
  8179  			break
  8180  		}
  8181  		v.reset(Op386MOVLconst)
  8182  		v.AuxInt = 0
  8183  		return true
  8184  	}
  8185  	// match: (SETEQ (FlagGT_UGT))
  8186  	// cond:
  8187  	// result: (MOVLconst [0])
  8188  	for {
  8189  		v_0 := v.Args[0]
  8190  		if v_0.Op != Op386FlagGT_UGT {
  8191  			break
  8192  		}
  8193  		v.reset(Op386MOVLconst)
  8194  		v.AuxInt = 0
  8195  		return true
  8196  	}
  8197  	return false
  8198  }
  8199  func rewriteValue386_Op386SETG(v *Value, config *Config) bool {
  8200  	b := v.Block
  8201  	_ = b
  8202  	// match: (SETG (InvertFlags x))
  8203  	// cond:
  8204  	// result: (SETL x)
  8205  	for {
  8206  		v_0 := v.Args[0]
  8207  		if v_0.Op != Op386InvertFlags {
  8208  			break
  8209  		}
  8210  		x := v_0.Args[0]
  8211  		v.reset(Op386SETL)
  8212  		v.AddArg(x)
  8213  		return true
  8214  	}
  8215  	// match: (SETG (FlagEQ))
  8216  	// cond:
  8217  	// result: (MOVLconst [0])
  8218  	for {
  8219  		v_0 := v.Args[0]
  8220  		if v_0.Op != Op386FlagEQ {
  8221  			break
  8222  		}
  8223  		v.reset(Op386MOVLconst)
  8224  		v.AuxInt = 0
  8225  		return true
  8226  	}
  8227  	// match: (SETG (FlagLT_ULT))
  8228  	// cond:
  8229  	// result: (MOVLconst [0])
  8230  	for {
  8231  		v_0 := v.Args[0]
  8232  		if v_0.Op != Op386FlagLT_ULT {
  8233  			break
  8234  		}
  8235  		v.reset(Op386MOVLconst)
  8236  		v.AuxInt = 0
  8237  		return true
  8238  	}
  8239  	// match: (SETG (FlagLT_UGT))
  8240  	// cond:
  8241  	// result: (MOVLconst [0])
  8242  	for {
  8243  		v_0 := v.Args[0]
  8244  		if v_0.Op != Op386FlagLT_UGT {
  8245  			break
  8246  		}
  8247  		v.reset(Op386MOVLconst)
  8248  		v.AuxInt = 0
  8249  		return true
  8250  	}
  8251  	// match: (SETG (FlagGT_ULT))
  8252  	// cond:
  8253  	// result: (MOVLconst [1])
  8254  	for {
  8255  		v_0 := v.Args[0]
  8256  		if v_0.Op != Op386FlagGT_ULT {
  8257  			break
  8258  		}
  8259  		v.reset(Op386MOVLconst)
  8260  		v.AuxInt = 1
  8261  		return true
  8262  	}
  8263  	// match: (SETG (FlagGT_UGT))
  8264  	// cond:
  8265  	// result: (MOVLconst [1])
  8266  	for {
  8267  		v_0 := v.Args[0]
  8268  		if v_0.Op != Op386FlagGT_UGT {
  8269  			break
  8270  		}
  8271  		v.reset(Op386MOVLconst)
  8272  		v.AuxInt = 1
  8273  		return true
  8274  	}
  8275  	return false
  8276  }
  8277  func rewriteValue386_Op386SETGE(v *Value, config *Config) bool {
  8278  	b := v.Block
  8279  	_ = b
  8280  	// match: (SETGE (InvertFlags x))
  8281  	// cond:
  8282  	// result: (SETLE x)
  8283  	for {
  8284  		v_0 := v.Args[0]
  8285  		if v_0.Op != Op386InvertFlags {
  8286  			break
  8287  		}
  8288  		x := v_0.Args[0]
  8289  		v.reset(Op386SETLE)
  8290  		v.AddArg(x)
  8291  		return true
  8292  	}
  8293  	// match: (SETGE (FlagEQ))
  8294  	// cond:
  8295  	// result: (MOVLconst [1])
  8296  	for {
  8297  		v_0 := v.Args[0]
  8298  		if v_0.Op != Op386FlagEQ {
  8299  			break
  8300  		}
  8301  		v.reset(Op386MOVLconst)
  8302  		v.AuxInt = 1
  8303  		return true
  8304  	}
  8305  	// match: (SETGE (FlagLT_ULT))
  8306  	// cond:
  8307  	// result: (MOVLconst [0])
  8308  	for {
  8309  		v_0 := v.Args[0]
  8310  		if v_0.Op != Op386FlagLT_ULT {
  8311  			break
  8312  		}
  8313  		v.reset(Op386MOVLconst)
  8314  		v.AuxInt = 0
  8315  		return true
  8316  	}
  8317  	// match: (SETGE (FlagLT_UGT))
  8318  	// cond:
  8319  	// result: (MOVLconst [0])
  8320  	for {
  8321  		v_0 := v.Args[0]
  8322  		if v_0.Op != Op386FlagLT_UGT {
  8323  			break
  8324  		}
  8325  		v.reset(Op386MOVLconst)
  8326  		v.AuxInt = 0
  8327  		return true
  8328  	}
  8329  	// match: (SETGE (FlagGT_ULT))
  8330  	// cond:
  8331  	// result: (MOVLconst [1])
  8332  	for {
  8333  		v_0 := v.Args[0]
  8334  		if v_0.Op != Op386FlagGT_ULT {
  8335  			break
  8336  		}
  8337  		v.reset(Op386MOVLconst)
  8338  		v.AuxInt = 1
  8339  		return true
  8340  	}
  8341  	// match: (SETGE (FlagGT_UGT))
  8342  	// cond:
  8343  	// result: (MOVLconst [1])
  8344  	for {
  8345  		v_0 := v.Args[0]
  8346  		if v_0.Op != Op386FlagGT_UGT {
  8347  			break
  8348  		}
  8349  		v.reset(Op386MOVLconst)
  8350  		v.AuxInt = 1
  8351  		return true
  8352  	}
  8353  	return false
  8354  }
  8355  func rewriteValue386_Op386SETL(v *Value, config *Config) bool {
  8356  	b := v.Block
  8357  	_ = b
  8358  	// match: (SETL (InvertFlags x))
  8359  	// cond:
  8360  	// result: (SETG x)
  8361  	for {
  8362  		v_0 := v.Args[0]
  8363  		if v_0.Op != Op386InvertFlags {
  8364  			break
  8365  		}
  8366  		x := v_0.Args[0]
  8367  		v.reset(Op386SETG)
  8368  		v.AddArg(x)
  8369  		return true
  8370  	}
  8371  	// match: (SETL (FlagEQ))
  8372  	// cond:
  8373  	// result: (MOVLconst [0])
  8374  	for {
  8375  		v_0 := v.Args[0]
  8376  		if v_0.Op != Op386FlagEQ {
  8377  			break
  8378  		}
  8379  		v.reset(Op386MOVLconst)
  8380  		v.AuxInt = 0
  8381  		return true
  8382  	}
  8383  	// match: (SETL (FlagLT_ULT))
  8384  	// cond:
  8385  	// result: (MOVLconst [1])
  8386  	for {
  8387  		v_0 := v.Args[0]
  8388  		if v_0.Op != Op386FlagLT_ULT {
  8389  			break
  8390  		}
  8391  		v.reset(Op386MOVLconst)
  8392  		v.AuxInt = 1
  8393  		return true
  8394  	}
  8395  	// match: (SETL (FlagLT_UGT))
  8396  	// cond:
  8397  	// result: (MOVLconst [1])
  8398  	for {
  8399  		v_0 := v.Args[0]
  8400  		if v_0.Op != Op386FlagLT_UGT {
  8401  			break
  8402  		}
  8403  		v.reset(Op386MOVLconst)
  8404  		v.AuxInt = 1
  8405  		return true
  8406  	}
  8407  	// match: (SETL (FlagGT_ULT))
  8408  	// cond:
  8409  	// result: (MOVLconst [0])
  8410  	for {
  8411  		v_0 := v.Args[0]
  8412  		if v_0.Op != Op386FlagGT_ULT {
  8413  			break
  8414  		}
  8415  		v.reset(Op386MOVLconst)
  8416  		v.AuxInt = 0
  8417  		return true
  8418  	}
  8419  	// match: (SETL (FlagGT_UGT))
  8420  	// cond:
  8421  	// result: (MOVLconst [0])
  8422  	for {
  8423  		v_0 := v.Args[0]
  8424  		if v_0.Op != Op386FlagGT_UGT {
  8425  			break
  8426  		}
  8427  		v.reset(Op386MOVLconst)
  8428  		v.AuxInt = 0
  8429  		return true
  8430  	}
  8431  	return false
  8432  }
  8433  func rewriteValue386_Op386SETLE(v *Value, config *Config) bool {
  8434  	b := v.Block
  8435  	_ = b
  8436  	// match: (SETLE (InvertFlags x))
  8437  	// cond:
  8438  	// result: (SETGE x)
  8439  	for {
  8440  		v_0 := v.Args[0]
  8441  		if v_0.Op != Op386InvertFlags {
  8442  			break
  8443  		}
  8444  		x := v_0.Args[0]
  8445  		v.reset(Op386SETGE)
  8446  		v.AddArg(x)
  8447  		return true
  8448  	}
  8449  	// match: (SETLE (FlagEQ))
  8450  	// cond:
  8451  	// result: (MOVLconst [1])
  8452  	for {
  8453  		v_0 := v.Args[0]
  8454  		if v_0.Op != Op386FlagEQ {
  8455  			break
  8456  		}
  8457  		v.reset(Op386MOVLconst)
  8458  		v.AuxInt = 1
  8459  		return true
  8460  	}
  8461  	// match: (SETLE (FlagLT_ULT))
  8462  	// cond:
  8463  	// result: (MOVLconst [1])
  8464  	for {
  8465  		v_0 := v.Args[0]
  8466  		if v_0.Op != Op386FlagLT_ULT {
  8467  			break
  8468  		}
  8469  		v.reset(Op386MOVLconst)
  8470  		v.AuxInt = 1
  8471  		return true
  8472  	}
  8473  	// match: (SETLE (FlagLT_UGT))
  8474  	// cond:
  8475  	// result: (MOVLconst [1])
  8476  	for {
  8477  		v_0 := v.Args[0]
  8478  		if v_0.Op != Op386FlagLT_UGT {
  8479  			break
  8480  		}
  8481  		v.reset(Op386MOVLconst)
  8482  		v.AuxInt = 1
  8483  		return true
  8484  	}
  8485  	// match: (SETLE (FlagGT_ULT))
  8486  	// cond:
  8487  	// result: (MOVLconst [0])
  8488  	for {
  8489  		v_0 := v.Args[0]
  8490  		if v_0.Op != Op386FlagGT_ULT {
  8491  			break
  8492  		}
  8493  		v.reset(Op386MOVLconst)
  8494  		v.AuxInt = 0
  8495  		return true
  8496  	}
  8497  	// match: (SETLE (FlagGT_UGT))
  8498  	// cond:
  8499  	// result: (MOVLconst [0])
  8500  	for {
  8501  		v_0 := v.Args[0]
  8502  		if v_0.Op != Op386FlagGT_UGT {
  8503  			break
  8504  		}
  8505  		v.reset(Op386MOVLconst)
  8506  		v.AuxInt = 0
  8507  		return true
  8508  	}
  8509  	return false
  8510  }
  8511  func rewriteValue386_Op386SETNE(v *Value, config *Config) bool {
  8512  	b := v.Block
  8513  	_ = b
  8514  	// match: (SETNE (InvertFlags x))
  8515  	// cond:
  8516  	// result: (SETNE x)
  8517  	for {
  8518  		v_0 := v.Args[0]
  8519  		if v_0.Op != Op386InvertFlags {
  8520  			break
  8521  		}
  8522  		x := v_0.Args[0]
  8523  		v.reset(Op386SETNE)
  8524  		v.AddArg(x)
  8525  		return true
  8526  	}
  8527  	// match: (SETNE (FlagEQ))
  8528  	// cond:
  8529  	// result: (MOVLconst [0])
  8530  	for {
  8531  		v_0 := v.Args[0]
  8532  		if v_0.Op != Op386FlagEQ {
  8533  			break
  8534  		}
  8535  		v.reset(Op386MOVLconst)
  8536  		v.AuxInt = 0
  8537  		return true
  8538  	}
  8539  	// match: (SETNE (FlagLT_ULT))
  8540  	// cond:
  8541  	// result: (MOVLconst [1])
  8542  	for {
  8543  		v_0 := v.Args[0]
  8544  		if v_0.Op != Op386FlagLT_ULT {
  8545  			break
  8546  		}
  8547  		v.reset(Op386MOVLconst)
  8548  		v.AuxInt = 1
  8549  		return true
  8550  	}
  8551  	// match: (SETNE (FlagLT_UGT))
  8552  	// cond:
  8553  	// result: (MOVLconst [1])
  8554  	for {
  8555  		v_0 := v.Args[0]
  8556  		if v_0.Op != Op386FlagLT_UGT {
  8557  			break
  8558  		}
  8559  		v.reset(Op386MOVLconst)
  8560  		v.AuxInt = 1
  8561  		return true
  8562  	}
  8563  	// match: (SETNE (FlagGT_ULT))
  8564  	// cond:
  8565  	// result: (MOVLconst [1])
  8566  	for {
  8567  		v_0 := v.Args[0]
  8568  		if v_0.Op != Op386FlagGT_ULT {
  8569  			break
  8570  		}
  8571  		v.reset(Op386MOVLconst)
  8572  		v.AuxInt = 1
  8573  		return true
  8574  	}
  8575  	// match: (SETNE (FlagGT_UGT))
  8576  	// cond:
  8577  	// result: (MOVLconst [1])
  8578  	for {
  8579  		v_0 := v.Args[0]
  8580  		if v_0.Op != Op386FlagGT_UGT {
  8581  			break
  8582  		}
  8583  		v.reset(Op386MOVLconst)
  8584  		v.AuxInt = 1
  8585  		return true
  8586  	}
  8587  	return false
  8588  }
  8589  func rewriteValue386_Op386SHLL(v *Value, config *Config) bool {
  8590  	b := v.Block
  8591  	_ = b
  8592  	// match: (SHLL x (MOVLconst [c]))
  8593  	// cond:
  8594  	// result: (SHLLconst [c&31] x)
  8595  	for {
  8596  		x := v.Args[0]
  8597  		v_1 := v.Args[1]
  8598  		if v_1.Op != Op386MOVLconst {
  8599  			break
  8600  		}
  8601  		c := v_1.AuxInt
  8602  		v.reset(Op386SHLLconst)
  8603  		v.AuxInt = c & 31
  8604  		v.AddArg(x)
  8605  		return true
  8606  	}
  8607  	// match: (SHLL x (MOVLconst [c]))
  8608  	// cond:
  8609  	// result: (SHLLconst [c&31] x)
  8610  	for {
  8611  		x := v.Args[0]
  8612  		v_1 := v.Args[1]
  8613  		if v_1.Op != Op386MOVLconst {
  8614  			break
  8615  		}
  8616  		c := v_1.AuxInt
  8617  		v.reset(Op386SHLLconst)
  8618  		v.AuxInt = c & 31
  8619  		v.AddArg(x)
  8620  		return true
  8621  	}
  8622  	// match: (SHLL x (ANDLconst [31] y))
  8623  	// cond:
  8624  	// result: (SHLL x y)
  8625  	for {
  8626  		x := v.Args[0]
  8627  		v_1 := v.Args[1]
  8628  		if v_1.Op != Op386ANDLconst {
  8629  			break
  8630  		}
  8631  		if v_1.AuxInt != 31 {
  8632  			break
  8633  		}
  8634  		y := v_1.Args[0]
  8635  		v.reset(Op386SHLL)
  8636  		v.AddArg(x)
  8637  		v.AddArg(y)
  8638  		return true
  8639  	}
  8640  	return false
  8641  }
  8642  func rewriteValue386_Op386SHRB(v *Value, config *Config) bool {
  8643  	b := v.Block
  8644  	_ = b
  8645  	// match: (SHRB x (MOVLconst [c]))
  8646  	// cond:
  8647  	// result: (SHRBconst [c&31] x)
  8648  	for {
  8649  		x := v.Args[0]
  8650  		v_1 := v.Args[1]
  8651  		if v_1.Op != Op386MOVLconst {
  8652  			break
  8653  		}
  8654  		c := v_1.AuxInt
  8655  		v.reset(Op386SHRBconst)
  8656  		v.AuxInt = c & 31
  8657  		v.AddArg(x)
  8658  		return true
  8659  	}
  8660  	// match: (SHRB x (MOVLconst [c]))
  8661  	// cond:
  8662  	// result: (SHRBconst [c&31] x)
  8663  	for {
  8664  		x := v.Args[0]
  8665  		v_1 := v.Args[1]
  8666  		if v_1.Op != Op386MOVLconst {
  8667  			break
  8668  		}
  8669  		c := v_1.AuxInt
  8670  		v.reset(Op386SHRBconst)
  8671  		v.AuxInt = c & 31
  8672  		v.AddArg(x)
  8673  		return true
  8674  	}
  8675  	return false
  8676  }
  8677  func rewriteValue386_Op386SHRL(v *Value, config *Config) bool {
  8678  	b := v.Block
  8679  	_ = b
  8680  	// match: (SHRL x (MOVLconst [c]))
  8681  	// cond:
  8682  	// result: (SHRLconst [c&31] x)
  8683  	for {
  8684  		x := v.Args[0]
  8685  		v_1 := v.Args[1]
  8686  		if v_1.Op != Op386MOVLconst {
  8687  			break
  8688  		}
  8689  		c := v_1.AuxInt
  8690  		v.reset(Op386SHRLconst)
  8691  		v.AuxInt = c & 31
  8692  		v.AddArg(x)
  8693  		return true
  8694  	}
  8695  	// match: (SHRL x (MOVLconst [c]))
  8696  	// cond:
  8697  	// result: (SHRLconst [c&31] x)
  8698  	for {
  8699  		x := v.Args[0]
  8700  		v_1 := v.Args[1]
  8701  		if v_1.Op != Op386MOVLconst {
  8702  			break
  8703  		}
  8704  		c := v_1.AuxInt
  8705  		v.reset(Op386SHRLconst)
  8706  		v.AuxInt = c & 31
  8707  		v.AddArg(x)
  8708  		return true
  8709  	}
  8710  	// match: (SHRL x (ANDLconst [31] y))
  8711  	// cond:
  8712  	// result: (SHRL x y)
  8713  	for {
  8714  		x := v.Args[0]
  8715  		v_1 := v.Args[1]
  8716  		if v_1.Op != Op386ANDLconst {
  8717  			break
  8718  		}
  8719  		if v_1.AuxInt != 31 {
  8720  			break
  8721  		}
  8722  		y := v_1.Args[0]
  8723  		v.reset(Op386SHRL)
  8724  		v.AddArg(x)
  8725  		v.AddArg(y)
  8726  		return true
  8727  	}
  8728  	return false
  8729  }
  8730  func rewriteValue386_Op386SHRW(v *Value, config *Config) bool {
  8731  	b := v.Block
  8732  	_ = b
  8733  	// match: (SHRW x (MOVLconst [c]))
  8734  	// cond:
  8735  	// result: (SHRWconst [c&31] x)
  8736  	for {
  8737  		x := v.Args[0]
  8738  		v_1 := v.Args[1]
  8739  		if v_1.Op != Op386MOVLconst {
  8740  			break
  8741  		}
  8742  		c := v_1.AuxInt
  8743  		v.reset(Op386SHRWconst)
  8744  		v.AuxInt = c & 31
  8745  		v.AddArg(x)
  8746  		return true
  8747  	}
  8748  	// match: (SHRW x (MOVLconst [c]))
  8749  	// cond:
  8750  	// result: (SHRWconst [c&31] x)
  8751  	for {
  8752  		x := v.Args[0]
  8753  		v_1 := v.Args[1]
  8754  		if v_1.Op != Op386MOVLconst {
  8755  			break
  8756  		}
  8757  		c := v_1.AuxInt
  8758  		v.reset(Op386SHRWconst)
  8759  		v.AuxInt = c & 31
  8760  		v.AddArg(x)
  8761  		return true
  8762  	}
  8763  	return false
  8764  }
  8765  func rewriteValue386_Op386SUBL(v *Value, config *Config) bool {
  8766  	b := v.Block
  8767  	_ = b
  8768  	// match: (SUBL x (MOVLconst [c]))
  8769  	// cond:
  8770  	// result: (SUBLconst x [c])
  8771  	for {
  8772  		x := v.Args[0]
  8773  		v_1 := v.Args[1]
  8774  		if v_1.Op != Op386MOVLconst {
  8775  			break
  8776  		}
  8777  		c := v_1.AuxInt
  8778  		v.reset(Op386SUBLconst)
  8779  		v.AuxInt = c
  8780  		v.AddArg(x)
  8781  		return true
  8782  	}
  8783  	// match: (SUBL (MOVLconst [c]) x)
  8784  	// cond:
  8785  	// result: (NEGL (SUBLconst <v.Type> x [c]))
  8786  	for {
  8787  		v_0 := v.Args[0]
  8788  		if v_0.Op != Op386MOVLconst {
  8789  			break
  8790  		}
  8791  		c := v_0.AuxInt
  8792  		x := v.Args[1]
  8793  		v.reset(Op386NEGL)
  8794  		v0 := b.NewValue0(v.Line, Op386SUBLconst, v.Type)
  8795  		v0.AuxInt = c
  8796  		v0.AddArg(x)
  8797  		v.AddArg(v0)
  8798  		return true
  8799  	}
  8800  	// match: (SUBL x x)
  8801  	// cond:
  8802  	// result: (MOVLconst [0])
  8803  	for {
  8804  		x := v.Args[0]
  8805  		if x != v.Args[1] {
  8806  			break
  8807  		}
  8808  		v.reset(Op386MOVLconst)
  8809  		v.AuxInt = 0
  8810  		return true
  8811  	}
  8812  	return false
  8813  }
  8814  func rewriteValue386_Op386SUBLcarry(v *Value, config *Config) bool {
  8815  	b := v.Block
  8816  	_ = b
  8817  	// match: (SUBLcarry x (MOVLconst [c]))
  8818  	// cond:
  8819  	// result: (SUBLconstcarry [c] x)
  8820  	for {
  8821  		x := v.Args[0]
  8822  		v_1 := v.Args[1]
  8823  		if v_1.Op != Op386MOVLconst {
  8824  			break
  8825  		}
  8826  		c := v_1.AuxInt
  8827  		v.reset(Op386SUBLconstcarry)
  8828  		v.AuxInt = c
  8829  		v.AddArg(x)
  8830  		return true
  8831  	}
  8832  	return false
  8833  }
  8834  func rewriteValue386_Op386SUBLconst(v *Value, config *Config) bool {
  8835  	b := v.Block
  8836  	_ = b
  8837  	// match: (SUBLconst [c] x)
  8838  	// cond: int32(c) == 0
  8839  	// result: x
  8840  	for {
  8841  		c := v.AuxInt
  8842  		x := v.Args[0]
  8843  		if !(int32(c) == 0) {
  8844  			break
  8845  		}
  8846  		v.reset(OpCopy)
  8847  		v.Type = x.Type
  8848  		v.AddArg(x)
  8849  		return true
  8850  	}
  8851  	// match: (SUBLconst [c] x)
  8852  	// cond:
  8853  	// result: (ADDLconst [int64(int32(-c))] x)
  8854  	for {
  8855  		c := v.AuxInt
  8856  		x := v.Args[0]
  8857  		v.reset(Op386ADDLconst)
  8858  		v.AuxInt = int64(int32(-c))
  8859  		v.AddArg(x)
  8860  		return true
  8861  	}
  8862  }
  8863  func rewriteValue386_Op386XORL(v *Value, config *Config) bool {
  8864  	b := v.Block
  8865  	_ = b
  8866  	// match: (XORL x (MOVLconst [c]))
  8867  	// cond:
  8868  	// result: (XORLconst [c] x)
  8869  	for {
  8870  		x := v.Args[0]
  8871  		v_1 := v.Args[1]
  8872  		if v_1.Op != Op386MOVLconst {
  8873  			break
  8874  		}
  8875  		c := v_1.AuxInt
  8876  		v.reset(Op386XORLconst)
  8877  		v.AuxInt = c
  8878  		v.AddArg(x)
  8879  		return true
  8880  	}
  8881  	// match: (XORL (MOVLconst [c]) x)
  8882  	// cond:
  8883  	// result: (XORLconst [c] x)
  8884  	for {
  8885  		v_0 := v.Args[0]
  8886  		if v_0.Op != Op386MOVLconst {
  8887  			break
  8888  		}
  8889  		c := v_0.AuxInt
  8890  		x := v.Args[1]
  8891  		v.reset(Op386XORLconst)
  8892  		v.AuxInt = c
  8893  		v.AddArg(x)
  8894  		return true
  8895  	}
  8896  	// match: (XORL x x)
  8897  	// cond:
  8898  	// result: (MOVLconst [0])
  8899  	for {
  8900  		x := v.Args[0]
  8901  		if x != v.Args[1] {
  8902  			break
  8903  		}
  8904  		v.reset(Op386MOVLconst)
  8905  		v.AuxInt = 0
  8906  		return true
  8907  	}
  8908  	return false
  8909  }
  8910  func rewriteValue386_Op386XORLconst(v *Value, config *Config) bool {
  8911  	b := v.Block
  8912  	_ = b
  8913  	// match: (XORLconst [c] (XORLconst [d] x))
  8914  	// cond:
  8915  	// result: (XORLconst [c ^ d] x)
  8916  	for {
  8917  		c := v.AuxInt
  8918  		v_0 := v.Args[0]
  8919  		if v_0.Op != Op386XORLconst {
  8920  			break
  8921  		}
  8922  		d := v_0.AuxInt
  8923  		x := v_0.Args[0]
  8924  		v.reset(Op386XORLconst)
  8925  		v.AuxInt = c ^ d
  8926  		v.AddArg(x)
  8927  		return true
  8928  	}
  8929  	// match: (XORLconst [c] x)
  8930  	// cond: int32(c)==0
  8931  	// result: x
  8932  	for {
  8933  		c := v.AuxInt
  8934  		x := v.Args[0]
  8935  		if !(int32(c) == 0) {
  8936  			break
  8937  		}
  8938  		v.reset(OpCopy)
  8939  		v.Type = x.Type
  8940  		v.AddArg(x)
  8941  		return true
  8942  	}
  8943  	// match: (XORLconst [c] (MOVLconst [d]))
  8944  	// cond:
  8945  	// result: (MOVLconst [c^d])
  8946  	for {
  8947  		c := v.AuxInt
  8948  		v_0 := v.Args[0]
  8949  		if v_0.Op != Op386MOVLconst {
  8950  			break
  8951  		}
  8952  		d := v_0.AuxInt
  8953  		v.reset(Op386MOVLconst)
  8954  		v.AuxInt = c ^ d
  8955  		return true
  8956  	}
  8957  	return false
  8958  }
  8959  func rewriteValue386_OpAdd16(v *Value, config *Config) bool {
  8960  	b := v.Block
  8961  	_ = b
  8962  	// match: (Add16  x y)
  8963  	// cond:
  8964  	// result: (ADDL  x y)
  8965  	for {
  8966  		x := v.Args[0]
  8967  		y := v.Args[1]
  8968  		v.reset(Op386ADDL)
  8969  		v.AddArg(x)
  8970  		v.AddArg(y)
  8971  		return true
  8972  	}
  8973  }
  8974  func rewriteValue386_OpAdd32(v *Value, config *Config) bool {
  8975  	b := v.Block
  8976  	_ = b
  8977  	// match: (Add32  x y)
  8978  	// cond:
  8979  	// result: (ADDL  x y)
  8980  	for {
  8981  		x := v.Args[0]
  8982  		y := v.Args[1]
  8983  		v.reset(Op386ADDL)
  8984  		v.AddArg(x)
  8985  		v.AddArg(y)
  8986  		return true
  8987  	}
  8988  }
  8989  func rewriteValue386_OpAdd32F(v *Value, config *Config) bool {
  8990  	b := v.Block
  8991  	_ = b
  8992  	// match: (Add32F x y)
  8993  	// cond:
  8994  	// result: (ADDSS x y)
  8995  	for {
  8996  		x := v.Args[0]
  8997  		y := v.Args[1]
  8998  		v.reset(Op386ADDSS)
  8999  		v.AddArg(x)
  9000  		v.AddArg(y)
  9001  		return true
  9002  	}
  9003  }
  9004  func rewriteValue386_OpAdd32carry(v *Value, config *Config) bool {
  9005  	b := v.Block
  9006  	_ = b
  9007  	// match: (Add32carry x y)
  9008  	// cond:
  9009  	// result: (ADDLcarry x y)
  9010  	for {
  9011  		x := v.Args[0]
  9012  		y := v.Args[1]
  9013  		v.reset(Op386ADDLcarry)
  9014  		v.AddArg(x)
  9015  		v.AddArg(y)
  9016  		return true
  9017  	}
  9018  }
  9019  func rewriteValue386_OpAdd32withcarry(v *Value, config *Config) bool {
  9020  	b := v.Block
  9021  	_ = b
  9022  	// match: (Add32withcarry x y c)
  9023  	// cond:
  9024  	// result: (ADCL x y c)
  9025  	for {
  9026  		x := v.Args[0]
  9027  		y := v.Args[1]
  9028  		c := v.Args[2]
  9029  		v.reset(Op386ADCL)
  9030  		v.AddArg(x)
  9031  		v.AddArg(y)
  9032  		v.AddArg(c)
  9033  		return true
  9034  	}
  9035  }
  9036  func rewriteValue386_OpAdd64F(v *Value, config *Config) bool {
  9037  	b := v.Block
  9038  	_ = b
  9039  	// match: (Add64F x y)
  9040  	// cond:
  9041  	// result: (ADDSD x y)
  9042  	for {
  9043  		x := v.Args[0]
  9044  		y := v.Args[1]
  9045  		v.reset(Op386ADDSD)
  9046  		v.AddArg(x)
  9047  		v.AddArg(y)
  9048  		return true
  9049  	}
  9050  }
  9051  func rewriteValue386_OpAdd8(v *Value, config *Config) bool {
  9052  	b := v.Block
  9053  	_ = b
  9054  	// match: (Add8   x y)
  9055  	// cond:
  9056  	// result: (ADDL  x y)
  9057  	for {
  9058  		x := v.Args[0]
  9059  		y := v.Args[1]
  9060  		v.reset(Op386ADDL)
  9061  		v.AddArg(x)
  9062  		v.AddArg(y)
  9063  		return true
  9064  	}
  9065  }
  9066  func rewriteValue386_OpAddPtr(v *Value, config *Config) bool {
  9067  	b := v.Block
  9068  	_ = b
  9069  	// match: (AddPtr x y)
  9070  	// cond:
  9071  	// result: (ADDL  x y)
  9072  	for {
  9073  		x := v.Args[0]
  9074  		y := v.Args[1]
  9075  		v.reset(Op386ADDL)
  9076  		v.AddArg(x)
  9077  		v.AddArg(y)
  9078  		return true
  9079  	}
  9080  }
  9081  func rewriteValue386_OpAddr(v *Value, config *Config) bool {
  9082  	b := v.Block
  9083  	_ = b
  9084  	// match: (Addr {sym} base)
  9085  	// cond:
  9086  	// result: (LEAL {sym} base)
  9087  	for {
  9088  		sym := v.Aux
  9089  		base := v.Args[0]
  9090  		v.reset(Op386LEAL)
  9091  		v.Aux = sym
  9092  		v.AddArg(base)
  9093  		return true
  9094  	}
  9095  }
  9096  func rewriteValue386_OpAnd16(v *Value, config *Config) bool {
  9097  	b := v.Block
  9098  	_ = b
  9099  	// match: (And16 x y)
  9100  	// cond:
  9101  	// result: (ANDL x y)
  9102  	for {
  9103  		x := v.Args[0]
  9104  		y := v.Args[1]
  9105  		v.reset(Op386ANDL)
  9106  		v.AddArg(x)
  9107  		v.AddArg(y)
  9108  		return true
  9109  	}
  9110  }
  9111  func rewriteValue386_OpAnd32(v *Value, config *Config) bool {
  9112  	b := v.Block
  9113  	_ = b
  9114  	// match: (And32 x y)
  9115  	// cond:
  9116  	// result: (ANDL x y)
  9117  	for {
  9118  		x := v.Args[0]
  9119  		y := v.Args[1]
  9120  		v.reset(Op386ANDL)
  9121  		v.AddArg(x)
  9122  		v.AddArg(y)
  9123  		return true
  9124  	}
  9125  }
  9126  func rewriteValue386_OpAnd8(v *Value, config *Config) bool {
  9127  	b := v.Block
  9128  	_ = b
  9129  	// match: (And8  x y)
  9130  	// cond:
  9131  	// result: (ANDL x y)
  9132  	for {
  9133  		x := v.Args[0]
  9134  		y := v.Args[1]
  9135  		v.reset(Op386ANDL)
  9136  		v.AddArg(x)
  9137  		v.AddArg(y)
  9138  		return true
  9139  	}
  9140  }
  9141  func rewriteValue386_OpAndB(v *Value, config *Config) bool {
  9142  	b := v.Block
  9143  	_ = b
  9144  	// match: (AndB x y)
  9145  	// cond:
  9146  	// result: (ANDL x y)
  9147  	for {
  9148  		x := v.Args[0]
  9149  		y := v.Args[1]
  9150  		v.reset(Op386ANDL)
  9151  		v.AddArg(x)
  9152  		v.AddArg(y)
  9153  		return true
  9154  	}
  9155  }
  9156  func rewriteValue386_OpBswap32(v *Value, config *Config) bool {
  9157  	b := v.Block
  9158  	_ = b
  9159  	// match: (Bswap32 x)
  9160  	// cond:
  9161  	// result: (BSWAPL x)
  9162  	for {
  9163  		x := v.Args[0]
  9164  		v.reset(Op386BSWAPL)
  9165  		v.AddArg(x)
  9166  		return true
  9167  	}
  9168  }
  9169  func rewriteValue386_OpClosureCall(v *Value, config *Config) bool {
  9170  	b := v.Block
  9171  	_ = b
  9172  	// match: (ClosureCall [argwid] entry closure mem)
  9173  	// cond:
  9174  	// result: (CALLclosure [argwid] entry closure mem)
  9175  	for {
  9176  		argwid := v.AuxInt
  9177  		entry := v.Args[0]
  9178  		closure := v.Args[1]
  9179  		mem := v.Args[2]
  9180  		v.reset(Op386CALLclosure)
  9181  		v.AuxInt = argwid
  9182  		v.AddArg(entry)
  9183  		v.AddArg(closure)
  9184  		v.AddArg(mem)
  9185  		return true
  9186  	}
  9187  }
  9188  func rewriteValue386_OpCom16(v *Value, config *Config) bool {
  9189  	b := v.Block
  9190  	_ = b
  9191  	// match: (Com16 x)
  9192  	// cond:
  9193  	// result: (NOTL x)
  9194  	for {
  9195  		x := v.Args[0]
  9196  		v.reset(Op386NOTL)
  9197  		v.AddArg(x)
  9198  		return true
  9199  	}
  9200  }
  9201  func rewriteValue386_OpCom32(v *Value, config *Config) bool {
  9202  	b := v.Block
  9203  	_ = b
  9204  	// match: (Com32 x)
  9205  	// cond:
  9206  	// result: (NOTL x)
  9207  	for {
  9208  		x := v.Args[0]
  9209  		v.reset(Op386NOTL)
  9210  		v.AddArg(x)
  9211  		return true
  9212  	}
  9213  }
  9214  func rewriteValue386_OpCom8(v *Value, config *Config) bool {
  9215  	b := v.Block
  9216  	_ = b
  9217  	// match: (Com8  x)
  9218  	// cond:
  9219  	// result: (NOTL x)
  9220  	for {
  9221  		x := v.Args[0]
  9222  		v.reset(Op386NOTL)
  9223  		v.AddArg(x)
  9224  		return true
  9225  	}
  9226  }
  9227  func rewriteValue386_OpConst16(v *Value, config *Config) bool {
  9228  	b := v.Block
  9229  	_ = b
  9230  	// match: (Const16  [val])
  9231  	// cond:
  9232  	// result: (MOVLconst [val])
  9233  	for {
  9234  		val := v.AuxInt
  9235  		v.reset(Op386MOVLconst)
  9236  		v.AuxInt = val
  9237  		return true
  9238  	}
  9239  }
  9240  func rewriteValue386_OpConst32(v *Value, config *Config) bool {
  9241  	b := v.Block
  9242  	_ = b
  9243  	// match: (Const32  [val])
  9244  	// cond:
  9245  	// result: (MOVLconst [val])
  9246  	for {
  9247  		val := v.AuxInt
  9248  		v.reset(Op386MOVLconst)
  9249  		v.AuxInt = val
  9250  		return true
  9251  	}
  9252  }
  9253  func rewriteValue386_OpConst32F(v *Value, config *Config) bool {
  9254  	b := v.Block
  9255  	_ = b
  9256  	// match: (Const32F [val])
  9257  	// cond:
  9258  	// result: (MOVSSconst [val])
  9259  	for {
  9260  		val := v.AuxInt
  9261  		v.reset(Op386MOVSSconst)
  9262  		v.AuxInt = val
  9263  		return true
  9264  	}
  9265  }
  9266  func rewriteValue386_OpConst64F(v *Value, config *Config) bool {
  9267  	b := v.Block
  9268  	_ = b
  9269  	// match: (Const64F [val])
  9270  	// cond:
  9271  	// result: (MOVSDconst [val])
  9272  	for {
  9273  		val := v.AuxInt
  9274  		v.reset(Op386MOVSDconst)
  9275  		v.AuxInt = val
  9276  		return true
  9277  	}
  9278  }
  9279  func rewriteValue386_OpConst8(v *Value, config *Config) bool {
  9280  	b := v.Block
  9281  	_ = b
  9282  	// match: (Const8   [val])
  9283  	// cond:
  9284  	// result: (MOVLconst [val])
  9285  	for {
  9286  		val := v.AuxInt
  9287  		v.reset(Op386MOVLconst)
  9288  		v.AuxInt = val
  9289  		return true
  9290  	}
  9291  }
  9292  func rewriteValue386_OpConstBool(v *Value, config *Config) bool {
  9293  	b := v.Block
  9294  	_ = b
  9295  	// match: (ConstBool [b])
  9296  	// cond:
  9297  	// result: (MOVLconst [b])
  9298  	for {
  9299  		b := v.AuxInt
  9300  		v.reset(Op386MOVLconst)
  9301  		v.AuxInt = b
  9302  		return true
  9303  	}
  9304  }
  9305  func rewriteValue386_OpConstNil(v *Value, config *Config) bool {
  9306  	b := v.Block
  9307  	_ = b
  9308  	// match: (ConstNil)
  9309  	// cond:
  9310  	// result: (MOVLconst [0])
  9311  	for {
  9312  		v.reset(Op386MOVLconst)
  9313  		v.AuxInt = 0
  9314  		return true
  9315  	}
  9316  }
  9317  func rewriteValue386_OpConvert(v *Value, config *Config) bool {
  9318  	b := v.Block
  9319  	_ = b
  9320  	// match: (Convert <t> x mem)
  9321  	// cond:
  9322  	// result: (MOVLconvert <t> x mem)
  9323  	for {
  9324  		t := v.Type
  9325  		x := v.Args[0]
  9326  		mem := v.Args[1]
  9327  		v.reset(Op386MOVLconvert)
  9328  		v.Type = t
  9329  		v.AddArg(x)
  9330  		v.AddArg(mem)
  9331  		return true
  9332  	}
  9333  }
  9334  func rewriteValue386_OpCvt32Fto32(v *Value, config *Config) bool {
  9335  	b := v.Block
  9336  	_ = b
  9337  	// match: (Cvt32Fto32 x)
  9338  	// cond:
  9339  	// result: (CVTTSS2SL x)
  9340  	for {
  9341  		x := v.Args[0]
  9342  		v.reset(Op386CVTTSS2SL)
  9343  		v.AddArg(x)
  9344  		return true
  9345  	}
  9346  }
  9347  func rewriteValue386_OpCvt32Fto64F(v *Value, config *Config) bool {
  9348  	b := v.Block
  9349  	_ = b
  9350  	// match: (Cvt32Fto64F x)
  9351  	// cond:
  9352  	// result: (CVTSS2SD x)
  9353  	for {
  9354  		x := v.Args[0]
  9355  		v.reset(Op386CVTSS2SD)
  9356  		v.AddArg(x)
  9357  		return true
  9358  	}
  9359  }
  9360  func rewriteValue386_OpCvt32to32F(v *Value, config *Config) bool {
  9361  	b := v.Block
  9362  	_ = b
  9363  	// match: (Cvt32to32F x)
  9364  	// cond:
  9365  	// result: (CVTSL2SS x)
  9366  	for {
  9367  		x := v.Args[0]
  9368  		v.reset(Op386CVTSL2SS)
  9369  		v.AddArg(x)
  9370  		return true
  9371  	}
  9372  }
  9373  func rewriteValue386_OpCvt32to64F(v *Value, config *Config) bool {
  9374  	b := v.Block
  9375  	_ = b
  9376  	// match: (Cvt32to64F x)
  9377  	// cond:
  9378  	// result: (CVTSL2SD x)
  9379  	for {
  9380  		x := v.Args[0]
  9381  		v.reset(Op386CVTSL2SD)
  9382  		v.AddArg(x)
  9383  		return true
  9384  	}
  9385  }
  9386  func rewriteValue386_OpCvt64Fto32(v *Value, config *Config) bool {
  9387  	b := v.Block
  9388  	_ = b
  9389  	// match: (Cvt64Fto32 x)
  9390  	// cond:
  9391  	// result: (CVTTSD2SL x)
  9392  	for {
  9393  		x := v.Args[0]
  9394  		v.reset(Op386CVTTSD2SL)
  9395  		v.AddArg(x)
  9396  		return true
  9397  	}
  9398  }
  9399  func rewriteValue386_OpCvt64Fto32F(v *Value, config *Config) bool {
  9400  	b := v.Block
  9401  	_ = b
  9402  	// match: (Cvt64Fto32F x)
  9403  	// cond:
  9404  	// result: (CVTSD2SS x)
  9405  	for {
  9406  		x := v.Args[0]
  9407  		v.reset(Op386CVTSD2SS)
  9408  		v.AddArg(x)
  9409  		return true
  9410  	}
  9411  }
  9412  func rewriteValue386_OpDeferCall(v *Value, config *Config) bool {
  9413  	b := v.Block
  9414  	_ = b
  9415  	// match: (DeferCall [argwid] mem)
  9416  	// cond:
  9417  	// result: (CALLdefer [argwid] mem)
  9418  	for {
  9419  		argwid := v.AuxInt
  9420  		mem := v.Args[0]
  9421  		v.reset(Op386CALLdefer)
  9422  		v.AuxInt = argwid
  9423  		v.AddArg(mem)
  9424  		return true
  9425  	}
  9426  }
  9427  func rewriteValue386_OpDiv16(v *Value, config *Config) bool {
  9428  	b := v.Block
  9429  	_ = b
  9430  	// match: (Div16  x y)
  9431  	// cond:
  9432  	// result: (DIVW  x y)
  9433  	for {
  9434  		x := v.Args[0]
  9435  		y := v.Args[1]
  9436  		v.reset(Op386DIVW)
  9437  		v.AddArg(x)
  9438  		v.AddArg(y)
  9439  		return true
  9440  	}
  9441  }
  9442  func rewriteValue386_OpDiv16u(v *Value, config *Config) bool {
  9443  	b := v.Block
  9444  	_ = b
  9445  	// match: (Div16u x y)
  9446  	// cond:
  9447  	// result: (DIVWU x y)
  9448  	for {
  9449  		x := v.Args[0]
  9450  		y := v.Args[1]
  9451  		v.reset(Op386DIVWU)
  9452  		v.AddArg(x)
  9453  		v.AddArg(y)
  9454  		return true
  9455  	}
  9456  }
  9457  func rewriteValue386_OpDiv32(v *Value, config *Config) bool {
  9458  	b := v.Block
  9459  	_ = b
  9460  	// match: (Div32  x y)
  9461  	// cond:
  9462  	// result: (DIVL  x y)
  9463  	for {
  9464  		x := v.Args[0]
  9465  		y := v.Args[1]
  9466  		v.reset(Op386DIVL)
  9467  		v.AddArg(x)
  9468  		v.AddArg(y)
  9469  		return true
  9470  	}
  9471  }
  9472  func rewriteValue386_OpDiv32F(v *Value, config *Config) bool {
  9473  	b := v.Block
  9474  	_ = b
  9475  	// match: (Div32F x y)
  9476  	// cond:
  9477  	// result: (DIVSS x y)
  9478  	for {
  9479  		x := v.Args[0]
  9480  		y := v.Args[1]
  9481  		v.reset(Op386DIVSS)
  9482  		v.AddArg(x)
  9483  		v.AddArg(y)
  9484  		return true
  9485  	}
  9486  }
  9487  func rewriteValue386_OpDiv32u(v *Value, config *Config) bool {
  9488  	b := v.Block
  9489  	_ = b
  9490  	// match: (Div32u x y)
  9491  	// cond:
  9492  	// result: (DIVLU x y)
  9493  	for {
  9494  		x := v.Args[0]
  9495  		y := v.Args[1]
  9496  		v.reset(Op386DIVLU)
  9497  		v.AddArg(x)
  9498  		v.AddArg(y)
  9499  		return true
  9500  	}
  9501  }
  9502  func rewriteValue386_OpDiv64F(v *Value, config *Config) bool {
  9503  	b := v.Block
  9504  	_ = b
  9505  	// match: (Div64F x y)
  9506  	// cond:
  9507  	// result: (DIVSD x y)
  9508  	for {
  9509  		x := v.Args[0]
  9510  		y := v.Args[1]
  9511  		v.reset(Op386DIVSD)
  9512  		v.AddArg(x)
  9513  		v.AddArg(y)
  9514  		return true
  9515  	}
  9516  }
  9517  func rewriteValue386_OpDiv8(v *Value, config *Config) bool {
  9518  	b := v.Block
  9519  	_ = b
  9520  	// match: (Div8   x y)
  9521  	// cond:
  9522  	// result: (DIVW  (SignExt8to16 x) (SignExt8to16 y))
  9523  	for {
  9524  		x := v.Args[0]
  9525  		y := v.Args[1]
  9526  		v.reset(Op386DIVW)
  9527  		v0 := b.NewValue0(v.Line, OpSignExt8to16, config.fe.TypeInt16())
  9528  		v0.AddArg(x)
  9529  		v.AddArg(v0)
  9530  		v1 := b.NewValue0(v.Line, OpSignExt8to16, config.fe.TypeInt16())
  9531  		v1.AddArg(y)
  9532  		v.AddArg(v1)
  9533  		return true
  9534  	}
  9535  }
  9536  func rewriteValue386_OpDiv8u(v *Value, config *Config) bool {
  9537  	b := v.Block
  9538  	_ = b
  9539  	// match: (Div8u  x y)
  9540  	// cond:
  9541  	// result: (DIVWU (ZeroExt8to16 x) (ZeroExt8to16 y))
  9542  	for {
  9543  		x := v.Args[0]
  9544  		y := v.Args[1]
  9545  		v.reset(Op386DIVWU)
  9546  		v0 := b.NewValue0(v.Line, OpZeroExt8to16, config.fe.TypeUInt16())
  9547  		v0.AddArg(x)
  9548  		v.AddArg(v0)
  9549  		v1 := b.NewValue0(v.Line, OpZeroExt8to16, config.fe.TypeUInt16())
  9550  		v1.AddArg(y)
  9551  		v.AddArg(v1)
  9552  		return true
  9553  	}
  9554  }
  9555  func rewriteValue386_OpEq16(v *Value, config *Config) bool {
  9556  	b := v.Block
  9557  	_ = b
  9558  	// match: (Eq16  x y)
  9559  	// cond:
  9560  	// result: (SETEQ (CMPW x y))
  9561  	for {
  9562  		x := v.Args[0]
  9563  		y := v.Args[1]
  9564  		v.reset(Op386SETEQ)
  9565  		v0 := b.NewValue0(v.Line, Op386CMPW, TypeFlags)
  9566  		v0.AddArg(x)
  9567  		v0.AddArg(y)
  9568  		v.AddArg(v0)
  9569  		return true
  9570  	}
  9571  }
  9572  func rewriteValue386_OpEq32(v *Value, config *Config) bool {
  9573  	b := v.Block
  9574  	_ = b
  9575  	// match: (Eq32  x y)
  9576  	// cond:
  9577  	// result: (SETEQ (CMPL x y))
  9578  	for {
  9579  		x := v.Args[0]
  9580  		y := v.Args[1]
  9581  		v.reset(Op386SETEQ)
  9582  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
  9583  		v0.AddArg(x)
  9584  		v0.AddArg(y)
  9585  		v.AddArg(v0)
  9586  		return true
  9587  	}
  9588  }
  9589  func rewriteValue386_OpEq32F(v *Value, config *Config) bool {
  9590  	b := v.Block
  9591  	_ = b
  9592  	// match: (Eq32F x y)
  9593  	// cond:
  9594  	// result: (SETEQF (UCOMISS x y))
  9595  	for {
  9596  		x := v.Args[0]
  9597  		y := v.Args[1]
  9598  		v.reset(Op386SETEQF)
  9599  		v0 := b.NewValue0(v.Line, Op386UCOMISS, TypeFlags)
  9600  		v0.AddArg(x)
  9601  		v0.AddArg(y)
  9602  		v.AddArg(v0)
  9603  		return true
  9604  	}
  9605  }
  9606  func rewriteValue386_OpEq64F(v *Value, config *Config) bool {
  9607  	b := v.Block
  9608  	_ = b
  9609  	// match: (Eq64F x y)
  9610  	// cond:
  9611  	// result: (SETEQF (UCOMISD x y))
  9612  	for {
  9613  		x := v.Args[0]
  9614  		y := v.Args[1]
  9615  		v.reset(Op386SETEQF)
  9616  		v0 := b.NewValue0(v.Line, Op386UCOMISD, TypeFlags)
  9617  		v0.AddArg(x)
  9618  		v0.AddArg(y)
  9619  		v.AddArg(v0)
  9620  		return true
  9621  	}
  9622  }
  9623  func rewriteValue386_OpEq8(v *Value, config *Config) bool {
  9624  	b := v.Block
  9625  	_ = b
  9626  	// match: (Eq8   x y)
  9627  	// cond:
  9628  	// result: (SETEQ (CMPB x y))
  9629  	for {
  9630  		x := v.Args[0]
  9631  		y := v.Args[1]
  9632  		v.reset(Op386SETEQ)
  9633  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
  9634  		v0.AddArg(x)
  9635  		v0.AddArg(y)
  9636  		v.AddArg(v0)
  9637  		return true
  9638  	}
  9639  }
  9640  func rewriteValue386_OpEqB(v *Value, config *Config) bool {
  9641  	b := v.Block
  9642  	_ = b
  9643  	// match: (EqB   x y)
  9644  	// cond:
  9645  	// result: (SETEQ (CMPB x y))
  9646  	for {
  9647  		x := v.Args[0]
  9648  		y := v.Args[1]
  9649  		v.reset(Op386SETEQ)
  9650  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
  9651  		v0.AddArg(x)
  9652  		v0.AddArg(y)
  9653  		v.AddArg(v0)
  9654  		return true
  9655  	}
  9656  }
  9657  func rewriteValue386_OpEqPtr(v *Value, config *Config) bool {
  9658  	b := v.Block
  9659  	_ = b
  9660  	// match: (EqPtr x y)
  9661  	// cond:
  9662  	// result: (SETEQ (CMPL x y))
  9663  	for {
  9664  		x := v.Args[0]
  9665  		y := v.Args[1]
  9666  		v.reset(Op386SETEQ)
  9667  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
  9668  		v0.AddArg(x)
  9669  		v0.AddArg(y)
  9670  		v.AddArg(v0)
  9671  		return true
  9672  	}
  9673  }
  9674  func rewriteValue386_OpGeq16(v *Value, config *Config) bool {
  9675  	b := v.Block
  9676  	_ = b
  9677  	// match: (Geq16  x y)
  9678  	// cond:
  9679  	// result: (SETGE (CMPW x y))
  9680  	for {
  9681  		x := v.Args[0]
  9682  		y := v.Args[1]
  9683  		v.reset(Op386SETGE)
  9684  		v0 := b.NewValue0(v.Line, Op386CMPW, TypeFlags)
  9685  		v0.AddArg(x)
  9686  		v0.AddArg(y)
  9687  		v.AddArg(v0)
  9688  		return true
  9689  	}
  9690  }
  9691  func rewriteValue386_OpGeq16U(v *Value, config *Config) bool {
  9692  	b := v.Block
  9693  	_ = b
  9694  	// match: (Geq16U x y)
  9695  	// cond:
  9696  	// result: (SETAE (CMPW x y))
  9697  	for {
  9698  		x := v.Args[0]
  9699  		y := v.Args[1]
  9700  		v.reset(Op386SETAE)
  9701  		v0 := b.NewValue0(v.Line, Op386CMPW, TypeFlags)
  9702  		v0.AddArg(x)
  9703  		v0.AddArg(y)
  9704  		v.AddArg(v0)
  9705  		return true
  9706  	}
  9707  }
  9708  func rewriteValue386_OpGeq32(v *Value, config *Config) bool {
  9709  	b := v.Block
  9710  	_ = b
  9711  	// match: (Geq32  x y)
  9712  	// cond:
  9713  	// result: (SETGE (CMPL x y))
  9714  	for {
  9715  		x := v.Args[0]
  9716  		y := v.Args[1]
  9717  		v.reset(Op386SETGE)
  9718  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
  9719  		v0.AddArg(x)
  9720  		v0.AddArg(y)
  9721  		v.AddArg(v0)
  9722  		return true
  9723  	}
  9724  }
  9725  func rewriteValue386_OpGeq32F(v *Value, config *Config) bool {
  9726  	b := v.Block
  9727  	_ = b
  9728  	// match: (Geq32F x y)
  9729  	// cond:
  9730  	// result: (SETGEF (UCOMISS x y))
  9731  	for {
  9732  		x := v.Args[0]
  9733  		y := v.Args[1]
  9734  		v.reset(Op386SETGEF)
  9735  		v0 := b.NewValue0(v.Line, Op386UCOMISS, TypeFlags)
  9736  		v0.AddArg(x)
  9737  		v0.AddArg(y)
  9738  		v.AddArg(v0)
  9739  		return true
  9740  	}
  9741  }
  9742  func rewriteValue386_OpGeq32U(v *Value, config *Config) bool {
  9743  	b := v.Block
  9744  	_ = b
  9745  	// match: (Geq32U x y)
  9746  	// cond:
  9747  	// result: (SETAE (CMPL x y))
  9748  	for {
  9749  		x := v.Args[0]
  9750  		y := v.Args[1]
  9751  		v.reset(Op386SETAE)
  9752  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
  9753  		v0.AddArg(x)
  9754  		v0.AddArg(y)
  9755  		v.AddArg(v0)
  9756  		return true
  9757  	}
  9758  }
  9759  func rewriteValue386_OpGeq64F(v *Value, config *Config) bool {
  9760  	b := v.Block
  9761  	_ = b
  9762  	// match: (Geq64F x y)
  9763  	// cond:
  9764  	// result: (SETGEF (UCOMISD x y))
  9765  	for {
  9766  		x := v.Args[0]
  9767  		y := v.Args[1]
  9768  		v.reset(Op386SETGEF)
  9769  		v0 := b.NewValue0(v.Line, Op386UCOMISD, TypeFlags)
  9770  		v0.AddArg(x)
  9771  		v0.AddArg(y)
  9772  		v.AddArg(v0)
  9773  		return true
  9774  	}
  9775  }
  9776  func rewriteValue386_OpGeq8(v *Value, config *Config) bool {
  9777  	b := v.Block
  9778  	_ = b
  9779  	// match: (Geq8   x y)
  9780  	// cond:
  9781  	// result: (SETGE (CMPB x y))
  9782  	for {
  9783  		x := v.Args[0]
  9784  		y := v.Args[1]
  9785  		v.reset(Op386SETGE)
  9786  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
  9787  		v0.AddArg(x)
  9788  		v0.AddArg(y)
  9789  		v.AddArg(v0)
  9790  		return true
  9791  	}
  9792  }
  9793  func rewriteValue386_OpGeq8U(v *Value, config *Config) bool {
  9794  	b := v.Block
  9795  	_ = b
  9796  	// match: (Geq8U  x y)
  9797  	// cond:
  9798  	// result: (SETAE (CMPB x y))
  9799  	for {
  9800  		x := v.Args[0]
  9801  		y := v.Args[1]
  9802  		v.reset(Op386SETAE)
  9803  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
  9804  		v0.AddArg(x)
  9805  		v0.AddArg(y)
  9806  		v.AddArg(v0)
  9807  		return true
  9808  	}
  9809  }
  9810  func rewriteValue386_OpGetClosurePtr(v *Value, config *Config) bool {
  9811  	b := v.Block
  9812  	_ = b
  9813  	// match: (GetClosurePtr)
  9814  	// cond:
  9815  	// result: (LoweredGetClosurePtr)
  9816  	for {
  9817  		v.reset(Op386LoweredGetClosurePtr)
  9818  		return true
  9819  	}
  9820  }
  9821  func rewriteValue386_OpGetG(v *Value, config *Config) bool {
  9822  	b := v.Block
  9823  	_ = b
  9824  	// match: (GetG mem)
  9825  	// cond:
  9826  	// result: (LoweredGetG mem)
  9827  	for {
  9828  		mem := v.Args[0]
  9829  		v.reset(Op386LoweredGetG)
  9830  		v.AddArg(mem)
  9831  		return true
  9832  	}
  9833  }
  9834  func rewriteValue386_OpGoCall(v *Value, config *Config) bool {
  9835  	b := v.Block
  9836  	_ = b
  9837  	// match: (GoCall [argwid] mem)
  9838  	// cond:
  9839  	// result: (CALLgo [argwid] mem)
  9840  	for {
  9841  		argwid := v.AuxInt
  9842  		mem := v.Args[0]
  9843  		v.reset(Op386CALLgo)
  9844  		v.AuxInt = argwid
  9845  		v.AddArg(mem)
  9846  		return true
  9847  	}
  9848  }
  9849  func rewriteValue386_OpGreater16(v *Value, config *Config) bool {
  9850  	b := v.Block
  9851  	_ = b
  9852  	// match: (Greater16  x y)
  9853  	// cond:
  9854  	// result: (SETG (CMPW x y))
  9855  	for {
  9856  		x := v.Args[0]
  9857  		y := v.Args[1]
  9858  		v.reset(Op386SETG)
  9859  		v0 := b.NewValue0(v.Line, Op386CMPW, TypeFlags)
  9860  		v0.AddArg(x)
  9861  		v0.AddArg(y)
  9862  		v.AddArg(v0)
  9863  		return true
  9864  	}
  9865  }
  9866  func rewriteValue386_OpGreater16U(v *Value, config *Config) bool {
  9867  	b := v.Block
  9868  	_ = b
  9869  	// match: (Greater16U x y)
  9870  	// cond:
  9871  	// result: (SETA (CMPW x y))
  9872  	for {
  9873  		x := v.Args[0]
  9874  		y := v.Args[1]
  9875  		v.reset(Op386SETA)
  9876  		v0 := b.NewValue0(v.Line, Op386CMPW, TypeFlags)
  9877  		v0.AddArg(x)
  9878  		v0.AddArg(y)
  9879  		v.AddArg(v0)
  9880  		return true
  9881  	}
  9882  }
  9883  func rewriteValue386_OpGreater32(v *Value, config *Config) bool {
  9884  	b := v.Block
  9885  	_ = b
  9886  	// match: (Greater32  x y)
  9887  	// cond:
  9888  	// result: (SETG (CMPL x y))
  9889  	for {
  9890  		x := v.Args[0]
  9891  		y := v.Args[1]
  9892  		v.reset(Op386SETG)
  9893  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
  9894  		v0.AddArg(x)
  9895  		v0.AddArg(y)
  9896  		v.AddArg(v0)
  9897  		return true
  9898  	}
  9899  }
  9900  func rewriteValue386_OpGreater32F(v *Value, config *Config) bool {
  9901  	b := v.Block
  9902  	_ = b
  9903  	// match: (Greater32F x y)
  9904  	// cond:
  9905  	// result: (SETGF (UCOMISS x y))
  9906  	for {
  9907  		x := v.Args[0]
  9908  		y := v.Args[1]
  9909  		v.reset(Op386SETGF)
  9910  		v0 := b.NewValue0(v.Line, Op386UCOMISS, TypeFlags)
  9911  		v0.AddArg(x)
  9912  		v0.AddArg(y)
  9913  		v.AddArg(v0)
  9914  		return true
  9915  	}
  9916  }
  9917  func rewriteValue386_OpGreater32U(v *Value, config *Config) bool {
  9918  	b := v.Block
  9919  	_ = b
  9920  	// match: (Greater32U x y)
  9921  	// cond:
  9922  	// result: (SETA (CMPL x y))
  9923  	for {
  9924  		x := v.Args[0]
  9925  		y := v.Args[1]
  9926  		v.reset(Op386SETA)
  9927  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
  9928  		v0.AddArg(x)
  9929  		v0.AddArg(y)
  9930  		v.AddArg(v0)
  9931  		return true
  9932  	}
  9933  }
  9934  func rewriteValue386_OpGreater64F(v *Value, config *Config) bool {
  9935  	b := v.Block
  9936  	_ = b
  9937  	// match: (Greater64F x y)
  9938  	// cond:
  9939  	// result: (SETGF (UCOMISD x y))
  9940  	for {
  9941  		x := v.Args[0]
  9942  		y := v.Args[1]
  9943  		v.reset(Op386SETGF)
  9944  		v0 := b.NewValue0(v.Line, Op386UCOMISD, TypeFlags)
  9945  		v0.AddArg(x)
  9946  		v0.AddArg(y)
  9947  		v.AddArg(v0)
  9948  		return true
  9949  	}
  9950  }
  9951  func rewriteValue386_OpGreater8(v *Value, config *Config) bool {
  9952  	b := v.Block
  9953  	_ = b
  9954  	// match: (Greater8   x y)
  9955  	// cond:
  9956  	// result: (SETG (CMPB x y))
  9957  	for {
  9958  		x := v.Args[0]
  9959  		y := v.Args[1]
  9960  		v.reset(Op386SETG)
  9961  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
  9962  		v0.AddArg(x)
  9963  		v0.AddArg(y)
  9964  		v.AddArg(v0)
  9965  		return true
  9966  	}
  9967  }
  9968  func rewriteValue386_OpGreater8U(v *Value, config *Config) bool {
  9969  	b := v.Block
  9970  	_ = b
  9971  	// match: (Greater8U  x y)
  9972  	// cond:
  9973  	// result: (SETA (CMPB x y))
  9974  	for {
  9975  		x := v.Args[0]
  9976  		y := v.Args[1]
  9977  		v.reset(Op386SETA)
  9978  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
  9979  		v0.AddArg(x)
  9980  		v0.AddArg(y)
  9981  		v.AddArg(v0)
  9982  		return true
  9983  	}
  9984  }
  9985  func rewriteValue386_OpHmul16(v *Value, config *Config) bool {
  9986  	b := v.Block
  9987  	_ = b
  9988  	// match: (Hmul16  x y)
  9989  	// cond:
  9990  	// result: (HMULW  x y)
  9991  	for {
  9992  		x := v.Args[0]
  9993  		y := v.Args[1]
  9994  		v.reset(Op386HMULW)
  9995  		v.AddArg(x)
  9996  		v.AddArg(y)
  9997  		return true
  9998  	}
  9999  }
 10000  func rewriteValue386_OpHmul16u(v *Value, config *Config) bool {
 10001  	b := v.Block
 10002  	_ = b
 10003  	// match: (Hmul16u x y)
 10004  	// cond:
 10005  	// result: (HMULWU x y)
 10006  	for {
 10007  		x := v.Args[0]
 10008  		y := v.Args[1]
 10009  		v.reset(Op386HMULWU)
 10010  		v.AddArg(x)
 10011  		v.AddArg(y)
 10012  		return true
 10013  	}
 10014  }
 10015  func rewriteValue386_OpHmul32(v *Value, config *Config) bool {
 10016  	b := v.Block
 10017  	_ = b
 10018  	// match: (Hmul32  x y)
 10019  	// cond:
 10020  	// result: (HMULL  x y)
 10021  	for {
 10022  		x := v.Args[0]
 10023  		y := v.Args[1]
 10024  		v.reset(Op386HMULL)
 10025  		v.AddArg(x)
 10026  		v.AddArg(y)
 10027  		return true
 10028  	}
 10029  }
 10030  func rewriteValue386_OpHmul32u(v *Value, config *Config) bool {
 10031  	b := v.Block
 10032  	_ = b
 10033  	// match: (Hmul32u x y)
 10034  	// cond:
 10035  	// result: (HMULLU x y)
 10036  	for {
 10037  		x := v.Args[0]
 10038  		y := v.Args[1]
 10039  		v.reset(Op386HMULLU)
 10040  		v.AddArg(x)
 10041  		v.AddArg(y)
 10042  		return true
 10043  	}
 10044  }
 10045  func rewriteValue386_OpHmul8(v *Value, config *Config) bool {
 10046  	b := v.Block
 10047  	_ = b
 10048  	// match: (Hmul8   x y)
 10049  	// cond:
 10050  	// result: (HMULB  x y)
 10051  	for {
 10052  		x := v.Args[0]
 10053  		y := v.Args[1]
 10054  		v.reset(Op386HMULB)
 10055  		v.AddArg(x)
 10056  		v.AddArg(y)
 10057  		return true
 10058  	}
 10059  }
 10060  func rewriteValue386_OpHmul8u(v *Value, config *Config) bool {
 10061  	b := v.Block
 10062  	_ = b
 10063  	// match: (Hmul8u  x y)
 10064  	// cond:
 10065  	// result: (HMULBU x y)
 10066  	for {
 10067  		x := v.Args[0]
 10068  		y := v.Args[1]
 10069  		v.reset(Op386HMULBU)
 10070  		v.AddArg(x)
 10071  		v.AddArg(y)
 10072  		return true
 10073  	}
 10074  }
 10075  func rewriteValue386_OpInterCall(v *Value, config *Config) bool {
 10076  	b := v.Block
 10077  	_ = b
 10078  	// match: (InterCall [argwid] entry mem)
 10079  	// cond:
 10080  	// result: (CALLinter [argwid] entry mem)
 10081  	for {
 10082  		argwid := v.AuxInt
 10083  		entry := v.Args[0]
 10084  		mem := v.Args[1]
 10085  		v.reset(Op386CALLinter)
 10086  		v.AuxInt = argwid
 10087  		v.AddArg(entry)
 10088  		v.AddArg(mem)
 10089  		return true
 10090  	}
 10091  }
 10092  func rewriteValue386_OpIsInBounds(v *Value, config *Config) bool {
 10093  	b := v.Block
 10094  	_ = b
 10095  	// match: (IsInBounds idx len)
 10096  	// cond:
 10097  	// result: (SETB (CMPL idx len))
 10098  	for {
 10099  		idx := v.Args[0]
 10100  		len := v.Args[1]
 10101  		v.reset(Op386SETB)
 10102  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
 10103  		v0.AddArg(idx)
 10104  		v0.AddArg(len)
 10105  		v.AddArg(v0)
 10106  		return true
 10107  	}
 10108  }
 10109  func rewriteValue386_OpIsNonNil(v *Value, config *Config) bool {
 10110  	b := v.Block
 10111  	_ = b
 10112  	// match: (IsNonNil p)
 10113  	// cond:
 10114  	// result: (SETNE (TESTL p p))
 10115  	for {
 10116  		p := v.Args[0]
 10117  		v.reset(Op386SETNE)
 10118  		v0 := b.NewValue0(v.Line, Op386TESTL, TypeFlags)
 10119  		v0.AddArg(p)
 10120  		v0.AddArg(p)
 10121  		v.AddArg(v0)
 10122  		return true
 10123  	}
 10124  }
 10125  func rewriteValue386_OpIsSliceInBounds(v *Value, config *Config) bool {
 10126  	b := v.Block
 10127  	_ = b
 10128  	// match: (IsSliceInBounds idx len)
 10129  	// cond:
 10130  	// result: (SETBE (CMPL idx len))
 10131  	for {
 10132  		idx := v.Args[0]
 10133  		len := v.Args[1]
 10134  		v.reset(Op386SETBE)
 10135  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
 10136  		v0.AddArg(idx)
 10137  		v0.AddArg(len)
 10138  		v.AddArg(v0)
 10139  		return true
 10140  	}
 10141  }
 10142  func rewriteValue386_OpLeq16(v *Value, config *Config) bool {
 10143  	b := v.Block
 10144  	_ = b
 10145  	// match: (Leq16  x y)
 10146  	// cond:
 10147  	// result: (SETLE (CMPW x y))
 10148  	for {
 10149  		x := v.Args[0]
 10150  		y := v.Args[1]
 10151  		v.reset(Op386SETLE)
 10152  		v0 := b.NewValue0(v.Line, Op386CMPW, TypeFlags)
 10153  		v0.AddArg(x)
 10154  		v0.AddArg(y)
 10155  		v.AddArg(v0)
 10156  		return true
 10157  	}
 10158  }
 10159  func rewriteValue386_OpLeq16U(v *Value, config *Config) bool {
 10160  	b := v.Block
 10161  	_ = b
 10162  	// match: (Leq16U x y)
 10163  	// cond:
 10164  	// result: (SETBE (CMPW x y))
 10165  	for {
 10166  		x := v.Args[0]
 10167  		y := v.Args[1]
 10168  		v.reset(Op386SETBE)
 10169  		v0 := b.NewValue0(v.Line, Op386CMPW, TypeFlags)
 10170  		v0.AddArg(x)
 10171  		v0.AddArg(y)
 10172  		v.AddArg(v0)
 10173  		return true
 10174  	}
 10175  }
 10176  func rewriteValue386_OpLeq32(v *Value, config *Config) bool {
 10177  	b := v.Block
 10178  	_ = b
 10179  	// match: (Leq32  x y)
 10180  	// cond:
 10181  	// result: (SETLE (CMPL x y))
 10182  	for {
 10183  		x := v.Args[0]
 10184  		y := v.Args[1]
 10185  		v.reset(Op386SETLE)
 10186  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
 10187  		v0.AddArg(x)
 10188  		v0.AddArg(y)
 10189  		v.AddArg(v0)
 10190  		return true
 10191  	}
 10192  }
 10193  func rewriteValue386_OpLeq32F(v *Value, config *Config) bool {
 10194  	b := v.Block
 10195  	_ = b
 10196  	// match: (Leq32F x y)
 10197  	// cond:
 10198  	// result: (SETGEF (UCOMISS y x))
 10199  	for {
 10200  		x := v.Args[0]
 10201  		y := v.Args[1]
 10202  		v.reset(Op386SETGEF)
 10203  		v0 := b.NewValue0(v.Line, Op386UCOMISS, TypeFlags)
 10204  		v0.AddArg(y)
 10205  		v0.AddArg(x)
 10206  		v.AddArg(v0)
 10207  		return true
 10208  	}
 10209  }
 10210  func rewriteValue386_OpLeq32U(v *Value, config *Config) bool {
 10211  	b := v.Block
 10212  	_ = b
 10213  	// match: (Leq32U x y)
 10214  	// cond:
 10215  	// result: (SETBE (CMPL x y))
 10216  	for {
 10217  		x := v.Args[0]
 10218  		y := v.Args[1]
 10219  		v.reset(Op386SETBE)
 10220  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
 10221  		v0.AddArg(x)
 10222  		v0.AddArg(y)
 10223  		v.AddArg(v0)
 10224  		return true
 10225  	}
 10226  }
 10227  func rewriteValue386_OpLeq64F(v *Value, config *Config) bool {
 10228  	b := v.Block
 10229  	_ = b
 10230  	// match: (Leq64F x y)
 10231  	// cond:
 10232  	// result: (SETGEF (UCOMISD y x))
 10233  	for {
 10234  		x := v.Args[0]
 10235  		y := v.Args[1]
 10236  		v.reset(Op386SETGEF)
 10237  		v0 := b.NewValue0(v.Line, Op386UCOMISD, TypeFlags)
 10238  		v0.AddArg(y)
 10239  		v0.AddArg(x)
 10240  		v.AddArg(v0)
 10241  		return true
 10242  	}
 10243  }
 10244  func rewriteValue386_OpLeq8(v *Value, config *Config) bool {
 10245  	b := v.Block
 10246  	_ = b
 10247  	// match: (Leq8   x y)
 10248  	// cond:
 10249  	// result: (SETLE (CMPB x y))
 10250  	for {
 10251  		x := v.Args[0]
 10252  		y := v.Args[1]
 10253  		v.reset(Op386SETLE)
 10254  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
 10255  		v0.AddArg(x)
 10256  		v0.AddArg(y)
 10257  		v.AddArg(v0)
 10258  		return true
 10259  	}
 10260  }
 10261  func rewriteValue386_OpLeq8U(v *Value, config *Config) bool {
 10262  	b := v.Block
 10263  	_ = b
 10264  	// match: (Leq8U  x y)
 10265  	// cond:
 10266  	// result: (SETBE (CMPB x y))
 10267  	for {
 10268  		x := v.Args[0]
 10269  		y := v.Args[1]
 10270  		v.reset(Op386SETBE)
 10271  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
 10272  		v0.AddArg(x)
 10273  		v0.AddArg(y)
 10274  		v.AddArg(v0)
 10275  		return true
 10276  	}
 10277  }
 10278  func rewriteValue386_OpLess16(v *Value, config *Config) bool {
 10279  	b := v.Block
 10280  	_ = b
 10281  	// match: (Less16  x y)
 10282  	// cond:
 10283  	// result: (SETL (CMPW x y))
 10284  	for {
 10285  		x := v.Args[0]
 10286  		y := v.Args[1]
 10287  		v.reset(Op386SETL)
 10288  		v0 := b.NewValue0(v.Line, Op386CMPW, TypeFlags)
 10289  		v0.AddArg(x)
 10290  		v0.AddArg(y)
 10291  		v.AddArg(v0)
 10292  		return true
 10293  	}
 10294  }
 10295  func rewriteValue386_OpLess16U(v *Value, config *Config) bool {
 10296  	b := v.Block
 10297  	_ = b
 10298  	// match: (Less16U x y)
 10299  	// cond:
 10300  	// result: (SETB (CMPW x y))
 10301  	for {
 10302  		x := v.Args[0]
 10303  		y := v.Args[1]
 10304  		v.reset(Op386SETB)
 10305  		v0 := b.NewValue0(v.Line, Op386CMPW, TypeFlags)
 10306  		v0.AddArg(x)
 10307  		v0.AddArg(y)
 10308  		v.AddArg(v0)
 10309  		return true
 10310  	}
 10311  }
 10312  func rewriteValue386_OpLess32(v *Value, config *Config) bool {
 10313  	b := v.Block
 10314  	_ = b
 10315  	// match: (Less32  x y)
 10316  	// cond:
 10317  	// result: (SETL (CMPL x y))
 10318  	for {
 10319  		x := v.Args[0]
 10320  		y := v.Args[1]
 10321  		v.reset(Op386SETL)
 10322  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
 10323  		v0.AddArg(x)
 10324  		v0.AddArg(y)
 10325  		v.AddArg(v0)
 10326  		return true
 10327  	}
 10328  }
 10329  func rewriteValue386_OpLess32F(v *Value, config *Config) bool {
 10330  	b := v.Block
 10331  	_ = b
 10332  	// match: (Less32F x y)
 10333  	// cond:
 10334  	// result: (SETGF (UCOMISS y x))
 10335  	for {
 10336  		x := v.Args[0]
 10337  		y := v.Args[1]
 10338  		v.reset(Op386SETGF)
 10339  		v0 := b.NewValue0(v.Line, Op386UCOMISS, TypeFlags)
 10340  		v0.AddArg(y)
 10341  		v0.AddArg(x)
 10342  		v.AddArg(v0)
 10343  		return true
 10344  	}
 10345  }
 10346  func rewriteValue386_OpLess32U(v *Value, config *Config) bool {
 10347  	b := v.Block
 10348  	_ = b
 10349  	// match: (Less32U x y)
 10350  	// cond:
 10351  	// result: (SETB (CMPL x y))
 10352  	for {
 10353  		x := v.Args[0]
 10354  		y := v.Args[1]
 10355  		v.reset(Op386SETB)
 10356  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
 10357  		v0.AddArg(x)
 10358  		v0.AddArg(y)
 10359  		v.AddArg(v0)
 10360  		return true
 10361  	}
 10362  }
 10363  func rewriteValue386_OpLess64F(v *Value, config *Config) bool {
 10364  	b := v.Block
 10365  	_ = b
 10366  	// match: (Less64F x y)
 10367  	// cond:
 10368  	// result: (SETGF (UCOMISD y x))
 10369  	for {
 10370  		x := v.Args[0]
 10371  		y := v.Args[1]
 10372  		v.reset(Op386SETGF)
 10373  		v0 := b.NewValue0(v.Line, Op386UCOMISD, TypeFlags)
 10374  		v0.AddArg(y)
 10375  		v0.AddArg(x)
 10376  		v.AddArg(v0)
 10377  		return true
 10378  	}
 10379  }
 10380  func rewriteValue386_OpLess8(v *Value, config *Config) bool {
 10381  	b := v.Block
 10382  	_ = b
 10383  	// match: (Less8   x y)
 10384  	// cond:
 10385  	// result: (SETL (CMPB x y))
 10386  	for {
 10387  		x := v.Args[0]
 10388  		y := v.Args[1]
 10389  		v.reset(Op386SETL)
 10390  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
 10391  		v0.AddArg(x)
 10392  		v0.AddArg(y)
 10393  		v.AddArg(v0)
 10394  		return true
 10395  	}
 10396  }
 10397  func rewriteValue386_OpLess8U(v *Value, config *Config) bool {
 10398  	b := v.Block
 10399  	_ = b
 10400  	// match: (Less8U  x y)
 10401  	// cond:
 10402  	// result: (SETB (CMPB x y))
 10403  	for {
 10404  		x := v.Args[0]
 10405  		y := v.Args[1]
 10406  		v.reset(Op386SETB)
 10407  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
 10408  		v0.AddArg(x)
 10409  		v0.AddArg(y)
 10410  		v.AddArg(v0)
 10411  		return true
 10412  	}
 10413  }
 10414  func rewriteValue386_OpLoad(v *Value, config *Config) bool {
 10415  	b := v.Block
 10416  	_ = b
 10417  	// match: (Load <t> ptr mem)
 10418  	// cond: (is32BitInt(t) || isPtr(t))
 10419  	// result: (MOVLload ptr mem)
 10420  	for {
 10421  		t := v.Type
 10422  		ptr := v.Args[0]
 10423  		mem := v.Args[1]
 10424  		if !(is32BitInt(t) || isPtr(t)) {
 10425  			break
 10426  		}
 10427  		v.reset(Op386MOVLload)
 10428  		v.AddArg(ptr)
 10429  		v.AddArg(mem)
 10430  		return true
 10431  	}
 10432  	// match: (Load <t> ptr mem)
 10433  	// cond: is16BitInt(t)
 10434  	// result: (MOVWload ptr mem)
 10435  	for {
 10436  		t := v.Type
 10437  		ptr := v.Args[0]
 10438  		mem := v.Args[1]
 10439  		if !(is16BitInt(t)) {
 10440  			break
 10441  		}
 10442  		v.reset(Op386MOVWload)
 10443  		v.AddArg(ptr)
 10444  		v.AddArg(mem)
 10445  		return true
 10446  	}
 10447  	// match: (Load <t> ptr mem)
 10448  	// cond: (t.IsBoolean() || is8BitInt(t))
 10449  	// result: (MOVBload ptr mem)
 10450  	for {
 10451  		t := v.Type
 10452  		ptr := v.Args[0]
 10453  		mem := v.Args[1]
 10454  		if !(t.IsBoolean() || is8BitInt(t)) {
 10455  			break
 10456  		}
 10457  		v.reset(Op386MOVBload)
 10458  		v.AddArg(ptr)
 10459  		v.AddArg(mem)
 10460  		return true
 10461  	}
 10462  	// match: (Load <t> ptr mem)
 10463  	// cond: is32BitFloat(t)
 10464  	// result: (MOVSSload ptr mem)
 10465  	for {
 10466  		t := v.Type
 10467  		ptr := v.Args[0]
 10468  		mem := v.Args[1]
 10469  		if !(is32BitFloat(t)) {
 10470  			break
 10471  		}
 10472  		v.reset(Op386MOVSSload)
 10473  		v.AddArg(ptr)
 10474  		v.AddArg(mem)
 10475  		return true
 10476  	}
 10477  	// match: (Load <t> ptr mem)
 10478  	// cond: is64BitFloat(t)
 10479  	// result: (MOVSDload ptr mem)
 10480  	for {
 10481  		t := v.Type
 10482  		ptr := v.Args[0]
 10483  		mem := v.Args[1]
 10484  		if !(is64BitFloat(t)) {
 10485  			break
 10486  		}
 10487  		v.reset(Op386MOVSDload)
 10488  		v.AddArg(ptr)
 10489  		v.AddArg(mem)
 10490  		return true
 10491  	}
 10492  	return false
 10493  }
 10494  func rewriteValue386_OpLrot16(v *Value, config *Config) bool {
 10495  	b := v.Block
 10496  	_ = b
 10497  	// match: (Lrot16 <t> x [c])
 10498  	// cond:
 10499  	// result: (ROLWconst <t> [c&15] x)
 10500  	for {
 10501  		t := v.Type
 10502  		c := v.AuxInt
 10503  		x := v.Args[0]
 10504  		v.reset(Op386ROLWconst)
 10505  		v.Type = t
 10506  		v.AuxInt = c & 15
 10507  		v.AddArg(x)
 10508  		return true
 10509  	}
 10510  }
 10511  func rewriteValue386_OpLrot32(v *Value, config *Config) bool {
 10512  	b := v.Block
 10513  	_ = b
 10514  	// match: (Lrot32 <t> x [c])
 10515  	// cond:
 10516  	// result: (ROLLconst <t> [c&31] x)
 10517  	for {
 10518  		t := v.Type
 10519  		c := v.AuxInt
 10520  		x := v.Args[0]
 10521  		v.reset(Op386ROLLconst)
 10522  		v.Type = t
 10523  		v.AuxInt = c & 31
 10524  		v.AddArg(x)
 10525  		return true
 10526  	}
 10527  }
 10528  func rewriteValue386_OpLrot8(v *Value, config *Config) bool {
 10529  	b := v.Block
 10530  	_ = b
 10531  	// match: (Lrot8  <t> x [c])
 10532  	// cond:
 10533  	// result: (ROLBconst <t> [c&7] x)
 10534  	for {
 10535  		t := v.Type
 10536  		c := v.AuxInt
 10537  		x := v.Args[0]
 10538  		v.reset(Op386ROLBconst)
 10539  		v.Type = t
 10540  		v.AuxInt = c & 7
 10541  		v.AddArg(x)
 10542  		return true
 10543  	}
 10544  }
 10545  func rewriteValue386_OpLsh16x16(v *Value, config *Config) bool {
 10546  	b := v.Block
 10547  	_ = b
 10548  	// match: (Lsh16x16 <t> x y)
 10549  	// cond:
 10550  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPWconst y [32])))
 10551  	for {
 10552  		t := v.Type
 10553  		x := v.Args[0]
 10554  		y := v.Args[1]
 10555  		v.reset(Op386ANDL)
 10556  		v0 := b.NewValue0(v.Line, Op386SHLL, t)
 10557  		v0.AddArg(x)
 10558  		v0.AddArg(y)
 10559  		v.AddArg(v0)
 10560  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 10561  		v2 := b.NewValue0(v.Line, Op386CMPWconst, TypeFlags)
 10562  		v2.AuxInt = 32
 10563  		v2.AddArg(y)
 10564  		v1.AddArg(v2)
 10565  		v.AddArg(v1)
 10566  		return true
 10567  	}
 10568  }
 10569  func rewriteValue386_OpLsh16x32(v *Value, config *Config) bool {
 10570  	b := v.Block
 10571  	_ = b
 10572  	// match: (Lsh16x32 <t> x y)
 10573  	// cond:
 10574  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPLconst y [32])))
 10575  	for {
 10576  		t := v.Type
 10577  		x := v.Args[0]
 10578  		y := v.Args[1]
 10579  		v.reset(Op386ANDL)
 10580  		v0 := b.NewValue0(v.Line, Op386SHLL, t)
 10581  		v0.AddArg(x)
 10582  		v0.AddArg(y)
 10583  		v.AddArg(v0)
 10584  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 10585  		v2 := b.NewValue0(v.Line, Op386CMPLconst, TypeFlags)
 10586  		v2.AuxInt = 32
 10587  		v2.AddArg(y)
 10588  		v1.AddArg(v2)
 10589  		v.AddArg(v1)
 10590  		return true
 10591  	}
 10592  }
 10593  func rewriteValue386_OpLsh16x64(v *Value, config *Config) bool {
 10594  	b := v.Block
 10595  	_ = b
 10596  	// match: (Lsh16x64 x (Const64 [c]))
 10597  	// cond: uint64(c) < 16
 10598  	// result: (SHLLconst x [c])
 10599  	for {
 10600  		x := v.Args[0]
 10601  		v_1 := v.Args[1]
 10602  		if v_1.Op != OpConst64 {
 10603  			break
 10604  		}
 10605  		c := v_1.AuxInt
 10606  		if !(uint64(c) < 16) {
 10607  			break
 10608  		}
 10609  		v.reset(Op386SHLLconst)
 10610  		v.AuxInt = c
 10611  		v.AddArg(x)
 10612  		return true
 10613  	}
 10614  	// match: (Lsh16x64 _ (Const64 [c]))
 10615  	// cond: uint64(c) >= 16
 10616  	// result: (Const16 [0])
 10617  	for {
 10618  		v_1 := v.Args[1]
 10619  		if v_1.Op != OpConst64 {
 10620  			break
 10621  		}
 10622  		c := v_1.AuxInt
 10623  		if !(uint64(c) >= 16) {
 10624  			break
 10625  		}
 10626  		v.reset(OpConst16)
 10627  		v.AuxInt = 0
 10628  		return true
 10629  	}
 10630  	return false
 10631  }
 10632  func rewriteValue386_OpLsh16x8(v *Value, config *Config) bool {
 10633  	b := v.Block
 10634  	_ = b
 10635  	// match: (Lsh16x8  <t> x y)
 10636  	// cond:
 10637  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPBconst y [32])))
 10638  	for {
 10639  		t := v.Type
 10640  		x := v.Args[0]
 10641  		y := v.Args[1]
 10642  		v.reset(Op386ANDL)
 10643  		v0 := b.NewValue0(v.Line, Op386SHLL, t)
 10644  		v0.AddArg(x)
 10645  		v0.AddArg(y)
 10646  		v.AddArg(v0)
 10647  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 10648  		v2 := b.NewValue0(v.Line, Op386CMPBconst, TypeFlags)
 10649  		v2.AuxInt = 32
 10650  		v2.AddArg(y)
 10651  		v1.AddArg(v2)
 10652  		v.AddArg(v1)
 10653  		return true
 10654  	}
 10655  }
 10656  func rewriteValue386_OpLsh32x16(v *Value, config *Config) bool {
 10657  	b := v.Block
 10658  	_ = b
 10659  	// match: (Lsh32x16 <t> x y)
 10660  	// cond:
 10661  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPWconst y [32])))
 10662  	for {
 10663  		t := v.Type
 10664  		x := v.Args[0]
 10665  		y := v.Args[1]
 10666  		v.reset(Op386ANDL)
 10667  		v0 := b.NewValue0(v.Line, Op386SHLL, t)
 10668  		v0.AddArg(x)
 10669  		v0.AddArg(y)
 10670  		v.AddArg(v0)
 10671  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 10672  		v2 := b.NewValue0(v.Line, Op386CMPWconst, TypeFlags)
 10673  		v2.AuxInt = 32
 10674  		v2.AddArg(y)
 10675  		v1.AddArg(v2)
 10676  		v.AddArg(v1)
 10677  		return true
 10678  	}
 10679  }
 10680  func rewriteValue386_OpLsh32x32(v *Value, config *Config) bool {
 10681  	b := v.Block
 10682  	_ = b
 10683  	// match: (Lsh32x32 <t> x y)
 10684  	// cond:
 10685  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPLconst y [32])))
 10686  	for {
 10687  		t := v.Type
 10688  		x := v.Args[0]
 10689  		y := v.Args[1]
 10690  		v.reset(Op386ANDL)
 10691  		v0 := b.NewValue0(v.Line, Op386SHLL, t)
 10692  		v0.AddArg(x)
 10693  		v0.AddArg(y)
 10694  		v.AddArg(v0)
 10695  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 10696  		v2 := b.NewValue0(v.Line, Op386CMPLconst, TypeFlags)
 10697  		v2.AuxInt = 32
 10698  		v2.AddArg(y)
 10699  		v1.AddArg(v2)
 10700  		v.AddArg(v1)
 10701  		return true
 10702  	}
 10703  }
 10704  func rewriteValue386_OpLsh32x64(v *Value, config *Config) bool {
 10705  	b := v.Block
 10706  	_ = b
 10707  	// match: (Lsh32x64 x (Const64 [c]))
 10708  	// cond: uint64(c) < 32
 10709  	// result: (SHLLconst x [c])
 10710  	for {
 10711  		x := v.Args[0]
 10712  		v_1 := v.Args[1]
 10713  		if v_1.Op != OpConst64 {
 10714  			break
 10715  		}
 10716  		c := v_1.AuxInt
 10717  		if !(uint64(c) < 32) {
 10718  			break
 10719  		}
 10720  		v.reset(Op386SHLLconst)
 10721  		v.AuxInt = c
 10722  		v.AddArg(x)
 10723  		return true
 10724  	}
 10725  	// match: (Lsh32x64 _ (Const64 [c]))
 10726  	// cond: uint64(c) >= 32
 10727  	// result: (Const32 [0])
 10728  	for {
 10729  		v_1 := v.Args[1]
 10730  		if v_1.Op != OpConst64 {
 10731  			break
 10732  		}
 10733  		c := v_1.AuxInt
 10734  		if !(uint64(c) >= 32) {
 10735  			break
 10736  		}
 10737  		v.reset(OpConst32)
 10738  		v.AuxInt = 0
 10739  		return true
 10740  	}
 10741  	return false
 10742  }
 10743  func rewriteValue386_OpLsh32x8(v *Value, config *Config) bool {
 10744  	b := v.Block
 10745  	_ = b
 10746  	// match: (Lsh32x8  <t> x y)
 10747  	// cond:
 10748  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPBconst y [32])))
 10749  	for {
 10750  		t := v.Type
 10751  		x := v.Args[0]
 10752  		y := v.Args[1]
 10753  		v.reset(Op386ANDL)
 10754  		v0 := b.NewValue0(v.Line, Op386SHLL, t)
 10755  		v0.AddArg(x)
 10756  		v0.AddArg(y)
 10757  		v.AddArg(v0)
 10758  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 10759  		v2 := b.NewValue0(v.Line, Op386CMPBconst, TypeFlags)
 10760  		v2.AuxInt = 32
 10761  		v2.AddArg(y)
 10762  		v1.AddArg(v2)
 10763  		v.AddArg(v1)
 10764  		return true
 10765  	}
 10766  }
 10767  func rewriteValue386_OpLsh8x16(v *Value, config *Config) bool {
 10768  	b := v.Block
 10769  	_ = b
 10770  	// match: (Lsh8x16 <t> x y)
 10771  	// cond:
 10772  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPWconst y [32])))
 10773  	for {
 10774  		t := v.Type
 10775  		x := v.Args[0]
 10776  		y := v.Args[1]
 10777  		v.reset(Op386ANDL)
 10778  		v0 := b.NewValue0(v.Line, Op386SHLL, t)
 10779  		v0.AddArg(x)
 10780  		v0.AddArg(y)
 10781  		v.AddArg(v0)
 10782  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 10783  		v2 := b.NewValue0(v.Line, Op386CMPWconst, TypeFlags)
 10784  		v2.AuxInt = 32
 10785  		v2.AddArg(y)
 10786  		v1.AddArg(v2)
 10787  		v.AddArg(v1)
 10788  		return true
 10789  	}
 10790  }
 10791  func rewriteValue386_OpLsh8x32(v *Value, config *Config) bool {
 10792  	b := v.Block
 10793  	_ = b
 10794  	// match: (Lsh8x32 <t> x y)
 10795  	// cond:
 10796  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPLconst y [32])))
 10797  	for {
 10798  		t := v.Type
 10799  		x := v.Args[0]
 10800  		y := v.Args[1]
 10801  		v.reset(Op386ANDL)
 10802  		v0 := b.NewValue0(v.Line, Op386SHLL, t)
 10803  		v0.AddArg(x)
 10804  		v0.AddArg(y)
 10805  		v.AddArg(v0)
 10806  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 10807  		v2 := b.NewValue0(v.Line, Op386CMPLconst, TypeFlags)
 10808  		v2.AuxInt = 32
 10809  		v2.AddArg(y)
 10810  		v1.AddArg(v2)
 10811  		v.AddArg(v1)
 10812  		return true
 10813  	}
 10814  }
 10815  func rewriteValue386_OpLsh8x64(v *Value, config *Config) bool {
 10816  	b := v.Block
 10817  	_ = b
 10818  	// match: (Lsh8x64 x (Const64 [c]))
 10819  	// cond: uint64(c) < 8
 10820  	// result: (SHLLconst x [c])
 10821  	for {
 10822  		x := v.Args[0]
 10823  		v_1 := v.Args[1]
 10824  		if v_1.Op != OpConst64 {
 10825  			break
 10826  		}
 10827  		c := v_1.AuxInt
 10828  		if !(uint64(c) < 8) {
 10829  			break
 10830  		}
 10831  		v.reset(Op386SHLLconst)
 10832  		v.AuxInt = c
 10833  		v.AddArg(x)
 10834  		return true
 10835  	}
 10836  	// match: (Lsh8x64 _ (Const64 [c]))
 10837  	// cond: uint64(c) >= 8
 10838  	// result: (Const8 [0])
 10839  	for {
 10840  		v_1 := v.Args[1]
 10841  		if v_1.Op != OpConst64 {
 10842  			break
 10843  		}
 10844  		c := v_1.AuxInt
 10845  		if !(uint64(c) >= 8) {
 10846  			break
 10847  		}
 10848  		v.reset(OpConst8)
 10849  		v.AuxInt = 0
 10850  		return true
 10851  	}
 10852  	return false
 10853  }
 10854  func rewriteValue386_OpLsh8x8(v *Value, config *Config) bool {
 10855  	b := v.Block
 10856  	_ = b
 10857  	// match: (Lsh8x8  <t> x y)
 10858  	// cond:
 10859  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPBconst y [32])))
 10860  	for {
 10861  		t := v.Type
 10862  		x := v.Args[0]
 10863  		y := v.Args[1]
 10864  		v.reset(Op386ANDL)
 10865  		v0 := b.NewValue0(v.Line, Op386SHLL, t)
 10866  		v0.AddArg(x)
 10867  		v0.AddArg(y)
 10868  		v.AddArg(v0)
 10869  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 10870  		v2 := b.NewValue0(v.Line, Op386CMPBconst, TypeFlags)
 10871  		v2.AuxInt = 32
 10872  		v2.AddArg(y)
 10873  		v1.AddArg(v2)
 10874  		v.AddArg(v1)
 10875  		return true
 10876  	}
 10877  }
 10878  func rewriteValue386_OpMod16(v *Value, config *Config) bool {
 10879  	b := v.Block
 10880  	_ = b
 10881  	// match: (Mod16  x y)
 10882  	// cond:
 10883  	// result: (MODW  x y)
 10884  	for {
 10885  		x := v.Args[0]
 10886  		y := v.Args[1]
 10887  		v.reset(Op386MODW)
 10888  		v.AddArg(x)
 10889  		v.AddArg(y)
 10890  		return true
 10891  	}
 10892  }
 10893  func rewriteValue386_OpMod16u(v *Value, config *Config) bool {
 10894  	b := v.Block
 10895  	_ = b
 10896  	// match: (Mod16u x y)
 10897  	// cond:
 10898  	// result: (MODWU x y)
 10899  	for {
 10900  		x := v.Args[0]
 10901  		y := v.Args[1]
 10902  		v.reset(Op386MODWU)
 10903  		v.AddArg(x)
 10904  		v.AddArg(y)
 10905  		return true
 10906  	}
 10907  }
 10908  func rewriteValue386_OpMod32(v *Value, config *Config) bool {
 10909  	b := v.Block
 10910  	_ = b
 10911  	// match: (Mod32  x y)
 10912  	// cond:
 10913  	// result: (MODL  x y)
 10914  	for {
 10915  		x := v.Args[0]
 10916  		y := v.Args[1]
 10917  		v.reset(Op386MODL)
 10918  		v.AddArg(x)
 10919  		v.AddArg(y)
 10920  		return true
 10921  	}
 10922  }
 10923  func rewriteValue386_OpMod32u(v *Value, config *Config) bool {
 10924  	b := v.Block
 10925  	_ = b
 10926  	// match: (Mod32u x y)
 10927  	// cond:
 10928  	// result: (MODLU x y)
 10929  	for {
 10930  		x := v.Args[0]
 10931  		y := v.Args[1]
 10932  		v.reset(Op386MODLU)
 10933  		v.AddArg(x)
 10934  		v.AddArg(y)
 10935  		return true
 10936  	}
 10937  }
 10938  func rewriteValue386_OpMod8(v *Value, config *Config) bool {
 10939  	b := v.Block
 10940  	_ = b
 10941  	// match: (Mod8   x y)
 10942  	// cond:
 10943  	// result: (MODW  (SignExt8to16 x) (SignExt8to16 y))
 10944  	for {
 10945  		x := v.Args[0]
 10946  		y := v.Args[1]
 10947  		v.reset(Op386MODW)
 10948  		v0 := b.NewValue0(v.Line, OpSignExt8to16, config.fe.TypeInt16())
 10949  		v0.AddArg(x)
 10950  		v.AddArg(v0)
 10951  		v1 := b.NewValue0(v.Line, OpSignExt8to16, config.fe.TypeInt16())
 10952  		v1.AddArg(y)
 10953  		v.AddArg(v1)
 10954  		return true
 10955  	}
 10956  }
 10957  func rewriteValue386_OpMod8u(v *Value, config *Config) bool {
 10958  	b := v.Block
 10959  	_ = b
 10960  	// match: (Mod8u  x y)
 10961  	// cond:
 10962  	// result: (MODWU (ZeroExt8to16 x) (ZeroExt8to16 y))
 10963  	for {
 10964  		x := v.Args[0]
 10965  		y := v.Args[1]
 10966  		v.reset(Op386MODWU)
 10967  		v0 := b.NewValue0(v.Line, OpZeroExt8to16, config.fe.TypeUInt16())
 10968  		v0.AddArg(x)
 10969  		v.AddArg(v0)
 10970  		v1 := b.NewValue0(v.Line, OpZeroExt8to16, config.fe.TypeUInt16())
 10971  		v1.AddArg(y)
 10972  		v.AddArg(v1)
 10973  		return true
 10974  	}
 10975  }
 10976  func rewriteValue386_OpMove(v *Value, config *Config) bool {
 10977  	b := v.Block
 10978  	_ = b
 10979  	// match: (Move [s] _ _ mem)
 10980  	// cond: SizeAndAlign(s).Size() == 0
 10981  	// result: mem
 10982  	for {
 10983  		s := v.AuxInt
 10984  		mem := v.Args[2]
 10985  		if !(SizeAndAlign(s).Size() == 0) {
 10986  			break
 10987  		}
 10988  		v.reset(OpCopy)
 10989  		v.Type = mem.Type
 10990  		v.AddArg(mem)
 10991  		return true
 10992  	}
 10993  	// match: (Move [s] dst src mem)
 10994  	// cond: SizeAndAlign(s).Size() == 1
 10995  	// result: (MOVBstore dst (MOVBload src mem) mem)
 10996  	for {
 10997  		s := v.AuxInt
 10998  		dst := v.Args[0]
 10999  		src := v.Args[1]
 11000  		mem := v.Args[2]
 11001  		if !(SizeAndAlign(s).Size() == 1) {
 11002  			break
 11003  		}
 11004  		v.reset(Op386MOVBstore)
 11005  		v.AddArg(dst)
 11006  		v0 := b.NewValue0(v.Line, Op386MOVBload, config.fe.TypeUInt8())
 11007  		v0.AddArg(src)
 11008  		v0.AddArg(mem)
 11009  		v.AddArg(v0)
 11010  		v.AddArg(mem)
 11011  		return true
 11012  	}
 11013  	// match: (Move [s] dst src mem)
 11014  	// cond: SizeAndAlign(s).Size() == 2
 11015  	// result: (MOVWstore dst (MOVWload src mem) mem)
 11016  	for {
 11017  		s := v.AuxInt
 11018  		dst := v.Args[0]
 11019  		src := v.Args[1]
 11020  		mem := v.Args[2]
 11021  		if !(SizeAndAlign(s).Size() == 2) {
 11022  			break
 11023  		}
 11024  		v.reset(Op386MOVWstore)
 11025  		v.AddArg(dst)
 11026  		v0 := b.NewValue0(v.Line, Op386MOVWload, config.fe.TypeUInt16())
 11027  		v0.AddArg(src)
 11028  		v0.AddArg(mem)
 11029  		v.AddArg(v0)
 11030  		v.AddArg(mem)
 11031  		return true
 11032  	}
 11033  	// match: (Move [s] dst src mem)
 11034  	// cond: SizeAndAlign(s).Size() == 4
 11035  	// result: (MOVLstore dst (MOVLload src mem) mem)
 11036  	for {
 11037  		s := v.AuxInt
 11038  		dst := v.Args[0]
 11039  		src := v.Args[1]
 11040  		mem := v.Args[2]
 11041  		if !(SizeAndAlign(s).Size() == 4) {
 11042  			break
 11043  		}
 11044  		v.reset(Op386MOVLstore)
 11045  		v.AddArg(dst)
 11046  		v0 := b.NewValue0(v.Line, Op386MOVLload, config.fe.TypeUInt32())
 11047  		v0.AddArg(src)
 11048  		v0.AddArg(mem)
 11049  		v.AddArg(v0)
 11050  		v.AddArg(mem)
 11051  		return true
 11052  	}
 11053  	// match: (Move [s] dst src mem)
 11054  	// cond: SizeAndAlign(s).Size() == 3
 11055  	// result: (MOVBstore [2] dst (MOVBload [2] src mem) 		(MOVWstore dst (MOVWload src mem) mem))
 11056  	for {
 11057  		s := v.AuxInt
 11058  		dst := v.Args[0]
 11059  		src := v.Args[1]
 11060  		mem := v.Args[2]
 11061  		if !(SizeAndAlign(s).Size() == 3) {
 11062  			break
 11063  		}
 11064  		v.reset(Op386MOVBstore)
 11065  		v.AuxInt = 2
 11066  		v.AddArg(dst)
 11067  		v0 := b.NewValue0(v.Line, Op386MOVBload, config.fe.TypeUInt8())
 11068  		v0.AuxInt = 2
 11069  		v0.AddArg(src)
 11070  		v0.AddArg(mem)
 11071  		v.AddArg(v0)
 11072  		v1 := b.NewValue0(v.Line, Op386MOVWstore, TypeMem)
 11073  		v1.AddArg(dst)
 11074  		v2 := b.NewValue0(v.Line, Op386MOVWload, config.fe.TypeUInt16())
 11075  		v2.AddArg(src)
 11076  		v2.AddArg(mem)
 11077  		v1.AddArg(v2)
 11078  		v1.AddArg(mem)
 11079  		v.AddArg(v1)
 11080  		return true
 11081  	}
 11082  	// match: (Move [s] dst src mem)
 11083  	// cond: SizeAndAlign(s).Size() == 5
 11084  	// result: (MOVBstore [4] dst (MOVBload [4] src mem) 		(MOVLstore dst (MOVLload src mem) mem))
 11085  	for {
 11086  		s := v.AuxInt
 11087  		dst := v.Args[0]
 11088  		src := v.Args[1]
 11089  		mem := v.Args[2]
 11090  		if !(SizeAndAlign(s).Size() == 5) {
 11091  			break
 11092  		}
 11093  		v.reset(Op386MOVBstore)
 11094  		v.AuxInt = 4
 11095  		v.AddArg(dst)
 11096  		v0 := b.NewValue0(v.Line, Op386MOVBload, config.fe.TypeUInt8())
 11097  		v0.AuxInt = 4
 11098  		v0.AddArg(src)
 11099  		v0.AddArg(mem)
 11100  		v.AddArg(v0)
 11101  		v1 := b.NewValue0(v.Line, Op386MOVLstore, TypeMem)
 11102  		v1.AddArg(dst)
 11103  		v2 := b.NewValue0(v.Line, Op386MOVLload, config.fe.TypeUInt32())
 11104  		v2.AddArg(src)
 11105  		v2.AddArg(mem)
 11106  		v1.AddArg(v2)
 11107  		v1.AddArg(mem)
 11108  		v.AddArg(v1)
 11109  		return true
 11110  	}
 11111  	// match: (Move [s] dst src mem)
 11112  	// cond: SizeAndAlign(s).Size() == 6
 11113  	// result: (MOVWstore [4] dst (MOVWload [4] src mem) 		(MOVLstore dst (MOVLload src mem) mem))
 11114  	for {
 11115  		s := v.AuxInt
 11116  		dst := v.Args[0]
 11117  		src := v.Args[1]
 11118  		mem := v.Args[2]
 11119  		if !(SizeAndAlign(s).Size() == 6) {
 11120  			break
 11121  		}
 11122  		v.reset(Op386MOVWstore)
 11123  		v.AuxInt = 4
 11124  		v.AddArg(dst)
 11125  		v0 := b.NewValue0(v.Line, Op386MOVWload, config.fe.TypeUInt16())
 11126  		v0.AuxInt = 4
 11127  		v0.AddArg(src)
 11128  		v0.AddArg(mem)
 11129  		v.AddArg(v0)
 11130  		v1 := b.NewValue0(v.Line, Op386MOVLstore, TypeMem)
 11131  		v1.AddArg(dst)
 11132  		v2 := b.NewValue0(v.Line, Op386MOVLload, config.fe.TypeUInt32())
 11133  		v2.AddArg(src)
 11134  		v2.AddArg(mem)
 11135  		v1.AddArg(v2)
 11136  		v1.AddArg(mem)
 11137  		v.AddArg(v1)
 11138  		return true
 11139  	}
 11140  	// match: (Move [s] dst src mem)
 11141  	// cond: SizeAndAlign(s).Size() == 7
 11142  	// result: (MOVLstore [3] dst (MOVLload [3] src mem) 		(MOVLstore dst (MOVLload src mem) mem))
 11143  	for {
 11144  		s := v.AuxInt
 11145  		dst := v.Args[0]
 11146  		src := v.Args[1]
 11147  		mem := v.Args[2]
 11148  		if !(SizeAndAlign(s).Size() == 7) {
 11149  			break
 11150  		}
 11151  		v.reset(Op386MOVLstore)
 11152  		v.AuxInt = 3
 11153  		v.AddArg(dst)
 11154  		v0 := b.NewValue0(v.Line, Op386MOVLload, config.fe.TypeUInt32())
 11155  		v0.AuxInt = 3
 11156  		v0.AddArg(src)
 11157  		v0.AddArg(mem)
 11158  		v.AddArg(v0)
 11159  		v1 := b.NewValue0(v.Line, Op386MOVLstore, TypeMem)
 11160  		v1.AddArg(dst)
 11161  		v2 := b.NewValue0(v.Line, Op386MOVLload, config.fe.TypeUInt32())
 11162  		v2.AddArg(src)
 11163  		v2.AddArg(mem)
 11164  		v1.AddArg(v2)
 11165  		v1.AddArg(mem)
 11166  		v.AddArg(v1)
 11167  		return true
 11168  	}
 11169  	// match: (Move [s] dst src mem)
 11170  	// cond: SizeAndAlign(s).Size() == 8
 11171  	// result: (MOVLstore [4] dst (MOVLload [4] src mem) 		(MOVLstore dst (MOVLload src mem) mem))
 11172  	for {
 11173  		s := v.AuxInt
 11174  		dst := v.Args[0]
 11175  		src := v.Args[1]
 11176  		mem := v.Args[2]
 11177  		if !(SizeAndAlign(s).Size() == 8) {
 11178  			break
 11179  		}
 11180  		v.reset(Op386MOVLstore)
 11181  		v.AuxInt = 4
 11182  		v.AddArg(dst)
 11183  		v0 := b.NewValue0(v.Line, Op386MOVLload, config.fe.TypeUInt32())
 11184  		v0.AuxInt = 4
 11185  		v0.AddArg(src)
 11186  		v0.AddArg(mem)
 11187  		v.AddArg(v0)
 11188  		v1 := b.NewValue0(v.Line, Op386MOVLstore, TypeMem)
 11189  		v1.AddArg(dst)
 11190  		v2 := b.NewValue0(v.Line, Op386MOVLload, config.fe.TypeUInt32())
 11191  		v2.AddArg(src)
 11192  		v2.AddArg(mem)
 11193  		v1.AddArg(v2)
 11194  		v1.AddArg(mem)
 11195  		v.AddArg(v1)
 11196  		return true
 11197  	}
 11198  	// match: (Move [s] dst src mem)
 11199  	// cond: SizeAndAlign(s).Size() > 8 && SizeAndAlign(s).Size()%4 != 0
 11200  	// 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))
 11201  	for {
 11202  		s := v.AuxInt
 11203  		dst := v.Args[0]
 11204  		src := v.Args[1]
 11205  		mem := v.Args[2]
 11206  		if !(SizeAndAlign(s).Size() > 8 && SizeAndAlign(s).Size()%4 != 0) {
 11207  			break
 11208  		}
 11209  		v.reset(OpMove)
 11210  		v.AuxInt = SizeAndAlign(s).Size() - SizeAndAlign(s).Size()%4
 11211  		v0 := b.NewValue0(v.Line, Op386ADDLconst, dst.Type)
 11212  		v0.AuxInt = SizeAndAlign(s).Size() % 4
 11213  		v0.AddArg(dst)
 11214  		v.AddArg(v0)
 11215  		v1 := b.NewValue0(v.Line, Op386ADDLconst, src.Type)
 11216  		v1.AuxInt = SizeAndAlign(s).Size() % 4
 11217  		v1.AddArg(src)
 11218  		v.AddArg(v1)
 11219  		v2 := b.NewValue0(v.Line, Op386MOVLstore, TypeMem)
 11220  		v2.AddArg(dst)
 11221  		v3 := b.NewValue0(v.Line, Op386MOVLload, config.fe.TypeUInt32())
 11222  		v3.AddArg(src)
 11223  		v3.AddArg(mem)
 11224  		v2.AddArg(v3)
 11225  		v2.AddArg(mem)
 11226  		v.AddArg(v2)
 11227  		return true
 11228  	}
 11229  	// match: (Move [s] dst src mem)
 11230  	// cond: SizeAndAlign(s).Size() > 8 && SizeAndAlign(s).Size() <= 4*128 && SizeAndAlign(s).Size()%4 == 0 	&& !config.noDuffDevice
 11231  	// result: (DUFFCOPY [10*(128-SizeAndAlign(s).Size()/4)] dst src mem)
 11232  	for {
 11233  		s := v.AuxInt
 11234  		dst := v.Args[0]
 11235  		src := v.Args[1]
 11236  		mem := v.Args[2]
 11237  		if !(SizeAndAlign(s).Size() > 8 && SizeAndAlign(s).Size() <= 4*128 && SizeAndAlign(s).Size()%4 == 0 && !config.noDuffDevice) {
 11238  			break
 11239  		}
 11240  		v.reset(Op386DUFFCOPY)
 11241  		v.AuxInt = 10 * (128 - SizeAndAlign(s).Size()/4)
 11242  		v.AddArg(dst)
 11243  		v.AddArg(src)
 11244  		v.AddArg(mem)
 11245  		return true
 11246  	}
 11247  	// match: (Move [s] dst src mem)
 11248  	// cond: (SizeAndAlign(s).Size() > 4*128 || config.noDuffDevice) && SizeAndAlign(s).Size()%4 == 0
 11249  	// result: (REPMOVSL dst src (MOVLconst [SizeAndAlign(s).Size()/4]) mem)
 11250  	for {
 11251  		s := v.AuxInt
 11252  		dst := v.Args[0]
 11253  		src := v.Args[1]
 11254  		mem := v.Args[2]
 11255  		if !((SizeAndAlign(s).Size() > 4*128 || config.noDuffDevice) && SizeAndAlign(s).Size()%4 == 0) {
 11256  			break
 11257  		}
 11258  		v.reset(Op386REPMOVSL)
 11259  		v.AddArg(dst)
 11260  		v.AddArg(src)
 11261  		v0 := b.NewValue0(v.Line, Op386MOVLconst, config.fe.TypeUInt32())
 11262  		v0.AuxInt = SizeAndAlign(s).Size() / 4
 11263  		v.AddArg(v0)
 11264  		v.AddArg(mem)
 11265  		return true
 11266  	}
 11267  	return false
 11268  }
 11269  func rewriteValue386_OpMul16(v *Value, config *Config) bool {
 11270  	b := v.Block
 11271  	_ = b
 11272  	// match: (Mul16  x y)
 11273  	// cond:
 11274  	// result: (MULL  x y)
 11275  	for {
 11276  		x := v.Args[0]
 11277  		y := v.Args[1]
 11278  		v.reset(Op386MULL)
 11279  		v.AddArg(x)
 11280  		v.AddArg(y)
 11281  		return true
 11282  	}
 11283  }
 11284  func rewriteValue386_OpMul32(v *Value, config *Config) bool {
 11285  	b := v.Block
 11286  	_ = b
 11287  	// match: (Mul32  x y)
 11288  	// cond:
 11289  	// result: (MULL  x y)
 11290  	for {
 11291  		x := v.Args[0]
 11292  		y := v.Args[1]
 11293  		v.reset(Op386MULL)
 11294  		v.AddArg(x)
 11295  		v.AddArg(y)
 11296  		return true
 11297  	}
 11298  }
 11299  func rewriteValue386_OpMul32F(v *Value, config *Config) bool {
 11300  	b := v.Block
 11301  	_ = b
 11302  	// match: (Mul32F x y)
 11303  	// cond:
 11304  	// result: (MULSS x y)
 11305  	for {
 11306  		x := v.Args[0]
 11307  		y := v.Args[1]
 11308  		v.reset(Op386MULSS)
 11309  		v.AddArg(x)
 11310  		v.AddArg(y)
 11311  		return true
 11312  	}
 11313  }
 11314  func rewriteValue386_OpMul32uhilo(v *Value, config *Config) bool {
 11315  	b := v.Block
 11316  	_ = b
 11317  	// match: (Mul32uhilo x y)
 11318  	// cond:
 11319  	// result: (MULLQU x y)
 11320  	for {
 11321  		x := v.Args[0]
 11322  		y := v.Args[1]
 11323  		v.reset(Op386MULLQU)
 11324  		v.AddArg(x)
 11325  		v.AddArg(y)
 11326  		return true
 11327  	}
 11328  }
 11329  func rewriteValue386_OpMul64F(v *Value, config *Config) bool {
 11330  	b := v.Block
 11331  	_ = b
 11332  	// match: (Mul64F x y)
 11333  	// cond:
 11334  	// result: (MULSD x y)
 11335  	for {
 11336  		x := v.Args[0]
 11337  		y := v.Args[1]
 11338  		v.reset(Op386MULSD)
 11339  		v.AddArg(x)
 11340  		v.AddArg(y)
 11341  		return true
 11342  	}
 11343  }
 11344  func rewriteValue386_OpMul8(v *Value, config *Config) bool {
 11345  	b := v.Block
 11346  	_ = b
 11347  	// match: (Mul8   x y)
 11348  	// cond:
 11349  	// result: (MULL  x y)
 11350  	for {
 11351  		x := v.Args[0]
 11352  		y := v.Args[1]
 11353  		v.reset(Op386MULL)
 11354  		v.AddArg(x)
 11355  		v.AddArg(y)
 11356  		return true
 11357  	}
 11358  }
 11359  func rewriteValue386_OpNeg16(v *Value, config *Config) bool {
 11360  	b := v.Block
 11361  	_ = b
 11362  	// match: (Neg16  x)
 11363  	// cond:
 11364  	// result: (NEGL x)
 11365  	for {
 11366  		x := v.Args[0]
 11367  		v.reset(Op386NEGL)
 11368  		v.AddArg(x)
 11369  		return true
 11370  	}
 11371  }
 11372  func rewriteValue386_OpNeg32(v *Value, config *Config) bool {
 11373  	b := v.Block
 11374  	_ = b
 11375  	// match: (Neg32  x)
 11376  	// cond:
 11377  	// result: (NEGL x)
 11378  	for {
 11379  		x := v.Args[0]
 11380  		v.reset(Op386NEGL)
 11381  		v.AddArg(x)
 11382  		return true
 11383  	}
 11384  }
 11385  func rewriteValue386_OpNeg32F(v *Value, config *Config) bool {
 11386  	b := v.Block
 11387  	_ = b
 11388  	// match: (Neg32F x)
 11389  	// cond: !config.use387
 11390  	// result: (PXOR x (MOVSSconst <config.Frontend().TypeFloat32()> [f2i(math.Copysign(0, -1))]))
 11391  	for {
 11392  		x := v.Args[0]
 11393  		if !(!config.use387) {
 11394  			break
 11395  		}
 11396  		v.reset(Op386PXOR)
 11397  		v.AddArg(x)
 11398  		v0 := b.NewValue0(v.Line, Op386MOVSSconst, config.Frontend().TypeFloat32())
 11399  		v0.AuxInt = f2i(math.Copysign(0, -1))
 11400  		v.AddArg(v0)
 11401  		return true
 11402  	}
 11403  	// match: (Neg32F x)
 11404  	// cond: config.use387
 11405  	// result: (FCHS x)
 11406  	for {
 11407  		x := v.Args[0]
 11408  		if !(config.use387) {
 11409  			break
 11410  		}
 11411  		v.reset(Op386FCHS)
 11412  		v.AddArg(x)
 11413  		return true
 11414  	}
 11415  	return false
 11416  }
 11417  func rewriteValue386_OpNeg64F(v *Value, config *Config) bool {
 11418  	b := v.Block
 11419  	_ = b
 11420  	// match: (Neg64F x)
 11421  	// cond: !config.use387
 11422  	// result: (PXOR x (MOVSDconst <config.Frontend().TypeFloat64()> [f2i(math.Copysign(0, -1))]))
 11423  	for {
 11424  		x := v.Args[0]
 11425  		if !(!config.use387) {
 11426  			break
 11427  		}
 11428  		v.reset(Op386PXOR)
 11429  		v.AddArg(x)
 11430  		v0 := b.NewValue0(v.Line, Op386MOVSDconst, config.Frontend().TypeFloat64())
 11431  		v0.AuxInt = f2i(math.Copysign(0, -1))
 11432  		v.AddArg(v0)
 11433  		return true
 11434  	}
 11435  	// match: (Neg64F x)
 11436  	// cond: config.use387
 11437  	// result: (FCHS x)
 11438  	for {
 11439  		x := v.Args[0]
 11440  		if !(config.use387) {
 11441  			break
 11442  		}
 11443  		v.reset(Op386FCHS)
 11444  		v.AddArg(x)
 11445  		return true
 11446  	}
 11447  	return false
 11448  }
 11449  func rewriteValue386_OpNeg8(v *Value, config *Config) bool {
 11450  	b := v.Block
 11451  	_ = b
 11452  	// match: (Neg8   x)
 11453  	// cond:
 11454  	// result: (NEGL x)
 11455  	for {
 11456  		x := v.Args[0]
 11457  		v.reset(Op386NEGL)
 11458  		v.AddArg(x)
 11459  		return true
 11460  	}
 11461  }
 11462  func rewriteValue386_OpNeq16(v *Value, config *Config) bool {
 11463  	b := v.Block
 11464  	_ = b
 11465  	// match: (Neq16  x y)
 11466  	// cond:
 11467  	// result: (SETNE (CMPW x y))
 11468  	for {
 11469  		x := v.Args[0]
 11470  		y := v.Args[1]
 11471  		v.reset(Op386SETNE)
 11472  		v0 := b.NewValue0(v.Line, Op386CMPW, TypeFlags)
 11473  		v0.AddArg(x)
 11474  		v0.AddArg(y)
 11475  		v.AddArg(v0)
 11476  		return true
 11477  	}
 11478  }
 11479  func rewriteValue386_OpNeq32(v *Value, config *Config) bool {
 11480  	b := v.Block
 11481  	_ = b
 11482  	// match: (Neq32  x y)
 11483  	// cond:
 11484  	// result: (SETNE (CMPL x y))
 11485  	for {
 11486  		x := v.Args[0]
 11487  		y := v.Args[1]
 11488  		v.reset(Op386SETNE)
 11489  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
 11490  		v0.AddArg(x)
 11491  		v0.AddArg(y)
 11492  		v.AddArg(v0)
 11493  		return true
 11494  	}
 11495  }
 11496  func rewriteValue386_OpNeq32F(v *Value, config *Config) bool {
 11497  	b := v.Block
 11498  	_ = b
 11499  	// match: (Neq32F x y)
 11500  	// cond:
 11501  	// result: (SETNEF (UCOMISS x y))
 11502  	for {
 11503  		x := v.Args[0]
 11504  		y := v.Args[1]
 11505  		v.reset(Op386SETNEF)
 11506  		v0 := b.NewValue0(v.Line, Op386UCOMISS, TypeFlags)
 11507  		v0.AddArg(x)
 11508  		v0.AddArg(y)
 11509  		v.AddArg(v0)
 11510  		return true
 11511  	}
 11512  }
 11513  func rewriteValue386_OpNeq64F(v *Value, config *Config) bool {
 11514  	b := v.Block
 11515  	_ = b
 11516  	// match: (Neq64F x y)
 11517  	// cond:
 11518  	// result: (SETNEF (UCOMISD x y))
 11519  	for {
 11520  		x := v.Args[0]
 11521  		y := v.Args[1]
 11522  		v.reset(Op386SETNEF)
 11523  		v0 := b.NewValue0(v.Line, Op386UCOMISD, TypeFlags)
 11524  		v0.AddArg(x)
 11525  		v0.AddArg(y)
 11526  		v.AddArg(v0)
 11527  		return true
 11528  	}
 11529  }
 11530  func rewriteValue386_OpNeq8(v *Value, config *Config) bool {
 11531  	b := v.Block
 11532  	_ = b
 11533  	// match: (Neq8   x y)
 11534  	// cond:
 11535  	// result: (SETNE (CMPB x y))
 11536  	for {
 11537  		x := v.Args[0]
 11538  		y := v.Args[1]
 11539  		v.reset(Op386SETNE)
 11540  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
 11541  		v0.AddArg(x)
 11542  		v0.AddArg(y)
 11543  		v.AddArg(v0)
 11544  		return true
 11545  	}
 11546  }
 11547  func rewriteValue386_OpNeqB(v *Value, config *Config) bool {
 11548  	b := v.Block
 11549  	_ = b
 11550  	// match: (NeqB   x y)
 11551  	// cond:
 11552  	// result: (SETNE (CMPB x y))
 11553  	for {
 11554  		x := v.Args[0]
 11555  		y := v.Args[1]
 11556  		v.reset(Op386SETNE)
 11557  		v0 := b.NewValue0(v.Line, Op386CMPB, TypeFlags)
 11558  		v0.AddArg(x)
 11559  		v0.AddArg(y)
 11560  		v.AddArg(v0)
 11561  		return true
 11562  	}
 11563  }
 11564  func rewriteValue386_OpNeqPtr(v *Value, config *Config) bool {
 11565  	b := v.Block
 11566  	_ = b
 11567  	// match: (NeqPtr x y)
 11568  	// cond:
 11569  	// result: (SETNE (CMPL x y))
 11570  	for {
 11571  		x := v.Args[0]
 11572  		y := v.Args[1]
 11573  		v.reset(Op386SETNE)
 11574  		v0 := b.NewValue0(v.Line, Op386CMPL, TypeFlags)
 11575  		v0.AddArg(x)
 11576  		v0.AddArg(y)
 11577  		v.AddArg(v0)
 11578  		return true
 11579  	}
 11580  }
 11581  func rewriteValue386_OpNilCheck(v *Value, config *Config) bool {
 11582  	b := v.Block
 11583  	_ = b
 11584  	// match: (NilCheck ptr mem)
 11585  	// cond:
 11586  	// result: (LoweredNilCheck ptr mem)
 11587  	for {
 11588  		ptr := v.Args[0]
 11589  		mem := v.Args[1]
 11590  		v.reset(Op386LoweredNilCheck)
 11591  		v.AddArg(ptr)
 11592  		v.AddArg(mem)
 11593  		return true
 11594  	}
 11595  }
 11596  func rewriteValue386_OpNot(v *Value, config *Config) bool {
 11597  	b := v.Block
 11598  	_ = b
 11599  	// match: (Not x)
 11600  	// cond:
 11601  	// result: (XORLconst [1] x)
 11602  	for {
 11603  		x := v.Args[0]
 11604  		v.reset(Op386XORLconst)
 11605  		v.AuxInt = 1
 11606  		v.AddArg(x)
 11607  		return true
 11608  	}
 11609  }
 11610  func rewriteValue386_OpOffPtr(v *Value, config *Config) bool {
 11611  	b := v.Block
 11612  	_ = b
 11613  	// match: (OffPtr [off] ptr)
 11614  	// cond:
 11615  	// result: (ADDLconst [off] ptr)
 11616  	for {
 11617  		off := v.AuxInt
 11618  		ptr := v.Args[0]
 11619  		v.reset(Op386ADDLconst)
 11620  		v.AuxInt = off
 11621  		v.AddArg(ptr)
 11622  		return true
 11623  	}
 11624  }
 11625  func rewriteValue386_OpOr16(v *Value, config *Config) bool {
 11626  	b := v.Block
 11627  	_ = b
 11628  	// match: (Or16 x y)
 11629  	// cond:
 11630  	// result: (ORL x y)
 11631  	for {
 11632  		x := v.Args[0]
 11633  		y := v.Args[1]
 11634  		v.reset(Op386ORL)
 11635  		v.AddArg(x)
 11636  		v.AddArg(y)
 11637  		return true
 11638  	}
 11639  }
 11640  func rewriteValue386_OpOr32(v *Value, config *Config) bool {
 11641  	b := v.Block
 11642  	_ = b
 11643  	// match: (Or32 x y)
 11644  	// cond:
 11645  	// result: (ORL x y)
 11646  	for {
 11647  		x := v.Args[0]
 11648  		y := v.Args[1]
 11649  		v.reset(Op386ORL)
 11650  		v.AddArg(x)
 11651  		v.AddArg(y)
 11652  		return true
 11653  	}
 11654  }
 11655  func rewriteValue386_OpOr8(v *Value, config *Config) bool {
 11656  	b := v.Block
 11657  	_ = b
 11658  	// match: (Or8  x y)
 11659  	// cond:
 11660  	// result: (ORL x y)
 11661  	for {
 11662  		x := v.Args[0]
 11663  		y := v.Args[1]
 11664  		v.reset(Op386ORL)
 11665  		v.AddArg(x)
 11666  		v.AddArg(y)
 11667  		return true
 11668  	}
 11669  }
 11670  func rewriteValue386_OpOrB(v *Value, config *Config) bool {
 11671  	b := v.Block
 11672  	_ = b
 11673  	// match: (OrB x y)
 11674  	// cond:
 11675  	// result: (ORL x y)
 11676  	for {
 11677  		x := v.Args[0]
 11678  		y := v.Args[1]
 11679  		v.reset(Op386ORL)
 11680  		v.AddArg(x)
 11681  		v.AddArg(y)
 11682  		return true
 11683  	}
 11684  }
 11685  func rewriteValue386_OpRsh16Ux16(v *Value, config *Config) bool {
 11686  	b := v.Block
 11687  	_ = b
 11688  	// match: (Rsh16Ux16 <t> x y)
 11689  	// cond:
 11690  	// result: (ANDL (SHRW <t> x y) (SBBLcarrymask <t> (CMPWconst y [16])))
 11691  	for {
 11692  		t := v.Type
 11693  		x := v.Args[0]
 11694  		y := v.Args[1]
 11695  		v.reset(Op386ANDL)
 11696  		v0 := b.NewValue0(v.Line, Op386SHRW, t)
 11697  		v0.AddArg(x)
 11698  		v0.AddArg(y)
 11699  		v.AddArg(v0)
 11700  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 11701  		v2 := b.NewValue0(v.Line, Op386CMPWconst, TypeFlags)
 11702  		v2.AuxInt = 16
 11703  		v2.AddArg(y)
 11704  		v1.AddArg(v2)
 11705  		v.AddArg(v1)
 11706  		return true
 11707  	}
 11708  }
 11709  func rewriteValue386_OpRsh16Ux32(v *Value, config *Config) bool {
 11710  	b := v.Block
 11711  	_ = b
 11712  	// match: (Rsh16Ux32 <t> x y)
 11713  	// cond:
 11714  	// result: (ANDL (SHRW <t> x y) (SBBLcarrymask <t> (CMPLconst y [16])))
 11715  	for {
 11716  		t := v.Type
 11717  		x := v.Args[0]
 11718  		y := v.Args[1]
 11719  		v.reset(Op386ANDL)
 11720  		v0 := b.NewValue0(v.Line, Op386SHRW, t)
 11721  		v0.AddArg(x)
 11722  		v0.AddArg(y)
 11723  		v.AddArg(v0)
 11724  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 11725  		v2 := b.NewValue0(v.Line, Op386CMPLconst, TypeFlags)
 11726  		v2.AuxInt = 16
 11727  		v2.AddArg(y)
 11728  		v1.AddArg(v2)
 11729  		v.AddArg(v1)
 11730  		return true
 11731  	}
 11732  }
 11733  func rewriteValue386_OpRsh16Ux64(v *Value, config *Config) bool {
 11734  	b := v.Block
 11735  	_ = b
 11736  	// match: (Rsh16Ux64 x (Const64 [c]))
 11737  	// cond: uint64(c) < 16
 11738  	// result: (SHRWconst x [c])
 11739  	for {
 11740  		x := v.Args[0]
 11741  		v_1 := v.Args[1]
 11742  		if v_1.Op != OpConst64 {
 11743  			break
 11744  		}
 11745  		c := v_1.AuxInt
 11746  		if !(uint64(c) < 16) {
 11747  			break
 11748  		}
 11749  		v.reset(Op386SHRWconst)
 11750  		v.AuxInt = c
 11751  		v.AddArg(x)
 11752  		return true
 11753  	}
 11754  	// match: (Rsh16Ux64 _ (Const64 [c]))
 11755  	// cond: uint64(c) >= 16
 11756  	// result: (Const16 [0])
 11757  	for {
 11758  		v_1 := v.Args[1]
 11759  		if v_1.Op != OpConst64 {
 11760  			break
 11761  		}
 11762  		c := v_1.AuxInt
 11763  		if !(uint64(c) >= 16) {
 11764  			break
 11765  		}
 11766  		v.reset(OpConst16)
 11767  		v.AuxInt = 0
 11768  		return true
 11769  	}
 11770  	return false
 11771  }
 11772  func rewriteValue386_OpRsh16Ux8(v *Value, config *Config) bool {
 11773  	b := v.Block
 11774  	_ = b
 11775  	// match: (Rsh16Ux8  <t> x y)
 11776  	// cond:
 11777  	// result: (ANDL (SHRW <t> x y) (SBBLcarrymask <t> (CMPBconst y [16])))
 11778  	for {
 11779  		t := v.Type
 11780  		x := v.Args[0]
 11781  		y := v.Args[1]
 11782  		v.reset(Op386ANDL)
 11783  		v0 := b.NewValue0(v.Line, Op386SHRW, t)
 11784  		v0.AddArg(x)
 11785  		v0.AddArg(y)
 11786  		v.AddArg(v0)
 11787  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 11788  		v2 := b.NewValue0(v.Line, Op386CMPBconst, TypeFlags)
 11789  		v2.AuxInt = 16
 11790  		v2.AddArg(y)
 11791  		v1.AddArg(v2)
 11792  		v.AddArg(v1)
 11793  		return true
 11794  	}
 11795  }
 11796  func rewriteValue386_OpRsh16x16(v *Value, config *Config) bool {
 11797  	b := v.Block
 11798  	_ = b
 11799  	// match: (Rsh16x16 <t> x y)
 11800  	// cond:
 11801  	// result: (SARW <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPWconst y [16])))))
 11802  	for {
 11803  		t := v.Type
 11804  		x := v.Args[0]
 11805  		y := v.Args[1]
 11806  		v.reset(Op386SARW)
 11807  		v.Type = t
 11808  		v.AddArg(x)
 11809  		v0 := b.NewValue0(v.Line, Op386ORL, y.Type)
 11810  		v0.AddArg(y)
 11811  		v1 := b.NewValue0(v.Line, Op386NOTL, y.Type)
 11812  		v2 := b.NewValue0(v.Line, Op386SBBLcarrymask, y.Type)
 11813  		v3 := b.NewValue0(v.Line, Op386CMPWconst, TypeFlags)
 11814  		v3.AuxInt = 16
 11815  		v3.AddArg(y)
 11816  		v2.AddArg(v3)
 11817  		v1.AddArg(v2)
 11818  		v0.AddArg(v1)
 11819  		v.AddArg(v0)
 11820  		return true
 11821  	}
 11822  }
 11823  func rewriteValue386_OpRsh16x32(v *Value, config *Config) bool {
 11824  	b := v.Block
 11825  	_ = b
 11826  	// match: (Rsh16x32 <t> x y)
 11827  	// cond:
 11828  	// result: (SARW <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPLconst y [16])))))
 11829  	for {
 11830  		t := v.Type
 11831  		x := v.Args[0]
 11832  		y := v.Args[1]
 11833  		v.reset(Op386SARW)
 11834  		v.Type = t
 11835  		v.AddArg(x)
 11836  		v0 := b.NewValue0(v.Line, Op386ORL, y.Type)
 11837  		v0.AddArg(y)
 11838  		v1 := b.NewValue0(v.Line, Op386NOTL, y.Type)
 11839  		v2 := b.NewValue0(v.Line, Op386SBBLcarrymask, y.Type)
 11840  		v3 := b.NewValue0(v.Line, Op386CMPLconst, TypeFlags)
 11841  		v3.AuxInt = 16
 11842  		v3.AddArg(y)
 11843  		v2.AddArg(v3)
 11844  		v1.AddArg(v2)
 11845  		v0.AddArg(v1)
 11846  		v.AddArg(v0)
 11847  		return true
 11848  	}
 11849  }
 11850  func rewriteValue386_OpRsh16x64(v *Value, config *Config) bool {
 11851  	b := v.Block
 11852  	_ = b
 11853  	// match: (Rsh16x64 x (Const64 [c]))
 11854  	// cond: uint64(c) < 16
 11855  	// result: (SARWconst x [c])
 11856  	for {
 11857  		x := v.Args[0]
 11858  		v_1 := v.Args[1]
 11859  		if v_1.Op != OpConst64 {
 11860  			break
 11861  		}
 11862  		c := v_1.AuxInt
 11863  		if !(uint64(c) < 16) {
 11864  			break
 11865  		}
 11866  		v.reset(Op386SARWconst)
 11867  		v.AuxInt = c
 11868  		v.AddArg(x)
 11869  		return true
 11870  	}
 11871  	// match: (Rsh16x64 x (Const64 [c]))
 11872  	// cond: uint64(c) >= 16
 11873  	// result: (SARWconst x [15])
 11874  	for {
 11875  		x := v.Args[0]
 11876  		v_1 := v.Args[1]
 11877  		if v_1.Op != OpConst64 {
 11878  			break
 11879  		}
 11880  		c := v_1.AuxInt
 11881  		if !(uint64(c) >= 16) {
 11882  			break
 11883  		}
 11884  		v.reset(Op386SARWconst)
 11885  		v.AuxInt = 15
 11886  		v.AddArg(x)
 11887  		return true
 11888  	}
 11889  	return false
 11890  }
 11891  func rewriteValue386_OpRsh16x8(v *Value, config *Config) bool {
 11892  	b := v.Block
 11893  	_ = b
 11894  	// match: (Rsh16x8  <t> x y)
 11895  	// cond:
 11896  	// result: (SARW <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPBconst y [16])))))
 11897  	for {
 11898  		t := v.Type
 11899  		x := v.Args[0]
 11900  		y := v.Args[1]
 11901  		v.reset(Op386SARW)
 11902  		v.Type = t
 11903  		v.AddArg(x)
 11904  		v0 := b.NewValue0(v.Line, Op386ORL, y.Type)
 11905  		v0.AddArg(y)
 11906  		v1 := b.NewValue0(v.Line, Op386NOTL, y.Type)
 11907  		v2 := b.NewValue0(v.Line, Op386SBBLcarrymask, y.Type)
 11908  		v3 := b.NewValue0(v.Line, Op386CMPBconst, TypeFlags)
 11909  		v3.AuxInt = 16
 11910  		v3.AddArg(y)
 11911  		v2.AddArg(v3)
 11912  		v1.AddArg(v2)
 11913  		v0.AddArg(v1)
 11914  		v.AddArg(v0)
 11915  		return true
 11916  	}
 11917  }
 11918  func rewriteValue386_OpRsh32Ux16(v *Value, config *Config) bool {
 11919  	b := v.Block
 11920  	_ = b
 11921  	// match: (Rsh32Ux16 <t> x y)
 11922  	// cond:
 11923  	// result: (ANDL (SHRL <t> x y) (SBBLcarrymask <t> (CMPWconst y [32])))
 11924  	for {
 11925  		t := v.Type
 11926  		x := v.Args[0]
 11927  		y := v.Args[1]
 11928  		v.reset(Op386ANDL)
 11929  		v0 := b.NewValue0(v.Line, Op386SHRL, t)
 11930  		v0.AddArg(x)
 11931  		v0.AddArg(y)
 11932  		v.AddArg(v0)
 11933  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 11934  		v2 := b.NewValue0(v.Line, Op386CMPWconst, TypeFlags)
 11935  		v2.AuxInt = 32
 11936  		v2.AddArg(y)
 11937  		v1.AddArg(v2)
 11938  		v.AddArg(v1)
 11939  		return true
 11940  	}
 11941  }
 11942  func rewriteValue386_OpRsh32Ux32(v *Value, config *Config) bool {
 11943  	b := v.Block
 11944  	_ = b
 11945  	// match: (Rsh32Ux32 <t> x y)
 11946  	// cond:
 11947  	// result: (ANDL (SHRL <t> x y) (SBBLcarrymask <t> (CMPLconst y [32])))
 11948  	for {
 11949  		t := v.Type
 11950  		x := v.Args[0]
 11951  		y := v.Args[1]
 11952  		v.reset(Op386ANDL)
 11953  		v0 := b.NewValue0(v.Line, Op386SHRL, t)
 11954  		v0.AddArg(x)
 11955  		v0.AddArg(y)
 11956  		v.AddArg(v0)
 11957  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 11958  		v2 := b.NewValue0(v.Line, Op386CMPLconst, TypeFlags)
 11959  		v2.AuxInt = 32
 11960  		v2.AddArg(y)
 11961  		v1.AddArg(v2)
 11962  		v.AddArg(v1)
 11963  		return true
 11964  	}
 11965  }
 11966  func rewriteValue386_OpRsh32Ux64(v *Value, config *Config) bool {
 11967  	b := v.Block
 11968  	_ = b
 11969  	// match: (Rsh32Ux64 x (Const64 [c]))
 11970  	// cond: uint64(c) < 32
 11971  	// result: (SHRLconst x [c])
 11972  	for {
 11973  		x := v.Args[0]
 11974  		v_1 := v.Args[1]
 11975  		if v_1.Op != OpConst64 {
 11976  			break
 11977  		}
 11978  		c := v_1.AuxInt
 11979  		if !(uint64(c) < 32) {
 11980  			break
 11981  		}
 11982  		v.reset(Op386SHRLconst)
 11983  		v.AuxInt = c
 11984  		v.AddArg(x)
 11985  		return true
 11986  	}
 11987  	// match: (Rsh32Ux64 _ (Const64 [c]))
 11988  	// cond: uint64(c) >= 32
 11989  	// result: (Const32 [0])
 11990  	for {
 11991  		v_1 := v.Args[1]
 11992  		if v_1.Op != OpConst64 {
 11993  			break
 11994  		}
 11995  		c := v_1.AuxInt
 11996  		if !(uint64(c) >= 32) {
 11997  			break
 11998  		}
 11999  		v.reset(OpConst32)
 12000  		v.AuxInt = 0
 12001  		return true
 12002  	}
 12003  	return false
 12004  }
 12005  func rewriteValue386_OpRsh32Ux8(v *Value, config *Config) bool {
 12006  	b := v.Block
 12007  	_ = b
 12008  	// match: (Rsh32Ux8  <t> x y)
 12009  	// cond:
 12010  	// result: (ANDL (SHRL <t> x y) (SBBLcarrymask <t> (CMPBconst y [32])))
 12011  	for {
 12012  		t := v.Type
 12013  		x := v.Args[0]
 12014  		y := v.Args[1]
 12015  		v.reset(Op386ANDL)
 12016  		v0 := b.NewValue0(v.Line, Op386SHRL, t)
 12017  		v0.AddArg(x)
 12018  		v0.AddArg(y)
 12019  		v.AddArg(v0)
 12020  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 12021  		v2 := b.NewValue0(v.Line, Op386CMPBconst, TypeFlags)
 12022  		v2.AuxInt = 32
 12023  		v2.AddArg(y)
 12024  		v1.AddArg(v2)
 12025  		v.AddArg(v1)
 12026  		return true
 12027  	}
 12028  }
 12029  func rewriteValue386_OpRsh32x16(v *Value, config *Config) bool {
 12030  	b := v.Block
 12031  	_ = b
 12032  	// match: (Rsh32x16 <t> x y)
 12033  	// cond:
 12034  	// result: (SARL <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPWconst y [32])))))
 12035  	for {
 12036  		t := v.Type
 12037  		x := v.Args[0]
 12038  		y := v.Args[1]
 12039  		v.reset(Op386SARL)
 12040  		v.Type = t
 12041  		v.AddArg(x)
 12042  		v0 := b.NewValue0(v.Line, Op386ORL, y.Type)
 12043  		v0.AddArg(y)
 12044  		v1 := b.NewValue0(v.Line, Op386NOTL, y.Type)
 12045  		v2 := b.NewValue0(v.Line, Op386SBBLcarrymask, y.Type)
 12046  		v3 := b.NewValue0(v.Line, Op386CMPWconst, TypeFlags)
 12047  		v3.AuxInt = 32
 12048  		v3.AddArg(y)
 12049  		v2.AddArg(v3)
 12050  		v1.AddArg(v2)
 12051  		v0.AddArg(v1)
 12052  		v.AddArg(v0)
 12053  		return true
 12054  	}
 12055  }
 12056  func rewriteValue386_OpRsh32x32(v *Value, config *Config) bool {
 12057  	b := v.Block
 12058  	_ = b
 12059  	// match: (Rsh32x32 <t> x y)
 12060  	// cond:
 12061  	// result: (SARL <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPLconst y [32])))))
 12062  	for {
 12063  		t := v.Type
 12064  		x := v.Args[0]
 12065  		y := v.Args[1]
 12066  		v.reset(Op386SARL)
 12067  		v.Type = t
 12068  		v.AddArg(x)
 12069  		v0 := b.NewValue0(v.Line, Op386ORL, y.Type)
 12070  		v0.AddArg(y)
 12071  		v1 := b.NewValue0(v.Line, Op386NOTL, y.Type)
 12072  		v2 := b.NewValue0(v.Line, Op386SBBLcarrymask, y.Type)
 12073  		v3 := b.NewValue0(v.Line, Op386CMPLconst, TypeFlags)
 12074  		v3.AuxInt = 32
 12075  		v3.AddArg(y)
 12076  		v2.AddArg(v3)
 12077  		v1.AddArg(v2)
 12078  		v0.AddArg(v1)
 12079  		v.AddArg(v0)
 12080  		return true
 12081  	}
 12082  }
 12083  func rewriteValue386_OpRsh32x64(v *Value, config *Config) bool {
 12084  	b := v.Block
 12085  	_ = b
 12086  	// match: (Rsh32x64 x (Const64 [c]))
 12087  	// cond: uint64(c) < 32
 12088  	// result: (SARLconst x [c])
 12089  	for {
 12090  		x := v.Args[0]
 12091  		v_1 := v.Args[1]
 12092  		if v_1.Op != OpConst64 {
 12093  			break
 12094  		}
 12095  		c := v_1.AuxInt
 12096  		if !(uint64(c) < 32) {
 12097  			break
 12098  		}
 12099  		v.reset(Op386SARLconst)
 12100  		v.AuxInt = c
 12101  		v.AddArg(x)
 12102  		return true
 12103  	}
 12104  	// match: (Rsh32x64 x (Const64 [c]))
 12105  	// cond: uint64(c) >= 32
 12106  	// result: (SARLconst x [31])
 12107  	for {
 12108  		x := v.Args[0]
 12109  		v_1 := v.Args[1]
 12110  		if v_1.Op != OpConst64 {
 12111  			break
 12112  		}
 12113  		c := v_1.AuxInt
 12114  		if !(uint64(c) >= 32) {
 12115  			break
 12116  		}
 12117  		v.reset(Op386SARLconst)
 12118  		v.AuxInt = 31
 12119  		v.AddArg(x)
 12120  		return true
 12121  	}
 12122  	return false
 12123  }
 12124  func rewriteValue386_OpRsh32x8(v *Value, config *Config) bool {
 12125  	b := v.Block
 12126  	_ = b
 12127  	// match: (Rsh32x8  <t> x y)
 12128  	// cond:
 12129  	// result: (SARL <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPBconst y [32])))))
 12130  	for {
 12131  		t := v.Type
 12132  		x := v.Args[0]
 12133  		y := v.Args[1]
 12134  		v.reset(Op386SARL)
 12135  		v.Type = t
 12136  		v.AddArg(x)
 12137  		v0 := b.NewValue0(v.Line, Op386ORL, y.Type)
 12138  		v0.AddArg(y)
 12139  		v1 := b.NewValue0(v.Line, Op386NOTL, y.Type)
 12140  		v2 := b.NewValue0(v.Line, Op386SBBLcarrymask, y.Type)
 12141  		v3 := b.NewValue0(v.Line, Op386CMPBconst, TypeFlags)
 12142  		v3.AuxInt = 32
 12143  		v3.AddArg(y)
 12144  		v2.AddArg(v3)
 12145  		v1.AddArg(v2)
 12146  		v0.AddArg(v1)
 12147  		v.AddArg(v0)
 12148  		return true
 12149  	}
 12150  }
 12151  func rewriteValue386_OpRsh8Ux16(v *Value, config *Config) bool {
 12152  	b := v.Block
 12153  	_ = b
 12154  	// match: (Rsh8Ux16 <t> x y)
 12155  	// cond:
 12156  	// result: (ANDL (SHRB <t> x y) (SBBLcarrymask <t> (CMPWconst y [8])))
 12157  	for {
 12158  		t := v.Type
 12159  		x := v.Args[0]
 12160  		y := v.Args[1]
 12161  		v.reset(Op386ANDL)
 12162  		v0 := b.NewValue0(v.Line, Op386SHRB, t)
 12163  		v0.AddArg(x)
 12164  		v0.AddArg(y)
 12165  		v.AddArg(v0)
 12166  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 12167  		v2 := b.NewValue0(v.Line, Op386CMPWconst, TypeFlags)
 12168  		v2.AuxInt = 8
 12169  		v2.AddArg(y)
 12170  		v1.AddArg(v2)
 12171  		v.AddArg(v1)
 12172  		return true
 12173  	}
 12174  }
 12175  func rewriteValue386_OpRsh8Ux32(v *Value, config *Config) bool {
 12176  	b := v.Block
 12177  	_ = b
 12178  	// match: (Rsh8Ux32 <t> x y)
 12179  	// cond:
 12180  	// result: (ANDL (SHRB <t> x y) (SBBLcarrymask <t> (CMPLconst y [8])))
 12181  	for {
 12182  		t := v.Type
 12183  		x := v.Args[0]
 12184  		y := v.Args[1]
 12185  		v.reset(Op386ANDL)
 12186  		v0 := b.NewValue0(v.Line, Op386SHRB, t)
 12187  		v0.AddArg(x)
 12188  		v0.AddArg(y)
 12189  		v.AddArg(v0)
 12190  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 12191  		v2 := b.NewValue0(v.Line, Op386CMPLconst, TypeFlags)
 12192  		v2.AuxInt = 8
 12193  		v2.AddArg(y)
 12194  		v1.AddArg(v2)
 12195  		v.AddArg(v1)
 12196  		return true
 12197  	}
 12198  }
 12199  func rewriteValue386_OpRsh8Ux64(v *Value, config *Config) bool {
 12200  	b := v.Block
 12201  	_ = b
 12202  	// match: (Rsh8Ux64 x (Const64 [c]))
 12203  	// cond: uint64(c) < 8
 12204  	// result: (SHRBconst x [c])
 12205  	for {
 12206  		x := v.Args[0]
 12207  		v_1 := v.Args[1]
 12208  		if v_1.Op != OpConst64 {
 12209  			break
 12210  		}
 12211  		c := v_1.AuxInt
 12212  		if !(uint64(c) < 8) {
 12213  			break
 12214  		}
 12215  		v.reset(Op386SHRBconst)
 12216  		v.AuxInt = c
 12217  		v.AddArg(x)
 12218  		return true
 12219  	}
 12220  	// match: (Rsh8Ux64 _ (Const64 [c]))
 12221  	// cond: uint64(c) >= 8
 12222  	// result: (Const8 [0])
 12223  	for {
 12224  		v_1 := v.Args[1]
 12225  		if v_1.Op != OpConst64 {
 12226  			break
 12227  		}
 12228  		c := v_1.AuxInt
 12229  		if !(uint64(c) >= 8) {
 12230  			break
 12231  		}
 12232  		v.reset(OpConst8)
 12233  		v.AuxInt = 0
 12234  		return true
 12235  	}
 12236  	return false
 12237  }
 12238  func rewriteValue386_OpRsh8Ux8(v *Value, config *Config) bool {
 12239  	b := v.Block
 12240  	_ = b
 12241  	// match: (Rsh8Ux8  <t> x y)
 12242  	// cond:
 12243  	// result: (ANDL (SHRB <t> x y) (SBBLcarrymask <t> (CMPBconst y [8])))
 12244  	for {
 12245  		t := v.Type
 12246  		x := v.Args[0]
 12247  		y := v.Args[1]
 12248  		v.reset(Op386ANDL)
 12249  		v0 := b.NewValue0(v.Line, Op386SHRB, t)
 12250  		v0.AddArg(x)
 12251  		v0.AddArg(y)
 12252  		v.AddArg(v0)
 12253  		v1 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 12254  		v2 := b.NewValue0(v.Line, Op386CMPBconst, TypeFlags)
 12255  		v2.AuxInt = 8
 12256  		v2.AddArg(y)
 12257  		v1.AddArg(v2)
 12258  		v.AddArg(v1)
 12259  		return true
 12260  	}
 12261  }
 12262  func rewriteValue386_OpRsh8x16(v *Value, config *Config) bool {
 12263  	b := v.Block
 12264  	_ = b
 12265  	// match: (Rsh8x16 <t> x y)
 12266  	// cond:
 12267  	// result: (SARB <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPWconst y [8])))))
 12268  	for {
 12269  		t := v.Type
 12270  		x := v.Args[0]
 12271  		y := v.Args[1]
 12272  		v.reset(Op386SARB)
 12273  		v.Type = t
 12274  		v.AddArg(x)
 12275  		v0 := b.NewValue0(v.Line, Op386ORL, y.Type)
 12276  		v0.AddArg(y)
 12277  		v1 := b.NewValue0(v.Line, Op386NOTL, y.Type)
 12278  		v2 := b.NewValue0(v.Line, Op386SBBLcarrymask, y.Type)
 12279  		v3 := b.NewValue0(v.Line, Op386CMPWconst, TypeFlags)
 12280  		v3.AuxInt = 8
 12281  		v3.AddArg(y)
 12282  		v2.AddArg(v3)
 12283  		v1.AddArg(v2)
 12284  		v0.AddArg(v1)
 12285  		v.AddArg(v0)
 12286  		return true
 12287  	}
 12288  }
 12289  func rewriteValue386_OpRsh8x32(v *Value, config *Config) bool {
 12290  	b := v.Block
 12291  	_ = b
 12292  	// match: (Rsh8x32 <t> x y)
 12293  	// cond:
 12294  	// result: (SARB <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPLconst y [8])))))
 12295  	for {
 12296  		t := v.Type
 12297  		x := v.Args[0]
 12298  		y := v.Args[1]
 12299  		v.reset(Op386SARB)
 12300  		v.Type = t
 12301  		v.AddArg(x)
 12302  		v0 := b.NewValue0(v.Line, Op386ORL, y.Type)
 12303  		v0.AddArg(y)
 12304  		v1 := b.NewValue0(v.Line, Op386NOTL, y.Type)
 12305  		v2 := b.NewValue0(v.Line, Op386SBBLcarrymask, y.Type)
 12306  		v3 := b.NewValue0(v.Line, Op386CMPLconst, TypeFlags)
 12307  		v3.AuxInt = 8
 12308  		v3.AddArg(y)
 12309  		v2.AddArg(v3)
 12310  		v1.AddArg(v2)
 12311  		v0.AddArg(v1)
 12312  		v.AddArg(v0)
 12313  		return true
 12314  	}
 12315  }
 12316  func rewriteValue386_OpRsh8x64(v *Value, config *Config) bool {
 12317  	b := v.Block
 12318  	_ = b
 12319  	// match: (Rsh8x64 x (Const64 [c]))
 12320  	// cond: uint64(c) < 8
 12321  	// result: (SARBconst x [c])
 12322  	for {
 12323  		x := v.Args[0]
 12324  		v_1 := v.Args[1]
 12325  		if v_1.Op != OpConst64 {
 12326  			break
 12327  		}
 12328  		c := v_1.AuxInt
 12329  		if !(uint64(c) < 8) {
 12330  			break
 12331  		}
 12332  		v.reset(Op386SARBconst)
 12333  		v.AuxInt = c
 12334  		v.AddArg(x)
 12335  		return true
 12336  	}
 12337  	// match: (Rsh8x64 x (Const64 [c]))
 12338  	// cond: uint64(c) >= 8
 12339  	// result: (SARBconst x [7])
 12340  	for {
 12341  		x := v.Args[0]
 12342  		v_1 := v.Args[1]
 12343  		if v_1.Op != OpConst64 {
 12344  			break
 12345  		}
 12346  		c := v_1.AuxInt
 12347  		if !(uint64(c) >= 8) {
 12348  			break
 12349  		}
 12350  		v.reset(Op386SARBconst)
 12351  		v.AuxInt = 7
 12352  		v.AddArg(x)
 12353  		return true
 12354  	}
 12355  	return false
 12356  }
 12357  func rewriteValue386_OpRsh8x8(v *Value, config *Config) bool {
 12358  	b := v.Block
 12359  	_ = b
 12360  	// match: (Rsh8x8  <t> x y)
 12361  	// cond:
 12362  	// result: (SARB <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPBconst y [8])))))
 12363  	for {
 12364  		t := v.Type
 12365  		x := v.Args[0]
 12366  		y := v.Args[1]
 12367  		v.reset(Op386SARB)
 12368  		v.Type = t
 12369  		v.AddArg(x)
 12370  		v0 := b.NewValue0(v.Line, Op386ORL, y.Type)
 12371  		v0.AddArg(y)
 12372  		v1 := b.NewValue0(v.Line, Op386NOTL, y.Type)
 12373  		v2 := b.NewValue0(v.Line, Op386SBBLcarrymask, y.Type)
 12374  		v3 := b.NewValue0(v.Line, Op386CMPBconst, TypeFlags)
 12375  		v3.AuxInt = 8
 12376  		v3.AddArg(y)
 12377  		v2.AddArg(v3)
 12378  		v1.AddArg(v2)
 12379  		v0.AddArg(v1)
 12380  		v.AddArg(v0)
 12381  		return true
 12382  	}
 12383  }
 12384  func rewriteValue386_OpSignExt16to32(v *Value, config *Config) bool {
 12385  	b := v.Block
 12386  	_ = b
 12387  	// match: (SignExt16to32 x)
 12388  	// cond:
 12389  	// result: (MOVWLSX x)
 12390  	for {
 12391  		x := v.Args[0]
 12392  		v.reset(Op386MOVWLSX)
 12393  		v.AddArg(x)
 12394  		return true
 12395  	}
 12396  }
 12397  func rewriteValue386_OpSignExt8to16(v *Value, config *Config) bool {
 12398  	b := v.Block
 12399  	_ = b
 12400  	// match: (SignExt8to16  x)
 12401  	// cond:
 12402  	// result: (MOVBLSX x)
 12403  	for {
 12404  		x := v.Args[0]
 12405  		v.reset(Op386MOVBLSX)
 12406  		v.AddArg(x)
 12407  		return true
 12408  	}
 12409  }
 12410  func rewriteValue386_OpSignExt8to32(v *Value, config *Config) bool {
 12411  	b := v.Block
 12412  	_ = b
 12413  	// match: (SignExt8to32  x)
 12414  	// cond:
 12415  	// result: (MOVBLSX x)
 12416  	for {
 12417  		x := v.Args[0]
 12418  		v.reset(Op386MOVBLSX)
 12419  		v.AddArg(x)
 12420  		return true
 12421  	}
 12422  }
 12423  func rewriteValue386_OpSignmask(v *Value, config *Config) bool {
 12424  	b := v.Block
 12425  	_ = b
 12426  	// match: (Signmask x)
 12427  	// cond:
 12428  	// result: (SARLconst x [31])
 12429  	for {
 12430  		x := v.Args[0]
 12431  		v.reset(Op386SARLconst)
 12432  		v.AuxInt = 31
 12433  		v.AddArg(x)
 12434  		return true
 12435  	}
 12436  }
 12437  func rewriteValue386_OpSlicemask(v *Value, config *Config) bool {
 12438  	b := v.Block
 12439  	_ = b
 12440  	// match: (Slicemask <t> x)
 12441  	// cond:
 12442  	// result: (XORLconst [-1] (SARLconst <t> (SUBLconst <t> x [1]) [31]))
 12443  	for {
 12444  		t := v.Type
 12445  		x := v.Args[0]
 12446  		v.reset(Op386XORLconst)
 12447  		v.AuxInt = -1
 12448  		v0 := b.NewValue0(v.Line, Op386SARLconst, t)
 12449  		v0.AuxInt = 31
 12450  		v1 := b.NewValue0(v.Line, Op386SUBLconst, t)
 12451  		v1.AuxInt = 1
 12452  		v1.AddArg(x)
 12453  		v0.AddArg(v1)
 12454  		v.AddArg(v0)
 12455  		return true
 12456  	}
 12457  }
 12458  func rewriteValue386_OpSqrt(v *Value, config *Config) bool {
 12459  	b := v.Block
 12460  	_ = b
 12461  	// match: (Sqrt x)
 12462  	// cond:
 12463  	// result: (SQRTSD x)
 12464  	for {
 12465  		x := v.Args[0]
 12466  		v.reset(Op386SQRTSD)
 12467  		v.AddArg(x)
 12468  		return true
 12469  	}
 12470  }
 12471  func rewriteValue386_OpStaticCall(v *Value, config *Config) bool {
 12472  	b := v.Block
 12473  	_ = b
 12474  	// match: (StaticCall [argwid] {target} mem)
 12475  	// cond:
 12476  	// result: (CALLstatic [argwid] {target} mem)
 12477  	for {
 12478  		argwid := v.AuxInt
 12479  		target := v.Aux
 12480  		mem := v.Args[0]
 12481  		v.reset(Op386CALLstatic)
 12482  		v.AuxInt = argwid
 12483  		v.Aux = target
 12484  		v.AddArg(mem)
 12485  		return true
 12486  	}
 12487  }
 12488  func rewriteValue386_OpStore(v *Value, config *Config) bool {
 12489  	b := v.Block
 12490  	_ = b
 12491  	// match: (Store [8] ptr val mem)
 12492  	// cond: is64BitFloat(val.Type)
 12493  	// result: (MOVSDstore ptr val mem)
 12494  	for {
 12495  		if v.AuxInt != 8 {
 12496  			break
 12497  		}
 12498  		ptr := v.Args[0]
 12499  		val := v.Args[1]
 12500  		mem := v.Args[2]
 12501  		if !(is64BitFloat(val.Type)) {
 12502  			break
 12503  		}
 12504  		v.reset(Op386MOVSDstore)
 12505  		v.AddArg(ptr)
 12506  		v.AddArg(val)
 12507  		v.AddArg(mem)
 12508  		return true
 12509  	}
 12510  	// match: (Store [4] ptr val mem)
 12511  	// cond: is32BitFloat(val.Type)
 12512  	// result: (MOVSSstore ptr val mem)
 12513  	for {
 12514  		if v.AuxInt != 4 {
 12515  			break
 12516  		}
 12517  		ptr := v.Args[0]
 12518  		val := v.Args[1]
 12519  		mem := v.Args[2]
 12520  		if !(is32BitFloat(val.Type)) {
 12521  			break
 12522  		}
 12523  		v.reset(Op386MOVSSstore)
 12524  		v.AddArg(ptr)
 12525  		v.AddArg(val)
 12526  		v.AddArg(mem)
 12527  		return true
 12528  	}
 12529  	// match: (Store [4] ptr val mem)
 12530  	// cond:
 12531  	// result: (MOVLstore ptr val mem)
 12532  	for {
 12533  		if v.AuxInt != 4 {
 12534  			break
 12535  		}
 12536  		ptr := v.Args[0]
 12537  		val := v.Args[1]
 12538  		mem := v.Args[2]
 12539  		v.reset(Op386MOVLstore)
 12540  		v.AddArg(ptr)
 12541  		v.AddArg(val)
 12542  		v.AddArg(mem)
 12543  		return true
 12544  	}
 12545  	// match: (Store [2] ptr val mem)
 12546  	// cond:
 12547  	// result: (MOVWstore ptr val mem)
 12548  	for {
 12549  		if v.AuxInt != 2 {
 12550  			break
 12551  		}
 12552  		ptr := v.Args[0]
 12553  		val := v.Args[1]
 12554  		mem := v.Args[2]
 12555  		v.reset(Op386MOVWstore)
 12556  		v.AddArg(ptr)
 12557  		v.AddArg(val)
 12558  		v.AddArg(mem)
 12559  		return true
 12560  	}
 12561  	// match: (Store [1] ptr val mem)
 12562  	// cond:
 12563  	// result: (MOVBstore ptr val mem)
 12564  	for {
 12565  		if v.AuxInt != 1 {
 12566  			break
 12567  		}
 12568  		ptr := v.Args[0]
 12569  		val := v.Args[1]
 12570  		mem := v.Args[2]
 12571  		v.reset(Op386MOVBstore)
 12572  		v.AddArg(ptr)
 12573  		v.AddArg(val)
 12574  		v.AddArg(mem)
 12575  		return true
 12576  	}
 12577  	return false
 12578  }
 12579  func rewriteValue386_OpSub16(v *Value, config *Config) bool {
 12580  	b := v.Block
 12581  	_ = b
 12582  	// match: (Sub16  x y)
 12583  	// cond:
 12584  	// result: (SUBL  x y)
 12585  	for {
 12586  		x := v.Args[0]
 12587  		y := v.Args[1]
 12588  		v.reset(Op386SUBL)
 12589  		v.AddArg(x)
 12590  		v.AddArg(y)
 12591  		return true
 12592  	}
 12593  }
 12594  func rewriteValue386_OpSub32(v *Value, config *Config) bool {
 12595  	b := v.Block
 12596  	_ = b
 12597  	// match: (Sub32  x y)
 12598  	// cond:
 12599  	// result: (SUBL  x y)
 12600  	for {
 12601  		x := v.Args[0]
 12602  		y := v.Args[1]
 12603  		v.reset(Op386SUBL)
 12604  		v.AddArg(x)
 12605  		v.AddArg(y)
 12606  		return true
 12607  	}
 12608  }
 12609  func rewriteValue386_OpSub32F(v *Value, config *Config) bool {
 12610  	b := v.Block
 12611  	_ = b
 12612  	// match: (Sub32F x y)
 12613  	// cond:
 12614  	// result: (SUBSS x y)
 12615  	for {
 12616  		x := v.Args[0]
 12617  		y := v.Args[1]
 12618  		v.reset(Op386SUBSS)
 12619  		v.AddArg(x)
 12620  		v.AddArg(y)
 12621  		return true
 12622  	}
 12623  }
 12624  func rewriteValue386_OpSub32carry(v *Value, config *Config) bool {
 12625  	b := v.Block
 12626  	_ = b
 12627  	// match: (Sub32carry x y)
 12628  	// cond:
 12629  	// result: (SUBLcarry x y)
 12630  	for {
 12631  		x := v.Args[0]
 12632  		y := v.Args[1]
 12633  		v.reset(Op386SUBLcarry)
 12634  		v.AddArg(x)
 12635  		v.AddArg(y)
 12636  		return true
 12637  	}
 12638  }
 12639  func rewriteValue386_OpSub32withcarry(v *Value, config *Config) bool {
 12640  	b := v.Block
 12641  	_ = b
 12642  	// match: (Sub32withcarry x y c)
 12643  	// cond:
 12644  	// result: (SBBL x y c)
 12645  	for {
 12646  		x := v.Args[0]
 12647  		y := v.Args[1]
 12648  		c := v.Args[2]
 12649  		v.reset(Op386SBBL)
 12650  		v.AddArg(x)
 12651  		v.AddArg(y)
 12652  		v.AddArg(c)
 12653  		return true
 12654  	}
 12655  }
 12656  func rewriteValue386_OpSub64F(v *Value, config *Config) bool {
 12657  	b := v.Block
 12658  	_ = b
 12659  	// match: (Sub64F x y)
 12660  	// cond:
 12661  	// result: (SUBSD x y)
 12662  	for {
 12663  		x := v.Args[0]
 12664  		y := v.Args[1]
 12665  		v.reset(Op386SUBSD)
 12666  		v.AddArg(x)
 12667  		v.AddArg(y)
 12668  		return true
 12669  	}
 12670  }
 12671  func rewriteValue386_OpSub8(v *Value, config *Config) bool {
 12672  	b := v.Block
 12673  	_ = b
 12674  	// match: (Sub8   x y)
 12675  	// cond:
 12676  	// result: (SUBL  x y)
 12677  	for {
 12678  		x := v.Args[0]
 12679  		y := v.Args[1]
 12680  		v.reset(Op386SUBL)
 12681  		v.AddArg(x)
 12682  		v.AddArg(y)
 12683  		return true
 12684  	}
 12685  }
 12686  func rewriteValue386_OpSubPtr(v *Value, config *Config) bool {
 12687  	b := v.Block
 12688  	_ = b
 12689  	// match: (SubPtr x y)
 12690  	// cond:
 12691  	// result: (SUBL  x y)
 12692  	for {
 12693  		x := v.Args[0]
 12694  		y := v.Args[1]
 12695  		v.reset(Op386SUBL)
 12696  		v.AddArg(x)
 12697  		v.AddArg(y)
 12698  		return true
 12699  	}
 12700  }
 12701  func rewriteValue386_OpTrunc16to8(v *Value, config *Config) bool {
 12702  	b := v.Block
 12703  	_ = b
 12704  	// match: (Trunc16to8  x)
 12705  	// cond:
 12706  	// result: x
 12707  	for {
 12708  		x := v.Args[0]
 12709  		v.reset(OpCopy)
 12710  		v.Type = x.Type
 12711  		v.AddArg(x)
 12712  		return true
 12713  	}
 12714  }
 12715  func rewriteValue386_OpTrunc32to16(v *Value, config *Config) bool {
 12716  	b := v.Block
 12717  	_ = b
 12718  	// match: (Trunc32to16 x)
 12719  	// cond:
 12720  	// result: x
 12721  	for {
 12722  		x := v.Args[0]
 12723  		v.reset(OpCopy)
 12724  		v.Type = x.Type
 12725  		v.AddArg(x)
 12726  		return true
 12727  	}
 12728  }
 12729  func rewriteValue386_OpTrunc32to8(v *Value, config *Config) bool {
 12730  	b := v.Block
 12731  	_ = b
 12732  	// match: (Trunc32to8  x)
 12733  	// cond:
 12734  	// result: x
 12735  	for {
 12736  		x := v.Args[0]
 12737  		v.reset(OpCopy)
 12738  		v.Type = x.Type
 12739  		v.AddArg(x)
 12740  		return true
 12741  	}
 12742  }
 12743  func rewriteValue386_OpXor16(v *Value, config *Config) bool {
 12744  	b := v.Block
 12745  	_ = b
 12746  	// match: (Xor16 x y)
 12747  	// cond:
 12748  	// result: (XORL x y)
 12749  	for {
 12750  		x := v.Args[0]
 12751  		y := v.Args[1]
 12752  		v.reset(Op386XORL)
 12753  		v.AddArg(x)
 12754  		v.AddArg(y)
 12755  		return true
 12756  	}
 12757  }
 12758  func rewriteValue386_OpXor32(v *Value, config *Config) bool {
 12759  	b := v.Block
 12760  	_ = b
 12761  	// match: (Xor32 x y)
 12762  	// cond:
 12763  	// result: (XORL x y)
 12764  	for {
 12765  		x := v.Args[0]
 12766  		y := v.Args[1]
 12767  		v.reset(Op386XORL)
 12768  		v.AddArg(x)
 12769  		v.AddArg(y)
 12770  		return true
 12771  	}
 12772  }
 12773  func rewriteValue386_OpXor8(v *Value, config *Config) bool {
 12774  	b := v.Block
 12775  	_ = b
 12776  	// match: (Xor8  x y)
 12777  	// cond:
 12778  	// result: (XORL x y)
 12779  	for {
 12780  		x := v.Args[0]
 12781  		y := v.Args[1]
 12782  		v.reset(Op386XORL)
 12783  		v.AddArg(x)
 12784  		v.AddArg(y)
 12785  		return true
 12786  	}
 12787  }
 12788  func rewriteValue386_OpZero(v *Value, config *Config) bool {
 12789  	b := v.Block
 12790  	_ = b
 12791  	// match: (Zero [s] _ mem)
 12792  	// cond: SizeAndAlign(s).Size() == 0
 12793  	// result: mem
 12794  	for {
 12795  		s := v.AuxInt
 12796  		mem := v.Args[1]
 12797  		if !(SizeAndAlign(s).Size() == 0) {
 12798  			break
 12799  		}
 12800  		v.reset(OpCopy)
 12801  		v.Type = mem.Type
 12802  		v.AddArg(mem)
 12803  		return true
 12804  	}
 12805  	// match: (Zero [s] destptr mem)
 12806  	// cond: SizeAndAlign(s).Size() == 1
 12807  	// result: (MOVBstoreconst [0] destptr mem)
 12808  	for {
 12809  		s := v.AuxInt
 12810  		destptr := v.Args[0]
 12811  		mem := v.Args[1]
 12812  		if !(SizeAndAlign(s).Size() == 1) {
 12813  			break
 12814  		}
 12815  		v.reset(Op386MOVBstoreconst)
 12816  		v.AuxInt = 0
 12817  		v.AddArg(destptr)
 12818  		v.AddArg(mem)
 12819  		return true
 12820  	}
 12821  	// match: (Zero [s] destptr mem)
 12822  	// cond: SizeAndAlign(s).Size() == 2
 12823  	// result: (MOVWstoreconst [0] destptr mem)
 12824  	for {
 12825  		s := v.AuxInt
 12826  		destptr := v.Args[0]
 12827  		mem := v.Args[1]
 12828  		if !(SizeAndAlign(s).Size() == 2) {
 12829  			break
 12830  		}
 12831  		v.reset(Op386MOVWstoreconst)
 12832  		v.AuxInt = 0
 12833  		v.AddArg(destptr)
 12834  		v.AddArg(mem)
 12835  		return true
 12836  	}
 12837  	// match: (Zero [s] destptr mem)
 12838  	// cond: SizeAndAlign(s).Size() == 4
 12839  	// result: (MOVLstoreconst [0] destptr mem)
 12840  	for {
 12841  		s := v.AuxInt
 12842  		destptr := v.Args[0]
 12843  		mem := v.Args[1]
 12844  		if !(SizeAndAlign(s).Size() == 4) {
 12845  			break
 12846  		}
 12847  		v.reset(Op386MOVLstoreconst)
 12848  		v.AuxInt = 0
 12849  		v.AddArg(destptr)
 12850  		v.AddArg(mem)
 12851  		return true
 12852  	}
 12853  	// match: (Zero [s] destptr mem)
 12854  	// cond: SizeAndAlign(s).Size() == 3
 12855  	// result: (MOVBstoreconst [makeValAndOff(0,2)] destptr 		(MOVWstoreconst [0] destptr mem))
 12856  	for {
 12857  		s := v.AuxInt
 12858  		destptr := v.Args[0]
 12859  		mem := v.Args[1]
 12860  		if !(SizeAndAlign(s).Size() == 3) {
 12861  			break
 12862  		}
 12863  		v.reset(Op386MOVBstoreconst)
 12864  		v.AuxInt = makeValAndOff(0, 2)
 12865  		v.AddArg(destptr)
 12866  		v0 := b.NewValue0(v.Line, Op386MOVWstoreconst, TypeMem)
 12867  		v0.AuxInt = 0
 12868  		v0.AddArg(destptr)
 12869  		v0.AddArg(mem)
 12870  		v.AddArg(v0)
 12871  		return true
 12872  	}
 12873  	// match: (Zero [s] destptr mem)
 12874  	// cond: SizeAndAlign(s).Size() == 5
 12875  	// result: (MOVBstoreconst [makeValAndOff(0,4)] destptr 		(MOVLstoreconst [0] destptr mem))
 12876  	for {
 12877  		s := v.AuxInt
 12878  		destptr := v.Args[0]
 12879  		mem := v.Args[1]
 12880  		if !(SizeAndAlign(s).Size() == 5) {
 12881  			break
 12882  		}
 12883  		v.reset(Op386MOVBstoreconst)
 12884  		v.AuxInt = makeValAndOff(0, 4)
 12885  		v.AddArg(destptr)
 12886  		v0 := b.NewValue0(v.Line, Op386MOVLstoreconst, TypeMem)
 12887  		v0.AuxInt = 0
 12888  		v0.AddArg(destptr)
 12889  		v0.AddArg(mem)
 12890  		v.AddArg(v0)
 12891  		return true
 12892  	}
 12893  	// match: (Zero [s] destptr mem)
 12894  	// cond: SizeAndAlign(s).Size() == 6
 12895  	// result: (MOVWstoreconst [makeValAndOff(0,4)] destptr 		(MOVLstoreconst [0] destptr mem))
 12896  	for {
 12897  		s := v.AuxInt
 12898  		destptr := v.Args[0]
 12899  		mem := v.Args[1]
 12900  		if !(SizeAndAlign(s).Size() == 6) {
 12901  			break
 12902  		}
 12903  		v.reset(Op386MOVWstoreconst)
 12904  		v.AuxInt = makeValAndOff(0, 4)
 12905  		v.AddArg(destptr)
 12906  		v0 := b.NewValue0(v.Line, Op386MOVLstoreconst, TypeMem)
 12907  		v0.AuxInt = 0
 12908  		v0.AddArg(destptr)
 12909  		v0.AddArg(mem)
 12910  		v.AddArg(v0)
 12911  		return true
 12912  	}
 12913  	// match: (Zero [s] destptr mem)
 12914  	// cond: SizeAndAlign(s).Size() == 7
 12915  	// result: (MOVLstoreconst [makeValAndOff(0,3)] destptr 		(MOVLstoreconst [0] destptr mem))
 12916  	for {
 12917  		s := v.AuxInt
 12918  		destptr := v.Args[0]
 12919  		mem := v.Args[1]
 12920  		if !(SizeAndAlign(s).Size() == 7) {
 12921  			break
 12922  		}
 12923  		v.reset(Op386MOVLstoreconst)
 12924  		v.AuxInt = makeValAndOff(0, 3)
 12925  		v.AddArg(destptr)
 12926  		v0 := b.NewValue0(v.Line, Op386MOVLstoreconst, TypeMem)
 12927  		v0.AuxInt = 0
 12928  		v0.AddArg(destptr)
 12929  		v0.AddArg(mem)
 12930  		v.AddArg(v0)
 12931  		return true
 12932  	}
 12933  	// match: (Zero [s] destptr mem)
 12934  	// cond: SizeAndAlign(s).Size()%4 != 0 && SizeAndAlign(s).Size() > 4
 12935  	// result: (Zero [SizeAndAlign(s).Size()-SizeAndAlign(s).Size()%4] (ADDLconst destptr [SizeAndAlign(s).Size()%4]) 		(MOVLstoreconst [0] destptr mem))
 12936  	for {
 12937  		s := v.AuxInt
 12938  		destptr := v.Args[0]
 12939  		mem := v.Args[1]
 12940  		if !(SizeAndAlign(s).Size()%4 != 0 && SizeAndAlign(s).Size() > 4) {
 12941  			break
 12942  		}
 12943  		v.reset(OpZero)
 12944  		v.AuxInt = SizeAndAlign(s).Size() - SizeAndAlign(s).Size()%4
 12945  		v0 := b.NewValue0(v.Line, Op386ADDLconst, config.fe.TypeUInt32())
 12946  		v0.AuxInt = SizeAndAlign(s).Size() % 4
 12947  		v0.AddArg(destptr)
 12948  		v.AddArg(v0)
 12949  		v1 := b.NewValue0(v.Line, Op386MOVLstoreconst, TypeMem)
 12950  		v1.AuxInt = 0
 12951  		v1.AddArg(destptr)
 12952  		v1.AddArg(mem)
 12953  		v.AddArg(v1)
 12954  		return true
 12955  	}
 12956  	// match: (Zero [s] destptr mem)
 12957  	// cond: SizeAndAlign(s).Size() == 8
 12958  	// result: (MOVLstoreconst [makeValAndOff(0,4)] destptr 		(MOVLstoreconst [0] destptr mem))
 12959  	for {
 12960  		s := v.AuxInt
 12961  		destptr := v.Args[0]
 12962  		mem := v.Args[1]
 12963  		if !(SizeAndAlign(s).Size() == 8) {
 12964  			break
 12965  		}
 12966  		v.reset(Op386MOVLstoreconst)
 12967  		v.AuxInt = makeValAndOff(0, 4)
 12968  		v.AddArg(destptr)
 12969  		v0 := b.NewValue0(v.Line, Op386MOVLstoreconst, TypeMem)
 12970  		v0.AuxInt = 0
 12971  		v0.AddArg(destptr)
 12972  		v0.AddArg(mem)
 12973  		v.AddArg(v0)
 12974  		return true
 12975  	}
 12976  	// match: (Zero [s] destptr mem)
 12977  	// cond: SizeAndAlign(s).Size() == 12
 12978  	// result: (MOVLstoreconst [makeValAndOff(0,8)] destptr 		(MOVLstoreconst [makeValAndOff(0,4)] destptr 			(MOVLstoreconst [0] destptr mem)))
 12979  	for {
 12980  		s := v.AuxInt
 12981  		destptr := v.Args[0]
 12982  		mem := v.Args[1]
 12983  		if !(SizeAndAlign(s).Size() == 12) {
 12984  			break
 12985  		}
 12986  		v.reset(Op386MOVLstoreconst)
 12987  		v.AuxInt = makeValAndOff(0, 8)
 12988  		v.AddArg(destptr)
 12989  		v0 := b.NewValue0(v.Line, Op386MOVLstoreconst, TypeMem)
 12990  		v0.AuxInt = makeValAndOff(0, 4)
 12991  		v0.AddArg(destptr)
 12992  		v1 := b.NewValue0(v.Line, Op386MOVLstoreconst, TypeMem)
 12993  		v1.AuxInt = 0
 12994  		v1.AddArg(destptr)
 12995  		v1.AddArg(mem)
 12996  		v0.AddArg(v1)
 12997  		v.AddArg(v0)
 12998  		return true
 12999  	}
 13000  	// match: (Zero [s] destptr mem)
 13001  	// cond: SizeAndAlign(s).Size() == 16
 13002  	// result: (MOVLstoreconst [makeValAndOff(0,12)] destptr 		(MOVLstoreconst [makeValAndOff(0,8)] destptr 			(MOVLstoreconst [makeValAndOff(0,4)] destptr 				(MOVLstoreconst [0] destptr mem))))
 13003  	for {
 13004  		s := v.AuxInt
 13005  		destptr := v.Args[0]
 13006  		mem := v.Args[1]
 13007  		if !(SizeAndAlign(s).Size() == 16) {
 13008  			break
 13009  		}
 13010  		v.reset(Op386MOVLstoreconst)
 13011  		v.AuxInt = makeValAndOff(0, 12)
 13012  		v.AddArg(destptr)
 13013  		v0 := b.NewValue0(v.Line, Op386MOVLstoreconst, TypeMem)
 13014  		v0.AuxInt = makeValAndOff(0, 8)
 13015  		v0.AddArg(destptr)
 13016  		v1 := b.NewValue0(v.Line, Op386MOVLstoreconst, TypeMem)
 13017  		v1.AuxInt = makeValAndOff(0, 4)
 13018  		v1.AddArg(destptr)
 13019  		v2 := b.NewValue0(v.Line, Op386MOVLstoreconst, TypeMem)
 13020  		v2.AuxInt = 0
 13021  		v2.AddArg(destptr)
 13022  		v2.AddArg(mem)
 13023  		v1.AddArg(v2)
 13024  		v0.AddArg(v1)
 13025  		v.AddArg(v0)
 13026  		return true
 13027  	}
 13028  	// match: (Zero [s] destptr mem)
 13029  	// cond: SizeAndAlign(s).Size() > 16   && SizeAndAlign(s).Size() <= 4*128   && SizeAndAlign(s).Size()%4 == 0   && !config.noDuffDevice
 13030  	// result: (DUFFZERO [1*(128-SizeAndAlign(s).Size()/4)] destptr (MOVLconst [0]) mem)
 13031  	for {
 13032  		s := v.AuxInt
 13033  		destptr := v.Args[0]
 13034  		mem := v.Args[1]
 13035  		if !(SizeAndAlign(s).Size() > 16 && SizeAndAlign(s).Size() <= 4*128 && SizeAndAlign(s).Size()%4 == 0 && !config.noDuffDevice) {
 13036  			break
 13037  		}
 13038  		v.reset(Op386DUFFZERO)
 13039  		v.AuxInt = 1 * (128 - SizeAndAlign(s).Size()/4)
 13040  		v.AddArg(destptr)
 13041  		v0 := b.NewValue0(v.Line, Op386MOVLconst, config.fe.TypeUInt32())
 13042  		v0.AuxInt = 0
 13043  		v.AddArg(v0)
 13044  		v.AddArg(mem)
 13045  		return true
 13046  	}
 13047  	// match: (Zero [s] destptr mem)
 13048  	// cond: (SizeAndAlign(s).Size() > 4*128 || (config.noDuffDevice && SizeAndAlign(s).Size() > 16))   && SizeAndAlign(s).Size()%4 == 0
 13049  	// result: (REPSTOSL destptr (MOVLconst [SizeAndAlign(s).Size()/4]) (MOVLconst [0]) mem)
 13050  	for {
 13051  		s := v.AuxInt
 13052  		destptr := v.Args[0]
 13053  		mem := v.Args[1]
 13054  		if !((SizeAndAlign(s).Size() > 4*128 || (config.noDuffDevice && SizeAndAlign(s).Size() > 16)) && SizeAndAlign(s).Size()%4 == 0) {
 13055  			break
 13056  		}
 13057  		v.reset(Op386REPSTOSL)
 13058  		v.AddArg(destptr)
 13059  		v0 := b.NewValue0(v.Line, Op386MOVLconst, config.fe.TypeUInt32())
 13060  		v0.AuxInt = SizeAndAlign(s).Size() / 4
 13061  		v.AddArg(v0)
 13062  		v1 := b.NewValue0(v.Line, Op386MOVLconst, config.fe.TypeUInt32())
 13063  		v1.AuxInt = 0
 13064  		v.AddArg(v1)
 13065  		v.AddArg(mem)
 13066  		return true
 13067  	}
 13068  	return false
 13069  }
 13070  func rewriteValue386_OpZeroExt16to32(v *Value, config *Config) bool {
 13071  	b := v.Block
 13072  	_ = b
 13073  	// match: (ZeroExt16to32 x)
 13074  	// cond:
 13075  	// result: (MOVWLZX x)
 13076  	for {
 13077  		x := v.Args[0]
 13078  		v.reset(Op386MOVWLZX)
 13079  		v.AddArg(x)
 13080  		return true
 13081  	}
 13082  }
 13083  func rewriteValue386_OpZeroExt8to16(v *Value, config *Config) bool {
 13084  	b := v.Block
 13085  	_ = b
 13086  	// match: (ZeroExt8to16  x)
 13087  	// cond:
 13088  	// result: (MOVBLZX x)
 13089  	for {
 13090  		x := v.Args[0]
 13091  		v.reset(Op386MOVBLZX)
 13092  		v.AddArg(x)
 13093  		return true
 13094  	}
 13095  }
 13096  func rewriteValue386_OpZeroExt8to32(v *Value, config *Config) bool {
 13097  	b := v.Block
 13098  	_ = b
 13099  	// match: (ZeroExt8to32  x)
 13100  	// cond:
 13101  	// result: (MOVBLZX x)
 13102  	for {
 13103  		x := v.Args[0]
 13104  		v.reset(Op386MOVBLZX)
 13105  		v.AddArg(x)
 13106  		return true
 13107  	}
 13108  }
 13109  func rewriteValue386_OpZeromask(v *Value, config *Config) bool {
 13110  	b := v.Block
 13111  	_ = b
 13112  	// match: (Zeromask <t> x)
 13113  	// cond:
 13114  	// result: (XORLconst [-1] (SBBLcarrymask <t> (CMPLconst x [1])))
 13115  	for {
 13116  		t := v.Type
 13117  		x := v.Args[0]
 13118  		v.reset(Op386XORLconst)
 13119  		v.AuxInt = -1
 13120  		v0 := b.NewValue0(v.Line, Op386SBBLcarrymask, t)
 13121  		v1 := b.NewValue0(v.Line, Op386CMPLconst, TypeFlags)
 13122  		v1.AuxInt = 1
 13123  		v1.AddArg(x)
 13124  		v0.AddArg(v1)
 13125  		v.AddArg(v0)
 13126  		return true
 13127  	}
 13128  }
 13129  func rewriteBlock386(b *Block, config *Config) bool {
 13130  	switch b.Kind {
 13131  	case Block386EQ:
 13132  		// match: (EQ (InvertFlags cmp) yes no)
 13133  		// cond:
 13134  		// result: (EQ cmp yes no)
 13135  		for {
 13136  			v := b.Control
 13137  			if v.Op != Op386InvertFlags {
 13138  				break
 13139  			}
 13140  			cmp := v.Args[0]
 13141  			yes := b.Succs[0]
 13142  			no := b.Succs[1]
 13143  			b.Kind = Block386EQ
 13144  			b.SetControl(cmp)
 13145  			_ = yes
 13146  			_ = no
 13147  			return true
 13148  		}
 13149  		// match: (EQ (FlagEQ) yes no)
 13150  		// cond:
 13151  		// result: (First nil yes no)
 13152  		for {
 13153  			v := b.Control
 13154  			if v.Op != Op386FlagEQ {
 13155  				break
 13156  			}
 13157  			yes := b.Succs[0]
 13158  			no := b.Succs[1]
 13159  			b.Kind = BlockFirst
 13160  			b.SetControl(nil)
 13161  			_ = yes
 13162  			_ = no
 13163  			return true
 13164  		}
 13165  		// match: (EQ (FlagLT_ULT) yes no)
 13166  		// cond:
 13167  		// result: (First nil no yes)
 13168  		for {
 13169  			v := b.Control
 13170  			if v.Op != Op386FlagLT_ULT {
 13171  				break
 13172  			}
 13173  			yes := b.Succs[0]
 13174  			no := b.Succs[1]
 13175  			b.Kind = BlockFirst
 13176  			b.SetControl(nil)
 13177  			b.swapSuccessors()
 13178  			_ = no
 13179  			_ = yes
 13180  			return true
 13181  		}
 13182  		// match: (EQ (FlagLT_UGT) yes no)
 13183  		// cond:
 13184  		// result: (First nil no yes)
 13185  		for {
 13186  			v := b.Control
 13187  			if v.Op != Op386FlagLT_UGT {
 13188  				break
 13189  			}
 13190  			yes := b.Succs[0]
 13191  			no := b.Succs[1]
 13192  			b.Kind = BlockFirst
 13193  			b.SetControl(nil)
 13194  			b.swapSuccessors()
 13195  			_ = no
 13196  			_ = yes
 13197  			return true
 13198  		}
 13199  		// match: (EQ (FlagGT_ULT) yes no)
 13200  		// cond:
 13201  		// result: (First nil no yes)
 13202  		for {
 13203  			v := b.Control
 13204  			if v.Op != Op386FlagGT_ULT {
 13205  				break
 13206  			}
 13207  			yes := b.Succs[0]
 13208  			no := b.Succs[1]
 13209  			b.Kind = BlockFirst
 13210  			b.SetControl(nil)
 13211  			b.swapSuccessors()
 13212  			_ = no
 13213  			_ = yes
 13214  			return true
 13215  		}
 13216  		// match: (EQ (FlagGT_UGT) yes no)
 13217  		// cond:
 13218  		// result: (First nil no yes)
 13219  		for {
 13220  			v := b.Control
 13221  			if v.Op != Op386FlagGT_UGT {
 13222  				break
 13223  			}
 13224  			yes := b.Succs[0]
 13225  			no := b.Succs[1]
 13226  			b.Kind = BlockFirst
 13227  			b.SetControl(nil)
 13228  			b.swapSuccessors()
 13229  			_ = no
 13230  			_ = yes
 13231  			return true
 13232  		}
 13233  	case Block386GE:
 13234  		// match: (GE (InvertFlags cmp) yes no)
 13235  		// cond:
 13236  		// result: (LE cmp yes no)
 13237  		for {
 13238  			v := b.Control
 13239  			if v.Op != Op386InvertFlags {
 13240  				break
 13241  			}
 13242  			cmp := v.Args[0]
 13243  			yes := b.Succs[0]
 13244  			no := b.Succs[1]
 13245  			b.Kind = Block386LE
 13246  			b.SetControl(cmp)
 13247  			_ = yes
 13248  			_ = no
 13249  			return true
 13250  		}
 13251  		// match: (GE (FlagEQ) yes no)
 13252  		// cond:
 13253  		// result: (First nil yes no)
 13254  		for {
 13255  			v := b.Control
 13256  			if v.Op != Op386FlagEQ {
 13257  				break
 13258  			}
 13259  			yes := b.Succs[0]
 13260  			no := b.Succs[1]
 13261  			b.Kind = BlockFirst
 13262  			b.SetControl(nil)
 13263  			_ = yes
 13264  			_ = no
 13265  			return true
 13266  		}
 13267  		// match: (GE (FlagLT_ULT) yes no)
 13268  		// cond:
 13269  		// result: (First nil no yes)
 13270  		for {
 13271  			v := b.Control
 13272  			if v.Op != Op386FlagLT_ULT {
 13273  				break
 13274  			}
 13275  			yes := b.Succs[0]
 13276  			no := b.Succs[1]
 13277  			b.Kind = BlockFirst
 13278  			b.SetControl(nil)
 13279  			b.swapSuccessors()
 13280  			_ = no
 13281  			_ = yes
 13282  			return true
 13283  		}
 13284  		// match: (GE (FlagLT_UGT) yes no)
 13285  		// cond:
 13286  		// result: (First nil no yes)
 13287  		for {
 13288  			v := b.Control
 13289  			if v.Op != Op386FlagLT_UGT {
 13290  				break
 13291  			}
 13292  			yes := b.Succs[0]
 13293  			no := b.Succs[1]
 13294  			b.Kind = BlockFirst
 13295  			b.SetControl(nil)
 13296  			b.swapSuccessors()
 13297  			_ = no
 13298  			_ = yes
 13299  			return true
 13300  		}
 13301  		// match: (GE (FlagGT_ULT) yes no)
 13302  		// cond:
 13303  		// result: (First nil yes no)
 13304  		for {
 13305  			v := b.Control
 13306  			if v.Op != Op386FlagGT_ULT {
 13307  				break
 13308  			}
 13309  			yes := b.Succs[0]
 13310  			no := b.Succs[1]
 13311  			b.Kind = BlockFirst
 13312  			b.SetControl(nil)
 13313  			_ = yes
 13314  			_ = no
 13315  			return true
 13316  		}
 13317  		// match: (GE (FlagGT_UGT) yes no)
 13318  		// cond:
 13319  		// result: (First nil yes no)
 13320  		for {
 13321  			v := b.Control
 13322  			if v.Op != Op386FlagGT_UGT {
 13323  				break
 13324  			}
 13325  			yes := b.Succs[0]
 13326  			no := b.Succs[1]
 13327  			b.Kind = BlockFirst
 13328  			b.SetControl(nil)
 13329  			_ = yes
 13330  			_ = no
 13331  			return true
 13332  		}
 13333  	case Block386GT:
 13334  		// match: (GT (InvertFlags cmp) yes no)
 13335  		// cond:
 13336  		// result: (LT cmp yes no)
 13337  		for {
 13338  			v := b.Control
 13339  			if v.Op != Op386InvertFlags {
 13340  				break
 13341  			}
 13342  			cmp := v.Args[0]
 13343  			yes := b.Succs[0]
 13344  			no := b.Succs[1]
 13345  			b.Kind = Block386LT
 13346  			b.SetControl(cmp)
 13347  			_ = yes
 13348  			_ = no
 13349  			return true
 13350  		}
 13351  		// match: (GT (FlagEQ) yes no)
 13352  		// cond:
 13353  		// result: (First nil no yes)
 13354  		for {
 13355  			v := b.Control
 13356  			if v.Op != Op386FlagEQ {
 13357  				break
 13358  			}
 13359  			yes := b.Succs[0]
 13360  			no := b.Succs[1]
 13361  			b.Kind = BlockFirst
 13362  			b.SetControl(nil)
 13363  			b.swapSuccessors()
 13364  			_ = no
 13365  			_ = yes
 13366  			return true
 13367  		}
 13368  		// match: (GT (FlagLT_ULT) yes no)
 13369  		// cond:
 13370  		// result: (First nil no yes)
 13371  		for {
 13372  			v := b.Control
 13373  			if v.Op != Op386FlagLT_ULT {
 13374  				break
 13375  			}
 13376  			yes := b.Succs[0]
 13377  			no := b.Succs[1]
 13378  			b.Kind = BlockFirst
 13379  			b.SetControl(nil)
 13380  			b.swapSuccessors()
 13381  			_ = no
 13382  			_ = yes
 13383  			return true
 13384  		}
 13385  		// match: (GT (FlagLT_UGT) yes no)
 13386  		// cond:
 13387  		// result: (First nil no yes)
 13388  		for {
 13389  			v := b.Control
 13390  			if v.Op != Op386FlagLT_UGT {
 13391  				break
 13392  			}
 13393  			yes := b.Succs[0]
 13394  			no := b.Succs[1]
 13395  			b.Kind = BlockFirst
 13396  			b.SetControl(nil)
 13397  			b.swapSuccessors()
 13398  			_ = no
 13399  			_ = yes
 13400  			return true
 13401  		}
 13402  		// match: (GT (FlagGT_ULT) yes no)
 13403  		// cond:
 13404  		// result: (First nil yes no)
 13405  		for {
 13406  			v := b.Control
 13407  			if v.Op != Op386FlagGT_ULT {
 13408  				break
 13409  			}
 13410  			yes := b.Succs[0]
 13411  			no := b.Succs[1]
 13412  			b.Kind = BlockFirst
 13413  			b.SetControl(nil)
 13414  			_ = yes
 13415  			_ = no
 13416  			return true
 13417  		}
 13418  		// match: (GT (FlagGT_UGT) yes no)
 13419  		// cond:
 13420  		// result: (First nil yes no)
 13421  		for {
 13422  			v := b.Control
 13423  			if v.Op != Op386FlagGT_UGT {
 13424  				break
 13425  			}
 13426  			yes := b.Succs[0]
 13427  			no := b.Succs[1]
 13428  			b.Kind = BlockFirst
 13429  			b.SetControl(nil)
 13430  			_ = yes
 13431  			_ = no
 13432  			return true
 13433  		}
 13434  	case BlockIf:
 13435  		// match: (If (SETL  cmp) yes no)
 13436  		// cond:
 13437  		// result: (LT  cmp yes no)
 13438  		for {
 13439  			v := b.Control
 13440  			if v.Op != Op386SETL {
 13441  				break
 13442  			}
 13443  			cmp := v.Args[0]
 13444  			yes := b.Succs[0]
 13445  			no := b.Succs[1]
 13446  			b.Kind = Block386LT
 13447  			b.SetControl(cmp)
 13448  			_ = yes
 13449  			_ = no
 13450  			return true
 13451  		}
 13452  		// match: (If (SETLE cmp) yes no)
 13453  		// cond:
 13454  		// result: (LE  cmp yes no)
 13455  		for {
 13456  			v := b.Control
 13457  			if v.Op != Op386SETLE {
 13458  				break
 13459  			}
 13460  			cmp := v.Args[0]
 13461  			yes := b.Succs[0]
 13462  			no := b.Succs[1]
 13463  			b.Kind = Block386LE
 13464  			b.SetControl(cmp)
 13465  			_ = yes
 13466  			_ = no
 13467  			return true
 13468  		}
 13469  		// match: (If (SETG  cmp) yes no)
 13470  		// cond:
 13471  		// result: (GT  cmp yes no)
 13472  		for {
 13473  			v := b.Control
 13474  			if v.Op != Op386SETG {
 13475  				break
 13476  			}
 13477  			cmp := v.Args[0]
 13478  			yes := b.Succs[0]
 13479  			no := b.Succs[1]
 13480  			b.Kind = Block386GT
 13481  			b.SetControl(cmp)
 13482  			_ = yes
 13483  			_ = no
 13484  			return true
 13485  		}
 13486  		// match: (If (SETGE cmp) yes no)
 13487  		// cond:
 13488  		// result: (GE  cmp yes no)
 13489  		for {
 13490  			v := b.Control
 13491  			if v.Op != Op386SETGE {
 13492  				break
 13493  			}
 13494  			cmp := v.Args[0]
 13495  			yes := b.Succs[0]
 13496  			no := b.Succs[1]
 13497  			b.Kind = Block386GE
 13498  			b.SetControl(cmp)
 13499  			_ = yes
 13500  			_ = no
 13501  			return true
 13502  		}
 13503  		// match: (If (SETEQ cmp) yes no)
 13504  		// cond:
 13505  		// result: (EQ  cmp yes no)
 13506  		for {
 13507  			v := b.Control
 13508  			if v.Op != Op386SETEQ {
 13509  				break
 13510  			}
 13511  			cmp := v.Args[0]
 13512  			yes := b.Succs[0]
 13513  			no := b.Succs[1]
 13514  			b.Kind = Block386EQ
 13515  			b.SetControl(cmp)
 13516  			_ = yes
 13517  			_ = no
 13518  			return true
 13519  		}
 13520  		// match: (If (SETNE cmp) yes no)
 13521  		// cond:
 13522  		// result: (NE  cmp yes no)
 13523  		for {
 13524  			v := b.Control
 13525  			if v.Op != Op386SETNE {
 13526  				break
 13527  			}
 13528  			cmp := v.Args[0]
 13529  			yes := b.Succs[0]
 13530  			no := b.Succs[1]
 13531  			b.Kind = Block386NE
 13532  			b.SetControl(cmp)
 13533  			_ = yes
 13534  			_ = no
 13535  			return true
 13536  		}
 13537  		// match: (If (SETB  cmp) yes no)
 13538  		// cond:
 13539  		// result: (ULT cmp yes no)
 13540  		for {
 13541  			v := b.Control
 13542  			if v.Op != Op386SETB {
 13543  				break
 13544  			}
 13545  			cmp := v.Args[0]
 13546  			yes := b.Succs[0]
 13547  			no := b.Succs[1]
 13548  			b.Kind = Block386ULT
 13549  			b.SetControl(cmp)
 13550  			_ = yes
 13551  			_ = no
 13552  			return true
 13553  		}
 13554  		// match: (If (SETBE cmp) yes no)
 13555  		// cond:
 13556  		// result: (ULE cmp yes no)
 13557  		for {
 13558  			v := b.Control
 13559  			if v.Op != Op386SETBE {
 13560  				break
 13561  			}
 13562  			cmp := v.Args[0]
 13563  			yes := b.Succs[0]
 13564  			no := b.Succs[1]
 13565  			b.Kind = Block386ULE
 13566  			b.SetControl(cmp)
 13567  			_ = yes
 13568  			_ = no
 13569  			return true
 13570  		}
 13571  		// match: (If (SETA  cmp) yes no)
 13572  		// cond:
 13573  		// result: (UGT cmp yes no)
 13574  		for {
 13575  			v := b.Control
 13576  			if v.Op != Op386SETA {
 13577  				break
 13578  			}
 13579  			cmp := v.Args[0]
 13580  			yes := b.Succs[0]
 13581  			no := b.Succs[1]
 13582  			b.Kind = Block386UGT
 13583  			b.SetControl(cmp)
 13584  			_ = yes
 13585  			_ = no
 13586  			return true
 13587  		}
 13588  		// match: (If (SETAE cmp) yes no)
 13589  		// cond:
 13590  		// result: (UGE cmp yes no)
 13591  		for {
 13592  			v := b.Control
 13593  			if v.Op != Op386SETAE {
 13594  				break
 13595  			}
 13596  			cmp := v.Args[0]
 13597  			yes := b.Succs[0]
 13598  			no := b.Succs[1]
 13599  			b.Kind = Block386UGE
 13600  			b.SetControl(cmp)
 13601  			_ = yes
 13602  			_ = no
 13603  			return true
 13604  		}
 13605  		// match: (If (SETGF  cmp) yes no)
 13606  		// cond:
 13607  		// result: (UGT  cmp yes no)
 13608  		for {
 13609  			v := b.Control
 13610  			if v.Op != Op386SETGF {
 13611  				break
 13612  			}
 13613  			cmp := v.Args[0]
 13614  			yes := b.Succs[0]
 13615  			no := b.Succs[1]
 13616  			b.Kind = Block386UGT
 13617  			b.SetControl(cmp)
 13618  			_ = yes
 13619  			_ = no
 13620  			return true
 13621  		}
 13622  		// match: (If (SETGEF cmp) yes no)
 13623  		// cond:
 13624  		// result: (UGE  cmp yes no)
 13625  		for {
 13626  			v := b.Control
 13627  			if v.Op != Op386SETGEF {
 13628  				break
 13629  			}
 13630  			cmp := v.Args[0]
 13631  			yes := b.Succs[0]
 13632  			no := b.Succs[1]
 13633  			b.Kind = Block386UGE
 13634  			b.SetControl(cmp)
 13635  			_ = yes
 13636  			_ = no
 13637  			return true
 13638  		}
 13639  		// match: (If (SETEQF cmp) yes no)
 13640  		// cond:
 13641  		// result: (EQF  cmp yes no)
 13642  		for {
 13643  			v := b.Control
 13644  			if v.Op != Op386SETEQF {
 13645  				break
 13646  			}
 13647  			cmp := v.Args[0]
 13648  			yes := b.Succs[0]
 13649  			no := b.Succs[1]
 13650  			b.Kind = Block386EQF
 13651  			b.SetControl(cmp)
 13652  			_ = yes
 13653  			_ = no
 13654  			return true
 13655  		}
 13656  		// match: (If (SETNEF cmp) yes no)
 13657  		// cond:
 13658  		// result: (NEF  cmp yes no)
 13659  		for {
 13660  			v := b.Control
 13661  			if v.Op != Op386SETNEF {
 13662  				break
 13663  			}
 13664  			cmp := v.Args[0]
 13665  			yes := b.Succs[0]
 13666  			no := b.Succs[1]
 13667  			b.Kind = Block386NEF
 13668  			b.SetControl(cmp)
 13669  			_ = yes
 13670  			_ = no
 13671  			return true
 13672  		}
 13673  		// match: (If cond yes no)
 13674  		// cond:
 13675  		// result: (NE (TESTB cond cond) yes no)
 13676  		for {
 13677  			v := b.Control
 13678  			_ = v
 13679  			cond := b.Control
 13680  			yes := b.Succs[0]
 13681  			no := b.Succs[1]
 13682  			b.Kind = Block386NE
 13683  			v0 := b.NewValue0(v.Line, Op386TESTB, TypeFlags)
 13684  			v0.AddArg(cond)
 13685  			v0.AddArg(cond)
 13686  			b.SetControl(v0)
 13687  			_ = yes
 13688  			_ = no
 13689  			return true
 13690  		}
 13691  	case Block386LE:
 13692  		// match: (LE (InvertFlags cmp) yes no)
 13693  		// cond:
 13694  		// result: (GE cmp yes no)
 13695  		for {
 13696  			v := b.Control
 13697  			if v.Op != Op386InvertFlags {
 13698  				break
 13699  			}
 13700  			cmp := v.Args[0]
 13701  			yes := b.Succs[0]
 13702  			no := b.Succs[1]
 13703  			b.Kind = Block386GE
 13704  			b.SetControl(cmp)
 13705  			_ = yes
 13706  			_ = no
 13707  			return true
 13708  		}
 13709  		// match: (LE (FlagEQ) yes no)
 13710  		// cond:
 13711  		// result: (First nil yes no)
 13712  		for {
 13713  			v := b.Control
 13714  			if v.Op != Op386FlagEQ {
 13715  				break
 13716  			}
 13717  			yes := b.Succs[0]
 13718  			no := b.Succs[1]
 13719  			b.Kind = BlockFirst
 13720  			b.SetControl(nil)
 13721  			_ = yes
 13722  			_ = no
 13723  			return true
 13724  		}
 13725  		// match: (LE (FlagLT_ULT) yes no)
 13726  		// cond:
 13727  		// result: (First nil yes no)
 13728  		for {
 13729  			v := b.Control
 13730  			if v.Op != Op386FlagLT_ULT {
 13731  				break
 13732  			}
 13733  			yes := b.Succs[0]
 13734  			no := b.Succs[1]
 13735  			b.Kind = BlockFirst
 13736  			b.SetControl(nil)
 13737  			_ = yes
 13738  			_ = no
 13739  			return true
 13740  		}
 13741  		// match: (LE (FlagLT_UGT) yes no)
 13742  		// cond:
 13743  		// result: (First nil yes no)
 13744  		for {
 13745  			v := b.Control
 13746  			if v.Op != Op386FlagLT_UGT {
 13747  				break
 13748  			}
 13749  			yes := b.Succs[0]
 13750  			no := b.Succs[1]
 13751  			b.Kind = BlockFirst
 13752  			b.SetControl(nil)
 13753  			_ = yes
 13754  			_ = no
 13755  			return true
 13756  		}
 13757  		// match: (LE (FlagGT_ULT) yes no)
 13758  		// cond:
 13759  		// result: (First nil no yes)
 13760  		for {
 13761  			v := b.Control
 13762  			if v.Op != Op386FlagGT_ULT {
 13763  				break
 13764  			}
 13765  			yes := b.Succs[0]
 13766  			no := b.Succs[1]
 13767  			b.Kind = BlockFirst
 13768  			b.SetControl(nil)
 13769  			b.swapSuccessors()
 13770  			_ = no
 13771  			_ = yes
 13772  			return true
 13773  		}
 13774  		// match: (LE (FlagGT_UGT) yes no)
 13775  		// cond:
 13776  		// result: (First nil no yes)
 13777  		for {
 13778  			v := b.Control
 13779  			if v.Op != Op386FlagGT_UGT {
 13780  				break
 13781  			}
 13782  			yes := b.Succs[0]
 13783  			no := b.Succs[1]
 13784  			b.Kind = BlockFirst
 13785  			b.SetControl(nil)
 13786  			b.swapSuccessors()
 13787  			_ = no
 13788  			_ = yes
 13789  			return true
 13790  		}
 13791  	case Block386LT:
 13792  		// match: (LT (InvertFlags cmp) yes no)
 13793  		// cond:
 13794  		// result: (GT cmp yes no)
 13795  		for {
 13796  			v := b.Control
 13797  			if v.Op != Op386InvertFlags {
 13798  				break
 13799  			}
 13800  			cmp := v.Args[0]
 13801  			yes := b.Succs[0]
 13802  			no := b.Succs[1]
 13803  			b.Kind = Block386GT
 13804  			b.SetControl(cmp)
 13805  			_ = yes
 13806  			_ = no
 13807  			return true
 13808  		}
 13809  		// match: (LT (FlagEQ) yes no)
 13810  		// cond:
 13811  		// result: (First nil no yes)
 13812  		for {
 13813  			v := b.Control
 13814  			if v.Op != Op386FlagEQ {
 13815  				break
 13816  			}
 13817  			yes := b.Succs[0]
 13818  			no := b.Succs[1]
 13819  			b.Kind = BlockFirst
 13820  			b.SetControl(nil)
 13821  			b.swapSuccessors()
 13822  			_ = no
 13823  			_ = yes
 13824  			return true
 13825  		}
 13826  		// match: (LT (FlagLT_ULT) yes no)
 13827  		// cond:
 13828  		// result: (First nil yes no)
 13829  		for {
 13830  			v := b.Control
 13831  			if v.Op != Op386FlagLT_ULT {
 13832  				break
 13833  			}
 13834  			yes := b.Succs[0]
 13835  			no := b.Succs[1]
 13836  			b.Kind = BlockFirst
 13837  			b.SetControl(nil)
 13838  			_ = yes
 13839  			_ = no
 13840  			return true
 13841  		}
 13842  		// match: (LT (FlagLT_UGT) yes no)
 13843  		// cond:
 13844  		// result: (First nil yes no)
 13845  		for {
 13846  			v := b.Control
 13847  			if v.Op != Op386FlagLT_UGT {
 13848  				break
 13849  			}
 13850  			yes := b.Succs[0]
 13851  			no := b.Succs[1]
 13852  			b.Kind = BlockFirst
 13853  			b.SetControl(nil)
 13854  			_ = yes
 13855  			_ = no
 13856  			return true
 13857  		}
 13858  		// match: (LT (FlagGT_ULT) yes no)
 13859  		// cond:
 13860  		// result: (First nil no yes)
 13861  		for {
 13862  			v := b.Control
 13863  			if v.Op != Op386FlagGT_ULT {
 13864  				break
 13865  			}
 13866  			yes := b.Succs[0]
 13867  			no := b.Succs[1]
 13868  			b.Kind = BlockFirst
 13869  			b.SetControl(nil)
 13870  			b.swapSuccessors()
 13871  			_ = no
 13872  			_ = yes
 13873  			return true
 13874  		}
 13875  		// match: (LT (FlagGT_UGT) yes no)
 13876  		// cond:
 13877  		// result: (First nil no yes)
 13878  		for {
 13879  			v := b.Control
 13880  			if v.Op != Op386FlagGT_UGT {
 13881  				break
 13882  			}
 13883  			yes := b.Succs[0]
 13884  			no := b.Succs[1]
 13885  			b.Kind = BlockFirst
 13886  			b.SetControl(nil)
 13887  			b.swapSuccessors()
 13888  			_ = no
 13889  			_ = yes
 13890  			return true
 13891  		}
 13892  	case Block386NE:
 13893  		// match: (NE (TESTB (SETL  cmp) (SETL  cmp)) yes no)
 13894  		// cond:
 13895  		// result: (LT  cmp yes no)
 13896  		for {
 13897  			v := b.Control
 13898  			if v.Op != Op386TESTB {
 13899  				break
 13900  			}
 13901  			v_0 := v.Args[0]
 13902  			if v_0.Op != Op386SETL {
 13903  				break
 13904  			}
 13905  			cmp := v_0.Args[0]
 13906  			v_1 := v.Args[1]
 13907  			if v_1.Op != Op386SETL {
 13908  				break
 13909  			}
 13910  			if cmp != v_1.Args[0] {
 13911  				break
 13912  			}
 13913  			yes := b.Succs[0]
 13914  			no := b.Succs[1]
 13915  			b.Kind = Block386LT
 13916  			b.SetControl(cmp)
 13917  			_ = yes
 13918  			_ = no
 13919  			return true
 13920  		}
 13921  		// match: (NE (TESTB (SETLE cmp) (SETLE cmp)) yes no)
 13922  		// cond:
 13923  		// result: (LE  cmp yes no)
 13924  		for {
 13925  			v := b.Control
 13926  			if v.Op != Op386TESTB {
 13927  				break
 13928  			}
 13929  			v_0 := v.Args[0]
 13930  			if v_0.Op != Op386SETLE {
 13931  				break
 13932  			}
 13933  			cmp := v_0.Args[0]
 13934  			v_1 := v.Args[1]
 13935  			if v_1.Op != Op386SETLE {
 13936  				break
 13937  			}
 13938  			if cmp != v_1.Args[0] {
 13939  				break
 13940  			}
 13941  			yes := b.Succs[0]
 13942  			no := b.Succs[1]
 13943  			b.Kind = Block386LE
 13944  			b.SetControl(cmp)
 13945  			_ = yes
 13946  			_ = no
 13947  			return true
 13948  		}
 13949  		// match: (NE (TESTB (SETG  cmp) (SETG  cmp)) yes no)
 13950  		// cond:
 13951  		// result: (GT  cmp yes no)
 13952  		for {
 13953  			v := b.Control
 13954  			if v.Op != Op386TESTB {
 13955  				break
 13956  			}
 13957  			v_0 := v.Args[0]
 13958  			if v_0.Op != Op386SETG {
 13959  				break
 13960  			}
 13961  			cmp := v_0.Args[0]
 13962  			v_1 := v.Args[1]
 13963  			if v_1.Op != Op386SETG {
 13964  				break
 13965  			}
 13966  			if cmp != v_1.Args[0] {
 13967  				break
 13968  			}
 13969  			yes := b.Succs[0]
 13970  			no := b.Succs[1]
 13971  			b.Kind = Block386GT
 13972  			b.SetControl(cmp)
 13973  			_ = yes
 13974  			_ = no
 13975  			return true
 13976  		}
 13977  		// match: (NE (TESTB (SETGE cmp) (SETGE cmp)) yes no)
 13978  		// cond:
 13979  		// result: (GE  cmp yes no)
 13980  		for {
 13981  			v := b.Control
 13982  			if v.Op != Op386TESTB {
 13983  				break
 13984  			}
 13985  			v_0 := v.Args[0]
 13986  			if v_0.Op != Op386SETGE {
 13987  				break
 13988  			}
 13989  			cmp := v_0.Args[0]
 13990  			v_1 := v.Args[1]
 13991  			if v_1.Op != Op386SETGE {
 13992  				break
 13993  			}
 13994  			if cmp != v_1.Args[0] {
 13995  				break
 13996  			}
 13997  			yes := b.Succs[0]
 13998  			no := b.Succs[1]
 13999  			b.Kind = Block386GE
 14000  			b.SetControl(cmp)
 14001  			_ = yes
 14002  			_ = no
 14003  			return true
 14004  		}
 14005  		// match: (NE (TESTB (SETEQ cmp) (SETEQ cmp)) yes no)
 14006  		// cond:
 14007  		// result: (EQ  cmp yes no)
 14008  		for {
 14009  			v := b.Control
 14010  			if v.Op != Op386TESTB {
 14011  				break
 14012  			}
 14013  			v_0 := v.Args[0]
 14014  			if v_0.Op != Op386SETEQ {
 14015  				break
 14016  			}
 14017  			cmp := v_0.Args[0]
 14018  			v_1 := v.Args[1]
 14019  			if v_1.Op != Op386SETEQ {
 14020  				break
 14021  			}
 14022  			if cmp != v_1.Args[0] {
 14023  				break
 14024  			}
 14025  			yes := b.Succs[0]
 14026  			no := b.Succs[1]
 14027  			b.Kind = Block386EQ
 14028  			b.SetControl(cmp)
 14029  			_ = yes
 14030  			_ = no
 14031  			return true
 14032  		}
 14033  		// match: (NE (TESTB (SETNE cmp) (SETNE cmp)) yes no)
 14034  		// cond:
 14035  		// result: (NE  cmp yes no)
 14036  		for {
 14037  			v := b.Control
 14038  			if v.Op != Op386TESTB {
 14039  				break
 14040  			}
 14041  			v_0 := v.Args[0]
 14042  			if v_0.Op != Op386SETNE {
 14043  				break
 14044  			}
 14045  			cmp := v_0.Args[0]
 14046  			v_1 := v.Args[1]
 14047  			if v_1.Op != Op386SETNE {
 14048  				break
 14049  			}
 14050  			if cmp != v_1.Args[0] {
 14051  				break
 14052  			}
 14053  			yes := b.Succs[0]
 14054  			no := b.Succs[1]
 14055  			b.Kind = Block386NE
 14056  			b.SetControl(cmp)
 14057  			_ = yes
 14058  			_ = no
 14059  			return true
 14060  		}
 14061  		// match: (NE (TESTB (SETB  cmp) (SETB  cmp)) yes no)
 14062  		// cond:
 14063  		// result: (ULT cmp yes no)
 14064  		for {
 14065  			v := b.Control
 14066  			if v.Op != Op386TESTB {
 14067  				break
 14068  			}
 14069  			v_0 := v.Args[0]
 14070  			if v_0.Op != Op386SETB {
 14071  				break
 14072  			}
 14073  			cmp := v_0.Args[0]
 14074  			v_1 := v.Args[1]
 14075  			if v_1.Op != Op386SETB {
 14076  				break
 14077  			}
 14078  			if cmp != v_1.Args[0] {
 14079  				break
 14080  			}
 14081  			yes := b.Succs[0]
 14082  			no := b.Succs[1]
 14083  			b.Kind = Block386ULT
 14084  			b.SetControl(cmp)
 14085  			_ = yes
 14086  			_ = no
 14087  			return true
 14088  		}
 14089  		// match: (NE (TESTB (SETBE cmp) (SETBE cmp)) yes no)
 14090  		// cond:
 14091  		// result: (ULE cmp yes no)
 14092  		for {
 14093  			v := b.Control
 14094  			if v.Op != Op386TESTB {
 14095  				break
 14096  			}
 14097  			v_0 := v.Args[0]
 14098  			if v_0.Op != Op386SETBE {
 14099  				break
 14100  			}
 14101  			cmp := v_0.Args[0]
 14102  			v_1 := v.Args[1]
 14103  			if v_1.Op != Op386SETBE {
 14104  				break
 14105  			}
 14106  			if cmp != v_1.Args[0] {
 14107  				break
 14108  			}
 14109  			yes := b.Succs[0]
 14110  			no := b.Succs[1]
 14111  			b.Kind = Block386ULE
 14112  			b.SetControl(cmp)
 14113  			_ = yes
 14114  			_ = no
 14115  			return true
 14116  		}
 14117  		// match: (NE (TESTB (SETA  cmp) (SETA  cmp)) yes no)
 14118  		// cond:
 14119  		// result: (UGT cmp yes no)
 14120  		for {
 14121  			v := b.Control
 14122  			if v.Op != Op386TESTB {
 14123  				break
 14124  			}
 14125  			v_0 := v.Args[0]
 14126  			if v_0.Op != Op386SETA {
 14127  				break
 14128  			}
 14129  			cmp := v_0.Args[0]
 14130  			v_1 := v.Args[1]
 14131  			if v_1.Op != Op386SETA {
 14132  				break
 14133  			}
 14134  			if cmp != v_1.Args[0] {
 14135  				break
 14136  			}
 14137  			yes := b.Succs[0]
 14138  			no := b.Succs[1]
 14139  			b.Kind = Block386UGT
 14140  			b.SetControl(cmp)
 14141  			_ = yes
 14142  			_ = no
 14143  			return true
 14144  		}
 14145  		// match: (NE (TESTB (SETAE cmp) (SETAE cmp)) yes no)
 14146  		// cond:
 14147  		// result: (UGE cmp yes no)
 14148  		for {
 14149  			v := b.Control
 14150  			if v.Op != Op386TESTB {
 14151  				break
 14152  			}
 14153  			v_0 := v.Args[0]
 14154  			if v_0.Op != Op386SETAE {
 14155  				break
 14156  			}
 14157  			cmp := v_0.Args[0]
 14158  			v_1 := v.Args[1]
 14159  			if v_1.Op != Op386SETAE {
 14160  				break
 14161  			}
 14162  			if cmp != v_1.Args[0] {
 14163  				break
 14164  			}
 14165  			yes := b.Succs[0]
 14166  			no := b.Succs[1]
 14167  			b.Kind = Block386UGE
 14168  			b.SetControl(cmp)
 14169  			_ = yes
 14170  			_ = no
 14171  			return true
 14172  		}
 14173  		// match: (NE (TESTB (SETGF  cmp) (SETGF  cmp)) yes no)
 14174  		// cond:
 14175  		// result: (UGT  cmp yes no)
 14176  		for {
 14177  			v := b.Control
 14178  			if v.Op != Op386TESTB {
 14179  				break
 14180  			}
 14181  			v_0 := v.Args[0]
 14182  			if v_0.Op != Op386SETGF {
 14183  				break
 14184  			}
 14185  			cmp := v_0.Args[0]
 14186  			v_1 := v.Args[1]
 14187  			if v_1.Op != Op386SETGF {
 14188  				break
 14189  			}
 14190  			if cmp != v_1.Args[0] {
 14191  				break
 14192  			}
 14193  			yes := b.Succs[0]
 14194  			no := b.Succs[1]
 14195  			b.Kind = Block386UGT
 14196  			b.SetControl(cmp)
 14197  			_ = yes
 14198  			_ = no
 14199  			return true
 14200  		}
 14201  		// match: (NE (TESTB (SETGEF cmp) (SETGEF cmp)) yes no)
 14202  		// cond:
 14203  		// result: (UGE  cmp yes no)
 14204  		for {
 14205  			v := b.Control
 14206  			if v.Op != Op386TESTB {
 14207  				break
 14208  			}
 14209  			v_0 := v.Args[0]
 14210  			if v_0.Op != Op386SETGEF {
 14211  				break
 14212  			}
 14213  			cmp := v_0.Args[0]
 14214  			v_1 := v.Args[1]
 14215  			if v_1.Op != Op386SETGEF {
 14216  				break
 14217  			}
 14218  			if cmp != v_1.Args[0] {
 14219  				break
 14220  			}
 14221  			yes := b.Succs[0]
 14222  			no := b.Succs[1]
 14223  			b.Kind = Block386UGE
 14224  			b.SetControl(cmp)
 14225  			_ = yes
 14226  			_ = no
 14227  			return true
 14228  		}
 14229  		// match: (NE (TESTB (SETEQF cmp) (SETEQF cmp)) yes no)
 14230  		// cond:
 14231  		// result: (EQF  cmp yes no)
 14232  		for {
 14233  			v := b.Control
 14234  			if v.Op != Op386TESTB {
 14235  				break
 14236  			}
 14237  			v_0 := v.Args[0]
 14238  			if v_0.Op != Op386SETEQF {
 14239  				break
 14240  			}
 14241  			cmp := v_0.Args[0]
 14242  			v_1 := v.Args[1]
 14243  			if v_1.Op != Op386SETEQF {
 14244  				break
 14245  			}
 14246  			if cmp != v_1.Args[0] {
 14247  				break
 14248  			}
 14249  			yes := b.Succs[0]
 14250  			no := b.Succs[1]
 14251  			b.Kind = Block386EQF
 14252  			b.SetControl(cmp)
 14253  			_ = yes
 14254  			_ = no
 14255  			return true
 14256  		}
 14257  		// match: (NE (TESTB (SETNEF cmp) (SETNEF cmp)) yes no)
 14258  		// cond:
 14259  		// result: (NEF  cmp yes no)
 14260  		for {
 14261  			v := b.Control
 14262  			if v.Op != Op386TESTB {
 14263  				break
 14264  			}
 14265  			v_0 := v.Args[0]
 14266  			if v_0.Op != Op386SETNEF {
 14267  				break
 14268  			}
 14269  			cmp := v_0.Args[0]
 14270  			v_1 := v.Args[1]
 14271  			if v_1.Op != Op386SETNEF {
 14272  				break
 14273  			}
 14274  			if cmp != v_1.Args[0] {
 14275  				break
 14276  			}
 14277  			yes := b.Succs[0]
 14278  			no := b.Succs[1]
 14279  			b.Kind = Block386NEF
 14280  			b.SetControl(cmp)
 14281  			_ = yes
 14282  			_ = no
 14283  			return true
 14284  		}
 14285  		// match: (NE (InvertFlags cmp) yes no)
 14286  		// cond:
 14287  		// result: (NE cmp yes no)
 14288  		for {
 14289  			v := b.Control
 14290  			if v.Op != Op386InvertFlags {
 14291  				break
 14292  			}
 14293  			cmp := v.Args[0]
 14294  			yes := b.Succs[0]
 14295  			no := b.Succs[1]
 14296  			b.Kind = Block386NE
 14297  			b.SetControl(cmp)
 14298  			_ = yes
 14299  			_ = no
 14300  			return true
 14301  		}
 14302  		// match: (NE (FlagEQ) yes no)
 14303  		// cond:
 14304  		// result: (First nil no yes)
 14305  		for {
 14306  			v := b.Control
 14307  			if v.Op != Op386FlagEQ {
 14308  				break
 14309  			}
 14310  			yes := b.Succs[0]
 14311  			no := b.Succs[1]
 14312  			b.Kind = BlockFirst
 14313  			b.SetControl(nil)
 14314  			b.swapSuccessors()
 14315  			_ = no
 14316  			_ = yes
 14317  			return true
 14318  		}
 14319  		// match: (NE (FlagLT_ULT) yes no)
 14320  		// cond:
 14321  		// result: (First nil yes no)
 14322  		for {
 14323  			v := b.Control
 14324  			if v.Op != Op386FlagLT_ULT {
 14325  				break
 14326  			}
 14327  			yes := b.Succs[0]
 14328  			no := b.Succs[1]
 14329  			b.Kind = BlockFirst
 14330  			b.SetControl(nil)
 14331  			_ = yes
 14332  			_ = no
 14333  			return true
 14334  		}
 14335  		// match: (NE (FlagLT_UGT) yes no)
 14336  		// cond:
 14337  		// result: (First nil yes no)
 14338  		for {
 14339  			v := b.Control
 14340  			if v.Op != Op386FlagLT_UGT {
 14341  				break
 14342  			}
 14343  			yes := b.Succs[0]
 14344  			no := b.Succs[1]
 14345  			b.Kind = BlockFirst
 14346  			b.SetControl(nil)
 14347  			_ = yes
 14348  			_ = no
 14349  			return true
 14350  		}
 14351  		// match: (NE (FlagGT_ULT) yes no)
 14352  		// cond:
 14353  		// result: (First nil yes no)
 14354  		for {
 14355  			v := b.Control
 14356  			if v.Op != Op386FlagGT_ULT {
 14357  				break
 14358  			}
 14359  			yes := b.Succs[0]
 14360  			no := b.Succs[1]
 14361  			b.Kind = BlockFirst
 14362  			b.SetControl(nil)
 14363  			_ = yes
 14364  			_ = no
 14365  			return true
 14366  		}
 14367  		// match: (NE (FlagGT_UGT) yes no)
 14368  		// cond:
 14369  		// result: (First nil yes no)
 14370  		for {
 14371  			v := b.Control
 14372  			if v.Op != Op386FlagGT_UGT {
 14373  				break
 14374  			}
 14375  			yes := b.Succs[0]
 14376  			no := b.Succs[1]
 14377  			b.Kind = BlockFirst
 14378  			b.SetControl(nil)
 14379  			_ = yes
 14380  			_ = no
 14381  			return true
 14382  		}
 14383  	case Block386UGE:
 14384  		// match: (UGE (InvertFlags cmp) yes no)
 14385  		// cond:
 14386  		// result: (ULE cmp yes no)
 14387  		for {
 14388  			v := b.Control
 14389  			if v.Op != Op386InvertFlags {
 14390  				break
 14391  			}
 14392  			cmp := v.Args[0]
 14393  			yes := b.Succs[0]
 14394  			no := b.Succs[1]
 14395  			b.Kind = Block386ULE
 14396  			b.SetControl(cmp)
 14397  			_ = yes
 14398  			_ = no
 14399  			return true
 14400  		}
 14401  		// match: (UGE (FlagEQ) yes no)
 14402  		// cond:
 14403  		// result: (First nil yes no)
 14404  		for {
 14405  			v := b.Control
 14406  			if v.Op != Op386FlagEQ {
 14407  				break
 14408  			}
 14409  			yes := b.Succs[0]
 14410  			no := b.Succs[1]
 14411  			b.Kind = BlockFirst
 14412  			b.SetControl(nil)
 14413  			_ = yes
 14414  			_ = no
 14415  			return true
 14416  		}
 14417  		// match: (UGE (FlagLT_ULT) yes no)
 14418  		// cond:
 14419  		// result: (First nil no yes)
 14420  		for {
 14421  			v := b.Control
 14422  			if v.Op != Op386FlagLT_ULT {
 14423  				break
 14424  			}
 14425  			yes := b.Succs[0]
 14426  			no := b.Succs[1]
 14427  			b.Kind = BlockFirst
 14428  			b.SetControl(nil)
 14429  			b.swapSuccessors()
 14430  			_ = no
 14431  			_ = yes
 14432  			return true
 14433  		}
 14434  		// match: (UGE (FlagLT_UGT) yes no)
 14435  		// cond:
 14436  		// result: (First nil yes no)
 14437  		for {
 14438  			v := b.Control
 14439  			if v.Op != Op386FlagLT_UGT {
 14440  				break
 14441  			}
 14442  			yes := b.Succs[0]
 14443  			no := b.Succs[1]
 14444  			b.Kind = BlockFirst
 14445  			b.SetControl(nil)
 14446  			_ = yes
 14447  			_ = no
 14448  			return true
 14449  		}
 14450  		// match: (UGE (FlagGT_ULT) yes no)
 14451  		// cond:
 14452  		// result: (First nil no yes)
 14453  		for {
 14454  			v := b.Control
 14455  			if v.Op != Op386FlagGT_ULT {
 14456  				break
 14457  			}
 14458  			yes := b.Succs[0]
 14459  			no := b.Succs[1]
 14460  			b.Kind = BlockFirst
 14461  			b.SetControl(nil)
 14462  			b.swapSuccessors()
 14463  			_ = no
 14464  			_ = yes
 14465  			return true
 14466  		}
 14467  		// match: (UGE (FlagGT_UGT) yes no)
 14468  		// cond:
 14469  		// result: (First nil yes no)
 14470  		for {
 14471  			v := b.Control
 14472  			if v.Op != Op386FlagGT_UGT {
 14473  				break
 14474  			}
 14475  			yes := b.Succs[0]
 14476  			no := b.Succs[1]
 14477  			b.Kind = BlockFirst
 14478  			b.SetControl(nil)
 14479  			_ = yes
 14480  			_ = no
 14481  			return true
 14482  		}
 14483  	case Block386UGT:
 14484  		// match: (UGT (InvertFlags cmp) yes no)
 14485  		// cond:
 14486  		// result: (ULT cmp yes no)
 14487  		for {
 14488  			v := b.Control
 14489  			if v.Op != Op386InvertFlags {
 14490  				break
 14491  			}
 14492  			cmp := v.Args[0]
 14493  			yes := b.Succs[0]
 14494  			no := b.Succs[1]
 14495  			b.Kind = Block386ULT
 14496  			b.SetControl(cmp)
 14497  			_ = yes
 14498  			_ = no
 14499  			return true
 14500  		}
 14501  		// match: (UGT (FlagEQ) yes no)
 14502  		// cond:
 14503  		// result: (First nil no yes)
 14504  		for {
 14505  			v := b.Control
 14506  			if v.Op != Op386FlagEQ {
 14507  				break
 14508  			}
 14509  			yes := b.Succs[0]
 14510  			no := b.Succs[1]
 14511  			b.Kind = BlockFirst
 14512  			b.SetControl(nil)
 14513  			b.swapSuccessors()
 14514  			_ = no
 14515  			_ = yes
 14516  			return true
 14517  		}
 14518  		// match: (UGT (FlagLT_ULT) yes no)
 14519  		// cond:
 14520  		// result: (First nil no yes)
 14521  		for {
 14522  			v := b.Control
 14523  			if v.Op != Op386FlagLT_ULT {
 14524  				break
 14525  			}
 14526  			yes := b.Succs[0]
 14527  			no := b.Succs[1]
 14528  			b.Kind = BlockFirst
 14529  			b.SetControl(nil)
 14530  			b.swapSuccessors()
 14531  			_ = no
 14532  			_ = yes
 14533  			return true
 14534  		}
 14535  		// match: (UGT (FlagLT_UGT) yes no)
 14536  		// cond:
 14537  		// result: (First nil yes no)
 14538  		for {
 14539  			v := b.Control
 14540  			if v.Op != Op386FlagLT_UGT {
 14541  				break
 14542  			}
 14543  			yes := b.Succs[0]
 14544  			no := b.Succs[1]
 14545  			b.Kind = BlockFirst
 14546  			b.SetControl(nil)
 14547  			_ = yes
 14548  			_ = no
 14549  			return true
 14550  		}
 14551  		// match: (UGT (FlagGT_ULT) yes no)
 14552  		// cond:
 14553  		// result: (First nil no yes)
 14554  		for {
 14555  			v := b.Control
 14556  			if v.Op != Op386FlagGT_ULT {
 14557  				break
 14558  			}
 14559  			yes := b.Succs[0]
 14560  			no := b.Succs[1]
 14561  			b.Kind = BlockFirst
 14562  			b.SetControl(nil)
 14563  			b.swapSuccessors()
 14564  			_ = no
 14565  			_ = yes
 14566  			return true
 14567  		}
 14568  		// match: (UGT (FlagGT_UGT) yes no)
 14569  		// cond:
 14570  		// result: (First nil yes no)
 14571  		for {
 14572  			v := b.Control
 14573  			if v.Op != Op386FlagGT_UGT {
 14574  				break
 14575  			}
 14576  			yes := b.Succs[0]
 14577  			no := b.Succs[1]
 14578  			b.Kind = BlockFirst
 14579  			b.SetControl(nil)
 14580  			_ = yes
 14581  			_ = no
 14582  			return true
 14583  		}
 14584  	case Block386ULE:
 14585  		// match: (ULE (InvertFlags cmp) yes no)
 14586  		// cond:
 14587  		// result: (UGE cmp yes no)
 14588  		for {
 14589  			v := b.Control
 14590  			if v.Op != Op386InvertFlags {
 14591  				break
 14592  			}
 14593  			cmp := v.Args[0]
 14594  			yes := b.Succs[0]
 14595  			no := b.Succs[1]
 14596  			b.Kind = Block386UGE
 14597  			b.SetControl(cmp)
 14598  			_ = yes
 14599  			_ = no
 14600  			return true
 14601  		}
 14602  		// match: (ULE (FlagEQ) yes no)
 14603  		// cond:
 14604  		// result: (First nil yes no)
 14605  		for {
 14606  			v := b.Control
 14607  			if v.Op != Op386FlagEQ {
 14608  				break
 14609  			}
 14610  			yes := b.Succs[0]
 14611  			no := b.Succs[1]
 14612  			b.Kind = BlockFirst
 14613  			b.SetControl(nil)
 14614  			_ = yes
 14615  			_ = no
 14616  			return true
 14617  		}
 14618  		// match: (ULE (FlagLT_ULT) yes no)
 14619  		// cond:
 14620  		// result: (First nil yes no)
 14621  		for {
 14622  			v := b.Control
 14623  			if v.Op != Op386FlagLT_ULT {
 14624  				break
 14625  			}
 14626  			yes := b.Succs[0]
 14627  			no := b.Succs[1]
 14628  			b.Kind = BlockFirst
 14629  			b.SetControl(nil)
 14630  			_ = yes
 14631  			_ = no
 14632  			return true
 14633  		}
 14634  		// match: (ULE (FlagLT_UGT) yes no)
 14635  		// cond:
 14636  		// result: (First nil no yes)
 14637  		for {
 14638  			v := b.Control
 14639  			if v.Op != Op386FlagLT_UGT {
 14640  				break
 14641  			}
 14642  			yes := b.Succs[0]
 14643  			no := b.Succs[1]
 14644  			b.Kind = BlockFirst
 14645  			b.SetControl(nil)
 14646  			b.swapSuccessors()
 14647  			_ = no
 14648  			_ = yes
 14649  			return true
 14650  		}
 14651  		// match: (ULE (FlagGT_ULT) yes no)
 14652  		// cond:
 14653  		// result: (First nil yes no)
 14654  		for {
 14655  			v := b.Control
 14656  			if v.Op != Op386FlagGT_ULT {
 14657  				break
 14658  			}
 14659  			yes := b.Succs[0]
 14660  			no := b.Succs[1]
 14661  			b.Kind = BlockFirst
 14662  			b.SetControl(nil)
 14663  			_ = yes
 14664  			_ = no
 14665  			return true
 14666  		}
 14667  		// match: (ULE (FlagGT_UGT) yes no)
 14668  		// cond:
 14669  		// result: (First nil no yes)
 14670  		for {
 14671  			v := b.Control
 14672  			if v.Op != Op386FlagGT_UGT {
 14673  				break
 14674  			}
 14675  			yes := b.Succs[0]
 14676  			no := b.Succs[1]
 14677  			b.Kind = BlockFirst
 14678  			b.SetControl(nil)
 14679  			b.swapSuccessors()
 14680  			_ = no
 14681  			_ = yes
 14682  			return true
 14683  		}
 14684  	case Block386ULT:
 14685  		// match: (ULT (InvertFlags cmp) yes no)
 14686  		// cond:
 14687  		// result: (UGT cmp yes no)
 14688  		for {
 14689  			v := b.Control
 14690  			if v.Op != Op386InvertFlags {
 14691  				break
 14692  			}
 14693  			cmp := v.Args[0]
 14694  			yes := b.Succs[0]
 14695  			no := b.Succs[1]
 14696  			b.Kind = Block386UGT
 14697  			b.SetControl(cmp)
 14698  			_ = yes
 14699  			_ = no
 14700  			return true
 14701  		}
 14702  		// match: (ULT (FlagEQ) yes no)
 14703  		// cond:
 14704  		// result: (First nil no yes)
 14705  		for {
 14706  			v := b.Control
 14707  			if v.Op != Op386FlagEQ {
 14708  				break
 14709  			}
 14710  			yes := b.Succs[0]
 14711  			no := b.Succs[1]
 14712  			b.Kind = BlockFirst
 14713  			b.SetControl(nil)
 14714  			b.swapSuccessors()
 14715  			_ = no
 14716  			_ = yes
 14717  			return true
 14718  		}
 14719  		// match: (ULT (FlagLT_ULT) yes no)
 14720  		// cond:
 14721  		// result: (First nil yes no)
 14722  		for {
 14723  			v := b.Control
 14724  			if v.Op != Op386FlagLT_ULT {
 14725  				break
 14726  			}
 14727  			yes := b.Succs[0]
 14728  			no := b.Succs[1]
 14729  			b.Kind = BlockFirst
 14730  			b.SetControl(nil)
 14731  			_ = yes
 14732  			_ = no
 14733  			return true
 14734  		}
 14735  		// match: (ULT (FlagLT_UGT) yes no)
 14736  		// cond:
 14737  		// result: (First nil no yes)
 14738  		for {
 14739  			v := b.Control
 14740  			if v.Op != Op386FlagLT_UGT {
 14741  				break
 14742  			}
 14743  			yes := b.Succs[0]
 14744  			no := b.Succs[1]
 14745  			b.Kind = BlockFirst
 14746  			b.SetControl(nil)
 14747  			b.swapSuccessors()
 14748  			_ = no
 14749  			_ = yes
 14750  			return true
 14751  		}
 14752  		// match: (ULT (FlagGT_ULT) yes no)
 14753  		// cond:
 14754  		// result: (First nil yes no)
 14755  		for {
 14756  			v := b.Control
 14757  			if v.Op != Op386FlagGT_ULT {
 14758  				break
 14759  			}
 14760  			yes := b.Succs[0]
 14761  			no := b.Succs[1]
 14762  			b.Kind = BlockFirst
 14763  			b.SetControl(nil)
 14764  			_ = yes
 14765  			_ = no
 14766  			return true
 14767  		}
 14768  		// match: (ULT (FlagGT_UGT) yes no)
 14769  		// cond:
 14770  		// result: (First nil no yes)
 14771  		for {
 14772  			v := b.Control
 14773  			if v.Op != Op386FlagGT_UGT {
 14774  				break
 14775  			}
 14776  			yes := b.Succs[0]
 14777  			no := b.Succs[1]
 14778  			b.Kind = BlockFirst
 14779  			b.SetControl(nil)
 14780  			b.swapSuccessors()
 14781  			_ = no
 14782  			_ = yes
 14783  			return true
 14784  		}
 14785  	}
 14786  	return false
 14787  }