Black Lives Matter. Support the Equal Justice Initiative.

Source file src/cmd/compile/internal/ssa/rewriteARM.go

Documentation: cmd/compile/internal/ssa

     1  // Code generated from gen/ARM.rules; DO NOT EDIT.
     2  // generated with: cd gen; go run *.go
     3  
     4  package ssa
     5  
     6  import "cmd/internal/objabi"
     7  import "cmd/compile/internal/types"
     8  
     9  func rewriteValueARM(v *Value) bool {
    10  	switch v.Op {
    11  	case OpARMADC:
    12  		return rewriteValueARM_OpARMADC(v)
    13  	case OpARMADCconst:
    14  		return rewriteValueARM_OpARMADCconst(v)
    15  	case OpARMADCshiftLL:
    16  		return rewriteValueARM_OpARMADCshiftLL(v)
    17  	case OpARMADCshiftLLreg:
    18  		return rewriteValueARM_OpARMADCshiftLLreg(v)
    19  	case OpARMADCshiftRA:
    20  		return rewriteValueARM_OpARMADCshiftRA(v)
    21  	case OpARMADCshiftRAreg:
    22  		return rewriteValueARM_OpARMADCshiftRAreg(v)
    23  	case OpARMADCshiftRL:
    24  		return rewriteValueARM_OpARMADCshiftRL(v)
    25  	case OpARMADCshiftRLreg:
    26  		return rewriteValueARM_OpARMADCshiftRLreg(v)
    27  	case OpARMADD:
    28  		return rewriteValueARM_OpARMADD(v)
    29  	case OpARMADDD:
    30  		return rewriteValueARM_OpARMADDD(v)
    31  	case OpARMADDF:
    32  		return rewriteValueARM_OpARMADDF(v)
    33  	case OpARMADDS:
    34  		return rewriteValueARM_OpARMADDS(v)
    35  	case OpARMADDSshiftLL:
    36  		return rewriteValueARM_OpARMADDSshiftLL(v)
    37  	case OpARMADDSshiftLLreg:
    38  		return rewriteValueARM_OpARMADDSshiftLLreg(v)
    39  	case OpARMADDSshiftRA:
    40  		return rewriteValueARM_OpARMADDSshiftRA(v)
    41  	case OpARMADDSshiftRAreg:
    42  		return rewriteValueARM_OpARMADDSshiftRAreg(v)
    43  	case OpARMADDSshiftRL:
    44  		return rewriteValueARM_OpARMADDSshiftRL(v)
    45  	case OpARMADDSshiftRLreg:
    46  		return rewriteValueARM_OpARMADDSshiftRLreg(v)
    47  	case OpARMADDconst:
    48  		return rewriteValueARM_OpARMADDconst(v)
    49  	case OpARMADDshiftLL:
    50  		return rewriteValueARM_OpARMADDshiftLL(v)
    51  	case OpARMADDshiftLLreg:
    52  		return rewriteValueARM_OpARMADDshiftLLreg(v)
    53  	case OpARMADDshiftRA:
    54  		return rewriteValueARM_OpARMADDshiftRA(v)
    55  	case OpARMADDshiftRAreg:
    56  		return rewriteValueARM_OpARMADDshiftRAreg(v)
    57  	case OpARMADDshiftRL:
    58  		return rewriteValueARM_OpARMADDshiftRL(v)
    59  	case OpARMADDshiftRLreg:
    60  		return rewriteValueARM_OpARMADDshiftRLreg(v)
    61  	case OpARMAND:
    62  		return rewriteValueARM_OpARMAND(v)
    63  	case OpARMANDconst:
    64  		return rewriteValueARM_OpARMANDconst(v)
    65  	case OpARMANDshiftLL:
    66  		return rewriteValueARM_OpARMANDshiftLL(v)
    67  	case OpARMANDshiftLLreg:
    68  		return rewriteValueARM_OpARMANDshiftLLreg(v)
    69  	case OpARMANDshiftRA:
    70  		return rewriteValueARM_OpARMANDshiftRA(v)
    71  	case OpARMANDshiftRAreg:
    72  		return rewriteValueARM_OpARMANDshiftRAreg(v)
    73  	case OpARMANDshiftRL:
    74  		return rewriteValueARM_OpARMANDshiftRL(v)
    75  	case OpARMANDshiftRLreg:
    76  		return rewriteValueARM_OpARMANDshiftRLreg(v)
    77  	case OpARMBFX:
    78  		return rewriteValueARM_OpARMBFX(v)
    79  	case OpARMBFXU:
    80  		return rewriteValueARM_OpARMBFXU(v)
    81  	case OpARMBIC:
    82  		return rewriteValueARM_OpARMBIC(v)
    83  	case OpARMBICconst:
    84  		return rewriteValueARM_OpARMBICconst(v)
    85  	case OpARMBICshiftLL:
    86  		return rewriteValueARM_OpARMBICshiftLL(v)
    87  	case OpARMBICshiftLLreg:
    88  		return rewriteValueARM_OpARMBICshiftLLreg(v)
    89  	case OpARMBICshiftRA:
    90  		return rewriteValueARM_OpARMBICshiftRA(v)
    91  	case OpARMBICshiftRAreg:
    92  		return rewriteValueARM_OpARMBICshiftRAreg(v)
    93  	case OpARMBICshiftRL:
    94  		return rewriteValueARM_OpARMBICshiftRL(v)
    95  	case OpARMBICshiftRLreg:
    96  		return rewriteValueARM_OpARMBICshiftRLreg(v)
    97  	case OpARMCMN:
    98  		return rewriteValueARM_OpARMCMN(v)
    99  	case OpARMCMNconst:
   100  		return rewriteValueARM_OpARMCMNconst(v)
   101  	case OpARMCMNshiftLL:
   102  		return rewriteValueARM_OpARMCMNshiftLL(v)
   103  	case OpARMCMNshiftLLreg:
   104  		return rewriteValueARM_OpARMCMNshiftLLreg(v)
   105  	case OpARMCMNshiftRA:
   106  		return rewriteValueARM_OpARMCMNshiftRA(v)
   107  	case OpARMCMNshiftRAreg:
   108  		return rewriteValueARM_OpARMCMNshiftRAreg(v)
   109  	case OpARMCMNshiftRL:
   110  		return rewriteValueARM_OpARMCMNshiftRL(v)
   111  	case OpARMCMNshiftRLreg:
   112  		return rewriteValueARM_OpARMCMNshiftRLreg(v)
   113  	case OpARMCMOVWHSconst:
   114  		return rewriteValueARM_OpARMCMOVWHSconst(v)
   115  	case OpARMCMOVWLSconst:
   116  		return rewriteValueARM_OpARMCMOVWLSconst(v)
   117  	case OpARMCMP:
   118  		return rewriteValueARM_OpARMCMP(v)
   119  	case OpARMCMPD:
   120  		return rewriteValueARM_OpARMCMPD(v)
   121  	case OpARMCMPF:
   122  		return rewriteValueARM_OpARMCMPF(v)
   123  	case OpARMCMPconst:
   124  		return rewriteValueARM_OpARMCMPconst(v)
   125  	case OpARMCMPshiftLL:
   126  		return rewriteValueARM_OpARMCMPshiftLL(v)
   127  	case OpARMCMPshiftLLreg:
   128  		return rewriteValueARM_OpARMCMPshiftLLreg(v)
   129  	case OpARMCMPshiftRA:
   130  		return rewriteValueARM_OpARMCMPshiftRA(v)
   131  	case OpARMCMPshiftRAreg:
   132  		return rewriteValueARM_OpARMCMPshiftRAreg(v)
   133  	case OpARMCMPshiftRL:
   134  		return rewriteValueARM_OpARMCMPshiftRL(v)
   135  	case OpARMCMPshiftRLreg:
   136  		return rewriteValueARM_OpARMCMPshiftRLreg(v)
   137  	case OpARMEqual:
   138  		return rewriteValueARM_OpARMEqual(v)
   139  	case OpARMGreaterEqual:
   140  		return rewriteValueARM_OpARMGreaterEqual(v)
   141  	case OpARMGreaterEqualU:
   142  		return rewriteValueARM_OpARMGreaterEqualU(v)
   143  	case OpARMGreaterThan:
   144  		return rewriteValueARM_OpARMGreaterThan(v)
   145  	case OpARMGreaterThanU:
   146  		return rewriteValueARM_OpARMGreaterThanU(v)
   147  	case OpARMLessEqual:
   148  		return rewriteValueARM_OpARMLessEqual(v)
   149  	case OpARMLessEqualU:
   150  		return rewriteValueARM_OpARMLessEqualU(v)
   151  	case OpARMLessThan:
   152  		return rewriteValueARM_OpARMLessThan(v)
   153  	case OpARMLessThanU:
   154  		return rewriteValueARM_OpARMLessThanU(v)
   155  	case OpARMMOVBUload:
   156  		return rewriteValueARM_OpARMMOVBUload(v)
   157  	case OpARMMOVBUloadidx:
   158  		return rewriteValueARM_OpARMMOVBUloadidx(v)
   159  	case OpARMMOVBUreg:
   160  		return rewriteValueARM_OpARMMOVBUreg(v)
   161  	case OpARMMOVBload:
   162  		return rewriteValueARM_OpARMMOVBload(v)
   163  	case OpARMMOVBloadidx:
   164  		return rewriteValueARM_OpARMMOVBloadidx(v)
   165  	case OpARMMOVBreg:
   166  		return rewriteValueARM_OpARMMOVBreg(v)
   167  	case OpARMMOVBstore:
   168  		return rewriteValueARM_OpARMMOVBstore(v)
   169  	case OpARMMOVBstoreidx:
   170  		return rewriteValueARM_OpARMMOVBstoreidx(v)
   171  	case OpARMMOVDload:
   172  		return rewriteValueARM_OpARMMOVDload(v)
   173  	case OpARMMOVDstore:
   174  		return rewriteValueARM_OpARMMOVDstore(v)
   175  	case OpARMMOVFload:
   176  		return rewriteValueARM_OpARMMOVFload(v)
   177  	case OpARMMOVFstore:
   178  		return rewriteValueARM_OpARMMOVFstore(v)
   179  	case OpARMMOVHUload:
   180  		return rewriteValueARM_OpARMMOVHUload(v)
   181  	case OpARMMOVHUloadidx:
   182  		return rewriteValueARM_OpARMMOVHUloadidx(v)
   183  	case OpARMMOVHUreg:
   184  		return rewriteValueARM_OpARMMOVHUreg(v)
   185  	case OpARMMOVHload:
   186  		return rewriteValueARM_OpARMMOVHload(v)
   187  	case OpARMMOVHloadidx:
   188  		return rewriteValueARM_OpARMMOVHloadidx(v)
   189  	case OpARMMOVHreg:
   190  		return rewriteValueARM_OpARMMOVHreg(v)
   191  	case OpARMMOVHstore:
   192  		return rewriteValueARM_OpARMMOVHstore(v)
   193  	case OpARMMOVHstoreidx:
   194  		return rewriteValueARM_OpARMMOVHstoreidx(v)
   195  	case OpARMMOVWload:
   196  		return rewriteValueARM_OpARMMOVWload(v)
   197  	case OpARMMOVWloadidx:
   198  		return rewriteValueARM_OpARMMOVWloadidx(v)
   199  	case OpARMMOVWloadshiftLL:
   200  		return rewriteValueARM_OpARMMOVWloadshiftLL(v)
   201  	case OpARMMOVWloadshiftRA:
   202  		return rewriteValueARM_OpARMMOVWloadshiftRA(v)
   203  	case OpARMMOVWloadshiftRL:
   204  		return rewriteValueARM_OpARMMOVWloadshiftRL(v)
   205  	case OpARMMOVWreg:
   206  		return rewriteValueARM_OpARMMOVWreg(v)
   207  	case OpARMMOVWstore:
   208  		return rewriteValueARM_OpARMMOVWstore(v)
   209  	case OpARMMOVWstoreidx:
   210  		return rewriteValueARM_OpARMMOVWstoreidx(v)
   211  	case OpARMMOVWstoreshiftLL:
   212  		return rewriteValueARM_OpARMMOVWstoreshiftLL(v)
   213  	case OpARMMOVWstoreshiftRA:
   214  		return rewriteValueARM_OpARMMOVWstoreshiftRA(v)
   215  	case OpARMMOVWstoreshiftRL:
   216  		return rewriteValueARM_OpARMMOVWstoreshiftRL(v)
   217  	case OpARMMUL:
   218  		return rewriteValueARM_OpARMMUL(v)
   219  	case OpARMMULA:
   220  		return rewriteValueARM_OpARMMULA(v)
   221  	case OpARMMULD:
   222  		return rewriteValueARM_OpARMMULD(v)
   223  	case OpARMMULF:
   224  		return rewriteValueARM_OpARMMULF(v)
   225  	case OpARMMULS:
   226  		return rewriteValueARM_OpARMMULS(v)
   227  	case OpARMMVN:
   228  		return rewriteValueARM_OpARMMVN(v)
   229  	case OpARMMVNshiftLL:
   230  		return rewriteValueARM_OpARMMVNshiftLL(v)
   231  	case OpARMMVNshiftLLreg:
   232  		return rewriteValueARM_OpARMMVNshiftLLreg(v)
   233  	case OpARMMVNshiftRA:
   234  		return rewriteValueARM_OpARMMVNshiftRA(v)
   235  	case OpARMMVNshiftRAreg:
   236  		return rewriteValueARM_OpARMMVNshiftRAreg(v)
   237  	case OpARMMVNshiftRL:
   238  		return rewriteValueARM_OpARMMVNshiftRL(v)
   239  	case OpARMMVNshiftRLreg:
   240  		return rewriteValueARM_OpARMMVNshiftRLreg(v)
   241  	case OpARMNEGD:
   242  		return rewriteValueARM_OpARMNEGD(v)
   243  	case OpARMNEGF:
   244  		return rewriteValueARM_OpARMNEGF(v)
   245  	case OpARMNMULD:
   246  		return rewriteValueARM_OpARMNMULD(v)
   247  	case OpARMNMULF:
   248  		return rewriteValueARM_OpARMNMULF(v)
   249  	case OpARMNotEqual:
   250  		return rewriteValueARM_OpARMNotEqual(v)
   251  	case OpARMOR:
   252  		return rewriteValueARM_OpARMOR(v)
   253  	case OpARMORconst:
   254  		return rewriteValueARM_OpARMORconst(v)
   255  	case OpARMORshiftLL:
   256  		return rewriteValueARM_OpARMORshiftLL(v)
   257  	case OpARMORshiftLLreg:
   258  		return rewriteValueARM_OpARMORshiftLLreg(v)
   259  	case OpARMORshiftRA:
   260  		return rewriteValueARM_OpARMORshiftRA(v)
   261  	case OpARMORshiftRAreg:
   262  		return rewriteValueARM_OpARMORshiftRAreg(v)
   263  	case OpARMORshiftRL:
   264  		return rewriteValueARM_OpARMORshiftRL(v)
   265  	case OpARMORshiftRLreg:
   266  		return rewriteValueARM_OpARMORshiftRLreg(v)
   267  	case OpARMRSB:
   268  		return rewriteValueARM_OpARMRSB(v)
   269  	case OpARMRSBSshiftLL:
   270  		return rewriteValueARM_OpARMRSBSshiftLL(v)
   271  	case OpARMRSBSshiftLLreg:
   272  		return rewriteValueARM_OpARMRSBSshiftLLreg(v)
   273  	case OpARMRSBSshiftRA:
   274  		return rewriteValueARM_OpARMRSBSshiftRA(v)
   275  	case OpARMRSBSshiftRAreg:
   276  		return rewriteValueARM_OpARMRSBSshiftRAreg(v)
   277  	case OpARMRSBSshiftRL:
   278  		return rewriteValueARM_OpARMRSBSshiftRL(v)
   279  	case OpARMRSBSshiftRLreg:
   280  		return rewriteValueARM_OpARMRSBSshiftRLreg(v)
   281  	case OpARMRSBconst:
   282  		return rewriteValueARM_OpARMRSBconst(v)
   283  	case OpARMRSBshiftLL:
   284  		return rewriteValueARM_OpARMRSBshiftLL(v)
   285  	case OpARMRSBshiftLLreg:
   286  		return rewriteValueARM_OpARMRSBshiftLLreg(v)
   287  	case OpARMRSBshiftRA:
   288  		return rewriteValueARM_OpARMRSBshiftRA(v)
   289  	case OpARMRSBshiftRAreg:
   290  		return rewriteValueARM_OpARMRSBshiftRAreg(v)
   291  	case OpARMRSBshiftRL:
   292  		return rewriteValueARM_OpARMRSBshiftRL(v)
   293  	case OpARMRSBshiftRLreg:
   294  		return rewriteValueARM_OpARMRSBshiftRLreg(v)
   295  	case OpARMRSCconst:
   296  		return rewriteValueARM_OpARMRSCconst(v)
   297  	case OpARMRSCshiftLL:
   298  		return rewriteValueARM_OpARMRSCshiftLL(v)
   299  	case OpARMRSCshiftLLreg:
   300  		return rewriteValueARM_OpARMRSCshiftLLreg(v)
   301  	case OpARMRSCshiftRA:
   302  		return rewriteValueARM_OpARMRSCshiftRA(v)
   303  	case OpARMRSCshiftRAreg:
   304  		return rewriteValueARM_OpARMRSCshiftRAreg(v)
   305  	case OpARMRSCshiftRL:
   306  		return rewriteValueARM_OpARMRSCshiftRL(v)
   307  	case OpARMRSCshiftRLreg:
   308  		return rewriteValueARM_OpARMRSCshiftRLreg(v)
   309  	case OpARMSBC:
   310  		return rewriteValueARM_OpARMSBC(v)
   311  	case OpARMSBCconst:
   312  		return rewriteValueARM_OpARMSBCconst(v)
   313  	case OpARMSBCshiftLL:
   314  		return rewriteValueARM_OpARMSBCshiftLL(v)
   315  	case OpARMSBCshiftLLreg:
   316  		return rewriteValueARM_OpARMSBCshiftLLreg(v)
   317  	case OpARMSBCshiftRA:
   318  		return rewriteValueARM_OpARMSBCshiftRA(v)
   319  	case OpARMSBCshiftRAreg:
   320  		return rewriteValueARM_OpARMSBCshiftRAreg(v)
   321  	case OpARMSBCshiftRL:
   322  		return rewriteValueARM_OpARMSBCshiftRL(v)
   323  	case OpARMSBCshiftRLreg:
   324  		return rewriteValueARM_OpARMSBCshiftRLreg(v)
   325  	case OpARMSLL:
   326  		return rewriteValueARM_OpARMSLL(v)
   327  	case OpARMSLLconst:
   328  		return rewriteValueARM_OpARMSLLconst(v)
   329  	case OpARMSRA:
   330  		return rewriteValueARM_OpARMSRA(v)
   331  	case OpARMSRAcond:
   332  		return rewriteValueARM_OpARMSRAcond(v)
   333  	case OpARMSRAconst:
   334  		return rewriteValueARM_OpARMSRAconst(v)
   335  	case OpARMSRL:
   336  		return rewriteValueARM_OpARMSRL(v)
   337  	case OpARMSRLconst:
   338  		return rewriteValueARM_OpARMSRLconst(v)
   339  	case OpARMSUB:
   340  		return rewriteValueARM_OpARMSUB(v)
   341  	case OpARMSUBD:
   342  		return rewriteValueARM_OpARMSUBD(v)
   343  	case OpARMSUBF:
   344  		return rewriteValueARM_OpARMSUBF(v)
   345  	case OpARMSUBS:
   346  		return rewriteValueARM_OpARMSUBS(v)
   347  	case OpARMSUBSshiftLL:
   348  		return rewriteValueARM_OpARMSUBSshiftLL(v)
   349  	case OpARMSUBSshiftLLreg:
   350  		return rewriteValueARM_OpARMSUBSshiftLLreg(v)
   351  	case OpARMSUBSshiftRA:
   352  		return rewriteValueARM_OpARMSUBSshiftRA(v)
   353  	case OpARMSUBSshiftRAreg:
   354  		return rewriteValueARM_OpARMSUBSshiftRAreg(v)
   355  	case OpARMSUBSshiftRL:
   356  		return rewriteValueARM_OpARMSUBSshiftRL(v)
   357  	case OpARMSUBSshiftRLreg:
   358  		return rewriteValueARM_OpARMSUBSshiftRLreg(v)
   359  	case OpARMSUBconst:
   360  		return rewriteValueARM_OpARMSUBconst(v)
   361  	case OpARMSUBshiftLL:
   362  		return rewriteValueARM_OpARMSUBshiftLL(v)
   363  	case OpARMSUBshiftLLreg:
   364  		return rewriteValueARM_OpARMSUBshiftLLreg(v)
   365  	case OpARMSUBshiftRA:
   366  		return rewriteValueARM_OpARMSUBshiftRA(v)
   367  	case OpARMSUBshiftRAreg:
   368  		return rewriteValueARM_OpARMSUBshiftRAreg(v)
   369  	case OpARMSUBshiftRL:
   370  		return rewriteValueARM_OpARMSUBshiftRL(v)
   371  	case OpARMSUBshiftRLreg:
   372  		return rewriteValueARM_OpARMSUBshiftRLreg(v)
   373  	case OpARMTEQ:
   374  		return rewriteValueARM_OpARMTEQ(v)
   375  	case OpARMTEQconst:
   376  		return rewriteValueARM_OpARMTEQconst(v)
   377  	case OpARMTEQshiftLL:
   378  		return rewriteValueARM_OpARMTEQshiftLL(v)
   379  	case OpARMTEQshiftLLreg:
   380  		return rewriteValueARM_OpARMTEQshiftLLreg(v)
   381  	case OpARMTEQshiftRA:
   382  		return rewriteValueARM_OpARMTEQshiftRA(v)
   383  	case OpARMTEQshiftRAreg:
   384  		return rewriteValueARM_OpARMTEQshiftRAreg(v)
   385  	case OpARMTEQshiftRL:
   386  		return rewriteValueARM_OpARMTEQshiftRL(v)
   387  	case OpARMTEQshiftRLreg:
   388  		return rewriteValueARM_OpARMTEQshiftRLreg(v)
   389  	case OpARMTST:
   390  		return rewriteValueARM_OpARMTST(v)
   391  	case OpARMTSTconst:
   392  		return rewriteValueARM_OpARMTSTconst(v)
   393  	case OpARMTSTshiftLL:
   394  		return rewriteValueARM_OpARMTSTshiftLL(v)
   395  	case OpARMTSTshiftLLreg:
   396  		return rewriteValueARM_OpARMTSTshiftLLreg(v)
   397  	case OpARMTSTshiftRA:
   398  		return rewriteValueARM_OpARMTSTshiftRA(v)
   399  	case OpARMTSTshiftRAreg:
   400  		return rewriteValueARM_OpARMTSTshiftRAreg(v)
   401  	case OpARMTSTshiftRL:
   402  		return rewriteValueARM_OpARMTSTshiftRL(v)
   403  	case OpARMTSTshiftRLreg:
   404  		return rewriteValueARM_OpARMTSTshiftRLreg(v)
   405  	case OpARMXOR:
   406  		return rewriteValueARM_OpARMXOR(v)
   407  	case OpARMXORconst:
   408  		return rewriteValueARM_OpARMXORconst(v)
   409  	case OpARMXORshiftLL:
   410  		return rewriteValueARM_OpARMXORshiftLL(v)
   411  	case OpARMXORshiftLLreg:
   412  		return rewriteValueARM_OpARMXORshiftLLreg(v)
   413  	case OpARMXORshiftRA:
   414  		return rewriteValueARM_OpARMXORshiftRA(v)
   415  	case OpARMXORshiftRAreg:
   416  		return rewriteValueARM_OpARMXORshiftRAreg(v)
   417  	case OpARMXORshiftRL:
   418  		return rewriteValueARM_OpARMXORshiftRL(v)
   419  	case OpARMXORshiftRLreg:
   420  		return rewriteValueARM_OpARMXORshiftRLreg(v)
   421  	case OpARMXORshiftRR:
   422  		return rewriteValueARM_OpARMXORshiftRR(v)
   423  	case OpAbs:
   424  		v.Op = OpARMABSD
   425  		return true
   426  	case OpAdd16:
   427  		v.Op = OpARMADD
   428  		return true
   429  	case OpAdd32:
   430  		v.Op = OpARMADD
   431  		return true
   432  	case OpAdd32F:
   433  		v.Op = OpARMADDF
   434  		return true
   435  	case OpAdd32carry:
   436  		v.Op = OpARMADDS
   437  		return true
   438  	case OpAdd32withcarry:
   439  		v.Op = OpARMADC
   440  		return true
   441  	case OpAdd64F:
   442  		v.Op = OpARMADDD
   443  		return true
   444  	case OpAdd8:
   445  		v.Op = OpARMADD
   446  		return true
   447  	case OpAddPtr:
   448  		v.Op = OpARMADD
   449  		return true
   450  	case OpAddr:
   451  		return rewriteValueARM_OpAddr(v)
   452  	case OpAnd16:
   453  		v.Op = OpARMAND
   454  		return true
   455  	case OpAnd32:
   456  		v.Op = OpARMAND
   457  		return true
   458  	case OpAnd8:
   459  		v.Op = OpARMAND
   460  		return true
   461  	case OpAndB:
   462  		v.Op = OpARMAND
   463  		return true
   464  	case OpAvg32u:
   465  		return rewriteValueARM_OpAvg32u(v)
   466  	case OpBitLen32:
   467  		return rewriteValueARM_OpBitLen32(v)
   468  	case OpBswap32:
   469  		return rewriteValueARM_OpBswap32(v)
   470  	case OpClosureCall:
   471  		v.Op = OpARMCALLclosure
   472  		return true
   473  	case OpCom16:
   474  		v.Op = OpARMMVN
   475  		return true
   476  	case OpCom32:
   477  		v.Op = OpARMMVN
   478  		return true
   479  	case OpCom8:
   480  		v.Op = OpARMMVN
   481  		return true
   482  	case OpConst16:
   483  		return rewriteValueARM_OpConst16(v)
   484  	case OpConst32:
   485  		return rewriteValueARM_OpConst32(v)
   486  	case OpConst32F:
   487  		return rewriteValueARM_OpConst32F(v)
   488  	case OpConst64F:
   489  		return rewriteValueARM_OpConst64F(v)
   490  	case OpConst8:
   491  		return rewriteValueARM_OpConst8(v)
   492  	case OpConstBool:
   493  		return rewriteValueARM_OpConstBool(v)
   494  	case OpConstNil:
   495  		return rewriteValueARM_OpConstNil(v)
   496  	case OpCtz16:
   497  		return rewriteValueARM_OpCtz16(v)
   498  	case OpCtz16NonZero:
   499  		v.Op = OpCtz32
   500  		return true
   501  	case OpCtz32:
   502  		return rewriteValueARM_OpCtz32(v)
   503  	case OpCtz32NonZero:
   504  		v.Op = OpCtz32
   505  		return true
   506  	case OpCtz8:
   507  		return rewriteValueARM_OpCtz8(v)
   508  	case OpCtz8NonZero:
   509  		v.Op = OpCtz32
   510  		return true
   511  	case OpCvt32Fto32:
   512  		v.Op = OpARMMOVFW
   513  		return true
   514  	case OpCvt32Fto32U:
   515  		v.Op = OpARMMOVFWU
   516  		return true
   517  	case OpCvt32Fto64F:
   518  		v.Op = OpARMMOVFD
   519  		return true
   520  	case OpCvt32Uto32F:
   521  		v.Op = OpARMMOVWUF
   522  		return true
   523  	case OpCvt32Uto64F:
   524  		v.Op = OpARMMOVWUD
   525  		return true
   526  	case OpCvt32to32F:
   527  		v.Op = OpARMMOVWF
   528  		return true
   529  	case OpCvt32to64F:
   530  		v.Op = OpARMMOVWD
   531  		return true
   532  	case OpCvt64Fto32:
   533  		v.Op = OpARMMOVDW
   534  		return true
   535  	case OpCvt64Fto32F:
   536  		v.Op = OpARMMOVDF
   537  		return true
   538  	case OpCvt64Fto32U:
   539  		v.Op = OpARMMOVDWU
   540  		return true
   541  	case OpCvtBoolToUint8:
   542  		v.Op = OpCopy
   543  		return true
   544  	case OpDiv16:
   545  		return rewriteValueARM_OpDiv16(v)
   546  	case OpDiv16u:
   547  		return rewriteValueARM_OpDiv16u(v)
   548  	case OpDiv32:
   549  		return rewriteValueARM_OpDiv32(v)
   550  	case OpDiv32F:
   551  		v.Op = OpARMDIVF
   552  		return true
   553  	case OpDiv32u:
   554  		return rewriteValueARM_OpDiv32u(v)
   555  	case OpDiv64F:
   556  		v.Op = OpARMDIVD
   557  		return true
   558  	case OpDiv8:
   559  		return rewriteValueARM_OpDiv8(v)
   560  	case OpDiv8u:
   561  		return rewriteValueARM_OpDiv8u(v)
   562  	case OpEq16:
   563  		return rewriteValueARM_OpEq16(v)
   564  	case OpEq32:
   565  		return rewriteValueARM_OpEq32(v)
   566  	case OpEq32F:
   567  		return rewriteValueARM_OpEq32F(v)
   568  	case OpEq64F:
   569  		return rewriteValueARM_OpEq64F(v)
   570  	case OpEq8:
   571  		return rewriteValueARM_OpEq8(v)
   572  	case OpEqB:
   573  		return rewriteValueARM_OpEqB(v)
   574  	case OpEqPtr:
   575  		return rewriteValueARM_OpEqPtr(v)
   576  	case OpFMA:
   577  		return rewriteValueARM_OpFMA(v)
   578  	case OpGetCallerPC:
   579  		v.Op = OpARMLoweredGetCallerPC
   580  		return true
   581  	case OpGetCallerSP:
   582  		v.Op = OpARMLoweredGetCallerSP
   583  		return true
   584  	case OpGetClosurePtr:
   585  		v.Op = OpARMLoweredGetClosurePtr
   586  		return true
   587  	case OpHmul32:
   588  		v.Op = OpARMHMUL
   589  		return true
   590  	case OpHmul32u:
   591  		v.Op = OpARMHMULU
   592  		return true
   593  	case OpInterCall:
   594  		v.Op = OpARMCALLinter
   595  		return true
   596  	case OpIsInBounds:
   597  		return rewriteValueARM_OpIsInBounds(v)
   598  	case OpIsNonNil:
   599  		return rewriteValueARM_OpIsNonNil(v)
   600  	case OpIsSliceInBounds:
   601  		return rewriteValueARM_OpIsSliceInBounds(v)
   602  	case OpLeq16:
   603  		return rewriteValueARM_OpLeq16(v)
   604  	case OpLeq16U:
   605  		return rewriteValueARM_OpLeq16U(v)
   606  	case OpLeq32:
   607  		return rewriteValueARM_OpLeq32(v)
   608  	case OpLeq32F:
   609  		return rewriteValueARM_OpLeq32F(v)
   610  	case OpLeq32U:
   611  		return rewriteValueARM_OpLeq32U(v)
   612  	case OpLeq64F:
   613  		return rewriteValueARM_OpLeq64F(v)
   614  	case OpLeq8:
   615  		return rewriteValueARM_OpLeq8(v)
   616  	case OpLeq8U:
   617  		return rewriteValueARM_OpLeq8U(v)
   618  	case OpLess16:
   619  		return rewriteValueARM_OpLess16(v)
   620  	case OpLess16U:
   621  		return rewriteValueARM_OpLess16U(v)
   622  	case OpLess32:
   623  		return rewriteValueARM_OpLess32(v)
   624  	case OpLess32F:
   625  		return rewriteValueARM_OpLess32F(v)
   626  	case OpLess32U:
   627  		return rewriteValueARM_OpLess32U(v)
   628  	case OpLess64F:
   629  		return rewriteValueARM_OpLess64F(v)
   630  	case OpLess8:
   631  		return rewriteValueARM_OpLess8(v)
   632  	case OpLess8U:
   633  		return rewriteValueARM_OpLess8U(v)
   634  	case OpLoad:
   635  		return rewriteValueARM_OpLoad(v)
   636  	case OpLocalAddr:
   637  		return rewriteValueARM_OpLocalAddr(v)
   638  	case OpLsh16x16:
   639  		return rewriteValueARM_OpLsh16x16(v)
   640  	case OpLsh16x32:
   641  		return rewriteValueARM_OpLsh16x32(v)
   642  	case OpLsh16x64:
   643  		return rewriteValueARM_OpLsh16x64(v)
   644  	case OpLsh16x8:
   645  		return rewriteValueARM_OpLsh16x8(v)
   646  	case OpLsh32x16:
   647  		return rewriteValueARM_OpLsh32x16(v)
   648  	case OpLsh32x32:
   649  		return rewriteValueARM_OpLsh32x32(v)
   650  	case OpLsh32x64:
   651  		return rewriteValueARM_OpLsh32x64(v)
   652  	case OpLsh32x8:
   653  		return rewriteValueARM_OpLsh32x8(v)
   654  	case OpLsh8x16:
   655  		return rewriteValueARM_OpLsh8x16(v)
   656  	case OpLsh8x32:
   657  		return rewriteValueARM_OpLsh8x32(v)
   658  	case OpLsh8x64:
   659  		return rewriteValueARM_OpLsh8x64(v)
   660  	case OpLsh8x8:
   661  		return rewriteValueARM_OpLsh8x8(v)
   662  	case OpMod16:
   663  		return rewriteValueARM_OpMod16(v)
   664  	case OpMod16u:
   665  		return rewriteValueARM_OpMod16u(v)
   666  	case OpMod32:
   667  		return rewriteValueARM_OpMod32(v)
   668  	case OpMod32u:
   669  		return rewriteValueARM_OpMod32u(v)
   670  	case OpMod8:
   671  		return rewriteValueARM_OpMod8(v)
   672  	case OpMod8u:
   673  		return rewriteValueARM_OpMod8u(v)
   674  	case OpMove:
   675  		return rewriteValueARM_OpMove(v)
   676  	case OpMul16:
   677  		v.Op = OpARMMUL
   678  		return true
   679  	case OpMul32:
   680  		v.Op = OpARMMUL
   681  		return true
   682  	case OpMul32F:
   683  		v.Op = OpARMMULF
   684  		return true
   685  	case OpMul32uhilo:
   686  		v.Op = OpARMMULLU
   687  		return true
   688  	case OpMul64F:
   689  		v.Op = OpARMMULD
   690  		return true
   691  	case OpMul8:
   692  		v.Op = OpARMMUL
   693  		return true
   694  	case OpNeg16:
   695  		return rewriteValueARM_OpNeg16(v)
   696  	case OpNeg32:
   697  		return rewriteValueARM_OpNeg32(v)
   698  	case OpNeg32F:
   699  		v.Op = OpARMNEGF
   700  		return true
   701  	case OpNeg64F:
   702  		v.Op = OpARMNEGD
   703  		return true
   704  	case OpNeg8:
   705  		return rewriteValueARM_OpNeg8(v)
   706  	case OpNeq16:
   707  		return rewriteValueARM_OpNeq16(v)
   708  	case OpNeq32:
   709  		return rewriteValueARM_OpNeq32(v)
   710  	case OpNeq32F:
   711  		return rewriteValueARM_OpNeq32F(v)
   712  	case OpNeq64F:
   713  		return rewriteValueARM_OpNeq64F(v)
   714  	case OpNeq8:
   715  		return rewriteValueARM_OpNeq8(v)
   716  	case OpNeqB:
   717  		v.Op = OpARMXOR
   718  		return true
   719  	case OpNeqPtr:
   720  		return rewriteValueARM_OpNeqPtr(v)
   721  	case OpNilCheck:
   722  		v.Op = OpARMLoweredNilCheck
   723  		return true
   724  	case OpNot:
   725  		return rewriteValueARM_OpNot(v)
   726  	case OpOffPtr:
   727  		return rewriteValueARM_OpOffPtr(v)
   728  	case OpOr16:
   729  		v.Op = OpARMOR
   730  		return true
   731  	case OpOr32:
   732  		v.Op = OpARMOR
   733  		return true
   734  	case OpOr8:
   735  		v.Op = OpARMOR
   736  		return true
   737  	case OpOrB:
   738  		v.Op = OpARMOR
   739  		return true
   740  	case OpPanicBounds:
   741  		return rewriteValueARM_OpPanicBounds(v)
   742  	case OpPanicExtend:
   743  		return rewriteValueARM_OpPanicExtend(v)
   744  	case OpRotateLeft16:
   745  		return rewriteValueARM_OpRotateLeft16(v)
   746  	case OpRotateLeft32:
   747  		return rewriteValueARM_OpRotateLeft32(v)
   748  	case OpRotateLeft8:
   749  		return rewriteValueARM_OpRotateLeft8(v)
   750  	case OpRound32F:
   751  		v.Op = OpCopy
   752  		return true
   753  	case OpRound64F:
   754  		v.Op = OpCopy
   755  		return true
   756  	case OpRsh16Ux16:
   757  		return rewriteValueARM_OpRsh16Ux16(v)
   758  	case OpRsh16Ux32:
   759  		return rewriteValueARM_OpRsh16Ux32(v)
   760  	case OpRsh16Ux64:
   761  		return rewriteValueARM_OpRsh16Ux64(v)
   762  	case OpRsh16Ux8:
   763  		return rewriteValueARM_OpRsh16Ux8(v)
   764  	case OpRsh16x16:
   765  		return rewriteValueARM_OpRsh16x16(v)
   766  	case OpRsh16x32:
   767  		return rewriteValueARM_OpRsh16x32(v)
   768  	case OpRsh16x64:
   769  		return rewriteValueARM_OpRsh16x64(v)
   770  	case OpRsh16x8:
   771  		return rewriteValueARM_OpRsh16x8(v)
   772  	case OpRsh32Ux16:
   773  		return rewriteValueARM_OpRsh32Ux16(v)
   774  	case OpRsh32Ux32:
   775  		return rewriteValueARM_OpRsh32Ux32(v)
   776  	case OpRsh32Ux64:
   777  		return rewriteValueARM_OpRsh32Ux64(v)
   778  	case OpRsh32Ux8:
   779  		return rewriteValueARM_OpRsh32Ux8(v)
   780  	case OpRsh32x16:
   781  		return rewriteValueARM_OpRsh32x16(v)
   782  	case OpRsh32x32:
   783  		return rewriteValueARM_OpRsh32x32(v)
   784  	case OpRsh32x64:
   785  		return rewriteValueARM_OpRsh32x64(v)
   786  	case OpRsh32x8:
   787  		return rewriteValueARM_OpRsh32x8(v)
   788  	case OpRsh8Ux16:
   789  		return rewriteValueARM_OpRsh8Ux16(v)
   790  	case OpRsh8Ux32:
   791  		return rewriteValueARM_OpRsh8Ux32(v)
   792  	case OpRsh8Ux64:
   793  		return rewriteValueARM_OpRsh8Ux64(v)
   794  	case OpRsh8Ux8:
   795  		return rewriteValueARM_OpRsh8Ux8(v)
   796  	case OpRsh8x16:
   797  		return rewriteValueARM_OpRsh8x16(v)
   798  	case OpRsh8x32:
   799  		return rewriteValueARM_OpRsh8x32(v)
   800  	case OpRsh8x64:
   801  		return rewriteValueARM_OpRsh8x64(v)
   802  	case OpRsh8x8:
   803  		return rewriteValueARM_OpRsh8x8(v)
   804  	case OpSelect0:
   805  		return rewriteValueARM_OpSelect0(v)
   806  	case OpSelect1:
   807  		return rewriteValueARM_OpSelect1(v)
   808  	case OpSignExt16to32:
   809  		v.Op = OpARMMOVHreg
   810  		return true
   811  	case OpSignExt8to16:
   812  		v.Op = OpARMMOVBreg
   813  		return true
   814  	case OpSignExt8to32:
   815  		v.Op = OpARMMOVBreg
   816  		return true
   817  	case OpSignmask:
   818  		return rewriteValueARM_OpSignmask(v)
   819  	case OpSlicemask:
   820  		return rewriteValueARM_OpSlicemask(v)
   821  	case OpSqrt:
   822  		v.Op = OpARMSQRTD
   823  		return true
   824  	case OpStaticCall:
   825  		v.Op = OpARMCALLstatic
   826  		return true
   827  	case OpStore:
   828  		return rewriteValueARM_OpStore(v)
   829  	case OpSub16:
   830  		v.Op = OpARMSUB
   831  		return true
   832  	case OpSub32:
   833  		v.Op = OpARMSUB
   834  		return true
   835  	case OpSub32F:
   836  		v.Op = OpARMSUBF
   837  		return true
   838  	case OpSub32carry:
   839  		v.Op = OpARMSUBS
   840  		return true
   841  	case OpSub32withcarry:
   842  		v.Op = OpARMSBC
   843  		return true
   844  	case OpSub64F:
   845  		v.Op = OpARMSUBD
   846  		return true
   847  	case OpSub8:
   848  		v.Op = OpARMSUB
   849  		return true
   850  	case OpSubPtr:
   851  		v.Op = OpARMSUB
   852  		return true
   853  	case OpTrunc16to8:
   854  		v.Op = OpCopy
   855  		return true
   856  	case OpTrunc32to16:
   857  		v.Op = OpCopy
   858  		return true
   859  	case OpTrunc32to8:
   860  		v.Op = OpCopy
   861  		return true
   862  	case OpWB:
   863  		v.Op = OpARMLoweredWB
   864  		return true
   865  	case OpXor16:
   866  		v.Op = OpARMXOR
   867  		return true
   868  	case OpXor32:
   869  		v.Op = OpARMXOR
   870  		return true
   871  	case OpXor8:
   872  		v.Op = OpARMXOR
   873  		return true
   874  	case OpZero:
   875  		return rewriteValueARM_OpZero(v)
   876  	case OpZeroExt16to32:
   877  		v.Op = OpARMMOVHUreg
   878  		return true
   879  	case OpZeroExt8to16:
   880  		v.Op = OpARMMOVBUreg
   881  		return true
   882  	case OpZeroExt8to32:
   883  		v.Op = OpARMMOVBUreg
   884  		return true
   885  	case OpZeromask:
   886  		return rewriteValueARM_OpZeromask(v)
   887  	}
   888  	return false
   889  }
   890  func rewriteValueARM_OpARMADC(v *Value) bool {
   891  	v_2 := v.Args[2]
   892  	v_1 := v.Args[1]
   893  	v_0 := v.Args[0]
   894  	// match: (ADC (MOVWconst [c]) x flags)
   895  	// result: (ADCconst [c] x flags)
   896  	for {
   897  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   898  			if v_0.Op != OpARMMOVWconst {
   899  				continue
   900  			}
   901  			c := auxIntToInt32(v_0.AuxInt)
   902  			x := v_1
   903  			flags := v_2
   904  			v.reset(OpARMADCconst)
   905  			v.AuxInt = int32ToAuxInt(c)
   906  			v.AddArg2(x, flags)
   907  			return true
   908  		}
   909  		break
   910  	}
   911  	// match: (ADC x (SLLconst [c] y) flags)
   912  	// result: (ADCshiftLL x y [c] flags)
   913  	for {
   914  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   915  			x := v_0
   916  			if v_1.Op != OpARMSLLconst {
   917  				continue
   918  			}
   919  			c := auxIntToInt32(v_1.AuxInt)
   920  			y := v_1.Args[0]
   921  			flags := v_2
   922  			v.reset(OpARMADCshiftLL)
   923  			v.AuxInt = int32ToAuxInt(c)
   924  			v.AddArg3(x, y, flags)
   925  			return true
   926  		}
   927  		break
   928  	}
   929  	// match: (ADC x (SRLconst [c] y) flags)
   930  	// result: (ADCshiftRL x y [c] flags)
   931  	for {
   932  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   933  			x := v_0
   934  			if v_1.Op != OpARMSRLconst {
   935  				continue
   936  			}
   937  			c := auxIntToInt32(v_1.AuxInt)
   938  			y := v_1.Args[0]
   939  			flags := v_2
   940  			v.reset(OpARMADCshiftRL)
   941  			v.AuxInt = int32ToAuxInt(c)
   942  			v.AddArg3(x, y, flags)
   943  			return true
   944  		}
   945  		break
   946  	}
   947  	// match: (ADC x (SRAconst [c] y) flags)
   948  	// result: (ADCshiftRA x y [c] flags)
   949  	for {
   950  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   951  			x := v_0
   952  			if v_1.Op != OpARMSRAconst {
   953  				continue
   954  			}
   955  			c := auxIntToInt32(v_1.AuxInt)
   956  			y := v_1.Args[0]
   957  			flags := v_2
   958  			v.reset(OpARMADCshiftRA)
   959  			v.AuxInt = int32ToAuxInt(c)
   960  			v.AddArg3(x, y, flags)
   961  			return true
   962  		}
   963  		break
   964  	}
   965  	// match: (ADC x (SLL y z) flags)
   966  	// result: (ADCshiftLLreg x y z flags)
   967  	for {
   968  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   969  			x := v_0
   970  			if v_1.Op != OpARMSLL {
   971  				continue
   972  			}
   973  			z := v_1.Args[1]
   974  			y := v_1.Args[0]
   975  			flags := v_2
   976  			v.reset(OpARMADCshiftLLreg)
   977  			v.AddArg4(x, y, z, flags)
   978  			return true
   979  		}
   980  		break
   981  	}
   982  	// match: (ADC x (SRL y z) flags)
   983  	// result: (ADCshiftRLreg x y z flags)
   984  	for {
   985  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   986  			x := v_0
   987  			if v_1.Op != OpARMSRL {
   988  				continue
   989  			}
   990  			z := v_1.Args[1]
   991  			y := v_1.Args[0]
   992  			flags := v_2
   993  			v.reset(OpARMADCshiftRLreg)
   994  			v.AddArg4(x, y, z, flags)
   995  			return true
   996  		}
   997  		break
   998  	}
   999  	// match: (ADC x (SRA y z) flags)
  1000  	// result: (ADCshiftRAreg x y z flags)
  1001  	for {
  1002  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1003  			x := v_0
  1004  			if v_1.Op != OpARMSRA {
  1005  				continue
  1006  			}
  1007  			z := v_1.Args[1]
  1008  			y := v_1.Args[0]
  1009  			flags := v_2
  1010  			v.reset(OpARMADCshiftRAreg)
  1011  			v.AddArg4(x, y, z, flags)
  1012  			return true
  1013  		}
  1014  		break
  1015  	}
  1016  	return false
  1017  }
  1018  func rewriteValueARM_OpARMADCconst(v *Value) bool {
  1019  	v_1 := v.Args[1]
  1020  	v_0 := v.Args[0]
  1021  	// match: (ADCconst [c] (ADDconst [d] x) flags)
  1022  	// result: (ADCconst [c+d] x flags)
  1023  	for {
  1024  		c := auxIntToInt32(v.AuxInt)
  1025  		if v_0.Op != OpARMADDconst {
  1026  			break
  1027  		}
  1028  		d := auxIntToInt32(v_0.AuxInt)
  1029  		x := v_0.Args[0]
  1030  		flags := v_1
  1031  		v.reset(OpARMADCconst)
  1032  		v.AuxInt = int32ToAuxInt(c + d)
  1033  		v.AddArg2(x, flags)
  1034  		return true
  1035  	}
  1036  	// match: (ADCconst [c] (SUBconst [d] x) flags)
  1037  	// result: (ADCconst [c-d] x flags)
  1038  	for {
  1039  		c := auxIntToInt32(v.AuxInt)
  1040  		if v_0.Op != OpARMSUBconst {
  1041  			break
  1042  		}
  1043  		d := auxIntToInt32(v_0.AuxInt)
  1044  		x := v_0.Args[0]
  1045  		flags := v_1
  1046  		v.reset(OpARMADCconst)
  1047  		v.AuxInt = int32ToAuxInt(c - d)
  1048  		v.AddArg2(x, flags)
  1049  		return true
  1050  	}
  1051  	return false
  1052  }
  1053  func rewriteValueARM_OpARMADCshiftLL(v *Value) bool {
  1054  	v_2 := v.Args[2]
  1055  	v_1 := v.Args[1]
  1056  	v_0 := v.Args[0]
  1057  	b := v.Block
  1058  	// match: (ADCshiftLL (MOVWconst [c]) x [d] flags)
  1059  	// result: (ADCconst [c] (SLLconst <x.Type> x [d]) flags)
  1060  	for {
  1061  		d := auxIntToInt32(v.AuxInt)
  1062  		if v_0.Op != OpARMMOVWconst {
  1063  			break
  1064  		}
  1065  		c := auxIntToInt32(v_0.AuxInt)
  1066  		x := v_1
  1067  		flags := v_2
  1068  		v.reset(OpARMADCconst)
  1069  		v.AuxInt = int32ToAuxInt(c)
  1070  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  1071  		v0.AuxInt = int32ToAuxInt(d)
  1072  		v0.AddArg(x)
  1073  		v.AddArg2(v0, flags)
  1074  		return true
  1075  	}
  1076  	// match: (ADCshiftLL x (MOVWconst [c]) [d] flags)
  1077  	// result: (ADCconst x [c<<uint64(d)] flags)
  1078  	for {
  1079  		d := auxIntToInt32(v.AuxInt)
  1080  		x := v_0
  1081  		if v_1.Op != OpARMMOVWconst {
  1082  			break
  1083  		}
  1084  		c := auxIntToInt32(v_1.AuxInt)
  1085  		flags := v_2
  1086  		v.reset(OpARMADCconst)
  1087  		v.AuxInt = int32ToAuxInt(c << uint64(d))
  1088  		v.AddArg2(x, flags)
  1089  		return true
  1090  	}
  1091  	return false
  1092  }
  1093  func rewriteValueARM_OpARMADCshiftLLreg(v *Value) bool {
  1094  	v_3 := v.Args[3]
  1095  	v_2 := v.Args[2]
  1096  	v_1 := v.Args[1]
  1097  	v_0 := v.Args[0]
  1098  	b := v.Block
  1099  	// match: (ADCshiftLLreg (MOVWconst [c]) x y flags)
  1100  	// result: (ADCconst [c] (SLL <x.Type> x y) flags)
  1101  	for {
  1102  		if v_0.Op != OpARMMOVWconst {
  1103  			break
  1104  		}
  1105  		c := auxIntToInt32(v_0.AuxInt)
  1106  		x := v_1
  1107  		y := v_2
  1108  		flags := v_3
  1109  		v.reset(OpARMADCconst)
  1110  		v.AuxInt = int32ToAuxInt(c)
  1111  		v0 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
  1112  		v0.AddArg2(x, y)
  1113  		v.AddArg2(v0, flags)
  1114  		return true
  1115  	}
  1116  	// match: (ADCshiftLLreg x y (MOVWconst [c]) flags)
  1117  	// result: (ADCshiftLL x y [c] flags)
  1118  	for {
  1119  		x := v_0
  1120  		y := v_1
  1121  		if v_2.Op != OpARMMOVWconst {
  1122  			break
  1123  		}
  1124  		c := auxIntToInt32(v_2.AuxInt)
  1125  		flags := v_3
  1126  		v.reset(OpARMADCshiftLL)
  1127  		v.AuxInt = int32ToAuxInt(c)
  1128  		v.AddArg3(x, y, flags)
  1129  		return true
  1130  	}
  1131  	return false
  1132  }
  1133  func rewriteValueARM_OpARMADCshiftRA(v *Value) bool {
  1134  	v_2 := v.Args[2]
  1135  	v_1 := v.Args[1]
  1136  	v_0 := v.Args[0]
  1137  	b := v.Block
  1138  	// match: (ADCshiftRA (MOVWconst [c]) x [d] flags)
  1139  	// result: (ADCconst [c] (SRAconst <x.Type> x [d]) flags)
  1140  	for {
  1141  		d := auxIntToInt32(v.AuxInt)
  1142  		if v_0.Op != OpARMMOVWconst {
  1143  			break
  1144  		}
  1145  		c := auxIntToInt32(v_0.AuxInt)
  1146  		x := v_1
  1147  		flags := v_2
  1148  		v.reset(OpARMADCconst)
  1149  		v.AuxInt = int32ToAuxInt(c)
  1150  		v0 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
  1151  		v0.AuxInt = int32ToAuxInt(d)
  1152  		v0.AddArg(x)
  1153  		v.AddArg2(v0, flags)
  1154  		return true
  1155  	}
  1156  	// match: (ADCshiftRA x (MOVWconst [c]) [d] flags)
  1157  	// result: (ADCconst x [c>>uint64(d)] flags)
  1158  	for {
  1159  		d := auxIntToInt32(v.AuxInt)
  1160  		x := v_0
  1161  		if v_1.Op != OpARMMOVWconst {
  1162  			break
  1163  		}
  1164  		c := auxIntToInt32(v_1.AuxInt)
  1165  		flags := v_2
  1166  		v.reset(OpARMADCconst)
  1167  		v.AuxInt = int32ToAuxInt(c >> uint64(d))
  1168  		v.AddArg2(x, flags)
  1169  		return true
  1170  	}
  1171  	return false
  1172  }
  1173  func rewriteValueARM_OpARMADCshiftRAreg(v *Value) bool {
  1174  	v_3 := v.Args[3]
  1175  	v_2 := v.Args[2]
  1176  	v_1 := v.Args[1]
  1177  	v_0 := v.Args[0]
  1178  	b := v.Block
  1179  	// match: (ADCshiftRAreg (MOVWconst [c]) x y flags)
  1180  	// result: (ADCconst [c] (SRA <x.Type> x y) flags)
  1181  	for {
  1182  		if v_0.Op != OpARMMOVWconst {
  1183  			break
  1184  		}
  1185  		c := auxIntToInt32(v_0.AuxInt)
  1186  		x := v_1
  1187  		y := v_2
  1188  		flags := v_3
  1189  		v.reset(OpARMADCconst)
  1190  		v.AuxInt = int32ToAuxInt(c)
  1191  		v0 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
  1192  		v0.AddArg2(x, y)
  1193  		v.AddArg2(v0, flags)
  1194  		return true
  1195  	}
  1196  	// match: (ADCshiftRAreg x y (MOVWconst [c]) flags)
  1197  	// result: (ADCshiftRA x y [c] flags)
  1198  	for {
  1199  		x := v_0
  1200  		y := v_1
  1201  		if v_2.Op != OpARMMOVWconst {
  1202  			break
  1203  		}
  1204  		c := auxIntToInt32(v_2.AuxInt)
  1205  		flags := v_3
  1206  		v.reset(OpARMADCshiftRA)
  1207  		v.AuxInt = int32ToAuxInt(c)
  1208  		v.AddArg3(x, y, flags)
  1209  		return true
  1210  	}
  1211  	return false
  1212  }
  1213  func rewriteValueARM_OpARMADCshiftRL(v *Value) bool {
  1214  	v_2 := v.Args[2]
  1215  	v_1 := v.Args[1]
  1216  	v_0 := v.Args[0]
  1217  	b := v.Block
  1218  	// match: (ADCshiftRL (MOVWconst [c]) x [d] flags)
  1219  	// result: (ADCconst [c] (SRLconst <x.Type> x [d]) flags)
  1220  	for {
  1221  		d := auxIntToInt32(v.AuxInt)
  1222  		if v_0.Op != OpARMMOVWconst {
  1223  			break
  1224  		}
  1225  		c := auxIntToInt32(v_0.AuxInt)
  1226  		x := v_1
  1227  		flags := v_2
  1228  		v.reset(OpARMADCconst)
  1229  		v.AuxInt = int32ToAuxInt(c)
  1230  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
  1231  		v0.AuxInt = int32ToAuxInt(d)
  1232  		v0.AddArg(x)
  1233  		v.AddArg2(v0, flags)
  1234  		return true
  1235  	}
  1236  	// match: (ADCshiftRL x (MOVWconst [c]) [d] flags)
  1237  	// result: (ADCconst x [int32(uint32(c)>>uint64(d))] flags)
  1238  	for {
  1239  		d := auxIntToInt32(v.AuxInt)
  1240  		x := v_0
  1241  		if v_1.Op != OpARMMOVWconst {
  1242  			break
  1243  		}
  1244  		c := auxIntToInt32(v_1.AuxInt)
  1245  		flags := v_2
  1246  		v.reset(OpARMADCconst)
  1247  		v.AuxInt = int32ToAuxInt(int32(uint32(c) >> uint64(d)))
  1248  		v.AddArg2(x, flags)
  1249  		return true
  1250  	}
  1251  	return false
  1252  }
  1253  func rewriteValueARM_OpARMADCshiftRLreg(v *Value) bool {
  1254  	v_3 := v.Args[3]
  1255  	v_2 := v.Args[2]
  1256  	v_1 := v.Args[1]
  1257  	v_0 := v.Args[0]
  1258  	b := v.Block
  1259  	// match: (ADCshiftRLreg (MOVWconst [c]) x y flags)
  1260  	// result: (ADCconst [c] (SRL <x.Type> x y) flags)
  1261  	for {
  1262  		if v_0.Op != OpARMMOVWconst {
  1263  			break
  1264  		}
  1265  		c := auxIntToInt32(v_0.AuxInt)
  1266  		x := v_1
  1267  		y := v_2
  1268  		flags := v_3
  1269  		v.reset(OpARMADCconst)
  1270  		v.AuxInt = int32ToAuxInt(c)
  1271  		v0 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
  1272  		v0.AddArg2(x, y)
  1273  		v.AddArg2(v0, flags)
  1274  		return true
  1275  	}
  1276  	// match: (ADCshiftRLreg x y (MOVWconst [c]) flags)
  1277  	// result: (ADCshiftRL x y [c] flags)
  1278  	for {
  1279  		x := v_0
  1280  		y := v_1
  1281  		if v_2.Op != OpARMMOVWconst {
  1282  			break
  1283  		}
  1284  		c := auxIntToInt32(v_2.AuxInt)
  1285  		flags := v_3
  1286  		v.reset(OpARMADCshiftRL)
  1287  		v.AuxInt = int32ToAuxInt(c)
  1288  		v.AddArg3(x, y, flags)
  1289  		return true
  1290  	}
  1291  	return false
  1292  }
  1293  func rewriteValueARM_OpARMADD(v *Value) bool {
  1294  	v_1 := v.Args[1]
  1295  	v_0 := v.Args[0]
  1296  	b := v.Block
  1297  	// match: (ADD x (MOVWconst [c]))
  1298  	// result: (ADDconst [c] x)
  1299  	for {
  1300  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1301  			x := v_0
  1302  			if v_1.Op != OpARMMOVWconst {
  1303  				continue
  1304  			}
  1305  			c := auxIntToInt32(v_1.AuxInt)
  1306  			v.reset(OpARMADDconst)
  1307  			v.AuxInt = int32ToAuxInt(c)
  1308  			v.AddArg(x)
  1309  			return true
  1310  		}
  1311  		break
  1312  	}
  1313  	// match: (ADD x (SLLconst [c] y))
  1314  	// result: (ADDshiftLL x y [c])
  1315  	for {
  1316  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1317  			x := v_0
  1318  			if v_1.Op != OpARMSLLconst {
  1319  				continue
  1320  			}
  1321  			c := auxIntToInt32(v_1.AuxInt)
  1322  			y := v_1.Args[0]
  1323  			v.reset(OpARMADDshiftLL)
  1324  			v.AuxInt = int32ToAuxInt(c)
  1325  			v.AddArg2(x, y)
  1326  			return true
  1327  		}
  1328  		break
  1329  	}
  1330  	// match: (ADD x (SRLconst [c] y))
  1331  	// result: (ADDshiftRL x y [c])
  1332  	for {
  1333  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1334  			x := v_0
  1335  			if v_1.Op != OpARMSRLconst {
  1336  				continue
  1337  			}
  1338  			c := auxIntToInt32(v_1.AuxInt)
  1339  			y := v_1.Args[0]
  1340  			v.reset(OpARMADDshiftRL)
  1341  			v.AuxInt = int32ToAuxInt(c)
  1342  			v.AddArg2(x, y)
  1343  			return true
  1344  		}
  1345  		break
  1346  	}
  1347  	// match: (ADD x (SRAconst [c] y))
  1348  	// result: (ADDshiftRA x y [c])
  1349  	for {
  1350  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1351  			x := v_0
  1352  			if v_1.Op != OpARMSRAconst {
  1353  				continue
  1354  			}
  1355  			c := auxIntToInt32(v_1.AuxInt)
  1356  			y := v_1.Args[0]
  1357  			v.reset(OpARMADDshiftRA)
  1358  			v.AuxInt = int32ToAuxInt(c)
  1359  			v.AddArg2(x, y)
  1360  			return true
  1361  		}
  1362  		break
  1363  	}
  1364  	// match: (ADD x (SLL y z))
  1365  	// result: (ADDshiftLLreg x y z)
  1366  	for {
  1367  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1368  			x := v_0
  1369  			if v_1.Op != OpARMSLL {
  1370  				continue
  1371  			}
  1372  			z := v_1.Args[1]
  1373  			y := v_1.Args[0]
  1374  			v.reset(OpARMADDshiftLLreg)
  1375  			v.AddArg3(x, y, z)
  1376  			return true
  1377  		}
  1378  		break
  1379  	}
  1380  	// match: (ADD x (SRL y z))
  1381  	// result: (ADDshiftRLreg x y z)
  1382  	for {
  1383  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1384  			x := v_0
  1385  			if v_1.Op != OpARMSRL {
  1386  				continue
  1387  			}
  1388  			z := v_1.Args[1]
  1389  			y := v_1.Args[0]
  1390  			v.reset(OpARMADDshiftRLreg)
  1391  			v.AddArg3(x, y, z)
  1392  			return true
  1393  		}
  1394  		break
  1395  	}
  1396  	// match: (ADD x (SRA y z))
  1397  	// result: (ADDshiftRAreg x y z)
  1398  	for {
  1399  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1400  			x := v_0
  1401  			if v_1.Op != OpARMSRA {
  1402  				continue
  1403  			}
  1404  			z := v_1.Args[1]
  1405  			y := v_1.Args[0]
  1406  			v.reset(OpARMADDshiftRAreg)
  1407  			v.AddArg3(x, y, z)
  1408  			return true
  1409  		}
  1410  		break
  1411  	}
  1412  	// match: (ADD x (RSBconst [0] y))
  1413  	// result: (SUB x y)
  1414  	for {
  1415  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1416  			x := v_0
  1417  			if v_1.Op != OpARMRSBconst || auxIntToInt32(v_1.AuxInt) != 0 {
  1418  				continue
  1419  			}
  1420  			y := v_1.Args[0]
  1421  			v.reset(OpARMSUB)
  1422  			v.AddArg2(x, y)
  1423  			return true
  1424  		}
  1425  		break
  1426  	}
  1427  	// match: (ADD <t> (RSBconst [c] x) (RSBconst [d] y))
  1428  	// result: (RSBconst [c+d] (ADD <t> x y))
  1429  	for {
  1430  		t := v.Type
  1431  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1432  			if v_0.Op != OpARMRSBconst {
  1433  				continue
  1434  			}
  1435  			c := auxIntToInt32(v_0.AuxInt)
  1436  			x := v_0.Args[0]
  1437  			if v_1.Op != OpARMRSBconst {
  1438  				continue
  1439  			}
  1440  			d := auxIntToInt32(v_1.AuxInt)
  1441  			y := v_1.Args[0]
  1442  			v.reset(OpARMRSBconst)
  1443  			v.AuxInt = int32ToAuxInt(c + d)
  1444  			v0 := b.NewValue0(v.Pos, OpARMADD, t)
  1445  			v0.AddArg2(x, y)
  1446  			v.AddArg(v0)
  1447  			return true
  1448  		}
  1449  		break
  1450  	}
  1451  	// match: (ADD (MUL x y) a)
  1452  	// result: (MULA x y a)
  1453  	for {
  1454  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1455  			if v_0.Op != OpARMMUL {
  1456  				continue
  1457  			}
  1458  			y := v_0.Args[1]
  1459  			x := v_0.Args[0]
  1460  			a := v_1
  1461  			v.reset(OpARMMULA)
  1462  			v.AddArg3(x, y, a)
  1463  			return true
  1464  		}
  1465  		break
  1466  	}
  1467  	return false
  1468  }
  1469  func rewriteValueARM_OpARMADDD(v *Value) bool {
  1470  	v_1 := v.Args[1]
  1471  	v_0 := v.Args[0]
  1472  	// match: (ADDD a (MULD x y))
  1473  	// cond: a.Uses == 1 && objabi.GOARM >= 6
  1474  	// result: (MULAD a x y)
  1475  	for {
  1476  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1477  			a := v_0
  1478  			if v_1.Op != OpARMMULD {
  1479  				continue
  1480  			}
  1481  			y := v_1.Args[1]
  1482  			x := v_1.Args[0]
  1483  			if !(a.Uses == 1 && objabi.GOARM >= 6) {
  1484  				continue
  1485  			}
  1486  			v.reset(OpARMMULAD)
  1487  			v.AddArg3(a, x, y)
  1488  			return true
  1489  		}
  1490  		break
  1491  	}
  1492  	// match: (ADDD a (NMULD x y))
  1493  	// cond: a.Uses == 1 && objabi.GOARM >= 6
  1494  	// result: (MULSD a x y)
  1495  	for {
  1496  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1497  			a := v_0
  1498  			if v_1.Op != OpARMNMULD {
  1499  				continue
  1500  			}
  1501  			y := v_1.Args[1]
  1502  			x := v_1.Args[0]
  1503  			if !(a.Uses == 1 && objabi.GOARM >= 6) {
  1504  				continue
  1505  			}
  1506  			v.reset(OpARMMULSD)
  1507  			v.AddArg3(a, x, y)
  1508  			return true
  1509  		}
  1510  		break
  1511  	}
  1512  	return false
  1513  }
  1514  func rewriteValueARM_OpARMADDF(v *Value) bool {
  1515  	v_1 := v.Args[1]
  1516  	v_0 := v.Args[0]
  1517  	// match: (ADDF a (MULF x y))
  1518  	// cond: a.Uses == 1 && objabi.GOARM >= 6
  1519  	// result: (MULAF a x y)
  1520  	for {
  1521  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1522  			a := v_0
  1523  			if v_1.Op != OpARMMULF {
  1524  				continue
  1525  			}
  1526  			y := v_1.Args[1]
  1527  			x := v_1.Args[0]
  1528  			if !(a.Uses == 1 && objabi.GOARM >= 6) {
  1529  				continue
  1530  			}
  1531  			v.reset(OpARMMULAF)
  1532  			v.AddArg3(a, x, y)
  1533  			return true
  1534  		}
  1535  		break
  1536  	}
  1537  	// match: (ADDF a (NMULF x y))
  1538  	// cond: a.Uses == 1 && objabi.GOARM >= 6
  1539  	// result: (MULSF a x y)
  1540  	for {
  1541  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1542  			a := v_0
  1543  			if v_1.Op != OpARMNMULF {
  1544  				continue
  1545  			}
  1546  			y := v_1.Args[1]
  1547  			x := v_1.Args[0]
  1548  			if !(a.Uses == 1 && objabi.GOARM >= 6) {
  1549  				continue
  1550  			}
  1551  			v.reset(OpARMMULSF)
  1552  			v.AddArg3(a, x, y)
  1553  			return true
  1554  		}
  1555  		break
  1556  	}
  1557  	return false
  1558  }
  1559  func rewriteValueARM_OpARMADDS(v *Value) bool {
  1560  	v_1 := v.Args[1]
  1561  	v_0 := v.Args[0]
  1562  	// match: (ADDS x (MOVWconst [c]))
  1563  	// result: (ADDSconst [c] x)
  1564  	for {
  1565  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1566  			x := v_0
  1567  			if v_1.Op != OpARMMOVWconst {
  1568  				continue
  1569  			}
  1570  			c := auxIntToInt32(v_1.AuxInt)
  1571  			v.reset(OpARMADDSconst)
  1572  			v.AuxInt = int32ToAuxInt(c)
  1573  			v.AddArg(x)
  1574  			return true
  1575  		}
  1576  		break
  1577  	}
  1578  	// match: (ADDS x (SLLconst [c] y))
  1579  	// result: (ADDSshiftLL x y [c])
  1580  	for {
  1581  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1582  			x := v_0
  1583  			if v_1.Op != OpARMSLLconst {
  1584  				continue
  1585  			}
  1586  			c := auxIntToInt32(v_1.AuxInt)
  1587  			y := v_1.Args[0]
  1588  			v.reset(OpARMADDSshiftLL)
  1589  			v.AuxInt = int32ToAuxInt(c)
  1590  			v.AddArg2(x, y)
  1591  			return true
  1592  		}
  1593  		break
  1594  	}
  1595  	// match: (ADDS x (SRLconst [c] y))
  1596  	// result: (ADDSshiftRL x y [c])
  1597  	for {
  1598  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1599  			x := v_0
  1600  			if v_1.Op != OpARMSRLconst {
  1601  				continue
  1602  			}
  1603  			c := auxIntToInt32(v_1.AuxInt)
  1604  			y := v_1.Args[0]
  1605  			v.reset(OpARMADDSshiftRL)
  1606  			v.AuxInt = int32ToAuxInt(c)
  1607  			v.AddArg2(x, y)
  1608  			return true
  1609  		}
  1610  		break
  1611  	}
  1612  	// match: (ADDS x (SRAconst [c] y))
  1613  	// result: (ADDSshiftRA x y [c])
  1614  	for {
  1615  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1616  			x := v_0
  1617  			if v_1.Op != OpARMSRAconst {
  1618  				continue
  1619  			}
  1620  			c := auxIntToInt32(v_1.AuxInt)
  1621  			y := v_1.Args[0]
  1622  			v.reset(OpARMADDSshiftRA)
  1623  			v.AuxInt = int32ToAuxInt(c)
  1624  			v.AddArg2(x, y)
  1625  			return true
  1626  		}
  1627  		break
  1628  	}
  1629  	// match: (ADDS x (SLL y z))
  1630  	// result: (ADDSshiftLLreg x y z)
  1631  	for {
  1632  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1633  			x := v_0
  1634  			if v_1.Op != OpARMSLL {
  1635  				continue
  1636  			}
  1637  			z := v_1.Args[1]
  1638  			y := v_1.Args[0]
  1639  			v.reset(OpARMADDSshiftLLreg)
  1640  			v.AddArg3(x, y, z)
  1641  			return true
  1642  		}
  1643  		break
  1644  	}
  1645  	// match: (ADDS x (SRL y z))
  1646  	// result: (ADDSshiftRLreg x y z)
  1647  	for {
  1648  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1649  			x := v_0
  1650  			if v_1.Op != OpARMSRL {
  1651  				continue
  1652  			}
  1653  			z := v_1.Args[1]
  1654  			y := v_1.Args[0]
  1655  			v.reset(OpARMADDSshiftRLreg)
  1656  			v.AddArg3(x, y, z)
  1657  			return true
  1658  		}
  1659  		break
  1660  	}
  1661  	// match: (ADDS x (SRA y z))
  1662  	// result: (ADDSshiftRAreg x y z)
  1663  	for {
  1664  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1665  			x := v_0
  1666  			if v_1.Op != OpARMSRA {
  1667  				continue
  1668  			}
  1669  			z := v_1.Args[1]
  1670  			y := v_1.Args[0]
  1671  			v.reset(OpARMADDSshiftRAreg)
  1672  			v.AddArg3(x, y, z)
  1673  			return true
  1674  		}
  1675  		break
  1676  	}
  1677  	return false
  1678  }
  1679  func rewriteValueARM_OpARMADDSshiftLL(v *Value) bool {
  1680  	v_1 := v.Args[1]
  1681  	v_0 := v.Args[0]
  1682  	b := v.Block
  1683  	// match: (ADDSshiftLL (MOVWconst [c]) x [d])
  1684  	// result: (ADDSconst [c] (SLLconst <x.Type> x [d]))
  1685  	for {
  1686  		d := auxIntToInt32(v.AuxInt)
  1687  		if v_0.Op != OpARMMOVWconst {
  1688  			break
  1689  		}
  1690  		c := auxIntToInt32(v_0.AuxInt)
  1691  		x := v_1
  1692  		v.reset(OpARMADDSconst)
  1693  		v.AuxInt = int32ToAuxInt(c)
  1694  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  1695  		v0.AuxInt = int32ToAuxInt(d)
  1696  		v0.AddArg(x)
  1697  		v.AddArg(v0)
  1698  		return true
  1699  	}
  1700  	// match: (ADDSshiftLL x (MOVWconst [c]) [d])
  1701  	// result: (ADDSconst x [c<<uint64(d)])
  1702  	for {
  1703  		d := auxIntToInt32(v.AuxInt)
  1704  		x := v_0
  1705  		if v_1.Op != OpARMMOVWconst {
  1706  			break
  1707  		}
  1708  		c := auxIntToInt32(v_1.AuxInt)
  1709  		v.reset(OpARMADDSconst)
  1710  		v.AuxInt = int32ToAuxInt(c << uint64(d))
  1711  		v.AddArg(x)
  1712  		return true
  1713  	}
  1714  	return false
  1715  }
  1716  func rewriteValueARM_OpARMADDSshiftLLreg(v *Value) bool {
  1717  	v_2 := v.Args[2]
  1718  	v_1 := v.Args[1]
  1719  	v_0 := v.Args[0]
  1720  	b := v.Block
  1721  	// match: (ADDSshiftLLreg (MOVWconst [c]) x y)
  1722  	// result: (ADDSconst [c] (SLL <x.Type> x y))
  1723  	for {
  1724  		if v_0.Op != OpARMMOVWconst {
  1725  			break
  1726  		}
  1727  		c := auxIntToInt32(v_0.AuxInt)
  1728  		x := v_1
  1729  		y := v_2
  1730  		v.reset(OpARMADDSconst)
  1731  		v.AuxInt = int32ToAuxInt(c)
  1732  		v0 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
  1733  		v0.AddArg2(x, y)
  1734  		v.AddArg(v0)
  1735  		return true
  1736  	}
  1737  	// match: (ADDSshiftLLreg x y (MOVWconst [c]))
  1738  	// result: (ADDSshiftLL x y [c])
  1739  	for {
  1740  		x := v_0
  1741  		y := v_1
  1742  		if v_2.Op != OpARMMOVWconst {
  1743  			break
  1744  		}
  1745  		c := auxIntToInt32(v_2.AuxInt)
  1746  		v.reset(OpARMADDSshiftLL)
  1747  		v.AuxInt = int32ToAuxInt(c)
  1748  		v.AddArg2(x, y)
  1749  		return true
  1750  	}
  1751  	return false
  1752  }
  1753  func rewriteValueARM_OpARMADDSshiftRA(v *Value) bool {
  1754  	v_1 := v.Args[1]
  1755  	v_0 := v.Args[0]
  1756  	b := v.Block
  1757  	// match: (ADDSshiftRA (MOVWconst [c]) x [d])
  1758  	// result: (ADDSconst [c] (SRAconst <x.Type> x [d]))
  1759  	for {
  1760  		d := auxIntToInt32(v.AuxInt)
  1761  		if v_0.Op != OpARMMOVWconst {
  1762  			break
  1763  		}
  1764  		c := auxIntToInt32(v_0.AuxInt)
  1765  		x := v_1
  1766  		v.reset(OpARMADDSconst)
  1767  		v.AuxInt = int32ToAuxInt(c)
  1768  		v0 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
  1769  		v0.AuxInt = int32ToAuxInt(d)
  1770  		v0.AddArg(x)
  1771  		v.AddArg(v0)
  1772  		return true
  1773  	}
  1774  	// match: (ADDSshiftRA x (MOVWconst [c]) [d])
  1775  	// result: (ADDSconst x [c>>uint64(d)])
  1776  	for {
  1777  		d := auxIntToInt32(v.AuxInt)
  1778  		x := v_0
  1779  		if v_1.Op != OpARMMOVWconst {
  1780  			break
  1781  		}
  1782  		c := auxIntToInt32(v_1.AuxInt)
  1783  		v.reset(OpARMADDSconst)
  1784  		v.AuxInt = int32ToAuxInt(c >> uint64(d))
  1785  		v.AddArg(x)
  1786  		return true
  1787  	}
  1788  	return false
  1789  }
  1790  func rewriteValueARM_OpARMADDSshiftRAreg(v *Value) bool {
  1791  	v_2 := v.Args[2]
  1792  	v_1 := v.Args[1]
  1793  	v_0 := v.Args[0]
  1794  	b := v.Block
  1795  	// match: (ADDSshiftRAreg (MOVWconst [c]) x y)
  1796  	// result: (ADDSconst [c] (SRA <x.Type> x y))
  1797  	for {
  1798  		if v_0.Op != OpARMMOVWconst {
  1799  			break
  1800  		}
  1801  		c := auxIntToInt32(v_0.AuxInt)
  1802  		x := v_1
  1803  		y := v_2
  1804  		v.reset(OpARMADDSconst)
  1805  		v.AuxInt = int32ToAuxInt(c)
  1806  		v0 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
  1807  		v0.AddArg2(x, y)
  1808  		v.AddArg(v0)
  1809  		return true
  1810  	}
  1811  	// match: (ADDSshiftRAreg x y (MOVWconst [c]))
  1812  	// result: (ADDSshiftRA x y [c])
  1813  	for {
  1814  		x := v_0
  1815  		y := v_1
  1816  		if v_2.Op != OpARMMOVWconst {
  1817  			break
  1818  		}
  1819  		c := auxIntToInt32(v_2.AuxInt)
  1820  		v.reset(OpARMADDSshiftRA)
  1821  		v.AuxInt = int32ToAuxInt(c)
  1822  		v.AddArg2(x, y)
  1823  		return true
  1824  	}
  1825  	return false
  1826  }
  1827  func rewriteValueARM_OpARMADDSshiftRL(v *Value) bool {
  1828  	v_1 := v.Args[1]
  1829  	v_0 := v.Args[0]
  1830  	b := v.Block
  1831  	// match: (ADDSshiftRL (MOVWconst [c]) x [d])
  1832  	// result: (ADDSconst [c] (SRLconst <x.Type> x [d]))
  1833  	for {
  1834  		d := auxIntToInt32(v.AuxInt)
  1835  		if v_0.Op != OpARMMOVWconst {
  1836  			break
  1837  		}
  1838  		c := auxIntToInt32(v_0.AuxInt)
  1839  		x := v_1
  1840  		v.reset(OpARMADDSconst)
  1841  		v.AuxInt = int32ToAuxInt(c)
  1842  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
  1843  		v0.AuxInt = int32ToAuxInt(d)
  1844  		v0.AddArg(x)
  1845  		v.AddArg(v0)
  1846  		return true
  1847  	}
  1848  	// match: (ADDSshiftRL x (MOVWconst [c]) [d])
  1849  	// result: (ADDSconst x [int32(uint32(c)>>uint64(d))])
  1850  	for {
  1851  		d := auxIntToInt32(v.AuxInt)
  1852  		x := v_0
  1853  		if v_1.Op != OpARMMOVWconst {
  1854  			break
  1855  		}
  1856  		c := auxIntToInt32(v_1.AuxInt)
  1857  		v.reset(OpARMADDSconst)
  1858  		v.AuxInt = int32ToAuxInt(int32(uint32(c) >> uint64(d)))
  1859  		v.AddArg(x)
  1860  		return true
  1861  	}
  1862  	return false
  1863  }
  1864  func rewriteValueARM_OpARMADDSshiftRLreg(v *Value) bool {
  1865  	v_2 := v.Args[2]
  1866  	v_1 := v.Args[1]
  1867  	v_0 := v.Args[0]
  1868  	b := v.Block
  1869  	// match: (ADDSshiftRLreg (MOVWconst [c]) x y)
  1870  	// result: (ADDSconst [c] (SRL <x.Type> x y))
  1871  	for {
  1872  		if v_0.Op != OpARMMOVWconst {
  1873  			break
  1874  		}
  1875  		c := auxIntToInt32(v_0.AuxInt)
  1876  		x := v_1
  1877  		y := v_2
  1878  		v.reset(OpARMADDSconst)
  1879  		v.AuxInt = int32ToAuxInt(c)
  1880  		v0 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
  1881  		v0.AddArg2(x, y)
  1882  		v.AddArg(v0)
  1883  		return true
  1884  	}
  1885  	// match: (ADDSshiftRLreg x y (MOVWconst [c]))
  1886  	// result: (ADDSshiftRL x y [c])
  1887  	for {
  1888  		x := v_0
  1889  		y := v_1
  1890  		if v_2.Op != OpARMMOVWconst {
  1891  			break
  1892  		}
  1893  		c := auxIntToInt32(v_2.AuxInt)
  1894  		v.reset(OpARMADDSshiftRL)
  1895  		v.AuxInt = int32ToAuxInt(c)
  1896  		v.AddArg2(x, y)
  1897  		return true
  1898  	}
  1899  	return false
  1900  }
  1901  func rewriteValueARM_OpARMADDconst(v *Value) bool {
  1902  	v_0 := v.Args[0]
  1903  	// match: (ADDconst [off1] (MOVWaddr [off2] {sym} ptr))
  1904  	// result: (MOVWaddr [off1+off2] {sym} ptr)
  1905  	for {
  1906  		off1 := auxIntToInt32(v.AuxInt)
  1907  		if v_0.Op != OpARMMOVWaddr {
  1908  			break
  1909  		}
  1910  		off2 := auxIntToInt32(v_0.AuxInt)
  1911  		sym := auxToSym(v_0.Aux)
  1912  		ptr := v_0.Args[0]
  1913  		v.reset(OpARMMOVWaddr)
  1914  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1915  		v.Aux = symToAux(sym)
  1916  		v.AddArg(ptr)
  1917  		return true
  1918  	}
  1919  	// match: (ADDconst [0] x)
  1920  	// result: x
  1921  	for {
  1922  		if auxIntToInt32(v.AuxInt) != 0 {
  1923  			break
  1924  		}
  1925  		x := v_0
  1926  		v.copyOf(x)
  1927  		return true
  1928  	}
  1929  	// match: (ADDconst [c] x)
  1930  	// cond: !isARMImmRot(uint32(c)) && isARMImmRot(uint32(-c))
  1931  	// result: (SUBconst [-c] x)
  1932  	for {
  1933  		c := auxIntToInt32(v.AuxInt)
  1934  		x := v_0
  1935  		if !(!isARMImmRot(uint32(c)) && isARMImmRot(uint32(-c))) {
  1936  			break
  1937  		}
  1938  		v.reset(OpARMSUBconst)
  1939  		v.AuxInt = int32ToAuxInt(-c)
  1940  		v.AddArg(x)
  1941  		return true
  1942  	}
  1943  	// match: (ADDconst [c] x)
  1944  	// cond: objabi.GOARM==7 && !isARMImmRot(uint32(c)) && uint32(c)>0xffff && uint32(-c)<=0xffff
  1945  	// result: (SUBconst [-c] x)
  1946  	for {
  1947  		c := auxIntToInt32(v.AuxInt)
  1948  		x := v_0
  1949  		if !(objabi.GOARM == 7 && !isARMImmRot(uint32(c)) && uint32(c) > 0xffff && uint32(-c) <= 0xffff) {
  1950  			break
  1951  		}
  1952  		v.reset(OpARMSUBconst)
  1953  		v.AuxInt = int32ToAuxInt(-c)
  1954  		v.AddArg(x)
  1955  		return true
  1956  	}
  1957  	// match: (ADDconst [c] (MOVWconst [d]))
  1958  	// result: (MOVWconst [c+d])
  1959  	for {
  1960  		c := auxIntToInt32(v.AuxInt)
  1961  		if v_0.Op != OpARMMOVWconst {
  1962  			break
  1963  		}
  1964  		d := auxIntToInt32(v_0.AuxInt)
  1965  		v.reset(OpARMMOVWconst)
  1966  		v.AuxInt = int32ToAuxInt(c + d)
  1967  		return true
  1968  	}
  1969  	// match: (ADDconst [c] (ADDconst [d] x))
  1970  	// result: (ADDconst [c+d] x)
  1971  	for {
  1972  		c := auxIntToInt32(v.AuxInt)
  1973  		if v_0.Op != OpARMADDconst {
  1974  			break
  1975  		}
  1976  		d := auxIntToInt32(v_0.AuxInt)
  1977  		x := v_0.Args[0]
  1978  		v.reset(OpARMADDconst)
  1979  		v.AuxInt = int32ToAuxInt(c + d)
  1980  		v.AddArg(x)
  1981  		return true
  1982  	}
  1983  	// match: (ADDconst [c] (SUBconst [d] x))
  1984  	// result: (ADDconst [c-d] x)
  1985  	for {
  1986  		c := auxIntToInt32(v.AuxInt)
  1987  		if v_0.Op != OpARMSUBconst {
  1988  			break
  1989  		}
  1990  		d := auxIntToInt32(v_0.AuxInt)
  1991  		x := v_0.Args[0]
  1992  		v.reset(OpARMADDconst)
  1993  		v.AuxInt = int32ToAuxInt(c - d)
  1994  		v.AddArg(x)
  1995  		return true
  1996  	}
  1997  	// match: (ADDconst [c] (RSBconst [d] x))
  1998  	// result: (RSBconst [c+d] x)
  1999  	for {
  2000  		c := auxIntToInt32(v.AuxInt)
  2001  		if v_0.Op != OpARMRSBconst {
  2002  			break
  2003  		}
  2004  		d := auxIntToInt32(v_0.AuxInt)
  2005  		x := v_0.Args[0]
  2006  		v.reset(OpARMRSBconst)
  2007  		v.AuxInt = int32ToAuxInt(c + d)
  2008  		v.AddArg(x)
  2009  		return true
  2010  	}
  2011  	return false
  2012  }
  2013  func rewriteValueARM_OpARMADDshiftLL(v *Value) bool {
  2014  	v_1 := v.Args[1]
  2015  	v_0 := v.Args[0]
  2016  	b := v.Block
  2017  	typ := &b.Func.Config.Types
  2018  	// match: (ADDshiftLL (MOVWconst [c]) x [d])
  2019  	// result: (ADDconst [c] (SLLconst <x.Type> x [d]))
  2020  	for {
  2021  		d := auxIntToInt32(v.AuxInt)
  2022  		if v_0.Op != OpARMMOVWconst {
  2023  			break
  2024  		}
  2025  		c := auxIntToInt32(v_0.AuxInt)
  2026  		x := v_1
  2027  		v.reset(OpARMADDconst)
  2028  		v.AuxInt = int32ToAuxInt(c)
  2029  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  2030  		v0.AuxInt = int32ToAuxInt(d)
  2031  		v0.AddArg(x)
  2032  		v.AddArg(v0)
  2033  		return true
  2034  	}
  2035  	// match: (ADDshiftLL x (MOVWconst [c]) [d])
  2036  	// result: (ADDconst x [c<<uint64(d)])
  2037  	for {
  2038  		d := auxIntToInt32(v.AuxInt)
  2039  		x := v_0
  2040  		if v_1.Op != OpARMMOVWconst {
  2041  			break
  2042  		}
  2043  		c := auxIntToInt32(v_1.AuxInt)
  2044  		v.reset(OpARMADDconst)
  2045  		v.AuxInt = int32ToAuxInt(c << uint64(d))
  2046  		v.AddArg(x)
  2047  		return true
  2048  	}
  2049  	// match: (ADDshiftLL [c] (SRLconst x [32-c]) x)
  2050  	// result: (SRRconst [32-c] x)
  2051  	for {
  2052  		c := auxIntToInt32(v.AuxInt)
  2053  		if v_0.Op != OpARMSRLconst || auxIntToInt32(v_0.AuxInt) != 32-c {
  2054  			break
  2055  		}
  2056  		x := v_0.Args[0]
  2057  		if x != v_1 {
  2058  			break
  2059  		}
  2060  		v.reset(OpARMSRRconst)
  2061  		v.AuxInt = int32ToAuxInt(32 - c)
  2062  		v.AddArg(x)
  2063  		return true
  2064  	}
  2065  	// match: (ADDshiftLL <typ.UInt16> [8] (BFXU <typ.UInt16> [int32(armBFAuxInt(8, 8))] x) x)
  2066  	// result: (REV16 x)
  2067  	for {
  2068  		if v.Type != typ.UInt16 || auxIntToInt32(v.AuxInt) != 8 || v_0.Op != OpARMBFXU || v_0.Type != typ.UInt16 || auxIntToInt32(v_0.AuxInt) != int32(armBFAuxInt(8, 8)) {
  2069  			break
  2070  		}
  2071  		x := v_0.Args[0]
  2072  		if x != v_1 {
  2073  			break
  2074  		}
  2075  		v.reset(OpARMREV16)
  2076  		v.AddArg(x)
  2077  		return true
  2078  	}
  2079  	// match: (ADDshiftLL <typ.UInt16> [8] (SRLconst <typ.UInt16> [24] (SLLconst [16] x)) x)
  2080  	// cond: objabi.GOARM>=6
  2081  	// result: (REV16 x)
  2082  	for {
  2083  		if v.Type != typ.UInt16 || auxIntToInt32(v.AuxInt) != 8 || v_0.Op != OpARMSRLconst || v_0.Type != typ.UInt16 || auxIntToInt32(v_0.AuxInt) != 24 {
  2084  			break
  2085  		}
  2086  		v_0_0 := v_0.Args[0]
  2087  		if v_0_0.Op != OpARMSLLconst || auxIntToInt32(v_0_0.AuxInt) != 16 {
  2088  			break
  2089  		}
  2090  		x := v_0_0.Args[0]
  2091  		if x != v_1 || !(objabi.GOARM >= 6) {
  2092  			break
  2093  		}
  2094  		v.reset(OpARMREV16)
  2095  		v.AddArg(x)
  2096  		return true
  2097  	}
  2098  	return false
  2099  }
  2100  func rewriteValueARM_OpARMADDshiftLLreg(v *Value) bool {
  2101  	v_2 := v.Args[2]
  2102  	v_1 := v.Args[1]
  2103  	v_0 := v.Args[0]
  2104  	b := v.Block
  2105  	// match: (ADDshiftLLreg (MOVWconst [c]) x y)
  2106  	// result: (ADDconst [c] (SLL <x.Type> x y))
  2107  	for {
  2108  		if v_0.Op != OpARMMOVWconst {
  2109  			break
  2110  		}
  2111  		c := auxIntToInt32(v_0.AuxInt)
  2112  		x := v_1
  2113  		y := v_2
  2114  		v.reset(OpARMADDconst)
  2115  		v.AuxInt = int32ToAuxInt(c)
  2116  		v0 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
  2117  		v0.AddArg2(x, y)
  2118  		v.AddArg(v0)
  2119  		return true
  2120  	}
  2121  	// match: (ADDshiftLLreg x y (MOVWconst [c]))
  2122  	// result: (ADDshiftLL x y [c])
  2123  	for {
  2124  		x := v_0
  2125  		y := v_1
  2126  		if v_2.Op != OpARMMOVWconst {
  2127  			break
  2128  		}
  2129  		c := auxIntToInt32(v_2.AuxInt)
  2130  		v.reset(OpARMADDshiftLL)
  2131  		v.AuxInt = int32ToAuxInt(c)
  2132  		v.AddArg2(x, y)
  2133  		return true
  2134  	}
  2135  	return false
  2136  }
  2137  func rewriteValueARM_OpARMADDshiftRA(v *Value) bool {
  2138  	v_1 := v.Args[1]
  2139  	v_0 := v.Args[0]
  2140  	b := v.Block
  2141  	// match: (ADDshiftRA (MOVWconst [c]) x [d])
  2142  	// result: (ADDconst [c] (SRAconst <x.Type> x [d]))
  2143  	for {
  2144  		d := auxIntToInt32(v.AuxInt)
  2145  		if v_0.Op != OpARMMOVWconst {
  2146  			break
  2147  		}
  2148  		c := auxIntToInt32(v_0.AuxInt)
  2149  		x := v_1
  2150  		v.reset(OpARMADDconst)
  2151  		v.AuxInt = int32ToAuxInt(c)
  2152  		v0 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
  2153  		v0.AuxInt = int32ToAuxInt(d)
  2154  		v0.AddArg(x)
  2155  		v.AddArg(v0)
  2156  		return true
  2157  	}
  2158  	// match: (ADDshiftRA x (MOVWconst [c]) [d])
  2159  	// result: (ADDconst x [c>>uint64(d)])
  2160  	for {
  2161  		d := auxIntToInt32(v.AuxInt)
  2162  		x := v_0
  2163  		if v_1.Op != OpARMMOVWconst {
  2164  			break
  2165  		}
  2166  		c := auxIntToInt32(v_1.AuxInt)
  2167  		v.reset(OpARMADDconst)
  2168  		v.AuxInt = int32ToAuxInt(c >> uint64(d))
  2169  		v.AddArg(x)
  2170  		return true
  2171  	}
  2172  	return false
  2173  }
  2174  func rewriteValueARM_OpARMADDshiftRAreg(v *Value) bool {
  2175  	v_2 := v.Args[2]
  2176  	v_1 := v.Args[1]
  2177  	v_0 := v.Args[0]
  2178  	b := v.Block
  2179  	// match: (ADDshiftRAreg (MOVWconst [c]) x y)
  2180  	// result: (ADDconst [c] (SRA <x.Type> x y))
  2181  	for {
  2182  		if v_0.Op != OpARMMOVWconst {
  2183  			break
  2184  		}
  2185  		c := auxIntToInt32(v_0.AuxInt)
  2186  		x := v_1
  2187  		y := v_2
  2188  		v.reset(OpARMADDconst)
  2189  		v.AuxInt = int32ToAuxInt(c)
  2190  		v0 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
  2191  		v0.AddArg2(x, y)
  2192  		v.AddArg(v0)
  2193  		return true
  2194  	}
  2195  	// match: (ADDshiftRAreg x y (MOVWconst [c]))
  2196  	// result: (ADDshiftRA x y [c])
  2197  	for {
  2198  		x := v_0
  2199  		y := v_1
  2200  		if v_2.Op != OpARMMOVWconst {
  2201  			break
  2202  		}
  2203  		c := auxIntToInt32(v_2.AuxInt)
  2204  		v.reset(OpARMADDshiftRA)
  2205  		v.AuxInt = int32ToAuxInt(c)
  2206  		v.AddArg2(x, y)
  2207  		return true
  2208  	}
  2209  	return false
  2210  }
  2211  func rewriteValueARM_OpARMADDshiftRL(v *Value) bool {
  2212  	v_1 := v.Args[1]
  2213  	v_0 := v.Args[0]
  2214  	b := v.Block
  2215  	// match: (ADDshiftRL (MOVWconst [c]) x [d])
  2216  	// result: (ADDconst [c] (SRLconst <x.Type> x [d]))
  2217  	for {
  2218  		d := auxIntToInt32(v.AuxInt)
  2219  		if v_0.Op != OpARMMOVWconst {
  2220  			break
  2221  		}
  2222  		c := auxIntToInt32(v_0.AuxInt)
  2223  		x := v_1
  2224  		v.reset(OpARMADDconst)
  2225  		v.AuxInt = int32ToAuxInt(c)
  2226  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
  2227  		v0.AuxInt = int32ToAuxInt(d)
  2228  		v0.AddArg(x)
  2229  		v.AddArg(v0)
  2230  		return true
  2231  	}
  2232  	// match: (ADDshiftRL x (MOVWconst [c]) [d])
  2233  	// result: (ADDconst x [int32(uint32(c)>>uint64(d))])
  2234  	for {
  2235  		d := auxIntToInt32(v.AuxInt)
  2236  		x := v_0
  2237  		if v_1.Op != OpARMMOVWconst {
  2238  			break
  2239  		}
  2240  		c := auxIntToInt32(v_1.AuxInt)
  2241  		v.reset(OpARMADDconst)
  2242  		v.AuxInt = int32ToAuxInt(int32(uint32(c) >> uint64(d)))
  2243  		v.AddArg(x)
  2244  		return true
  2245  	}
  2246  	// match: (ADDshiftRL [c] (SLLconst x [32-c]) x)
  2247  	// result: (SRRconst [ c] x)
  2248  	for {
  2249  		c := auxIntToInt32(v.AuxInt)
  2250  		if v_0.Op != OpARMSLLconst || auxIntToInt32(v_0.AuxInt) != 32-c {
  2251  			break
  2252  		}
  2253  		x := v_0.Args[0]
  2254  		if x != v_1 {
  2255  			break
  2256  		}
  2257  		v.reset(OpARMSRRconst)
  2258  		v.AuxInt = int32ToAuxInt(c)
  2259  		v.AddArg(x)
  2260  		return true
  2261  	}
  2262  	return false
  2263  }
  2264  func rewriteValueARM_OpARMADDshiftRLreg(v *Value) bool {
  2265  	v_2 := v.Args[2]
  2266  	v_1 := v.Args[1]
  2267  	v_0 := v.Args[0]
  2268  	b := v.Block
  2269  	// match: (ADDshiftRLreg (MOVWconst [c]) x y)
  2270  	// result: (ADDconst [c] (SRL <x.Type> x y))
  2271  	for {
  2272  		if v_0.Op != OpARMMOVWconst {
  2273  			break
  2274  		}
  2275  		c := auxIntToInt32(v_0.AuxInt)
  2276  		x := v_1
  2277  		y := v_2
  2278  		v.reset(OpARMADDconst)
  2279  		v.AuxInt = int32ToAuxInt(c)
  2280  		v0 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
  2281  		v0.AddArg2(x, y)
  2282  		v.AddArg(v0)
  2283  		return true
  2284  	}
  2285  	// match: (ADDshiftRLreg x y (MOVWconst [c]))
  2286  	// result: (ADDshiftRL x y [c])
  2287  	for {
  2288  		x := v_0
  2289  		y := v_1
  2290  		if v_2.Op != OpARMMOVWconst {
  2291  			break
  2292  		}
  2293  		c := auxIntToInt32(v_2.AuxInt)
  2294  		v.reset(OpARMADDshiftRL)
  2295  		v.AuxInt = int32ToAuxInt(c)
  2296  		v.AddArg2(x, y)
  2297  		return true
  2298  	}
  2299  	return false
  2300  }
  2301  func rewriteValueARM_OpARMAND(v *Value) bool {
  2302  	v_1 := v.Args[1]
  2303  	v_0 := v.Args[0]
  2304  	// match: (AND x (MOVWconst [c]))
  2305  	// result: (ANDconst [c] x)
  2306  	for {
  2307  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2308  			x := v_0
  2309  			if v_1.Op != OpARMMOVWconst {
  2310  				continue
  2311  			}
  2312  			c := auxIntToInt32(v_1.AuxInt)
  2313  			v.reset(OpARMANDconst)
  2314  			v.AuxInt = int32ToAuxInt(c)
  2315  			v.AddArg(x)
  2316  			return true
  2317  		}
  2318  		break
  2319  	}
  2320  	// match: (AND x (SLLconst [c] y))
  2321  	// result: (ANDshiftLL x y [c])
  2322  	for {
  2323  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2324  			x := v_0
  2325  			if v_1.Op != OpARMSLLconst {
  2326  				continue
  2327  			}
  2328  			c := auxIntToInt32(v_1.AuxInt)
  2329  			y := v_1.Args[0]
  2330  			v.reset(OpARMANDshiftLL)
  2331  			v.AuxInt = int32ToAuxInt(c)
  2332  			v.AddArg2(x, y)
  2333  			return true
  2334  		}
  2335  		break
  2336  	}
  2337  	// match: (AND x (SRLconst [c] y))
  2338  	// result: (ANDshiftRL x y [c])
  2339  	for {
  2340  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2341  			x := v_0
  2342  			if v_1.Op != OpARMSRLconst {
  2343  				continue
  2344  			}
  2345  			c := auxIntToInt32(v_1.AuxInt)
  2346  			y := v_1.Args[0]
  2347  			v.reset(OpARMANDshiftRL)
  2348  			v.AuxInt = int32ToAuxInt(c)
  2349  			v.AddArg2(x, y)
  2350  			return true
  2351  		}
  2352  		break
  2353  	}
  2354  	// match: (AND x (SRAconst [c] y))
  2355  	// result: (ANDshiftRA x y [c])
  2356  	for {
  2357  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2358  			x := v_0
  2359  			if v_1.Op != OpARMSRAconst {
  2360  				continue
  2361  			}
  2362  			c := auxIntToInt32(v_1.AuxInt)
  2363  			y := v_1.Args[0]
  2364  			v.reset(OpARMANDshiftRA)
  2365  			v.AuxInt = int32ToAuxInt(c)
  2366  			v.AddArg2(x, y)
  2367  			return true
  2368  		}
  2369  		break
  2370  	}
  2371  	// match: (AND x (SLL y z))
  2372  	// result: (ANDshiftLLreg x y z)
  2373  	for {
  2374  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2375  			x := v_0
  2376  			if v_1.Op != OpARMSLL {
  2377  				continue
  2378  			}
  2379  			z := v_1.Args[1]
  2380  			y := v_1.Args[0]
  2381  			v.reset(OpARMANDshiftLLreg)
  2382  			v.AddArg3(x, y, z)
  2383  			return true
  2384  		}
  2385  		break
  2386  	}
  2387  	// match: (AND x (SRL y z))
  2388  	// result: (ANDshiftRLreg x y z)
  2389  	for {
  2390  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2391  			x := v_0
  2392  			if v_1.Op != OpARMSRL {
  2393  				continue
  2394  			}
  2395  			z := v_1.Args[1]
  2396  			y := v_1.Args[0]
  2397  			v.reset(OpARMANDshiftRLreg)
  2398  			v.AddArg3(x, y, z)
  2399  			return true
  2400  		}
  2401  		break
  2402  	}
  2403  	// match: (AND x (SRA y z))
  2404  	// result: (ANDshiftRAreg x y z)
  2405  	for {
  2406  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2407  			x := v_0
  2408  			if v_1.Op != OpARMSRA {
  2409  				continue
  2410  			}
  2411  			z := v_1.Args[1]
  2412  			y := v_1.Args[0]
  2413  			v.reset(OpARMANDshiftRAreg)
  2414  			v.AddArg3(x, y, z)
  2415  			return true
  2416  		}
  2417  		break
  2418  	}
  2419  	// match: (AND x x)
  2420  	// result: x
  2421  	for {
  2422  		x := v_0
  2423  		if x != v_1 {
  2424  			break
  2425  		}
  2426  		v.copyOf(x)
  2427  		return true
  2428  	}
  2429  	// match: (AND x (MVN y))
  2430  	// result: (BIC x y)
  2431  	for {
  2432  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2433  			x := v_0
  2434  			if v_1.Op != OpARMMVN {
  2435  				continue
  2436  			}
  2437  			y := v_1.Args[0]
  2438  			v.reset(OpARMBIC)
  2439  			v.AddArg2(x, y)
  2440  			return true
  2441  		}
  2442  		break
  2443  	}
  2444  	// match: (AND x (MVNshiftLL y [c]))
  2445  	// result: (BICshiftLL x y [c])
  2446  	for {
  2447  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2448  			x := v_0
  2449  			if v_1.Op != OpARMMVNshiftLL {
  2450  				continue
  2451  			}
  2452  			c := auxIntToInt32(v_1.AuxInt)
  2453  			y := v_1.Args[0]
  2454  			v.reset(OpARMBICshiftLL)
  2455  			v.AuxInt = int32ToAuxInt(c)
  2456  			v.AddArg2(x, y)
  2457  			return true
  2458  		}
  2459  		break
  2460  	}
  2461  	// match: (AND x (MVNshiftRL y [c]))
  2462  	// result: (BICshiftRL x y [c])
  2463  	for {
  2464  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2465  			x := v_0
  2466  			if v_1.Op != OpARMMVNshiftRL {
  2467  				continue
  2468  			}
  2469  			c := auxIntToInt32(v_1.AuxInt)
  2470  			y := v_1.Args[0]
  2471  			v.reset(OpARMBICshiftRL)
  2472  			v.AuxInt = int32ToAuxInt(c)
  2473  			v.AddArg2(x, y)
  2474  			return true
  2475  		}
  2476  		break
  2477  	}
  2478  	// match: (AND x (MVNshiftRA y [c]))
  2479  	// result: (BICshiftRA x y [c])
  2480  	for {
  2481  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2482  			x := v_0
  2483  			if v_1.Op != OpARMMVNshiftRA {
  2484  				continue
  2485  			}
  2486  			c := auxIntToInt32(v_1.AuxInt)
  2487  			y := v_1.Args[0]
  2488  			v.reset(OpARMBICshiftRA)
  2489  			v.AuxInt = int32ToAuxInt(c)
  2490  			v.AddArg2(x, y)
  2491  			return true
  2492  		}
  2493  		break
  2494  	}
  2495  	return false
  2496  }
  2497  func rewriteValueARM_OpARMANDconst(v *Value) bool {
  2498  	v_0 := v.Args[0]
  2499  	// match: (ANDconst [0] _)
  2500  	// result: (MOVWconst [0])
  2501  	for {
  2502  		if auxIntToInt32(v.AuxInt) != 0 {
  2503  			break
  2504  		}
  2505  		v.reset(OpARMMOVWconst)
  2506  		v.AuxInt = int32ToAuxInt(0)
  2507  		return true
  2508  	}
  2509  	// match: (ANDconst [c] x)
  2510  	// cond: int32(c)==-1
  2511  	// result: x
  2512  	for {
  2513  		c := auxIntToInt32(v.AuxInt)
  2514  		x := v_0
  2515  		if !(int32(c) == -1) {
  2516  			break
  2517  		}
  2518  		v.copyOf(x)
  2519  		return true
  2520  	}
  2521  	// match: (ANDconst [c] x)
  2522  	// cond: !isARMImmRot(uint32(c)) && isARMImmRot(^uint32(c))
  2523  	// result: (BICconst [int32(^uint32(c))] x)
  2524  	for {
  2525  		c := auxIntToInt32(v.AuxInt)
  2526  		x := v_0
  2527  		if !(!isARMImmRot(uint32(c)) && isARMImmRot(^uint32(c))) {
  2528  			break
  2529  		}
  2530  		v.reset(OpARMBICconst)
  2531  		v.AuxInt = int32ToAuxInt(int32(^uint32(c)))
  2532  		v.AddArg(x)
  2533  		return true
  2534  	}
  2535  	// match: (ANDconst [c] x)
  2536  	// cond: objabi.GOARM==7 && !isARMImmRot(uint32(c)) && uint32(c)>0xffff && ^uint32(c)<=0xffff
  2537  	// result: (BICconst [int32(^uint32(c))] x)
  2538  	for {
  2539  		c := auxIntToInt32(v.AuxInt)
  2540  		x := v_0
  2541  		if !(objabi.GOARM == 7 && !isARMImmRot(uint32(c)) && uint32(c) > 0xffff && ^uint32(c) <= 0xffff) {
  2542  			break
  2543  		}
  2544  		v.reset(OpARMBICconst)
  2545  		v.AuxInt = int32ToAuxInt(int32(^uint32(c)))
  2546  		v.AddArg(x)
  2547  		return true
  2548  	}
  2549  	// match: (ANDconst [c] (MOVWconst [d]))
  2550  	// result: (MOVWconst [c&d])
  2551  	for {
  2552  		c := auxIntToInt32(v.AuxInt)
  2553  		if v_0.Op != OpARMMOVWconst {
  2554  			break
  2555  		}
  2556  		d := auxIntToInt32(v_0.AuxInt)
  2557  		v.reset(OpARMMOVWconst)
  2558  		v.AuxInt = int32ToAuxInt(c & d)
  2559  		return true
  2560  	}
  2561  	// match: (ANDconst [c] (ANDconst [d] x))
  2562  	// result: (ANDconst [c&d] x)
  2563  	for {
  2564  		c := auxIntToInt32(v.AuxInt)
  2565  		if v_0.Op != OpARMANDconst {
  2566  			break
  2567  		}
  2568  		d := auxIntToInt32(v_0.AuxInt)
  2569  		x := v_0.Args[0]
  2570  		v.reset(OpARMANDconst)
  2571  		v.AuxInt = int32ToAuxInt(c & d)
  2572  		v.AddArg(x)
  2573  		return true
  2574  	}
  2575  	return false
  2576  }
  2577  func rewriteValueARM_OpARMANDshiftLL(v *Value) bool {
  2578  	v_1 := v.Args[1]
  2579  	v_0 := v.Args[0]
  2580  	b := v.Block
  2581  	// match: (ANDshiftLL (MOVWconst [c]) x [d])
  2582  	// result: (ANDconst [c] (SLLconst <x.Type> x [d]))
  2583  	for {
  2584  		d := auxIntToInt32(v.AuxInt)
  2585  		if v_0.Op != OpARMMOVWconst {
  2586  			break
  2587  		}
  2588  		c := auxIntToInt32(v_0.AuxInt)
  2589  		x := v_1
  2590  		v.reset(OpARMANDconst)
  2591  		v.AuxInt = int32ToAuxInt(c)
  2592  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  2593  		v0.AuxInt = int32ToAuxInt(d)
  2594  		v0.AddArg(x)
  2595  		v.AddArg(v0)
  2596  		return true
  2597  	}
  2598  	// match: (ANDshiftLL x (MOVWconst [c]) [d])
  2599  	// result: (ANDconst x [c<<uint64(d)])
  2600  	for {
  2601  		d := auxIntToInt32(v.AuxInt)
  2602  		x := v_0
  2603  		if v_1.Op != OpARMMOVWconst {
  2604  			break
  2605  		}
  2606  		c := auxIntToInt32(v_1.AuxInt)
  2607  		v.reset(OpARMANDconst)
  2608  		v.AuxInt = int32ToAuxInt(c << uint64(d))
  2609  		v.AddArg(x)
  2610  		return true
  2611  	}
  2612  	// match: (ANDshiftLL x y:(SLLconst x [c]) [d])
  2613  	// cond: c==d
  2614  	// result: y
  2615  	for {
  2616  		d := auxIntToInt32(v.AuxInt)
  2617  		x := v_0
  2618  		y := v_1
  2619  		if y.Op != OpARMSLLconst {
  2620  			break
  2621  		}
  2622  		c := auxIntToInt32(y.AuxInt)
  2623  		if x != y.Args[0] || !(c == d) {
  2624  			break
  2625  		}
  2626  		v.copyOf(y)
  2627  		return true
  2628  	}
  2629  	return false
  2630  }
  2631  func rewriteValueARM_OpARMANDshiftLLreg(v *Value) bool {
  2632  	v_2 := v.Args[2]
  2633  	v_1 := v.Args[1]
  2634  	v_0 := v.Args[0]
  2635  	b := v.Block
  2636  	// match: (ANDshiftLLreg (MOVWconst [c]) x y)
  2637  	// result: (ANDconst [c] (SLL <x.Type> x y))
  2638  	for {
  2639  		if v_0.Op != OpARMMOVWconst {
  2640  			break
  2641  		}
  2642  		c := auxIntToInt32(v_0.AuxInt)
  2643  		x := v_1
  2644  		y := v_2
  2645  		v.reset(OpARMANDconst)
  2646  		v.AuxInt = int32ToAuxInt(c)
  2647  		v0 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
  2648  		v0.AddArg2(x, y)
  2649  		v.AddArg(v0)
  2650  		return true
  2651  	}
  2652  	// match: (ANDshiftLLreg x y (MOVWconst [c]))
  2653  	// result: (ANDshiftLL x y [c])
  2654  	for {
  2655  		x := v_0
  2656  		y := v_1
  2657  		if v_2.Op != OpARMMOVWconst {
  2658  			break
  2659  		}
  2660  		c := auxIntToInt32(v_2.AuxInt)
  2661  		v.reset(OpARMANDshiftLL)
  2662  		v.AuxInt = int32ToAuxInt(c)
  2663  		v.AddArg2(x, y)
  2664  		return true
  2665  	}
  2666  	return false
  2667  }
  2668  func rewriteValueARM_OpARMANDshiftRA(v *Value) bool {
  2669  	v_1 := v.Args[1]
  2670  	v_0 := v.Args[0]
  2671  	b := v.Block
  2672  	// match: (ANDshiftRA (MOVWconst [c]) x [d])
  2673  	// result: (ANDconst [c] (SRAconst <x.Type> x [d]))
  2674  	for {
  2675  		d := auxIntToInt32(v.AuxInt)
  2676  		if v_0.Op != OpARMMOVWconst {
  2677  			break
  2678  		}
  2679  		c := auxIntToInt32(v_0.AuxInt)
  2680  		x := v_1
  2681  		v.reset(OpARMANDconst)
  2682  		v.AuxInt = int32ToAuxInt(c)
  2683  		v0 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
  2684  		v0.AuxInt = int32ToAuxInt(d)
  2685  		v0.AddArg(x)
  2686  		v.AddArg(v0)
  2687  		return true
  2688  	}
  2689  	// match: (ANDshiftRA x (MOVWconst [c]) [d])
  2690  	// result: (ANDconst x [c>>uint64(d)])
  2691  	for {
  2692  		d := auxIntToInt32(v.AuxInt)
  2693  		x := v_0
  2694  		if v_1.Op != OpARMMOVWconst {
  2695  			break
  2696  		}
  2697  		c := auxIntToInt32(v_1.AuxInt)
  2698  		v.reset(OpARMANDconst)
  2699  		v.AuxInt = int32ToAuxInt(c >> uint64(d))
  2700  		v.AddArg(x)
  2701  		return true
  2702  	}
  2703  	// match: (ANDshiftRA x y:(SRAconst x [c]) [d])
  2704  	// cond: c==d
  2705  	// result: y
  2706  	for {
  2707  		d := auxIntToInt32(v.AuxInt)
  2708  		x := v_0
  2709  		y := v_1
  2710  		if y.Op != OpARMSRAconst {
  2711  			break
  2712  		}
  2713  		c := auxIntToInt32(y.AuxInt)
  2714  		if x != y.Args[0] || !(c == d) {
  2715  			break
  2716  		}
  2717  		v.copyOf(y)
  2718  		return true
  2719  	}
  2720  	return false
  2721  }
  2722  func rewriteValueARM_OpARMANDshiftRAreg(v *Value) bool {
  2723  	v_2 := v.Args[2]
  2724  	v_1 := v.Args[1]
  2725  	v_0 := v.Args[0]
  2726  	b := v.Block
  2727  	// match: (ANDshiftRAreg (MOVWconst [c]) x y)
  2728  	// result: (ANDconst [c] (SRA <x.Type> x y))
  2729  	for {
  2730  		if v_0.Op != OpARMMOVWconst {
  2731  			break
  2732  		}
  2733  		c := auxIntToInt32(v_0.AuxInt)
  2734  		x := v_1
  2735  		y := v_2
  2736  		v.reset(OpARMANDconst)
  2737  		v.AuxInt = int32ToAuxInt(c)
  2738  		v0 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
  2739  		v0.AddArg2(x, y)
  2740  		v.AddArg(v0)
  2741  		return true
  2742  	}
  2743  	// match: (ANDshiftRAreg x y (MOVWconst [c]))
  2744  	// result: (ANDshiftRA x y [c])
  2745  	for {
  2746  		x := v_0
  2747  		y := v_1
  2748  		if v_2.Op != OpARMMOVWconst {
  2749  			break
  2750  		}
  2751  		c := auxIntToInt32(v_2.AuxInt)
  2752  		v.reset(OpARMANDshiftRA)
  2753  		v.AuxInt = int32ToAuxInt(c)
  2754  		v.AddArg2(x, y)
  2755  		return true
  2756  	}
  2757  	return false
  2758  }
  2759  func rewriteValueARM_OpARMANDshiftRL(v *Value) bool {
  2760  	v_1 := v.Args[1]
  2761  	v_0 := v.Args[0]
  2762  	b := v.Block
  2763  	// match: (ANDshiftRL (MOVWconst [c]) x [d])
  2764  	// result: (ANDconst [c] (SRLconst <x.Type> x [d]))
  2765  	for {
  2766  		d := auxIntToInt32(v.AuxInt)
  2767  		if v_0.Op != OpARMMOVWconst {
  2768  			break
  2769  		}
  2770  		c := auxIntToInt32(v_0.AuxInt)
  2771  		x := v_1
  2772  		v.reset(OpARMANDconst)
  2773  		v.AuxInt = int32ToAuxInt(c)
  2774  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
  2775  		v0.AuxInt = int32ToAuxInt(d)
  2776  		v0.AddArg(x)
  2777  		v.AddArg(v0)
  2778  		return true
  2779  	}
  2780  	// match: (ANDshiftRL x (MOVWconst [c]) [d])
  2781  	// result: (ANDconst x [int32(uint32(c)>>uint64(d))])
  2782  	for {
  2783  		d := auxIntToInt32(v.AuxInt)
  2784  		x := v_0
  2785  		if v_1.Op != OpARMMOVWconst {
  2786  			break
  2787  		}
  2788  		c := auxIntToInt32(v_1.AuxInt)
  2789  		v.reset(OpARMANDconst)
  2790  		v.AuxInt = int32ToAuxInt(int32(uint32(c) >> uint64(d)))
  2791  		v.AddArg(x)
  2792  		return true
  2793  	}
  2794  	// match: (ANDshiftRL x y:(SRLconst x [c]) [d])
  2795  	// cond: c==d
  2796  	// result: y
  2797  	for {
  2798  		d := auxIntToInt32(v.AuxInt)
  2799  		x := v_0
  2800  		y := v_1
  2801  		if y.Op != OpARMSRLconst {
  2802  			break
  2803  		}
  2804  		c := auxIntToInt32(y.AuxInt)
  2805  		if x != y.Args[0] || !(c == d) {
  2806  			break
  2807  		}
  2808  		v.copyOf(y)
  2809  		return true
  2810  	}
  2811  	return false
  2812  }
  2813  func rewriteValueARM_OpARMANDshiftRLreg(v *Value) bool {
  2814  	v_2 := v.Args[2]
  2815  	v_1 := v.Args[1]
  2816  	v_0 := v.Args[0]
  2817  	b := v.Block
  2818  	// match: (ANDshiftRLreg (MOVWconst [c]) x y)
  2819  	// result: (ANDconst [c] (SRL <x.Type> x y))
  2820  	for {
  2821  		if v_0.Op != OpARMMOVWconst {
  2822  			break
  2823  		}
  2824  		c := auxIntToInt32(v_0.AuxInt)
  2825  		x := v_1
  2826  		y := v_2
  2827  		v.reset(OpARMANDconst)
  2828  		v.AuxInt = int32ToAuxInt(c)
  2829  		v0 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
  2830  		v0.AddArg2(x, y)
  2831  		v.AddArg(v0)
  2832  		return true
  2833  	}
  2834  	// match: (ANDshiftRLreg x y (MOVWconst [c]))
  2835  	// result: (ANDshiftRL x y [c])
  2836  	for {
  2837  		x := v_0
  2838  		y := v_1
  2839  		if v_2.Op != OpARMMOVWconst {
  2840  			break
  2841  		}
  2842  		c := auxIntToInt32(v_2.AuxInt)
  2843  		v.reset(OpARMANDshiftRL)
  2844  		v.AuxInt = int32ToAuxInt(c)
  2845  		v.AddArg2(x, y)
  2846  		return true
  2847  	}
  2848  	return false
  2849  }
  2850  func rewriteValueARM_OpARMBFX(v *Value) bool {
  2851  	v_0 := v.Args[0]
  2852  	// match: (BFX [c] (MOVWconst [d]))
  2853  	// result: (MOVWconst [d<<(32-uint32(c&0xff)-uint32(c>>8))>>(32-uint32(c>>8))])
  2854  	for {
  2855  		c := auxIntToInt32(v.AuxInt)
  2856  		if v_0.Op != OpARMMOVWconst {
  2857  			break
  2858  		}
  2859  		d := auxIntToInt32(v_0.AuxInt)
  2860  		v.reset(OpARMMOVWconst)
  2861  		v.AuxInt = int32ToAuxInt(d << (32 - uint32(c&0xff) - uint32(c>>8)) >> (32 - uint32(c>>8)))
  2862  		return true
  2863  	}
  2864  	return false
  2865  }
  2866  func rewriteValueARM_OpARMBFXU(v *Value) bool {
  2867  	v_0 := v.Args[0]
  2868  	// match: (BFXU [c] (MOVWconst [d]))
  2869  	// result: (MOVWconst [int32(uint32(d)<<(32-uint32(c&0xff)-uint32(c>>8))>>(32-uint32(c>>8)))])
  2870  	for {
  2871  		c := auxIntToInt32(v.AuxInt)
  2872  		if v_0.Op != OpARMMOVWconst {
  2873  			break
  2874  		}
  2875  		d := auxIntToInt32(v_0.AuxInt)
  2876  		v.reset(OpARMMOVWconst)
  2877  		v.AuxInt = int32ToAuxInt(int32(uint32(d) << (32 - uint32(c&0xff) - uint32(c>>8)) >> (32 - uint32(c>>8))))
  2878  		return true
  2879  	}
  2880  	return false
  2881  }
  2882  func rewriteValueARM_OpARMBIC(v *Value) bool {
  2883  	v_1 := v.Args[1]
  2884  	v_0 := v.Args[0]
  2885  	// match: (BIC x (MOVWconst [c]))
  2886  	// result: (BICconst [c] x)
  2887  	for {
  2888  		x := v_0
  2889  		if v_1.Op != OpARMMOVWconst {
  2890  			break
  2891  		}
  2892  		c := auxIntToInt32(v_1.AuxInt)
  2893  		v.reset(OpARMBICconst)
  2894  		v.AuxInt = int32ToAuxInt(c)
  2895  		v.AddArg(x)
  2896  		return true
  2897  	}
  2898  	// match: (BIC x (SLLconst [c] y))
  2899  	// result: (BICshiftLL x y [c])
  2900  	for {
  2901  		x := v_0
  2902  		if v_1.Op != OpARMSLLconst {
  2903  			break
  2904  		}
  2905  		c := auxIntToInt32(v_1.AuxInt)
  2906  		y := v_1.Args[0]
  2907  		v.reset(OpARMBICshiftLL)
  2908  		v.AuxInt = int32ToAuxInt(c)
  2909  		v.AddArg2(x, y)
  2910  		return true
  2911  	}
  2912  	// match: (BIC x (SRLconst [c] y))
  2913  	// result: (BICshiftRL x y [c])
  2914  	for {
  2915  		x := v_0
  2916  		if v_1.Op != OpARMSRLconst {
  2917  			break
  2918  		}
  2919  		c := auxIntToInt32(v_1.AuxInt)
  2920  		y := v_1.Args[0]
  2921  		v.reset(OpARMBICshiftRL)
  2922  		v.AuxInt = int32ToAuxInt(c)
  2923  		v.AddArg2(x, y)
  2924  		return true
  2925  	}
  2926  	// match: (BIC x (SRAconst [c] y))
  2927  	// result: (BICshiftRA x y [c])
  2928  	for {
  2929  		x := v_0
  2930  		if v_1.Op != OpARMSRAconst {
  2931  			break
  2932  		}
  2933  		c := auxIntToInt32(v_1.AuxInt)
  2934  		y := v_1.Args[0]
  2935  		v.reset(OpARMBICshiftRA)
  2936  		v.AuxInt = int32ToAuxInt(c)
  2937  		v.AddArg2(x, y)
  2938  		return true
  2939  	}
  2940  	// match: (BIC x (SLL y z))
  2941  	// result: (BICshiftLLreg x y z)
  2942  	for {
  2943  		x := v_0
  2944  		if v_1.Op != OpARMSLL {
  2945  			break
  2946  		}
  2947  		z := v_1.Args[1]
  2948  		y := v_1.Args[0]
  2949  		v.reset(OpARMBICshiftLLreg)
  2950  		v.AddArg3(x, y, z)
  2951  		return true
  2952  	}
  2953  	// match: (BIC x (SRL y z))
  2954  	// result: (BICshiftRLreg x y z)
  2955  	for {
  2956  		x := v_0
  2957  		if v_1.Op != OpARMSRL {
  2958  			break
  2959  		}
  2960  		z := v_1.Args[1]
  2961  		y := v_1.Args[0]
  2962  		v.reset(OpARMBICshiftRLreg)
  2963  		v.AddArg3(x, y, z)
  2964  		return true
  2965  	}
  2966  	// match: (BIC x (SRA y z))
  2967  	// result: (BICshiftRAreg x y z)
  2968  	for {
  2969  		x := v_0
  2970  		if v_1.Op != OpARMSRA {
  2971  			break
  2972  		}
  2973  		z := v_1.Args[1]
  2974  		y := v_1.Args[0]
  2975  		v.reset(OpARMBICshiftRAreg)
  2976  		v.AddArg3(x, y, z)
  2977  		return true
  2978  	}
  2979  	// match: (BIC x x)
  2980  	// result: (MOVWconst [0])
  2981  	for {
  2982  		x := v_0
  2983  		if x != v_1 {
  2984  			break
  2985  		}
  2986  		v.reset(OpARMMOVWconst)
  2987  		v.AuxInt = int32ToAuxInt(0)
  2988  		return true
  2989  	}
  2990  	return false
  2991  }
  2992  func rewriteValueARM_OpARMBICconst(v *Value) bool {
  2993  	v_0 := v.Args[0]
  2994  	// match: (BICconst [0] x)
  2995  	// result: x
  2996  	for {
  2997  		if auxIntToInt32(v.AuxInt) != 0 {
  2998  			break
  2999  		}
  3000  		x := v_0
  3001  		v.copyOf(x)
  3002  		return true
  3003  	}
  3004  	// match: (BICconst [c] _)
  3005  	// cond: int32(c)==-1
  3006  	// result: (MOVWconst [0])
  3007  	for {
  3008  		c := auxIntToInt32(v.AuxInt)
  3009  		if !(int32(c) == -1) {
  3010  			break
  3011  		}
  3012  		v.reset(OpARMMOVWconst)
  3013  		v.AuxInt = int32ToAuxInt(0)
  3014  		return true
  3015  	}
  3016  	// match: (BICconst [c] x)
  3017  	// cond: !isARMImmRot(uint32(c)) && isARMImmRot(^uint32(c))
  3018  	// result: (ANDconst [int32(^uint32(c))] x)
  3019  	for {
  3020  		c := auxIntToInt32(v.AuxInt)
  3021  		x := v_0
  3022  		if !(!isARMImmRot(uint32(c)) && isARMImmRot(^uint32(c))) {
  3023  			break
  3024  		}
  3025  		v.reset(OpARMANDconst)
  3026  		v.AuxInt = int32ToAuxInt(int32(^uint32(c)))
  3027  		v.AddArg(x)
  3028  		return true
  3029  	}
  3030  	// match: (BICconst [c] x)
  3031  	// cond: objabi.GOARM==7 && !isARMImmRot(uint32(c)) && uint32(c)>0xffff && ^uint32(c)<=0xffff
  3032  	// result: (ANDconst [int32(^uint32(c))] x)
  3033  	for {
  3034  		c := auxIntToInt32(v.AuxInt)
  3035  		x := v_0
  3036  		if !(objabi.GOARM == 7 && !isARMImmRot(uint32(c)) && uint32(c) > 0xffff && ^uint32(c) <= 0xffff) {
  3037  			break
  3038  		}
  3039  		v.reset(OpARMANDconst)
  3040  		v.AuxInt = int32ToAuxInt(int32(^uint32(c)))
  3041  		v.AddArg(x)
  3042  		return true
  3043  	}
  3044  	// match: (BICconst [c] (MOVWconst [d]))
  3045  	// result: (MOVWconst [d&^c])
  3046  	for {
  3047  		c := auxIntToInt32(v.AuxInt)
  3048  		if v_0.Op != OpARMMOVWconst {
  3049  			break
  3050  		}
  3051  		d := auxIntToInt32(v_0.AuxInt)
  3052  		v.reset(OpARMMOVWconst)
  3053  		v.AuxInt = int32ToAuxInt(d &^ c)
  3054  		return true
  3055  	}
  3056  	// match: (BICconst [c] (BICconst [d] x))
  3057  	// result: (BICconst [c|d] x)
  3058  	for {
  3059  		c := auxIntToInt32(v.AuxInt)
  3060  		if v_0.Op != OpARMBICconst {
  3061  			break
  3062  		}
  3063  		d := auxIntToInt32(v_0.AuxInt)
  3064  		x := v_0.Args[0]
  3065  		v.reset(OpARMBICconst)
  3066  		v.AuxInt = int32ToAuxInt(c | d)
  3067  		v.AddArg(x)
  3068  		return true
  3069  	}
  3070  	return false
  3071  }
  3072  func rewriteValueARM_OpARMBICshiftLL(v *Value) bool {
  3073  	v_1 := v.Args[1]
  3074  	v_0 := v.Args[0]
  3075  	// match: (BICshiftLL x (MOVWconst [c]) [d])
  3076  	// result: (BICconst x [c<<uint64(d)])
  3077  	for {
  3078  		d := auxIntToInt32(v.AuxInt)
  3079  		x := v_0
  3080  		if v_1.Op != OpARMMOVWconst {
  3081  			break
  3082  		}
  3083  		c := auxIntToInt32(v_1.AuxInt)
  3084  		v.reset(OpARMBICconst)
  3085  		v.AuxInt = int32ToAuxInt(c << uint64(d))
  3086  		v.AddArg(x)
  3087  		return true
  3088  	}
  3089  	// match: (BICshiftLL x (SLLconst x [c]) [d])
  3090  	// cond: c==d
  3091  	// result: (MOVWconst [0])
  3092  	for {
  3093  		d := auxIntToInt32(v.AuxInt)
  3094  		x := v_0
  3095  		if v_1.Op != OpARMSLLconst {
  3096  			break
  3097  		}
  3098  		c := auxIntToInt32(v_1.AuxInt)
  3099  		if x != v_1.Args[0] || !(c == d) {
  3100  			break
  3101  		}
  3102  		v.reset(OpARMMOVWconst)
  3103  		v.AuxInt = int32ToAuxInt(0)
  3104  		return true
  3105  	}
  3106  	return false
  3107  }
  3108  func rewriteValueARM_OpARMBICshiftLLreg(v *Value) bool {
  3109  	v_2 := v.Args[2]
  3110  	v_1 := v.Args[1]
  3111  	v_0 := v.Args[0]
  3112  	// match: (BICshiftLLreg x y (MOVWconst [c]))
  3113  	// result: (BICshiftLL x y [c])
  3114  	for {
  3115  		x := v_0
  3116  		y := v_1
  3117  		if v_2.Op != OpARMMOVWconst {
  3118  			break
  3119  		}
  3120  		c := auxIntToInt32(v_2.AuxInt)
  3121  		v.reset(OpARMBICshiftLL)
  3122  		v.AuxInt = int32ToAuxInt(c)
  3123  		v.AddArg2(x, y)
  3124  		return true
  3125  	}
  3126  	return false
  3127  }
  3128  func rewriteValueARM_OpARMBICshiftRA(v *Value) bool {
  3129  	v_1 := v.Args[1]
  3130  	v_0 := v.Args[0]
  3131  	// match: (BICshiftRA x (MOVWconst [c]) [d])
  3132  	// result: (BICconst x [c>>uint64(d)])
  3133  	for {
  3134  		d := auxIntToInt32(v.AuxInt)
  3135  		x := v_0
  3136  		if v_1.Op != OpARMMOVWconst {
  3137  			break
  3138  		}
  3139  		c := auxIntToInt32(v_1.AuxInt)
  3140  		v.reset(OpARMBICconst)
  3141  		v.AuxInt = int32ToAuxInt(c >> uint64(d))
  3142  		v.AddArg(x)
  3143  		return true
  3144  	}
  3145  	// match: (BICshiftRA x (SRAconst x [c]) [d])
  3146  	// cond: c==d
  3147  	// result: (MOVWconst [0])
  3148  	for {
  3149  		d := auxIntToInt32(v.AuxInt)
  3150  		x := v_0
  3151  		if v_1.Op != OpARMSRAconst {
  3152  			break
  3153  		}
  3154  		c := auxIntToInt32(v_1.AuxInt)
  3155  		if x != v_1.Args[0] || !(c == d) {
  3156  			break
  3157  		}
  3158  		v.reset(OpARMMOVWconst)
  3159  		v.AuxInt = int32ToAuxInt(0)
  3160  		return true
  3161  	}
  3162  	return false
  3163  }
  3164  func rewriteValueARM_OpARMBICshiftRAreg(v *Value) bool {
  3165  	v_2 := v.Args[2]
  3166  	v_1 := v.Args[1]
  3167  	v_0 := v.Args[0]
  3168  	// match: (BICshiftRAreg x y (MOVWconst [c]))
  3169  	// result: (BICshiftRA x y [c])
  3170  	for {
  3171  		x := v_0
  3172  		y := v_1
  3173  		if v_2.Op != OpARMMOVWconst {
  3174  			break
  3175  		}
  3176  		c := auxIntToInt32(v_2.AuxInt)
  3177  		v.reset(OpARMBICshiftRA)
  3178  		v.AuxInt = int32ToAuxInt(c)
  3179  		v.AddArg2(x, y)
  3180  		return true
  3181  	}
  3182  	return false
  3183  }
  3184  func rewriteValueARM_OpARMBICshiftRL(v *Value) bool {
  3185  	v_1 := v.Args[1]
  3186  	v_0 := v.Args[0]
  3187  	// match: (BICshiftRL x (MOVWconst [c]) [d])
  3188  	// result: (BICconst x [int32(uint32(c)>>uint64(d))])
  3189  	for {
  3190  		d := auxIntToInt32(v.AuxInt)
  3191  		x := v_0
  3192  		if v_1.Op != OpARMMOVWconst {
  3193  			break
  3194  		}
  3195  		c := auxIntToInt32(v_1.AuxInt)
  3196  		v.reset(OpARMBICconst)
  3197  		v.AuxInt = int32ToAuxInt(int32(uint32(c) >> uint64(d)))
  3198  		v.AddArg(x)
  3199  		return true
  3200  	}
  3201  	// match: (BICshiftRL x (SRLconst x [c]) [d])
  3202  	// cond: c==d
  3203  	// result: (MOVWconst [0])
  3204  	for {
  3205  		d := auxIntToInt32(v.AuxInt)
  3206  		x := v_0
  3207  		if v_1.Op != OpARMSRLconst {
  3208  			break
  3209  		}
  3210  		c := auxIntToInt32(v_1.AuxInt)
  3211  		if x != v_1.Args[0] || !(c == d) {
  3212  			break
  3213  		}
  3214  		v.reset(OpARMMOVWconst)
  3215  		v.AuxInt = int32ToAuxInt(0)
  3216  		return true
  3217  	}
  3218  	return false
  3219  }
  3220  func rewriteValueARM_OpARMBICshiftRLreg(v *Value) bool {
  3221  	v_2 := v.Args[2]
  3222  	v_1 := v.Args[1]
  3223  	v_0 := v.Args[0]
  3224  	// match: (BICshiftRLreg x y (MOVWconst [c]))
  3225  	// result: (BICshiftRL x y [c])
  3226  	for {
  3227  		x := v_0
  3228  		y := v_1
  3229  		if v_2.Op != OpARMMOVWconst {
  3230  			break
  3231  		}
  3232  		c := auxIntToInt32(v_2.AuxInt)
  3233  		v.reset(OpARMBICshiftRL)
  3234  		v.AuxInt = int32ToAuxInt(c)
  3235  		v.AddArg2(x, y)
  3236  		return true
  3237  	}
  3238  	return false
  3239  }
  3240  func rewriteValueARM_OpARMCMN(v *Value) bool {
  3241  	v_1 := v.Args[1]
  3242  	v_0 := v.Args[0]
  3243  	// match: (CMN x (MOVWconst [c]))
  3244  	// result: (CMNconst [c] x)
  3245  	for {
  3246  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3247  			x := v_0
  3248  			if v_1.Op != OpARMMOVWconst {
  3249  				continue
  3250  			}
  3251  			c := auxIntToInt32(v_1.AuxInt)
  3252  			v.reset(OpARMCMNconst)
  3253  			v.AuxInt = int32ToAuxInt(c)
  3254  			v.AddArg(x)
  3255  			return true
  3256  		}
  3257  		break
  3258  	}
  3259  	// match: (CMN x (SLLconst [c] y))
  3260  	// result: (CMNshiftLL x y [c])
  3261  	for {
  3262  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3263  			x := v_0
  3264  			if v_1.Op != OpARMSLLconst {
  3265  				continue
  3266  			}
  3267  			c := auxIntToInt32(v_1.AuxInt)
  3268  			y := v_1.Args[0]
  3269  			v.reset(OpARMCMNshiftLL)
  3270  			v.AuxInt = int32ToAuxInt(c)
  3271  			v.AddArg2(x, y)
  3272  			return true
  3273  		}
  3274  		break
  3275  	}
  3276  	// match: (CMN x (SRLconst [c] y))
  3277  	// result: (CMNshiftRL x y [c])
  3278  	for {
  3279  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3280  			x := v_0
  3281  			if v_1.Op != OpARMSRLconst {
  3282  				continue
  3283  			}
  3284  			c := auxIntToInt32(v_1.AuxInt)
  3285  			y := v_1.Args[0]
  3286  			v.reset(OpARMCMNshiftRL)
  3287  			v.AuxInt = int32ToAuxInt(c)
  3288  			v.AddArg2(x, y)
  3289  			return true
  3290  		}
  3291  		break
  3292  	}
  3293  	// match: (CMN x (SRAconst [c] y))
  3294  	// result: (CMNshiftRA x y [c])
  3295  	for {
  3296  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3297  			x := v_0
  3298  			if v_1.Op != OpARMSRAconst {
  3299  				continue
  3300  			}
  3301  			c := auxIntToInt32(v_1.AuxInt)
  3302  			y := v_1.Args[0]
  3303  			v.reset(OpARMCMNshiftRA)
  3304  			v.AuxInt = int32ToAuxInt(c)
  3305  			v.AddArg2(x, y)
  3306  			return true
  3307  		}
  3308  		break
  3309  	}
  3310  	// match: (CMN x (SLL y z))
  3311  	// result: (CMNshiftLLreg x y z)
  3312  	for {
  3313  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3314  			x := v_0
  3315  			if v_1.Op != OpARMSLL {
  3316  				continue
  3317  			}
  3318  			z := v_1.Args[1]
  3319  			y := v_1.Args[0]
  3320  			v.reset(OpARMCMNshiftLLreg)
  3321  			v.AddArg3(x, y, z)
  3322  			return true
  3323  		}
  3324  		break
  3325  	}
  3326  	// match: (CMN x (SRL y z))
  3327  	// result: (CMNshiftRLreg x y z)
  3328  	for {
  3329  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3330  			x := v_0
  3331  			if v_1.Op != OpARMSRL {
  3332  				continue
  3333  			}
  3334  			z := v_1.Args[1]
  3335  			y := v_1.Args[0]
  3336  			v.reset(OpARMCMNshiftRLreg)
  3337  			v.AddArg3(x, y, z)
  3338  			return true
  3339  		}
  3340  		break
  3341  	}
  3342  	// match: (CMN x (SRA y z))
  3343  	// result: (CMNshiftRAreg x y z)
  3344  	for {
  3345  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3346  			x := v_0
  3347  			if v_1.Op != OpARMSRA {
  3348  				continue
  3349  			}
  3350  			z := v_1.Args[1]
  3351  			y := v_1.Args[0]
  3352  			v.reset(OpARMCMNshiftRAreg)
  3353  			v.AddArg3(x, y, z)
  3354  			return true
  3355  		}
  3356  		break
  3357  	}
  3358  	return false
  3359  }
  3360  func rewriteValueARM_OpARMCMNconst(v *Value) bool {
  3361  	v_0 := v.Args[0]
  3362  	// match: (CMNconst (MOVWconst [x]) [y])
  3363  	// result: (FlagConstant [addFlags32(x,y)])
  3364  	for {
  3365  		y := auxIntToInt32(v.AuxInt)
  3366  		if v_0.Op != OpARMMOVWconst {
  3367  			break
  3368  		}
  3369  		x := auxIntToInt32(v_0.AuxInt)
  3370  		v.reset(OpARMFlagConstant)
  3371  		v.AuxInt = flagConstantToAuxInt(addFlags32(x, y))
  3372  		return true
  3373  	}
  3374  	return false
  3375  }
  3376  func rewriteValueARM_OpARMCMNshiftLL(v *Value) bool {
  3377  	v_1 := v.Args[1]
  3378  	v_0 := v.Args[0]
  3379  	b := v.Block
  3380  	// match: (CMNshiftLL (MOVWconst [c]) x [d])
  3381  	// result: (CMNconst [c] (SLLconst <x.Type> x [d]))
  3382  	for {
  3383  		d := auxIntToInt32(v.AuxInt)
  3384  		if v_0.Op != OpARMMOVWconst {
  3385  			break
  3386  		}
  3387  		c := auxIntToInt32(v_0.AuxInt)
  3388  		x := v_1
  3389  		v.reset(OpARMCMNconst)
  3390  		v.AuxInt = int32ToAuxInt(c)
  3391  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  3392  		v0.AuxInt = int32ToAuxInt(d)
  3393  		v0.AddArg(x)
  3394  		v.AddArg(v0)
  3395  		return true
  3396  	}
  3397  	// match: (CMNshiftLL x (MOVWconst [c]) [d])
  3398  	// result: (CMNconst x [c<<uint64(d)])
  3399  	for {
  3400  		d := auxIntToInt32(v.AuxInt)
  3401  		x := v_0
  3402  		if v_1.Op != OpARMMOVWconst {
  3403  			break
  3404  		}
  3405  		c := auxIntToInt32(v_1.AuxInt)
  3406  		v.reset(OpARMCMNconst)
  3407  		v.AuxInt = int32ToAuxInt(c << uint64(d))
  3408  		v.AddArg(x)
  3409  		return true
  3410  	}
  3411  	return false
  3412  }
  3413  func rewriteValueARM_OpARMCMNshiftLLreg(v *Value) bool {
  3414  	v_2 := v.Args[2]
  3415  	v_1 := v.Args[1]
  3416  	v_0 := v.Args[0]
  3417  	b := v.Block
  3418  	// match: (CMNshiftLLreg (MOVWconst [c]) x y)
  3419  	// result: (CMNconst [c] (SLL <x.Type> x y))
  3420  	for {
  3421  		if v_0.Op != OpARMMOVWconst {
  3422  			break
  3423  		}
  3424  		c := auxIntToInt32(v_0.AuxInt)
  3425  		x := v_1
  3426  		y := v_2
  3427  		v.reset(OpARMCMNconst)
  3428  		v.AuxInt = int32ToAuxInt(c)
  3429  		v0 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
  3430  		v0.AddArg2(x, y)
  3431  		v.AddArg(v0)
  3432  		return true
  3433  	}
  3434  	// match: (CMNshiftLLreg x y (MOVWconst [c]))
  3435  	// result: (CMNshiftLL x y [c])
  3436  	for {
  3437  		x := v_0
  3438  		y := v_1
  3439  		if v_2.Op != OpARMMOVWconst {
  3440  			break
  3441  		}
  3442  		c := auxIntToInt32(v_2.AuxInt)
  3443  		v.reset(OpARMCMNshiftLL)
  3444  		v.AuxInt = int32ToAuxInt(c)
  3445  		v.AddArg2(x, y)
  3446  		return true
  3447  	}
  3448  	return false
  3449  }
  3450  func rewriteValueARM_OpARMCMNshiftRA(v *Value) bool {
  3451  	v_1 := v.Args[1]
  3452  	v_0 := v.Args[0]
  3453  	b := v.Block
  3454  	// match: (CMNshiftRA (MOVWconst [c]) x [d])
  3455  	// result: (CMNconst [c] (SRAconst <x.Type> x [d]))
  3456  	for {
  3457  		d := auxIntToInt32(v.AuxInt)
  3458  		if v_0.Op != OpARMMOVWconst {
  3459  			break
  3460  		}
  3461  		c := auxIntToInt32(v_0.AuxInt)
  3462  		x := v_1
  3463  		v.reset(OpARMCMNconst)
  3464  		v.AuxInt = int32ToAuxInt(c)
  3465  		v0 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
  3466  		v0.AuxInt = int32ToAuxInt(d)
  3467  		v0.AddArg(x)
  3468  		v.AddArg(v0)
  3469  		return true
  3470  	}
  3471  	// match: (CMNshiftRA x (MOVWconst [c]) [d])
  3472  	// result: (CMNconst x [c>>uint64(d)])
  3473  	for {
  3474  		d := auxIntToInt32(v.AuxInt)
  3475  		x := v_0
  3476  		if v_1.Op != OpARMMOVWconst {
  3477  			break
  3478  		}
  3479  		c := auxIntToInt32(v_1.AuxInt)
  3480  		v.reset(OpARMCMNconst)
  3481  		v.AuxInt = int32ToAuxInt(c >> uint64(d))
  3482  		v.AddArg(x)
  3483  		return true
  3484  	}
  3485  	return false
  3486  }
  3487  func rewriteValueARM_OpARMCMNshiftRAreg(v *Value) bool {
  3488  	v_2 := v.Args[2]
  3489  	v_1 := v.Args[1]
  3490  	v_0 := v.Args[0]
  3491  	b := v.Block
  3492  	// match: (CMNshiftRAreg (MOVWconst [c]) x y)
  3493  	// result: (CMNconst [c] (SRA <x.Type> x y))
  3494  	for {
  3495  		if v_0.Op != OpARMMOVWconst {
  3496  			break
  3497  		}
  3498  		c := auxIntToInt32(v_0.AuxInt)
  3499  		x := v_1
  3500  		y := v_2
  3501  		v.reset(OpARMCMNconst)
  3502  		v.AuxInt = int32ToAuxInt(c)
  3503  		v0 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
  3504  		v0.AddArg2(x, y)
  3505  		v.AddArg(v0)
  3506  		return true
  3507  	}
  3508  	// match: (CMNshiftRAreg x y (MOVWconst [c]))
  3509  	// result: (CMNshiftRA x y [c])
  3510  	for {
  3511  		x := v_0
  3512  		y := v_1
  3513  		if v_2.Op != OpARMMOVWconst {
  3514  			break
  3515  		}
  3516  		c := auxIntToInt32(v_2.AuxInt)
  3517  		v.reset(OpARMCMNshiftRA)
  3518  		v.AuxInt = int32ToAuxInt(c)
  3519  		v.AddArg2(x, y)
  3520  		return true
  3521  	}
  3522  	return false
  3523  }
  3524  func rewriteValueARM_OpARMCMNshiftRL(v *Value) bool {
  3525  	v_1 := v.Args[1]
  3526  	v_0 := v.Args[0]
  3527  	b := v.Block
  3528  	// match: (CMNshiftRL (MOVWconst [c]) x [d])
  3529  	// result: (CMNconst [c] (SRLconst <x.Type> x [d]))
  3530  	for {
  3531  		d := auxIntToInt32(v.AuxInt)
  3532  		if v_0.Op != OpARMMOVWconst {
  3533  			break
  3534  		}
  3535  		c := auxIntToInt32(v_0.AuxInt)
  3536  		x := v_1
  3537  		v.reset(OpARMCMNconst)
  3538  		v.AuxInt = int32ToAuxInt(c)
  3539  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
  3540  		v0.AuxInt = int32ToAuxInt(d)
  3541  		v0.AddArg(x)
  3542  		v.AddArg(v0)
  3543  		return true
  3544  	}
  3545  	// match: (CMNshiftRL x (MOVWconst [c]) [d])
  3546  	// result: (CMNconst x [int32(uint32(c)>>uint64(d))])
  3547  	for {
  3548  		d := auxIntToInt32(v.AuxInt)
  3549  		x := v_0
  3550  		if v_1.Op != OpARMMOVWconst {
  3551  			break
  3552  		}
  3553  		c := auxIntToInt32(v_1.AuxInt)
  3554  		v.reset(OpARMCMNconst)
  3555  		v.AuxInt = int32ToAuxInt(int32(uint32(c) >> uint64(d)))
  3556  		v.AddArg(x)
  3557  		return true
  3558  	}
  3559  	return false
  3560  }
  3561  func rewriteValueARM_OpARMCMNshiftRLreg(v *Value) bool {
  3562  	v_2 := v.Args[2]
  3563  	v_1 := v.Args[1]
  3564  	v_0 := v.Args[0]
  3565  	b := v.Block
  3566  	// match: (CMNshiftRLreg (MOVWconst [c]) x y)
  3567  	// result: (CMNconst [c] (SRL <x.Type> x y))
  3568  	for {
  3569  		if v_0.Op != OpARMMOVWconst {
  3570  			break
  3571  		}
  3572  		c := auxIntToInt32(v_0.AuxInt)
  3573  		x := v_1
  3574  		y := v_2
  3575  		v.reset(OpARMCMNconst)
  3576  		v.AuxInt = int32ToAuxInt(c)
  3577  		v0 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
  3578  		v0.AddArg2(x, y)
  3579  		v.AddArg(v0)
  3580  		return true
  3581  	}
  3582  	// match: (CMNshiftRLreg x y (MOVWconst [c]))
  3583  	// result: (CMNshiftRL x y [c])
  3584  	for {
  3585  		x := v_0
  3586  		y := v_1
  3587  		if v_2.Op != OpARMMOVWconst {
  3588  			break
  3589  		}
  3590  		c := auxIntToInt32(v_2.AuxInt)
  3591  		v.reset(OpARMCMNshiftRL)
  3592  		v.AuxInt = int32ToAuxInt(c)
  3593  		v.AddArg2(x, y)
  3594  		return true
  3595  	}
  3596  	return false
  3597  }
  3598  func rewriteValueARM_OpARMCMOVWHSconst(v *Value) bool {
  3599  	v_1 := v.Args[1]
  3600  	v_0 := v.Args[0]
  3601  	// match: (CMOVWHSconst _ (FlagConstant [fc]) [c])
  3602  	// cond: fc.uge()
  3603  	// result: (MOVWconst [c])
  3604  	for {
  3605  		c := auxIntToInt32(v.AuxInt)
  3606  		if v_1.Op != OpARMFlagConstant {
  3607  			break
  3608  		}
  3609  		fc := auxIntToFlagConstant(v_1.AuxInt)
  3610  		if !(fc.uge()) {
  3611  			break
  3612  		}
  3613  		v.reset(OpARMMOVWconst)
  3614  		v.AuxInt = int32ToAuxInt(c)
  3615  		return true
  3616  	}
  3617  	// match: (CMOVWHSconst x (FlagConstant [fc]) [c])
  3618  	// cond: fc.ult()
  3619  	// result: x
  3620  	for {
  3621  		x := v_0
  3622  		if v_1.Op != OpARMFlagConstant {
  3623  			break
  3624  		}
  3625  		fc := auxIntToFlagConstant(v_1.AuxInt)
  3626  		if !(fc.ult()) {
  3627  			break
  3628  		}
  3629  		v.copyOf(x)
  3630  		return true
  3631  	}
  3632  	// match: (CMOVWHSconst x (InvertFlags flags) [c])
  3633  	// result: (CMOVWLSconst x flags [c])
  3634  	for {
  3635  		c := auxIntToInt32(v.AuxInt)
  3636  		x := v_0
  3637  		if v_1.Op != OpARMInvertFlags {
  3638  			break
  3639  		}
  3640  		flags := v_1.Args[0]
  3641  		v.reset(OpARMCMOVWLSconst)
  3642  		v.AuxInt = int32ToAuxInt(c)
  3643  		v.AddArg2(x, flags)
  3644  		return true
  3645  	}
  3646  	return false
  3647  }
  3648  func rewriteValueARM_OpARMCMOVWLSconst(v *Value) bool {
  3649  	v_1 := v.Args[1]
  3650  	v_0 := v.Args[0]
  3651  	// match: (CMOVWLSconst _ (FlagConstant [fc]) [c])
  3652  	// cond: fc.ule()
  3653  	// result: (MOVWconst [c])
  3654  	for {
  3655  		c := auxIntToInt32(v.AuxInt)
  3656  		if v_1.Op != OpARMFlagConstant {
  3657  			break
  3658  		}
  3659  		fc := auxIntToFlagConstant(v_1.AuxInt)
  3660  		if !(fc.ule()) {
  3661  			break
  3662  		}
  3663  		v.reset(OpARMMOVWconst)
  3664  		v.AuxInt = int32ToAuxInt(c)
  3665  		return true
  3666  	}
  3667  	// match: (CMOVWLSconst x (FlagConstant [fc]) [c])
  3668  	// cond: fc.ugt()
  3669  	// result: x
  3670  	for {
  3671  		x := v_0
  3672  		if v_1.Op != OpARMFlagConstant {
  3673  			break
  3674  		}
  3675  		fc := auxIntToFlagConstant(v_1.AuxInt)
  3676  		if !(fc.ugt()) {
  3677  			break
  3678  		}
  3679  		v.copyOf(x)
  3680  		return true
  3681  	}
  3682  	// match: (CMOVWLSconst x (InvertFlags flags) [c])
  3683  	// result: (CMOVWHSconst x flags [c])
  3684  	for {
  3685  		c := auxIntToInt32(v.AuxInt)
  3686  		x := v_0
  3687  		if v_1.Op != OpARMInvertFlags {
  3688  			break
  3689  		}
  3690  		flags := v_1.Args[0]
  3691  		v.reset(OpARMCMOVWHSconst)
  3692  		v.AuxInt = int32ToAuxInt(c)
  3693  		v.AddArg2(x, flags)
  3694  		return true
  3695  	}
  3696  	return false
  3697  }
  3698  func rewriteValueARM_OpARMCMP(v *Value) bool {
  3699  	v_1 := v.Args[1]
  3700  	v_0 := v.Args[0]
  3701  	b := v.Block
  3702  	// match: (CMP x (MOVWconst [c]))
  3703  	// result: (CMPconst [c] x)
  3704  	for {
  3705  		x := v_0
  3706  		if v_1.Op != OpARMMOVWconst {
  3707  			break
  3708  		}
  3709  		c := auxIntToInt32(v_1.AuxInt)
  3710  		v.reset(OpARMCMPconst)
  3711  		v.AuxInt = int32ToAuxInt(c)
  3712  		v.AddArg(x)
  3713  		return true
  3714  	}
  3715  	// match: (CMP (MOVWconst [c]) x)
  3716  	// result: (InvertFlags (CMPconst [c] x))
  3717  	for {
  3718  		if v_0.Op != OpARMMOVWconst {
  3719  			break
  3720  		}
  3721  		c := auxIntToInt32(v_0.AuxInt)
  3722  		x := v_1
  3723  		v.reset(OpARMInvertFlags)
  3724  		v0 := b.NewValue0(v.Pos, OpARMCMPconst, types.TypeFlags)
  3725  		v0.AuxInt = int32ToAuxInt(c)
  3726  		v0.AddArg(x)
  3727  		v.AddArg(v0)
  3728  		return true
  3729  	}
  3730  	// match: (CMP x y)
  3731  	// cond: x.ID > y.ID
  3732  	// result: (InvertFlags (CMP y x))
  3733  	for {
  3734  		x := v_0
  3735  		y := v_1
  3736  		if !(x.ID > y.ID) {
  3737  			break
  3738  		}
  3739  		v.reset(OpARMInvertFlags)
  3740  		v0 := b.NewValue0(v.Pos, OpARMCMP, types.TypeFlags)
  3741  		v0.AddArg2(y, x)
  3742  		v.AddArg(v0)
  3743  		return true
  3744  	}
  3745  	// match: (CMP x (SLLconst [c] y))
  3746  	// result: (CMPshiftLL x y [c])
  3747  	for {
  3748  		x := v_0
  3749  		if v_1.Op != OpARMSLLconst {
  3750  			break
  3751  		}
  3752  		c := auxIntToInt32(v_1.AuxInt)
  3753  		y := v_1.Args[0]
  3754  		v.reset(OpARMCMPshiftLL)
  3755  		v.AuxInt = int32ToAuxInt(c)
  3756  		v.AddArg2(x, y)
  3757  		return true
  3758  	}
  3759  	// match: (CMP (SLLconst [c] y) x)
  3760  	// result: (InvertFlags (CMPshiftLL x y [c]))
  3761  	for {
  3762  		if v_0.Op != OpARMSLLconst {
  3763  			break
  3764  		}
  3765  		c := auxIntToInt32(v_0.AuxInt)
  3766  		y := v_0.Args[0]
  3767  		x := v_1
  3768  		v.reset(OpARMInvertFlags)
  3769  		v0 := b.NewValue0(v.Pos, OpARMCMPshiftLL, types.TypeFlags)
  3770  		v0.AuxInt = int32ToAuxInt(c)
  3771  		v0.AddArg2(x, y)
  3772  		v.AddArg(v0)
  3773  		return true
  3774  	}
  3775  	// match: (CMP x (SRLconst [c] y))
  3776  	// result: (CMPshiftRL x y [c])
  3777  	for {
  3778  		x := v_0
  3779  		if v_1.Op != OpARMSRLconst {
  3780  			break
  3781  		}
  3782  		c := auxIntToInt32(v_1.AuxInt)
  3783  		y := v_1.Args[0]
  3784  		v.reset(OpARMCMPshiftRL)
  3785  		v.AuxInt = int32ToAuxInt(c)
  3786  		v.AddArg2(x, y)
  3787  		return true
  3788  	}
  3789  	// match: (CMP (SRLconst [c] y) x)
  3790  	// result: (InvertFlags (CMPshiftRL x y [c]))
  3791  	for {
  3792  		if v_0.Op != OpARMSRLconst {
  3793  			break
  3794  		}
  3795  		c := auxIntToInt32(v_0.AuxInt)
  3796  		y := v_0.Args[0]
  3797  		x := v_1
  3798  		v.reset(OpARMInvertFlags)
  3799  		v0 := b.NewValue0(v.Pos, OpARMCMPshiftRL, types.TypeFlags)
  3800  		v0.AuxInt = int32ToAuxInt(c)
  3801  		v0.AddArg2(x, y)
  3802  		v.AddArg(v0)
  3803  		return true
  3804  	}
  3805  	// match: (CMP x (SRAconst [c] y))
  3806  	// result: (CMPshiftRA x y [c])
  3807  	for {
  3808  		x := v_0
  3809  		if v_1.Op != OpARMSRAconst {
  3810  			break
  3811  		}
  3812  		c := auxIntToInt32(v_1.AuxInt)
  3813  		y := v_1.Args[0]
  3814  		v.reset(OpARMCMPshiftRA)
  3815  		v.AuxInt = int32ToAuxInt(c)
  3816  		v.AddArg2(x, y)
  3817  		return true
  3818  	}
  3819  	// match: (CMP (SRAconst [c] y) x)
  3820  	// result: (InvertFlags (CMPshiftRA x y [c]))
  3821  	for {
  3822  		if v_0.Op != OpARMSRAconst {
  3823  			break
  3824  		}
  3825  		c := auxIntToInt32(v_0.AuxInt)
  3826  		y := v_0.Args[0]
  3827  		x := v_1
  3828  		v.reset(OpARMInvertFlags)
  3829  		v0 := b.NewValue0(v.Pos, OpARMCMPshiftRA, types.TypeFlags)
  3830  		v0.AuxInt = int32ToAuxInt(c)
  3831  		v0.AddArg2(x, y)
  3832  		v.AddArg(v0)
  3833  		return true
  3834  	}
  3835  	// match: (CMP x (SLL y z))
  3836  	// result: (CMPshiftLLreg x y z)
  3837  	for {
  3838  		x := v_0
  3839  		if v_1.Op != OpARMSLL {
  3840  			break
  3841  		}
  3842  		z := v_1.Args[1]
  3843  		y := v_1.Args[0]
  3844  		v.reset(OpARMCMPshiftLLreg)
  3845  		v.AddArg3(x, y, z)
  3846  		return true
  3847  	}
  3848  	// match: (CMP (SLL y z) x)
  3849  	// result: (InvertFlags (CMPshiftLLreg x y z))
  3850  	for {
  3851  		if v_0.Op != OpARMSLL {
  3852  			break
  3853  		}
  3854  		z := v_0.Args[1]
  3855  		y := v_0.Args[0]
  3856  		x := v_1
  3857  		v.reset(OpARMInvertFlags)
  3858  		v0 := b.NewValue0(v.Pos, OpARMCMPshiftLLreg, types.TypeFlags)
  3859  		v0.AddArg3(x, y, z)
  3860  		v.AddArg(v0)
  3861  		return true
  3862  	}
  3863  	// match: (CMP x (SRL y z))
  3864  	// result: (CMPshiftRLreg x y z)
  3865  	for {
  3866  		x := v_0
  3867  		if v_1.Op != OpARMSRL {
  3868  			break
  3869  		}
  3870  		z := v_1.Args[1]
  3871  		y := v_1.Args[0]
  3872  		v.reset(OpARMCMPshiftRLreg)
  3873  		v.AddArg3(x, y, z)
  3874  		return true
  3875  	}
  3876  	// match: (CMP (SRL y z) x)
  3877  	// result: (InvertFlags (CMPshiftRLreg x y z))
  3878  	for {
  3879  		if v_0.Op != OpARMSRL {
  3880  			break
  3881  		}
  3882  		z := v_0.Args[1]
  3883  		y := v_0.Args[0]
  3884  		x := v_1
  3885  		v.reset(OpARMInvertFlags)
  3886  		v0 := b.NewValue0(v.Pos, OpARMCMPshiftRLreg, types.TypeFlags)
  3887  		v0.AddArg3(x, y, z)
  3888  		v.AddArg(v0)
  3889  		return true
  3890  	}
  3891  	// match: (CMP x (SRA y z))
  3892  	// result: (CMPshiftRAreg x y z)
  3893  	for {
  3894  		x := v_0
  3895  		if v_1.Op != OpARMSRA {
  3896  			break
  3897  		}
  3898  		z := v_1.Args[1]
  3899  		y := v_1.Args[0]
  3900  		v.reset(OpARMCMPshiftRAreg)
  3901  		v.AddArg3(x, y, z)
  3902  		return true
  3903  	}
  3904  	// match: (CMP (SRA y z) x)
  3905  	// result: (InvertFlags (CMPshiftRAreg x y z))
  3906  	for {
  3907  		if v_0.Op != OpARMSRA {
  3908  			break
  3909  		}
  3910  		z := v_0.Args[1]
  3911  		y := v_0.Args[0]
  3912  		x := v_1
  3913  		v.reset(OpARMInvertFlags)
  3914  		v0 := b.NewValue0(v.Pos, OpARMCMPshiftRAreg, types.TypeFlags)
  3915  		v0.AddArg3(x, y, z)
  3916  		v.AddArg(v0)
  3917  		return true
  3918  	}
  3919  	return false
  3920  }
  3921  func rewriteValueARM_OpARMCMPD(v *Value) bool {
  3922  	v_1 := v.Args[1]
  3923  	v_0 := v.Args[0]
  3924  	// match: (CMPD x (MOVDconst [0]))
  3925  	// result: (CMPD0 x)
  3926  	for {
  3927  		x := v_0
  3928  		if v_1.Op != OpARMMOVDconst || auxIntToFloat64(v_1.AuxInt) != 0 {
  3929  			break
  3930  		}
  3931  		v.reset(OpARMCMPD0)
  3932  		v.AddArg(x)
  3933  		return true
  3934  	}
  3935  	return false
  3936  }
  3937  func rewriteValueARM_OpARMCMPF(v *Value) bool {
  3938  	v_1 := v.Args[1]
  3939  	v_0 := v.Args[0]
  3940  	// match: (CMPF x (MOVFconst [0]))
  3941  	// result: (CMPF0 x)
  3942  	for {
  3943  		x := v_0
  3944  		if v_1.Op != OpARMMOVFconst || auxIntToFloat64(v_1.AuxInt) != 0 {
  3945  			break
  3946  		}
  3947  		v.reset(OpARMCMPF0)
  3948  		v.AddArg(x)
  3949  		return true
  3950  	}
  3951  	return false
  3952  }
  3953  func rewriteValueARM_OpARMCMPconst(v *Value) bool {
  3954  	v_0 := v.Args[0]
  3955  	// match: (CMPconst (MOVWconst [x]) [y])
  3956  	// result: (FlagConstant [subFlags32(x,y)])
  3957  	for {
  3958  		y := auxIntToInt32(v.AuxInt)
  3959  		if v_0.Op != OpARMMOVWconst {
  3960  			break
  3961  		}
  3962  		x := auxIntToInt32(v_0.AuxInt)
  3963  		v.reset(OpARMFlagConstant)
  3964  		v.AuxInt = flagConstantToAuxInt(subFlags32(x, y))
  3965  		return true
  3966  	}
  3967  	// match: (CMPconst (MOVBUreg _) [c])
  3968  	// cond: 0xff < c
  3969  	// result: (FlagConstant [subFlags32(0, 1)])
  3970  	for {
  3971  		c := auxIntToInt32(v.AuxInt)
  3972  		if v_0.Op != OpARMMOVBUreg || !(0xff < c) {
  3973  			break
  3974  		}
  3975  		v.reset(OpARMFlagConstant)
  3976  		v.AuxInt = flagConstantToAuxInt(subFlags32(0, 1))
  3977  		return true
  3978  	}
  3979  	// match: (CMPconst (MOVHUreg _) [c])
  3980  	// cond: 0xffff < c
  3981  	// result: (FlagConstant [subFlags32(0, 1)])
  3982  	for {
  3983  		c := auxIntToInt32(v.AuxInt)
  3984  		if v_0.Op != OpARMMOVHUreg || !(0xffff < c) {
  3985  			break
  3986  		}
  3987  		v.reset(OpARMFlagConstant)
  3988  		v.AuxInt = flagConstantToAuxInt(subFlags32(0, 1))
  3989  		return true
  3990  	}
  3991  	// match: (CMPconst (ANDconst _ [m]) [n])
  3992  	// cond: 0 <= m && m < n
  3993  	// result: (FlagConstant [subFlags32(0, 1)])
  3994  	for {
  3995  		n := auxIntToInt32(v.AuxInt)
  3996  		if v_0.Op != OpARMANDconst {
  3997  			break
  3998  		}
  3999  		m := auxIntToInt32(v_0.AuxInt)
  4000  		if !(0 <= m && m < n) {
  4001  			break
  4002  		}
  4003  		v.reset(OpARMFlagConstant)
  4004  		v.AuxInt = flagConstantToAuxInt(subFlags32(0, 1))
  4005  		return true
  4006  	}
  4007  	// match: (CMPconst (SRLconst _ [c]) [n])
  4008  	// cond: 0 <= n && 0 < c && c <= 32 && (1<<uint32(32-c)) <= uint32(n)
  4009  	// result: (FlagConstant [subFlags32(0, 1)])
  4010  	for {
  4011  		n := auxIntToInt32(v.AuxInt)
  4012  		if v_0.Op != OpARMSRLconst {
  4013  			break
  4014  		}
  4015  		c := auxIntToInt32(v_0.AuxInt)
  4016  		if !(0 <= n && 0 < c && c <= 32 && (1<<uint32(32-c)) <= uint32(n)) {
  4017  			break
  4018  		}
  4019  		v.reset(OpARMFlagConstant)
  4020  		v.AuxInt = flagConstantToAuxInt(subFlags32(0, 1))
  4021  		return true
  4022  	}
  4023  	return false
  4024  }
  4025  func rewriteValueARM_OpARMCMPshiftLL(v *Value) bool {
  4026  	v_1 := v.Args[1]
  4027  	v_0 := v.Args[0]
  4028  	b := v.Block
  4029  	// match: (CMPshiftLL (MOVWconst [c]) x [d])
  4030  	// result: (InvertFlags (CMPconst [c] (SLLconst <x.Type> x [d])))
  4031  	for {
  4032  		d := auxIntToInt32(v.AuxInt)
  4033  		if v_0.Op != OpARMMOVWconst {
  4034  			break
  4035  		}
  4036  		c := auxIntToInt32(v_0.AuxInt)
  4037  		x := v_1
  4038  		v.reset(OpARMInvertFlags)
  4039  		v0 := b.NewValue0(v.Pos, OpARMCMPconst, types.TypeFlags)
  4040  		v0.AuxInt = int32ToAuxInt(c)
  4041  		v1 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  4042  		v1.AuxInt = int32ToAuxInt(d)
  4043  		v1.AddArg(x)
  4044  		v0.AddArg(v1)
  4045  		v.AddArg(v0)
  4046  		return true
  4047  	}
  4048  	// match: (CMPshiftLL x (MOVWconst [c]) [d])
  4049  	// result: (CMPconst x [c<<uint64(d)])
  4050  	for {
  4051  		d := auxIntToInt32(v.AuxInt)
  4052  		x := v_0
  4053  		if v_1.Op != OpARMMOVWconst {
  4054  			break
  4055  		}
  4056  		c := auxIntToInt32(v_1.AuxInt)
  4057  		v.reset(OpARMCMPconst)
  4058  		v.AuxInt = int32ToAuxInt(c << uint64(d))
  4059  		v.AddArg(x)
  4060  		return true
  4061  	}
  4062  	return false
  4063  }
  4064  func rewriteValueARM_OpARMCMPshiftLLreg(v *Value) bool {
  4065  	v_2 := v.Args[2]
  4066  	v_1 := v.Args[1]
  4067  	v_0 := v.Args[0]
  4068  	b := v.Block
  4069  	// match: (CMPshiftLLreg (MOVWconst [c]) x y)
  4070  	// result: (InvertFlags (CMPconst [c] (SLL <x.Type> x y)))
  4071  	for {
  4072  		if v_0.Op != OpARMMOVWconst {
  4073  			break
  4074  		}
  4075  		c := auxIntToInt32(v_0.AuxInt)
  4076  		x := v_1
  4077  		y := v_2
  4078  		v.reset(OpARMInvertFlags)
  4079  		v0 := b.NewValue0(v.Pos, OpARMCMPconst, types.TypeFlags)
  4080  		v0.AuxInt = int32ToAuxInt(c)
  4081  		v1 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
  4082  		v1.AddArg2(x, y)
  4083  		v0.AddArg(v1)
  4084  		v.AddArg(v0)
  4085  		return true
  4086  	}
  4087  	// match: (CMPshiftLLreg x y (MOVWconst [c]))
  4088  	// result: (CMPshiftLL x y [c])
  4089  	for {
  4090  		x := v_0
  4091  		y := v_1
  4092  		if v_2.Op != OpARMMOVWconst {
  4093  			break
  4094  		}
  4095  		c := auxIntToInt32(v_2.AuxInt)
  4096  		v.reset(OpARMCMPshiftLL)
  4097  		v.AuxInt = int32ToAuxInt(c)
  4098  		v.AddArg2(x, y)
  4099  		return true
  4100  	}
  4101  	return false
  4102  }
  4103  func rewriteValueARM_OpARMCMPshiftRA(v *Value) bool {
  4104  	v_1 := v.Args[1]
  4105  	v_0 := v.Args[0]
  4106  	b := v.Block
  4107  	// match: (CMPshiftRA (MOVWconst [c]) x [d])
  4108  	// result: (InvertFlags (CMPconst [c] (SRAconst <x.Type> x [d])))
  4109  	for {
  4110  		d := auxIntToInt32(v.AuxInt)
  4111  		if v_0.Op != OpARMMOVWconst {
  4112  			break
  4113  		}
  4114  		c := auxIntToInt32(v_0.AuxInt)
  4115  		x := v_1
  4116  		v.reset(OpARMInvertFlags)
  4117  		v0 := b.NewValue0(v.Pos, OpARMCMPconst, types.TypeFlags)
  4118  		v0.AuxInt = int32ToAuxInt(c)
  4119  		v1 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
  4120  		v1.AuxInt = int32ToAuxInt(d)
  4121  		v1.AddArg(x)
  4122  		v0.AddArg(v1)
  4123  		v.AddArg(v0)
  4124  		return true
  4125  	}
  4126  	// match: (CMPshiftRA x (MOVWconst [c]) [d])
  4127  	// result: (CMPconst x [c>>uint64(d)])
  4128  	for {
  4129  		d := auxIntToInt32(v.AuxInt)
  4130  		x := v_0
  4131  		if v_1.Op != OpARMMOVWconst {
  4132  			break
  4133  		}
  4134  		c := auxIntToInt32(v_1.AuxInt)
  4135  		v.reset(OpARMCMPconst)
  4136  		v.AuxInt = int32ToAuxInt(c >> uint64(d))
  4137  		v.AddArg(x)
  4138  		return true
  4139  	}
  4140  	return false
  4141  }
  4142  func rewriteValueARM_OpARMCMPshiftRAreg(v *Value) bool {
  4143  	v_2 := v.Args[2]
  4144  	v_1 := v.Args[1]
  4145  	v_0 := v.Args[0]
  4146  	b := v.Block
  4147  	// match: (CMPshiftRAreg (MOVWconst [c]) x y)
  4148  	// result: (InvertFlags (CMPconst [c] (SRA <x.Type> x y)))
  4149  	for {
  4150  		if v_0.Op != OpARMMOVWconst {
  4151  			break
  4152  		}
  4153  		c := auxIntToInt32(v_0.AuxInt)
  4154  		x := v_1
  4155  		y := v_2
  4156  		v.reset(OpARMInvertFlags)
  4157  		v0 := b.NewValue0(v.Pos, OpARMCMPconst, types.TypeFlags)
  4158  		v0.AuxInt = int32ToAuxInt(c)
  4159  		v1 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
  4160  		v1.AddArg2(x, y)
  4161  		v0.AddArg(v1)
  4162  		v.AddArg(v0)
  4163  		return true
  4164  	}
  4165  	// match: (CMPshiftRAreg x y (MOVWconst [c]))
  4166  	// result: (CMPshiftRA x y [c])
  4167  	for {
  4168  		x := v_0
  4169  		y := v_1
  4170  		if v_2.Op != OpARMMOVWconst {
  4171  			break
  4172  		}
  4173  		c := auxIntToInt32(v_2.AuxInt)
  4174  		v.reset(OpARMCMPshiftRA)
  4175  		v.AuxInt = int32ToAuxInt(c)
  4176  		v.AddArg2(x, y)
  4177  		return true
  4178  	}
  4179  	return false
  4180  }
  4181  func rewriteValueARM_OpARMCMPshiftRL(v *Value) bool {
  4182  	v_1 := v.Args[1]
  4183  	v_0 := v.Args[0]
  4184  	b := v.Block
  4185  	// match: (CMPshiftRL (MOVWconst [c]) x [d])
  4186  	// result: (InvertFlags (CMPconst [c] (SRLconst <x.Type> x [d])))
  4187  	for {
  4188  		d := auxIntToInt32(v.AuxInt)
  4189  		if v_0.Op != OpARMMOVWconst {
  4190  			break
  4191  		}
  4192  		c := auxIntToInt32(v_0.AuxInt)
  4193  		x := v_1
  4194  		v.reset(OpARMInvertFlags)
  4195  		v0 := b.NewValue0(v.Pos, OpARMCMPconst, types.TypeFlags)
  4196  		v0.AuxInt = int32ToAuxInt(c)
  4197  		v1 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
  4198  		v1.AuxInt = int32ToAuxInt(d)
  4199  		v1.AddArg(x)
  4200  		v0.AddArg(v1)
  4201  		v.AddArg(v0)
  4202  		return true
  4203  	}
  4204  	// match: (CMPshiftRL x (MOVWconst [c]) [d])
  4205  	// result: (CMPconst x [int32(uint32(c)>>uint64(d))])
  4206  	for {
  4207  		d := auxIntToInt32(v.AuxInt)
  4208  		x := v_0
  4209  		if v_1.Op != OpARMMOVWconst {
  4210  			break
  4211  		}
  4212  		c := auxIntToInt32(v_1.AuxInt)
  4213  		v.reset(OpARMCMPconst)
  4214  		v.AuxInt = int32ToAuxInt(int32(uint32(c) >> uint64(d)))
  4215  		v.AddArg(x)
  4216  		return true
  4217  	}
  4218  	return false
  4219  }
  4220  func rewriteValueARM_OpARMCMPshiftRLreg(v *Value) bool {
  4221  	v_2 := v.Args[2]
  4222  	v_1 := v.Args[1]
  4223  	v_0 := v.Args[0]
  4224  	b := v.Block
  4225  	// match: (CMPshiftRLreg (MOVWconst [c]) x y)
  4226  	// result: (InvertFlags (CMPconst [c] (SRL <x.Type> x y)))
  4227  	for {
  4228  		if v_0.Op != OpARMMOVWconst {
  4229  			break
  4230  		}
  4231  		c := auxIntToInt32(v_0.AuxInt)
  4232  		x := v_1
  4233  		y := v_2
  4234  		v.reset(OpARMInvertFlags)
  4235  		v0 := b.NewValue0(v.Pos, OpARMCMPconst, types.TypeFlags)
  4236  		v0.AuxInt = int32ToAuxInt(c)
  4237  		v1 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
  4238  		v1.AddArg2(x, y)
  4239  		v0.AddArg(v1)
  4240  		v.AddArg(v0)
  4241  		return true
  4242  	}
  4243  	// match: (CMPshiftRLreg x y (MOVWconst [c]))
  4244  	// result: (CMPshiftRL x y [c])
  4245  	for {
  4246  		x := v_0
  4247  		y := v_1
  4248  		if v_2.Op != OpARMMOVWconst {
  4249  			break
  4250  		}
  4251  		c := auxIntToInt32(v_2.AuxInt)
  4252  		v.reset(OpARMCMPshiftRL)
  4253  		v.AuxInt = int32ToAuxInt(c)
  4254  		v.AddArg2(x, y)
  4255  		return true
  4256  	}
  4257  	return false
  4258  }
  4259  func rewriteValueARM_OpARMEqual(v *Value) bool {
  4260  	v_0 := v.Args[0]
  4261  	// match: (Equal (FlagConstant [fc]))
  4262  	// result: (MOVWconst [b2i32(fc.eq())])
  4263  	for {
  4264  		if v_0.Op != OpARMFlagConstant {
  4265  			break
  4266  		}
  4267  		fc := auxIntToFlagConstant(v_0.AuxInt)
  4268  		v.reset(OpARMMOVWconst)
  4269  		v.AuxInt = int32ToAuxInt(b2i32(fc.eq()))
  4270  		return true
  4271  	}
  4272  	// match: (Equal (InvertFlags x))
  4273  	// result: (Equal x)
  4274  	for {
  4275  		if v_0.Op != OpARMInvertFlags {
  4276  			break
  4277  		}
  4278  		x := v_0.Args[0]
  4279  		v.reset(OpARMEqual)
  4280  		v.AddArg(x)
  4281  		return true
  4282  	}
  4283  	return false
  4284  }
  4285  func rewriteValueARM_OpARMGreaterEqual(v *Value) bool {
  4286  	v_0 := v.Args[0]
  4287  	// match: (GreaterEqual (FlagConstant [fc]))
  4288  	// result: (MOVWconst [b2i32(fc.ge())])
  4289  	for {
  4290  		if v_0.Op != OpARMFlagConstant {
  4291  			break
  4292  		}
  4293  		fc := auxIntToFlagConstant(v_0.AuxInt)
  4294  		v.reset(OpARMMOVWconst)
  4295  		v.AuxInt = int32ToAuxInt(b2i32(fc.ge()))
  4296  		return true
  4297  	}
  4298  	// match: (GreaterEqual (InvertFlags x))
  4299  	// result: (LessEqual x)
  4300  	for {
  4301  		if v_0.Op != OpARMInvertFlags {
  4302  			break
  4303  		}
  4304  		x := v_0.Args[0]
  4305  		v.reset(OpARMLessEqual)
  4306  		v.AddArg(x)
  4307  		return true
  4308  	}
  4309  	return false
  4310  }
  4311  func rewriteValueARM_OpARMGreaterEqualU(v *Value) bool {
  4312  	v_0 := v.Args[0]
  4313  	// match: (GreaterEqualU (FlagConstant [fc]))
  4314  	// result: (MOVWconst [b2i32(fc.uge())])
  4315  	for {
  4316  		if v_0.Op != OpARMFlagConstant {
  4317  			break
  4318  		}
  4319  		fc := auxIntToFlagConstant(v_0.AuxInt)
  4320  		v.reset(OpARMMOVWconst)
  4321  		v.AuxInt = int32ToAuxInt(b2i32(fc.uge()))
  4322  		return true
  4323  	}
  4324  	// match: (GreaterEqualU (InvertFlags x))
  4325  	// result: (LessEqualU x)
  4326  	for {
  4327  		if v_0.Op != OpARMInvertFlags {
  4328  			break
  4329  		}
  4330  		x := v_0.Args[0]
  4331  		v.reset(OpARMLessEqualU)
  4332  		v.AddArg(x)
  4333  		return true
  4334  	}
  4335  	return false
  4336  }
  4337  func rewriteValueARM_OpARMGreaterThan(v *Value) bool {
  4338  	v_0 := v.Args[0]
  4339  	// match: (GreaterThan (FlagConstant [fc]))
  4340  	// result: (MOVWconst [b2i32(fc.gt())])
  4341  	for {
  4342  		if v_0.Op != OpARMFlagConstant {
  4343  			break
  4344  		}
  4345  		fc := auxIntToFlagConstant(v_0.AuxInt)
  4346  		v.reset(OpARMMOVWconst)
  4347  		v.AuxInt = int32ToAuxInt(b2i32(fc.gt()))
  4348  		return true
  4349  	}
  4350  	// match: (GreaterThan (InvertFlags x))
  4351  	// result: (LessThan x)
  4352  	for {
  4353  		if v_0.Op != OpARMInvertFlags {
  4354  			break
  4355  		}
  4356  		x := v_0.Args[0]
  4357  		v.reset(OpARMLessThan)
  4358  		v.AddArg(x)
  4359  		return true
  4360  	}
  4361  	return false
  4362  }
  4363  func rewriteValueARM_OpARMGreaterThanU(v *Value) bool {
  4364  	v_0 := v.Args[0]
  4365  	// match: (GreaterThanU (FlagConstant [fc]))
  4366  	// result: (MOVWconst [b2i32(fc.ugt())])
  4367  	for {
  4368  		if v_0.Op != OpARMFlagConstant {
  4369  			break
  4370  		}
  4371  		fc := auxIntToFlagConstant(v_0.AuxInt)
  4372  		v.reset(OpARMMOVWconst)
  4373  		v.AuxInt = int32ToAuxInt(b2i32(fc.ugt()))
  4374  		return true
  4375  	}
  4376  	// match: (GreaterThanU (InvertFlags x))
  4377  	// result: (LessThanU x)
  4378  	for {
  4379  		if v_0.Op != OpARMInvertFlags {
  4380  			break
  4381  		}
  4382  		x := v_0.Args[0]
  4383  		v.reset(OpARMLessThanU)
  4384  		v.AddArg(x)
  4385  		return true
  4386  	}
  4387  	return false
  4388  }
  4389  func rewriteValueARM_OpARMLessEqual(v *Value) bool {
  4390  	v_0 := v.Args[0]
  4391  	// match: (LessEqual (FlagConstant [fc]))
  4392  	// result: (MOVWconst [b2i32(fc.le())])
  4393  	for {
  4394  		if v_0.Op != OpARMFlagConstant {
  4395  			break
  4396  		}
  4397  		fc := auxIntToFlagConstant(v_0.AuxInt)
  4398  		v.reset(OpARMMOVWconst)
  4399  		v.AuxInt = int32ToAuxInt(b2i32(fc.le()))
  4400  		return true
  4401  	}
  4402  	// match: (LessEqual (InvertFlags x))
  4403  	// result: (GreaterEqual x)
  4404  	for {
  4405  		if v_0.Op != OpARMInvertFlags {
  4406  			break
  4407  		}
  4408  		x := v_0.Args[0]
  4409  		v.reset(OpARMGreaterEqual)
  4410  		v.AddArg(x)
  4411  		return true
  4412  	}
  4413  	return false
  4414  }
  4415  func rewriteValueARM_OpARMLessEqualU(v *Value) bool {
  4416  	v_0 := v.Args[0]
  4417  	// match: (LessEqualU (FlagConstant [fc]))
  4418  	// result: (MOVWconst [b2i32(fc.ule())])
  4419  	for {
  4420  		if v_0.Op != OpARMFlagConstant {
  4421  			break
  4422  		}
  4423  		fc := auxIntToFlagConstant(v_0.AuxInt)
  4424  		v.reset(OpARMMOVWconst)
  4425  		v.AuxInt = int32ToAuxInt(b2i32(fc.ule()))
  4426  		return true
  4427  	}
  4428  	// match: (LessEqualU (InvertFlags x))
  4429  	// result: (GreaterEqualU x)
  4430  	for {
  4431  		if v_0.Op != OpARMInvertFlags {
  4432  			break
  4433  		}
  4434  		x := v_0.Args[0]
  4435  		v.reset(OpARMGreaterEqualU)
  4436  		v.AddArg(x)
  4437  		return true
  4438  	}
  4439  	return false
  4440  }
  4441  func rewriteValueARM_OpARMLessThan(v *Value) bool {
  4442  	v_0 := v.Args[0]
  4443  	// match: (LessThan (FlagConstant [fc]))
  4444  	// result: (MOVWconst [b2i32(fc.lt())])
  4445  	for {
  4446  		if v_0.Op != OpARMFlagConstant {
  4447  			break
  4448  		}
  4449  		fc := auxIntToFlagConstant(v_0.AuxInt)
  4450  		v.reset(OpARMMOVWconst)
  4451  		v.AuxInt = int32ToAuxInt(b2i32(fc.lt()))
  4452  		return true
  4453  	}
  4454  	// match: (LessThan (InvertFlags x))
  4455  	// result: (GreaterThan x)
  4456  	for {
  4457  		if v_0.Op != OpARMInvertFlags {
  4458  			break
  4459  		}
  4460  		x := v_0.Args[0]
  4461  		v.reset(OpARMGreaterThan)
  4462  		v.AddArg(x)
  4463  		return true
  4464  	}
  4465  	return false
  4466  }
  4467  func rewriteValueARM_OpARMLessThanU(v *Value) bool {
  4468  	v_0 := v.Args[0]
  4469  	// match: (LessThanU (FlagConstant [fc]))
  4470  	// result: (MOVWconst [b2i32(fc.ult())])
  4471  	for {
  4472  		if v_0.Op != OpARMFlagConstant {
  4473  			break
  4474  		}
  4475  		fc := auxIntToFlagConstant(v_0.AuxInt)
  4476  		v.reset(OpARMMOVWconst)
  4477  		v.AuxInt = int32ToAuxInt(b2i32(fc.ult()))
  4478  		return true
  4479  	}
  4480  	// match: (LessThanU (InvertFlags x))
  4481  	// result: (GreaterThanU x)
  4482  	for {
  4483  		if v_0.Op != OpARMInvertFlags {
  4484  			break
  4485  		}
  4486  		x := v_0.Args[0]
  4487  		v.reset(OpARMGreaterThanU)
  4488  		v.AddArg(x)
  4489  		return true
  4490  	}
  4491  	return false
  4492  }
  4493  func rewriteValueARM_OpARMMOVBUload(v *Value) bool {
  4494  	v_1 := v.Args[1]
  4495  	v_0 := v.Args[0]
  4496  	// match: (MOVBUload [off1] {sym} (ADDconst [off2] ptr) mem)
  4497  	// result: (MOVBUload [off1+off2] {sym} ptr mem)
  4498  	for {
  4499  		off1 := auxIntToInt32(v.AuxInt)
  4500  		sym := auxToSym(v.Aux)
  4501  		if v_0.Op != OpARMADDconst {
  4502  			break
  4503  		}
  4504  		off2 := auxIntToInt32(v_0.AuxInt)
  4505  		ptr := v_0.Args[0]
  4506  		mem := v_1
  4507  		v.reset(OpARMMOVBUload)
  4508  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4509  		v.Aux = symToAux(sym)
  4510  		v.AddArg2(ptr, mem)
  4511  		return true
  4512  	}
  4513  	// match: (MOVBUload [off1] {sym} (SUBconst [off2] ptr) mem)
  4514  	// result: (MOVBUload [off1-off2] {sym} ptr mem)
  4515  	for {
  4516  		off1 := auxIntToInt32(v.AuxInt)
  4517  		sym := auxToSym(v.Aux)
  4518  		if v_0.Op != OpARMSUBconst {
  4519  			break
  4520  		}
  4521  		off2 := auxIntToInt32(v_0.AuxInt)
  4522  		ptr := v_0.Args[0]
  4523  		mem := v_1
  4524  		v.reset(OpARMMOVBUload)
  4525  		v.AuxInt = int32ToAuxInt(off1 - off2)
  4526  		v.Aux = symToAux(sym)
  4527  		v.AddArg2(ptr, mem)
  4528  		return true
  4529  	}
  4530  	// match: (MOVBUload [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) mem)
  4531  	// cond: canMergeSym(sym1,sym2)
  4532  	// result: (MOVBUload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  4533  	for {
  4534  		off1 := auxIntToInt32(v.AuxInt)
  4535  		sym1 := auxToSym(v.Aux)
  4536  		if v_0.Op != OpARMMOVWaddr {
  4537  			break
  4538  		}
  4539  		off2 := auxIntToInt32(v_0.AuxInt)
  4540  		sym2 := auxToSym(v_0.Aux)
  4541  		ptr := v_0.Args[0]
  4542  		mem := v_1
  4543  		if !(canMergeSym(sym1, sym2)) {
  4544  			break
  4545  		}
  4546  		v.reset(OpARMMOVBUload)
  4547  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4548  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4549  		v.AddArg2(ptr, mem)
  4550  		return true
  4551  	}
  4552  	// match: (MOVBUload [off] {sym} ptr (MOVBstore [off2] {sym2} ptr2 x _))
  4553  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  4554  	// result: (MOVBUreg x)
  4555  	for {
  4556  		off := auxIntToInt32(v.AuxInt)
  4557  		sym := auxToSym(v.Aux)
  4558  		ptr := v_0
  4559  		if v_1.Op != OpARMMOVBstore {
  4560  			break
  4561  		}
  4562  		off2 := auxIntToInt32(v_1.AuxInt)
  4563  		sym2 := auxToSym(v_1.Aux)
  4564  		x := v_1.Args[1]
  4565  		ptr2 := v_1.Args[0]
  4566  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  4567  			break
  4568  		}
  4569  		v.reset(OpARMMOVBUreg)
  4570  		v.AddArg(x)
  4571  		return true
  4572  	}
  4573  	// match: (MOVBUload [0] {sym} (ADD ptr idx) mem)
  4574  	// cond: sym == nil
  4575  	// result: (MOVBUloadidx ptr idx mem)
  4576  	for {
  4577  		if auxIntToInt32(v.AuxInt) != 0 {
  4578  			break
  4579  		}
  4580  		sym := auxToSym(v.Aux)
  4581  		if v_0.Op != OpARMADD {
  4582  			break
  4583  		}
  4584  		idx := v_0.Args[1]
  4585  		ptr := v_0.Args[0]
  4586  		mem := v_1
  4587  		if !(sym == nil) {
  4588  			break
  4589  		}
  4590  		v.reset(OpARMMOVBUloadidx)
  4591  		v.AddArg3(ptr, idx, mem)
  4592  		return true
  4593  	}
  4594  	// match: (MOVBUload [off] {sym} (SB) _)
  4595  	// cond: symIsRO(sym)
  4596  	// result: (MOVWconst [int32(read8(sym, int64(off)))])
  4597  	for {
  4598  		off := auxIntToInt32(v.AuxInt)
  4599  		sym := auxToSym(v.Aux)
  4600  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  4601  			break
  4602  		}
  4603  		v.reset(OpARMMOVWconst)
  4604  		v.AuxInt = int32ToAuxInt(int32(read8(sym, int64(off))))
  4605  		return true
  4606  	}
  4607  	return false
  4608  }
  4609  func rewriteValueARM_OpARMMOVBUloadidx(v *Value) bool {
  4610  	v_2 := v.Args[2]
  4611  	v_1 := v.Args[1]
  4612  	v_0 := v.Args[0]
  4613  	// match: (MOVBUloadidx ptr idx (MOVBstoreidx ptr2 idx x _))
  4614  	// cond: isSamePtr(ptr, ptr2)
  4615  	// result: (MOVBUreg x)
  4616  	for {
  4617  		ptr := v_0
  4618  		idx := v_1
  4619  		if v_2.Op != OpARMMOVBstoreidx {
  4620  			break
  4621  		}
  4622  		x := v_2.Args[2]
  4623  		ptr2 := v_2.Args[0]
  4624  		if idx != v_2.Args[1] || !(isSamePtr(ptr, ptr2)) {
  4625  			break
  4626  		}
  4627  		v.reset(OpARMMOVBUreg)
  4628  		v.AddArg(x)
  4629  		return true
  4630  	}
  4631  	// match: (MOVBUloadidx ptr (MOVWconst [c]) mem)
  4632  	// result: (MOVBUload [c] ptr mem)
  4633  	for {
  4634  		ptr := v_0
  4635  		if v_1.Op != OpARMMOVWconst {
  4636  			break
  4637  		}
  4638  		c := auxIntToInt32(v_1.AuxInt)
  4639  		mem := v_2
  4640  		v.reset(OpARMMOVBUload)
  4641  		v.AuxInt = int32ToAuxInt(c)
  4642  		v.AddArg2(ptr, mem)
  4643  		return true
  4644  	}
  4645  	// match: (MOVBUloadidx (MOVWconst [c]) ptr mem)
  4646  	// result: (MOVBUload [c] ptr mem)
  4647  	for {
  4648  		if v_0.Op != OpARMMOVWconst {
  4649  			break
  4650  		}
  4651  		c := auxIntToInt32(v_0.AuxInt)
  4652  		ptr := v_1
  4653  		mem := v_2
  4654  		v.reset(OpARMMOVBUload)
  4655  		v.AuxInt = int32ToAuxInt(c)
  4656  		v.AddArg2(ptr, mem)
  4657  		return true
  4658  	}
  4659  	return false
  4660  }
  4661  func rewriteValueARM_OpARMMOVBUreg(v *Value) bool {
  4662  	v_0 := v.Args[0]
  4663  	// match: (MOVBUreg x:(MOVBUload _ _))
  4664  	// result: (MOVWreg x)
  4665  	for {
  4666  		x := v_0
  4667  		if x.Op != OpARMMOVBUload {
  4668  			break
  4669  		}
  4670  		v.reset(OpARMMOVWreg)
  4671  		v.AddArg(x)
  4672  		return true
  4673  	}
  4674  	// match: (MOVBUreg (ANDconst [c] x))
  4675  	// result: (ANDconst [c&0xff] x)
  4676  	for {
  4677  		if v_0.Op != OpARMANDconst {
  4678  			break
  4679  		}
  4680  		c := auxIntToInt32(v_0.AuxInt)
  4681  		x := v_0.Args[0]
  4682  		v.reset(OpARMANDconst)
  4683  		v.AuxInt = int32ToAuxInt(c & 0xff)
  4684  		v.AddArg(x)
  4685  		return true
  4686  	}
  4687  	// match: (MOVBUreg x:(MOVBUreg _))
  4688  	// result: (MOVWreg x)
  4689  	for {
  4690  		x := v_0
  4691  		if x.Op != OpARMMOVBUreg {
  4692  			break
  4693  		}
  4694  		v.reset(OpARMMOVWreg)
  4695  		v.AddArg(x)
  4696  		return true
  4697  	}
  4698  	// match: (MOVBUreg (MOVWconst [c]))
  4699  	// result: (MOVWconst [int32(uint8(c))])
  4700  	for {
  4701  		if v_0.Op != OpARMMOVWconst {
  4702  			break
  4703  		}
  4704  		c := auxIntToInt32(v_0.AuxInt)
  4705  		v.reset(OpARMMOVWconst)
  4706  		v.AuxInt = int32ToAuxInt(int32(uint8(c)))
  4707  		return true
  4708  	}
  4709  	return false
  4710  }
  4711  func rewriteValueARM_OpARMMOVBload(v *Value) bool {
  4712  	v_1 := v.Args[1]
  4713  	v_0 := v.Args[0]
  4714  	// match: (MOVBload [off1] {sym} (ADDconst [off2] ptr) mem)
  4715  	// result: (MOVBload [off1+off2] {sym} ptr mem)
  4716  	for {
  4717  		off1 := auxIntToInt32(v.AuxInt)
  4718  		sym := auxToSym(v.Aux)
  4719  		if v_0.Op != OpARMADDconst {
  4720  			break
  4721  		}
  4722  		off2 := auxIntToInt32(v_0.AuxInt)
  4723  		ptr := v_0.Args[0]
  4724  		mem := v_1
  4725  		v.reset(OpARMMOVBload)
  4726  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4727  		v.Aux = symToAux(sym)
  4728  		v.AddArg2(ptr, mem)
  4729  		return true
  4730  	}
  4731  	// match: (MOVBload [off1] {sym} (SUBconst [off2] ptr) mem)
  4732  	// result: (MOVBload [off1-off2] {sym} ptr mem)
  4733  	for {
  4734  		off1 := auxIntToInt32(v.AuxInt)
  4735  		sym := auxToSym(v.Aux)
  4736  		if v_0.Op != OpARMSUBconst {
  4737  			break
  4738  		}
  4739  		off2 := auxIntToInt32(v_0.AuxInt)
  4740  		ptr := v_0.Args[0]
  4741  		mem := v_1
  4742  		v.reset(OpARMMOVBload)
  4743  		v.AuxInt = int32ToAuxInt(off1 - off2)
  4744  		v.Aux = symToAux(sym)
  4745  		v.AddArg2(ptr, mem)
  4746  		return true
  4747  	}
  4748  	// match: (MOVBload [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) mem)
  4749  	// cond: canMergeSym(sym1,sym2)
  4750  	// result: (MOVBload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  4751  	for {
  4752  		off1 := auxIntToInt32(v.AuxInt)
  4753  		sym1 := auxToSym(v.Aux)
  4754  		if v_0.Op != OpARMMOVWaddr {
  4755  			break
  4756  		}
  4757  		off2 := auxIntToInt32(v_0.AuxInt)
  4758  		sym2 := auxToSym(v_0.Aux)
  4759  		ptr := v_0.Args[0]
  4760  		mem := v_1
  4761  		if !(canMergeSym(sym1, sym2)) {
  4762  			break
  4763  		}
  4764  		v.reset(OpARMMOVBload)
  4765  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4766  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4767  		v.AddArg2(ptr, mem)
  4768  		return true
  4769  	}
  4770  	// match: (MOVBload [off] {sym} ptr (MOVBstore [off2] {sym2} ptr2 x _))
  4771  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  4772  	// result: (MOVBreg x)
  4773  	for {
  4774  		off := auxIntToInt32(v.AuxInt)
  4775  		sym := auxToSym(v.Aux)
  4776  		ptr := v_0
  4777  		if v_1.Op != OpARMMOVBstore {
  4778  			break
  4779  		}
  4780  		off2 := auxIntToInt32(v_1.AuxInt)
  4781  		sym2 := auxToSym(v_1.Aux)
  4782  		x := v_1.Args[1]
  4783  		ptr2 := v_1.Args[0]
  4784  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  4785  			break
  4786  		}
  4787  		v.reset(OpARMMOVBreg)
  4788  		v.AddArg(x)
  4789  		return true
  4790  	}
  4791  	// match: (MOVBload [0] {sym} (ADD ptr idx) mem)
  4792  	// cond: sym == nil
  4793  	// result: (MOVBloadidx ptr idx mem)
  4794  	for {
  4795  		if auxIntToInt32(v.AuxInt) != 0 {
  4796  			break
  4797  		}
  4798  		sym := auxToSym(v.Aux)
  4799  		if v_0.Op != OpARMADD {
  4800  			break
  4801  		}
  4802  		idx := v_0.Args[1]
  4803  		ptr := v_0.Args[0]
  4804  		mem := v_1
  4805  		if !(sym == nil) {
  4806  			break
  4807  		}
  4808  		v.reset(OpARMMOVBloadidx)
  4809  		v.AddArg3(ptr, idx, mem)
  4810  		return true
  4811  	}
  4812  	return false
  4813  }
  4814  func rewriteValueARM_OpARMMOVBloadidx(v *Value) bool {
  4815  	v_2 := v.Args[2]
  4816  	v_1 := v.Args[1]
  4817  	v_0 := v.Args[0]
  4818  	// match: (MOVBloadidx ptr idx (MOVBstoreidx ptr2 idx x _))
  4819  	// cond: isSamePtr(ptr, ptr2)
  4820  	// result: (MOVBreg x)
  4821  	for {
  4822  		ptr := v_0
  4823  		idx := v_1
  4824  		if v_2.Op != OpARMMOVBstoreidx {
  4825  			break
  4826  		}
  4827  		x := v_2.Args[2]
  4828  		ptr2 := v_2.Args[0]
  4829  		if idx != v_2.Args[1] || !(isSamePtr(ptr, ptr2)) {
  4830  			break
  4831  		}
  4832  		v.reset(OpARMMOVBreg)
  4833  		v.AddArg(x)
  4834  		return true
  4835  	}
  4836  	// match: (MOVBloadidx ptr (MOVWconst [c]) mem)
  4837  	// result: (MOVBload [c] ptr mem)
  4838  	for {
  4839  		ptr := v_0
  4840  		if v_1.Op != OpARMMOVWconst {
  4841  			break
  4842  		}
  4843  		c := auxIntToInt32(v_1.AuxInt)
  4844  		mem := v_2
  4845  		v.reset(OpARMMOVBload)
  4846  		v.AuxInt = int32ToAuxInt(c)
  4847  		v.AddArg2(ptr, mem)
  4848  		return true
  4849  	}
  4850  	// match: (MOVBloadidx (MOVWconst [c]) ptr mem)
  4851  	// result: (MOVBload [c] ptr mem)
  4852  	for {
  4853  		if v_0.Op != OpARMMOVWconst {
  4854  			break
  4855  		}
  4856  		c := auxIntToInt32(v_0.AuxInt)
  4857  		ptr := v_1
  4858  		mem := v_2
  4859  		v.reset(OpARMMOVBload)
  4860  		v.AuxInt = int32ToAuxInt(c)
  4861  		v.AddArg2(ptr, mem)
  4862  		return true
  4863  	}
  4864  	return false
  4865  }
  4866  func rewriteValueARM_OpARMMOVBreg(v *Value) bool {
  4867  	v_0 := v.Args[0]
  4868  	// match: (MOVBreg x:(MOVBload _ _))
  4869  	// result: (MOVWreg x)
  4870  	for {
  4871  		x := v_0
  4872  		if x.Op != OpARMMOVBload {
  4873  			break
  4874  		}
  4875  		v.reset(OpARMMOVWreg)
  4876  		v.AddArg(x)
  4877  		return true
  4878  	}
  4879  	// match: (MOVBreg (ANDconst [c] x))
  4880  	// cond: c & 0x80 == 0
  4881  	// result: (ANDconst [c&0x7f] x)
  4882  	for {
  4883  		if v_0.Op != OpARMANDconst {
  4884  			break
  4885  		}
  4886  		c := auxIntToInt32(v_0.AuxInt)
  4887  		x := v_0.Args[0]
  4888  		if !(c&0x80 == 0) {
  4889  			break
  4890  		}
  4891  		v.reset(OpARMANDconst)
  4892  		v.AuxInt = int32ToAuxInt(c & 0x7f)
  4893  		v.AddArg(x)
  4894  		return true
  4895  	}
  4896  	// match: (MOVBreg x:(MOVBreg _))
  4897  	// result: (MOVWreg x)
  4898  	for {
  4899  		x := v_0
  4900  		if x.Op != OpARMMOVBreg {
  4901  			break
  4902  		}
  4903  		v.reset(OpARMMOVWreg)
  4904  		v.AddArg(x)
  4905  		return true
  4906  	}
  4907  	// match: (MOVBreg (MOVWconst [c]))
  4908  	// result: (MOVWconst [int32(int8(c))])
  4909  	for {
  4910  		if v_0.Op != OpARMMOVWconst {
  4911  			break
  4912  		}
  4913  		c := auxIntToInt32(v_0.AuxInt)
  4914  		v.reset(OpARMMOVWconst)
  4915  		v.AuxInt = int32ToAuxInt(int32(int8(c)))
  4916  		return true
  4917  	}
  4918  	return false
  4919  }
  4920  func rewriteValueARM_OpARMMOVBstore(v *Value) bool {
  4921  	v_2 := v.Args[2]
  4922  	v_1 := v.Args[1]
  4923  	v_0 := v.Args[0]
  4924  	// match: (MOVBstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  4925  	// result: (MOVBstore [off1+off2] {sym} ptr val mem)
  4926  	for {
  4927  		off1 := auxIntToInt32(v.AuxInt)
  4928  		sym := auxToSym(v.Aux)
  4929  		if v_0.Op != OpARMADDconst {
  4930  			break
  4931  		}
  4932  		off2 := auxIntToInt32(v_0.AuxInt)
  4933  		ptr := v_0.Args[0]
  4934  		val := v_1
  4935  		mem := v_2
  4936  		v.reset(OpARMMOVBstore)
  4937  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4938  		v.Aux = symToAux(sym)
  4939  		v.AddArg3(ptr, val, mem)
  4940  		return true
  4941  	}
  4942  	// match: (MOVBstore [off1] {sym} (SUBconst [off2] ptr) val mem)
  4943  	// result: (MOVBstore [off1-off2] {sym} ptr val mem)
  4944  	for {
  4945  		off1 := auxIntToInt32(v.AuxInt)
  4946  		sym := auxToSym(v.Aux)
  4947  		if v_0.Op != OpARMSUBconst {
  4948  			break
  4949  		}
  4950  		off2 := auxIntToInt32(v_0.AuxInt)
  4951  		ptr := v_0.Args[0]
  4952  		val := v_1
  4953  		mem := v_2
  4954  		v.reset(OpARMMOVBstore)
  4955  		v.AuxInt = int32ToAuxInt(off1 - off2)
  4956  		v.Aux = symToAux(sym)
  4957  		v.AddArg3(ptr, val, mem)
  4958  		return true
  4959  	}
  4960  	// match: (MOVBstore [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) val mem)
  4961  	// cond: canMergeSym(sym1,sym2)
  4962  	// result: (MOVBstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  4963  	for {
  4964  		off1 := auxIntToInt32(v.AuxInt)
  4965  		sym1 := auxToSym(v.Aux)
  4966  		if v_0.Op != OpARMMOVWaddr {
  4967  			break
  4968  		}
  4969  		off2 := auxIntToInt32(v_0.AuxInt)
  4970  		sym2 := auxToSym(v_0.Aux)
  4971  		ptr := v_0.Args[0]
  4972  		val := v_1
  4973  		mem := v_2
  4974  		if !(canMergeSym(sym1, sym2)) {
  4975  			break
  4976  		}
  4977  		v.reset(OpARMMOVBstore)
  4978  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4979  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4980  		v.AddArg3(ptr, val, mem)
  4981  		return true
  4982  	}
  4983  	// match: (MOVBstore [off] {sym} ptr (MOVBreg x) mem)
  4984  	// result: (MOVBstore [off] {sym} ptr x mem)
  4985  	for {
  4986  		off := auxIntToInt32(v.AuxInt)
  4987  		sym := auxToSym(v.Aux)
  4988  		ptr := v_0
  4989  		if v_1.Op != OpARMMOVBreg {
  4990  			break
  4991  		}
  4992  		x := v_1.Args[0]
  4993  		mem := v_2
  4994  		v.reset(OpARMMOVBstore)
  4995  		v.AuxInt = int32ToAuxInt(off)
  4996  		v.Aux = symToAux(sym)
  4997  		v.AddArg3(ptr, x, mem)
  4998  		return true
  4999  	}
  5000  	// match: (MOVBstore [off] {sym} ptr (MOVBUreg x) mem)
  5001  	// result: (MOVBstore [off] {sym} ptr x mem)
  5002  	for {
  5003  		off := auxIntToInt32(v.AuxInt)
  5004  		sym := auxToSym(v.Aux)
  5005  		ptr := v_0
  5006  		if v_1.Op != OpARMMOVBUreg {
  5007  			break
  5008  		}
  5009  		x := v_1.Args[0]
  5010  		mem := v_2
  5011  		v.reset(OpARMMOVBstore)
  5012  		v.AuxInt = int32ToAuxInt(off)
  5013  		v.Aux = symToAux(sym)
  5014  		v.AddArg3(ptr, x, mem)
  5015  		return true
  5016  	}
  5017  	// match: (MOVBstore [off] {sym} ptr (MOVHreg x) mem)
  5018  	// result: (MOVBstore [off] {sym} ptr x mem)
  5019  	for {
  5020  		off := auxIntToInt32(v.AuxInt)
  5021  		sym := auxToSym(v.Aux)
  5022  		ptr := v_0
  5023  		if v_1.Op != OpARMMOVHreg {
  5024  			break
  5025  		}
  5026  		x := v_1.Args[0]
  5027  		mem := v_2
  5028  		v.reset(OpARMMOVBstore)
  5029  		v.AuxInt = int32ToAuxInt(off)
  5030  		v.Aux = symToAux(sym)
  5031  		v.AddArg3(ptr, x, mem)
  5032  		return true
  5033  	}
  5034  	// match: (MOVBstore [off] {sym} ptr (MOVHUreg x) mem)
  5035  	// result: (MOVBstore [off] {sym} ptr x mem)
  5036  	for {
  5037  		off := auxIntToInt32(v.AuxInt)
  5038  		sym := auxToSym(v.Aux)
  5039  		ptr := v_0
  5040  		if v_1.Op != OpARMMOVHUreg {
  5041  			break
  5042  		}
  5043  		x := v_1.Args[0]
  5044  		mem := v_2
  5045  		v.reset(OpARMMOVBstore)
  5046  		v.AuxInt = int32ToAuxInt(off)
  5047  		v.Aux = symToAux(sym)
  5048  		v.AddArg3(ptr, x, mem)
  5049  		return true
  5050  	}
  5051  	// match: (MOVBstore [0] {sym} (ADD ptr idx) val mem)
  5052  	// cond: sym == nil
  5053  	// result: (MOVBstoreidx ptr idx val mem)
  5054  	for {
  5055  		if auxIntToInt32(v.AuxInt) != 0 {
  5056  			break
  5057  		}
  5058  		sym := auxToSym(v.Aux)
  5059  		if v_0.Op != OpARMADD {
  5060  			break
  5061  		}
  5062  		idx := v_0.Args[1]
  5063  		ptr := v_0.Args[0]
  5064  		val := v_1
  5065  		mem := v_2
  5066  		if !(sym == nil) {
  5067  			break
  5068  		}
  5069  		v.reset(OpARMMOVBstoreidx)
  5070  		v.AddArg4(ptr, idx, val, mem)
  5071  		return true
  5072  	}
  5073  	return false
  5074  }
  5075  func rewriteValueARM_OpARMMOVBstoreidx(v *Value) bool {
  5076  	v_3 := v.Args[3]
  5077  	v_2 := v.Args[2]
  5078  	v_1 := v.Args[1]
  5079  	v_0 := v.Args[0]
  5080  	// match: (MOVBstoreidx ptr (MOVWconst [c]) val mem)
  5081  	// result: (MOVBstore [c] ptr val mem)
  5082  	for {
  5083  		ptr := v_0
  5084  		if v_1.Op != OpARMMOVWconst {
  5085  			break
  5086  		}
  5087  		c := auxIntToInt32(v_1.AuxInt)
  5088  		val := v_2
  5089  		mem := v_3
  5090  		v.reset(OpARMMOVBstore)
  5091  		v.AuxInt = int32ToAuxInt(c)
  5092  		v.AddArg3(ptr, val, mem)
  5093  		return true
  5094  	}
  5095  	// match: (MOVBstoreidx (MOVWconst [c]) ptr val mem)
  5096  	// result: (MOVBstore [c] ptr val mem)
  5097  	for {
  5098  		if v_0.Op != OpARMMOVWconst {
  5099  			break
  5100  		}
  5101  		c := auxIntToInt32(v_0.AuxInt)
  5102  		ptr := v_1
  5103  		val := v_2
  5104  		mem := v_3
  5105  		v.reset(OpARMMOVBstore)
  5106  		v.AuxInt = int32ToAuxInt(c)
  5107  		v.AddArg3(ptr, val, mem)
  5108  		return true
  5109  	}
  5110  	return false
  5111  }
  5112  func rewriteValueARM_OpARMMOVDload(v *Value) bool {
  5113  	v_1 := v.Args[1]
  5114  	v_0 := v.Args[0]
  5115  	// match: (MOVDload [off1] {sym} (ADDconst [off2] ptr) mem)
  5116  	// result: (MOVDload [off1+off2] {sym} ptr mem)
  5117  	for {
  5118  		off1 := auxIntToInt32(v.AuxInt)
  5119  		sym := auxToSym(v.Aux)
  5120  		if v_0.Op != OpARMADDconst {
  5121  			break
  5122  		}
  5123  		off2 := auxIntToInt32(v_0.AuxInt)
  5124  		ptr := v_0.Args[0]
  5125  		mem := v_1
  5126  		v.reset(OpARMMOVDload)
  5127  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5128  		v.Aux = symToAux(sym)
  5129  		v.AddArg2(ptr, mem)
  5130  		return true
  5131  	}
  5132  	// match: (MOVDload [off1] {sym} (SUBconst [off2] ptr) mem)
  5133  	// result: (MOVDload [off1-off2] {sym} ptr mem)
  5134  	for {
  5135  		off1 := auxIntToInt32(v.AuxInt)
  5136  		sym := auxToSym(v.Aux)
  5137  		if v_0.Op != OpARMSUBconst {
  5138  			break
  5139  		}
  5140  		off2 := auxIntToInt32(v_0.AuxInt)
  5141  		ptr := v_0.Args[0]
  5142  		mem := v_1
  5143  		v.reset(OpARMMOVDload)
  5144  		v.AuxInt = int32ToAuxInt(off1 - off2)
  5145  		v.Aux = symToAux(sym)
  5146  		v.AddArg2(ptr, mem)
  5147  		return true
  5148  	}
  5149  	// match: (MOVDload [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) mem)
  5150  	// cond: canMergeSym(sym1,sym2)
  5151  	// result: (MOVDload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  5152  	for {
  5153  		off1 := auxIntToInt32(v.AuxInt)
  5154  		sym1 := auxToSym(v.Aux)
  5155  		if v_0.Op != OpARMMOVWaddr {
  5156  			break
  5157  		}
  5158  		off2 := auxIntToInt32(v_0.AuxInt)
  5159  		sym2 := auxToSym(v_0.Aux)
  5160  		ptr := v_0.Args[0]
  5161  		mem := v_1
  5162  		if !(canMergeSym(sym1, sym2)) {
  5163  			break
  5164  		}
  5165  		v.reset(OpARMMOVDload)
  5166  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5167  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5168  		v.AddArg2(ptr, mem)
  5169  		return true
  5170  	}
  5171  	// match: (MOVDload [off] {sym} ptr (MOVDstore [off2] {sym2} ptr2 x _))
  5172  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  5173  	// result: x
  5174  	for {
  5175  		off := auxIntToInt32(v.AuxInt)
  5176  		sym := auxToSym(v.Aux)
  5177  		ptr := v_0
  5178  		if v_1.Op != OpARMMOVDstore {
  5179  			break
  5180  		}
  5181  		off2 := auxIntToInt32(v_1.AuxInt)
  5182  		sym2 := auxToSym(v_1.Aux)
  5183  		x := v_1.Args[1]
  5184  		ptr2 := v_1.Args[0]
  5185  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  5186  			break
  5187  		}
  5188  		v.copyOf(x)
  5189  		return true
  5190  	}
  5191  	return false
  5192  }
  5193  func rewriteValueARM_OpARMMOVDstore(v *Value) bool {
  5194  	v_2 := v.Args[2]
  5195  	v_1 := v.Args[1]
  5196  	v_0 := v.Args[0]
  5197  	// match: (MOVDstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  5198  	// result: (MOVDstore [off1+off2] {sym} ptr val mem)
  5199  	for {
  5200  		off1 := auxIntToInt32(v.AuxInt)
  5201  		sym := auxToSym(v.Aux)
  5202  		if v_0.Op != OpARMADDconst {
  5203  			break
  5204  		}
  5205  		off2 := auxIntToInt32(v_0.AuxInt)
  5206  		ptr := v_0.Args[0]
  5207  		val := v_1
  5208  		mem := v_2
  5209  		v.reset(OpARMMOVDstore)
  5210  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5211  		v.Aux = symToAux(sym)
  5212  		v.AddArg3(ptr, val, mem)
  5213  		return true
  5214  	}
  5215  	// match: (MOVDstore [off1] {sym} (SUBconst [off2] ptr) val mem)
  5216  	// result: (MOVDstore [off1-off2] {sym} ptr val mem)
  5217  	for {
  5218  		off1 := auxIntToInt32(v.AuxInt)
  5219  		sym := auxToSym(v.Aux)
  5220  		if v_0.Op != OpARMSUBconst {
  5221  			break
  5222  		}
  5223  		off2 := auxIntToInt32(v_0.AuxInt)
  5224  		ptr := v_0.Args[0]
  5225  		val := v_1
  5226  		mem := v_2
  5227  		v.reset(OpARMMOVDstore)
  5228  		v.AuxInt = int32ToAuxInt(off1 - off2)
  5229  		v.Aux = symToAux(sym)
  5230  		v.AddArg3(ptr, val, mem)
  5231  		return true
  5232  	}
  5233  	// match: (MOVDstore [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) val mem)
  5234  	// cond: canMergeSym(sym1,sym2)
  5235  	// result: (MOVDstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  5236  	for {
  5237  		off1 := auxIntToInt32(v.AuxInt)
  5238  		sym1 := auxToSym(v.Aux)
  5239  		if v_0.Op != OpARMMOVWaddr {
  5240  			break
  5241  		}
  5242  		off2 := auxIntToInt32(v_0.AuxInt)
  5243  		sym2 := auxToSym(v_0.Aux)
  5244  		ptr := v_0.Args[0]
  5245  		val := v_1
  5246  		mem := v_2
  5247  		if !(canMergeSym(sym1, sym2)) {
  5248  			break
  5249  		}
  5250  		v.reset(OpARMMOVDstore)
  5251  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5252  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5253  		v.AddArg3(ptr, val, mem)
  5254  		return true
  5255  	}
  5256  	return false
  5257  }
  5258  func rewriteValueARM_OpARMMOVFload(v *Value) bool {
  5259  	v_1 := v.Args[1]
  5260  	v_0 := v.Args[0]
  5261  	// match: (MOVFload [off1] {sym} (ADDconst [off2] ptr) mem)
  5262  	// result: (MOVFload [off1+off2] {sym} ptr mem)
  5263  	for {
  5264  		off1 := auxIntToInt32(v.AuxInt)
  5265  		sym := auxToSym(v.Aux)
  5266  		if v_0.Op != OpARMADDconst {
  5267  			break
  5268  		}
  5269  		off2 := auxIntToInt32(v_0.AuxInt)
  5270  		ptr := v_0.Args[0]
  5271  		mem := v_1
  5272  		v.reset(OpARMMOVFload)
  5273  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5274  		v.Aux = symToAux(sym)
  5275  		v.AddArg2(ptr, mem)
  5276  		return true
  5277  	}
  5278  	// match: (MOVFload [off1] {sym} (SUBconst [off2] ptr) mem)
  5279  	// result: (MOVFload [off1-off2] {sym} ptr mem)
  5280  	for {
  5281  		off1 := auxIntToInt32(v.AuxInt)
  5282  		sym := auxToSym(v.Aux)
  5283  		if v_0.Op != OpARMSUBconst {
  5284  			break
  5285  		}
  5286  		off2 := auxIntToInt32(v_0.AuxInt)
  5287  		ptr := v_0.Args[0]
  5288  		mem := v_1
  5289  		v.reset(OpARMMOVFload)
  5290  		v.AuxInt = int32ToAuxInt(off1 - off2)
  5291  		v.Aux = symToAux(sym)
  5292  		v.AddArg2(ptr, mem)
  5293  		return true
  5294  	}
  5295  	// match: (MOVFload [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) mem)
  5296  	// cond: canMergeSym(sym1,sym2)
  5297  	// result: (MOVFload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  5298  	for {
  5299  		off1 := auxIntToInt32(v.AuxInt)
  5300  		sym1 := auxToSym(v.Aux)
  5301  		if v_0.Op != OpARMMOVWaddr {
  5302  			break
  5303  		}
  5304  		off2 := auxIntToInt32(v_0.AuxInt)
  5305  		sym2 := auxToSym(v_0.Aux)
  5306  		ptr := v_0.Args[0]
  5307  		mem := v_1
  5308  		if !(canMergeSym(sym1, sym2)) {
  5309  			break
  5310  		}
  5311  		v.reset(OpARMMOVFload)
  5312  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5313  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5314  		v.AddArg2(ptr, mem)
  5315  		return true
  5316  	}
  5317  	// match: (MOVFload [off] {sym} ptr (MOVFstore [off2] {sym2} ptr2 x _))
  5318  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  5319  	// result: x
  5320  	for {
  5321  		off := auxIntToInt32(v.AuxInt)
  5322  		sym := auxToSym(v.Aux)
  5323  		ptr := v_0
  5324  		if v_1.Op != OpARMMOVFstore {
  5325  			break
  5326  		}
  5327  		off2 := auxIntToInt32(v_1.AuxInt)
  5328  		sym2 := auxToSym(v_1.Aux)
  5329  		x := v_1.Args[1]
  5330  		ptr2 := v_1.Args[0]
  5331  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  5332  			break
  5333  		}
  5334  		v.copyOf(x)
  5335  		return true
  5336  	}
  5337  	return false
  5338  }
  5339  func rewriteValueARM_OpARMMOVFstore(v *Value) bool {
  5340  	v_2 := v.Args[2]
  5341  	v_1 := v.Args[1]
  5342  	v_0 := v.Args[0]
  5343  	// match: (MOVFstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  5344  	// result: (MOVFstore [off1+off2] {sym} ptr val mem)
  5345  	for {
  5346  		off1 := auxIntToInt32(v.AuxInt)
  5347  		sym := auxToSym(v.Aux)
  5348  		if v_0.Op != OpARMADDconst {
  5349  			break
  5350  		}
  5351  		off2 := auxIntToInt32(v_0.AuxInt)
  5352  		ptr := v_0.Args[0]
  5353  		val := v_1
  5354  		mem := v_2
  5355  		v.reset(OpARMMOVFstore)
  5356  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5357  		v.Aux = symToAux(sym)
  5358  		v.AddArg3(ptr, val, mem)
  5359  		return true
  5360  	}
  5361  	// match: (MOVFstore [off1] {sym} (SUBconst [off2] ptr) val mem)
  5362  	// result: (MOVFstore [off1-off2] {sym} ptr val mem)
  5363  	for {
  5364  		off1 := auxIntToInt32(v.AuxInt)
  5365  		sym := auxToSym(v.Aux)
  5366  		if v_0.Op != OpARMSUBconst {
  5367  			break
  5368  		}
  5369  		off2 := auxIntToInt32(v_0.AuxInt)
  5370  		ptr := v_0.Args[0]
  5371  		val := v_1
  5372  		mem := v_2
  5373  		v.reset(OpARMMOVFstore)
  5374  		v.AuxInt = int32ToAuxInt(off1 - off2)
  5375  		v.Aux = symToAux(sym)
  5376  		v.AddArg3(ptr, val, mem)
  5377  		return true
  5378  	}
  5379  	// match: (MOVFstore [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) val mem)
  5380  	// cond: canMergeSym(sym1,sym2)
  5381  	// result: (MOVFstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  5382  	for {
  5383  		off1 := auxIntToInt32(v.AuxInt)
  5384  		sym1 := auxToSym(v.Aux)
  5385  		if v_0.Op != OpARMMOVWaddr {
  5386  			break
  5387  		}
  5388  		off2 := auxIntToInt32(v_0.AuxInt)
  5389  		sym2 := auxToSym(v_0.Aux)
  5390  		ptr := v_0.Args[0]
  5391  		val := v_1
  5392  		mem := v_2
  5393  		if !(canMergeSym(sym1, sym2)) {
  5394  			break
  5395  		}
  5396  		v.reset(OpARMMOVFstore)
  5397  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5398  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5399  		v.AddArg3(ptr, val, mem)
  5400  		return true
  5401  	}
  5402  	return false
  5403  }
  5404  func rewriteValueARM_OpARMMOVHUload(v *Value) bool {
  5405  	v_1 := v.Args[1]
  5406  	v_0 := v.Args[0]
  5407  	b := v.Block
  5408  	config := b.Func.Config
  5409  	// match: (MOVHUload [off1] {sym} (ADDconst [off2] ptr) mem)
  5410  	// result: (MOVHUload [off1+off2] {sym} ptr mem)
  5411  	for {
  5412  		off1 := auxIntToInt32(v.AuxInt)
  5413  		sym := auxToSym(v.Aux)
  5414  		if v_0.Op != OpARMADDconst {
  5415  			break
  5416  		}
  5417  		off2 := auxIntToInt32(v_0.AuxInt)
  5418  		ptr := v_0.Args[0]
  5419  		mem := v_1
  5420  		v.reset(OpARMMOVHUload)
  5421  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5422  		v.Aux = symToAux(sym)
  5423  		v.AddArg2(ptr, mem)
  5424  		return true
  5425  	}
  5426  	// match: (MOVHUload [off1] {sym} (SUBconst [off2] ptr) mem)
  5427  	// result: (MOVHUload [off1-off2] {sym} ptr mem)
  5428  	for {
  5429  		off1 := auxIntToInt32(v.AuxInt)
  5430  		sym := auxToSym(v.Aux)
  5431  		if v_0.Op != OpARMSUBconst {
  5432  			break
  5433  		}
  5434  		off2 := auxIntToInt32(v_0.AuxInt)
  5435  		ptr := v_0.Args[0]
  5436  		mem := v_1
  5437  		v.reset(OpARMMOVHUload)
  5438  		v.AuxInt = int32ToAuxInt(off1 - off2)
  5439  		v.Aux = symToAux(sym)
  5440  		v.AddArg2(ptr, mem)
  5441  		return true
  5442  	}
  5443  	// match: (MOVHUload [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) mem)
  5444  	// cond: canMergeSym(sym1,sym2)
  5445  	// result: (MOVHUload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  5446  	for {
  5447  		off1 := auxIntToInt32(v.AuxInt)
  5448  		sym1 := auxToSym(v.Aux)
  5449  		if v_0.Op != OpARMMOVWaddr {
  5450  			break
  5451  		}
  5452  		off2 := auxIntToInt32(v_0.AuxInt)
  5453  		sym2 := auxToSym(v_0.Aux)
  5454  		ptr := v_0.Args[0]
  5455  		mem := v_1
  5456  		if !(canMergeSym(sym1, sym2)) {
  5457  			break
  5458  		}
  5459  		v.reset(OpARMMOVHUload)
  5460  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5461  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5462  		v.AddArg2(ptr, mem)
  5463  		return true
  5464  	}
  5465  	// match: (MOVHUload [off] {sym} ptr (MOVHstore [off2] {sym2} ptr2 x _))
  5466  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  5467  	// result: (MOVHUreg x)
  5468  	for {
  5469  		off := auxIntToInt32(v.AuxInt)
  5470  		sym := auxToSym(v.Aux)
  5471  		ptr := v_0
  5472  		if v_1.Op != OpARMMOVHstore {
  5473  			break
  5474  		}
  5475  		off2 := auxIntToInt32(v_1.AuxInt)
  5476  		sym2 := auxToSym(v_1.Aux)
  5477  		x := v_1.Args[1]
  5478  		ptr2 := v_1.Args[0]
  5479  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  5480  			break
  5481  		}
  5482  		v.reset(OpARMMOVHUreg)
  5483  		v.AddArg(x)
  5484  		return true
  5485  	}
  5486  	// match: (MOVHUload [0] {sym} (ADD ptr idx) mem)
  5487  	// cond: sym == nil
  5488  	// result: (MOVHUloadidx ptr idx mem)
  5489  	for {
  5490  		if auxIntToInt32(v.AuxInt) != 0 {
  5491  			break
  5492  		}
  5493  		sym := auxToSym(v.Aux)
  5494  		if v_0.Op != OpARMADD {
  5495  			break
  5496  		}
  5497  		idx := v_0.Args[1]
  5498  		ptr := v_0.Args[0]
  5499  		mem := v_1
  5500  		if !(sym == nil) {
  5501  			break
  5502  		}
  5503  		v.reset(OpARMMOVHUloadidx)
  5504  		v.AddArg3(ptr, idx, mem)
  5505  		return true
  5506  	}
  5507  	// match: (MOVHUload [off] {sym} (SB) _)
  5508  	// cond: symIsRO(sym)
  5509  	// result: (MOVWconst [int32(read16(sym, int64(off), config.ctxt.Arch.ByteOrder))])
  5510  	for {
  5511  		off := auxIntToInt32(v.AuxInt)
  5512  		sym := auxToSym(v.Aux)
  5513  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  5514  			break
  5515  		}
  5516  		v.reset(OpARMMOVWconst)
  5517  		v.AuxInt = int32ToAuxInt(int32(read16(sym, int64(off), config.ctxt.Arch.ByteOrder)))
  5518  		return true
  5519  	}
  5520  	return false
  5521  }
  5522  func rewriteValueARM_OpARMMOVHUloadidx(v *Value) bool {
  5523  	v_2 := v.Args[2]
  5524  	v_1 := v.Args[1]
  5525  	v_0 := v.Args[0]
  5526  	// match: (MOVHUloadidx ptr idx (MOVHstoreidx ptr2 idx x _))
  5527  	// cond: isSamePtr(ptr, ptr2)
  5528  	// result: (MOVHUreg x)
  5529  	for {
  5530  		ptr := v_0
  5531  		idx := v_1
  5532  		if v_2.Op != OpARMMOVHstoreidx {
  5533  			break
  5534  		}
  5535  		x := v_2.Args[2]
  5536  		ptr2 := v_2.Args[0]
  5537  		if idx != v_2.Args[1] || !(isSamePtr(ptr, ptr2)) {
  5538  			break
  5539  		}
  5540  		v.reset(OpARMMOVHUreg)
  5541  		v.AddArg(x)
  5542  		return true
  5543  	}
  5544  	// match: (MOVHUloadidx ptr (MOVWconst [c]) mem)
  5545  	// result: (MOVHUload [c] ptr mem)
  5546  	for {
  5547  		ptr := v_0
  5548  		if v_1.Op != OpARMMOVWconst {
  5549  			break
  5550  		}
  5551  		c := auxIntToInt32(v_1.AuxInt)
  5552  		mem := v_2
  5553  		v.reset(OpARMMOVHUload)
  5554  		v.AuxInt = int32ToAuxInt(c)
  5555  		v.AddArg2(ptr, mem)
  5556  		return true
  5557  	}
  5558  	// match: (MOVHUloadidx (MOVWconst [c]) ptr mem)
  5559  	// result: (MOVHUload [c] ptr mem)
  5560  	for {
  5561  		if v_0.Op != OpARMMOVWconst {
  5562  			break
  5563  		}
  5564  		c := auxIntToInt32(v_0.AuxInt)
  5565  		ptr := v_1
  5566  		mem := v_2
  5567  		v.reset(OpARMMOVHUload)
  5568  		v.AuxInt = int32ToAuxInt(c)
  5569  		v.AddArg2(ptr, mem)
  5570  		return true
  5571  	}
  5572  	return false
  5573  }
  5574  func rewriteValueARM_OpARMMOVHUreg(v *Value) bool {
  5575  	v_0 := v.Args[0]
  5576  	// match: (MOVHUreg x:(MOVBUload _ _))
  5577  	// result: (MOVWreg x)
  5578  	for {
  5579  		x := v_0
  5580  		if x.Op != OpARMMOVBUload {
  5581  			break
  5582  		}
  5583  		v.reset(OpARMMOVWreg)
  5584  		v.AddArg(x)
  5585  		return true
  5586  	}
  5587  	// match: (MOVHUreg x:(MOVHUload _ _))
  5588  	// result: (MOVWreg x)
  5589  	for {
  5590  		x := v_0
  5591  		if x.Op != OpARMMOVHUload {
  5592  			break
  5593  		}
  5594  		v.reset(OpARMMOVWreg)
  5595  		v.AddArg(x)
  5596  		return true
  5597  	}
  5598  	// match: (MOVHUreg (ANDconst [c] x))
  5599  	// result: (ANDconst [c&0xffff] x)
  5600  	for {
  5601  		if v_0.Op != OpARMANDconst {
  5602  			break
  5603  		}
  5604  		c := auxIntToInt32(v_0.AuxInt)
  5605  		x := v_0.Args[0]
  5606  		v.reset(OpARMANDconst)
  5607  		v.AuxInt = int32ToAuxInt(c & 0xffff)
  5608  		v.AddArg(x)
  5609  		return true
  5610  	}
  5611  	// match: (MOVHUreg x:(MOVBUreg _))
  5612  	// result: (MOVWreg x)
  5613  	for {
  5614  		x := v_0
  5615  		if x.Op != OpARMMOVBUreg {
  5616  			break
  5617  		}
  5618  		v.reset(OpARMMOVWreg)
  5619  		v.AddArg(x)
  5620  		return true
  5621  	}
  5622  	// match: (MOVHUreg x:(MOVHUreg _))
  5623  	// result: (MOVWreg x)
  5624  	for {
  5625  		x := v_0
  5626  		if x.Op != OpARMMOVHUreg {
  5627  			break
  5628  		}
  5629  		v.reset(OpARMMOVWreg)
  5630  		v.AddArg(x)
  5631  		return true
  5632  	}
  5633  	// match: (MOVHUreg (MOVWconst [c]))
  5634  	// result: (MOVWconst [int32(uint16(c))])
  5635  	for {
  5636  		if v_0.Op != OpARMMOVWconst {
  5637  			break
  5638  		}
  5639  		c := auxIntToInt32(v_0.AuxInt)
  5640  		v.reset(OpARMMOVWconst)
  5641  		v.AuxInt = int32ToAuxInt(int32(uint16(c)))
  5642  		return true
  5643  	}
  5644  	return false
  5645  }
  5646  func rewriteValueARM_OpARMMOVHload(v *Value) bool {
  5647  	v_1 := v.Args[1]
  5648  	v_0 := v.Args[0]
  5649  	// match: (MOVHload [off1] {sym} (ADDconst [off2] ptr) mem)
  5650  	// result: (MOVHload [off1+off2] {sym} ptr mem)
  5651  	for {
  5652  		off1 := auxIntToInt32(v.AuxInt)
  5653  		sym := auxToSym(v.Aux)
  5654  		if v_0.Op != OpARMADDconst {
  5655  			break
  5656  		}
  5657  		off2 := auxIntToInt32(v_0.AuxInt)
  5658  		ptr := v_0.Args[0]
  5659  		mem := v_1
  5660  		v.reset(OpARMMOVHload)
  5661  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5662  		v.Aux = symToAux(sym)
  5663  		v.AddArg2(ptr, mem)
  5664  		return true
  5665  	}
  5666  	// match: (MOVHload [off1] {sym} (SUBconst [off2] ptr) mem)
  5667  	// result: (MOVHload [off1-off2] {sym} ptr mem)
  5668  	for {
  5669  		off1 := auxIntToInt32(v.AuxInt)
  5670  		sym := auxToSym(v.Aux)
  5671  		if v_0.Op != OpARMSUBconst {
  5672  			break
  5673  		}
  5674  		off2 := auxIntToInt32(v_0.AuxInt)
  5675  		ptr := v_0.Args[0]
  5676  		mem := v_1
  5677  		v.reset(OpARMMOVHload)
  5678  		v.AuxInt = int32ToAuxInt(off1 - off2)
  5679  		v.Aux = symToAux(sym)
  5680  		v.AddArg2(ptr, mem)
  5681  		return true
  5682  	}
  5683  	// match: (MOVHload [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) mem)
  5684  	// cond: canMergeSym(sym1,sym2)
  5685  	// result: (MOVHload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  5686  	for {
  5687  		off1 := auxIntToInt32(v.AuxInt)
  5688  		sym1 := auxToSym(v.Aux)
  5689  		if v_0.Op != OpARMMOVWaddr {
  5690  			break
  5691  		}
  5692  		off2 := auxIntToInt32(v_0.AuxInt)
  5693  		sym2 := auxToSym(v_0.Aux)
  5694  		ptr := v_0.Args[0]
  5695  		mem := v_1
  5696  		if !(canMergeSym(sym1, sym2)) {
  5697  			break
  5698  		}
  5699  		v.reset(OpARMMOVHload)
  5700  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5701  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5702  		v.AddArg2(ptr, mem)
  5703  		return true
  5704  	}
  5705  	// match: (MOVHload [off] {sym} ptr (MOVHstore [off2] {sym2} ptr2 x _))
  5706  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  5707  	// result: (MOVHreg x)
  5708  	for {
  5709  		off := auxIntToInt32(v.AuxInt)
  5710  		sym := auxToSym(v.Aux)
  5711  		ptr := v_0
  5712  		if v_1.Op != OpARMMOVHstore {
  5713  			break
  5714  		}
  5715  		off2 := auxIntToInt32(v_1.AuxInt)
  5716  		sym2 := auxToSym(v_1.Aux)
  5717  		x := v_1.Args[1]
  5718  		ptr2 := v_1.Args[0]
  5719  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  5720  			break
  5721  		}
  5722  		v.reset(OpARMMOVHreg)
  5723  		v.AddArg(x)
  5724  		return true
  5725  	}
  5726  	// match: (MOVHload [0] {sym} (ADD ptr idx) mem)
  5727  	// cond: sym == nil
  5728  	// result: (MOVHloadidx ptr idx mem)
  5729  	for {
  5730  		if auxIntToInt32(v.AuxInt) != 0 {
  5731  			break
  5732  		}
  5733  		sym := auxToSym(v.Aux)
  5734  		if v_0.Op != OpARMADD {
  5735  			break
  5736  		}
  5737  		idx := v_0.Args[1]
  5738  		ptr := v_0.Args[0]
  5739  		mem := v_1
  5740  		if !(sym == nil) {
  5741  			break
  5742  		}
  5743  		v.reset(OpARMMOVHloadidx)
  5744  		v.AddArg3(ptr, idx, mem)
  5745  		return true
  5746  	}
  5747  	return false
  5748  }
  5749  func rewriteValueARM_OpARMMOVHloadidx(v *Value) bool {
  5750  	v_2 := v.Args[2]
  5751  	v_1 := v.Args[1]
  5752  	v_0 := v.Args[0]
  5753  	// match: (MOVHloadidx ptr idx (MOVHstoreidx ptr2 idx x _))
  5754  	// cond: isSamePtr(ptr, ptr2)
  5755  	// result: (MOVHreg x)
  5756  	for {
  5757  		ptr := v_0
  5758  		idx := v_1
  5759  		if v_2.Op != OpARMMOVHstoreidx {
  5760  			break
  5761  		}
  5762  		x := v_2.Args[2]
  5763  		ptr2 := v_2.Args[0]
  5764  		if idx != v_2.Args[1] || !(isSamePtr(ptr, ptr2)) {
  5765  			break
  5766  		}
  5767  		v.reset(OpARMMOVHreg)
  5768  		v.AddArg(x)
  5769  		return true
  5770  	}
  5771  	// match: (MOVHloadidx ptr (MOVWconst [c]) mem)
  5772  	// result: (MOVHload [c] ptr mem)
  5773  	for {
  5774  		ptr := v_0
  5775  		if v_1.Op != OpARMMOVWconst {
  5776  			break
  5777  		}
  5778  		c := auxIntToInt32(v_1.AuxInt)
  5779  		mem := v_2
  5780  		v.reset(OpARMMOVHload)
  5781  		v.AuxInt = int32ToAuxInt(c)
  5782  		v.AddArg2(ptr, mem)
  5783  		return true
  5784  	}
  5785  	// match: (MOVHloadidx (MOVWconst [c]) ptr mem)
  5786  	// result: (MOVHload [c] ptr mem)
  5787  	for {
  5788  		if v_0.Op != OpARMMOVWconst {
  5789  			break
  5790  		}
  5791  		c := auxIntToInt32(v_0.AuxInt)
  5792  		ptr := v_1
  5793  		mem := v_2
  5794  		v.reset(OpARMMOVHload)
  5795  		v.AuxInt = int32ToAuxInt(c)
  5796  		v.AddArg2(ptr, mem)
  5797  		return true
  5798  	}
  5799  	return false
  5800  }
  5801  func rewriteValueARM_OpARMMOVHreg(v *Value) bool {
  5802  	v_0 := v.Args[0]
  5803  	// match: (MOVHreg x:(MOVBload _ _))
  5804  	// result: (MOVWreg x)
  5805  	for {
  5806  		x := v_0
  5807  		if x.Op != OpARMMOVBload {
  5808  			break
  5809  		}
  5810  		v.reset(OpARMMOVWreg)
  5811  		v.AddArg(x)
  5812  		return true
  5813  	}
  5814  	// match: (MOVHreg x:(MOVBUload _ _))
  5815  	// result: (MOVWreg x)
  5816  	for {
  5817  		x := v_0
  5818  		if x.Op != OpARMMOVBUload {
  5819  			break
  5820  		}
  5821  		v.reset(OpARMMOVWreg)
  5822  		v.AddArg(x)
  5823  		return true
  5824  	}
  5825  	// match: (MOVHreg x:(MOVHload _ _))
  5826  	// result: (MOVWreg x)
  5827  	for {
  5828  		x := v_0
  5829  		if x.Op != OpARMMOVHload {
  5830  			break
  5831  		}
  5832  		v.reset(OpARMMOVWreg)
  5833  		v.AddArg(x)
  5834  		return true
  5835  	}
  5836  	// match: (MOVHreg (ANDconst [c] x))
  5837  	// cond: c & 0x8000 == 0
  5838  	// result: (ANDconst [c&0x7fff] x)
  5839  	for {
  5840  		if v_0.Op != OpARMANDconst {
  5841  			break
  5842  		}
  5843  		c := auxIntToInt32(v_0.AuxInt)
  5844  		x := v_0.Args[0]
  5845  		if !(c&0x8000 == 0) {
  5846  			break
  5847  		}
  5848  		v.reset(OpARMANDconst)
  5849  		v.AuxInt = int32ToAuxInt(c & 0x7fff)
  5850  		v.AddArg(x)
  5851  		return true
  5852  	}
  5853  	// match: (MOVHreg x:(MOVBreg _))
  5854  	// result: (MOVWreg x)
  5855  	for {
  5856  		x := v_0
  5857  		if x.Op != OpARMMOVBreg {
  5858  			break
  5859  		}
  5860  		v.reset(OpARMMOVWreg)
  5861  		v.AddArg(x)
  5862  		return true
  5863  	}
  5864  	// match: (MOVHreg x:(MOVBUreg _))
  5865  	// result: (MOVWreg x)
  5866  	for {
  5867  		x := v_0
  5868  		if x.Op != OpARMMOVBUreg {
  5869  			break
  5870  		}
  5871  		v.reset(OpARMMOVWreg)
  5872  		v.AddArg(x)
  5873  		return true
  5874  	}
  5875  	// match: (MOVHreg x:(MOVHreg _))
  5876  	// result: (MOVWreg x)
  5877  	for {
  5878  		x := v_0
  5879  		if x.Op != OpARMMOVHreg {
  5880  			break
  5881  		}
  5882  		v.reset(OpARMMOVWreg)
  5883  		v.AddArg(x)
  5884  		return true
  5885  	}
  5886  	// match: (MOVHreg (MOVWconst [c]))
  5887  	// result: (MOVWconst [int32(int16(c))])
  5888  	for {
  5889  		if v_0.Op != OpARMMOVWconst {
  5890  			break
  5891  		}
  5892  		c := auxIntToInt32(v_0.AuxInt)
  5893  		v.reset(OpARMMOVWconst)
  5894  		v.AuxInt = int32ToAuxInt(int32(int16(c)))
  5895  		return true
  5896  	}
  5897  	return false
  5898  }
  5899  func rewriteValueARM_OpARMMOVHstore(v *Value) bool {
  5900  	v_2 := v.Args[2]
  5901  	v_1 := v.Args[1]
  5902  	v_0 := v.Args[0]
  5903  	// match: (MOVHstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  5904  	// result: (MOVHstore [off1+off2] {sym} ptr val mem)
  5905  	for {
  5906  		off1 := auxIntToInt32(v.AuxInt)
  5907  		sym := auxToSym(v.Aux)
  5908  		if v_0.Op != OpARMADDconst {
  5909  			break
  5910  		}
  5911  		off2 := auxIntToInt32(v_0.AuxInt)
  5912  		ptr := v_0.Args[0]
  5913  		val := v_1
  5914  		mem := v_2
  5915  		v.reset(OpARMMOVHstore)
  5916  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5917  		v.Aux = symToAux(sym)
  5918  		v.AddArg3(ptr, val, mem)
  5919  		return true
  5920  	}
  5921  	// match: (MOVHstore [off1] {sym} (SUBconst [off2] ptr) val mem)
  5922  	// result: (MOVHstore [off1-off2] {sym} ptr val mem)
  5923  	for {
  5924  		off1 := auxIntToInt32(v.AuxInt)
  5925  		sym := auxToSym(v.Aux)
  5926  		if v_0.Op != OpARMSUBconst {
  5927  			break
  5928  		}
  5929  		off2 := auxIntToInt32(v_0.AuxInt)
  5930  		ptr := v_0.Args[0]
  5931  		val := v_1
  5932  		mem := v_2
  5933  		v.reset(OpARMMOVHstore)
  5934  		v.AuxInt = int32ToAuxInt(off1 - off2)
  5935  		v.Aux = symToAux(sym)
  5936  		v.AddArg3(ptr, val, mem)
  5937  		return true
  5938  	}
  5939  	// match: (MOVHstore [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) val mem)
  5940  	// cond: canMergeSym(sym1,sym2)
  5941  	// result: (MOVHstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  5942  	for {
  5943  		off1 := auxIntToInt32(v.AuxInt)
  5944  		sym1 := auxToSym(v.Aux)
  5945  		if v_0.Op != OpARMMOVWaddr {
  5946  			break
  5947  		}
  5948  		off2 := auxIntToInt32(v_0.AuxInt)
  5949  		sym2 := auxToSym(v_0.Aux)
  5950  		ptr := v_0.Args[0]
  5951  		val := v_1
  5952  		mem := v_2
  5953  		if !(canMergeSym(sym1, sym2)) {
  5954  			break
  5955  		}
  5956  		v.reset(OpARMMOVHstore)
  5957  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5958  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5959  		v.AddArg3(ptr, val, mem)
  5960  		return true
  5961  	}
  5962  	// match: (MOVHstore [off] {sym} ptr (MOVHreg x) mem)
  5963  	// result: (MOVHstore [off] {sym} ptr x mem)
  5964  	for {
  5965  		off := auxIntToInt32(v.AuxInt)
  5966  		sym := auxToSym(v.Aux)
  5967  		ptr := v_0
  5968  		if v_1.Op != OpARMMOVHreg {
  5969  			break
  5970  		}
  5971  		x := v_1.Args[0]
  5972  		mem := v_2
  5973  		v.reset(OpARMMOVHstore)
  5974  		v.AuxInt = int32ToAuxInt(off)
  5975  		v.Aux = symToAux(sym)
  5976  		v.AddArg3(ptr, x, mem)
  5977  		return true
  5978  	}
  5979  	// match: (MOVHstore [off] {sym} ptr (MOVHUreg x) mem)
  5980  	// result: (MOVHstore [off] {sym} ptr x mem)
  5981  	for {
  5982  		off := auxIntToInt32(v.AuxInt)
  5983  		sym := auxToSym(v.Aux)
  5984  		ptr := v_0
  5985  		if v_1.Op != OpARMMOVHUreg {
  5986  			break
  5987  		}
  5988  		x := v_1.Args[0]
  5989  		mem := v_2
  5990  		v.reset(OpARMMOVHstore)
  5991  		v.AuxInt = int32ToAuxInt(off)
  5992  		v.Aux = symToAux(sym)
  5993  		v.AddArg3(ptr, x, mem)
  5994  		return true
  5995  	}
  5996  	// match: (MOVHstore [0] {sym} (ADD ptr idx) val mem)
  5997  	// cond: sym == nil
  5998  	// result: (MOVHstoreidx ptr idx val mem)
  5999  	for {
  6000  		if auxIntToInt32(v.AuxInt) != 0 {
  6001  			break
  6002  		}
  6003  		sym := auxToSym(v.Aux)
  6004  		if v_0.Op != OpARMADD {
  6005  			break
  6006  		}
  6007  		idx := v_0.Args[1]
  6008  		ptr := v_0.Args[0]
  6009  		val := v_1
  6010  		mem := v_2
  6011  		if !(sym == nil) {
  6012  			break
  6013  		}
  6014  		v.reset(OpARMMOVHstoreidx)
  6015  		v.AddArg4(ptr, idx, val, mem)
  6016  		return true
  6017  	}
  6018  	return false
  6019  }
  6020  func rewriteValueARM_OpARMMOVHstoreidx(v *Value) bool {
  6021  	v_3 := v.Args[3]
  6022  	v_2 := v.Args[2]
  6023  	v_1 := v.Args[1]
  6024  	v_0 := v.Args[0]
  6025  	// match: (MOVHstoreidx ptr (MOVWconst [c]) val mem)
  6026  	// result: (MOVHstore [c] ptr val mem)
  6027  	for {
  6028  		ptr := v_0
  6029  		if v_1.Op != OpARMMOVWconst {
  6030  			break
  6031  		}
  6032  		c := auxIntToInt32(v_1.AuxInt)
  6033  		val := v_2
  6034  		mem := v_3
  6035  		v.reset(OpARMMOVHstore)
  6036  		v.AuxInt = int32ToAuxInt(c)
  6037  		v.AddArg3(ptr, val, mem)
  6038  		return true
  6039  	}
  6040  	// match: (MOVHstoreidx (MOVWconst [c]) ptr val mem)
  6041  	// result: (MOVHstore [c] ptr val mem)
  6042  	for {
  6043  		if v_0.Op != OpARMMOVWconst {
  6044  			break
  6045  		}
  6046  		c := auxIntToInt32(v_0.AuxInt)
  6047  		ptr := v_1
  6048  		val := v_2
  6049  		mem := v_3
  6050  		v.reset(OpARMMOVHstore)
  6051  		v.AuxInt = int32ToAuxInt(c)
  6052  		v.AddArg3(ptr, val, mem)
  6053  		return true
  6054  	}
  6055  	return false
  6056  }
  6057  func rewriteValueARM_OpARMMOVWload(v *Value) bool {
  6058  	v_1 := v.Args[1]
  6059  	v_0 := v.Args[0]
  6060  	b := v.Block
  6061  	config := b.Func.Config
  6062  	// match: (MOVWload [off1] {sym} (ADDconst [off2] ptr) mem)
  6063  	// result: (MOVWload [off1+off2] {sym} ptr mem)
  6064  	for {
  6065  		off1 := auxIntToInt32(v.AuxInt)
  6066  		sym := auxToSym(v.Aux)
  6067  		if v_0.Op != OpARMADDconst {
  6068  			break
  6069  		}
  6070  		off2 := auxIntToInt32(v_0.AuxInt)
  6071  		ptr := v_0.Args[0]
  6072  		mem := v_1
  6073  		v.reset(OpARMMOVWload)
  6074  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6075  		v.Aux = symToAux(sym)
  6076  		v.AddArg2(ptr, mem)
  6077  		return true
  6078  	}
  6079  	// match: (MOVWload [off1] {sym} (SUBconst [off2] ptr) mem)
  6080  	// result: (MOVWload [off1-off2] {sym} ptr mem)
  6081  	for {
  6082  		off1 := auxIntToInt32(v.AuxInt)
  6083  		sym := auxToSym(v.Aux)
  6084  		if v_0.Op != OpARMSUBconst {
  6085  			break
  6086  		}
  6087  		off2 := auxIntToInt32(v_0.AuxInt)
  6088  		ptr := v_0.Args[0]
  6089  		mem := v_1
  6090  		v.reset(OpARMMOVWload)
  6091  		v.AuxInt = int32ToAuxInt(off1 - off2)
  6092  		v.Aux = symToAux(sym)
  6093  		v.AddArg2(ptr, mem)
  6094  		return true
  6095  	}
  6096  	// match: (MOVWload [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) mem)
  6097  	// cond: canMergeSym(sym1,sym2)
  6098  	// result: (MOVWload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  6099  	for {
  6100  		off1 := auxIntToInt32(v.AuxInt)
  6101  		sym1 := auxToSym(v.Aux)
  6102  		if v_0.Op != OpARMMOVWaddr {
  6103  			break
  6104  		}
  6105  		off2 := auxIntToInt32(v_0.AuxInt)
  6106  		sym2 := auxToSym(v_0.Aux)
  6107  		ptr := v_0.Args[0]
  6108  		mem := v_1
  6109  		if !(canMergeSym(sym1, sym2)) {
  6110  			break
  6111  		}
  6112  		v.reset(OpARMMOVWload)
  6113  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6114  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6115  		v.AddArg2(ptr, mem)
  6116  		return true
  6117  	}
  6118  	// match: (MOVWload [off] {sym} ptr (MOVWstore [off2] {sym2} ptr2 x _))
  6119  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  6120  	// result: x
  6121  	for {
  6122  		off := auxIntToInt32(v.AuxInt)
  6123  		sym := auxToSym(v.Aux)
  6124  		ptr := v_0
  6125  		if v_1.Op != OpARMMOVWstore {
  6126  			break
  6127  		}
  6128  		off2 := auxIntToInt32(v_1.AuxInt)
  6129  		sym2 := auxToSym(v_1.Aux)
  6130  		x := v_1.Args[1]
  6131  		ptr2 := v_1.Args[0]
  6132  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  6133  			break
  6134  		}
  6135  		v.copyOf(x)
  6136  		return true
  6137  	}
  6138  	// match: (MOVWload [0] {sym} (ADD ptr idx) mem)
  6139  	// cond: sym == nil
  6140  	// result: (MOVWloadidx ptr idx mem)
  6141  	for {
  6142  		if auxIntToInt32(v.AuxInt) != 0 {
  6143  			break
  6144  		}
  6145  		sym := auxToSym(v.Aux)
  6146  		if v_0.Op != OpARMADD {
  6147  			break
  6148  		}
  6149  		idx := v_0.Args[1]
  6150  		ptr := v_0.Args[0]
  6151  		mem := v_1
  6152  		if !(sym == nil) {
  6153  			break
  6154  		}
  6155  		v.reset(OpARMMOVWloadidx)
  6156  		v.AddArg3(ptr, idx, mem)
  6157  		return true
  6158  	}
  6159  	// match: (MOVWload [0] {sym} (ADDshiftLL ptr idx [c]) mem)
  6160  	// cond: sym == nil
  6161  	// result: (MOVWloadshiftLL ptr idx [c] mem)
  6162  	for {
  6163  		if auxIntToInt32(v.AuxInt) != 0 {
  6164  			break
  6165  		}
  6166  		sym := auxToSym(v.Aux)
  6167  		if v_0.Op != OpARMADDshiftLL {
  6168  			break
  6169  		}
  6170  		c := auxIntToInt32(v_0.AuxInt)
  6171  		idx := v_0.Args[1]
  6172  		ptr := v_0.Args[0]
  6173  		mem := v_1
  6174  		if !(sym == nil) {
  6175  			break
  6176  		}
  6177  		v.reset(OpARMMOVWloadshiftLL)
  6178  		v.AuxInt = int32ToAuxInt(c)
  6179  		v.AddArg3(ptr, idx, mem)
  6180  		return true
  6181  	}
  6182  	// match: (MOVWload [0] {sym} (ADDshiftRL ptr idx [c]) mem)
  6183  	// cond: sym == nil
  6184  	// result: (MOVWloadshiftRL ptr idx [c] mem)
  6185  	for {
  6186  		if auxIntToInt32(v.AuxInt) != 0 {
  6187  			break
  6188  		}
  6189  		sym := auxToSym(v.Aux)
  6190  		if v_0.Op != OpARMADDshiftRL {
  6191  			break
  6192  		}
  6193  		c := auxIntToInt32(v_0.AuxInt)
  6194  		idx := v_0.Args[1]
  6195  		ptr := v_0.Args[0]
  6196  		mem := v_1
  6197  		if !(sym == nil) {
  6198  			break
  6199  		}
  6200  		v.reset(OpARMMOVWloadshiftRL)
  6201  		v.AuxInt = int32ToAuxInt(c)
  6202  		v.AddArg3(ptr, idx, mem)
  6203  		return true
  6204  	}
  6205  	// match: (MOVWload [0] {sym} (ADDshiftRA ptr idx [c]) mem)
  6206  	// cond: sym == nil
  6207  	// result: (MOVWloadshiftRA ptr idx [c] mem)
  6208  	for {
  6209  		if auxIntToInt32(v.AuxInt) != 0 {
  6210  			break
  6211  		}
  6212  		sym := auxToSym(v.Aux)
  6213  		if v_0.Op != OpARMADDshiftRA {
  6214  			break
  6215  		}
  6216  		c := auxIntToInt32(v_0.AuxInt)
  6217  		idx := v_0.Args[1]
  6218  		ptr := v_0.Args[0]
  6219  		mem := v_1
  6220  		if !(sym == nil) {
  6221  			break
  6222  		}
  6223  		v.reset(OpARMMOVWloadshiftRA)
  6224  		v.AuxInt = int32ToAuxInt(c)
  6225  		v.AddArg3(ptr, idx, mem)
  6226  		return true
  6227  	}
  6228  	// match: (MOVWload [off] {sym} (SB) _)
  6229  	// cond: symIsRO(sym)
  6230  	// result: (MOVWconst [int32(read32(sym, int64(off), config.ctxt.Arch.ByteOrder))])
  6231  	for {
  6232  		off := auxIntToInt32(v.AuxInt)
  6233  		sym := auxToSym(v.Aux)
  6234  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  6235  			break
  6236  		}
  6237  		v.reset(OpARMMOVWconst)
  6238  		v.AuxInt = int32ToAuxInt(int32(read32(sym, int64(off), config.ctxt.Arch.ByteOrder)))
  6239  		return true
  6240  	}
  6241  	return false
  6242  }
  6243  func rewriteValueARM_OpARMMOVWloadidx(v *Value) bool {
  6244  	v_2 := v.Args[2]
  6245  	v_1 := v.Args[1]
  6246  	v_0 := v.Args[0]
  6247  	// match: (MOVWloadidx ptr idx (MOVWstoreidx ptr2 idx x _))
  6248  	// cond: isSamePtr(ptr, ptr2)
  6249  	// result: x
  6250  	for {
  6251  		ptr := v_0
  6252  		idx := v_1
  6253  		if v_2.Op != OpARMMOVWstoreidx {
  6254  			break
  6255  		}
  6256  		x := v_2.Args[2]
  6257  		ptr2 := v_2.Args[0]
  6258  		if idx != v_2.Args[1] || !(isSamePtr(ptr, ptr2)) {
  6259  			break
  6260  		}
  6261  		v.copyOf(x)
  6262  		return true
  6263  	}
  6264  	// match: (MOVWloadidx ptr (MOVWconst [c]) mem)
  6265  	// result: (MOVWload [c] ptr mem)
  6266  	for {
  6267  		ptr := v_0
  6268  		if v_1.Op != OpARMMOVWconst {
  6269  			break
  6270  		}
  6271  		c := auxIntToInt32(v_1.AuxInt)
  6272  		mem := v_2
  6273  		v.reset(OpARMMOVWload)
  6274  		v.AuxInt = int32ToAuxInt(c)
  6275  		v.AddArg2(ptr, mem)
  6276  		return true
  6277  	}
  6278  	// match: (MOVWloadidx (MOVWconst [c]) ptr mem)
  6279  	// result: (MOVWload [c] ptr mem)
  6280  	for {
  6281  		if v_0.Op != OpARMMOVWconst {
  6282  			break
  6283  		}
  6284  		c := auxIntToInt32(v_0.AuxInt)
  6285  		ptr := v_1
  6286  		mem := v_2
  6287  		v.reset(OpARMMOVWload)
  6288  		v.AuxInt = int32ToAuxInt(c)
  6289  		v.AddArg2(ptr, mem)
  6290  		return true
  6291  	}
  6292  	// match: (MOVWloadidx ptr (SLLconst idx [c]) mem)
  6293  	// result: (MOVWloadshiftLL ptr idx [c] mem)
  6294  	for {
  6295  		ptr := v_0
  6296  		if v_1.Op != OpARMSLLconst {
  6297  			break
  6298  		}
  6299  		c := auxIntToInt32(v_1.AuxInt)
  6300  		idx := v_1.Args[0]
  6301  		mem := v_2
  6302  		v.reset(OpARMMOVWloadshiftLL)
  6303  		v.AuxInt = int32ToAuxInt(c)
  6304  		v.AddArg3(ptr, idx, mem)
  6305  		return true
  6306  	}
  6307  	// match: (MOVWloadidx (SLLconst idx [c]) ptr mem)
  6308  	// result: (MOVWloadshiftLL ptr idx [c] mem)
  6309  	for {
  6310  		if v_0.Op != OpARMSLLconst {
  6311  			break
  6312  		}
  6313  		c := auxIntToInt32(v_0.AuxInt)
  6314  		idx := v_0.Args[0]
  6315  		ptr := v_1
  6316  		mem := v_2
  6317  		v.reset(OpARMMOVWloadshiftLL)
  6318  		v.AuxInt = int32ToAuxInt(c)
  6319  		v.AddArg3(ptr, idx, mem)
  6320  		return true
  6321  	}
  6322  	// match: (MOVWloadidx ptr (SRLconst idx [c]) mem)
  6323  	// result: (MOVWloadshiftRL ptr idx [c] mem)
  6324  	for {
  6325  		ptr := v_0
  6326  		if v_1.Op != OpARMSRLconst {
  6327  			break
  6328  		}
  6329  		c := auxIntToInt32(v_1.AuxInt)
  6330  		idx := v_1.Args[0]
  6331  		mem := v_2
  6332  		v.reset(OpARMMOVWloadshiftRL)
  6333  		v.AuxInt = int32ToAuxInt(c)
  6334  		v.AddArg3(ptr, idx, mem)
  6335  		return true
  6336  	}
  6337  	// match: (MOVWloadidx (SRLconst idx [c]) ptr mem)
  6338  	// result: (MOVWloadshiftRL ptr idx [c] mem)
  6339  	for {
  6340  		if v_0.Op != OpARMSRLconst {
  6341  			break
  6342  		}
  6343  		c := auxIntToInt32(v_0.AuxInt)
  6344  		idx := v_0.Args[0]
  6345  		ptr := v_1
  6346  		mem := v_2
  6347  		v.reset(OpARMMOVWloadshiftRL)
  6348  		v.AuxInt = int32ToAuxInt(c)
  6349  		v.AddArg3(ptr, idx, mem)
  6350  		return true
  6351  	}
  6352  	// match: (MOVWloadidx ptr (SRAconst idx [c]) mem)
  6353  	// result: (MOVWloadshiftRA ptr idx [c] mem)
  6354  	for {
  6355  		ptr := v_0
  6356  		if v_1.Op != OpARMSRAconst {
  6357  			break
  6358  		}
  6359  		c := auxIntToInt32(v_1.AuxInt)
  6360  		idx := v_1.Args[0]
  6361  		mem := v_2
  6362  		v.reset(OpARMMOVWloadshiftRA)
  6363  		v.AuxInt = int32ToAuxInt(c)
  6364  		v.AddArg3(ptr, idx, mem)
  6365  		return true
  6366  	}
  6367  	// match: (MOVWloadidx (SRAconst idx [c]) ptr mem)
  6368  	// result: (MOVWloadshiftRA ptr idx [c] mem)
  6369  	for {
  6370  		if v_0.Op != OpARMSRAconst {
  6371  			break
  6372  		}
  6373  		c := auxIntToInt32(v_0.AuxInt)
  6374  		idx := v_0.Args[0]
  6375  		ptr := v_1
  6376  		mem := v_2
  6377  		v.reset(OpARMMOVWloadshiftRA)
  6378  		v.AuxInt = int32ToAuxInt(c)
  6379  		v.AddArg3(ptr, idx, mem)
  6380  		return true
  6381  	}
  6382  	return false
  6383  }
  6384  func rewriteValueARM_OpARMMOVWloadshiftLL(v *Value) bool {
  6385  	v_2 := v.Args[2]
  6386  	v_1 := v.Args[1]
  6387  	v_0 := v.Args[0]
  6388  	// match: (MOVWloadshiftLL ptr idx [c] (MOVWstoreshiftLL ptr2 idx [d] x _))
  6389  	// cond: c==d && isSamePtr(ptr, ptr2)
  6390  	// result: x
  6391  	for {
  6392  		c := auxIntToInt32(v.AuxInt)
  6393  		ptr := v_0
  6394  		idx := v_1
  6395  		if v_2.Op != OpARMMOVWstoreshiftLL {
  6396  			break
  6397  		}
  6398  		d := auxIntToInt32(v_2.AuxInt)
  6399  		x := v_2.Args[2]
  6400  		ptr2 := v_2.Args[0]
  6401  		if idx != v_2.Args[1] || !(c == d && isSamePtr(ptr, ptr2)) {
  6402  			break
  6403  		}
  6404  		v.copyOf(x)
  6405  		return true
  6406  	}
  6407  	// match: (MOVWloadshiftLL ptr (MOVWconst [c]) [d] mem)
  6408  	// result: (MOVWload [int32(uint32(c)<<uint64(d))] ptr mem)
  6409  	for {
  6410  		d := auxIntToInt32(v.AuxInt)
  6411  		ptr := v_0
  6412  		if v_1.Op != OpARMMOVWconst {
  6413  			break
  6414  		}
  6415  		c := auxIntToInt32(v_1.AuxInt)
  6416  		mem := v_2
  6417  		v.reset(OpARMMOVWload)
  6418  		v.AuxInt = int32ToAuxInt(int32(uint32(c) << uint64(d)))
  6419  		v.AddArg2(ptr, mem)
  6420  		return true
  6421  	}
  6422  	return false
  6423  }
  6424  func rewriteValueARM_OpARMMOVWloadshiftRA(v *Value) bool {
  6425  	v_2 := v.Args[2]
  6426  	v_1 := v.Args[1]
  6427  	v_0 := v.Args[0]
  6428  	// match: (MOVWloadshiftRA ptr idx [c] (MOVWstoreshiftRA ptr2 idx [d] x _))
  6429  	// cond: c==d && isSamePtr(ptr, ptr2)
  6430  	// result: x
  6431  	for {
  6432  		c := auxIntToInt32(v.AuxInt)
  6433  		ptr := v_0
  6434  		idx := v_1
  6435  		if v_2.Op != OpARMMOVWstoreshiftRA {
  6436  			break
  6437  		}
  6438  		d := auxIntToInt32(v_2.AuxInt)
  6439  		x := v_2.Args[2]
  6440  		ptr2 := v_2.Args[0]
  6441  		if idx != v_2.Args[1] || !(c == d && isSamePtr(ptr, ptr2)) {
  6442  			break
  6443  		}
  6444  		v.copyOf(x)
  6445  		return true
  6446  	}
  6447  	// match: (MOVWloadshiftRA ptr (MOVWconst [c]) [d] mem)
  6448  	// result: (MOVWload [c>>uint64(d)] ptr mem)
  6449  	for {
  6450  		d := auxIntToInt32(v.AuxInt)
  6451  		ptr := v_0
  6452  		if v_1.Op != OpARMMOVWconst {
  6453  			break
  6454  		}
  6455  		c := auxIntToInt32(v_1.AuxInt)
  6456  		mem := v_2
  6457  		v.reset(OpARMMOVWload)
  6458  		v.AuxInt = int32ToAuxInt(c >> uint64(d))
  6459  		v.AddArg2(ptr, mem)
  6460  		return true
  6461  	}
  6462  	return false
  6463  }
  6464  func rewriteValueARM_OpARMMOVWloadshiftRL(v *Value) bool {
  6465  	v_2 := v.Args[2]
  6466  	v_1 := v.Args[1]
  6467  	v_0 := v.Args[0]
  6468  	// match: (MOVWloadshiftRL ptr idx [c] (MOVWstoreshiftRL ptr2 idx [d] x _))
  6469  	// cond: c==d && isSamePtr(ptr, ptr2)
  6470  	// result: x
  6471  	for {
  6472  		c := auxIntToInt32(v.AuxInt)
  6473  		ptr := v_0
  6474  		idx := v_1
  6475  		if v_2.Op != OpARMMOVWstoreshiftRL {
  6476  			break
  6477  		}
  6478  		d := auxIntToInt32(v_2.AuxInt)
  6479  		x := v_2.Args[2]
  6480  		ptr2 := v_2.Args[0]
  6481  		if idx != v_2.Args[1] || !(c == d && isSamePtr(ptr, ptr2)) {
  6482  			break
  6483  		}
  6484  		v.copyOf(x)
  6485  		return true
  6486  	}
  6487  	// match: (MOVWloadshiftRL ptr (MOVWconst [c]) [d] mem)
  6488  	// result: (MOVWload [int32(uint32(c)>>uint64(d))] ptr mem)
  6489  	for {
  6490  		d := auxIntToInt32(v.AuxInt)
  6491  		ptr := v_0
  6492  		if v_1.Op != OpARMMOVWconst {
  6493  			break
  6494  		}
  6495  		c := auxIntToInt32(v_1.AuxInt)
  6496  		mem := v_2
  6497  		v.reset(OpARMMOVWload)
  6498  		v.AuxInt = int32ToAuxInt(int32(uint32(c) >> uint64(d)))
  6499  		v.AddArg2(ptr, mem)
  6500  		return true
  6501  	}
  6502  	return false
  6503  }
  6504  func rewriteValueARM_OpARMMOVWreg(v *Value) bool {
  6505  	v_0 := v.Args[0]
  6506  	// match: (MOVWreg x)
  6507  	// cond: x.Uses == 1
  6508  	// result: (MOVWnop x)
  6509  	for {
  6510  		x := v_0
  6511  		if !(x.Uses == 1) {
  6512  			break
  6513  		}
  6514  		v.reset(OpARMMOVWnop)
  6515  		v.AddArg(x)
  6516  		return true
  6517  	}
  6518  	// match: (MOVWreg (MOVWconst [c]))
  6519  	// result: (MOVWconst [c])
  6520  	for {
  6521  		if v_0.Op != OpARMMOVWconst {
  6522  			break
  6523  		}
  6524  		c := auxIntToInt32(v_0.AuxInt)
  6525  		v.reset(OpARMMOVWconst)
  6526  		v.AuxInt = int32ToAuxInt(c)
  6527  		return true
  6528  	}
  6529  	return false
  6530  }
  6531  func rewriteValueARM_OpARMMOVWstore(v *Value) bool {
  6532  	v_2 := v.Args[2]
  6533  	v_1 := v.Args[1]
  6534  	v_0 := v.Args[0]
  6535  	// match: (MOVWstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  6536  	// result: (MOVWstore [off1+off2] {sym} ptr val mem)
  6537  	for {
  6538  		off1 := auxIntToInt32(v.AuxInt)
  6539  		sym := auxToSym(v.Aux)
  6540  		if v_0.Op != OpARMADDconst {
  6541  			break
  6542  		}
  6543  		off2 := auxIntToInt32(v_0.AuxInt)
  6544  		ptr := v_0.Args[0]
  6545  		val := v_1
  6546  		mem := v_2
  6547  		v.reset(OpARMMOVWstore)
  6548  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6549  		v.Aux = symToAux(sym)
  6550  		v.AddArg3(ptr, val, mem)
  6551  		return true
  6552  	}
  6553  	// match: (MOVWstore [off1] {sym} (SUBconst [off2] ptr) val mem)
  6554  	// result: (MOVWstore [off1-off2] {sym} ptr val mem)
  6555  	for {
  6556  		off1 := auxIntToInt32(v.AuxInt)
  6557  		sym := auxToSym(v.Aux)
  6558  		if v_0.Op != OpARMSUBconst {
  6559  			break
  6560  		}
  6561  		off2 := auxIntToInt32(v_0.AuxInt)
  6562  		ptr := v_0.Args[0]
  6563  		val := v_1
  6564  		mem := v_2
  6565  		v.reset(OpARMMOVWstore)
  6566  		v.AuxInt = int32ToAuxInt(off1 - off2)
  6567  		v.Aux = symToAux(sym)
  6568  		v.AddArg3(ptr, val, mem)
  6569  		return true
  6570  	}
  6571  	// match: (MOVWstore [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) val mem)
  6572  	// cond: canMergeSym(sym1,sym2)
  6573  	// result: (MOVWstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  6574  	for {
  6575  		off1 := auxIntToInt32(v.AuxInt)
  6576  		sym1 := auxToSym(v.Aux)
  6577  		if v_0.Op != OpARMMOVWaddr {
  6578  			break
  6579  		}
  6580  		off2 := auxIntToInt32(v_0.AuxInt)
  6581  		sym2 := auxToSym(v_0.Aux)
  6582  		ptr := v_0.Args[0]
  6583  		val := v_1
  6584  		mem := v_2
  6585  		if !(canMergeSym(sym1, sym2)) {
  6586  			break
  6587  		}
  6588  		v.reset(OpARMMOVWstore)
  6589  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6590  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6591  		v.AddArg3(ptr, val, mem)
  6592  		return true
  6593  	}
  6594  	// match: (MOVWstore [0] {sym} (ADD ptr idx) val mem)
  6595  	// cond: sym == nil
  6596  	// result: (MOVWstoreidx ptr idx val mem)
  6597  	for {
  6598  		if auxIntToInt32(v.AuxInt) != 0 {
  6599  			break
  6600  		}
  6601  		sym := auxToSym(v.Aux)
  6602  		if v_0.Op != OpARMADD {
  6603  			break
  6604  		}
  6605  		idx := v_0.Args[1]
  6606  		ptr := v_0.Args[0]
  6607  		val := v_1
  6608  		mem := v_2
  6609  		if !(sym == nil) {
  6610  			break
  6611  		}
  6612  		v.reset(OpARMMOVWstoreidx)
  6613  		v.AddArg4(ptr, idx, val, mem)
  6614  		return true
  6615  	}
  6616  	// match: (MOVWstore [0] {sym} (ADDshiftLL ptr idx [c]) val mem)
  6617  	// cond: sym == nil
  6618  	// result: (MOVWstoreshiftLL ptr idx [c] val mem)
  6619  	for {
  6620  		if auxIntToInt32(v.AuxInt) != 0 {
  6621  			break
  6622  		}
  6623  		sym := auxToSym(v.Aux)
  6624  		if v_0.Op != OpARMADDshiftLL {
  6625  			break
  6626  		}
  6627  		c := auxIntToInt32(v_0.AuxInt)
  6628  		idx := v_0.Args[1]
  6629  		ptr := v_0.Args[0]
  6630  		val := v_1
  6631  		mem := v_2
  6632  		if !(sym == nil) {
  6633  			break
  6634  		}
  6635  		v.reset(OpARMMOVWstoreshiftLL)
  6636  		v.AuxInt = int32ToAuxInt(c)
  6637  		v.AddArg4(ptr, idx, val, mem)
  6638  		return true
  6639  	}
  6640  	// match: (MOVWstore [0] {sym} (ADDshiftRL ptr idx [c]) val mem)
  6641  	// cond: sym == nil
  6642  	// result: (MOVWstoreshiftRL ptr idx [c] val mem)
  6643  	for {
  6644  		if auxIntToInt32(v.AuxInt) != 0 {
  6645  			break
  6646  		}
  6647  		sym := auxToSym(v.Aux)
  6648  		if v_0.Op != OpARMADDshiftRL {
  6649  			break
  6650  		}
  6651  		c := auxIntToInt32(v_0.AuxInt)
  6652  		idx := v_0.Args[1]
  6653  		ptr := v_0.Args[0]
  6654  		val := v_1
  6655  		mem := v_2
  6656  		if !(sym == nil) {
  6657  			break
  6658  		}
  6659  		v.reset(OpARMMOVWstoreshiftRL)
  6660  		v.AuxInt = int32ToAuxInt(c)
  6661  		v.AddArg4(ptr, idx, val, mem)
  6662  		return true
  6663  	}
  6664  	// match: (MOVWstore [0] {sym} (ADDshiftRA ptr idx [c]) val mem)
  6665  	// cond: sym == nil
  6666  	// result: (MOVWstoreshiftRA ptr idx [c] val mem)
  6667  	for {
  6668  		if auxIntToInt32(v.AuxInt) != 0 {
  6669  			break
  6670  		}
  6671  		sym := auxToSym(v.Aux)
  6672  		if v_0.Op != OpARMADDshiftRA {
  6673  			break
  6674  		}
  6675  		c := auxIntToInt32(v_0.AuxInt)
  6676  		idx := v_0.Args[1]
  6677  		ptr := v_0.Args[0]
  6678  		val := v_1
  6679  		mem := v_2
  6680  		if !(sym == nil) {
  6681  			break
  6682  		}
  6683  		v.reset(OpARMMOVWstoreshiftRA)
  6684  		v.AuxInt = int32ToAuxInt(c)
  6685  		v.AddArg4(ptr, idx, val, mem)
  6686  		return true
  6687  	}
  6688  	return false
  6689  }
  6690  func rewriteValueARM_OpARMMOVWstoreidx(v *Value) bool {
  6691  	v_3 := v.Args[3]
  6692  	v_2 := v.Args[2]
  6693  	v_1 := v.Args[1]
  6694  	v_0 := v.Args[0]
  6695  	// match: (MOVWstoreidx ptr (MOVWconst [c]) val mem)
  6696  	// result: (MOVWstore [c] ptr val mem)
  6697  	for {
  6698  		ptr := v_0
  6699  		if v_1.Op != OpARMMOVWconst {
  6700  			break
  6701  		}
  6702  		c := auxIntToInt32(v_1.AuxInt)
  6703  		val := v_2
  6704  		mem := v_3
  6705  		v.reset(OpARMMOVWstore)
  6706  		v.AuxInt = int32ToAuxInt(c)
  6707  		v.AddArg3(ptr, val, mem)
  6708  		return true
  6709  	}
  6710  	// match: (MOVWstoreidx (MOVWconst [c]) ptr val mem)
  6711  	// result: (MOVWstore [c] ptr val mem)
  6712  	for {
  6713  		if v_0.Op != OpARMMOVWconst {
  6714  			break
  6715  		}
  6716  		c := auxIntToInt32(v_0.AuxInt)
  6717  		ptr := v_1
  6718  		val := v_2
  6719  		mem := v_3
  6720  		v.reset(OpARMMOVWstore)
  6721  		v.AuxInt = int32ToAuxInt(c)
  6722  		v.AddArg3(ptr, val, mem)
  6723  		return true
  6724  	}
  6725  	// match: (MOVWstoreidx ptr (SLLconst idx [c]) val mem)
  6726  	// result: (MOVWstoreshiftLL ptr idx [c] val mem)
  6727  	for {
  6728  		ptr := v_0
  6729  		if v_1.Op != OpARMSLLconst {
  6730  			break
  6731  		}
  6732  		c := auxIntToInt32(v_1.AuxInt)
  6733  		idx := v_1.Args[0]
  6734  		val := v_2
  6735  		mem := v_3
  6736  		v.reset(OpARMMOVWstoreshiftLL)
  6737  		v.AuxInt = int32ToAuxInt(c)
  6738  		v.AddArg4(ptr, idx, val, mem)
  6739  		return true
  6740  	}
  6741  	// match: (MOVWstoreidx (SLLconst idx [c]) ptr val mem)
  6742  	// result: (MOVWstoreshiftLL ptr idx [c] val mem)
  6743  	for {
  6744  		if v_0.Op != OpARMSLLconst {
  6745  			break
  6746  		}
  6747  		c := auxIntToInt32(v_0.AuxInt)
  6748  		idx := v_0.Args[0]
  6749  		ptr := v_1
  6750  		val := v_2
  6751  		mem := v_3
  6752  		v.reset(OpARMMOVWstoreshiftLL)
  6753  		v.AuxInt = int32ToAuxInt(c)
  6754  		v.AddArg4(ptr, idx, val, mem)
  6755  		return true
  6756  	}
  6757  	// match: (MOVWstoreidx ptr (SRLconst idx [c]) val mem)
  6758  	// result: (MOVWstoreshiftRL ptr idx [c] val mem)
  6759  	for {
  6760  		ptr := v_0
  6761  		if v_1.Op != OpARMSRLconst {
  6762  			break
  6763  		}
  6764  		c := auxIntToInt32(v_1.AuxInt)
  6765  		idx := v_1.Args[0]
  6766  		val := v_2
  6767  		mem := v_3
  6768  		v.reset(OpARMMOVWstoreshiftRL)
  6769  		v.AuxInt = int32ToAuxInt(c)
  6770  		v.AddArg4(ptr, idx, val, mem)
  6771  		return true
  6772  	}
  6773  	// match: (MOVWstoreidx (SRLconst idx [c]) ptr val mem)
  6774  	// result: (MOVWstoreshiftRL ptr idx [c] val mem)
  6775  	for {
  6776  		if v_0.Op != OpARMSRLconst {
  6777  			break
  6778  		}
  6779  		c := auxIntToInt32(v_0.AuxInt)
  6780  		idx := v_0.Args[0]
  6781  		ptr := v_1
  6782  		val := v_2
  6783  		mem := v_3
  6784  		v.reset(OpARMMOVWstoreshiftRL)
  6785  		v.AuxInt = int32ToAuxInt(c)
  6786  		v.AddArg4(ptr, idx, val, mem)
  6787  		return true
  6788  	}
  6789  	// match: (MOVWstoreidx ptr (SRAconst idx [c]) val mem)
  6790  	// result: (MOVWstoreshiftRA ptr idx [c] val mem)
  6791  	for {
  6792  		ptr := v_0
  6793  		if v_1.Op != OpARMSRAconst {
  6794  			break
  6795  		}
  6796  		c := auxIntToInt32(v_1.AuxInt)
  6797  		idx := v_1.Args[0]
  6798  		val := v_2
  6799  		mem := v_3
  6800  		v.reset(OpARMMOVWstoreshiftRA)
  6801  		v.AuxInt = int32ToAuxInt(c)
  6802  		v.AddArg4(ptr, idx, val, mem)
  6803  		return true
  6804  	}
  6805  	// match: (MOVWstoreidx (SRAconst idx [c]) ptr val mem)
  6806  	// result: (MOVWstoreshiftRA ptr idx [c] val mem)
  6807  	for {
  6808  		if v_0.Op != OpARMSRAconst {
  6809  			break
  6810  		}
  6811  		c := auxIntToInt32(v_0.AuxInt)
  6812  		idx := v_0.Args[0]
  6813  		ptr := v_1
  6814  		val := v_2
  6815  		mem := v_3
  6816  		v.reset(OpARMMOVWstoreshiftRA)
  6817  		v.AuxInt = int32ToAuxInt(c)
  6818  		v.AddArg4(ptr, idx, val, mem)
  6819  		return true
  6820  	}
  6821  	return false
  6822  }
  6823  func rewriteValueARM_OpARMMOVWstoreshiftLL(v *Value) bool {
  6824  	v_3 := v.Args[3]
  6825  	v_2 := v.Args[2]
  6826  	v_1 := v.Args[1]
  6827  	v_0 := v.Args[0]
  6828  	// match: (MOVWstoreshiftLL ptr (MOVWconst [c]) [d] val mem)
  6829  	// result: (MOVWstore [int32(uint32(c)<<uint64(d))] ptr val mem)
  6830  	for {
  6831  		d := auxIntToInt32(v.AuxInt)
  6832  		ptr := v_0
  6833  		if v_1.Op != OpARMMOVWconst {
  6834  			break
  6835  		}
  6836  		c := auxIntToInt32(v_1.AuxInt)
  6837  		val := v_2
  6838  		mem := v_3
  6839  		v.reset(OpARMMOVWstore)
  6840  		v.AuxInt = int32ToAuxInt(int32(uint32(c) << uint64(d)))
  6841  		v.AddArg3(ptr, val, mem)
  6842  		return true
  6843  	}
  6844  	return false
  6845  }
  6846  func rewriteValueARM_OpARMMOVWstoreshiftRA(v *Value) bool {
  6847  	v_3 := v.Args[3]
  6848  	v_2 := v.Args[2]
  6849  	v_1 := v.Args[1]
  6850  	v_0 := v.Args[0]
  6851  	// match: (MOVWstoreshiftRA ptr (MOVWconst [c]) [d] val mem)
  6852  	// result: (MOVWstore [c>>uint64(d)] ptr val mem)
  6853  	for {
  6854  		d := auxIntToInt32(v.AuxInt)
  6855  		ptr := v_0
  6856  		if v_1.Op != OpARMMOVWconst {
  6857  			break
  6858  		}
  6859  		c := auxIntToInt32(v_1.AuxInt)
  6860  		val := v_2
  6861  		mem := v_3
  6862  		v.reset(OpARMMOVWstore)
  6863  		v.AuxInt = int32ToAuxInt(c >> uint64(d))
  6864  		v.AddArg3(ptr, val, mem)
  6865  		return true
  6866  	}
  6867  	return false
  6868  }
  6869  func rewriteValueARM_OpARMMOVWstoreshiftRL(v *Value) bool {
  6870  	v_3 := v.Args[3]
  6871  	v_2 := v.Args[2]
  6872  	v_1 := v.Args[1]
  6873  	v_0 := v.Args[0]
  6874  	// match: (MOVWstoreshiftRL ptr (MOVWconst [c]) [d] val mem)
  6875  	// result: (MOVWstore [int32(uint32(c)>>uint64(d))] ptr val mem)
  6876  	for {
  6877  		d := auxIntToInt32(v.AuxInt)
  6878  		ptr := v_0
  6879  		if v_1.Op != OpARMMOVWconst {
  6880  			break
  6881  		}
  6882  		c := auxIntToInt32(v_1.AuxInt)
  6883  		val := v_2
  6884  		mem := v_3
  6885  		v.reset(OpARMMOVWstore)
  6886  		v.AuxInt = int32ToAuxInt(int32(uint32(c) >> uint64(d)))
  6887  		v.AddArg3(ptr, val, mem)
  6888  		return true
  6889  	}
  6890  	return false
  6891  }
  6892  func rewriteValueARM_OpARMMUL(v *Value) bool {
  6893  	v_1 := v.Args[1]
  6894  	v_0 := v.Args[0]
  6895  	b := v.Block
  6896  	// match: (MUL x (MOVWconst [c]))
  6897  	// cond: int32(c) == -1
  6898  	// result: (RSBconst [0] x)
  6899  	for {
  6900  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6901  			x := v_0
  6902  			if v_1.Op != OpARMMOVWconst {
  6903  				continue
  6904  			}
  6905  			c := auxIntToInt32(v_1.AuxInt)
  6906  			if !(int32(c) == -1) {
  6907  				continue
  6908  			}
  6909  			v.reset(OpARMRSBconst)
  6910  			v.AuxInt = int32ToAuxInt(0)
  6911  			v.AddArg(x)
  6912  			return true
  6913  		}
  6914  		break
  6915  	}
  6916  	// match: (MUL _ (MOVWconst [0]))
  6917  	// result: (MOVWconst [0])
  6918  	for {
  6919  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6920  			if v_1.Op != OpARMMOVWconst || auxIntToInt32(v_1.AuxInt) != 0 {
  6921  				continue
  6922  			}
  6923  			v.reset(OpARMMOVWconst)
  6924  			v.AuxInt = int32ToAuxInt(0)
  6925  			return true
  6926  		}
  6927  		break
  6928  	}
  6929  	// match: (MUL x (MOVWconst [1]))
  6930  	// result: x
  6931  	for {
  6932  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6933  			x := v_0
  6934  			if v_1.Op != OpARMMOVWconst || auxIntToInt32(v_1.AuxInt) != 1 {
  6935  				continue
  6936  			}
  6937  			v.copyOf(x)
  6938  			return true
  6939  		}
  6940  		break
  6941  	}
  6942  	// match: (MUL x (MOVWconst [c]))
  6943  	// cond: isPowerOfTwo32(c)
  6944  	// result: (SLLconst [int32(log32(c))] x)
  6945  	for {
  6946  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6947  			x := v_0
  6948  			if v_1.Op != OpARMMOVWconst {
  6949  				continue
  6950  			}
  6951  			c := auxIntToInt32(v_1.AuxInt)
  6952  			if !(isPowerOfTwo32(c)) {
  6953  				continue
  6954  			}
  6955  			v.reset(OpARMSLLconst)
  6956  			v.AuxInt = int32ToAuxInt(int32(log32(c)))
  6957  			v.AddArg(x)
  6958  			return true
  6959  		}
  6960  		break
  6961  	}
  6962  	// match: (MUL x (MOVWconst [c]))
  6963  	// cond: isPowerOfTwo32(c-1) && c >= 3
  6964  	// result: (ADDshiftLL x x [int32(log32(c-1))])
  6965  	for {
  6966  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6967  			x := v_0
  6968  			if v_1.Op != OpARMMOVWconst {
  6969  				continue
  6970  			}
  6971  			c := auxIntToInt32(v_1.AuxInt)
  6972  			if !(isPowerOfTwo32(c-1) && c >= 3) {
  6973  				continue
  6974  			}
  6975  			v.reset(OpARMADDshiftLL)
  6976  			v.AuxInt = int32ToAuxInt(int32(log32(c - 1)))
  6977  			v.AddArg2(x, x)
  6978  			return true
  6979  		}
  6980  		break
  6981  	}
  6982  	// match: (MUL x (MOVWconst [c]))
  6983  	// cond: isPowerOfTwo32(c+1) && c >= 7
  6984  	// result: (RSBshiftLL x x [int32(log32(c+1))])
  6985  	for {
  6986  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6987  			x := v_0
  6988  			if v_1.Op != OpARMMOVWconst {
  6989  				continue
  6990  			}
  6991  			c := auxIntToInt32(v_1.AuxInt)
  6992  			if !(isPowerOfTwo32(c+1) && c >= 7) {
  6993  				continue
  6994  			}
  6995  			v.reset(OpARMRSBshiftLL)
  6996  			v.AuxInt = int32ToAuxInt(int32(log32(c + 1)))
  6997  			v.AddArg2(x, x)
  6998  			return true
  6999  		}
  7000  		break
  7001  	}
  7002  	// match: (MUL x (MOVWconst [c]))
  7003  	// cond: c%3 == 0 && isPowerOfTwo32(c/3)
  7004  	// result: (SLLconst [int32(log32(c/3))] (ADDshiftLL <x.Type> x x [1]))
  7005  	for {
  7006  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7007  			x := v_0
  7008  			if v_1.Op != OpARMMOVWconst {
  7009  				continue
  7010  			}
  7011  			c := auxIntToInt32(v_1.AuxInt)
  7012  			if !(c%3 == 0 && isPowerOfTwo32(c/3)) {
  7013  				continue
  7014  			}
  7015  			v.reset(OpARMSLLconst)
  7016  			v.AuxInt = int32ToAuxInt(int32(log32(c / 3)))
  7017  			v0 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  7018  			v0.AuxInt = int32ToAuxInt(1)
  7019  			v0.AddArg2(x, x)
  7020  			v.AddArg(v0)
  7021  			return true
  7022  		}
  7023  		break
  7024  	}
  7025  	// match: (MUL x (MOVWconst [c]))
  7026  	// cond: c%5 == 0 && isPowerOfTwo32(c/5)
  7027  	// result: (SLLconst [int32(log32(c/5))] (ADDshiftLL <x.Type> x x [2]))
  7028  	for {
  7029  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7030  			x := v_0
  7031  			if v_1.Op != OpARMMOVWconst {
  7032  				continue
  7033  			}
  7034  			c := auxIntToInt32(v_1.AuxInt)
  7035  			if !(c%5 == 0 && isPowerOfTwo32(c/5)) {
  7036  				continue
  7037  			}
  7038  			v.reset(OpARMSLLconst)
  7039  			v.AuxInt = int32ToAuxInt(int32(log32(c / 5)))
  7040  			v0 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  7041  			v0.AuxInt = int32ToAuxInt(2)
  7042  			v0.AddArg2(x, x)
  7043  			v.AddArg(v0)
  7044  			return true
  7045  		}
  7046  		break
  7047  	}
  7048  	// match: (MUL x (MOVWconst [c]))
  7049  	// cond: c%7 == 0 && isPowerOfTwo32(c/7)
  7050  	// result: (SLLconst [int32(log32(c/7))] (RSBshiftLL <x.Type> x x [3]))
  7051  	for {
  7052  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7053  			x := v_0
  7054  			if v_1.Op != OpARMMOVWconst {
  7055  				continue
  7056  			}
  7057  			c := auxIntToInt32(v_1.AuxInt)
  7058  			if !(c%7 == 0 && isPowerOfTwo32(c/7)) {
  7059  				continue
  7060  			}
  7061  			v.reset(OpARMSLLconst)
  7062  			v.AuxInt = int32ToAuxInt(int32(log32(c / 7)))
  7063  			v0 := b.NewValue0(v.Pos, OpARMRSBshiftLL, x.Type)
  7064  			v0.AuxInt = int32ToAuxInt(3)
  7065  			v0.AddArg2(x, x)
  7066  			v.AddArg(v0)
  7067  			return true
  7068  		}
  7069  		break
  7070  	}
  7071  	// match: (MUL x (MOVWconst [c]))
  7072  	// cond: c%9 == 0 && isPowerOfTwo32(c/9)
  7073  	// result: (SLLconst [int32(log32(c/9))] (ADDshiftLL <x.Type> x x [3]))
  7074  	for {
  7075  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7076  			x := v_0
  7077  			if v_1.Op != OpARMMOVWconst {
  7078  				continue
  7079  			}
  7080  			c := auxIntToInt32(v_1.AuxInt)
  7081  			if !(c%9 == 0 && isPowerOfTwo32(c/9)) {
  7082  				continue
  7083  			}
  7084  			v.reset(OpARMSLLconst)
  7085  			v.AuxInt = int32ToAuxInt(int32(log32(c / 9)))
  7086  			v0 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  7087  			v0.AuxInt = int32ToAuxInt(3)
  7088  			v0.AddArg2(x, x)
  7089  			v.AddArg(v0)
  7090  			return true
  7091  		}
  7092  		break
  7093  	}
  7094  	// match: (MUL (MOVWconst [c]) (MOVWconst [d]))
  7095  	// result: (MOVWconst [c*d])
  7096  	for {
  7097  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7098  			if v_0.Op != OpARMMOVWconst {
  7099  				continue
  7100  			}
  7101  			c := auxIntToInt32(v_0.AuxInt)
  7102  			if v_1.Op != OpARMMOVWconst {
  7103  				continue
  7104  			}
  7105  			d := auxIntToInt32(v_1.AuxInt)
  7106  			v.reset(OpARMMOVWconst)
  7107  			v.AuxInt = int32ToAuxInt(c * d)
  7108  			return true
  7109  		}
  7110  		break
  7111  	}
  7112  	return false
  7113  }
  7114  func rewriteValueARM_OpARMMULA(v *Value) bool {
  7115  	v_2 := v.Args[2]
  7116  	v_1 := v.Args[1]
  7117  	v_0 := v.Args[0]
  7118  	b := v.Block
  7119  	// match: (MULA x (MOVWconst [c]) a)
  7120  	// cond: c == -1
  7121  	// result: (SUB a x)
  7122  	for {
  7123  		x := v_0
  7124  		if v_1.Op != OpARMMOVWconst {
  7125  			break
  7126  		}
  7127  		c := auxIntToInt32(v_1.AuxInt)
  7128  		a := v_2
  7129  		if !(c == -1) {
  7130  			break
  7131  		}
  7132  		v.reset(OpARMSUB)
  7133  		v.AddArg2(a, x)
  7134  		return true
  7135  	}
  7136  	// match: (MULA _ (MOVWconst [0]) a)
  7137  	// result: a
  7138  	for {
  7139  		if v_1.Op != OpARMMOVWconst || auxIntToInt32(v_1.AuxInt) != 0 {
  7140  			break
  7141  		}
  7142  		a := v_2
  7143  		v.copyOf(a)
  7144  		return true
  7145  	}
  7146  	// match: (MULA x (MOVWconst [1]) a)
  7147  	// result: (ADD x a)
  7148  	for {
  7149  		x := v_0
  7150  		if v_1.Op != OpARMMOVWconst || auxIntToInt32(v_1.AuxInt) != 1 {
  7151  			break
  7152  		}
  7153  		a := v_2
  7154  		v.reset(OpARMADD)
  7155  		v.AddArg2(x, a)
  7156  		return true
  7157  	}
  7158  	// match: (MULA x (MOVWconst [c]) a)
  7159  	// cond: isPowerOfTwo32(c)
  7160  	// result: (ADD (SLLconst <x.Type> [int32(log32(c))] x) a)
  7161  	for {
  7162  		x := v_0
  7163  		if v_1.Op != OpARMMOVWconst {
  7164  			break
  7165  		}
  7166  		c := auxIntToInt32(v_1.AuxInt)
  7167  		a := v_2
  7168  		if !(isPowerOfTwo32(c)) {
  7169  			break
  7170  		}
  7171  		v.reset(OpARMADD)
  7172  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  7173  		v0.AuxInt = int32ToAuxInt(int32(log32(c)))
  7174  		v0.AddArg(x)
  7175  		v.AddArg2(v0, a)
  7176  		return true
  7177  	}
  7178  	// match: (MULA x (MOVWconst [c]) a)
  7179  	// cond: isPowerOfTwo32(c-1) && c >= 3
  7180  	// result: (ADD (ADDshiftLL <x.Type> x x [int32(log32(c-1))]) a)
  7181  	for {
  7182  		x := v_0
  7183  		if v_1.Op != OpARMMOVWconst {
  7184  			break
  7185  		}
  7186  		c := auxIntToInt32(v_1.AuxInt)
  7187  		a := v_2
  7188  		if !(isPowerOfTwo32(c-1) && c >= 3) {
  7189  			break
  7190  		}
  7191  		v.reset(OpARMADD)
  7192  		v0 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  7193  		v0.AuxInt = int32ToAuxInt(int32(log32(c - 1)))
  7194  		v0.AddArg2(x, x)
  7195  		v.AddArg2(v0, a)
  7196  		return true
  7197  	}
  7198  	// match: (MULA x (MOVWconst [c]) a)
  7199  	// cond: isPowerOfTwo32(c+1) && c >= 7
  7200  	// result: (ADD (RSBshiftLL <x.Type> x x [int32(log32(c+1))]) a)
  7201  	for {
  7202  		x := v_0
  7203  		if v_1.Op != OpARMMOVWconst {
  7204  			break
  7205  		}
  7206  		c := auxIntToInt32(v_1.AuxInt)
  7207  		a := v_2
  7208  		if !(isPowerOfTwo32(c+1) && c >= 7) {
  7209  			break
  7210  		}
  7211  		v.reset(OpARMADD)
  7212  		v0 := b.NewValue0(v.Pos, OpARMRSBshiftLL, x.Type)
  7213  		v0.AuxInt = int32ToAuxInt(int32(log32(c + 1)))
  7214  		v0.AddArg2(x, x)
  7215  		v.AddArg2(v0, a)
  7216  		return true
  7217  	}
  7218  	// match: (MULA x (MOVWconst [c]) a)
  7219  	// cond: c%3 == 0 && isPowerOfTwo32(c/3)
  7220  	// result: (ADD (SLLconst <x.Type> [int32(log32(c/3))] (ADDshiftLL <x.Type> x x [1])) a)
  7221  	for {
  7222  		x := v_0
  7223  		if v_1.Op != OpARMMOVWconst {
  7224  			break
  7225  		}
  7226  		c := auxIntToInt32(v_1.AuxInt)
  7227  		a := v_2
  7228  		if !(c%3 == 0 && isPowerOfTwo32(c/3)) {
  7229  			break
  7230  		}
  7231  		v.reset(OpARMADD)
  7232  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  7233  		v0.AuxInt = int32ToAuxInt(int32(log32(c / 3)))
  7234  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  7235  		v1.AuxInt = int32ToAuxInt(1)
  7236  		v1.AddArg2(x, x)
  7237  		v0.AddArg(v1)
  7238  		v.AddArg2(v0, a)
  7239  		return true
  7240  	}
  7241  	// match: (MULA x (MOVWconst [c]) a)
  7242  	// cond: c%5 == 0 && isPowerOfTwo32(c/5)
  7243  	// result: (ADD (SLLconst <x.Type> [int32(log32(c/5))] (ADDshiftLL <x.Type> x x [2])) a)
  7244  	for {
  7245  		x := v_0
  7246  		if v_1.Op != OpARMMOVWconst {
  7247  			break
  7248  		}
  7249  		c := auxIntToInt32(v_1.AuxInt)
  7250  		a := v_2
  7251  		if !(c%5 == 0 && isPowerOfTwo32(c/5)) {
  7252  			break
  7253  		}
  7254  		v.reset(OpARMADD)
  7255  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  7256  		v0.AuxInt = int32ToAuxInt(int32(log32(c / 5)))
  7257  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  7258  		v1.AuxInt = int32ToAuxInt(2)
  7259  		v1.AddArg2(x, x)
  7260  		v0.AddArg(v1)
  7261  		v.AddArg2(v0, a)
  7262  		return true
  7263  	}
  7264  	// match: (MULA x (MOVWconst [c]) a)
  7265  	// cond: c%7 == 0 && isPowerOfTwo32(c/7)
  7266  	// result: (ADD (SLLconst <x.Type> [int32(log32(c/7))] (RSBshiftLL <x.Type> x x [3])) a)
  7267  	for {
  7268  		x := v_0
  7269  		if v_1.Op != OpARMMOVWconst {
  7270  			break
  7271  		}
  7272  		c := auxIntToInt32(v_1.AuxInt)
  7273  		a := v_2
  7274  		if !(c%7 == 0 && isPowerOfTwo32(c/7)) {
  7275  			break
  7276  		}
  7277  		v.reset(OpARMADD)
  7278  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  7279  		v0.AuxInt = int32ToAuxInt(int32(log32(c / 7)))
  7280  		v1 := b.NewValue0(v.Pos, OpARMRSBshiftLL, x.Type)
  7281  		v1.AuxInt = int32ToAuxInt(3)
  7282  		v1.AddArg2(x, x)
  7283  		v0.AddArg(v1)
  7284  		v.AddArg2(v0, a)
  7285  		return true
  7286  	}
  7287  	// match: (MULA x (MOVWconst [c]) a)
  7288  	// cond: c%9 == 0 && isPowerOfTwo32(c/9)
  7289  	// result: (ADD (SLLconst <x.Type> [int32(log32(c/9))] (ADDshiftLL <x.Type> x x [3])) a)
  7290  	for {
  7291  		x := v_0
  7292  		if v_1.Op != OpARMMOVWconst {
  7293  			break
  7294  		}
  7295  		c := auxIntToInt32(v_1.AuxInt)
  7296  		a := v_2
  7297  		if !(c%9 == 0 && isPowerOfTwo32(c/9)) {
  7298  			break
  7299  		}
  7300  		v.reset(OpARMADD)
  7301  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  7302  		v0.AuxInt = int32ToAuxInt(int32(log32(c / 9)))
  7303  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  7304  		v1.AuxInt = int32ToAuxInt(3)
  7305  		v1.AddArg2(x, x)
  7306  		v0.AddArg(v1)
  7307  		v.AddArg2(v0, a)
  7308  		return true
  7309  	}
  7310  	// match: (MULA (MOVWconst [c]) x a)
  7311  	// cond: c == -1
  7312  	// result: (SUB a x)
  7313  	for {
  7314  		if v_0.Op != OpARMMOVWconst {
  7315  			break
  7316  		}
  7317  		c := auxIntToInt32(v_0.AuxInt)
  7318  		x := v_1
  7319  		a := v_2
  7320  		if !(c == -1) {
  7321  			break
  7322  		}
  7323  		v.reset(OpARMSUB)
  7324  		v.AddArg2(a, x)
  7325  		return true
  7326  	}
  7327  	// match: (MULA (MOVWconst [0]) _ a)
  7328  	// result: a
  7329  	for {
  7330  		if v_0.Op != OpARMMOVWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  7331  			break
  7332  		}
  7333  		a := v_2
  7334  		v.copyOf(a)
  7335  		return true
  7336  	}
  7337  	// match: (MULA (MOVWconst [1]) x a)
  7338  	// result: (ADD x a)
  7339  	for {
  7340  		if v_0.Op != OpARMMOVWconst || auxIntToInt32(v_0.AuxInt) != 1 {
  7341  			break
  7342  		}
  7343  		x := v_1
  7344  		a := v_2
  7345  		v.reset(OpARMADD)
  7346  		v.AddArg2(x, a)
  7347  		return true
  7348  	}
  7349  	// match: (MULA (MOVWconst [c]) x a)
  7350  	// cond: isPowerOfTwo32(c)
  7351  	// result: (ADD (SLLconst <x.Type> [int32(log32(c))] x) a)
  7352  	for {
  7353  		if v_0.Op != OpARMMOVWconst {
  7354  			break
  7355  		}
  7356  		c := auxIntToInt32(v_0.AuxInt)
  7357  		x := v_1
  7358  		a := v_2
  7359  		if !(isPowerOfTwo32(c)) {
  7360  			break
  7361  		}
  7362  		v.reset(OpARMADD)
  7363  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  7364  		v0.AuxInt = int32ToAuxInt(int32(log32(c)))
  7365  		v0.AddArg(x)
  7366  		v.AddArg2(v0, a)
  7367  		return true
  7368  	}
  7369  	// match: (MULA (MOVWconst [c]) x a)
  7370  	// cond: isPowerOfTwo32(c-1) && c >= 3
  7371  	// result: (ADD (ADDshiftLL <x.Type> x x [int32(log32(c-1))]) a)
  7372  	for {
  7373  		if v_0.Op != OpARMMOVWconst {
  7374  			break
  7375  		}
  7376  		c := auxIntToInt32(v_0.AuxInt)
  7377  		x := v_1
  7378  		a := v_2
  7379  		if !(isPowerOfTwo32(c-1) && c >= 3) {
  7380  			break
  7381  		}
  7382  		v.reset(OpARMADD)
  7383  		v0 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  7384  		v0.AuxInt = int32ToAuxInt(int32(log32(c - 1)))
  7385  		v0.AddArg2(x, x)
  7386  		v.AddArg2(v0, a)
  7387  		return true
  7388  	}
  7389  	// match: (MULA (MOVWconst [c]) x a)
  7390  	// cond: isPowerOfTwo32(c+1) && c >= 7
  7391  	// result: (ADD (RSBshiftLL <x.Type> x x [int32(log32(c+1))]) a)
  7392  	for {
  7393  		if v_0.Op != OpARMMOVWconst {
  7394  			break
  7395  		}
  7396  		c := auxIntToInt32(v_0.AuxInt)
  7397  		x := v_1
  7398  		a := v_2
  7399  		if !(isPowerOfTwo32(c+1) && c >= 7) {
  7400  			break
  7401  		}
  7402  		v.reset(OpARMADD)
  7403  		v0 := b.NewValue0(v.Pos, OpARMRSBshiftLL, x.Type)
  7404  		v0.AuxInt = int32ToAuxInt(int32(log32(c + 1)))
  7405  		v0.AddArg2(x, x)
  7406  		v.AddArg2(v0, a)
  7407  		return true
  7408  	}
  7409  	// match: (MULA (MOVWconst [c]) x a)
  7410  	// cond: c%3 == 0 && isPowerOfTwo32(c/3)
  7411  	// result: (ADD (SLLconst <x.Type> [int32(log32(c/3))] (ADDshiftLL <x.Type> x x [1])) a)
  7412  	for {
  7413  		if v_0.Op != OpARMMOVWconst {
  7414  			break
  7415  		}
  7416  		c := auxIntToInt32(v_0.AuxInt)
  7417  		x := v_1
  7418  		a := v_2
  7419  		if !(c%3 == 0 && isPowerOfTwo32(c/3)) {
  7420  			break
  7421  		}
  7422  		v.reset(OpARMADD)
  7423  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  7424  		v0.AuxInt = int32ToAuxInt(int32(log32(c / 3)))
  7425  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  7426  		v1.AuxInt = int32ToAuxInt(1)
  7427  		v1.AddArg2(x, x)
  7428  		v0.AddArg(v1)
  7429  		v.AddArg2(v0, a)
  7430  		return true
  7431  	}
  7432  	// match: (MULA (MOVWconst [c]) x a)
  7433  	// cond: c%5 == 0 && isPowerOfTwo32(c/5)
  7434  	// result: (ADD (SLLconst <x.Type> [int32(log32(c/5))] (ADDshiftLL <x.Type> x x [2])) a)
  7435  	for {
  7436  		if v_0.Op != OpARMMOVWconst {
  7437  			break
  7438  		}
  7439  		c := auxIntToInt32(v_0.AuxInt)
  7440  		x := v_1
  7441  		a := v_2
  7442  		if !(c%5 == 0 && isPowerOfTwo32(c/5)) {
  7443  			break
  7444  		}
  7445  		v.reset(OpARMADD)
  7446  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  7447  		v0.AuxInt = int32ToAuxInt(int32(log32(c / 5)))
  7448  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  7449  		v1.AuxInt = int32ToAuxInt(2)
  7450  		v1.AddArg2(x, x)
  7451  		v0.AddArg(v1)
  7452  		v.AddArg2(v0, a)
  7453  		return true
  7454  	}
  7455  	// match: (MULA (MOVWconst [c]) x a)
  7456  	// cond: c%7 == 0 && isPowerOfTwo32(c/7)
  7457  	// result: (ADD (SLLconst <x.Type> [int32(log32(c/7))] (RSBshiftLL <x.Type> x x [3])) a)
  7458  	for {
  7459  		if v_0.Op != OpARMMOVWconst {
  7460  			break
  7461  		}
  7462  		c := auxIntToInt32(v_0.AuxInt)
  7463  		x := v_1
  7464  		a := v_2
  7465  		if !(c%7 == 0 && isPowerOfTwo32(c/7)) {
  7466  			break
  7467  		}
  7468  		v.reset(OpARMADD)
  7469  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  7470  		v0.AuxInt = int32ToAuxInt(int32(log32(c / 7)))
  7471  		v1 := b.NewValue0(v.Pos, OpARMRSBshiftLL, x.Type)
  7472  		v1.AuxInt = int32ToAuxInt(3)
  7473  		v1.AddArg2(x, x)
  7474  		v0.AddArg(v1)
  7475  		v.AddArg2(v0, a)
  7476  		return true
  7477  	}
  7478  	// match: (MULA (MOVWconst [c]) x a)
  7479  	// cond: c%9 == 0 && isPowerOfTwo32(c/9)
  7480  	// result: (ADD (SLLconst <x.Type> [int32(log32(c/9))] (ADDshiftLL <x.Type> x x [3])) a)
  7481  	for {
  7482  		if v_0.Op != OpARMMOVWconst {
  7483  			break
  7484  		}
  7485  		c := auxIntToInt32(v_0.AuxInt)
  7486  		x := v_1
  7487  		a := v_2
  7488  		if !(c%9 == 0 && isPowerOfTwo32(c/9)) {
  7489  			break
  7490  		}
  7491  		v.reset(OpARMADD)
  7492  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  7493  		v0.AuxInt = int32ToAuxInt(int32(log32(c / 9)))
  7494  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  7495  		v1.AuxInt = int32ToAuxInt(3)
  7496  		v1.AddArg2(x, x)
  7497  		v0.AddArg(v1)
  7498  		v.AddArg2(v0, a)
  7499  		return true
  7500  	}
  7501  	// match: (MULA (MOVWconst [c]) (MOVWconst [d]) a)
  7502  	// result: (ADDconst [c*d] a)
  7503  	for {
  7504  		if v_0.Op != OpARMMOVWconst {
  7505  			break
  7506  		}
  7507  		c := auxIntToInt32(v_0.AuxInt)
  7508  		if v_1.Op != OpARMMOVWconst {
  7509  			break
  7510  		}
  7511  		d := auxIntToInt32(v_1.AuxInt)
  7512  		a := v_2
  7513  		v.reset(OpARMADDconst)
  7514  		v.AuxInt = int32ToAuxInt(c * d)
  7515  		v.AddArg(a)
  7516  		return true
  7517  	}
  7518  	return false
  7519  }
  7520  func rewriteValueARM_OpARMMULD(v *Value) bool {
  7521  	v_1 := v.Args[1]
  7522  	v_0 := v.Args[0]
  7523  	// match: (MULD (NEGD x) y)
  7524  	// cond: objabi.GOARM >= 6
  7525  	// result: (NMULD x y)
  7526  	for {
  7527  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7528  			if v_0.Op != OpARMNEGD {
  7529  				continue
  7530  			}
  7531  			x := v_0.Args[0]
  7532  			y := v_1
  7533  			if !(objabi.GOARM >= 6) {
  7534  				continue
  7535  			}
  7536  			v.reset(OpARMNMULD)
  7537  			v.AddArg2(x, y)
  7538  			return true
  7539  		}
  7540  		break
  7541  	}
  7542  	return false
  7543  }
  7544  func rewriteValueARM_OpARMMULF(v *Value) bool {
  7545  	v_1 := v.Args[1]
  7546  	v_0 := v.Args[0]
  7547  	// match: (MULF (NEGF x) y)
  7548  	// cond: objabi.GOARM >= 6
  7549  	// result: (NMULF x y)
  7550  	for {
  7551  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7552  			if v_0.Op != OpARMNEGF {
  7553  				continue
  7554  			}
  7555  			x := v_0.Args[0]
  7556  			y := v_1
  7557  			if !(objabi.GOARM >= 6) {
  7558  				continue
  7559  			}
  7560  			v.reset(OpARMNMULF)
  7561  			v.AddArg2(x, y)
  7562  			return true
  7563  		}
  7564  		break
  7565  	}
  7566  	return false
  7567  }
  7568  func rewriteValueARM_OpARMMULS(v *Value) bool {
  7569  	v_2 := v.Args[2]
  7570  	v_1 := v.Args[1]
  7571  	v_0 := v.Args[0]
  7572  	b := v.Block
  7573  	// match: (MULS x (MOVWconst [c]) a)
  7574  	// cond: c == -1
  7575  	// result: (ADD a x)
  7576  	for {
  7577  		x := v_0
  7578  		if v_1.Op != OpARMMOVWconst {
  7579  			break
  7580  		}
  7581  		c := auxIntToInt32(v_1.AuxInt)
  7582  		a := v_2
  7583  		if !(c == -1) {
  7584  			break
  7585  		}
  7586  		v.reset(OpARMADD)
  7587  		v.AddArg2(a, x)
  7588  		return true
  7589  	}
  7590  	// match: (MULS _ (MOVWconst [0]) a)
  7591  	// result: a
  7592  	for {
  7593  		if v_1.Op != OpARMMOVWconst || auxIntToInt32(v_1.AuxInt) != 0 {
  7594  			break
  7595  		}
  7596  		a := v_2
  7597  		v.copyOf(a)
  7598  		return true
  7599  	}
  7600  	// match: (MULS x (MOVWconst [1]) a)
  7601  	// result: (RSB x a)
  7602  	for {
  7603  		x := v_0
  7604  		if v_1.Op != OpARMMOVWconst || auxIntToInt32(v_1.AuxInt) != 1 {
  7605  			break
  7606  		}
  7607  		a := v_2
  7608  		v.reset(OpARMRSB)
  7609  		v.AddArg2(x, a)
  7610  		return true
  7611  	}
  7612  	// match: (MULS x (MOVWconst [c]) a)
  7613  	// cond: isPowerOfTwo32(c)
  7614  	// result: (RSB (SLLconst <x.Type> [int32(log32(c))] x) a)
  7615  	for {
  7616  		x := v_0
  7617  		if v_1.Op != OpARMMOVWconst {
  7618  			break
  7619  		}
  7620  		c := auxIntToInt32(v_1.AuxInt)
  7621  		a := v_2
  7622  		if !(isPowerOfTwo32(c)) {
  7623  			break
  7624  		}
  7625  		v.reset(OpARMRSB)
  7626  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  7627  		v0.AuxInt = int32ToAuxInt(int32(log32(c)))
  7628  		v0.AddArg(x)
  7629  		v.AddArg2(v0, a)
  7630  		return true
  7631  	}
  7632  	// match: (MULS x (MOVWconst [c]) a)
  7633  	// cond: isPowerOfTwo32(c-1) && c >= 3
  7634  	// result: (RSB (ADDshiftLL <x.Type> x x [int32(log32(c-1))]) a)
  7635  	for {
  7636  		x := v_0
  7637  		if v_1.Op != OpARMMOVWconst {
  7638  			break
  7639  		}
  7640  		c := auxIntToInt32(v_1.AuxInt)
  7641  		a := v_2
  7642  		if !(isPowerOfTwo32(c-1) && c >= 3) {
  7643  			break
  7644  		}
  7645  		v.reset(OpARMRSB)
  7646  		v0 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  7647  		v0.AuxInt = int32ToAuxInt(int32(log32(c - 1)))
  7648  		v0.AddArg2(x, x)
  7649  		v.AddArg2(v0, a)
  7650  		return true
  7651  	}
  7652  	// match: (MULS x (MOVWconst [c]) a)
  7653  	// cond: isPowerOfTwo32(c+1) && c >= 7
  7654  	// result: (RSB (RSBshiftLL <x.Type> x x [int32(log32(c+1))]) a)
  7655  	for {
  7656  		x := v_0
  7657  		if v_1.Op != OpARMMOVWconst {
  7658  			break
  7659  		}
  7660  		c := auxIntToInt32(v_1.AuxInt)
  7661  		a := v_2
  7662  		if !(isPowerOfTwo32(c+1) && c >= 7) {
  7663  			break
  7664  		}
  7665  		v.reset(OpARMRSB)
  7666  		v0 := b.NewValue0(v.Pos, OpARMRSBshiftLL, x.Type)
  7667  		v0.AuxInt = int32ToAuxInt(int32(log32(c + 1)))
  7668  		v0.AddArg2(x, x)
  7669  		v.AddArg2(v0, a)
  7670  		return true
  7671  	}
  7672  	// match: (MULS x (MOVWconst [c]) a)
  7673  	// cond: c%3 == 0 && isPowerOfTwo32(c/3)
  7674  	// result: (RSB (SLLconst <x.Type> [int32(log32(c/3))] (ADDshiftLL <x.Type> x x [1])) a)
  7675  	for {
  7676  		x := v_0
  7677  		if v_1.Op != OpARMMOVWconst {
  7678  			break
  7679  		}
  7680  		c := auxIntToInt32(v_1.AuxInt)
  7681  		a := v_2
  7682  		if !(c%3 == 0 && isPowerOfTwo32(c/3)) {
  7683  			break
  7684  		}
  7685  		v.reset(OpARMRSB)
  7686  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  7687  		v0.AuxInt = int32ToAuxInt(int32(log32(c / 3)))
  7688  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  7689  		v1.AuxInt = int32ToAuxInt(1)
  7690  		v1.AddArg2(x, x)
  7691  		v0.AddArg(v1)
  7692  		v.AddArg2(v0, a)
  7693  		return true
  7694  	}
  7695  	// match: (MULS x (MOVWconst [c]) a)
  7696  	// cond: c%5 == 0 && isPowerOfTwo32(c/5)
  7697  	// result: (RSB (SLLconst <x.Type> [int32(log32(c/5))] (ADDshiftLL <x.Type> x x [2])) a)
  7698  	for {
  7699  		x := v_0
  7700  		if v_1.Op != OpARMMOVWconst {
  7701  			break
  7702  		}
  7703  		c := auxIntToInt32(v_1.AuxInt)
  7704  		a := v_2
  7705  		if !(c%5 == 0 && isPowerOfTwo32(c/5)) {
  7706  			break
  7707  		}
  7708  		v.reset(OpARMRSB)
  7709  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  7710  		v0.AuxInt = int32ToAuxInt(int32(log32(c / 5)))
  7711  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  7712  		v1.AuxInt = int32ToAuxInt(2)
  7713  		v1.AddArg2(x, x)
  7714  		v0.AddArg(v1)
  7715  		v.AddArg2(v0, a)
  7716  		return true
  7717  	}
  7718  	// match: (MULS x (MOVWconst [c]) a)
  7719  	// cond: c%7 == 0 && isPowerOfTwo32(c/7)
  7720  	// result: (RSB (SLLconst <x.Type> [int32(log32(c/7))] (RSBshiftLL <x.Type> x x [3])) a)
  7721  	for {
  7722  		x := v_0
  7723  		if v_1.Op != OpARMMOVWconst {
  7724  			break
  7725  		}
  7726  		c := auxIntToInt32(v_1.AuxInt)
  7727  		a := v_2
  7728  		if !(c%7 == 0 && isPowerOfTwo32(c/7)) {
  7729  			break
  7730  		}
  7731  		v.reset(OpARMRSB)
  7732  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  7733  		v0.AuxInt = int32ToAuxInt(int32(log32(c / 7)))
  7734  		v1 := b.NewValue0(v.Pos, OpARMRSBshiftLL, x.Type)
  7735  		v1.AuxInt = int32ToAuxInt(3)
  7736  		v1.AddArg2(x, x)
  7737  		v0.AddArg(v1)
  7738  		v.AddArg2(v0, a)
  7739  		return true
  7740  	}
  7741  	// match: (MULS x (MOVWconst [c]) a)
  7742  	// cond: c%9 == 0 && isPowerOfTwo32(c/9)
  7743  	// result: (RSB (SLLconst <x.Type> [int32(log32(c/9))] (ADDshiftLL <x.Type> x x [3])) a)
  7744  	for {
  7745  		x := v_0
  7746  		if v_1.Op != OpARMMOVWconst {
  7747  			break
  7748  		}
  7749  		c := auxIntToInt32(v_1.AuxInt)
  7750  		a := v_2
  7751  		if !(c%9 == 0 && isPowerOfTwo32(c/9)) {
  7752  			break
  7753  		}
  7754  		v.reset(OpARMRSB)
  7755  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  7756  		v0.AuxInt = int32ToAuxInt(int32(log32(c / 9)))
  7757  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  7758  		v1.AuxInt = int32ToAuxInt(3)
  7759  		v1.AddArg2(x, x)
  7760  		v0.AddArg(v1)
  7761  		v.AddArg2(v0, a)
  7762  		return true
  7763  	}
  7764  	// match: (MULS (MOVWconst [c]) x a)
  7765  	// cond: c == -1
  7766  	// result: (ADD a x)
  7767  	for {
  7768  		if v_0.Op != OpARMMOVWconst {
  7769  			break
  7770  		}
  7771  		c := auxIntToInt32(v_0.AuxInt)
  7772  		x := v_1
  7773  		a := v_2
  7774  		if !(c == -1) {
  7775  			break
  7776  		}
  7777  		v.reset(OpARMADD)
  7778  		v.AddArg2(a, x)
  7779  		return true
  7780  	}
  7781  	// match: (MULS (MOVWconst [0]) _ a)
  7782  	// result: a
  7783  	for {
  7784  		if v_0.Op != OpARMMOVWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  7785  			break
  7786  		}
  7787  		a := v_2
  7788  		v.copyOf(a)
  7789  		return true
  7790  	}
  7791  	// match: (MULS (MOVWconst [1]) x a)
  7792  	// result: (RSB x a)
  7793  	for {
  7794  		if v_0.Op != OpARMMOVWconst || auxIntToInt32(v_0.AuxInt) != 1 {
  7795  			break
  7796  		}
  7797  		x := v_1
  7798  		a := v_2
  7799  		v.reset(OpARMRSB)
  7800  		v.AddArg2(x, a)
  7801  		return true
  7802  	}
  7803  	// match: (MULS (MOVWconst [c]) x a)
  7804  	// cond: isPowerOfTwo32(c)
  7805  	// result: (RSB (SLLconst <x.Type> [int32(log32(c))] x) a)
  7806  	for {
  7807  		if v_0.Op != OpARMMOVWconst {
  7808  			break
  7809  		}
  7810  		c := auxIntToInt32(v_0.AuxInt)
  7811  		x := v_1
  7812  		a := v_2
  7813  		if !(isPowerOfTwo32(c)) {
  7814  			break
  7815  		}
  7816  		v.reset(OpARMRSB)
  7817  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  7818  		v0.AuxInt = int32ToAuxInt(int32(log32(c)))
  7819  		v0.AddArg(x)
  7820  		v.AddArg2(v0, a)
  7821  		return true
  7822  	}
  7823  	// match: (MULS (MOVWconst [c]) x a)
  7824  	// cond: isPowerOfTwo32(c-1) && c >= 3
  7825  	// result: (RSB (ADDshiftLL <x.Type> x x [int32(log32(c-1))]) a)
  7826  	for {
  7827  		if v_0.Op != OpARMMOVWconst {
  7828  			break
  7829  		}
  7830  		c := auxIntToInt32(v_0.AuxInt)
  7831  		x := v_1
  7832  		a := v_2
  7833  		if !(isPowerOfTwo32(c-1) && c >= 3) {
  7834  			break
  7835  		}
  7836  		v.reset(OpARMRSB)
  7837  		v0 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  7838  		v0.AuxInt = int32ToAuxInt(int32(log32(c - 1)))
  7839  		v0.AddArg2(x, x)
  7840  		v.AddArg2(v0, a)
  7841  		return true
  7842  	}
  7843  	// match: (MULS (MOVWconst [c]) x a)
  7844  	// cond: isPowerOfTwo32(c+1) && c >= 7
  7845  	// result: (RSB (RSBshiftLL <x.Type> x x [int32(log32(c+1))]) a)
  7846  	for {
  7847  		if v_0.Op != OpARMMOVWconst {
  7848  			break
  7849  		}
  7850  		c := auxIntToInt32(v_0.AuxInt)
  7851  		x := v_1
  7852  		a := v_2
  7853  		if !(isPowerOfTwo32(c+1) && c >= 7) {
  7854  			break
  7855  		}
  7856  		v.reset(OpARMRSB)
  7857  		v0 := b.NewValue0(v.Pos, OpARMRSBshiftLL, x.Type)
  7858  		v0.AuxInt = int32ToAuxInt(int32(log32(c + 1)))
  7859  		v0.AddArg2(x, x)
  7860  		v.AddArg2(v0, a)
  7861  		return true
  7862  	}
  7863  	// match: (MULS (MOVWconst [c]) x a)
  7864  	// cond: c%3 == 0 && isPowerOfTwo32(c/3)
  7865  	// result: (RSB (SLLconst <x.Type> [int32(log32(c/3))] (ADDshiftLL <x.Type> x x [1])) a)
  7866  	for {
  7867  		if v_0.Op != OpARMMOVWconst {
  7868  			break
  7869  		}
  7870  		c := auxIntToInt32(v_0.AuxInt)
  7871  		x := v_1
  7872  		a := v_2
  7873  		if !(c%3 == 0 && isPowerOfTwo32(c/3)) {
  7874  			break
  7875  		}
  7876  		v.reset(OpARMRSB)
  7877  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  7878  		v0.AuxInt = int32ToAuxInt(int32(log32(c / 3)))
  7879  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  7880  		v1.AuxInt = int32ToAuxInt(1)
  7881  		v1.AddArg2(x, x)
  7882  		v0.AddArg(v1)
  7883  		v.AddArg2(v0, a)
  7884  		return true
  7885  	}
  7886  	// match: (MULS (MOVWconst [c]) x a)
  7887  	// cond: c%5 == 0 && isPowerOfTwo32(c/5)
  7888  	// result: (RSB (SLLconst <x.Type> [int32(log32(c/5))] (ADDshiftLL <x.Type> x x [2])) a)
  7889  	for {
  7890  		if v_0.Op != OpARMMOVWconst {
  7891  			break
  7892  		}
  7893  		c := auxIntToInt32(v_0.AuxInt)
  7894  		x := v_1
  7895  		a := v_2
  7896  		if !(c%5 == 0 && isPowerOfTwo32(c/5)) {
  7897  			break
  7898  		}
  7899  		v.reset(OpARMRSB)
  7900  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  7901  		v0.AuxInt = int32ToAuxInt(int32(log32(c / 5)))
  7902  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  7903  		v1.AuxInt = int32ToAuxInt(2)
  7904  		v1.AddArg2(x, x)
  7905  		v0.AddArg(v1)
  7906  		v.AddArg2(v0, a)
  7907  		return true
  7908  	}
  7909  	// match: (MULS (MOVWconst [c]) x a)
  7910  	// cond: c%7 == 0 && isPowerOfTwo32(c/7)
  7911  	// result: (RSB (SLLconst <x.Type> [int32(log32(c/7))] (RSBshiftLL <x.Type> x x [3])) a)
  7912  	for {
  7913  		if v_0.Op != OpARMMOVWconst {
  7914  			break
  7915  		}
  7916  		c := auxIntToInt32(v_0.AuxInt)
  7917  		x := v_1
  7918  		a := v_2
  7919  		if !(c%7 == 0 && isPowerOfTwo32(c/7)) {
  7920  			break
  7921  		}
  7922  		v.reset(OpARMRSB)
  7923  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  7924  		v0.AuxInt = int32ToAuxInt(int32(log32(c / 7)))
  7925  		v1 := b.NewValue0(v.Pos, OpARMRSBshiftLL, x.Type)
  7926  		v1.AuxInt = int32ToAuxInt(3)
  7927  		v1.AddArg2(x, x)
  7928  		v0.AddArg(v1)
  7929  		v.AddArg2(v0, a)
  7930  		return true
  7931  	}
  7932  	// match: (MULS (MOVWconst [c]) x a)
  7933  	// cond: c%9 == 0 && isPowerOfTwo32(c/9)
  7934  	// result: (RSB (SLLconst <x.Type> [int32(log32(c/9))] (ADDshiftLL <x.Type> x x [3])) a)
  7935  	for {
  7936  		if v_0.Op != OpARMMOVWconst {
  7937  			break
  7938  		}
  7939  		c := auxIntToInt32(v_0.AuxInt)
  7940  		x := v_1
  7941  		a := v_2
  7942  		if !(c%9 == 0 && isPowerOfTwo32(c/9)) {
  7943  			break
  7944  		}
  7945  		v.reset(OpARMRSB)
  7946  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  7947  		v0.AuxInt = int32ToAuxInt(int32(log32(c / 9)))
  7948  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  7949  		v1.AuxInt = int32ToAuxInt(3)
  7950  		v1.AddArg2(x, x)
  7951  		v0.AddArg(v1)
  7952  		v.AddArg2(v0, a)
  7953  		return true
  7954  	}
  7955  	// match: (MULS (MOVWconst [c]) (MOVWconst [d]) a)
  7956  	// result: (SUBconst [c*d] a)
  7957  	for {
  7958  		if v_0.Op != OpARMMOVWconst {
  7959  			break
  7960  		}
  7961  		c := auxIntToInt32(v_0.AuxInt)
  7962  		if v_1.Op != OpARMMOVWconst {
  7963  			break
  7964  		}
  7965  		d := auxIntToInt32(v_1.AuxInt)
  7966  		a := v_2
  7967  		v.reset(OpARMSUBconst)
  7968  		v.AuxInt = int32ToAuxInt(c * d)
  7969  		v.AddArg(a)
  7970  		return true
  7971  	}
  7972  	return false
  7973  }
  7974  func rewriteValueARM_OpARMMVN(v *Value) bool {
  7975  	v_0 := v.Args[0]
  7976  	// match: (MVN (MOVWconst [c]))
  7977  	// result: (MOVWconst [^c])
  7978  	for {
  7979  		if v_0.Op != OpARMMOVWconst {
  7980  			break
  7981  		}
  7982  		c := auxIntToInt32(v_0.AuxInt)
  7983  		v.reset(OpARMMOVWconst)
  7984  		v.AuxInt = int32ToAuxInt(^c)
  7985  		return true
  7986  	}
  7987  	// match: (MVN (SLLconst [c] x))
  7988  	// result: (MVNshiftLL x [c])
  7989  	for {
  7990  		if v_0.Op != OpARMSLLconst {
  7991  			break
  7992  		}
  7993  		c := auxIntToInt32(v_0.AuxInt)
  7994  		x := v_0.Args[0]
  7995  		v.reset(OpARMMVNshiftLL)
  7996  		v.AuxInt = int32ToAuxInt(c)
  7997  		v.AddArg(x)
  7998  		return true
  7999  	}
  8000  	// match: (MVN (SRLconst [c] x))
  8001  	// result: (MVNshiftRL x [c])
  8002  	for {
  8003  		if v_0.Op != OpARMSRLconst {
  8004  			break
  8005  		}
  8006  		c := auxIntToInt32(v_0.AuxInt)
  8007  		x := v_0.Args[0]
  8008  		v.reset(OpARMMVNshiftRL)
  8009  		v.AuxInt = int32ToAuxInt(c)
  8010  		v.AddArg(x)
  8011  		return true
  8012  	}
  8013  	// match: (MVN (SRAconst [c] x))
  8014  	// result: (MVNshiftRA x [c])
  8015  	for {
  8016  		if v_0.Op != OpARMSRAconst {
  8017  			break
  8018  		}
  8019  		c := auxIntToInt32(v_0.AuxInt)
  8020  		x := v_0.Args[0]
  8021  		v.reset(OpARMMVNshiftRA)
  8022  		v.AuxInt = int32ToAuxInt(c)
  8023  		v.AddArg(x)
  8024  		return true
  8025  	}
  8026  	// match: (MVN (SLL x y))
  8027  	// result: (MVNshiftLLreg x y)
  8028  	for {
  8029  		if v_0.Op != OpARMSLL {
  8030  			break
  8031  		}
  8032  		y := v_0.Args[1]
  8033  		x := v_0.Args[0]
  8034  		v.reset(OpARMMVNshiftLLreg)
  8035  		v.AddArg2(x, y)
  8036  		return true
  8037  	}
  8038  	// match: (MVN (SRL x y))
  8039  	// result: (MVNshiftRLreg x y)
  8040  	for {
  8041  		if v_0.Op != OpARMSRL {
  8042  			break
  8043  		}
  8044  		y := v_0.Args[1]
  8045  		x := v_0.Args[0]
  8046  		v.reset(OpARMMVNshiftRLreg)
  8047  		v.AddArg2(x, y)
  8048  		return true
  8049  	}
  8050  	// match: (MVN (SRA x y))
  8051  	// result: (MVNshiftRAreg x y)
  8052  	for {
  8053  		if v_0.Op != OpARMSRA {
  8054  			break
  8055  		}
  8056  		y := v_0.Args[1]
  8057  		x := v_0.Args[0]
  8058  		v.reset(OpARMMVNshiftRAreg)
  8059  		v.AddArg2(x, y)
  8060  		return true
  8061  	}
  8062  	return false
  8063  }
  8064  func rewriteValueARM_OpARMMVNshiftLL(v *Value) bool {
  8065  	v_0 := v.Args[0]
  8066  	// match: (MVNshiftLL (MOVWconst [c]) [d])
  8067  	// result: (MOVWconst [^(c<<uint64(d))])
  8068  	for {
  8069  		d := auxIntToInt32(v.AuxInt)
  8070  		if v_0.Op != OpARMMOVWconst {
  8071  			break
  8072  		}
  8073  		c := auxIntToInt32(v_0.AuxInt)
  8074  		v.reset(OpARMMOVWconst)
  8075  		v.AuxInt = int32ToAuxInt(^(c << uint64(d)))
  8076  		return true
  8077  	}
  8078  	return false
  8079  }
  8080  func rewriteValueARM_OpARMMVNshiftLLreg(v *Value) bool {
  8081  	v_1 := v.Args[1]
  8082  	v_0 := v.Args[0]
  8083  	// match: (MVNshiftLLreg x (MOVWconst [c]))
  8084  	// result: (MVNshiftLL x [c])
  8085  	for {
  8086  		x := v_0
  8087  		if v_1.Op != OpARMMOVWconst {
  8088  			break
  8089  		}
  8090  		c := auxIntToInt32(v_1.AuxInt)
  8091  		v.reset(OpARMMVNshiftLL)
  8092  		v.AuxInt = int32ToAuxInt(c)
  8093  		v.AddArg(x)
  8094  		return true
  8095  	}
  8096  	return false
  8097  }
  8098  func rewriteValueARM_OpARMMVNshiftRA(v *Value) bool {
  8099  	v_0 := v.Args[0]
  8100  	// match: (MVNshiftRA (MOVWconst [c]) [d])
  8101  	// result: (MOVWconst [int32(c)>>uint64(d)])
  8102  	for {
  8103  		d := auxIntToInt32(v.AuxInt)
  8104  		if v_0.Op != OpARMMOVWconst {
  8105  			break
  8106  		}
  8107  		c := auxIntToInt32(v_0.AuxInt)
  8108  		v.reset(OpARMMOVWconst)
  8109  		v.AuxInt = int32ToAuxInt(int32(c) >> uint64(d))
  8110  		return true
  8111  	}
  8112  	return false
  8113  }
  8114  func rewriteValueARM_OpARMMVNshiftRAreg(v *Value) bool {
  8115  	v_1 := v.Args[1]
  8116  	v_0 := v.Args[0]
  8117  	// match: (MVNshiftRAreg x (MOVWconst [c]))
  8118  	// result: (MVNshiftRA x [c])
  8119  	for {
  8120  		x := v_0
  8121  		if v_1.Op != OpARMMOVWconst {
  8122  			break
  8123  		}
  8124  		c := auxIntToInt32(v_1.AuxInt)
  8125  		v.reset(OpARMMVNshiftRA)
  8126  		v.AuxInt = int32ToAuxInt(c)
  8127  		v.AddArg(x)
  8128  		return true
  8129  	}
  8130  	return false
  8131  }
  8132  func rewriteValueARM_OpARMMVNshiftRL(v *Value) bool {
  8133  	v_0 := v.Args[0]
  8134  	// match: (MVNshiftRL (MOVWconst [c]) [d])
  8135  	// result: (MOVWconst [^int32(uint32(c)>>uint64(d))])
  8136  	for {
  8137  		d := auxIntToInt32(v.AuxInt)
  8138  		if v_0.Op != OpARMMOVWconst {
  8139  			break
  8140  		}
  8141  		c := auxIntToInt32(v_0.AuxInt)
  8142  		v.reset(OpARMMOVWconst)
  8143  		v.AuxInt = int32ToAuxInt(^int32(uint32(c) >> uint64(d)))
  8144  		return true
  8145  	}
  8146  	return false
  8147  }
  8148  func rewriteValueARM_OpARMMVNshiftRLreg(v *Value) bool {
  8149  	v_1 := v.Args[1]
  8150  	v_0 := v.Args[0]
  8151  	// match: (MVNshiftRLreg x (MOVWconst [c]))
  8152  	// result: (MVNshiftRL x [c])
  8153  	for {
  8154  		x := v_0
  8155  		if v_1.Op != OpARMMOVWconst {
  8156  			break
  8157  		}
  8158  		c := auxIntToInt32(v_1.AuxInt)
  8159  		v.reset(OpARMMVNshiftRL)
  8160  		v.AuxInt = int32ToAuxInt(c)
  8161  		v.AddArg(x)
  8162  		return true
  8163  	}
  8164  	return false
  8165  }
  8166  func rewriteValueARM_OpARMNEGD(v *Value) bool {
  8167  	v_0 := v.Args[0]
  8168  	// match: (NEGD (MULD x y))
  8169  	// cond: objabi.GOARM >= 6
  8170  	// result: (NMULD x y)
  8171  	for {
  8172  		if v_0.Op != OpARMMULD {
  8173  			break
  8174  		}
  8175  		y := v_0.Args[1]
  8176  		x := v_0.Args[0]
  8177  		if !(objabi.GOARM >= 6) {
  8178  			break
  8179  		}
  8180  		v.reset(OpARMNMULD)
  8181  		v.AddArg2(x, y)
  8182  		return true
  8183  	}
  8184  	return false
  8185  }
  8186  func rewriteValueARM_OpARMNEGF(v *Value) bool {
  8187  	v_0 := v.Args[0]
  8188  	// match: (NEGF (MULF x y))
  8189  	// cond: objabi.GOARM >= 6
  8190  	// result: (NMULF x y)
  8191  	for {
  8192  		if v_0.Op != OpARMMULF {
  8193  			break
  8194  		}
  8195  		y := v_0.Args[1]
  8196  		x := v_0.Args[0]
  8197  		if !(objabi.GOARM >= 6) {
  8198  			break
  8199  		}
  8200  		v.reset(OpARMNMULF)
  8201  		v.AddArg2(x, y)
  8202  		return true
  8203  	}
  8204  	return false
  8205  }
  8206  func rewriteValueARM_OpARMNMULD(v *Value) bool {
  8207  	v_1 := v.Args[1]
  8208  	v_0 := v.Args[0]
  8209  	// match: (NMULD (NEGD x) y)
  8210  	// result: (MULD x y)
  8211  	for {
  8212  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8213  			if v_0.Op != OpARMNEGD {
  8214  				continue
  8215  			}
  8216  			x := v_0.Args[0]
  8217  			y := v_1
  8218  			v.reset(OpARMMULD)
  8219  			v.AddArg2(x, y)
  8220  			return true
  8221  		}
  8222  		break
  8223  	}
  8224  	return false
  8225  }
  8226  func rewriteValueARM_OpARMNMULF(v *Value) bool {
  8227  	v_1 := v.Args[1]
  8228  	v_0 := v.Args[0]
  8229  	// match: (NMULF (NEGF x) y)
  8230  	// result: (MULF x y)
  8231  	for {
  8232  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8233  			if v_0.Op != OpARMNEGF {
  8234  				continue
  8235  			}
  8236  			x := v_0.Args[0]
  8237  			y := v_1
  8238  			v.reset(OpARMMULF)
  8239  			v.AddArg2(x, y)
  8240  			return true
  8241  		}
  8242  		break
  8243  	}
  8244  	return false
  8245  }
  8246  func rewriteValueARM_OpARMNotEqual(v *Value) bool {
  8247  	v_0 := v.Args[0]
  8248  	// match: (NotEqual (FlagConstant [fc]))
  8249  	// result: (MOVWconst [b2i32(fc.ne())])
  8250  	for {
  8251  		if v_0.Op != OpARMFlagConstant {
  8252  			break
  8253  		}
  8254  		fc := auxIntToFlagConstant(v_0.AuxInt)
  8255  		v.reset(OpARMMOVWconst)
  8256  		v.AuxInt = int32ToAuxInt(b2i32(fc.ne()))
  8257  		return true
  8258  	}
  8259  	// match: (NotEqual (InvertFlags x))
  8260  	// result: (NotEqual x)
  8261  	for {
  8262  		if v_0.Op != OpARMInvertFlags {
  8263  			break
  8264  		}
  8265  		x := v_0.Args[0]
  8266  		v.reset(OpARMNotEqual)
  8267  		v.AddArg(x)
  8268  		return true
  8269  	}
  8270  	return false
  8271  }
  8272  func rewriteValueARM_OpARMOR(v *Value) bool {
  8273  	v_1 := v.Args[1]
  8274  	v_0 := v.Args[0]
  8275  	// match: (OR x (MOVWconst [c]))
  8276  	// result: (ORconst [c] x)
  8277  	for {
  8278  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8279  			x := v_0
  8280  			if v_1.Op != OpARMMOVWconst {
  8281  				continue
  8282  			}
  8283  			c := auxIntToInt32(v_1.AuxInt)
  8284  			v.reset(OpARMORconst)
  8285  			v.AuxInt = int32ToAuxInt(c)
  8286  			v.AddArg(x)
  8287  			return true
  8288  		}
  8289  		break
  8290  	}
  8291  	// match: (OR x (SLLconst [c] y))
  8292  	// result: (ORshiftLL x y [c])
  8293  	for {
  8294  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8295  			x := v_0
  8296  			if v_1.Op != OpARMSLLconst {
  8297  				continue
  8298  			}
  8299  			c := auxIntToInt32(v_1.AuxInt)
  8300  			y := v_1.Args[0]
  8301  			v.reset(OpARMORshiftLL)
  8302  			v.AuxInt = int32ToAuxInt(c)
  8303  			v.AddArg2(x, y)
  8304  			return true
  8305  		}
  8306  		break
  8307  	}
  8308  	// match: (OR x (SRLconst [c] y))
  8309  	// result: (ORshiftRL x y [c])
  8310  	for {
  8311  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8312  			x := v_0
  8313  			if v_1.Op != OpARMSRLconst {
  8314  				continue
  8315  			}
  8316  			c := auxIntToInt32(v_1.AuxInt)
  8317  			y := v_1.Args[0]
  8318  			v.reset(OpARMORshiftRL)
  8319  			v.AuxInt = int32ToAuxInt(c)
  8320  			v.AddArg2(x, y)
  8321  			return true
  8322  		}
  8323  		break
  8324  	}
  8325  	// match: (OR x (SRAconst [c] y))
  8326  	// result: (ORshiftRA x y [c])
  8327  	for {
  8328  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8329  			x := v_0
  8330  			if v_1.Op != OpARMSRAconst {
  8331  				continue
  8332  			}
  8333  			c := auxIntToInt32(v_1.AuxInt)
  8334  			y := v_1.Args[0]
  8335  			v.reset(OpARMORshiftRA)
  8336  			v.AuxInt = int32ToAuxInt(c)
  8337  			v.AddArg2(x, y)
  8338  			return true
  8339  		}
  8340  		break
  8341  	}
  8342  	// match: (OR x (SLL y z))
  8343  	// result: (ORshiftLLreg x y z)
  8344  	for {
  8345  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8346  			x := v_0
  8347  			if v_1.Op != OpARMSLL {
  8348  				continue
  8349  			}
  8350  			z := v_1.Args[1]
  8351  			y := v_1.Args[0]
  8352  			v.reset(OpARMORshiftLLreg)
  8353  			v.AddArg3(x, y, z)
  8354  			return true
  8355  		}
  8356  		break
  8357  	}
  8358  	// match: (OR x (SRL y z))
  8359  	// result: (ORshiftRLreg x y z)
  8360  	for {
  8361  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8362  			x := v_0
  8363  			if v_1.Op != OpARMSRL {
  8364  				continue
  8365  			}
  8366  			z := v_1.Args[1]
  8367  			y := v_1.Args[0]
  8368  			v.reset(OpARMORshiftRLreg)
  8369  			v.AddArg3(x, y, z)
  8370  			return true
  8371  		}
  8372  		break
  8373  	}
  8374  	// match: (OR x (SRA y z))
  8375  	// result: (ORshiftRAreg x y z)
  8376  	for {
  8377  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8378  			x := v_0
  8379  			if v_1.Op != OpARMSRA {
  8380  				continue
  8381  			}
  8382  			z := v_1.Args[1]
  8383  			y := v_1.Args[0]
  8384  			v.reset(OpARMORshiftRAreg)
  8385  			v.AddArg3(x, y, z)
  8386  			return true
  8387  		}
  8388  		break
  8389  	}
  8390  	// match: (OR x x)
  8391  	// result: x
  8392  	for {
  8393  		x := v_0
  8394  		if x != v_1 {
  8395  			break
  8396  		}
  8397  		v.copyOf(x)
  8398  		return true
  8399  	}
  8400  	return false
  8401  }
  8402  func rewriteValueARM_OpARMORconst(v *Value) bool {
  8403  	v_0 := v.Args[0]
  8404  	// match: (ORconst [0] x)
  8405  	// result: x
  8406  	for {
  8407  		if auxIntToInt32(v.AuxInt) != 0 {
  8408  			break
  8409  		}
  8410  		x := v_0
  8411  		v.copyOf(x)
  8412  		return true
  8413  	}
  8414  	// match: (ORconst [c] _)
  8415  	// cond: int32(c)==-1
  8416  	// result: (MOVWconst [-1])
  8417  	for {
  8418  		c := auxIntToInt32(v.AuxInt)
  8419  		if !(int32(c) == -1) {
  8420  			break
  8421  		}
  8422  		v.reset(OpARMMOVWconst)
  8423  		v.AuxInt = int32ToAuxInt(-1)
  8424  		return true
  8425  	}
  8426  	// match: (ORconst [c] (MOVWconst [d]))
  8427  	// result: (MOVWconst [c|d])
  8428  	for {
  8429  		c := auxIntToInt32(v.AuxInt)
  8430  		if v_0.Op != OpARMMOVWconst {
  8431  			break
  8432  		}
  8433  		d := auxIntToInt32(v_0.AuxInt)
  8434  		v.reset(OpARMMOVWconst)
  8435  		v.AuxInt = int32ToAuxInt(c | d)
  8436  		return true
  8437  	}
  8438  	// match: (ORconst [c] (ORconst [d] x))
  8439  	// result: (ORconst [c|d] x)
  8440  	for {
  8441  		c := auxIntToInt32(v.AuxInt)
  8442  		if v_0.Op != OpARMORconst {
  8443  			break
  8444  		}
  8445  		d := auxIntToInt32(v_0.AuxInt)
  8446  		x := v_0.Args[0]
  8447  		v.reset(OpARMORconst)
  8448  		v.AuxInt = int32ToAuxInt(c | d)
  8449  		v.AddArg(x)
  8450  		return true
  8451  	}
  8452  	return false
  8453  }
  8454  func rewriteValueARM_OpARMORshiftLL(v *Value) bool {
  8455  	v_1 := v.Args[1]
  8456  	v_0 := v.Args[0]
  8457  	b := v.Block
  8458  	typ := &b.Func.Config.Types
  8459  	// match: (ORshiftLL (MOVWconst [c]) x [d])
  8460  	// result: (ORconst [c] (SLLconst <x.Type> x [d]))
  8461  	for {
  8462  		d := auxIntToInt32(v.AuxInt)
  8463  		if v_0.Op != OpARMMOVWconst {
  8464  			break
  8465  		}
  8466  		c := auxIntToInt32(v_0.AuxInt)
  8467  		x := v_1
  8468  		v.reset(OpARMORconst)
  8469  		v.AuxInt = int32ToAuxInt(c)
  8470  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  8471  		v0.AuxInt = int32ToAuxInt(d)
  8472  		v0.AddArg(x)
  8473  		v.AddArg(v0)
  8474  		return true
  8475  	}
  8476  	// match: (ORshiftLL x (MOVWconst [c]) [d])
  8477  	// result: (ORconst x [c<<uint64(d)])
  8478  	for {
  8479  		d := auxIntToInt32(v.AuxInt)
  8480  		x := v_0
  8481  		if v_1.Op != OpARMMOVWconst {
  8482  			break
  8483  		}
  8484  		c := auxIntToInt32(v_1.AuxInt)
  8485  		v.reset(OpARMORconst)
  8486  		v.AuxInt = int32ToAuxInt(c << uint64(d))
  8487  		v.AddArg(x)
  8488  		return true
  8489  	}
  8490  	// match: ( ORshiftLL [c] (SRLconst x [32-c]) x)
  8491  	// result: (SRRconst [32-c] x)
  8492  	for {
  8493  		c := auxIntToInt32(v.AuxInt)
  8494  		if v_0.Op != OpARMSRLconst || auxIntToInt32(v_0.AuxInt) != 32-c {
  8495  			break
  8496  		}
  8497  		x := v_0.Args[0]
  8498  		if x != v_1 {
  8499  			break
  8500  		}
  8501  		v.reset(OpARMSRRconst)
  8502  		v.AuxInt = int32ToAuxInt(32 - c)
  8503  		v.AddArg(x)
  8504  		return true
  8505  	}
  8506  	// match: (ORshiftLL <typ.UInt16> [8] (BFXU <typ.UInt16> [int32(armBFAuxInt(8, 8))] x) x)
  8507  	// result: (REV16 x)
  8508  	for {
  8509  		if v.Type != typ.UInt16 || auxIntToInt32(v.AuxInt) != 8 || v_0.Op != OpARMBFXU || v_0.Type != typ.UInt16 || auxIntToInt32(v_0.AuxInt) != int32(armBFAuxInt(8, 8)) {
  8510  			break
  8511  		}
  8512  		x := v_0.Args[0]
  8513  		if x != v_1 {
  8514  			break
  8515  		}
  8516  		v.reset(OpARMREV16)
  8517  		v.AddArg(x)
  8518  		return true
  8519  	}
  8520  	// match: (ORshiftLL <typ.UInt16> [8] (SRLconst <typ.UInt16> [24] (SLLconst [16] x)) x)
  8521  	// cond: objabi.GOARM>=6
  8522  	// result: (REV16 x)
  8523  	for {
  8524  		if v.Type != typ.UInt16 || auxIntToInt32(v.AuxInt) != 8 || v_0.Op != OpARMSRLconst || v_0.Type != typ.UInt16 || auxIntToInt32(v_0.AuxInt) != 24 {
  8525  			break
  8526  		}
  8527  		v_0_0 := v_0.Args[0]
  8528  		if v_0_0.Op != OpARMSLLconst || auxIntToInt32(v_0_0.AuxInt) != 16 {
  8529  			break
  8530  		}
  8531  		x := v_0_0.Args[0]
  8532  		if x != v_1 || !(objabi.GOARM >= 6) {
  8533  			break
  8534  		}
  8535  		v.reset(OpARMREV16)
  8536  		v.AddArg(x)
  8537  		return true
  8538  	}
  8539  	// match: (ORshiftLL x y:(SLLconst x [c]) [d])
  8540  	// cond: c==d
  8541  	// result: y
  8542  	for {
  8543  		d := auxIntToInt32(v.AuxInt)
  8544  		x := v_0
  8545  		y := v_1
  8546  		if y.Op != OpARMSLLconst {
  8547  			break
  8548  		}
  8549  		c := auxIntToInt32(y.AuxInt)
  8550  		if x != y.Args[0] || !(c == d) {
  8551  			break
  8552  		}
  8553  		v.copyOf(y)
  8554  		return true
  8555  	}
  8556  	return false
  8557  }
  8558  func rewriteValueARM_OpARMORshiftLLreg(v *Value) bool {
  8559  	v_2 := v.Args[2]
  8560  	v_1 := v.Args[1]
  8561  	v_0 := v.Args[0]
  8562  	b := v.Block
  8563  	// match: (ORshiftLLreg (MOVWconst [c]) x y)
  8564  	// result: (ORconst [c] (SLL <x.Type> x y))
  8565  	for {
  8566  		if v_0.Op != OpARMMOVWconst {
  8567  			break
  8568  		}
  8569  		c := auxIntToInt32(v_0.AuxInt)
  8570  		x := v_1
  8571  		y := v_2
  8572  		v.reset(OpARMORconst)
  8573  		v.AuxInt = int32ToAuxInt(c)
  8574  		v0 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
  8575  		v0.AddArg2(x, y)
  8576  		v.AddArg(v0)
  8577  		return true
  8578  	}
  8579  	// match: (ORshiftLLreg x y (MOVWconst [c]))
  8580  	// result: (ORshiftLL x y [c])
  8581  	for {
  8582  		x := v_0
  8583  		y := v_1
  8584  		if v_2.Op != OpARMMOVWconst {
  8585  			break
  8586  		}
  8587  		c := auxIntToInt32(v_2.AuxInt)
  8588  		v.reset(OpARMORshiftLL)
  8589  		v.AuxInt = int32ToAuxInt(c)
  8590  		v.AddArg2(x, y)
  8591  		return true
  8592  	}
  8593  	return false
  8594  }
  8595  func rewriteValueARM_OpARMORshiftRA(v *Value) bool {
  8596  	v_1 := v.Args[1]
  8597  	v_0 := v.Args[0]
  8598  	b := v.Block
  8599  	// match: (ORshiftRA (MOVWconst [c]) x [d])
  8600  	// result: (ORconst [c] (SRAconst <x.Type> x [d]))
  8601  	for {
  8602  		d := auxIntToInt32(v.AuxInt)
  8603  		if v_0.Op != OpARMMOVWconst {
  8604  			break
  8605  		}
  8606  		c := auxIntToInt32(v_0.AuxInt)
  8607  		x := v_1
  8608  		v.reset(OpARMORconst)
  8609  		v.AuxInt = int32ToAuxInt(c)
  8610  		v0 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
  8611  		v0.AuxInt = int32ToAuxInt(d)
  8612  		v0.AddArg(x)
  8613  		v.AddArg(v0)
  8614  		return true
  8615  	}
  8616  	// match: (ORshiftRA x (MOVWconst [c]) [d])
  8617  	// result: (ORconst x [c>>uint64(d)])
  8618  	for {
  8619  		d := auxIntToInt32(v.AuxInt)
  8620  		x := v_0
  8621  		if v_1.Op != OpARMMOVWconst {
  8622  			break
  8623  		}
  8624  		c := auxIntToInt32(v_1.AuxInt)
  8625  		v.reset(OpARMORconst)
  8626  		v.AuxInt = int32ToAuxInt(c >> uint64(d))
  8627  		v.AddArg(x)
  8628  		return true
  8629  	}
  8630  	// match: (ORshiftRA x y:(SRAconst x [c]) [d])
  8631  	// cond: c==d
  8632  	// result: y
  8633  	for {
  8634  		d := auxIntToInt32(v.AuxInt)
  8635  		x := v_0
  8636  		y := v_1
  8637  		if y.Op != OpARMSRAconst {
  8638  			break
  8639  		}
  8640  		c := auxIntToInt32(y.AuxInt)
  8641  		if x != y.Args[0] || !(c == d) {
  8642  			break
  8643  		}
  8644  		v.copyOf(y)
  8645  		return true
  8646  	}
  8647  	return false
  8648  }
  8649  func rewriteValueARM_OpARMORshiftRAreg(v *Value) bool {
  8650  	v_2 := v.Args[2]
  8651  	v_1 := v.Args[1]
  8652  	v_0 := v.Args[0]
  8653  	b := v.Block
  8654  	// match: (ORshiftRAreg (MOVWconst [c]) x y)
  8655  	// result: (ORconst [c] (SRA <x.Type> x y))
  8656  	for {
  8657  		if v_0.Op != OpARMMOVWconst {
  8658  			break
  8659  		}
  8660  		c := auxIntToInt32(v_0.AuxInt)
  8661  		x := v_1
  8662  		y := v_2
  8663  		v.reset(OpARMORconst)
  8664  		v.AuxInt = int32ToAuxInt(c)
  8665  		v0 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
  8666  		v0.AddArg2(x, y)
  8667  		v.AddArg(v0)
  8668  		return true
  8669  	}
  8670  	// match: (ORshiftRAreg x y (MOVWconst [c]))
  8671  	// result: (ORshiftRA x y [c])
  8672  	for {
  8673  		x := v_0
  8674  		y := v_1
  8675  		if v_2.Op != OpARMMOVWconst {
  8676  			break
  8677  		}
  8678  		c := auxIntToInt32(v_2.AuxInt)
  8679  		v.reset(OpARMORshiftRA)
  8680  		v.AuxInt = int32ToAuxInt(c)
  8681  		v.AddArg2(x, y)
  8682  		return true
  8683  	}
  8684  	return false
  8685  }
  8686  func rewriteValueARM_OpARMORshiftRL(v *Value) bool {
  8687  	v_1 := v.Args[1]
  8688  	v_0 := v.Args[0]
  8689  	b := v.Block
  8690  	// match: (ORshiftRL (MOVWconst [c]) x [d])
  8691  	// result: (ORconst [c] (SRLconst <x.Type> x [d]))
  8692  	for {
  8693  		d := auxIntToInt32(v.AuxInt)
  8694  		if v_0.Op != OpARMMOVWconst {
  8695  			break
  8696  		}
  8697  		c := auxIntToInt32(v_0.AuxInt)
  8698  		x := v_1
  8699  		v.reset(OpARMORconst)
  8700  		v.AuxInt = int32ToAuxInt(c)
  8701  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
  8702  		v0.AuxInt = int32ToAuxInt(d)
  8703  		v0.AddArg(x)
  8704  		v.AddArg(v0)
  8705  		return true
  8706  	}
  8707  	// match: (ORshiftRL x (MOVWconst [c]) [d])
  8708  	// result: (ORconst x [int32(uint32(c)>>uint64(d))])
  8709  	for {
  8710  		d := auxIntToInt32(v.AuxInt)
  8711  		x := v_0
  8712  		if v_1.Op != OpARMMOVWconst {
  8713  			break
  8714  		}
  8715  		c := auxIntToInt32(v_1.AuxInt)
  8716  		v.reset(OpARMORconst)
  8717  		v.AuxInt = int32ToAuxInt(int32(uint32(c) >> uint64(d)))
  8718  		v.AddArg(x)
  8719  		return true
  8720  	}
  8721  	// match: ( ORshiftRL [c] (SLLconst x [32-c]) x)
  8722  	// result: (SRRconst [ c] x)
  8723  	for {
  8724  		c := auxIntToInt32(v.AuxInt)
  8725  		if v_0.Op != OpARMSLLconst || auxIntToInt32(v_0.AuxInt) != 32-c {
  8726  			break
  8727  		}
  8728  		x := v_0.Args[0]
  8729  		if x != v_1 {
  8730  			break
  8731  		}
  8732  		v.reset(OpARMSRRconst)
  8733  		v.AuxInt = int32ToAuxInt(c)
  8734  		v.AddArg(x)
  8735  		return true
  8736  	}
  8737  	// match: (ORshiftRL x y:(SRLconst x [c]) [d])
  8738  	// cond: c==d
  8739  	// result: y
  8740  	for {
  8741  		d := auxIntToInt32(v.AuxInt)
  8742  		x := v_0
  8743  		y := v_1
  8744  		if y.Op != OpARMSRLconst {
  8745  			break
  8746  		}
  8747  		c := auxIntToInt32(y.AuxInt)
  8748  		if x != y.Args[0] || !(c == d) {
  8749  			break
  8750  		}
  8751  		v.copyOf(y)
  8752  		return true
  8753  	}
  8754  	return false
  8755  }
  8756  func rewriteValueARM_OpARMORshiftRLreg(v *Value) bool {
  8757  	v_2 := v.Args[2]
  8758  	v_1 := v.Args[1]
  8759  	v_0 := v.Args[0]
  8760  	b := v.Block
  8761  	// match: (ORshiftRLreg (MOVWconst [c]) x y)
  8762  	// result: (ORconst [c] (SRL <x.Type> x y))
  8763  	for {
  8764  		if v_0.Op != OpARMMOVWconst {
  8765  			break
  8766  		}
  8767  		c := auxIntToInt32(v_0.AuxInt)
  8768  		x := v_1
  8769  		y := v_2
  8770  		v.reset(OpARMORconst)
  8771  		v.AuxInt = int32ToAuxInt(c)
  8772  		v0 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
  8773  		v0.AddArg2(x, y)
  8774  		v.AddArg(v0)
  8775  		return true
  8776  	}
  8777  	// match: (ORshiftRLreg x y (MOVWconst [c]))
  8778  	// result: (ORshiftRL x y [c])
  8779  	for {
  8780  		x := v_0
  8781  		y := v_1
  8782  		if v_2.Op != OpARMMOVWconst {
  8783  			break
  8784  		}
  8785  		c := auxIntToInt32(v_2.AuxInt)
  8786  		v.reset(OpARMORshiftRL)
  8787  		v.AuxInt = int32ToAuxInt(c)
  8788  		v.AddArg2(x, y)
  8789  		return true
  8790  	}
  8791  	return false
  8792  }
  8793  func rewriteValueARM_OpARMRSB(v *Value) bool {
  8794  	v_1 := v.Args[1]
  8795  	v_0 := v.Args[0]
  8796  	// match: (RSB (MOVWconst [c]) x)
  8797  	// result: (SUBconst [c] x)
  8798  	for {
  8799  		if v_0.Op != OpARMMOVWconst {
  8800  			break
  8801  		}
  8802  		c := auxIntToInt32(v_0.AuxInt)
  8803  		x := v_1
  8804  		v.reset(OpARMSUBconst)
  8805  		v.AuxInt = int32ToAuxInt(c)
  8806  		v.AddArg(x)
  8807  		return true
  8808  	}
  8809  	// match: (RSB x (MOVWconst [c]))
  8810  	// result: (RSBconst [c] x)
  8811  	for {
  8812  		x := v_0
  8813  		if v_1.Op != OpARMMOVWconst {
  8814  			break
  8815  		}
  8816  		c := auxIntToInt32(v_1.AuxInt)
  8817  		v.reset(OpARMRSBconst)
  8818  		v.AuxInt = int32ToAuxInt(c)
  8819  		v.AddArg(x)
  8820  		return true
  8821  	}
  8822  	// match: (RSB x (SLLconst [c] y))
  8823  	// result: (RSBshiftLL x y [c])
  8824  	for {
  8825  		x := v_0
  8826  		if v_1.Op != OpARMSLLconst {
  8827  			break
  8828  		}
  8829  		c := auxIntToInt32(v_1.AuxInt)
  8830  		y := v_1.Args[0]
  8831  		v.reset(OpARMRSBshiftLL)
  8832  		v.AuxInt = int32ToAuxInt(c)
  8833  		v.AddArg2(x, y)
  8834  		return true
  8835  	}
  8836  	// match: (RSB (SLLconst [c] y) x)
  8837  	// result: (SUBshiftLL x y [c])
  8838  	for {
  8839  		if v_0.Op != OpARMSLLconst {
  8840  			break
  8841  		}
  8842  		c := auxIntToInt32(v_0.AuxInt)
  8843  		y := v_0.Args[0]
  8844  		x := v_1
  8845  		v.reset(OpARMSUBshiftLL)
  8846  		v.AuxInt = int32ToAuxInt(c)
  8847  		v.AddArg2(x, y)
  8848  		return true
  8849  	}
  8850  	// match: (RSB x (SRLconst [c] y))
  8851  	// result: (RSBshiftRL x y [c])
  8852  	for {
  8853  		x := v_0
  8854  		if v_1.Op != OpARMSRLconst {
  8855  			break
  8856  		}
  8857  		c := auxIntToInt32(v_1.AuxInt)
  8858  		y := v_1.Args[0]
  8859  		v.reset(OpARMRSBshiftRL)
  8860  		v.AuxInt = int32ToAuxInt(c)
  8861  		v.AddArg2(x, y)
  8862  		return true
  8863  	}
  8864  	// match: (RSB (SRLconst [c] y) x)
  8865  	// result: (SUBshiftRL x y [c])
  8866  	for {
  8867  		if v_0.Op != OpARMSRLconst {
  8868  			break
  8869  		}
  8870  		c := auxIntToInt32(v_0.AuxInt)
  8871  		y := v_0.Args[0]
  8872  		x := v_1
  8873  		v.reset(OpARMSUBshiftRL)
  8874  		v.AuxInt = int32ToAuxInt(c)
  8875  		v.AddArg2(x, y)
  8876  		return true
  8877  	}
  8878  	// match: (RSB x (SRAconst [c] y))
  8879  	// result: (RSBshiftRA x y [c])
  8880  	for {
  8881  		x := v_0
  8882  		if v_1.Op != OpARMSRAconst {
  8883  			break
  8884  		}
  8885  		c := auxIntToInt32(v_1.AuxInt)
  8886  		y := v_1.Args[0]
  8887  		v.reset(OpARMRSBshiftRA)
  8888  		v.AuxInt = int32ToAuxInt(c)
  8889  		v.AddArg2(x, y)
  8890  		return true
  8891  	}
  8892  	// match: (RSB (SRAconst [c] y) x)
  8893  	// result: (SUBshiftRA x y [c])
  8894  	for {
  8895  		if v_0.Op != OpARMSRAconst {
  8896  			break
  8897  		}
  8898  		c := auxIntToInt32(v_0.AuxInt)
  8899  		y := v_0.Args[0]
  8900  		x := v_1
  8901  		v.reset(OpARMSUBshiftRA)
  8902  		v.AuxInt = int32ToAuxInt(c)
  8903  		v.AddArg2(x, y)
  8904  		return true
  8905  	}
  8906  	// match: (RSB x (SLL y z))
  8907  	// result: (RSBshiftLLreg x y z)
  8908  	for {
  8909  		x := v_0
  8910  		if v_1.Op != OpARMSLL {
  8911  			break
  8912  		}
  8913  		z := v_1.Args[1]
  8914  		y := v_1.Args[0]
  8915  		v.reset(OpARMRSBshiftLLreg)
  8916  		v.AddArg3(x, y, z)
  8917  		return true
  8918  	}
  8919  	// match: (RSB (SLL y z) x)
  8920  	// result: (SUBshiftLLreg x y z)
  8921  	for {
  8922  		if v_0.Op != OpARMSLL {
  8923  			break
  8924  		}
  8925  		z := v_0.Args[1]
  8926  		y := v_0.Args[0]
  8927  		x := v_1
  8928  		v.reset(OpARMSUBshiftLLreg)
  8929  		v.AddArg3(x, y, z)
  8930  		return true
  8931  	}
  8932  	// match: (RSB x (SRL y z))
  8933  	// result: (RSBshiftRLreg x y z)
  8934  	for {
  8935  		x := v_0
  8936  		if v_1.Op != OpARMSRL {
  8937  			break
  8938  		}
  8939  		z := v_1.Args[1]
  8940  		y := v_1.Args[0]
  8941  		v.reset(OpARMRSBshiftRLreg)
  8942  		v.AddArg3(x, y, z)
  8943  		return true
  8944  	}
  8945  	// match: (RSB (SRL y z) x)
  8946  	// result: (SUBshiftRLreg x y z)
  8947  	for {
  8948  		if v_0.Op != OpARMSRL {
  8949  			break
  8950  		}
  8951  		z := v_0.Args[1]
  8952  		y := v_0.Args[0]
  8953  		x := v_1
  8954  		v.reset(OpARMSUBshiftRLreg)
  8955  		v.AddArg3(x, y, z)
  8956  		return true
  8957  	}
  8958  	// match: (RSB x (SRA y z))
  8959  	// result: (RSBshiftRAreg x y z)
  8960  	for {
  8961  		x := v_0
  8962  		if v_1.Op != OpARMSRA {
  8963  			break
  8964  		}
  8965  		z := v_1.Args[1]
  8966  		y := v_1.Args[0]
  8967  		v.reset(OpARMRSBshiftRAreg)
  8968  		v.AddArg3(x, y, z)
  8969  		return true
  8970  	}
  8971  	// match: (RSB (SRA y z) x)
  8972  	// result: (SUBshiftRAreg x y z)
  8973  	for {
  8974  		if v_0.Op != OpARMSRA {
  8975  			break
  8976  		}
  8977  		z := v_0.Args[1]
  8978  		y := v_0.Args[0]
  8979  		x := v_1
  8980  		v.reset(OpARMSUBshiftRAreg)
  8981  		v.AddArg3(x, y, z)
  8982  		return true
  8983  	}
  8984  	// match: (RSB x x)
  8985  	// result: (MOVWconst [0])
  8986  	for {
  8987  		x := v_0
  8988  		if x != v_1 {
  8989  			break
  8990  		}
  8991  		v.reset(OpARMMOVWconst)
  8992  		v.AuxInt = int32ToAuxInt(0)
  8993  		return true
  8994  	}
  8995  	// match: (RSB (MUL x y) a)
  8996  	// cond: objabi.GOARM == 7
  8997  	// result: (MULS x y a)
  8998  	for {
  8999  		if v_0.Op != OpARMMUL {
  9000  			break
  9001  		}
  9002  		y := v_0.Args[1]
  9003  		x := v_0.Args[0]
  9004  		a := v_1
  9005  		if !(objabi.GOARM == 7) {
  9006  			break
  9007  		}
  9008  		v.reset(OpARMMULS)
  9009  		v.AddArg3(x, y, a)
  9010  		return true
  9011  	}
  9012  	return false
  9013  }
  9014  func rewriteValueARM_OpARMRSBSshiftLL(v *Value) bool {
  9015  	v_1 := v.Args[1]
  9016  	v_0 := v.Args[0]
  9017  	b := v.Block
  9018  	// match: (RSBSshiftLL (MOVWconst [c]) x [d])
  9019  	// result: (SUBSconst [c] (SLLconst <x.Type> x [d]))
  9020  	for {
  9021  		d := auxIntToInt32(v.AuxInt)
  9022  		if v_0.Op != OpARMMOVWconst {
  9023  			break
  9024  		}
  9025  		c := auxIntToInt32(v_0.AuxInt)
  9026  		x := v_1
  9027  		v.reset(OpARMSUBSconst)
  9028  		v.AuxInt = int32ToAuxInt(c)
  9029  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  9030  		v0.AuxInt = int32ToAuxInt(d)
  9031  		v0.AddArg(x)
  9032  		v.AddArg(v0)
  9033  		return true
  9034  	}
  9035  	// match: (RSBSshiftLL x (MOVWconst [c]) [d])
  9036  	// result: (RSBSconst x [c<<uint64(d)])
  9037  	for {
  9038  		d := auxIntToInt32(v.AuxInt)
  9039  		x := v_0
  9040  		if v_1.Op != OpARMMOVWconst {
  9041  			break
  9042  		}
  9043  		c := auxIntToInt32(v_1.AuxInt)
  9044  		v.reset(OpARMRSBSconst)
  9045  		v.AuxInt = int32ToAuxInt(c << uint64(d))
  9046  		v.AddArg(x)
  9047  		return true
  9048  	}
  9049  	return false
  9050  }
  9051  func rewriteValueARM_OpARMRSBSshiftLLreg(v *Value) bool {
  9052  	v_2 := v.Args[2]
  9053  	v_1 := v.Args[1]
  9054  	v_0 := v.Args[0]
  9055  	b := v.Block
  9056  	// match: (RSBSshiftLLreg (MOVWconst [c]) x y)
  9057  	// result: (SUBSconst [c] (SLL <x.Type> x y))
  9058  	for {
  9059  		if v_0.Op != OpARMMOVWconst {
  9060  			break
  9061  		}
  9062  		c := auxIntToInt32(v_0.AuxInt)
  9063  		x := v_1
  9064  		y := v_2
  9065  		v.reset(OpARMSUBSconst)
  9066  		v.AuxInt = int32ToAuxInt(c)
  9067  		v0 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
  9068  		v0.AddArg2(x, y)
  9069  		v.AddArg(v0)
  9070  		return true
  9071  	}
  9072  	// match: (RSBSshiftLLreg x y (MOVWconst [c]))
  9073  	// result: (RSBSshiftLL x y [c])
  9074  	for {
  9075  		x := v_0
  9076  		y := v_1
  9077  		if v_2.Op != OpARMMOVWconst {
  9078  			break
  9079  		}
  9080  		c := auxIntToInt32(v_2.AuxInt)
  9081  		v.reset(OpARMRSBSshiftLL)
  9082  		v.AuxInt = int32ToAuxInt(c)
  9083  		v.AddArg2(x, y)
  9084  		return true
  9085  	}
  9086  	return false
  9087  }
  9088  func rewriteValueARM_OpARMRSBSshiftRA(v *Value) bool {
  9089  	v_1 := v.Args[1]
  9090  	v_0 := v.Args[0]
  9091  	b := v.Block
  9092  	// match: (RSBSshiftRA (MOVWconst [c]) x [d])
  9093  	// result: (SUBSconst [c] (SRAconst <x.Type> x [d]))
  9094  	for {
  9095  		d := auxIntToInt32(v.AuxInt)
  9096  		if v_0.Op != OpARMMOVWconst {
  9097  			break
  9098  		}
  9099  		c := auxIntToInt32(v_0.AuxInt)
  9100  		x := v_1
  9101  		v.reset(OpARMSUBSconst)
  9102  		v.AuxInt = int32ToAuxInt(c)
  9103  		v0 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
  9104  		v0.AuxInt = int32ToAuxInt(d)
  9105  		v0.AddArg(x)
  9106  		v.AddArg(v0)
  9107  		return true
  9108  	}
  9109  	// match: (RSBSshiftRA x (MOVWconst [c]) [d])
  9110  	// result: (RSBSconst x [c>>uint64(d)])
  9111  	for {
  9112  		d := auxIntToInt32(v.AuxInt)
  9113  		x := v_0
  9114  		if v_1.Op != OpARMMOVWconst {
  9115  			break
  9116  		}
  9117  		c := auxIntToInt32(v_1.AuxInt)
  9118  		v.reset(OpARMRSBSconst)
  9119  		v.AuxInt = int32ToAuxInt(c >> uint64(d))
  9120  		v.AddArg(x)
  9121  		return true
  9122  	}
  9123  	return false
  9124  }
  9125  func rewriteValueARM_OpARMRSBSshiftRAreg(v *Value) bool {
  9126  	v_2 := v.Args[2]
  9127  	v_1 := v.Args[1]
  9128  	v_0 := v.Args[0]
  9129  	b := v.Block
  9130  	// match: (RSBSshiftRAreg (MOVWconst [c]) x y)
  9131  	// result: (SUBSconst [c] (SRA <x.Type> x y))
  9132  	for {
  9133  		if v_0.Op != OpARMMOVWconst {
  9134  			break
  9135  		}
  9136  		c := auxIntToInt32(v_0.AuxInt)
  9137  		x := v_1
  9138  		y := v_2
  9139  		v.reset(OpARMSUBSconst)
  9140  		v.AuxInt = int32ToAuxInt(c)
  9141  		v0 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
  9142  		v0.AddArg2(x, y)
  9143  		v.AddArg(v0)
  9144  		return true
  9145  	}
  9146  	// match: (RSBSshiftRAreg x y (MOVWconst [c]))
  9147  	// result: (RSBSshiftRA x y [c])
  9148  	for {
  9149  		x := v_0
  9150  		y := v_1
  9151  		if v_2.Op != OpARMMOVWconst {
  9152  			break
  9153  		}
  9154  		c := auxIntToInt32(v_2.AuxInt)
  9155  		v.reset(OpARMRSBSshiftRA)
  9156  		v.AuxInt = int32ToAuxInt(c)
  9157  		v.AddArg2(x, y)
  9158  		return true
  9159  	}
  9160  	return false
  9161  }
  9162  func rewriteValueARM_OpARMRSBSshiftRL(v *Value) bool {
  9163  	v_1 := v.Args[1]
  9164  	v_0 := v.Args[0]
  9165  	b := v.Block
  9166  	// match: (RSBSshiftRL (MOVWconst [c]) x [d])
  9167  	// result: (SUBSconst [c] (SRLconst <x.Type> x [d]))
  9168  	for {
  9169  		d := auxIntToInt32(v.AuxInt)
  9170  		if v_0.Op != OpARMMOVWconst {
  9171  			break
  9172  		}
  9173  		c := auxIntToInt32(v_0.AuxInt)
  9174  		x := v_1
  9175  		v.reset(OpARMSUBSconst)
  9176  		v.AuxInt = int32ToAuxInt(c)
  9177  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
  9178  		v0.AuxInt = int32ToAuxInt(d)
  9179  		v0.AddArg(x)
  9180  		v.AddArg(v0)
  9181  		return true
  9182  	}
  9183  	// match: (RSBSshiftRL x (MOVWconst [c]) [d])
  9184  	// result: (RSBSconst x [int32(uint32(c)>>uint64(d))])
  9185  	for {
  9186  		d := auxIntToInt32(v.AuxInt)
  9187  		x := v_0
  9188  		if v_1.Op != OpARMMOVWconst {
  9189  			break
  9190  		}
  9191  		c := auxIntToInt32(v_1.AuxInt)
  9192  		v.reset(OpARMRSBSconst)
  9193  		v.AuxInt = int32ToAuxInt(int32(uint32(c) >> uint64(d)))
  9194  		v.AddArg(x)
  9195  		return true
  9196  	}
  9197  	return false
  9198  }
  9199  func rewriteValueARM_OpARMRSBSshiftRLreg(v *Value) bool {
  9200  	v_2 := v.Args[2]
  9201  	v_1 := v.Args[1]
  9202  	v_0 := v.Args[0]
  9203  	b := v.Block
  9204  	// match: (RSBSshiftRLreg (MOVWconst [c]) x y)
  9205  	// result: (SUBSconst [c] (SRL <x.Type> x y))
  9206  	for {
  9207  		if v_0.Op != OpARMMOVWconst {
  9208  			break
  9209  		}
  9210  		c := auxIntToInt32(v_0.AuxInt)
  9211  		x := v_1
  9212  		y := v_2
  9213  		v.reset(OpARMSUBSconst)
  9214  		v.AuxInt = int32ToAuxInt(c)
  9215  		v0 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
  9216  		v0.AddArg2(x, y)
  9217  		v.AddArg(v0)
  9218  		return true
  9219  	}
  9220  	// match: (RSBSshiftRLreg x y (MOVWconst [c]))
  9221  	// result: (RSBSshiftRL x y [c])
  9222  	for {
  9223  		x := v_0
  9224  		y := v_1
  9225  		if v_2.Op != OpARMMOVWconst {
  9226  			break
  9227  		}
  9228  		c := auxIntToInt32(v_2.AuxInt)
  9229  		v.reset(OpARMRSBSshiftRL)
  9230  		v.AuxInt = int32ToAuxInt(c)
  9231  		v.AddArg2(x, y)
  9232  		return true
  9233  	}
  9234  	return false
  9235  }
  9236  func rewriteValueARM_OpARMRSBconst(v *Value) bool {
  9237  	v_0 := v.Args[0]
  9238  	// match: (RSBconst [c] (MOVWconst [d]))
  9239  	// result: (MOVWconst [c-d])
  9240  	for {
  9241  		c := auxIntToInt32(v.AuxInt)
  9242  		if v_0.Op != OpARMMOVWconst {
  9243  			break
  9244  		}
  9245  		d := auxIntToInt32(v_0.AuxInt)
  9246  		v.reset(OpARMMOVWconst)
  9247  		v.AuxInt = int32ToAuxInt(c - d)
  9248  		return true
  9249  	}
  9250  	// match: (RSBconst [c] (RSBconst [d] x))
  9251  	// result: (ADDconst [c-d] x)
  9252  	for {
  9253  		c := auxIntToInt32(v.AuxInt)
  9254  		if v_0.Op != OpARMRSBconst {
  9255  			break
  9256  		}
  9257  		d := auxIntToInt32(v_0.AuxInt)
  9258  		x := v_0.Args[0]
  9259  		v.reset(OpARMADDconst)
  9260  		v.AuxInt = int32ToAuxInt(c - d)
  9261  		v.AddArg(x)
  9262  		return true
  9263  	}
  9264  	// match: (RSBconst [c] (ADDconst [d] x))
  9265  	// result: (RSBconst [c-d] x)
  9266  	for {
  9267  		c := auxIntToInt32(v.AuxInt)
  9268  		if v_0.Op != OpARMADDconst {
  9269  			break
  9270  		}
  9271  		d := auxIntToInt32(v_0.AuxInt)
  9272  		x := v_0.Args[0]
  9273  		v.reset(OpARMRSBconst)
  9274  		v.AuxInt = int32ToAuxInt(c - d)
  9275  		v.AddArg(x)
  9276  		return true
  9277  	}
  9278  	// match: (RSBconst [c] (SUBconst [d] x))
  9279  	// result: (RSBconst [c+d] x)
  9280  	for {
  9281  		c := auxIntToInt32(v.AuxInt)
  9282  		if v_0.Op != OpARMSUBconst {
  9283  			break
  9284  		}
  9285  		d := auxIntToInt32(v_0.AuxInt)
  9286  		x := v_0.Args[0]
  9287  		v.reset(OpARMRSBconst)
  9288  		v.AuxInt = int32ToAuxInt(c + d)
  9289  		v.AddArg(x)
  9290  		return true
  9291  	}
  9292  	return false
  9293  }
  9294  func rewriteValueARM_OpARMRSBshiftLL(v *Value) bool {
  9295  	v_1 := v.Args[1]
  9296  	v_0 := v.Args[0]
  9297  	b := v.Block
  9298  	// match: (RSBshiftLL (MOVWconst [c]) x [d])
  9299  	// result: (SUBconst [c] (SLLconst <x.Type> x [d]))
  9300  	for {
  9301  		d := auxIntToInt32(v.AuxInt)
  9302  		if v_0.Op != OpARMMOVWconst {
  9303  			break
  9304  		}
  9305  		c := auxIntToInt32(v_0.AuxInt)
  9306  		x := v_1
  9307  		v.reset(OpARMSUBconst)
  9308  		v.AuxInt = int32ToAuxInt(c)
  9309  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  9310  		v0.AuxInt = int32ToAuxInt(d)
  9311  		v0.AddArg(x)
  9312  		v.AddArg(v0)
  9313  		return true
  9314  	}
  9315  	// match: (RSBshiftLL x (MOVWconst [c]) [d])
  9316  	// result: (RSBconst x [c<<uint64(d)])
  9317  	for {
  9318  		d := auxIntToInt32(v.AuxInt)
  9319  		x := v_0
  9320  		if v_1.Op != OpARMMOVWconst {
  9321  			break
  9322  		}
  9323  		c := auxIntToInt32(v_1.AuxInt)
  9324  		v.reset(OpARMRSBconst)
  9325  		v.AuxInt = int32ToAuxInt(c << uint64(d))
  9326  		v.AddArg(x)
  9327  		return true
  9328  	}
  9329  	// match: (RSBshiftLL x (SLLconst x [c]) [d])
  9330  	// cond: c==d
  9331  	// result: (MOVWconst [0])
  9332  	for {
  9333  		d := auxIntToInt32(v.AuxInt)
  9334  		x := v_0
  9335  		if v_1.Op != OpARMSLLconst {
  9336  			break
  9337  		}
  9338  		c := auxIntToInt32(v_1.AuxInt)
  9339  		if x != v_1.Args[0] || !(c == d) {
  9340  			break
  9341  		}
  9342  		v.reset(OpARMMOVWconst)
  9343  		v.AuxInt = int32ToAuxInt(0)
  9344  		return true
  9345  	}
  9346  	return false
  9347  }
  9348  func rewriteValueARM_OpARMRSBshiftLLreg(v *Value) bool {
  9349  	v_2 := v.Args[2]
  9350  	v_1 := v.Args[1]
  9351  	v_0 := v.Args[0]
  9352  	b := v.Block
  9353  	// match: (RSBshiftLLreg (MOVWconst [c]) x y)
  9354  	// result: (SUBconst [c] (SLL <x.Type> x y))
  9355  	for {
  9356  		if v_0.Op != OpARMMOVWconst {
  9357  			break
  9358  		}
  9359  		c := auxIntToInt32(v_0.AuxInt)
  9360  		x := v_1
  9361  		y := v_2
  9362  		v.reset(OpARMSUBconst)
  9363  		v.AuxInt = int32ToAuxInt(c)
  9364  		v0 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
  9365  		v0.AddArg2(x, y)
  9366  		v.AddArg(v0)
  9367  		return true
  9368  	}
  9369  	// match: (RSBshiftLLreg x y (MOVWconst [c]))
  9370  	// result: (RSBshiftLL x y [c])
  9371  	for {
  9372  		x := v_0
  9373  		y := v_1
  9374  		if v_2.Op != OpARMMOVWconst {
  9375  			break
  9376  		}
  9377  		c := auxIntToInt32(v_2.AuxInt)
  9378  		v.reset(OpARMRSBshiftLL)
  9379  		v.AuxInt = int32ToAuxInt(c)
  9380  		v.AddArg2(x, y)
  9381  		return true
  9382  	}
  9383  	return false
  9384  }
  9385  func rewriteValueARM_OpARMRSBshiftRA(v *Value) bool {
  9386  	v_1 := v.Args[1]
  9387  	v_0 := v.Args[0]
  9388  	b := v.Block
  9389  	// match: (RSBshiftRA (MOVWconst [c]) x [d])
  9390  	// result: (SUBconst [c] (SRAconst <x.Type> x [d]))
  9391  	for {
  9392  		d := auxIntToInt32(v.AuxInt)
  9393  		if v_0.Op != OpARMMOVWconst {
  9394  			break
  9395  		}
  9396  		c := auxIntToInt32(v_0.AuxInt)
  9397  		x := v_1
  9398  		v.reset(OpARMSUBconst)
  9399  		v.AuxInt = int32ToAuxInt(c)
  9400  		v0 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
  9401  		v0.AuxInt = int32ToAuxInt(d)
  9402  		v0.AddArg(x)
  9403  		v.AddArg(v0)
  9404  		return true
  9405  	}
  9406  	// match: (RSBshiftRA x (MOVWconst [c]) [d])
  9407  	// result: (RSBconst x [c>>uint64(d)])
  9408  	for {
  9409  		d := auxIntToInt32(v.AuxInt)
  9410  		x := v_0
  9411  		if v_1.Op != OpARMMOVWconst {
  9412  			break
  9413  		}
  9414  		c := auxIntToInt32(v_1.AuxInt)
  9415  		v.reset(OpARMRSBconst)
  9416  		v.AuxInt = int32ToAuxInt(c >> uint64(d))
  9417  		v.AddArg(x)
  9418  		return true
  9419  	}
  9420  	// match: (RSBshiftRA x (SRAconst x [c]) [d])
  9421  	// cond: c==d
  9422  	// result: (MOVWconst [0])
  9423  	for {
  9424  		d := auxIntToInt32(v.AuxInt)
  9425  		x := v_0
  9426  		if v_1.Op != OpARMSRAconst {
  9427  			break
  9428  		}
  9429  		c := auxIntToInt32(v_1.AuxInt)
  9430  		if x != v_1.Args[0] || !(c == d) {
  9431  			break
  9432  		}
  9433  		v.reset(OpARMMOVWconst)
  9434  		v.AuxInt = int32ToAuxInt(0)
  9435  		return true
  9436  	}
  9437  	return false
  9438  }
  9439  func rewriteValueARM_OpARMRSBshiftRAreg(v *Value) bool {
  9440  	v_2 := v.Args[2]
  9441  	v_1 := v.Args[1]
  9442  	v_0 := v.Args[0]
  9443  	b := v.Block
  9444  	// match: (RSBshiftRAreg (MOVWconst [c]) x y)
  9445  	// result: (SUBconst [c] (SRA <x.Type> x y))
  9446  	for {
  9447  		if v_0.Op != OpARMMOVWconst {
  9448  			break
  9449  		}
  9450  		c := auxIntToInt32(v_0.AuxInt)
  9451  		x := v_1
  9452  		y := v_2
  9453  		v.reset(OpARMSUBconst)
  9454  		v.AuxInt = int32ToAuxInt(c)
  9455  		v0 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
  9456  		v0.AddArg2(x, y)
  9457  		v.AddArg(v0)
  9458  		return true
  9459  	}
  9460  	// match: (RSBshiftRAreg x y (MOVWconst [c]))
  9461  	// result: (RSBshiftRA x y [c])
  9462  	for {
  9463  		x := v_0
  9464  		y := v_1
  9465  		if v_2.Op != OpARMMOVWconst {
  9466  			break
  9467  		}
  9468  		c := auxIntToInt32(v_2.AuxInt)
  9469  		v.reset(OpARMRSBshiftRA)
  9470  		v.AuxInt = int32ToAuxInt(c)
  9471  		v.AddArg2(x, y)
  9472  		return true
  9473  	}
  9474  	return false
  9475  }
  9476  func rewriteValueARM_OpARMRSBshiftRL(v *Value) bool {
  9477  	v_1 := v.Args[1]
  9478  	v_0 := v.Args[0]
  9479  	b := v.Block
  9480  	// match: (RSBshiftRL (MOVWconst [c]) x [d])
  9481  	// result: (SUBconst [c] (SRLconst <x.Type> x [d]))
  9482  	for {
  9483  		d := auxIntToInt32(v.AuxInt)
  9484  		if v_0.Op != OpARMMOVWconst {
  9485  			break
  9486  		}
  9487  		c := auxIntToInt32(v_0.AuxInt)
  9488  		x := v_1
  9489  		v.reset(OpARMSUBconst)
  9490  		v.AuxInt = int32ToAuxInt(c)
  9491  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
  9492  		v0.AuxInt = int32ToAuxInt(d)
  9493  		v0.AddArg(x)
  9494  		v.AddArg(v0)
  9495  		return true
  9496  	}
  9497  	// match: (RSBshiftRL x (MOVWconst [c]) [d])
  9498  	// result: (RSBconst x [int32(uint32(c)>>uint64(d))])
  9499  	for {
  9500  		d := auxIntToInt32(v.AuxInt)
  9501  		x := v_0
  9502  		if v_1.Op != OpARMMOVWconst {
  9503  			break
  9504  		}
  9505  		c := auxIntToInt32(v_1.AuxInt)
  9506  		v.reset(OpARMRSBconst)
  9507  		v.AuxInt = int32ToAuxInt(int32(uint32(c) >> uint64(d)))
  9508  		v.AddArg(x)
  9509  		return true
  9510  	}
  9511  	// match: (RSBshiftRL x (SRLconst x [c]) [d])
  9512  	// cond: c==d
  9513  	// result: (MOVWconst [0])
  9514  	for {
  9515  		d := auxIntToInt32(v.AuxInt)
  9516  		x := v_0
  9517  		if v_1.Op != OpARMSRLconst {
  9518  			break
  9519  		}
  9520  		c := auxIntToInt32(v_1.AuxInt)
  9521  		if x != v_1.Args[0] || !(c == d) {
  9522  			break
  9523  		}
  9524  		v.reset(OpARMMOVWconst)
  9525  		v.AuxInt = int32ToAuxInt(0)
  9526  		return true
  9527  	}
  9528  	return false
  9529  }
  9530  func rewriteValueARM_OpARMRSBshiftRLreg(v *Value) bool {
  9531  	v_2 := v.Args[2]
  9532  	v_1 := v.Args[1]
  9533  	v_0 := v.Args[0]
  9534  	b := v.Block
  9535  	// match: (RSBshiftRLreg (MOVWconst [c]) x y)
  9536  	// result: (SUBconst [c] (SRL <x.Type> x y))
  9537  	for {
  9538  		if v_0.Op != OpARMMOVWconst {
  9539  			break
  9540  		}
  9541  		c := auxIntToInt32(v_0.AuxInt)
  9542  		x := v_1
  9543  		y := v_2
  9544  		v.reset(OpARMSUBconst)
  9545  		v.AuxInt = int32ToAuxInt(c)
  9546  		v0 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
  9547  		v0.AddArg2(x, y)
  9548  		v.AddArg(v0)
  9549  		return true
  9550  	}
  9551  	// match: (RSBshiftRLreg x y (MOVWconst [c]))
  9552  	// result: (RSBshiftRL x y [c])
  9553  	for {
  9554  		x := v_0
  9555  		y := v_1
  9556  		if v_2.Op != OpARMMOVWconst {
  9557  			break
  9558  		}
  9559  		c := auxIntToInt32(v_2.AuxInt)
  9560  		v.reset(OpARMRSBshiftRL)
  9561  		v.AuxInt = int32ToAuxInt(c)
  9562  		v.AddArg2(x, y)
  9563  		return true
  9564  	}
  9565  	return false
  9566  }
  9567  func rewriteValueARM_OpARMRSCconst(v *Value) bool {
  9568  	v_1 := v.Args[1]
  9569  	v_0 := v.Args[0]
  9570  	// match: (RSCconst [c] (ADDconst [d] x) flags)
  9571  	// result: (RSCconst [c-d] x flags)
  9572  	for {
  9573  		c := auxIntToInt32(v.AuxInt)
  9574  		if v_0.Op != OpARMADDconst {
  9575  			break
  9576  		}
  9577  		d := auxIntToInt32(v_0.AuxInt)
  9578  		x := v_0.Args[0]
  9579  		flags := v_1
  9580  		v.reset(OpARMRSCconst)
  9581  		v.AuxInt = int32ToAuxInt(c - d)
  9582  		v.AddArg2(x, flags)
  9583  		return true
  9584  	}
  9585  	// match: (RSCconst [c] (SUBconst [d] x) flags)
  9586  	// result: (RSCconst [c+d] x flags)
  9587  	for {
  9588  		c := auxIntToInt32(v.AuxInt)
  9589  		if v_0.Op != OpARMSUBconst {
  9590  			break
  9591  		}
  9592  		d := auxIntToInt32(v_0.AuxInt)
  9593  		x := v_0.Args[0]
  9594  		flags := v_1
  9595  		v.reset(OpARMRSCconst)
  9596  		v.AuxInt = int32ToAuxInt(c + d)
  9597  		v.AddArg2(x, flags)
  9598  		return true
  9599  	}
  9600  	return false
  9601  }
  9602  func rewriteValueARM_OpARMRSCshiftLL(v *Value) bool {
  9603  	v_2 := v.Args[2]
  9604  	v_1 := v.Args[1]
  9605  	v_0 := v.Args[0]
  9606  	b := v.Block
  9607  	// match: (RSCshiftLL (MOVWconst [c]) x [d] flags)
  9608  	// result: (SBCconst [c] (SLLconst <x.Type> x [d]) flags)
  9609  	for {
  9610  		d := auxIntToInt32(v.AuxInt)
  9611  		if v_0.Op != OpARMMOVWconst {
  9612  			break
  9613  		}
  9614  		c := auxIntToInt32(v_0.AuxInt)
  9615  		x := v_1
  9616  		flags := v_2
  9617  		v.reset(OpARMSBCconst)
  9618  		v.AuxInt = int32ToAuxInt(c)
  9619  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  9620  		v0.AuxInt = int32ToAuxInt(d)
  9621  		v0.AddArg(x)
  9622  		v.AddArg2(v0, flags)
  9623  		return true
  9624  	}
  9625  	// match: (RSCshiftLL x (MOVWconst [c]) [d] flags)
  9626  	// result: (RSCconst x [c<<uint64(d)] flags)
  9627  	for {
  9628  		d := auxIntToInt32(v.AuxInt)
  9629  		x := v_0
  9630  		if v_1.Op != OpARMMOVWconst {
  9631  			break
  9632  		}
  9633  		c := auxIntToInt32(v_1.AuxInt)
  9634  		flags := v_2
  9635  		v.reset(OpARMRSCconst)
  9636  		v.AuxInt = int32ToAuxInt(c << uint64(d))
  9637  		v.AddArg2(x, flags)
  9638  		return true
  9639  	}
  9640  	return false
  9641  }
  9642  func rewriteValueARM_OpARMRSCshiftLLreg(v *Value) bool {
  9643  	v_3 := v.Args[3]
  9644  	v_2 := v.Args[2]
  9645  	v_1 := v.Args[1]
  9646  	v_0 := v.Args[0]
  9647  	b := v.Block
  9648  	// match: (RSCshiftLLreg (MOVWconst [c]) x y flags)
  9649  	// result: (SBCconst [c] (SLL <x.Type> x y) flags)
  9650  	for {
  9651  		if v_0.Op != OpARMMOVWconst {
  9652  			break
  9653  		}
  9654  		c := auxIntToInt32(v_0.AuxInt)
  9655  		x := v_1
  9656  		y := v_2
  9657  		flags := v_3
  9658  		v.reset(OpARMSBCconst)
  9659  		v.AuxInt = int32ToAuxInt(c)
  9660  		v0 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
  9661  		v0.AddArg2(x, y)
  9662  		v.AddArg2(v0, flags)
  9663  		return true
  9664  	}
  9665  	// match: (RSCshiftLLreg x y (MOVWconst [c]) flags)
  9666  	// result: (RSCshiftLL x y [c] flags)
  9667  	for {
  9668  		x := v_0
  9669  		y := v_1
  9670  		if v_2.Op != OpARMMOVWconst {
  9671  			break
  9672  		}
  9673  		c := auxIntToInt32(v_2.AuxInt)
  9674  		flags := v_3
  9675  		v.reset(OpARMRSCshiftLL)
  9676  		v.AuxInt = int32ToAuxInt(c)
  9677  		v.AddArg3(x, y, flags)
  9678  		return true
  9679  	}
  9680  	return false
  9681  }
  9682  func rewriteValueARM_OpARMRSCshiftRA(v *Value) bool {
  9683  	v_2 := v.Args[2]
  9684  	v_1 := v.Args[1]
  9685  	v_0 := v.Args[0]
  9686  	b := v.Block
  9687  	// match: (RSCshiftRA (MOVWconst [c]) x [d] flags)
  9688  	// result: (SBCconst [c] (SRAconst <x.Type> x [d]) flags)
  9689  	for {
  9690  		d := auxIntToInt32(v.AuxInt)
  9691  		if v_0.Op != OpARMMOVWconst {
  9692  			break
  9693  		}
  9694  		c := auxIntToInt32(v_0.AuxInt)
  9695  		x := v_1
  9696  		flags := v_2
  9697  		v.reset(OpARMSBCconst)
  9698  		v.AuxInt = int32ToAuxInt(c)
  9699  		v0 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
  9700  		v0.AuxInt = int32ToAuxInt(d)
  9701  		v0.AddArg(x)
  9702  		v.AddArg2(v0, flags)
  9703  		return true
  9704  	}
  9705  	// match: (RSCshiftRA x (MOVWconst [c]) [d] flags)
  9706  	// result: (RSCconst x [c>>uint64(d)] flags)
  9707  	for {
  9708  		d := auxIntToInt32(v.AuxInt)
  9709  		x := v_0
  9710  		if v_1.Op != OpARMMOVWconst {
  9711  			break
  9712  		}
  9713  		c := auxIntToInt32(v_1.AuxInt)
  9714  		flags := v_2
  9715  		v.reset(OpARMRSCconst)
  9716  		v.AuxInt = int32ToAuxInt(c >> uint64(d))
  9717  		v.AddArg2(x, flags)
  9718  		return true
  9719  	}
  9720  	return false
  9721  }
  9722  func rewriteValueARM_OpARMRSCshiftRAreg(v *Value) bool {
  9723  	v_3 := v.Args[3]
  9724  	v_2 := v.Args[2]
  9725  	v_1 := v.Args[1]
  9726  	v_0 := v.Args[0]
  9727  	b := v.Block
  9728  	// match: (RSCshiftRAreg (MOVWconst [c]) x y flags)
  9729  	// result: (SBCconst [c] (SRA <x.Type> x y) flags)
  9730  	for {
  9731  		if v_0.Op != OpARMMOVWconst {
  9732  			break
  9733  		}
  9734  		c := auxIntToInt32(v_0.AuxInt)
  9735  		x := v_1
  9736  		y := v_2
  9737  		flags := v_3
  9738  		v.reset(OpARMSBCconst)
  9739  		v.AuxInt = int32ToAuxInt(c)
  9740  		v0 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
  9741  		v0.AddArg2(x, y)
  9742  		v.AddArg2(v0, flags)
  9743  		return true
  9744  	}
  9745  	// match: (RSCshiftRAreg x y (MOVWconst [c]) flags)
  9746  	// result: (RSCshiftRA x y [c] flags)
  9747  	for {
  9748  		x := v_0
  9749  		y := v_1
  9750  		if v_2.Op != OpARMMOVWconst {
  9751  			break
  9752  		}
  9753  		c := auxIntToInt32(v_2.AuxInt)
  9754  		flags := v_3
  9755  		v.reset(OpARMRSCshiftRA)
  9756  		v.AuxInt = int32ToAuxInt(c)
  9757  		v.AddArg3(x, y, flags)
  9758  		return true
  9759  	}
  9760  	return false
  9761  }
  9762  func rewriteValueARM_OpARMRSCshiftRL(v *Value) bool {
  9763  	v_2 := v.Args[2]
  9764  	v_1 := v.Args[1]
  9765  	v_0 := v.Args[0]
  9766  	b := v.Block
  9767  	// match: (RSCshiftRL (MOVWconst [c]) x [d] flags)
  9768  	// result: (SBCconst [c] (SRLconst <x.Type> x [d]) flags)
  9769  	for {
  9770  		d := auxIntToInt32(v.AuxInt)
  9771  		if v_0.Op != OpARMMOVWconst {
  9772  			break
  9773  		}
  9774  		c := auxIntToInt32(v_0.AuxInt)
  9775  		x := v_1
  9776  		flags := v_2
  9777  		v.reset(OpARMSBCconst)
  9778  		v.AuxInt = int32ToAuxInt(c)
  9779  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
  9780  		v0.AuxInt = int32ToAuxInt(d)
  9781  		v0.AddArg(x)
  9782  		v.AddArg2(v0, flags)
  9783  		return true
  9784  	}
  9785  	// match: (RSCshiftRL x (MOVWconst [c]) [d] flags)
  9786  	// result: (RSCconst x [int32(uint32(c)>>uint64(d))] flags)
  9787  	for {
  9788  		d := auxIntToInt32(v.AuxInt)
  9789  		x := v_0
  9790  		if v_1.Op != OpARMMOVWconst {
  9791  			break
  9792  		}
  9793  		c := auxIntToInt32(v_1.AuxInt)
  9794  		flags := v_2
  9795  		v.reset(OpARMRSCconst)
  9796  		v.AuxInt = int32ToAuxInt(int32(uint32(c) >> uint64(d)))
  9797  		v.AddArg2(x, flags)
  9798  		return true
  9799  	}
  9800  	return false
  9801  }
  9802  func rewriteValueARM_OpARMRSCshiftRLreg(v *Value) bool {
  9803  	v_3 := v.Args[3]
  9804  	v_2 := v.Args[2]
  9805  	v_1 := v.Args[1]
  9806  	v_0 := v.Args[0]
  9807  	b := v.Block
  9808  	// match: (RSCshiftRLreg (MOVWconst [c]) x y flags)
  9809  	// result: (SBCconst [c] (SRL <x.Type> x y) flags)
  9810  	for {
  9811  		if v_0.Op != OpARMMOVWconst {
  9812  			break
  9813  		}
  9814  		c := auxIntToInt32(v_0.AuxInt)
  9815  		x := v_1
  9816  		y := v_2
  9817  		flags := v_3
  9818  		v.reset(OpARMSBCconst)
  9819  		v.AuxInt = int32ToAuxInt(c)
  9820  		v0 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
  9821  		v0.AddArg2(x, y)
  9822  		v.AddArg2(v0, flags)
  9823  		return true
  9824  	}
  9825  	// match: (RSCshiftRLreg x y (MOVWconst [c]) flags)
  9826  	// result: (RSCshiftRL x y [c] flags)
  9827  	for {
  9828  		x := v_0
  9829  		y := v_1
  9830  		if v_2.Op != OpARMMOVWconst {
  9831  			break
  9832  		}
  9833  		c := auxIntToInt32(v_2.AuxInt)
  9834  		flags := v_3
  9835  		v.reset(OpARMRSCshiftRL)
  9836  		v.AuxInt = int32ToAuxInt(c)
  9837  		v.AddArg3(x, y, flags)
  9838  		return true
  9839  	}
  9840  	return false
  9841  }
  9842  func rewriteValueARM_OpARMSBC(v *Value) bool {
  9843  	v_2 := v.Args[2]
  9844  	v_1 := v.Args[1]
  9845  	v_0 := v.Args[0]
  9846  	// match: (SBC (MOVWconst [c]) x flags)
  9847  	// result: (RSCconst [c] x flags)
  9848  	for {
  9849  		if v_0.Op != OpARMMOVWconst {
  9850  			break
  9851  		}
  9852  		c := auxIntToInt32(v_0.AuxInt)
  9853  		x := v_1
  9854  		flags := v_2
  9855  		v.reset(OpARMRSCconst)
  9856  		v.AuxInt = int32ToAuxInt(c)
  9857  		v.AddArg2(x, flags)
  9858  		return true
  9859  	}
  9860  	// match: (SBC x (MOVWconst [c]) flags)
  9861  	// result: (SBCconst [c] x flags)
  9862  	for {
  9863  		x := v_0
  9864  		if v_1.Op != OpARMMOVWconst {
  9865  			break
  9866  		}
  9867  		c := auxIntToInt32(v_1.AuxInt)
  9868  		flags := v_2
  9869  		v.reset(OpARMSBCconst)
  9870  		v.AuxInt = int32ToAuxInt(c)
  9871  		v.AddArg2(x, flags)
  9872  		return true
  9873  	}
  9874  	// match: (SBC x (SLLconst [c] y) flags)
  9875  	// result: (SBCshiftLL x y [c] flags)
  9876  	for {
  9877  		x := v_0
  9878  		if v_1.Op != OpARMSLLconst {
  9879  			break
  9880  		}
  9881  		c := auxIntToInt32(v_1.AuxInt)
  9882  		y := v_1.Args[0]
  9883  		flags := v_2
  9884  		v.reset(OpARMSBCshiftLL)
  9885  		v.AuxInt = int32ToAuxInt(c)
  9886  		v.AddArg3(x, y, flags)
  9887  		return true
  9888  	}
  9889  	// match: (SBC (SLLconst [c] y) x flags)
  9890  	// result: (RSCshiftLL x y [c] flags)
  9891  	for {
  9892  		if v_0.Op != OpARMSLLconst {
  9893  			break
  9894  		}
  9895  		c := auxIntToInt32(v_0.AuxInt)
  9896  		y := v_0.Args[0]
  9897  		x := v_1
  9898  		flags := v_2
  9899  		v.reset(OpARMRSCshiftLL)
  9900  		v.AuxInt = int32ToAuxInt(c)
  9901  		v.AddArg3(x, y, flags)
  9902  		return true
  9903  	}
  9904  	// match: (SBC x (SRLconst [c] y) flags)
  9905  	// result: (SBCshiftRL x y [c] flags)
  9906  	for {
  9907  		x := v_0
  9908  		if v_1.Op != OpARMSRLconst {
  9909  			break
  9910  		}
  9911  		c := auxIntToInt32(v_1.AuxInt)
  9912  		y := v_1.Args[0]
  9913  		flags := v_2
  9914  		v.reset(OpARMSBCshiftRL)
  9915  		v.AuxInt = int32ToAuxInt(c)
  9916  		v.AddArg3(x, y, flags)
  9917  		return true
  9918  	}
  9919  	// match: (SBC (SRLconst [c] y) x flags)
  9920  	// result: (RSCshiftRL x y [c] flags)
  9921  	for {
  9922  		if v_0.Op != OpARMSRLconst {
  9923  			break
  9924  		}
  9925  		c := auxIntToInt32(v_0.AuxInt)
  9926  		y := v_0.Args[0]
  9927  		x := v_1
  9928  		flags := v_2
  9929  		v.reset(OpARMRSCshiftRL)
  9930  		v.AuxInt = int32ToAuxInt(c)
  9931  		v.AddArg3(x, y, flags)
  9932  		return true
  9933  	}
  9934  	// match: (SBC x (SRAconst [c] y) flags)
  9935  	// result: (SBCshiftRA x y [c] flags)
  9936  	for {
  9937  		x := v_0
  9938  		if v_1.Op != OpARMSRAconst {
  9939  			break
  9940  		}
  9941  		c := auxIntToInt32(v_1.AuxInt)
  9942  		y := v_1.Args[0]
  9943  		flags := v_2
  9944  		v.reset(OpARMSBCshiftRA)
  9945  		v.AuxInt = int32ToAuxInt(c)
  9946  		v.AddArg3(x, y, flags)
  9947  		return true
  9948  	}
  9949  	// match: (SBC (SRAconst [c] y) x flags)
  9950  	// result: (RSCshiftRA x y [c] flags)
  9951  	for {
  9952  		if v_0.Op != OpARMSRAconst {
  9953  			break
  9954  		}
  9955  		c := auxIntToInt32(v_0.AuxInt)
  9956  		y := v_0.Args[0]
  9957  		x := v_1
  9958  		flags := v_2
  9959  		v.reset(OpARMRSCshiftRA)
  9960  		v.AuxInt = int32ToAuxInt(c)
  9961  		v.AddArg3(x, y, flags)
  9962  		return true
  9963  	}
  9964  	// match: (SBC x (SLL y z) flags)
  9965  	// result: (SBCshiftLLreg x y z flags)
  9966  	for {
  9967  		x := v_0
  9968  		if v_1.Op != OpARMSLL {
  9969  			break
  9970  		}
  9971  		z := v_1.Args[1]
  9972  		y := v_1.Args[0]
  9973  		flags := v_2
  9974  		v.reset(OpARMSBCshiftLLreg)
  9975  		v.AddArg4(x, y, z, flags)
  9976  		return true
  9977  	}
  9978  	// match: (SBC (SLL y z) x flags)
  9979  	// result: (RSCshiftLLreg x y z flags)
  9980  	for {
  9981  		if v_0.Op != OpARMSLL {
  9982  			break
  9983  		}
  9984  		z := v_0.Args[1]
  9985  		y := v_0.Args[0]
  9986  		x := v_1
  9987  		flags := v_2
  9988  		v.reset(OpARMRSCshiftLLreg)
  9989  		v.AddArg4(x, y, z, flags)
  9990  		return true
  9991  	}
  9992  	// match: (SBC x (SRL y z) flags)
  9993  	// result: (SBCshiftRLreg x y z flags)
  9994  	for {
  9995  		x := v_0
  9996  		if v_1.Op != OpARMSRL {
  9997  			break
  9998  		}
  9999  		z := v_1.Args[1]
 10000  		y := v_1.Args[0]
 10001  		flags := v_2
 10002  		v.reset(OpARMSBCshiftRLreg)
 10003  		v.AddArg4(x, y, z, flags)
 10004  		return true
 10005  	}
 10006  	// match: (SBC (SRL y z) x flags)
 10007  	// result: (RSCshiftRLreg x y z flags)
 10008  	for {
 10009  		if v_0.Op != OpARMSRL {
 10010  			break
 10011  		}
 10012  		z := v_0.Args[1]
 10013  		y := v_0.Args[0]
 10014  		x := v_1
 10015  		flags := v_2
 10016  		v.reset(OpARMRSCshiftRLreg)
 10017  		v.AddArg4(x, y, z, flags)
 10018  		return true
 10019  	}
 10020  	// match: (SBC x (SRA y z) flags)
 10021  	// result: (SBCshiftRAreg x y z flags)
 10022  	for {
 10023  		x := v_0
 10024  		if v_1.Op != OpARMSRA {
 10025  			break
 10026  		}
 10027  		z := v_1.Args[1]
 10028  		y := v_1.Args[0]
 10029  		flags := v_2
 10030  		v.reset(OpARMSBCshiftRAreg)
 10031  		v.AddArg4(x, y, z, flags)
 10032  		return true
 10033  	}
 10034  	// match: (SBC (SRA y z) x flags)
 10035  	// result: (RSCshiftRAreg x y z flags)
 10036  	for {
 10037  		if v_0.Op != OpARMSRA {
 10038  			break
 10039  		}
 10040  		z := v_0.Args[1]
 10041  		y := v_0.Args[0]
 10042  		x := v_1
 10043  		flags := v_2
 10044  		v.reset(OpARMRSCshiftRAreg)
 10045  		v.AddArg4(x, y, z, flags)
 10046  		return true
 10047  	}
 10048  	return false
 10049  }
 10050  func rewriteValueARM_OpARMSBCconst(v *Value) bool {
 10051  	v_1 := v.Args[1]
 10052  	v_0 := v.Args[0]
 10053  	// match: (SBCconst [c] (ADDconst [d] x) flags)
 10054  	// result: (SBCconst [c-d] x flags)
 10055  	for {
 10056  		c := auxIntToInt32(v.AuxInt)
 10057  		if v_0.Op != OpARMADDconst {
 10058  			break
 10059  		}
 10060  		d := auxIntToInt32(v_0.AuxInt)
 10061  		x := v_0.Args[0]
 10062  		flags := v_1
 10063  		v.reset(OpARMSBCconst)
 10064  		v.AuxInt = int32ToAuxInt(c - d)
 10065  		v.AddArg2(x, flags)
 10066  		return true
 10067  	}
 10068  	// match: (SBCconst [c] (SUBconst [d] x) flags)
 10069  	// result: (SBCconst [c+d] x flags)
 10070  	for {
 10071  		c := auxIntToInt32(v.AuxInt)
 10072  		if v_0.Op != OpARMSUBconst {
 10073  			break
 10074  		}
 10075  		d := auxIntToInt32(v_0.AuxInt)
 10076  		x := v_0.Args[0]
 10077  		flags := v_1
 10078  		v.reset(OpARMSBCconst)
 10079  		v.AuxInt = int32ToAuxInt(c + d)
 10080  		v.AddArg2(x, flags)
 10081  		return true
 10082  	}
 10083  	return false
 10084  }
 10085  func rewriteValueARM_OpARMSBCshiftLL(v *Value) bool {
 10086  	v_2 := v.Args[2]
 10087  	v_1 := v.Args[1]
 10088  	v_0 := v.Args[0]
 10089  	b := v.Block
 10090  	// match: (SBCshiftLL (MOVWconst [c]) x [d] flags)
 10091  	// result: (RSCconst [c] (SLLconst <x.Type> x [d]) flags)
 10092  	for {
 10093  		d := auxIntToInt32(v.AuxInt)
 10094  		if v_0.Op != OpARMMOVWconst {
 10095  			break
 10096  		}
 10097  		c := auxIntToInt32(v_0.AuxInt)
 10098  		x := v_1
 10099  		flags := v_2
 10100  		v.reset(OpARMRSCconst)
 10101  		v.AuxInt = int32ToAuxInt(c)
 10102  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 10103  		v0.AuxInt = int32ToAuxInt(d)
 10104  		v0.AddArg(x)
 10105  		v.AddArg2(v0, flags)
 10106  		return true
 10107  	}
 10108  	// match: (SBCshiftLL x (MOVWconst [c]) [d] flags)
 10109  	// result: (SBCconst x [c<<uint64(d)] flags)
 10110  	for {
 10111  		d := auxIntToInt32(v.AuxInt)
 10112  		x := v_0
 10113  		if v_1.Op != OpARMMOVWconst {
 10114  			break
 10115  		}
 10116  		c := auxIntToInt32(v_1.AuxInt)
 10117  		flags := v_2
 10118  		v.reset(OpARMSBCconst)
 10119  		v.AuxInt = int32ToAuxInt(c << uint64(d))
 10120  		v.AddArg2(x, flags)
 10121  		return true
 10122  	}
 10123  	return false
 10124  }
 10125  func rewriteValueARM_OpARMSBCshiftLLreg(v *Value) bool {
 10126  	v_3 := v.Args[3]
 10127  	v_2 := v.Args[2]
 10128  	v_1 := v.Args[1]
 10129  	v_0 := v.Args[0]
 10130  	b := v.Block
 10131  	// match: (SBCshiftLLreg (MOVWconst [c]) x y flags)
 10132  	// result: (RSCconst [c] (SLL <x.Type> x y) flags)
 10133  	for {
 10134  		if v_0.Op != OpARMMOVWconst {
 10135  			break
 10136  		}
 10137  		c := auxIntToInt32(v_0.AuxInt)
 10138  		x := v_1
 10139  		y := v_2
 10140  		flags := v_3
 10141  		v.reset(OpARMRSCconst)
 10142  		v.AuxInt = int32ToAuxInt(c)
 10143  		v0 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
 10144  		v0.AddArg2(x, y)
 10145  		v.AddArg2(v0, flags)
 10146  		return true
 10147  	}
 10148  	// match: (SBCshiftLLreg x y (MOVWconst [c]) flags)
 10149  	// result: (SBCshiftLL x y [c] flags)
 10150  	for {
 10151  		x := v_0
 10152  		y := v_1
 10153  		if v_2.Op != OpARMMOVWconst {
 10154  			break
 10155  		}
 10156  		c := auxIntToInt32(v_2.AuxInt)
 10157  		flags := v_3
 10158  		v.reset(OpARMSBCshiftLL)
 10159  		v.AuxInt = int32ToAuxInt(c)
 10160  		v.AddArg3(x, y, flags)
 10161  		return true
 10162  	}
 10163  	return false
 10164  }
 10165  func rewriteValueARM_OpARMSBCshiftRA(v *Value) bool {
 10166  	v_2 := v.Args[2]
 10167  	v_1 := v.Args[1]
 10168  	v_0 := v.Args[0]
 10169  	b := v.Block
 10170  	// match: (SBCshiftRA (MOVWconst [c]) x [d] flags)
 10171  	// result: (RSCconst [c] (SRAconst <x.Type> x [d]) flags)
 10172  	for {
 10173  		d := auxIntToInt32(v.AuxInt)
 10174  		if v_0.Op != OpARMMOVWconst {
 10175  			break
 10176  		}
 10177  		c := auxIntToInt32(v_0.AuxInt)
 10178  		x := v_1
 10179  		flags := v_2
 10180  		v.reset(OpARMRSCconst)
 10181  		v.AuxInt = int32ToAuxInt(c)
 10182  		v0 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
 10183  		v0.AuxInt = int32ToAuxInt(d)
 10184  		v0.AddArg(x)
 10185  		v.AddArg2(v0, flags)
 10186  		return true
 10187  	}
 10188  	// match: (SBCshiftRA x (MOVWconst [c]) [d] flags)
 10189  	// result: (SBCconst x [c>>uint64(d)] flags)
 10190  	for {
 10191  		d := auxIntToInt32(v.AuxInt)
 10192  		x := v_0
 10193  		if v_1.Op != OpARMMOVWconst {
 10194  			break
 10195  		}
 10196  		c := auxIntToInt32(v_1.AuxInt)
 10197  		flags := v_2
 10198  		v.reset(OpARMSBCconst)
 10199  		v.AuxInt = int32ToAuxInt(c >> uint64(d))
 10200  		v.AddArg2(x, flags)
 10201  		return true
 10202  	}
 10203  	return false
 10204  }
 10205  func rewriteValueARM_OpARMSBCshiftRAreg(v *Value) bool {
 10206  	v_3 := v.Args[3]
 10207  	v_2 := v.Args[2]
 10208  	v_1 := v.Args[1]
 10209  	v_0 := v.Args[0]
 10210  	b := v.Block
 10211  	// match: (SBCshiftRAreg (MOVWconst [c]) x y flags)
 10212  	// result: (RSCconst [c] (SRA <x.Type> x y) flags)
 10213  	for {
 10214  		if v_0.Op != OpARMMOVWconst {
 10215  			break
 10216  		}
 10217  		c := auxIntToInt32(v_0.AuxInt)
 10218  		x := v_1
 10219  		y := v_2
 10220  		flags := v_3
 10221  		v.reset(OpARMRSCconst)
 10222  		v.AuxInt = int32ToAuxInt(c)
 10223  		v0 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
 10224  		v0.AddArg2(x, y)
 10225  		v.AddArg2(v0, flags)
 10226  		return true
 10227  	}
 10228  	// match: (SBCshiftRAreg x y (MOVWconst [c]) flags)
 10229  	// result: (SBCshiftRA x y [c] flags)
 10230  	for {
 10231  		x := v_0
 10232  		y := v_1
 10233  		if v_2.Op != OpARMMOVWconst {
 10234  			break
 10235  		}
 10236  		c := auxIntToInt32(v_2.AuxInt)
 10237  		flags := v_3
 10238  		v.reset(OpARMSBCshiftRA)
 10239  		v.AuxInt = int32ToAuxInt(c)
 10240  		v.AddArg3(x, y, flags)
 10241  		return true
 10242  	}
 10243  	return false
 10244  }
 10245  func rewriteValueARM_OpARMSBCshiftRL(v *Value) bool {
 10246  	v_2 := v.Args[2]
 10247  	v_1 := v.Args[1]
 10248  	v_0 := v.Args[0]
 10249  	b := v.Block
 10250  	// match: (SBCshiftRL (MOVWconst [c]) x [d] flags)
 10251  	// result: (RSCconst [c] (SRLconst <x.Type> x [d]) flags)
 10252  	for {
 10253  		d := auxIntToInt32(v.AuxInt)
 10254  		if v_0.Op != OpARMMOVWconst {
 10255  			break
 10256  		}
 10257  		c := auxIntToInt32(v_0.AuxInt)
 10258  		x := v_1
 10259  		flags := v_2
 10260  		v.reset(OpARMRSCconst)
 10261  		v.AuxInt = int32ToAuxInt(c)
 10262  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
 10263  		v0.AuxInt = int32ToAuxInt(d)
 10264  		v0.AddArg(x)
 10265  		v.AddArg2(v0, flags)
 10266  		return true
 10267  	}
 10268  	// match: (SBCshiftRL x (MOVWconst [c]) [d] flags)
 10269  	// result: (SBCconst x [int32(uint32(c)>>uint64(d))] flags)
 10270  	for {
 10271  		d := auxIntToInt32(v.AuxInt)
 10272  		x := v_0
 10273  		if v_1.Op != OpARMMOVWconst {
 10274  			break
 10275  		}
 10276  		c := auxIntToInt32(v_1.AuxInt)
 10277  		flags := v_2
 10278  		v.reset(OpARMSBCconst)
 10279  		v.AuxInt = int32ToAuxInt(int32(uint32(c) >> uint64(d)))
 10280  		v.AddArg2(x, flags)
 10281  		return true
 10282  	}
 10283  	return false
 10284  }
 10285  func rewriteValueARM_OpARMSBCshiftRLreg(v *Value) bool {
 10286  	v_3 := v.Args[3]
 10287  	v_2 := v.Args[2]
 10288  	v_1 := v.Args[1]
 10289  	v_0 := v.Args[0]
 10290  	b := v.Block
 10291  	// match: (SBCshiftRLreg (MOVWconst [c]) x y flags)
 10292  	// result: (RSCconst [c] (SRL <x.Type> x y) flags)
 10293  	for {
 10294  		if v_0.Op != OpARMMOVWconst {
 10295  			break
 10296  		}
 10297  		c := auxIntToInt32(v_0.AuxInt)
 10298  		x := v_1
 10299  		y := v_2
 10300  		flags := v_3
 10301  		v.reset(OpARMRSCconst)
 10302  		v.AuxInt = int32ToAuxInt(c)
 10303  		v0 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
 10304  		v0.AddArg2(x, y)
 10305  		v.AddArg2(v0, flags)
 10306  		return true
 10307  	}
 10308  	// match: (SBCshiftRLreg x y (MOVWconst [c]) flags)
 10309  	// result: (SBCshiftRL x y [c] flags)
 10310  	for {
 10311  		x := v_0
 10312  		y := v_1
 10313  		if v_2.Op != OpARMMOVWconst {
 10314  			break
 10315  		}
 10316  		c := auxIntToInt32(v_2.AuxInt)
 10317  		flags := v_3
 10318  		v.reset(OpARMSBCshiftRL)
 10319  		v.AuxInt = int32ToAuxInt(c)
 10320  		v.AddArg3(x, y, flags)
 10321  		return true
 10322  	}
 10323  	return false
 10324  }
 10325  func rewriteValueARM_OpARMSLL(v *Value) bool {
 10326  	v_1 := v.Args[1]
 10327  	v_0 := v.Args[0]
 10328  	// match: (SLL x (MOVWconst [c]))
 10329  	// result: (SLLconst x [c&31])
 10330  	for {
 10331  		x := v_0
 10332  		if v_1.Op != OpARMMOVWconst {
 10333  			break
 10334  		}
 10335  		c := auxIntToInt32(v_1.AuxInt)
 10336  		v.reset(OpARMSLLconst)
 10337  		v.AuxInt = int32ToAuxInt(c & 31)
 10338  		v.AddArg(x)
 10339  		return true
 10340  	}
 10341  	return false
 10342  }
 10343  func rewriteValueARM_OpARMSLLconst(v *Value) bool {
 10344  	v_0 := v.Args[0]
 10345  	// match: (SLLconst [c] (MOVWconst [d]))
 10346  	// result: (MOVWconst [d<<uint64(c)])
 10347  	for {
 10348  		c := auxIntToInt32(v.AuxInt)
 10349  		if v_0.Op != OpARMMOVWconst {
 10350  			break
 10351  		}
 10352  		d := auxIntToInt32(v_0.AuxInt)
 10353  		v.reset(OpARMMOVWconst)
 10354  		v.AuxInt = int32ToAuxInt(d << uint64(c))
 10355  		return true
 10356  	}
 10357  	return false
 10358  }
 10359  func rewriteValueARM_OpARMSRA(v *Value) bool {
 10360  	v_1 := v.Args[1]
 10361  	v_0 := v.Args[0]
 10362  	// match: (SRA x (MOVWconst [c]))
 10363  	// result: (SRAconst x [c&31])
 10364  	for {
 10365  		x := v_0
 10366  		if v_1.Op != OpARMMOVWconst {
 10367  			break
 10368  		}
 10369  		c := auxIntToInt32(v_1.AuxInt)
 10370  		v.reset(OpARMSRAconst)
 10371  		v.AuxInt = int32ToAuxInt(c & 31)
 10372  		v.AddArg(x)
 10373  		return true
 10374  	}
 10375  	return false
 10376  }
 10377  func rewriteValueARM_OpARMSRAcond(v *Value) bool {
 10378  	v_2 := v.Args[2]
 10379  	v_1 := v.Args[1]
 10380  	v_0 := v.Args[0]
 10381  	// match: (SRAcond x _ (FlagConstant [fc]))
 10382  	// cond: fc.uge()
 10383  	// result: (SRAconst x [31])
 10384  	for {
 10385  		x := v_0
 10386  		if v_2.Op != OpARMFlagConstant {
 10387  			break
 10388  		}
 10389  		fc := auxIntToFlagConstant(v_2.AuxInt)
 10390  		if !(fc.uge()) {
 10391  			break
 10392  		}
 10393  		v.reset(OpARMSRAconst)
 10394  		v.AuxInt = int32ToAuxInt(31)
 10395  		v.AddArg(x)
 10396  		return true
 10397  	}
 10398  	// match: (SRAcond x y (FlagConstant [fc]))
 10399  	// cond: fc.ult()
 10400  	// result: (SRA x y)
 10401  	for {
 10402  		x := v_0
 10403  		y := v_1
 10404  		if v_2.Op != OpARMFlagConstant {
 10405  			break
 10406  		}
 10407  		fc := auxIntToFlagConstant(v_2.AuxInt)
 10408  		if !(fc.ult()) {
 10409  			break
 10410  		}
 10411  		v.reset(OpARMSRA)
 10412  		v.AddArg2(x, y)
 10413  		return true
 10414  	}
 10415  	return false
 10416  }
 10417  func rewriteValueARM_OpARMSRAconst(v *Value) bool {
 10418  	v_0 := v.Args[0]
 10419  	// match: (SRAconst [c] (MOVWconst [d]))
 10420  	// result: (MOVWconst [d>>uint64(c)])
 10421  	for {
 10422  		c := auxIntToInt32(v.AuxInt)
 10423  		if v_0.Op != OpARMMOVWconst {
 10424  			break
 10425  		}
 10426  		d := auxIntToInt32(v_0.AuxInt)
 10427  		v.reset(OpARMMOVWconst)
 10428  		v.AuxInt = int32ToAuxInt(d >> uint64(c))
 10429  		return true
 10430  	}
 10431  	// match: (SRAconst (SLLconst x [c]) [d])
 10432  	// cond: objabi.GOARM==7 && uint64(d)>=uint64(c) && uint64(d)<=31
 10433  	// result: (BFX [(d-c)|(32-d)<<8] x)
 10434  	for {
 10435  		d := auxIntToInt32(v.AuxInt)
 10436  		if v_0.Op != OpARMSLLconst {
 10437  			break
 10438  		}
 10439  		c := auxIntToInt32(v_0.AuxInt)
 10440  		x := v_0.Args[0]
 10441  		if !(objabi.GOARM == 7 && uint64(d) >= uint64(c) && uint64(d) <= 31) {
 10442  			break
 10443  		}
 10444  		v.reset(OpARMBFX)
 10445  		v.AuxInt = int32ToAuxInt((d - c) | (32-d)<<8)
 10446  		v.AddArg(x)
 10447  		return true
 10448  	}
 10449  	return false
 10450  }
 10451  func rewriteValueARM_OpARMSRL(v *Value) bool {
 10452  	v_1 := v.Args[1]
 10453  	v_0 := v.Args[0]
 10454  	// match: (SRL x (MOVWconst [c]))
 10455  	// result: (SRLconst x [c&31])
 10456  	for {
 10457  		x := v_0
 10458  		if v_1.Op != OpARMMOVWconst {
 10459  			break
 10460  		}
 10461  		c := auxIntToInt32(v_1.AuxInt)
 10462  		v.reset(OpARMSRLconst)
 10463  		v.AuxInt = int32ToAuxInt(c & 31)
 10464  		v.AddArg(x)
 10465  		return true
 10466  	}
 10467  	return false
 10468  }
 10469  func rewriteValueARM_OpARMSRLconst(v *Value) bool {
 10470  	v_0 := v.Args[0]
 10471  	// match: (SRLconst [c] (MOVWconst [d]))
 10472  	// result: (MOVWconst [int32(uint32(d)>>uint64(c))])
 10473  	for {
 10474  		c := auxIntToInt32(v.AuxInt)
 10475  		if v_0.Op != OpARMMOVWconst {
 10476  			break
 10477  		}
 10478  		d := auxIntToInt32(v_0.AuxInt)
 10479  		v.reset(OpARMMOVWconst)
 10480  		v.AuxInt = int32ToAuxInt(int32(uint32(d) >> uint64(c)))
 10481  		return true
 10482  	}
 10483  	// match: (SRLconst (SLLconst x [c]) [d])
 10484  	// cond: objabi.GOARM==7 && uint64(d)>=uint64(c) && uint64(d)<=31
 10485  	// result: (BFXU [(d-c)|(32-d)<<8] x)
 10486  	for {
 10487  		d := auxIntToInt32(v.AuxInt)
 10488  		if v_0.Op != OpARMSLLconst {
 10489  			break
 10490  		}
 10491  		c := auxIntToInt32(v_0.AuxInt)
 10492  		x := v_0.Args[0]
 10493  		if !(objabi.GOARM == 7 && uint64(d) >= uint64(c) && uint64(d) <= 31) {
 10494  			break
 10495  		}
 10496  		v.reset(OpARMBFXU)
 10497  		v.AuxInt = int32ToAuxInt((d - c) | (32-d)<<8)
 10498  		v.AddArg(x)
 10499  		return true
 10500  	}
 10501  	return false
 10502  }
 10503  func rewriteValueARM_OpARMSUB(v *Value) bool {
 10504  	v_1 := v.Args[1]
 10505  	v_0 := v.Args[0]
 10506  	// match: (SUB (MOVWconst [c]) x)
 10507  	// result: (RSBconst [c] x)
 10508  	for {
 10509  		if v_0.Op != OpARMMOVWconst {
 10510  			break
 10511  		}
 10512  		c := auxIntToInt32(v_0.AuxInt)
 10513  		x := v_1
 10514  		v.reset(OpARMRSBconst)
 10515  		v.AuxInt = int32ToAuxInt(c)
 10516  		v.AddArg(x)
 10517  		return true
 10518  	}
 10519  	// match: (SUB x (MOVWconst [c]))
 10520  	// result: (SUBconst [c] x)
 10521  	for {
 10522  		x := v_0
 10523  		if v_1.Op != OpARMMOVWconst {
 10524  			break
 10525  		}
 10526  		c := auxIntToInt32(v_1.AuxInt)
 10527  		v.reset(OpARMSUBconst)
 10528  		v.AuxInt = int32ToAuxInt(c)
 10529  		v.AddArg(x)
 10530  		return true
 10531  	}
 10532  	// match: (SUB x (SLLconst [c] y))
 10533  	// result: (SUBshiftLL x y [c])
 10534  	for {
 10535  		x := v_0
 10536  		if v_1.Op != OpARMSLLconst {
 10537  			break
 10538  		}
 10539  		c := auxIntToInt32(v_1.AuxInt)
 10540  		y := v_1.Args[0]
 10541  		v.reset(OpARMSUBshiftLL)
 10542  		v.AuxInt = int32ToAuxInt(c)
 10543  		v.AddArg2(x, y)
 10544  		return true
 10545  	}
 10546  	// match: (SUB (SLLconst [c] y) x)
 10547  	// result: (RSBshiftLL x y [c])
 10548  	for {
 10549  		if v_0.Op != OpARMSLLconst {
 10550  			break
 10551  		}
 10552  		c := auxIntToInt32(v_0.AuxInt)
 10553  		y := v_0.Args[0]
 10554  		x := v_1
 10555  		v.reset(OpARMRSBshiftLL)
 10556  		v.AuxInt = int32ToAuxInt(c)
 10557  		v.AddArg2(x, y)
 10558  		return true
 10559  	}
 10560  	// match: (SUB x (SRLconst [c] y))
 10561  	// result: (SUBshiftRL x y [c])
 10562  	for {
 10563  		x := v_0
 10564  		if v_1.Op != OpARMSRLconst {
 10565  			break
 10566  		}
 10567  		c := auxIntToInt32(v_1.AuxInt)
 10568  		y := v_1.Args[0]
 10569  		v.reset(OpARMSUBshiftRL)
 10570  		v.AuxInt = int32ToAuxInt(c)
 10571  		v.AddArg2(x, y)
 10572  		return true
 10573  	}
 10574  	// match: (SUB (SRLconst [c] y) x)
 10575  	// result: (RSBshiftRL x y [c])
 10576  	for {
 10577  		if v_0.Op != OpARMSRLconst {
 10578  			break
 10579  		}
 10580  		c := auxIntToInt32(v_0.AuxInt)
 10581  		y := v_0.Args[0]
 10582  		x := v_1
 10583  		v.reset(OpARMRSBshiftRL)
 10584  		v.AuxInt = int32ToAuxInt(c)
 10585  		v.AddArg2(x, y)
 10586  		return true
 10587  	}
 10588  	// match: (SUB x (SRAconst [c] y))
 10589  	// result: (SUBshiftRA x y [c])
 10590  	for {
 10591  		x := v_0
 10592  		if v_1.Op != OpARMSRAconst {
 10593  			break
 10594  		}
 10595  		c := auxIntToInt32(v_1.AuxInt)
 10596  		y := v_1.Args[0]
 10597  		v.reset(OpARMSUBshiftRA)
 10598  		v.AuxInt = int32ToAuxInt(c)
 10599  		v.AddArg2(x, y)
 10600  		return true
 10601  	}
 10602  	// match: (SUB (SRAconst [c] y) x)
 10603  	// result: (RSBshiftRA x y [c])
 10604  	for {
 10605  		if v_0.Op != OpARMSRAconst {
 10606  			break
 10607  		}
 10608  		c := auxIntToInt32(v_0.AuxInt)
 10609  		y := v_0.Args[0]
 10610  		x := v_1
 10611  		v.reset(OpARMRSBshiftRA)
 10612  		v.AuxInt = int32ToAuxInt(c)
 10613  		v.AddArg2(x, y)
 10614  		return true
 10615  	}
 10616  	// match: (SUB x (SLL y z))
 10617  	// result: (SUBshiftLLreg x y z)
 10618  	for {
 10619  		x := v_0
 10620  		if v_1.Op != OpARMSLL {
 10621  			break
 10622  		}
 10623  		z := v_1.Args[1]
 10624  		y := v_1.Args[0]
 10625  		v.reset(OpARMSUBshiftLLreg)
 10626  		v.AddArg3(x, y, z)
 10627  		return true
 10628  	}
 10629  	// match: (SUB (SLL y z) x)
 10630  	// result: (RSBshiftLLreg x y z)
 10631  	for {
 10632  		if v_0.Op != OpARMSLL {
 10633  			break
 10634  		}
 10635  		z := v_0.Args[1]
 10636  		y := v_0.Args[0]
 10637  		x := v_1
 10638  		v.reset(OpARMRSBshiftLLreg)
 10639  		v.AddArg3(x, y, z)
 10640  		return true
 10641  	}
 10642  	// match: (SUB x (SRL y z))
 10643  	// result: (SUBshiftRLreg x y z)
 10644  	for {
 10645  		x := v_0
 10646  		if v_1.Op != OpARMSRL {
 10647  			break
 10648  		}
 10649  		z := v_1.Args[1]
 10650  		y := v_1.Args[0]
 10651  		v.reset(OpARMSUBshiftRLreg)
 10652  		v.AddArg3(x, y, z)
 10653  		return true
 10654  	}
 10655  	// match: (SUB (SRL y z) x)
 10656  	// result: (RSBshiftRLreg x y z)
 10657  	for {
 10658  		if v_0.Op != OpARMSRL {
 10659  			break
 10660  		}
 10661  		z := v_0.Args[1]
 10662  		y := v_0.Args[0]
 10663  		x := v_1
 10664  		v.reset(OpARMRSBshiftRLreg)
 10665  		v.AddArg3(x, y, z)
 10666  		return true
 10667  	}
 10668  	// match: (SUB x (SRA y z))
 10669  	// result: (SUBshiftRAreg x y z)
 10670  	for {
 10671  		x := v_0
 10672  		if v_1.Op != OpARMSRA {
 10673  			break
 10674  		}
 10675  		z := v_1.Args[1]
 10676  		y := v_1.Args[0]
 10677  		v.reset(OpARMSUBshiftRAreg)
 10678  		v.AddArg3(x, y, z)
 10679  		return true
 10680  	}
 10681  	// match: (SUB (SRA y z) x)
 10682  	// result: (RSBshiftRAreg x y z)
 10683  	for {
 10684  		if v_0.Op != OpARMSRA {
 10685  			break
 10686  		}
 10687  		z := v_0.Args[1]
 10688  		y := v_0.Args[0]
 10689  		x := v_1
 10690  		v.reset(OpARMRSBshiftRAreg)
 10691  		v.AddArg3(x, y, z)
 10692  		return true
 10693  	}
 10694  	// match: (SUB x x)
 10695  	// result: (MOVWconst [0])
 10696  	for {
 10697  		x := v_0
 10698  		if x != v_1 {
 10699  			break
 10700  		}
 10701  		v.reset(OpARMMOVWconst)
 10702  		v.AuxInt = int32ToAuxInt(0)
 10703  		return true
 10704  	}
 10705  	// match: (SUB a (MUL x y))
 10706  	// cond: objabi.GOARM == 7
 10707  	// result: (MULS x y a)
 10708  	for {
 10709  		a := v_0
 10710  		if v_1.Op != OpARMMUL {
 10711  			break
 10712  		}
 10713  		y := v_1.Args[1]
 10714  		x := v_1.Args[0]
 10715  		if !(objabi.GOARM == 7) {
 10716  			break
 10717  		}
 10718  		v.reset(OpARMMULS)
 10719  		v.AddArg3(x, y, a)
 10720  		return true
 10721  	}
 10722  	return false
 10723  }
 10724  func rewriteValueARM_OpARMSUBD(v *Value) bool {
 10725  	v_1 := v.Args[1]
 10726  	v_0 := v.Args[0]
 10727  	// match: (SUBD a (MULD x y))
 10728  	// cond: a.Uses == 1 && objabi.GOARM >= 6
 10729  	// result: (MULSD a x y)
 10730  	for {
 10731  		a := v_0
 10732  		if v_1.Op != OpARMMULD {
 10733  			break
 10734  		}
 10735  		y := v_1.Args[1]
 10736  		x := v_1.Args[0]
 10737  		if !(a.Uses == 1 && objabi.GOARM >= 6) {
 10738  			break
 10739  		}
 10740  		v.reset(OpARMMULSD)
 10741  		v.AddArg3(a, x, y)
 10742  		return true
 10743  	}
 10744  	// match: (SUBD a (NMULD x y))
 10745  	// cond: a.Uses == 1 && objabi.GOARM >= 6
 10746  	// result: (MULAD a x y)
 10747  	for {
 10748  		a := v_0
 10749  		if v_1.Op != OpARMNMULD {
 10750  			break
 10751  		}
 10752  		y := v_1.Args[1]
 10753  		x := v_1.Args[0]
 10754  		if !(a.Uses == 1 && objabi.GOARM >= 6) {
 10755  			break
 10756  		}
 10757  		v.reset(OpARMMULAD)
 10758  		v.AddArg3(a, x, y)
 10759  		return true
 10760  	}
 10761  	return false
 10762  }
 10763  func rewriteValueARM_OpARMSUBF(v *Value) bool {
 10764  	v_1 := v.Args[1]
 10765  	v_0 := v.Args[0]
 10766  	// match: (SUBF a (MULF x y))
 10767  	// cond: a.Uses == 1 && objabi.GOARM >= 6
 10768  	// result: (MULSF a x y)
 10769  	for {
 10770  		a := v_0
 10771  		if v_1.Op != OpARMMULF {
 10772  			break
 10773  		}
 10774  		y := v_1.Args[1]
 10775  		x := v_1.Args[0]
 10776  		if !(a.Uses == 1 && objabi.GOARM >= 6) {
 10777  			break
 10778  		}
 10779  		v.reset(OpARMMULSF)
 10780  		v.AddArg3(a, x, y)
 10781  		return true
 10782  	}
 10783  	// match: (SUBF a (NMULF x y))
 10784  	// cond: a.Uses == 1 && objabi.GOARM >= 6
 10785  	// result: (MULAF a x y)
 10786  	for {
 10787  		a := v_0
 10788  		if v_1.Op != OpARMNMULF {
 10789  			break
 10790  		}
 10791  		y := v_1.Args[1]
 10792  		x := v_1.Args[0]
 10793  		if !(a.Uses == 1 && objabi.GOARM >= 6) {
 10794  			break
 10795  		}
 10796  		v.reset(OpARMMULAF)
 10797  		v.AddArg3(a, x, y)
 10798  		return true
 10799  	}
 10800  	return false
 10801  }
 10802  func rewriteValueARM_OpARMSUBS(v *Value) bool {
 10803  	v_1 := v.Args[1]
 10804  	v_0 := v.Args[0]
 10805  	// match: (SUBS x (MOVWconst [c]))
 10806  	// result: (SUBSconst [c] x)
 10807  	for {
 10808  		x := v_0
 10809  		if v_1.Op != OpARMMOVWconst {
 10810  			break
 10811  		}
 10812  		c := auxIntToInt32(v_1.AuxInt)
 10813  		v.reset(OpARMSUBSconst)
 10814  		v.AuxInt = int32ToAuxInt(c)
 10815  		v.AddArg(x)
 10816  		return true
 10817  	}
 10818  	// match: (SUBS x (SLLconst [c] y))
 10819  	// result: (SUBSshiftLL x y [c])
 10820  	for {
 10821  		x := v_0
 10822  		if v_1.Op != OpARMSLLconst {
 10823  			break
 10824  		}
 10825  		c := auxIntToInt32(v_1.AuxInt)
 10826  		y := v_1.Args[0]
 10827  		v.reset(OpARMSUBSshiftLL)
 10828  		v.AuxInt = int32ToAuxInt(c)
 10829  		v.AddArg2(x, y)
 10830  		return true
 10831  	}
 10832  	// match: (SUBS (SLLconst [c] y) x)
 10833  	// result: (RSBSshiftLL x y [c])
 10834  	for {
 10835  		if v_0.Op != OpARMSLLconst {
 10836  			break
 10837  		}
 10838  		c := auxIntToInt32(v_0.AuxInt)
 10839  		y := v_0.Args[0]
 10840  		x := v_1
 10841  		v.reset(OpARMRSBSshiftLL)
 10842  		v.AuxInt = int32ToAuxInt(c)
 10843  		v.AddArg2(x, y)
 10844  		return true
 10845  	}
 10846  	// match: (SUBS x (SRLconst [c] y))
 10847  	// result: (SUBSshiftRL x y [c])
 10848  	for {
 10849  		x := v_0
 10850  		if v_1.Op != OpARMSRLconst {
 10851  			break
 10852  		}
 10853  		c := auxIntToInt32(v_1.AuxInt)
 10854  		y := v_1.Args[0]
 10855  		v.reset(OpARMSUBSshiftRL)
 10856  		v.AuxInt = int32ToAuxInt(c)
 10857  		v.AddArg2(x, y)
 10858  		return true
 10859  	}
 10860  	// match: (SUBS (SRLconst [c] y) x)
 10861  	// result: (RSBSshiftRL x y [c])
 10862  	for {
 10863  		if v_0.Op != OpARMSRLconst {
 10864  			break
 10865  		}
 10866  		c := auxIntToInt32(v_0.AuxInt)
 10867  		y := v_0.Args[0]
 10868  		x := v_1
 10869  		v.reset(OpARMRSBSshiftRL)
 10870  		v.AuxInt = int32ToAuxInt(c)
 10871  		v.AddArg2(x, y)
 10872  		return true
 10873  	}
 10874  	// match: (SUBS x (SRAconst [c] y))
 10875  	// result: (SUBSshiftRA x y [c])
 10876  	for {
 10877  		x := v_0
 10878  		if v_1.Op != OpARMSRAconst {
 10879  			break
 10880  		}
 10881  		c := auxIntToInt32(v_1.AuxInt)
 10882  		y := v_1.Args[0]
 10883  		v.reset(OpARMSUBSshiftRA)
 10884  		v.AuxInt = int32ToAuxInt(c)
 10885  		v.AddArg2(x, y)
 10886  		return true
 10887  	}
 10888  	// match: (SUBS (SRAconst [c] y) x)
 10889  	// result: (RSBSshiftRA x y [c])
 10890  	for {
 10891  		if v_0.Op != OpARMSRAconst {
 10892  			break
 10893  		}
 10894  		c := auxIntToInt32(v_0.AuxInt)
 10895  		y := v_0.Args[0]
 10896  		x := v_1
 10897  		v.reset(OpARMRSBSshiftRA)
 10898  		v.AuxInt = int32ToAuxInt(c)
 10899  		v.AddArg2(x, y)
 10900  		return true
 10901  	}
 10902  	// match: (SUBS x (SLL y z))
 10903  	// result: (SUBSshiftLLreg x y z)
 10904  	for {
 10905  		x := v_0
 10906  		if v_1.Op != OpARMSLL {
 10907  			break
 10908  		}
 10909  		z := v_1.Args[1]
 10910  		y := v_1.Args[0]
 10911  		v.reset(OpARMSUBSshiftLLreg)
 10912  		v.AddArg3(x, y, z)
 10913  		return true
 10914  	}
 10915  	// match: (SUBS (SLL y z) x)
 10916  	// result: (RSBSshiftLLreg x y z)
 10917  	for {
 10918  		if v_0.Op != OpARMSLL {
 10919  			break
 10920  		}
 10921  		z := v_0.Args[1]
 10922  		y := v_0.Args[0]
 10923  		x := v_1
 10924  		v.reset(OpARMRSBSshiftLLreg)
 10925  		v.AddArg3(x, y, z)
 10926  		return true
 10927  	}
 10928  	// match: (SUBS x (SRL y z))
 10929  	// result: (SUBSshiftRLreg x y z)
 10930  	for {
 10931  		x := v_0
 10932  		if v_1.Op != OpARMSRL {
 10933  			break
 10934  		}
 10935  		z := v_1.Args[1]
 10936  		y := v_1.Args[0]
 10937  		v.reset(OpARMSUBSshiftRLreg)
 10938  		v.AddArg3(x, y, z)
 10939  		return true
 10940  	}
 10941  	// match: (SUBS (SRL y z) x)
 10942  	// result: (RSBSshiftRLreg x y z)
 10943  	for {
 10944  		if v_0.Op != OpARMSRL {
 10945  			break
 10946  		}
 10947  		z := v_0.Args[1]
 10948  		y := v_0.Args[0]
 10949  		x := v_1
 10950  		v.reset(OpARMRSBSshiftRLreg)
 10951  		v.AddArg3(x, y, z)
 10952  		return true
 10953  	}
 10954  	// match: (SUBS x (SRA y z))
 10955  	// result: (SUBSshiftRAreg x y z)
 10956  	for {
 10957  		x := v_0
 10958  		if v_1.Op != OpARMSRA {
 10959  			break
 10960  		}
 10961  		z := v_1.Args[1]
 10962  		y := v_1.Args[0]
 10963  		v.reset(OpARMSUBSshiftRAreg)
 10964  		v.AddArg3(x, y, z)
 10965  		return true
 10966  	}
 10967  	// match: (SUBS (SRA y z) x)
 10968  	// result: (RSBSshiftRAreg x y z)
 10969  	for {
 10970  		if v_0.Op != OpARMSRA {
 10971  			break
 10972  		}
 10973  		z := v_0.Args[1]
 10974  		y := v_0.Args[0]
 10975  		x := v_1
 10976  		v.reset(OpARMRSBSshiftRAreg)
 10977  		v.AddArg3(x, y, z)
 10978  		return true
 10979  	}
 10980  	return false
 10981  }
 10982  func rewriteValueARM_OpARMSUBSshiftLL(v *Value) bool {
 10983  	v_1 := v.Args[1]
 10984  	v_0 := v.Args[0]
 10985  	b := v.Block
 10986  	// match: (SUBSshiftLL (MOVWconst [c]) x [d])
 10987  	// result: (RSBSconst [c] (SLLconst <x.Type> x [d]))
 10988  	for {
 10989  		d := auxIntToInt32(v.AuxInt)
 10990  		if v_0.Op != OpARMMOVWconst {
 10991  			break
 10992  		}
 10993  		c := auxIntToInt32(v_0.AuxInt)
 10994  		x := v_1
 10995  		v.reset(OpARMRSBSconst)
 10996  		v.AuxInt = int32ToAuxInt(c)
 10997  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 10998  		v0.AuxInt = int32ToAuxInt(d)
 10999  		v0.AddArg(x)
 11000  		v.AddArg(v0)
 11001  		return true
 11002  	}
 11003  	// match: (SUBSshiftLL x (MOVWconst [c]) [d])
 11004  	// result: (SUBSconst x [c<<uint64(d)])
 11005  	for {
 11006  		d := auxIntToInt32(v.AuxInt)
 11007  		x := v_0
 11008  		if v_1.Op != OpARMMOVWconst {
 11009  			break
 11010  		}
 11011  		c := auxIntToInt32(v_1.AuxInt)
 11012  		v.reset(OpARMSUBSconst)
 11013  		v.AuxInt = int32ToAuxInt(c << uint64(d))
 11014  		v.AddArg(x)
 11015  		return true
 11016  	}
 11017  	return false
 11018  }
 11019  func rewriteValueARM_OpARMSUBSshiftLLreg(v *Value) bool {
 11020  	v_2 := v.Args[2]
 11021  	v_1 := v.Args[1]
 11022  	v_0 := v.Args[0]
 11023  	b := v.Block
 11024  	// match: (SUBSshiftLLreg (MOVWconst [c]) x y)
 11025  	// result: (RSBSconst [c] (SLL <x.Type> x y))
 11026  	for {
 11027  		if v_0.Op != OpARMMOVWconst {
 11028  			break
 11029  		}
 11030  		c := auxIntToInt32(v_0.AuxInt)
 11031  		x := v_1
 11032  		y := v_2
 11033  		v.reset(OpARMRSBSconst)
 11034  		v.AuxInt = int32ToAuxInt(c)
 11035  		v0 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
 11036  		v0.AddArg2(x, y)
 11037  		v.AddArg(v0)
 11038  		return true
 11039  	}
 11040  	// match: (SUBSshiftLLreg x y (MOVWconst [c]))
 11041  	// result: (SUBSshiftLL x y [c])
 11042  	for {
 11043  		x := v_0
 11044  		y := v_1
 11045  		if v_2.Op != OpARMMOVWconst {
 11046  			break
 11047  		}
 11048  		c := auxIntToInt32(v_2.AuxInt)
 11049  		v.reset(OpARMSUBSshiftLL)
 11050  		v.AuxInt = int32ToAuxInt(c)
 11051  		v.AddArg2(x, y)
 11052  		return true
 11053  	}
 11054  	return false
 11055  }
 11056  func rewriteValueARM_OpARMSUBSshiftRA(v *Value) bool {
 11057  	v_1 := v.Args[1]
 11058  	v_0 := v.Args[0]
 11059  	b := v.Block
 11060  	// match: (SUBSshiftRA (MOVWconst [c]) x [d])
 11061  	// result: (RSBSconst [c] (SRAconst <x.Type> x [d]))
 11062  	for {
 11063  		d := auxIntToInt32(v.AuxInt)
 11064  		if v_0.Op != OpARMMOVWconst {
 11065  			break
 11066  		}
 11067  		c := auxIntToInt32(v_0.AuxInt)
 11068  		x := v_1
 11069  		v.reset(OpARMRSBSconst)
 11070  		v.AuxInt = int32ToAuxInt(c)
 11071  		v0 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
 11072  		v0.AuxInt = int32ToAuxInt(d)
 11073  		v0.AddArg(x)
 11074  		v.AddArg(v0)
 11075  		return true
 11076  	}
 11077  	// match: (SUBSshiftRA x (MOVWconst [c]) [d])
 11078  	// result: (SUBSconst x [c>>uint64(d)])
 11079  	for {
 11080  		d := auxIntToInt32(v.AuxInt)
 11081  		x := v_0
 11082  		if v_1.Op != OpARMMOVWconst {
 11083  			break
 11084  		}
 11085  		c := auxIntToInt32(v_1.AuxInt)
 11086  		v.reset(OpARMSUBSconst)
 11087  		v.AuxInt = int32ToAuxInt(c >> uint64(d))
 11088  		v.AddArg(x)
 11089  		return true
 11090  	}
 11091  	return false
 11092  }
 11093  func rewriteValueARM_OpARMSUBSshiftRAreg(v *Value) bool {
 11094  	v_2 := v.Args[2]
 11095  	v_1 := v.Args[1]
 11096  	v_0 := v.Args[0]
 11097  	b := v.Block
 11098  	// match: (SUBSshiftRAreg (MOVWconst [c]) x y)
 11099  	// result: (RSBSconst [c] (SRA <x.Type> x y))
 11100  	for {
 11101  		if v_0.Op != OpARMMOVWconst {
 11102  			break
 11103  		}
 11104  		c := auxIntToInt32(v_0.AuxInt)
 11105  		x := v_1
 11106  		y := v_2
 11107  		v.reset(OpARMRSBSconst)
 11108  		v.AuxInt = int32ToAuxInt(c)
 11109  		v0 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
 11110  		v0.AddArg2(x, y)
 11111  		v.AddArg(v0)
 11112  		return true
 11113  	}
 11114  	// match: (SUBSshiftRAreg x y (MOVWconst [c]))
 11115  	// result: (SUBSshiftRA x y [c])
 11116  	for {
 11117  		x := v_0
 11118  		y := v_1
 11119  		if v_2.Op != OpARMMOVWconst {
 11120  			break
 11121  		}
 11122  		c := auxIntToInt32(v_2.AuxInt)
 11123  		v.reset(OpARMSUBSshiftRA)
 11124  		v.AuxInt = int32ToAuxInt(c)
 11125  		v.AddArg2(x, y)
 11126  		return true
 11127  	}
 11128  	return false
 11129  }
 11130  func rewriteValueARM_OpARMSUBSshiftRL(v *Value) bool {
 11131  	v_1 := v.Args[1]
 11132  	v_0 := v.Args[0]
 11133  	b := v.Block
 11134  	// match: (SUBSshiftRL (MOVWconst [c]) x [d])
 11135  	// result: (RSBSconst [c] (SRLconst <x.Type> x [d]))
 11136  	for {
 11137  		d := auxIntToInt32(v.AuxInt)
 11138  		if v_0.Op != OpARMMOVWconst {
 11139  			break
 11140  		}
 11141  		c := auxIntToInt32(v_0.AuxInt)
 11142  		x := v_1
 11143  		v.reset(OpARMRSBSconst)
 11144  		v.AuxInt = int32ToAuxInt(c)
 11145  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
 11146  		v0.AuxInt = int32ToAuxInt(d)
 11147  		v0.AddArg(x)
 11148  		v.AddArg(v0)
 11149  		return true
 11150  	}
 11151  	// match: (SUBSshiftRL x (MOVWconst [c]) [d])
 11152  	// result: (SUBSconst x [int32(uint32(c)>>uint64(d))])
 11153  	for {
 11154  		d := auxIntToInt32(v.AuxInt)
 11155  		x := v_0
 11156  		if v_1.Op != OpARMMOVWconst {
 11157  			break
 11158  		}
 11159  		c := auxIntToInt32(v_1.AuxInt)
 11160  		v.reset(OpARMSUBSconst)
 11161  		v.AuxInt = int32ToAuxInt(int32(uint32(c) >> uint64(d)))
 11162  		v.AddArg(x)
 11163  		return true
 11164  	}
 11165  	return false
 11166  }
 11167  func rewriteValueARM_OpARMSUBSshiftRLreg(v *Value) bool {
 11168  	v_2 := v.Args[2]
 11169  	v_1 := v.Args[1]
 11170  	v_0 := v.Args[0]
 11171  	b := v.Block
 11172  	// match: (SUBSshiftRLreg (MOVWconst [c]) x y)
 11173  	// result: (RSBSconst [c] (SRL <x.Type> x y))
 11174  	for {
 11175  		if v_0.Op != OpARMMOVWconst {
 11176  			break
 11177  		}
 11178  		c := auxIntToInt32(v_0.AuxInt)
 11179  		x := v_1
 11180  		y := v_2
 11181  		v.reset(OpARMRSBSconst)
 11182  		v.AuxInt = int32ToAuxInt(c)
 11183  		v0 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
 11184  		v0.AddArg2(x, y)
 11185  		v.AddArg(v0)
 11186  		return true
 11187  	}
 11188  	// match: (SUBSshiftRLreg x y (MOVWconst [c]))
 11189  	// result: (SUBSshiftRL x y [c])
 11190  	for {
 11191  		x := v_0
 11192  		y := v_1
 11193  		if v_2.Op != OpARMMOVWconst {
 11194  			break
 11195  		}
 11196  		c := auxIntToInt32(v_2.AuxInt)
 11197  		v.reset(OpARMSUBSshiftRL)
 11198  		v.AuxInt = int32ToAuxInt(c)
 11199  		v.AddArg2(x, y)
 11200  		return true
 11201  	}
 11202  	return false
 11203  }
 11204  func rewriteValueARM_OpARMSUBconst(v *Value) bool {
 11205  	v_0 := v.Args[0]
 11206  	// match: (SUBconst [off1] (MOVWaddr [off2] {sym} ptr))
 11207  	// result: (MOVWaddr [off2-off1] {sym} ptr)
 11208  	for {
 11209  		off1 := auxIntToInt32(v.AuxInt)
 11210  		if v_0.Op != OpARMMOVWaddr {
 11211  			break
 11212  		}
 11213  		off2 := auxIntToInt32(v_0.AuxInt)
 11214  		sym := auxToSym(v_0.Aux)
 11215  		ptr := v_0.Args[0]
 11216  		v.reset(OpARMMOVWaddr)
 11217  		v.AuxInt = int32ToAuxInt(off2 - off1)
 11218  		v.Aux = symToAux(sym)
 11219  		v.AddArg(ptr)
 11220  		return true
 11221  	}
 11222  	// match: (SUBconst [0] x)
 11223  	// result: x
 11224  	for {
 11225  		if auxIntToInt32(v.AuxInt) != 0 {
 11226  			break
 11227  		}
 11228  		x := v_0
 11229  		v.copyOf(x)
 11230  		return true
 11231  	}
 11232  	// match: (SUBconst [c] x)
 11233  	// cond: !isARMImmRot(uint32(c)) && isARMImmRot(uint32(-c))
 11234  	// result: (ADDconst [-c] x)
 11235  	for {
 11236  		c := auxIntToInt32(v.AuxInt)
 11237  		x := v_0
 11238  		if !(!isARMImmRot(uint32(c)) && isARMImmRot(uint32(-c))) {
 11239  			break
 11240  		}
 11241  		v.reset(OpARMADDconst)
 11242  		v.AuxInt = int32ToAuxInt(-c)
 11243  		v.AddArg(x)
 11244  		return true
 11245  	}
 11246  	// match: (SUBconst [c] x)
 11247  	// cond: objabi.GOARM==7 && !isARMImmRot(uint32(c)) && uint32(c)>0xffff && uint32(-c)<=0xffff
 11248  	// result: (ADDconst [-c] x)
 11249  	for {
 11250  		c := auxIntToInt32(v.AuxInt)
 11251  		x := v_0
 11252  		if !(objabi.GOARM == 7 && !isARMImmRot(uint32(c)) && uint32(c) > 0xffff && uint32(-c) <= 0xffff) {
 11253  			break
 11254  		}
 11255  		v.reset(OpARMADDconst)
 11256  		v.AuxInt = int32ToAuxInt(-c)
 11257  		v.AddArg(x)
 11258  		return true
 11259  	}
 11260  	// match: (SUBconst [c] (MOVWconst [d]))
 11261  	// result: (MOVWconst [d-c])
 11262  	for {
 11263  		c := auxIntToInt32(v.AuxInt)
 11264  		if v_0.Op != OpARMMOVWconst {
 11265  			break
 11266  		}
 11267  		d := auxIntToInt32(v_0.AuxInt)
 11268  		v.reset(OpARMMOVWconst)
 11269  		v.AuxInt = int32ToAuxInt(d - c)
 11270  		return true
 11271  	}
 11272  	// match: (SUBconst [c] (SUBconst [d] x))
 11273  	// result: (ADDconst [-c-d] x)
 11274  	for {
 11275  		c := auxIntToInt32(v.AuxInt)
 11276  		if v_0.Op != OpARMSUBconst {
 11277  			break
 11278  		}
 11279  		d := auxIntToInt32(v_0.AuxInt)
 11280  		x := v_0.Args[0]
 11281  		v.reset(OpARMADDconst)
 11282  		v.AuxInt = int32ToAuxInt(-c - d)
 11283  		v.AddArg(x)
 11284  		return true
 11285  	}
 11286  	// match: (SUBconst [c] (ADDconst [d] x))
 11287  	// result: (ADDconst [-c+d] x)
 11288  	for {
 11289  		c := auxIntToInt32(v.AuxInt)
 11290  		if v_0.Op != OpARMADDconst {
 11291  			break
 11292  		}
 11293  		d := auxIntToInt32(v_0.AuxInt)
 11294  		x := v_0.Args[0]
 11295  		v.reset(OpARMADDconst)
 11296  		v.AuxInt = int32ToAuxInt(-c + d)
 11297  		v.AddArg(x)
 11298  		return true
 11299  	}
 11300  	// match: (SUBconst [c] (RSBconst [d] x))
 11301  	// result: (RSBconst [-c+d] x)
 11302  	for {
 11303  		c := auxIntToInt32(v.AuxInt)
 11304  		if v_0.Op != OpARMRSBconst {
 11305  			break
 11306  		}
 11307  		d := auxIntToInt32(v_0.AuxInt)
 11308  		x := v_0.Args[0]
 11309  		v.reset(OpARMRSBconst)
 11310  		v.AuxInt = int32ToAuxInt(-c + d)
 11311  		v.AddArg(x)
 11312  		return true
 11313  	}
 11314  	return false
 11315  }
 11316  func rewriteValueARM_OpARMSUBshiftLL(v *Value) bool {
 11317  	v_1 := v.Args[1]
 11318  	v_0 := v.Args[0]
 11319  	b := v.Block
 11320  	// match: (SUBshiftLL (MOVWconst [c]) x [d])
 11321  	// result: (RSBconst [c] (SLLconst <x.Type> x [d]))
 11322  	for {
 11323  		d := auxIntToInt32(v.AuxInt)
 11324  		if v_0.Op != OpARMMOVWconst {
 11325  			break
 11326  		}
 11327  		c := auxIntToInt32(v_0.AuxInt)
 11328  		x := v_1
 11329  		v.reset(OpARMRSBconst)
 11330  		v.AuxInt = int32ToAuxInt(c)
 11331  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 11332  		v0.AuxInt = int32ToAuxInt(d)
 11333  		v0.AddArg(x)
 11334  		v.AddArg(v0)
 11335  		return true
 11336  	}
 11337  	// match: (SUBshiftLL x (MOVWconst [c]) [d])
 11338  	// result: (SUBconst x [c<<uint64(d)])
 11339  	for {
 11340  		d := auxIntToInt32(v.AuxInt)
 11341  		x := v_0
 11342  		if v_1.Op != OpARMMOVWconst {
 11343  			break
 11344  		}
 11345  		c := auxIntToInt32(v_1.AuxInt)
 11346  		v.reset(OpARMSUBconst)
 11347  		v.AuxInt = int32ToAuxInt(c << uint64(d))
 11348  		v.AddArg(x)
 11349  		return true
 11350  	}
 11351  	// match: (SUBshiftLL x (SLLconst x [c]) [d])
 11352  	// cond: c==d
 11353  	// result: (MOVWconst [0])
 11354  	for {
 11355  		d := auxIntToInt32(v.AuxInt)
 11356  		x := v_0
 11357  		if v_1.Op != OpARMSLLconst {
 11358  			break
 11359  		}
 11360  		c := auxIntToInt32(v_1.AuxInt)
 11361  		if x != v_1.Args[0] || !(c == d) {
 11362  			break
 11363  		}
 11364  		v.reset(OpARMMOVWconst)
 11365  		v.AuxInt = int32ToAuxInt(0)
 11366  		return true
 11367  	}
 11368  	return false
 11369  }
 11370  func rewriteValueARM_OpARMSUBshiftLLreg(v *Value) bool {
 11371  	v_2 := v.Args[2]
 11372  	v_1 := v.Args[1]
 11373  	v_0 := v.Args[0]
 11374  	b := v.Block
 11375  	// match: (SUBshiftLLreg (MOVWconst [c]) x y)
 11376  	// result: (RSBconst [c] (SLL <x.Type> x y))
 11377  	for {
 11378  		if v_0.Op != OpARMMOVWconst {
 11379  			break
 11380  		}
 11381  		c := auxIntToInt32(v_0.AuxInt)
 11382  		x := v_1
 11383  		y := v_2
 11384  		v.reset(OpARMRSBconst)
 11385  		v.AuxInt = int32ToAuxInt(c)
 11386  		v0 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
 11387  		v0.AddArg2(x, y)
 11388  		v.AddArg(v0)
 11389  		return true
 11390  	}
 11391  	// match: (SUBshiftLLreg x y (MOVWconst [c]))
 11392  	// result: (SUBshiftLL x y [c])
 11393  	for {
 11394  		x := v_0
 11395  		y := v_1
 11396  		if v_2.Op != OpARMMOVWconst {
 11397  			break
 11398  		}
 11399  		c := auxIntToInt32(v_2.AuxInt)
 11400  		v.reset(OpARMSUBshiftLL)
 11401  		v.AuxInt = int32ToAuxInt(c)
 11402  		v.AddArg2(x, y)
 11403  		return true
 11404  	}
 11405  	return false
 11406  }
 11407  func rewriteValueARM_OpARMSUBshiftRA(v *Value) bool {
 11408  	v_1 := v.Args[1]
 11409  	v_0 := v.Args[0]
 11410  	b := v.Block
 11411  	// match: (SUBshiftRA (MOVWconst [c]) x [d])
 11412  	// result: (RSBconst [c] (SRAconst <x.Type> x [d]))
 11413  	for {
 11414  		d := auxIntToInt32(v.AuxInt)
 11415  		if v_0.Op != OpARMMOVWconst {
 11416  			break
 11417  		}
 11418  		c := auxIntToInt32(v_0.AuxInt)
 11419  		x := v_1
 11420  		v.reset(OpARMRSBconst)
 11421  		v.AuxInt = int32ToAuxInt(c)
 11422  		v0 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
 11423  		v0.AuxInt = int32ToAuxInt(d)
 11424  		v0.AddArg(x)
 11425  		v.AddArg(v0)
 11426  		return true
 11427  	}
 11428  	// match: (SUBshiftRA x (MOVWconst [c]) [d])
 11429  	// result: (SUBconst x [c>>uint64(d)])
 11430  	for {
 11431  		d := auxIntToInt32(v.AuxInt)
 11432  		x := v_0
 11433  		if v_1.Op != OpARMMOVWconst {
 11434  			break
 11435  		}
 11436  		c := auxIntToInt32(v_1.AuxInt)
 11437  		v.reset(OpARMSUBconst)
 11438  		v.AuxInt = int32ToAuxInt(c >> uint64(d))
 11439  		v.AddArg(x)
 11440  		return true
 11441  	}
 11442  	// match: (SUBshiftRA x (SRAconst x [c]) [d])
 11443  	// cond: c==d
 11444  	// result: (MOVWconst [0])
 11445  	for {
 11446  		d := auxIntToInt32(v.AuxInt)
 11447  		x := v_0
 11448  		if v_1.Op != OpARMSRAconst {
 11449  			break
 11450  		}
 11451  		c := auxIntToInt32(v_1.AuxInt)
 11452  		if x != v_1.Args[0] || !(c == d) {
 11453  			break
 11454  		}
 11455  		v.reset(OpARMMOVWconst)
 11456  		v.AuxInt = int32ToAuxInt(0)
 11457  		return true
 11458  	}
 11459  	return false
 11460  }
 11461  func rewriteValueARM_OpARMSUBshiftRAreg(v *Value) bool {
 11462  	v_2 := v.Args[2]
 11463  	v_1 := v.Args[1]
 11464  	v_0 := v.Args[0]
 11465  	b := v.Block
 11466  	// match: (SUBshiftRAreg (MOVWconst [c]) x y)
 11467  	// result: (RSBconst [c] (SRA <x.Type> x y))
 11468  	for {
 11469  		if v_0.Op != OpARMMOVWconst {
 11470  			break
 11471  		}
 11472  		c := auxIntToInt32(v_0.AuxInt)
 11473  		x := v_1
 11474  		y := v_2
 11475  		v.reset(OpARMRSBconst)
 11476  		v.AuxInt = int32ToAuxInt(c)
 11477  		v0 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
 11478  		v0.AddArg2(x, y)
 11479  		v.AddArg(v0)
 11480  		return true
 11481  	}
 11482  	// match: (SUBshiftRAreg x y (MOVWconst [c]))
 11483  	// result: (SUBshiftRA x y [c])
 11484  	for {
 11485  		x := v_0
 11486  		y := v_1
 11487  		if v_2.Op != OpARMMOVWconst {
 11488  			break
 11489  		}
 11490  		c := auxIntToInt32(v_2.AuxInt)
 11491  		v.reset(OpARMSUBshiftRA)
 11492  		v.AuxInt = int32ToAuxInt(c)
 11493  		v.AddArg2(x, y)
 11494  		return true
 11495  	}
 11496  	return false
 11497  }
 11498  func rewriteValueARM_OpARMSUBshiftRL(v *Value) bool {
 11499  	v_1 := v.Args[1]
 11500  	v_0 := v.Args[0]
 11501  	b := v.Block
 11502  	// match: (SUBshiftRL (MOVWconst [c]) x [d])
 11503  	// result: (RSBconst [c] (SRLconst <x.Type> x [d]))
 11504  	for {
 11505  		d := auxIntToInt32(v.AuxInt)
 11506  		if v_0.Op != OpARMMOVWconst {
 11507  			break
 11508  		}
 11509  		c := auxIntToInt32(v_0.AuxInt)
 11510  		x := v_1
 11511  		v.reset(OpARMRSBconst)
 11512  		v.AuxInt = int32ToAuxInt(c)
 11513  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
 11514  		v0.AuxInt = int32ToAuxInt(d)
 11515  		v0.AddArg(x)
 11516  		v.AddArg(v0)
 11517  		return true
 11518  	}
 11519  	// match: (SUBshiftRL x (MOVWconst [c]) [d])
 11520  	// result: (SUBconst x [int32(uint32(c)>>uint64(d))])
 11521  	for {
 11522  		d := auxIntToInt32(v.AuxInt)
 11523  		x := v_0
 11524  		if v_1.Op != OpARMMOVWconst {
 11525  			break
 11526  		}
 11527  		c := auxIntToInt32(v_1.AuxInt)
 11528  		v.reset(OpARMSUBconst)
 11529  		v.AuxInt = int32ToAuxInt(int32(uint32(c) >> uint64(d)))
 11530  		v.AddArg(x)
 11531  		return true
 11532  	}
 11533  	// match: (SUBshiftRL x (SRLconst x [c]) [d])
 11534  	// cond: c==d
 11535  	// result: (MOVWconst [0])
 11536  	for {
 11537  		d := auxIntToInt32(v.AuxInt)
 11538  		x := v_0
 11539  		if v_1.Op != OpARMSRLconst {
 11540  			break
 11541  		}
 11542  		c := auxIntToInt32(v_1.AuxInt)
 11543  		if x != v_1.Args[0] || !(c == d) {
 11544  			break
 11545  		}
 11546  		v.reset(OpARMMOVWconst)
 11547  		v.AuxInt = int32ToAuxInt(0)
 11548  		return true
 11549  	}
 11550  	return false
 11551  }
 11552  func rewriteValueARM_OpARMSUBshiftRLreg(v *Value) bool {
 11553  	v_2 := v.Args[2]
 11554  	v_1 := v.Args[1]
 11555  	v_0 := v.Args[0]
 11556  	b := v.Block
 11557  	// match: (SUBshiftRLreg (MOVWconst [c]) x y)
 11558  	// result: (RSBconst [c] (SRL <x.Type> x y))
 11559  	for {
 11560  		if v_0.Op != OpARMMOVWconst {
 11561  			break
 11562  		}
 11563  		c := auxIntToInt32(v_0.AuxInt)
 11564  		x := v_1
 11565  		y := v_2
 11566  		v.reset(OpARMRSBconst)
 11567  		v.AuxInt = int32ToAuxInt(c)
 11568  		v0 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
 11569  		v0.AddArg2(x, y)
 11570  		v.AddArg(v0)
 11571  		return true
 11572  	}
 11573  	// match: (SUBshiftRLreg x y (MOVWconst [c]))
 11574  	// result: (SUBshiftRL x y [c])
 11575  	for {
 11576  		x := v_0
 11577  		y := v_1
 11578  		if v_2.Op != OpARMMOVWconst {
 11579  			break
 11580  		}
 11581  		c := auxIntToInt32(v_2.AuxInt)
 11582  		v.reset(OpARMSUBshiftRL)
 11583  		v.AuxInt = int32ToAuxInt(c)
 11584  		v.AddArg2(x, y)
 11585  		return true
 11586  	}
 11587  	return false
 11588  }
 11589  func rewriteValueARM_OpARMTEQ(v *Value) bool {
 11590  	v_1 := v.Args[1]
 11591  	v_0 := v.Args[0]
 11592  	// match: (TEQ x (MOVWconst [c]))
 11593  	// result: (TEQconst [c] x)
 11594  	for {
 11595  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11596  			x := v_0
 11597  			if v_1.Op != OpARMMOVWconst {
 11598  				continue
 11599  			}
 11600  			c := auxIntToInt32(v_1.AuxInt)
 11601  			v.reset(OpARMTEQconst)
 11602  			v.AuxInt = int32ToAuxInt(c)
 11603  			v.AddArg(x)
 11604  			return true
 11605  		}
 11606  		break
 11607  	}
 11608  	// match: (TEQ x (SLLconst [c] y))
 11609  	// result: (TEQshiftLL x y [c])
 11610  	for {
 11611  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11612  			x := v_0
 11613  			if v_1.Op != OpARMSLLconst {
 11614  				continue
 11615  			}
 11616  			c := auxIntToInt32(v_1.AuxInt)
 11617  			y := v_1.Args[0]
 11618  			v.reset(OpARMTEQshiftLL)
 11619  			v.AuxInt = int32ToAuxInt(c)
 11620  			v.AddArg2(x, y)
 11621  			return true
 11622  		}
 11623  		break
 11624  	}
 11625  	// match: (TEQ x (SRLconst [c] y))
 11626  	// result: (TEQshiftRL x y [c])
 11627  	for {
 11628  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11629  			x := v_0
 11630  			if v_1.Op != OpARMSRLconst {
 11631  				continue
 11632  			}
 11633  			c := auxIntToInt32(v_1.AuxInt)
 11634  			y := v_1.Args[0]
 11635  			v.reset(OpARMTEQshiftRL)
 11636  			v.AuxInt = int32ToAuxInt(c)
 11637  			v.AddArg2(x, y)
 11638  			return true
 11639  		}
 11640  		break
 11641  	}
 11642  	// match: (TEQ x (SRAconst [c] y))
 11643  	// result: (TEQshiftRA x y [c])
 11644  	for {
 11645  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11646  			x := v_0
 11647  			if v_1.Op != OpARMSRAconst {
 11648  				continue
 11649  			}
 11650  			c := auxIntToInt32(v_1.AuxInt)
 11651  			y := v_1.Args[0]
 11652  			v.reset(OpARMTEQshiftRA)
 11653  			v.AuxInt = int32ToAuxInt(c)
 11654  			v.AddArg2(x, y)
 11655  			return true
 11656  		}
 11657  		break
 11658  	}
 11659  	// match: (TEQ x (SLL y z))
 11660  	// result: (TEQshiftLLreg x y z)
 11661  	for {
 11662  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11663  			x := v_0
 11664  			if v_1.Op != OpARMSLL {
 11665  				continue
 11666  			}
 11667  			z := v_1.Args[1]
 11668  			y := v_1.Args[0]
 11669  			v.reset(OpARMTEQshiftLLreg)
 11670  			v.AddArg3(x, y, z)
 11671  			return true
 11672  		}
 11673  		break
 11674  	}
 11675  	// match: (TEQ x (SRL y z))
 11676  	// result: (TEQshiftRLreg x y z)
 11677  	for {
 11678  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11679  			x := v_0
 11680  			if v_1.Op != OpARMSRL {
 11681  				continue
 11682  			}
 11683  			z := v_1.Args[1]
 11684  			y := v_1.Args[0]
 11685  			v.reset(OpARMTEQshiftRLreg)
 11686  			v.AddArg3(x, y, z)
 11687  			return true
 11688  		}
 11689  		break
 11690  	}
 11691  	// match: (TEQ x (SRA y z))
 11692  	// result: (TEQshiftRAreg x y z)
 11693  	for {
 11694  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11695  			x := v_0
 11696  			if v_1.Op != OpARMSRA {
 11697  				continue
 11698  			}
 11699  			z := v_1.Args[1]
 11700  			y := v_1.Args[0]
 11701  			v.reset(OpARMTEQshiftRAreg)
 11702  			v.AddArg3(x, y, z)
 11703  			return true
 11704  		}
 11705  		break
 11706  	}
 11707  	return false
 11708  }
 11709  func rewriteValueARM_OpARMTEQconst(v *Value) bool {
 11710  	v_0 := v.Args[0]
 11711  	// match: (TEQconst (MOVWconst [x]) [y])
 11712  	// result: (FlagConstant [logicFlags32(x^y)])
 11713  	for {
 11714  		y := auxIntToInt32(v.AuxInt)
 11715  		if v_0.Op != OpARMMOVWconst {
 11716  			break
 11717  		}
 11718  		x := auxIntToInt32(v_0.AuxInt)
 11719  		v.reset(OpARMFlagConstant)
 11720  		v.AuxInt = flagConstantToAuxInt(logicFlags32(x ^ y))
 11721  		return true
 11722  	}
 11723  	return false
 11724  }
 11725  func rewriteValueARM_OpARMTEQshiftLL(v *Value) bool {
 11726  	v_1 := v.Args[1]
 11727  	v_0 := v.Args[0]
 11728  	b := v.Block
 11729  	// match: (TEQshiftLL (MOVWconst [c]) x [d])
 11730  	// result: (TEQconst [c] (SLLconst <x.Type> x [d]))
 11731  	for {
 11732  		d := auxIntToInt32(v.AuxInt)
 11733  		if v_0.Op != OpARMMOVWconst {
 11734  			break
 11735  		}
 11736  		c := auxIntToInt32(v_0.AuxInt)
 11737  		x := v_1
 11738  		v.reset(OpARMTEQconst)
 11739  		v.AuxInt = int32ToAuxInt(c)
 11740  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 11741  		v0.AuxInt = int32ToAuxInt(d)
 11742  		v0.AddArg(x)
 11743  		v.AddArg(v0)
 11744  		return true
 11745  	}
 11746  	// match: (TEQshiftLL x (MOVWconst [c]) [d])
 11747  	// result: (TEQconst x [c<<uint64(d)])
 11748  	for {
 11749  		d := auxIntToInt32(v.AuxInt)
 11750  		x := v_0
 11751  		if v_1.Op != OpARMMOVWconst {
 11752  			break
 11753  		}
 11754  		c := auxIntToInt32(v_1.AuxInt)
 11755  		v.reset(OpARMTEQconst)
 11756  		v.AuxInt = int32ToAuxInt(c << uint64(d))
 11757  		v.AddArg(x)
 11758  		return true
 11759  	}
 11760  	return false
 11761  }
 11762  func rewriteValueARM_OpARMTEQshiftLLreg(v *Value) bool {
 11763  	v_2 := v.Args[2]
 11764  	v_1 := v.Args[1]
 11765  	v_0 := v.Args[0]
 11766  	b := v.Block
 11767  	// match: (TEQshiftLLreg (MOVWconst [c]) x y)
 11768  	// result: (TEQconst [c] (SLL <x.Type> x y))
 11769  	for {
 11770  		if v_0.Op != OpARMMOVWconst {
 11771  			break
 11772  		}
 11773  		c := auxIntToInt32(v_0.AuxInt)
 11774  		x := v_1
 11775  		y := v_2
 11776  		v.reset(OpARMTEQconst)
 11777  		v.AuxInt = int32ToAuxInt(c)
 11778  		v0 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
 11779  		v0.AddArg2(x, y)
 11780  		v.AddArg(v0)
 11781  		return true
 11782  	}
 11783  	// match: (TEQshiftLLreg x y (MOVWconst [c]))
 11784  	// result: (TEQshiftLL x y [c])
 11785  	for {
 11786  		x := v_0
 11787  		y := v_1
 11788  		if v_2.Op != OpARMMOVWconst {
 11789  			break
 11790  		}
 11791  		c := auxIntToInt32(v_2.AuxInt)
 11792  		v.reset(OpARMTEQshiftLL)
 11793  		v.AuxInt = int32ToAuxInt(c)
 11794  		v.AddArg2(x, y)
 11795  		return true
 11796  	}
 11797  	return false
 11798  }
 11799  func rewriteValueARM_OpARMTEQshiftRA(v *Value) bool {
 11800  	v_1 := v.Args[1]
 11801  	v_0 := v.Args[0]
 11802  	b := v.Block
 11803  	// match: (TEQshiftRA (MOVWconst [c]) x [d])
 11804  	// result: (TEQconst [c] (SRAconst <x.Type> x [d]))
 11805  	for {
 11806  		d := auxIntToInt32(v.AuxInt)
 11807  		if v_0.Op != OpARMMOVWconst {
 11808  			break
 11809  		}
 11810  		c := auxIntToInt32(v_0.AuxInt)
 11811  		x := v_1
 11812  		v.reset(OpARMTEQconst)
 11813  		v.AuxInt = int32ToAuxInt(c)
 11814  		v0 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
 11815  		v0.AuxInt = int32ToAuxInt(d)
 11816  		v0.AddArg(x)
 11817  		v.AddArg(v0)
 11818  		return true
 11819  	}
 11820  	// match: (TEQshiftRA x (MOVWconst [c]) [d])
 11821  	// result: (TEQconst x [c>>uint64(d)])
 11822  	for {
 11823  		d := auxIntToInt32(v.AuxInt)
 11824  		x := v_0
 11825  		if v_1.Op != OpARMMOVWconst {
 11826  			break
 11827  		}
 11828  		c := auxIntToInt32(v_1.AuxInt)
 11829  		v.reset(OpARMTEQconst)
 11830  		v.AuxInt = int32ToAuxInt(c >> uint64(d))
 11831  		v.AddArg(x)
 11832  		return true
 11833  	}
 11834  	return false
 11835  }
 11836  func rewriteValueARM_OpARMTEQshiftRAreg(v *Value) bool {
 11837  	v_2 := v.Args[2]
 11838  	v_1 := v.Args[1]
 11839  	v_0 := v.Args[0]
 11840  	b := v.Block
 11841  	// match: (TEQshiftRAreg (MOVWconst [c]) x y)
 11842  	// result: (TEQconst [c] (SRA <x.Type> x y))
 11843  	for {
 11844  		if v_0.Op != OpARMMOVWconst {
 11845  			break
 11846  		}
 11847  		c := auxIntToInt32(v_0.AuxInt)
 11848  		x := v_1
 11849  		y := v_2
 11850  		v.reset(OpARMTEQconst)
 11851  		v.AuxInt = int32ToAuxInt(c)
 11852  		v0 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
 11853  		v0.AddArg2(x, y)
 11854  		v.AddArg(v0)
 11855  		return true
 11856  	}
 11857  	// match: (TEQshiftRAreg x y (MOVWconst [c]))
 11858  	// result: (TEQshiftRA x y [c])
 11859  	for {
 11860  		x := v_0
 11861  		y := v_1
 11862  		if v_2.Op != OpARMMOVWconst {
 11863  			break
 11864  		}
 11865  		c := auxIntToInt32(v_2.AuxInt)
 11866  		v.reset(OpARMTEQshiftRA)
 11867  		v.AuxInt = int32ToAuxInt(c)
 11868  		v.AddArg2(x, y)
 11869  		return true
 11870  	}
 11871  	return false
 11872  }
 11873  func rewriteValueARM_OpARMTEQshiftRL(v *Value) bool {
 11874  	v_1 := v.Args[1]
 11875  	v_0 := v.Args[0]
 11876  	b := v.Block
 11877  	// match: (TEQshiftRL (MOVWconst [c]) x [d])
 11878  	// result: (TEQconst [c] (SRLconst <x.Type> x [d]))
 11879  	for {
 11880  		d := auxIntToInt32(v.AuxInt)
 11881  		if v_0.Op != OpARMMOVWconst {
 11882  			break
 11883  		}
 11884  		c := auxIntToInt32(v_0.AuxInt)
 11885  		x := v_1
 11886  		v.reset(OpARMTEQconst)
 11887  		v.AuxInt = int32ToAuxInt(c)
 11888  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
 11889  		v0.AuxInt = int32ToAuxInt(d)
 11890  		v0.AddArg(x)
 11891  		v.AddArg(v0)
 11892  		return true
 11893  	}
 11894  	// match: (TEQshiftRL x (MOVWconst [c]) [d])
 11895  	// result: (TEQconst x [int32(uint32(c)>>uint64(d))])
 11896  	for {
 11897  		d := auxIntToInt32(v.AuxInt)
 11898  		x := v_0
 11899  		if v_1.Op != OpARMMOVWconst {
 11900  			break
 11901  		}
 11902  		c := auxIntToInt32(v_1.AuxInt)
 11903  		v.reset(OpARMTEQconst)
 11904  		v.AuxInt = int32ToAuxInt(int32(uint32(c) >> uint64(d)))
 11905  		v.AddArg(x)
 11906  		return true
 11907  	}
 11908  	return false
 11909  }
 11910  func rewriteValueARM_OpARMTEQshiftRLreg(v *Value) bool {
 11911  	v_2 := v.Args[2]
 11912  	v_1 := v.Args[1]
 11913  	v_0 := v.Args[0]
 11914  	b := v.Block
 11915  	// match: (TEQshiftRLreg (MOVWconst [c]) x y)
 11916  	// result: (TEQconst [c] (SRL <x.Type> x y))
 11917  	for {
 11918  		if v_0.Op != OpARMMOVWconst {
 11919  			break
 11920  		}
 11921  		c := auxIntToInt32(v_0.AuxInt)
 11922  		x := v_1
 11923  		y := v_2
 11924  		v.reset(OpARMTEQconst)
 11925  		v.AuxInt = int32ToAuxInt(c)
 11926  		v0 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
 11927  		v0.AddArg2(x, y)
 11928  		v.AddArg(v0)
 11929  		return true
 11930  	}
 11931  	// match: (TEQshiftRLreg x y (MOVWconst [c]))
 11932  	// result: (TEQshiftRL x y [c])
 11933  	for {
 11934  		x := v_0
 11935  		y := v_1
 11936  		if v_2.Op != OpARMMOVWconst {
 11937  			break
 11938  		}
 11939  		c := auxIntToInt32(v_2.AuxInt)
 11940  		v.reset(OpARMTEQshiftRL)
 11941  		v.AuxInt = int32ToAuxInt(c)
 11942  		v.AddArg2(x, y)
 11943  		return true
 11944  	}
 11945  	return false
 11946  }
 11947  func rewriteValueARM_OpARMTST(v *Value) bool {
 11948  	v_1 := v.Args[1]
 11949  	v_0 := v.Args[0]
 11950  	// match: (TST x (MOVWconst [c]))
 11951  	// result: (TSTconst [c] x)
 11952  	for {
 11953  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11954  			x := v_0
 11955  			if v_1.Op != OpARMMOVWconst {
 11956  				continue
 11957  			}
 11958  			c := auxIntToInt32(v_1.AuxInt)
 11959  			v.reset(OpARMTSTconst)
 11960  			v.AuxInt = int32ToAuxInt(c)
 11961  			v.AddArg(x)
 11962  			return true
 11963  		}
 11964  		break
 11965  	}
 11966  	// match: (TST x (SLLconst [c] y))
 11967  	// result: (TSTshiftLL x y [c])
 11968  	for {
 11969  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11970  			x := v_0
 11971  			if v_1.Op != OpARMSLLconst {
 11972  				continue
 11973  			}
 11974  			c := auxIntToInt32(v_1.AuxInt)
 11975  			y := v_1.Args[0]
 11976  			v.reset(OpARMTSTshiftLL)
 11977  			v.AuxInt = int32ToAuxInt(c)
 11978  			v.AddArg2(x, y)
 11979  			return true
 11980  		}
 11981  		break
 11982  	}
 11983  	// match: (TST x (SRLconst [c] y))
 11984  	// result: (TSTshiftRL x y [c])
 11985  	for {
 11986  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11987  			x := v_0
 11988  			if v_1.Op != OpARMSRLconst {
 11989  				continue
 11990  			}
 11991  			c := auxIntToInt32(v_1.AuxInt)
 11992  			y := v_1.Args[0]
 11993  			v.reset(OpARMTSTshiftRL)
 11994  			v.AuxInt = int32ToAuxInt(c)
 11995  			v.AddArg2(x, y)
 11996  			return true
 11997  		}
 11998  		break
 11999  	}
 12000  	// match: (TST x (SRAconst [c] y))
 12001  	// result: (TSTshiftRA x y [c])
 12002  	for {
 12003  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12004  			x := v_0
 12005  			if v_1.Op != OpARMSRAconst {
 12006  				continue
 12007  			}
 12008  			c := auxIntToInt32(v_1.AuxInt)
 12009  			y := v_1.Args[0]
 12010  			v.reset(OpARMTSTshiftRA)
 12011  			v.AuxInt = int32ToAuxInt(c)
 12012  			v.AddArg2(x, y)
 12013  			return true
 12014  		}
 12015  		break
 12016  	}
 12017  	// match: (TST x (SLL y z))
 12018  	// result: (TSTshiftLLreg x y z)
 12019  	for {
 12020  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12021  			x := v_0
 12022  			if v_1.Op != OpARMSLL {
 12023  				continue
 12024  			}
 12025  			z := v_1.Args[1]
 12026  			y := v_1.Args[0]
 12027  			v.reset(OpARMTSTshiftLLreg)
 12028  			v.AddArg3(x, y, z)
 12029  			return true
 12030  		}
 12031  		break
 12032  	}
 12033  	// match: (TST x (SRL y z))
 12034  	// result: (TSTshiftRLreg x y z)
 12035  	for {
 12036  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12037  			x := v_0
 12038  			if v_1.Op != OpARMSRL {
 12039  				continue
 12040  			}
 12041  			z := v_1.Args[1]
 12042  			y := v_1.Args[0]
 12043  			v.reset(OpARMTSTshiftRLreg)
 12044  			v.AddArg3(x, y, z)
 12045  			return true
 12046  		}
 12047  		break
 12048  	}
 12049  	// match: (TST x (SRA y z))
 12050  	// result: (TSTshiftRAreg x y z)
 12051  	for {
 12052  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12053  			x := v_0
 12054  			if v_1.Op != OpARMSRA {
 12055  				continue
 12056  			}
 12057  			z := v_1.Args[1]
 12058  			y := v_1.Args[0]
 12059  			v.reset(OpARMTSTshiftRAreg)
 12060  			v.AddArg3(x, y, z)
 12061  			return true
 12062  		}
 12063  		break
 12064  	}
 12065  	return false
 12066  }
 12067  func rewriteValueARM_OpARMTSTconst(v *Value) bool {
 12068  	v_0 := v.Args[0]
 12069  	// match: (TSTconst (MOVWconst [x]) [y])
 12070  	// result: (FlagConstant [logicFlags32(x&y)])
 12071  	for {
 12072  		y := auxIntToInt32(v.AuxInt)
 12073  		if v_0.Op != OpARMMOVWconst {
 12074  			break
 12075  		}
 12076  		x := auxIntToInt32(v_0.AuxInt)
 12077  		v.reset(OpARMFlagConstant)
 12078  		v.AuxInt = flagConstantToAuxInt(logicFlags32(x & y))
 12079  		return true
 12080  	}
 12081  	return false
 12082  }
 12083  func rewriteValueARM_OpARMTSTshiftLL(v *Value) bool {
 12084  	v_1 := v.Args[1]
 12085  	v_0 := v.Args[0]
 12086  	b := v.Block
 12087  	// match: (TSTshiftLL (MOVWconst [c]) x [d])
 12088  	// result: (TSTconst [c] (SLLconst <x.Type> x [d]))
 12089  	for {
 12090  		d := auxIntToInt32(v.AuxInt)
 12091  		if v_0.Op != OpARMMOVWconst {
 12092  			break
 12093  		}
 12094  		c := auxIntToInt32(v_0.AuxInt)
 12095  		x := v_1
 12096  		v.reset(OpARMTSTconst)
 12097  		v.AuxInt = int32ToAuxInt(c)
 12098  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 12099  		v0.AuxInt = int32ToAuxInt(d)
 12100  		v0.AddArg(x)
 12101  		v.AddArg(v0)
 12102  		return true
 12103  	}
 12104  	// match: (TSTshiftLL x (MOVWconst [c]) [d])
 12105  	// result: (TSTconst x [c<<uint64(d)])
 12106  	for {
 12107  		d := auxIntToInt32(v.AuxInt)
 12108  		x := v_0
 12109  		if v_1.Op != OpARMMOVWconst {
 12110  			break
 12111  		}
 12112  		c := auxIntToInt32(v_1.AuxInt)
 12113  		v.reset(OpARMTSTconst)
 12114  		v.AuxInt = int32ToAuxInt(c << uint64(d))
 12115  		v.AddArg(x)
 12116  		return true
 12117  	}
 12118  	return false
 12119  }
 12120  func rewriteValueARM_OpARMTSTshiftLLreg(v *Value) bool {
 12121  	v_2 := v.Args[2]
 12122  	v_1 := v.Args[1]
 12123  	v_0 := v.Args[0]
 12124  	b := v.Block
 12125  	// match: (TSTshiftLLreg (MOVWconst [c]) x y)
 12126  	// result: (TSTconst [c] (SLL <x.Type> x y))
 12127  	for {
 12128  		if v_0.Op != OpARMMOVWconst {
 12129  			break
 12130  		}
 12131  		c := auxIntToInt32(v_0.AuxInt)
 12132  		x := v_1
 12133  		y := v_2
 12134  		v.reset(OpARMTSTconst)
 12135  		v.AuxInt = int32ToAuxInt(c)
 12136  		v0 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
 12137  		v0.AddArg2(x, y)
 12138  		v.AddArg(v0)
 12139  		return true
 12140  	}
 12141  	// match: (TSTshiftLLreg x y (MOVWconst [c]))
 12142  	// result: (TSTshiftLL x y [c])
 12143  	for {
 12144  		x := v_0
 12145  		y := v_1
 12146  		if v_2.Op != OpARMMOVWconst {
 12147  			break
 12148  		}
 12149  		c := auxIntToInt32(v_2.AuxInt)
 12150  		v.reset(OpARMTSTshiftLL)
 12151  		v.AuxInt = int32ToAuxInt(c)
 12152  		v.AddArg2(x, y)
 12153  		return true
 12154  	}
 12155  	return false
 12156  }
 12157  func rewriteValueARM_OpARMTSTshiftRA(v *Value) bool {
 12158  	v_1 := v.Args[1]
 12159  	v_0 := v.Args[0]
 12160  	b := v.Block
 12161  	// match: (TSTshiftRA (MOVWconst [c]) x [d])
 12162  	// result: (TSTconst [c] (SRAconst <x.Type> x [d]))
 12163  	for {
 12164  		d := auxIntToInt32(v.AuxInt)
 12165  		if v_0.Op != OpARMMOVWconst {
 12166  			break
 12167  		}
 12168  		c := auxIntToInt32(v_0.AuxInt)
 12169  		x := v_1
 12170  		v.reset(OpARMTSTconst)
 12171  		v.AuxInt = int32ToAuxInt(c)
 12172  		v0 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
 12173  		v0.AuxInt = int32ToAuxInt(d)
 12174  		v0.AddArg(x)
 12175  		v.AddArg(v0)
 12176  		return true
 12177  	}
 12178  	// match: (TSTshiftRA x (MOVWconst [c]) [d])
 12179  	// result: (TSTconst x [c>>uint64(d)])
 12180  	for {
 12181  		d := auxIntToInt32(v.AuxInt)
 12182  		x := v_0
 12183  		if v_1.Op != OpARMMOVWconst {
 12184  			break
 12185  		}
 12186  		c := auxIntToInt32(v_1.AuxInt)
 12187  		v.reset(OpARMTSTconst)
 12188  		v.AuxInt = int32ToAuxInt(c >> uint64(d))
 12189  		v.AddArg(x)
 12190  		return true
 12191  	}
 12192  	return false
 12193  }
 12194  func rewriteValueARM_OpARMTSTshiftRAreg(v *Value) bool {
 12195  	v_2 := v.Args[2]
 12196  	v_1 := v.Args[1]
 12197  	v_0 := v.Args[0]
 12198  	b := v.Block
 12199  	// match: (TSTshiftRAreg (MOVWconst [c]) x y)
 12200  	// result: (TSTconst [c] (SRA <x.Type> x y))
 12201  	for {
 12202  		if v_0.Op != OpARMMOVWconst {
 12203  			break
 12204  		}
 12205  		c := auxIntToInt32(v_0.AuxInt)
 12206  		x := v_1
 12207  		y := v_2
 12208  		v.reset(OpARMTSTconst)
 12209  		v.AuxInt = int32ToAuxInt(c)
 12210  		v0 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
 12211  		v0.AddArg2(x, y)
 12212  		v.AddArg(v0)
 12213  		return true
 12214  	}
 12215  	// match: (TSTshiftRAreg x y (MOVWconst [c]))
 12216  	// result: (TSTshiftRA x y [c])
 12217  	for {
 12218  		x := v_0
 12219  		y := v_1
 12220  		if v_2.Op != OpARMMOVWconst {
 12221  			break
 12222  		}
 12223  		c := auxIntToInt32(v_2.AuxInt)
 12224  		v.reset(OpARMTSTshiftRA)
 12225  		v.AuxInt = int32ToAuxInt(c)
 12226  		v.AddArg2(x, y)
 12227  		return true
 12228  	}
 12229  	return false
 12230  }
 12231  func rewriteValueARM_OpARMTSTshiftRL(v *Value) bool {
 12232  	v_1 := v.Args[1]
 12233  	v_0 := v.Args[0]
 12234  	b := v.Block
 12235  	// match: (TSTshiftRL (MOVWconst [c]) x [d])
 12236  	// result: (TSTconst [c] (SRLconst <x.Type> x [d]))
 12237  	for {
 12238  		d := auxIntToInt32(v.AuxInt)
 12239  		if v_0.Op != OpARMMOVWconst {
 12240  			break
 12241  		}
 12242  		c := auxIntToInt32(v_0.AuxInt)
 12243  		x := v_1
 12244  		v.reset(OpARMTSTconst)
 12245  		v.AuxInt = int32ToAuxInt(c)
 12246  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
 12247  		v0.AuxInt = int32ToAuxInt(d)
 12248  		v0.AddArg(x)
 12249  		v.AddArg(v0)
 12250  		return true
 12251  	}
 12252  	// match: (TSTshiftRL x (MOVWconst [c]) [d])
 12253  	// result: (TSTconst x [int32(uint32(c)>>uint64(d))])
 12254  	for {
 12255  		d := auxIntToInt32(v.AuxInt)
 12256  		x := v_0
 12257  		if v_1.Op != OpARMMOVWconst {
 12258  			break
 12259  		}
 12260  		c := auxIntToInt32(v_1.AuxInt)
 12261  		v.reset(OpARMTSTconst)
 12262  		v.AuxInt = int32ToAuxInt(int32(uint32(c) >> uint64(d)))
 12263  		v.AddArg(x)
 12264  		return true
 12265  	}
 12266  	return false
 12267  }
 12268  func rewriteValueARM_OpARMTSTshiftRLreg(v *Value) bool {
 12269  	v_2 := v.Args[2]
 12270  	v_1 := v.Args[1]
 12271  	v_0 := v.Args[0]
 12272  	b := v.Block
 12273  	// match: (TSTshiftRLreg (MOVWconst [c]) x y)
 12274  	// result: (TSTconst [c] (SRL <x.Type> x y))
 12275  	for {
 12276  		if v_0.Op != OpARMMOVWconst {
 12277  			break
 12278  		}
 12279  		c := auxIntToInt32(v_0.AuxInt)
 12280  		x := v_1
 12281  		y := v_2
 12282  		v.reset(OpARMTSTconst)
 12283  		v.AuxInt = int32ToAuxInt(c)
 12284  		v0 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
 12285  		v0.AddArg2(x, y)
 12286  		v.AddArg(v0)
 12287  		return true
 12288  	}
 12289  	// match: (TSTshiftRLreg x y (MOVWconst [c]))
 12290  	// result: (TSTshiftRL x y [c])
 12291  	for {
 12292  		x := v_0
 12293  		y := v_1
 12294  		if v_2.Op != OpARMMOVWconst {
 12295  			break
 12296  		}
 12297  		c := auxIntToInt32(v_2.AuxInt)
 12298  		v.reset(OpARMTSTshiftRL)
 12299  		v.AuxInt = int32ToAuxInt(c)
 12300  		v.AddArg2(x, y)
 12301  		return true
 12302  	}
 12303  	return false
 12304  }
 12305  func rewriteValueARM_OpARMXOR(v *Value) bool {
 12306  	v_1 := v.Args[1]
 12307  	v_0 := v.Args[0]
 12308  	// match: (XOR x (MOVWconst [c]))
 12309  	// result: (XORconst [c] x)
 12310  	for {
 12311  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12312  			x := v_0
 12313  			if v_1.Op != OpARMMOVWconst {
 12314  				continue
 12315  			}
 12316  			c := auxIntToInt32(v_1.AuxInt)
 12317  			v.reset(OpARMXORconst)
 12318  			v.AuxInt = int32ToAuxInt(c)
 12319  			v.AddArg(x)
 12320  			return true
 12321  		}
 12322  		break
 12323  	}
 12324  	// match: (XOR x (SLLconst [c] y))
 12325  	// result: (XORshiftLL x y [c])
 12326  	for {
 12327  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12328  			x := v_0
 12329  			if v_1.Op != OpARMSLLconst {
 12330  				continue
 12331  			}
 12332  			c := auxIntToInt32(v_1.AuxInt)
 12333  			y := v_1.Args[0]
 12334  			v.reset(OpARMXORshiftLL)
 12335  			v.AuxInt = int32ToAuxInt(c)
 12336  			v.AddArg2(x, y)
 12337  			return true
 12338  		}
 12339  		break
 12340  	}
 12341  	// match: (XOR x (SRLconst [c] y))
 12342  	// result: (XORshiftRL x y [c])
 12343  	for {
 12344  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12345  			x := v_0
 12346  			if v_1.Op != OpARMSRLconst {
 12347  				continue
 12348  			}
 12349  			c := auxIntToInt32(v_1.AuxInt)
 12350  			y := v_1.Args[0]
 12351  			v.reset(OpARMXORshiftRL)
 12352  			v.AuxInt = int32ToAuxInt(c)
 12353  			v.AddArg2(x, y)
 12354  			return true
 12355  		}
 12356  		break
 12357  	}
 12358  	// match: (XOR x (SRAconst [c] y))
 12359  	// result: (XORshiftRA x y [c])
 12360  	for {
 12361  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12362  			x := v_0
 12363  			if v_1.Op != OpARMSRAconst {
 12364  				continue
 12365  			}
 12366  			c := auxIntToInt32(v_1.AuxInt)
 12367  			y := v_1.Args[0]
 12368  			v.reset(OpARMXORshiftRA)
 12369  			v.AuxInt = int32ToAuxInt(c)
 12370  			v.AddArg2(x, y)
 12371  			return true
 12372  		}
 12373  		break
 12374  	}
 12375  	// match: (XOR x (SRRconst [c] y))
 12376  	// result: (XORshiftRR x y [c])
 12377  	for {
 12378  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12379  			x := v_0
 12380  			if v_1.Op != OpARMSRRconst {
 12381  				continue
 12382  			}
 12383  			c := auxIntToInt32(v_1.AuxInt)
 12384  			y := v_1.Args[0]
 12385  			v.reset(OpARMXORshiftRR)
 12386  			v.AuxInt = int32ToAuxInt(c)
 12387  			v.AddArg2(x, y)
 12388  			return true
 12389  		}
 12390  		break
 12391  	}
 12392  	// match: (XOR x (SLL y z))
 12393  	// result: (XORshiftLLreg x y z)
 12394  	for {
 12395  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12396  			x := v_0
 12397  			if v_1.Op != OpARMSLL {
 12398  				continue
 12399  			}
 12400  			z := v_1.Args[1]
 12401  			y := v_1.Args[0]
 12402  			v.reset(OpARMXORshiftLLreg)
 12403  			v.AddArg3(x, y, z)
 12404  			return true
 12405  		}
 12406  		break
 12407  	}
 12408  	// match: (XOR x (SRL y z))
 12409  	// result: (XORshiftRLreg x y z)
 12410  	for {
 12411  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12412  			x := v_0
 12413  			if v_1.Op != OpARMSRL {
 12414  				continue
 12415  			}
 12416  			z := v_1.Args[1]
 12417  			y := v_1.Args[0]
 12418  			v.reset(OpARMXORshiftRLreg)
 12419  			v.AddArg3(x, y, z)
 12420  			return true
 12421  		}
 12422  		break
 12423  	}
 12424  	// match: (XOR x (SRA y z))
 12425  	// result: (XORshiftRAreg x y z)
 12426  	for {
 12427  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12428  			x := v_0
 12429  			if v_1.Op != OpARMSRA {
 12430  				continue
 12431  			}
 12432  			z := v_1.Args[1]
 12433  			y := v_1.Args[0]
 12434  			v.reset(OpARMXORshiftRAreg)
 12435  			v.AddArg3(x, y, z)
 12436  			return true
 12437  		}
 12438  		break
 12439  	}
 12440  	// match: (XOR x x)
 12441  	// result: (MOVWconst [0])
 12442  	for {
 12443  		x := v_0
 12444  		if x != v_1 {
 12445  			break
 12446  		}
 12447  		v.reset(OpARMMOVWconst)
 12448  		v.AuxInt = int32ToAuxInt(0)
 12449  		return true
 12450  	}
 12451  	return false
 12452  }
 12453  func rewriteValueARM_OpARMXORconst(v *Value) bool {
 12454  	v_0 := v.Args[0]
 12455  	// match: (XORconst [0] x)
 12456  	// result: x
 12457  	for {
 12458  		if auxIntToInt32(v.AuxInt) != 0 {
 12459  			break
 12460  		}
 12461  		x := v_0
 12462  		v.copyOf(x)
 12463  		return true
 12464  	}
 12465  	// match: (XORconst [c] (MOVWconst [d]))
 12466  	// result: (MOVWconst [c^d])
 12467  	for {
 12468  		c := auxIntToInt32(v.AuxInt)
 12469  		if v_0.Op != OpARMMOVWconst {
 12470  			break
 12471  		}
 12472  		d := auxIntToInt32(v_0.AuxInt)
 12473  		v.reset(OpARMMOVWconst)
 12474  		v.AuxInt = int32ToAuxInt(c ^ d)
 12475  		return true
 12476  	}
 12477  	// match: (XORconst [c] (XORconst [d] x))
 12478  	// result: (XORconst [c^d] x)
 12479  	for {
 12480  		c := auxIntToInt32(v.AuxInt)
 12481  		if v_0.Op != OpARMXORconst {
 12482  			break
 12483  		}
 12484  		d := auxIntToInt32(v_0.AuxInt)
 12485  		x := v_0.Args[0]
 12486  		v.reset(OpARMXORconst)
 12487  		v.AuxInt = int32ToAuxInt(c ^ d)
 12488  		v.AddArg(x)
 12489  		return true
 12490  	}
 12491  	return false
 12492  }
 12493  func rewriteValueARM_OpARMXORshiftLL(v *Value) bool {
 12494  	v_1 := v.Args[1]
 12495  	v_0 := v.Args[0]
 12496  	b := v.Block
 12497  	typ := &b.Func.Config.Types
 12498  	// match: (XORshiftLL (MOVWconst [c]) x [d])
 12499  	// result: (XORconst [c] (SLLconst <x.Type> x [d]))
 12500  	for {
 12501  		d := auxIntToInt32(v.AuxInt)
 12502  		if v_0.Op != OpARMMOVWconst {
 12503  			break
 12504  		}
 12505  		c := auxIntToInt32(v_0.AuxInt)
 12506  		x := v_1
 12507  		v.reset(OpARMXORconst)
 12508  		v.AuxInt = int32ToAuxInt(c)
 12509  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 12510  		v0.AuxInt = int32ToAuxInt(d)
 12511  		v0.AddArg(x)
 12512  		v.AddArg(v0)
 12513  		return true
 12514  	}
 12515  	// match: (XORshiftLL x (MOVWconst [c]) [d])
 12516  	// result: (XORconst x [c<<uint64(d)])
 12517  	for {
 12518  		d := auxIntToInt32(v.AuxInt)
 12519  		x := v_0
 12520  		if v_1.Op != OpARMMOVWconst {
 12521  			break
 12522  		}
 12523  		c := auxIntToInt32(v_1.AuxInt)
 12524  		v.reset(OpARMXORconst)
 12525  		v.AuxInt = int32ToAuxInt(c << uint64(d))
 12526  		v.AddArg(x)
 12527  		return true
 12528  	}
 12529  	// match: (XORshiftLL [c] (SRLconst x [32-c]) x)
 12530  	// result: (SRRconst [32-c] x)
 12531  	for {
 12532  		c := auxIntToInt32(v.AuxInt)
 12533  		if v_0.Op != OpARMSRLconst || auxIntToInt32(v_0.AuxInt) != 32-c {
 12534  			break
 12535  		}
 12536  		x := v_0.Args[0]
 12537  		if x != v_1 {
 12538  			break
 12539  		}
 12540  		v.reset(OpARMSRRconst)
 12541  		v.AuxInt = int32ToAuxInt(32 - c)
 12542  		v.AddArg(x)
 12543  		return true
 12544  	}
 12545  	// match: (XORshiftLL <typ.UInt16> [8] (BFXU <typ.UInt16> [int32(armBFAuxInt(8, 8))] x) x)
 12546  	// result: (REV16 x)
 12547  	for {
 12548  		if v.Type != typ.UInt16 || auxIntToInt32(v.AuxInt) != 8 || v_0.Op != OpARMBFXU || v_0.Type != typ.UInt16 || auxIntToInt32(v_0.AuxInt) != int32(armBFAuxInt(8, 8)) {
 12549  			break
 12550  		}
 12551  		x := v_0.Args[0]
 12552  		if x != v_1 {
 12553  			break
 12554  		}
 12555  		v.reset(OpARMREV16)
 12556  		v.AddArg(x)
 12557  		return true
 12558  	}
 12559  	// match: (XORshiftLL <typ.UInt16> [8] (SRLconst <typ.UInt16> [24] (SLLconst [16] x)) x)
 12560  	// cond: objabi.GOARM>=6
 12561  	// result: (REV16 x)
 12562  	for {
 12563  		if v.Type != typ.UInt16 || auxIntToInt32(v.AuxInt) != 8 || v_0.Op != OpARMSRLconst || v_0.Type != typ.UInt16 || auxIntToInt32(v_0.AuxInt) != 24 {
 12564  			break
 12565  		}
 12566  		v_0_0 := v_0.Args[0]
 12567  		if v_0_0.Op != OpARMSLLconst || auxIntToInt32(v_0_0.AuxInt) != 16 {
 12568  			break
 12569  		}
 12570  		x := v_0_0.Args[0]
 12571  		if x != v_1 || !(objabi.GOARM >= 6) {
 12572  			break
 12573  		}
 12574  		v.reset(OpARMREV16)
 12575  		v.AddArg(x)
 12576  		return true
 12577  	}
 12578  	// match: (XORshiftLL x (SLLconst x [c]) [d])
 12579  	// cond: c==d
 12580  	// result: (MOVWconst [0])
 12581  	for {
 12582  		d := auxIntToInt32(v.AuxInt)
 12583  		x := v_0
 12584  		if v_1.Op != OpARMSLLconst {
 12585  			break
 12586  		}
 12587  		c := auxIntToInt32(v_1.AuxInt)
 12588  		if x != v_1.Args[0] || !(c == d) {
 12589  			break
 12590  		}
 12591  		v.reset(OpARMMOVWconst)
 12592  		v.AuxInt = int32ToAuxInt(0)
 12593  		return true
 12594  	}
 12595  	return false
 12596  }
 12597  func rewriteValueARM_OpARMXORshiftLLreg(v *Value) bool {
 12598  	v_2 := v.Args[2]
 12599  	v_1 := v.Args[1]
 12600  	v_0 := v.Args[0]
 12601  	b := v.Block
 12602  	// match: (XORshiftLLreg (MOVWconst [c]) x y)
 12603  	// result: (XORconst [c] (SLL <x.Type> x y))
 12604  	for {
 12605  		if v_0.Op != OpARMMOVWconst {
 12606  			break
 12607  		}
 12608  		c := auxIntToInt32(v_0.AuxInt)
 12609  		x := v_1
 12610  		y := v_2
 12611  		v.reset(OpARMXORconst)
 12612  		v.AuxInt = int32ToAuxInt(c)
 12613  		v0 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
 12614  		v0.AddArg2(x, y)
 12615  		v.AddArg(v0)
 12616  		return true
 12617  	}
 12618  	// match: (XORshiftLLreg x y (MOVWconst [c]))
 12619  	// result: (XORshiftLL x y [c])
 12620  	for {
 12621  		x := v_0
 12622  		y := v_1
 12623  		if v_2.Op != OpARMMOVWconst {
 12624  			break
 12625  		}
 12626  		c := auxIntToInt32(v_2.AuxInt)
 12627  		v.reset(OpARMXORshiftLL)
 12628  		v.AuxInt = int32ToAuxInt(c)
 12629  		v.AddArg2(x, y)
 12630  		return true
 12631  	}
 12632  	return false
 12633  }
 12634  func rewriteValueARM_OpARMXORshiftRA(v *Value) bool {
 12635  	v_1 := v.Args[1]
 12636  	v_0 := v.Args[0]
 12637  	b := v.Block
 12638  	// match: (XORshiftRA (MOVWconst [c]) x [d])
 12639  	// result: (XORconst [c] (SRAconst <x.Type> x [d]))
 12640  	for {
 12641  		d := auxIntToInt32(v.AuxInt)
 12642  		if v_0.Op != OpARMMOVWconst {
 12643  			break
 12644  		}
 12645  		c := auxIntToInt32(v_0.AuxInt)
 12646  		x := v_1
 12647  		v.reset(OpARMXORconst)
 12648  		v.AuxInt = int32ToAuxInt(c)
 12649  		v0 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
 12650  		v0.AuxInt = int32ToAuxInt(d)
 12651  		v0.AddArg(x)
 12652  		v.AddArg(v0)
 12653  		return true
 12654  	}
 12655  	// match: (XORshiftRA x (MOVWconst [c]) [d])
 12656  	// result: (XORconst x [c>>uint64(d)])
 12657  	for {
 12658  		d := auxIntToInt32(v.AuxInt)
 12659  		x := v_0
 12660  		if v_1.Op != OpARMMOVWconst {
 12661  			break
 12662  		}
 12663  		c := auxIntToInt32(v_1.AuxInt)
 12664  		v.reset(OpARMXORconst)
 12665  		v.AuxInt = int32ToAuxInt(c >> uint64(d))
 12666  		v.AddArg(x)
 12667  		return true
 12668  	}
 12669  	// match: (XORshiftRA x (SRAconst x [c]) [d])
 12670  	// cond: c==d
 12671  	// result: (MOVWconst [0])
 12672  	for {
 12673  		d := auxIntToInt32(v.AuxInt)
 12674  		x := v_0
 12675  		if v_1.Op != OpARMSRAconst {
 12676  			break
 12677  		}
 12678  		c := auxIntToInt32(v_1.AuxInt)
 12679  		if x != v_1.Args[0] || !(c == d) {
 12680  			break
 12681  		}
 12682  		v.reset(OpARMMOVWconst)
 12683  		v.AuxInt = int32ToAuxInt(0)
 12684  		return true
 12685  	}
 12686  	return false
 12687  }
 12688  func rewriteValueARM_OpARMXORshiftRAreg(v *Value) bool {
 12689  	v_2 := v.Args[2]
 12690  	v_1 := v.Args[1]
 12691  	v_0 := v.Args[0]
 12692  	b := v.Block
 12693  	// match: (XORshiftRAreg (MOVWconst [c]) x y)
 12694  	// result: (XORconst [c] (SRA <x.Type> x y))
 12695  	for {
 12696  		if v_0.Op != OpARMMOVWconst {
 12697  			break
 12698  		}
 12699  		c := auxIntToInt32(v_0.AuxInt)
 12700  		x := v_1
 12701  		y := v_2
 12702  		v.reset(OpARMXORconst)
 12703  		v.AuxInt = int32ToAuxInt(c)
 12704  		v0 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
 12705  		v0.AddArg2(x, y)
 12706  		v.AddArg(v0)
 12707  		return true
 12708  	}
 12709  	// match: (XORshiftRAreg x y (MOVWconst [c]))
 12710  	// result: (XORshiftRA x y [c])
 12711  	for {
 12712  		x := v_0
 12713  		y := v_1
 12714  		if v_2.Op != OpARMMOVWconst {
 12715  			break
 12716  		}
 12717  		c := auxIntToInt32(v_2.AuxInt)
 12718  		v.reset(OpARMXORshiftRA)
 12719  		v.AuxInt = int32ToAuxInt(c)
 12720  		v.AddArg2(x, y)
 12721  		return true
 12722  	}
 12723  	return false
 12724  }
 12725  func rewriteValueARM_OpARMXORshiftRL(v *Value) bool {
 12726  	v_1 := v.Args[1]
 12727  	v_0 := v.Args[0]
 12728  	b := v.Block
 12729  	// match: (XORshiftRL (MOVWconst [c]) x [d])
 12730  	// result: (XORconst [c] (SRLconst <x.Type> x [d]))
 12731  	for {
 12732  		d := auxIntToInt32(v.AuxInt)
 12733  		if v_0.Op != OpARMMOVWconst {
 12734  			break
 12735  		}
 12736  		c := auxIntToInt32(v_0.AuxInt)
 12737  		x := v_1
 12738  		v.reset(OpARMXORconst)
 12739  		v.AuxInt = int32ToAuxInt(c)
 12740  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
 12741  		v0.AuxInt = int32ToAuxInt(d)
 12742  		v0.AddArg(x)
 12743  		v.AddArg(v0)
 12744  		return true
 12745  	}
 12746  	// match: (XORshiftRL x (MOVWconst [c]) [d])
 12747  	// result: (XORconst x [int32(uint32(c)>>uint64(d))])
 12748  	for {
 12749  		d := auxIntToInt32(v.AuxInt)
 12750  		x := v_0
 12751  		if v_1.Op != OpARMMOVWconst {
 12752  			break
 12753  		}
 12754  		c := auxIntToInt32(v_1.AuxInt)
 12755  		v.reset(OpARMXORconst)
 12756  		v.AuxInt = int32ToAuxInt(int32(uint32(c) >> uint64(d)))
 12757  		v.AddArg(x)
 12758  		return true
 12759  	}
 12760  	// match: (XORshiftRL [c] (SLLconst x [32-c]) x)
 12761  	// result: (SRRconst [ c] x)
 12762  	for {
 12763  		c := auxIntToInt32(v.AuxInt)
 12764  		if v_0.Op != OpARMSLLconst || auxIntToInt32(v_0.AuxInt) != 32-c {
 12765  			break
 12766  		}
 12767  		x := v_0.Args[0]
 12768  		if x != v_1 {
 12769  			break
 12770  		}
 12771  		v.reset(OpARMSRRconst)
 12772  		v.AuxInt = int32ToAuxInt(c)
 12773  		v.AddArg(x)
 12774  		return true
 12775  	}
 12776  	// match: (XORshiftRL x (SRLconst x [c]) [d])
 12777  	// cond: c==d
 12778  	// result: (MOVWconst [0])
 12779  	for {
 12780  		d := auxIntToInt32(v.AuxInt)
 12781  		x := v_0
 12782  		if v_1.Op != OpARMSRLconst {
 12783  			break
 12784  		}
 12785  		c := auxIntToInt32(v_1.AuxInt)
 12786  		if x != v_1.Args[0] || !(c == d) {
 12787  			break
 12788  		}
 12789  		v.reset(OpARMMOVWconst)
 12790  		v.AuxInt = int32ToAuxInt(0)
 12791  		return true
 12792  	}
 12793  	return false
 12794  }
 12795  func rewriteValueARM_OpARMXORshiftRLreg(v *Value) bool {
 12796  	v_2 := v.Args[2]
 12797  	v_1 := v.Args[1]
 12798  	v_0 := v.Args[0]
 12799  	b := v.Block
 12800  	// match: (XORshiftRLreg (MOVWconst [c]) x y)
 12801  	// result: (XORconst [c] (SRL <x.Type> x y))
 12802  	for {
 12803  		if v_0.Op != OpARMMOVWconst {
 12804  			break
 12805  		}
 12806  		c := auxIntToInt32(v_0.AuxInt)
 12807  		x := v_1
 12808  		y := v_2
 12809  		v.reset(OpARMXORconst)
 12810  		v.AuxInt = int32ToAuxInt(c)
 12811  		v0 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
 12812  		v0.AddArg2(x, y)
 12813  		v.AddArg(v0)
 12814  		return true
 12815  	}
 12816  	// match: (XORshiftRLreg x y (MOVWconst [c]))
 12817  	// result: (XORshiftRL x y [c])
 12818  	for {
 12819  		x := v_0
 12820  		y := v_1
 12821  		if v_2.Op != OpARMMOVWconst {
 12822  			break
 12823  		}
 12824  		c := auxIntToInt32(v_2.AuxInt)
 12825  		v.reset(OpARMXORshiftRL)
 12826  		v.AuxInt = int32ToAuxInt(c)
 12827  		v.AddArg2(x, y)
 12828  		return true
 12829  	}
 12830  	return false
 12831  }
 12832  func rewriteValueARM_OpARMXORshiftRR(v *Value) bool {
 12833  	v_1 := v.Args[1]
 12834  	v_0 := v.Args[0]
 12835  	b := v.Block
 12836  	// match: (XORshiftRR (MOVWconst [c]) x [d])
 12837  	// result: (XORconst [c] (SRRconst <x.Type> x [d]))
 12838  	for {
 12839  		d := auxIntToInt32(v.AuxInt)
 12840  		if v_0.Op != OpARMMOVWconst {
 12841  			break
 12842  		}
 12843  		c := auxIntToInt32(v_0.AuxInt)
 12844  		x := v_1
 12845  		v.reset(OpARMXORconst)
 12846  		v.AuxInt = int32ToAuxInt(c)
 12847  		v0 := b.NewValue0(v.Pos, OpARMSRRconst, x.Type)
 12848  		v0.AuxInt = int32ToAuxInt(d)
 12849  		v0.AddArg(x)
 12850  		v.AddArg(v0)
 12851  		return true
 12852  	}
 12853  	// match: (XORshiftRR x (MOVWconst [c]) [d])
 12854  	// result: (XORconst x [int32(uint32(c)>>uint64(d)|uint32(c)<<uint64(32-d))])
 12855  	for {
 12856  		d := auxIntToInt32(v.AuxInt)
 12857  		x := v_0
 12858  		if v_1.Op != OpARMMOVWconst {
 12859  			break
 12860  		}
 12861  		c := auxIntToInt32(v_1.AuxInt)
 12862  		v.reset(OpARMXORconst)
 12863  		v.AuxInt = int32ToAuxInt(int32(uint32(c)>>uint64(d) | uint32(c)<<uint64(32-d)))
 12864  		v.AddArg(x)
 12865  		return true
 12866  	}
 12867  	return false
 12868  }
 12869  func rewriteValueARM_OpAddr(v *Value) bool {
 12870  	v_0 := v.Args[0]
 12871  	// match: (Addr {sym} base)
 12872  	// result: (MOVWaddr {sym} base)
 12873  	for {
 12874  		sym := auxToSym(v.Aux)
 12875  		base := v_0
 12876  		v.reset(OpARMMOVWaddr)
 12877  		v.Aux = symToAux(sym)
 12878  		v.AddArg(base)
 12879  		return true
 12880  	}
 12881  }
 12882  func rewriteValueARM_OpAvg32u(v *Value) bool {
 12883  	v_1 := v.Args[1]
 12884  	v_0 := v.Args[0]
 12885  	b := v.Block
 12886  	// match: (Avg32u <t> x y)
 12887  	// result: (ADD (SRLconst <t> (SUB <t> x y) [1]) y)
 12888  	for {
 12889  		t := v.Type
 12890  		x := v_0
 12891  		y := v_1
 12892  		v.reset(OpARMADD)
 12893  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, t)
 12894  		v0.AuxInt = int32ToAuxInt(1)
 12895  		v1 := b.NewValue0(v.Pos, OpARMSUB, t)
 12896  		v1.AddArg2(x, y)
 12897  		v0.AddArg(v1)
 12898  		v.AddArg2(v0, y)
 12899  		return true
 12900  	}
 12901  }
 12902  func rewriteValueARM_OpBitLen32(v *Value) bool {
 12903  	v_0 := v.Args[0]
 12904  	b := v.Block
 12905  	// match: (BitLen32 <t> x)
 12906  	// result: (RSBconst [32] (CLZ <t> x))
 12907  	for {
 12908  		t := v.Type
 12909  		x := v_0
 12910  		v.reset(OpARMRSBconst)
 12911  		v.AuxInt = int32ToAuxInt(32)
 12912  		v0 := b.NewValue0(v.Pos, OpARMCLZ, t)
 12913  		v0.AddArg(x)
 12914  		v.AddArg(v0)
 12915  		return true
 12916  	}
 12917  }
 12918  func rewriteValueARM_OpBswap32(v *Value) bool {
 12919  	v_0 := v.Args[0]
 12920  	b := v.Block
 12921  	// match: (Bswap32 <t> x)
 12922  	// cond: objabi.GOARM==5
 12923  	// result: (XOR <t> (SRLconst <t> (BICconst <t> (XOR <t> x (SRRconst <t> [16] x)) [0xff0000]) [8]) (SRRconst <t> x [8]))
 12924  	for {
 12925  		t := v.Type
 12926  		x := v_0
 12927  		if !(objabi.GOARM == 5) {
 12928  			break
 12929  		}
 12930  		v.reset(OpARMXOR)
 12931  		v.Type = t
 12932  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, t)
 12933  		v0.AuxInt = int32ToAuxInt(8)
 12934  		v1 := b.NewValue0(v.Pos, OpARMBICconst, t)
 12935  		v1.AuxInt = int32ToAuxInt(0xff0000)
 12936  		v2 := b.NewValue0(v.Pos, OpARMXOR, t)
 12937  		v3 := b.NewValue0(v.Pos, OpARMSRRconst, t)
 12938  		v3.AuxInt = int32ToAuxInt(16)
 12939  		v3.AddArg(x)
 12940  		v2.AddArg2(x, v3)
 12941  		v1.AddArg(v2)
 12942  		v0.AddArg(v1)
 12943  		v4 := b.NewValue0(v.Pos, OpARMSRRconst, t)
 12944  		v4.AuxInt = int32ToAuxInt(8)
 12945  		v4.AddArg(x)
 12946  		v.AddArg2(v0, v4)
 12947  		return true
 12948  	}
 12949  	// match: (Bswap32 x)
 12950  	// cond: objabi.GOARM>=6
 12951  	// result: (REV x)
 12952  	for {
 12953  		x := v_0
 12954  		if !(objabi.GOARM >= 6) {
 12955  			break
 12956  		}
 12957  		v.reset(OpARMREV)
 12958  		v.AddArg(x)
 12959  		return true
 12960  	}
 12961  	return false
 12962  }
 12963  func rewriteValueARM_OpConst16(v *Value) bool {
 12964  	// match: (Const16 [val])
 12965  	// result: (MOVWconst [int32(val)])
 12966  	for {
 12967  		val := auxIntToInt16(v.AuxInt)
 12968  		v.reset(OpARMMOVWconst)
 12969  		v.AuxInt = int32ToAuxInt(int32(val))
 12970  		return true
 12971  	}
 12972  }
 12973  func rewriteValueARM_OpConst32(v *Value) bool {
 12974  	// match: (Const32 [val])
 12975  	// result: (MOVWconst [int32(val)])
 12976  	for {
 12977  		val := auxIntToInt32(v.AuxInt)
 12978  		v.reset(OpARMMOVWconst)
 12979  		v.AuxInt = int32ToAuxInt(int32(val))
 12980  		return true
 12981  	}
 12982  }
 12983  func rewriteValueARM_OpConst32F(v *Value) bool {
 12984  	// match: (Const32F [val])
 12985  	// result: (MOVFconst [float64(val)])
 12986  	for {
 12987  		val := auxIntToFloat32(v.AuxInt)
 12988  		v.reset(OpARMMOVFconst)
 12989  		v.AuxInt = float64ToAuxInt(float64(val))
 12990  		return true
 12991  	}
 12992  }
 12993  func rewriteValueARM_OpConst64F(v *Value) bool {
 12994  	// match: (Const64F [val])
 12995  	// result: (MOVDconst [float64(val)])
 12996  	for {
 12997  		val := auxIntToFloat64(v.AuxInt)
 12998  		v.reset(OpARMMOVDconst)
 12999  		v.AuxInt = float64ToAuxInt(float64(val))
 13000  		return true
 13001  	}
 13002  }
 13003  func rewriteValueARM_OpConst8(v *Value) bool {
 13004  	// match: (Const8 [val])
 13005  	// result: (MOVWconst [int32(val)])
 13006  	for {
 13007  		val := auxIntToInt8(v.AuxInt)
 13008  		v.reset(OpARMMOVWconst)
 13009  		v.AuxInt = int32ToAuxInt(int32(val))
 13010  		return true
 13011  	}
 13012  }
 13013  func rewriteValueARM_OpConstBool(v *Value) bool {
 13014  	// match: (ConstBool [b])
 13015  	// result: (MOVWconst [b2i32(b)])
 13016  	for {
 13017  		b := auxIntToBool(v.AuxInt)
 13018  		v.reset(OpARMMOVWconst)
 13019  		v.AuxInt = int32ToAuxInt(b2i32(b))
 13020  		return true
 13021  	}
 13022  }
 13023  func rewriteValueARM_OpConstNil(v *Value) bool {
 13024  	// match: (ConstNil)
 13025  	// result: (MOVWconst [0])
 13026  	for {
 13027  		v.reset(OpARMMOVWconst)
 13028  		v.AuxInt = int32ToAuxInt(0)
 13029  		return true
 13030  	}
 13031  }
 13032  func rewriteValueARM_OpCtz16(v *Value) bool {
 13033  	v_0 := v.Args[0]
 13034  	b := v.Block
 13035  	typ := &b.Func.Config.Types
 13036  	// match: (Ctz16 <t> x)
 13037  	// cond: objabi.GOARM<=6
 13038  	// result: (RSBconst [32] (CLZ <t> (SUBconst <typ.UInt32> (AND <typ.UInt32> (ORconst <typ.UInt32> [0x10000] x) (RSBconst <typ.UInt32> [0] (ORconst <typ.UInt32> [0x10000] x))) [1])))
 13039  	for {
 13040  		t := v.Type
 13041  		x := v_0
 13042  		if !(objabi.GOARM <= 6) {
 13043  			break
 13044  		}
 13045  		v.reset(OpARMRSBconst)
 13046  		v.AuxInt = int32ToAuxInt(32)
 13047  		v0 := b.NewValue0(v.Pos, OpARMCLZ, t)
 13048  		v1 := b.NewValue0(v.Pos, OpARMSUBconst, typ.UInt32)
 13049  		v1.AuxInt = int32ToAuxInt(1)
 13050  		v2 := b.NewValue0(v.Pos, OpARMAND, typ.UInt32)
 13051  		v3 := b.NewValue0(v.Pos, OpARMORconst, typ.UInt32)
 13052  		v3.AuxInt = int32ToAuxInt(0x10000)
 13053  		v3.AddArg(x)
 13054  		v4 := b.NewValue0(v.Pos, OpARMRSBconst, typ.UInt32)
 13055  		v4.AuxInt = int32ToAuxInt(0)
 13056  		v4.AddArg(v3)
 13057  		v2.AddArg2(v3, v4)
 13058  		v1.AddArg(v2)
 13059  		v0.AddArg(v1)
 13060  		v.AddArg(v0)
 13061  		return true
 13062  	}
 13063  	// match: (Ctz16 <t> x)
 13064  	// cond: objabi.GOARM==7
 13065  	// result: (CLZ <t> (RBIT <typ.UInt32> (ORconst <typ.UInt32> [0x10000] x)))
 13066  	for {
 13067  		t := v.Type
 13068  		x := v_0
 13069  		if !(objabi.GOARM == 7) {
 13070  			break
 13071  		}
 13072  		v.reset(OpARMCLZ)
 13073  		v.Type = t
 13074  		v0 := b.NewValue0(v.Pos, OpARMRBIT, typ.UInt32)
 13075  		v1 := b.NewValue0(v.Pos, OpARMORconst, typ.UInt32)
 13076  		v1.AuxInt = int32ToAuxInt(0x10000)
 13077  		v1.AddArg(x)
 13078  		v0.AddArg(v1)
 13079  		v.AddArg(v0)
 13080  		return true
 13081  	}
 13082  	return false
 13083  }
 13084  func rewriteValueARM_OpCtz32(v *Value) bool {
 13085  	v_0 := v.Args[0]
 13086  	b := v.Block
 13087  	// match: (Ctz32 <t> x)
 13088  	// cond: objabi.GOARM<=6
 13089  	// result: (RSBconst [32] (CLZ <t> (SUBconst <t> (AND <t> x (RSBconst <t> [0] x)) [1])))
 13090  	for {
 13091  		t := v.Type
 13092  		x := v_0
 13093  		if !(objabi.GOARM <= 6) {
 13094  			break
 13095  		}
 13096  		v.reset(OpARMRSBconst)
 13097  		v.AuxInt = int32ToAuxInt(32)
 13098  		v0 := b.NewValue0(v.Pos, OpARMCLZ, t)
 13099  		v1 := b.NewValue0(v.Pos, OpARMSUBconst, t)
 13100  		v1.AuxInt = int32ToAuxInt(1)
 13101  		v2 := b.NewValue0(v.Pos, OpARMAND, t)
 13102  		v3 := b.NewValue0(v.Pos, OpARMRSBconst, t)
 13103  		v3.AuxInt = int32ToAuxInt(0)
 13104  		v3.AddArg(x)
 13105  		v2.AddArg2(x, v3)
 13106  		v1.AddArg(v2)
 13107  		v0.AddArg(v1)
 13108  		v.AddArg(v0)
 13109  		return true
 13110  	}
 13111  	// match: (Ctz32 <t> x)
 13112  	// cond: objabi.GOARM==7
 13113  	// result: (CLZ <t> (RBIT <t> x))
 13114  	for {
 13115  		t := v.Type
 13116  		x := v_0
 13117  		if !(objabi.GOARM == 7) {
 13118  			break
 13119  		}
 13120  		v.reset(OpARMCLZ)
 13121  		v.Type = t
 13122  		v0 := b.NewValue0(v.Pos, OpARMRBIT, t)
 13123  		v0.AddArg(x)
 13124  		v.AddArg(v0)
 13125  		return true
 13126  	}
 13127  	return false
 13128  }
 13129  func rewriteValueARM_OpCtz8(v *Value) bool {
 13130  	v_0 := v.Args[0]
 13131  	b := v.Block
 13132  	typ := &b.Func.Config.Types
 13133  	// match: (Ctz8 <t> x)
 13134  	// cond: objabi.GOARM<=6
 13135  	// result: (RSBconst [32] (CLZ <t> (SUBconst <typ.UInt32> (AND <typ.UInt32> (ORconst <typ.UInt32> [0x100] x) (RSBconst <typ.UInt32> [0] (ORconst <typ.UInt32> [0x100] x))) [1])))
 13136  	for {
 13137  		t := v.Type
 13138  		x := v_0
 13139  		if !(objabi.GOARM <= 6) {
 13140  			break
 13141  		}
 13142  		v.reset(OpARMRSBconst)
 13143  		v.AuxInt = int32ToAuxInt(32)
 13144  		v0 := b.NewValue0(v.Pos, OpARMCLZ, t)
 13145  		v1 := b.NewValue0(v.Pos, OpARMSUBconst, typ.UInt32)
 13146  		v1.AuxInt = int32ToAuxInt(1)
 13147  		v2 := b.NewValue0(v.Pos, OpARMAND, typ.UInt32)
 13148  		v3 := b.NewValue0(v.Pos, OpARMORconst, typ.UInt32)
 13149  		v3.AuxInt = int32ToAuxInt(0x100)
 13150  		v3.AddArg(x)
 13151  		v4 := b.NewValue0(v.Pos, OpARMRSBconst, typ.UInt32)
 13152  		v4.AuxInt = int32ToAuxInt(0)
 13153  		v4.AddArg(v3)
 13154  		v2.AddArg2(v3, v4)
 13155  		v1.AddArg(v2)
 13156  		v0.AddArg(v1)
 13157  		v.AddArg(v0)
 13158  		return true
 13159  	}
 13160  	// match: (Ctz8 <t> x)
 13161  	// cond: objabi.GOARM==7
 13162  	// result: (CLZ <t> (RBIT <typ.UInt32> (ORconst <typ.UInt32> [0x100] x)))
 13163  	for {
 13164  		t := v.Type
 13165  		x := v_0
 13166  		if !(objabi.GOARM == 7) {
 13167  			break
 13168  		}
 13169  		v.reset(OpARMCLZ)
 13170  		v.Type = t
 13171  		v0 := b.NewValue0(v.Pos, OpARMRBIT, typ.UInt32)
 13172  		v1 := b.NewValue0(v.Pos, OpARMORconst, typ.UInt32)
 13173  		v1.AuxInt = int32ToAuxInt(0x100)
 13174  		v1.AddArg(x)
 13175  		v0.AddArg(v1)
 13176  		v.AddArg(v0)
 13177  		return true
 13178  	}
 13179  	return false
 13180  }
 13181  func rewriteValueARM_OpDiv16(v *Value) bool {
 13182  	v_1 := v.Args[1]
 13183  	v_0 := v.Args[0]
 13184  	b := v.Block
 13185  	typ := &b.Func.Config.Types
 13186  	// match: (Div16 x y)
 13187  	// result: (Div32 (SignExt16to32 x) (SignExt16to32 y))
 13188  	for {
 13189  		x := v_0
 13190  		y := v_1
 13191  		v.reset(OpDiv32)
 13192  		v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 13193  		v0.AddArg(x)
 13194  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 13195  		v1.AddArg(y)
 13196  		v.AddArg2(v0, v1)
 13197  		return true
 13198  	}
 13199  }
 13200  func rewriteValueARM_OpDiv16u(v *Value) bool {
 13201  	v_1 := v.Args[1]
 13202  	v_0 := v.Args[0]
 13203  	b := v.Block
 13204  	typ := &b.Func.Config.Types
 13205  	// match: (Div16u x y)
 13206  	// result: (Div32u (ZeroExt16to32 x) (ZeroExt16to32 y))
 13207  	for {
 13208  		x := v_0
 13209  		y := v_1
 13210  		v.reset(OpDiv32u)
 13211  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 13212  		v0.AddArg(x)
 13213  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 13214  		v1.AddArg(y)
 13215  		v.AddArg2(v0, v1)
 13216  		return true
 13217  	}
 13218  }
 13219  func rewriteValueARM_OpDiv32(v *Value) bool {
 13220  	v_1 := v.Args[1]
 13221  	v_0 := v.Args[0]
 13222  	b := v.Block
 13223  	typ := &b.Func.Config.Types
 13224  	// match: (Div32 x y)
 13225  	// result: (SUB (XOR <typ.UInt32> (Select0 <typ.UInt32> (CALLudiv (SUB <typ.UInt32> (XOR x <typ.UInt32> (Signmask x)) (Signmask x)) (SUB <typ.UInt32> (XOR y <typ.UInt32> (Signmask y)) (Signmask y)))) (Signmask (XOR <typ.UInt32> x y))) (Signmask (XOR <typ.UInt32> x y)))
 13226  	for {
 13227  		x := v_0
 13228  		y := v_1
 13229  		v.reset(OpARMSUB)
 13230  		v0 := b.NewValue0(v.Pos, OpARMXOR, typ.UInt32)
 13231  		v1 := b.NewValue0(v.Pos, OpSelect0, typ.UInt32)
 13232  		v2 := b.NewValue0(v.Pos, OpARMCALLudiv, types.NewTuple(typ.UInt32, typ.UInt32))
 13233  		v3