...
Run Format

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 "fmt"
     7  import "math"
     8  import "cmd/internal/obj"
     9  import "cmd/internal/objabi"
    10  import "cmd/compile/internal/types"
    11  
    12  var _ = fmt.Println   // in case not otherwise used
    13  var _ = math.MinInt8  // in case not otherwise used
    14  var _ = obj.ANOP      // in case not otherwise used
    15  var _ = objabi.GOROOT // in case not otherwise used
    16  var _ = types.TypeMem // in case not otherwise used
    17  
    18  func rewriteValueARM(v *Value) bool {
    19  	switch v.Op {
    20  	case OpARMADC:
    21  		return rewriteValueARM_OpARMADC_0(v) || rewriteValueARM_OpARMADC_10(v) || rewriteValueARM_OpARMADC_20(v)
    22  	case OpARMADCconst:
    23  		return rewriteValueARM_OpARMADCconst_0(v)
    24  	case OpARMADCshiftLL:
    25  		return rewriteValueARM_OpARMADCshiftLL_0(v)
    26  	case OpARMADCshiftLLreg:
    27  		return rewriteValueARM_OpARMADCshiftLLreg_0(v)
    28  	case OpARMADCshiftRA:
    29  		return rewriteValueARM_OpARMADCshiftRA_0(v)
    30  	case OpARMADCshiftRAreg:
    31  		return rewriteValueARM_OpARMADCshiftRAreg_0(v)
    32  	case OpARMADCshiftRL:
    33  		return rewriteValueARM_OpARMADCshiftRL_0(v)
    34  	case OpARMADCshiftRLreg:
    35  		return rewriteValueARM_OpARMADCshiftRLreg_0(v)
    36  	case OpARMADD:
    37  		return rewriteValueARM_OpARMADD_0(v) || rewriteValueARM_OpARMADD_10(v)
    38  	case OpARMADDD:
    39  		return rewriteValueARM_OpARMADDD_0(v)
    40  	case OpARMADDF:
    41  		return rewriteValueARM_OpARMADDF_0(v)
    42  	case OpARMADDS:
    43  		return rewriteValueARM_OpARMADDS_0(v) || rewriteValueARM_OpARMADDS_10(v)
    44  	case OpARMADDSshiftLL:
    45  		return rewriteValueARM_OpARMADDSshiftLL_0(v)
    46  	case OpARMADDSshiftLLreg:
    47  		return rewriteValueARM_OpARMADDSshiftLLreg_0(v)
    48  	case OpARMADDSshiftRA:
    49  		return rewriteValueARM_OpARMADDSshiftRA_0(v)
    50  	case OpARMADDSshiftRAreg:
    51  		return rewriteValueARM_OpARMADDSshiftRAreg_0(v)
    52  	case OpARMADDSshiftRL:
    53  		return rewriteValueARM_OpARMADDSshiftRL_0(v)
    54  	case OpARMADDSshiftRLreg:
    55  		return rewriteValueARM_OpARMADDSshiftRLreg_0(v)
    56  	case OpARMADDconst:
    57  		return rewriteValueARM_OpARMADDconst_0(v)
    58  	case OpARMADDshiftLL:
    59  		return rewriteValueARM_OpARMADDshiftLL_0(v)
    60  	case OpARMADDshiftLLreg:
    61  		return rewriteValueARM_OpARMADDshiftLLreg_0(v)
    62  	case OpARMADDshiftRA:
    63  		return rewriteValueARM_OpARMADDshiftRA_0(v)
    64  	case OpARMADDshiftRAreg:
    65  		return rewriteValueARM_OpARMADDshiftRAreg_0(v)
    66  	case OpARMADDshiftRL:
    67  		return rewriteValueARM_OpARMADDshiftRL_0(v)
    68  	case OpARMADDshiftRLreg:
    69  		return rewriteValueARM_OpARMADDshiftRLreg_0(v)
    70  	case OpARMAND:
    71  		return rewriteValueARM_OpARMAND_0(v) || rewriteValueARM_OpARMAND_10(v) || rewriteValueARM_OpARMAND_20(v)
    72  	case OpARMANDconst:
    73  		return rewriteValueARM_OpARMANDconst_0(v)
    74  	case OpARMANDshiftLL:
    75  		return rewriteValueARM_OpARMANDshiftLL_0(v)
    76  	case OpARMANDshiftLLreg:
    77  		return rewriteValueARM_OpARMANDshiftLLreg_0(v)
    78  	case OpARMANDshiftRA:
    79  		return rewriteValueARM_OpARMANDshiftRA_0(v)
    80  	case OpARMANDshiftRAreg:
    81  		return rewriteValueARM_OpARMANDshiftRAreg_0(v)
    82  	case OpARMANDshiftRL:
    83  		return rewriteValueARM_OpARMANDshiftRL_0(v)
    84  	case OpARMANDshiftRLreg:
    85  		return rewriteValueARM_OpARMANDshiftRLreg_0(v)
    86  	case OpARMBFX:
    87  		return rewriteValueARM_OpARMBFX_0(v)
    88  	case OpARMBFXU:
    89  		return rewriteValueARM_OpARMBFXU_0(v)
    90  	case OpARMBIC:
    91  		return rewriteValueARM_OpARMBIC_0(v)
    92  	case OpARMBICconst:
    93  		return rewriteValueARM_OpARMBICconst_0(v)
    94  	case OpARMBICshiftLL:
    95  		return rewriteValueARM_OpARMBICshiftLL_0(v)
    96  	case OpARMBICshiftLLreg:
    97  		return rewriteValueARM_OpARMBICshiftLLreg_0(v)
    98  	case OpARMBICshiftRA:
    99  		return rewriteValueARM_OpARMBICshiftRA_0(v)
   100  	case OpARMBICshiftRAreg:
   101  		return rewriteValueARM_OpARMBICshiftRAreg_0(v)
   102  	case OpARMBICshiftRL:
   103  		return rewriteValueARM_OpARMBICshiftRL_0(v)
   104  	case OpARMBICshiftRLreg:
   105  		return rewriteValueARM_OpARMBICshiftRLreg_0(v)
   106  	case OpARMCMN:
   107  		return rewriteValueARM_OpARMCMN_0(v) || rewriteValueARM_OpARMCMN_10(v)
   108  	case OpARMCMNconst:
   109  		return rewriteValueARM_OpARMCMNconst_0(v)
   110  	case OpARMCMNshiftLL:
   111  		return rewriteValueARM_OpARMCMNshiftLL_0(v)
   112  	case OpARMCMNshiftLLreg:
   113  		return rewriteValueARM_OpARMCMNshiftLLreg_0(v)
   114  	case OpARMCMNshiftRA:
   115  		return rewriteValueARM_OpARMCMNshiftRA_0(v)
   116  	case OpARMCMNshiftRAreg:
   117  		return rewriteValueARM_OpARMCMNshiftRAreg_0(v)
   118  	case OpARMCMNshiftRL:
   119  		return rewriteValueARM_OpARMCMNshiftRL_0(v)
   120  	case OpARMCMNshiftRLreg:
   121  		return rewriteValueARM_OpARMCMNshiftRLreg_0(v)
   122  	case OpARMCMOVWHSconst:
   123  		return rewriteValueARM_OpARMCMOVWHSconst_0(v)
   124  	case OpARMCMOVWLSconst:
   125  		return rewriteValueARM_OpARMCMOVWLSconst_0(v)
   126  	case OpARMCMP:
   127  		return rewriteValueARM_OpARMCMP_0(v) || rewriteValueARM_OpARMCMP_10(v)
   128  	case OpARMCMPD:
   129  		return rewriteValueARM_OpARMCMPD_0(v)
   130  	case OpARMCMPF:
   131  		return rewriteValueARM_OpARMCMPF_0(v)
   132  	case OpARMCMPconst:
   133  		return rewriteValueARM_OpARMCMPconst_0(v)
   134  	case OpARMCMPshiftLL:
   135  		return rewriteValueARM_OpARMCMPshiftLL_0(v)
   136  	case OpARMCMPshiftLLreg:
   137  		return rewriteValueARM_OpARMCMPshiftLLreg_0(v)
   138  	case OpARMCMPshiftRA:
   139  		return rewriteValueARM_OpARMCMPshiftRA_0(v)
   140  	case OpARMCMPshiftRAreg:
   141  		return rewriteValueARM_OpARMCMPshiftRAreg_0(v)
   142  	case OpARMCMPshiftRL:
   143  		return rewriteValueARM_OpARMCMPshiftRL_0(v)
   144  	case OpARMCMPshiftRLreg:
   145  		return rewriteValueARM_OpARMCMPshiftRLreg_0(v)
   146  	case OpARMEqual:
   147  		return rewriteValueARM_OpARMEqual_0(v)
   148  	case OpARMGreaterEqual:
   149  		return rewriteValueARM_OpARMGreaterEqual_0(v)
   150  	case OpARMGreaterEqualU:
   151  		return rewriteValueARM_OpARMGreaterEqualU_0(v)
   152  	case OpARMGreaterThan:
   153  		return rewriteValueARM_OpARMGreaterThan_0(v)
   154  	case OpARMGreaterThanU:
   155  		return rewriteValueARM_OpARMGreaterThanU_0(v)
   156  	case OpARMLessEqual:
   157  		return rewriteValueARM_OpARMLessEqual_0(v)
   158  	case OpARMLessEqualU:
   159  		return rewriteValueARM_OpARMLessEqualU_0(v)
   160  	case OpARMLessThan:
   161  		return rewriteValueARM_OpARMLessThan_0(v)
   162  	case OpARMLessThanU:
   163  		return rewriteValueARM_OpARMLessThanU_0(v)
   164  	case OpARMMOVBUload:
   165  		return rewriteValueARM_OpARMMOVBUload_0(v)
   166  	case OpARMMOVBUloadidx:
   167  		return rewriteValueARM_OpARMMOVBUloadidx_0(v)
   168  	case OpARMMOVBUreg:
   169  		return rewriteValueARM_OpARMMOVBUreg_0(v)
   170  	case OpARMMOVBload:
   171  		return rewriteValueARM_OpARMMOVBload_0(v)
   172  	case OpARMMOVBloadidx:
   173  		return rewriteValueARM_OpARMMOVBloadidx_0(v)
   174  	case OpARMMOVBreg:
   175  		return rewriteValueARM_OpARMMOVBreg_0(v)
   176  	case OpARMMOVBstore:
   177  		return rewriteValueARM_OpARMMOVBstore_0(v)
   178  	case OpARMMOVBstoreidx:
   179  		return rewriteValueARM_OpARMMOVBstoreidx_0(v)
   180  	case OpARMMOVDload:
   181  		return rewriteValueARM_OpARMMOVDload_0(v)
   182  	case OpARMMOVDstore:
   183  		return rewriteValueARM_OpARMMOVDstore_0(v)
   184  	case OpARMMOVFload:
   185  		return rewriteValueARM_OpARMMOVFload_0(v)
   186  	case OpARMMOVFstore:
   187  		return rewriteValueARM_OpARMMOVFstore_0(v)
   188  	case OpARMMOVHUload:
   189  		return rewriteValueARM_OpARMMOVHUload_0(v)
   190  	case OpARMMOVHUloadidx:
   191  		return rewriteValueARM_OpARMMOVHUloadidx_0(v)
   192  	case OpARMMOVHUreg:
   193  		return rewriteValueARM_OpARMMOVHUreg_0(v)
   194  	case OpARMMOVHload:
   195  		return rewriteValueARM_OpARMMOVHload_0(v)
   196  	case OpARMMOVHloadidx:
   197  		return rewriteValueARM_OpARMMOVHloadidx_0(v)
   198  	case OpARMMOVHreg:
   199  		return rewriteValueARM_OpARMMOVHreg_0(v)
   200  	case OpARMMOVHstore:
   201  		return rewriteValueARM_OpARMMOVHstore_0(v)
   202  	case OpARMMOVHstoreidx:
   203  		return rewriteValueARM_OpARMMOVHstoreidx_0(v)
   204  	case OpARMMOVWload:
   205  		return rewriteValueARM_OpARMMOVWload_0(v)
   206  	case OpARMMOVWloadidx:
   207  		return rewriteValueARM_OpARMMOVWloadidx_0(v)
   208  	case OpARMMOVWloadshiftLL:
   209  		return rewriteValueARM_OpARMMOVWloadshiftLL_0(v)
   210  	case OpARMMOVWloadshiftRA:
   211  		return rewriteValueARM_OpARMMOVWloadshiftRA_0(v)
   212  	case OpARMMOVWloadshiftRL:
   213  		return rewriteValueARM_OpARMMOVWloadshiftRL_0(v)
   214  	case OpARMMOVWreg:
   215  		return rewriteValueARM_OpARMMOVWreg_0(v)
   216  	case OpARMMOVWstore:
   217  		return rewriteValueARM_OpARMMOVWstore_0(v)
   218  	case OpARMMOVWstoreidx:
   219  		return rewriteValueARM_OpARMMOVWstoreidx_0(v)
   220  	case OpARMMOVWstoreshiftLL:
   221  		return rewriteValueARM_OpARMMOVWstoreshiftLL_0(v)
   222  	case OpARMMOVWstoreshiftRA:
   223  		return rewriteValueARM_OpARMMOVWstoreshiftRA_0(v)
   224  	case OpARMMOVWstoreshiftRL:
   225  		return rewriteValueARM_OpARMMOVWstoreshiftRL_0(v)
   226  	case OpARMMUL:
   227  		return rewriteValueARM_OpARMMUL_0(v) || rewriteValueARM_OpARMMUL_10(v) || rewriteValueARM_OpARMMUL_20(v)
   228  	case OpARMMULA:
   229  		return rewriteValueARM_OpARMMULA_0(v) || rewriteValueARM_OpARMMULA_10(v) || rewriteValueARM_OpARMMULA_20(v)
   230  	case OpARMMULD:
   231  		return rewriteValueARM_OpARMMULD_0(v)
   232  	case OpARMMULF:
   233  		return rewriteValueARM_OpARMMULF_0(v)
   234  	case OpARMMULS:
   235  		return rewriteValueARM_OpARMMULS_0(v) || rewriteValueARM_OpARMMULS_10(v) || rewriteValueARM_OpARMMULS_20(v)
   236  	case OpARMMVN:
   237  		return rewriteValueARM_OpARMMVN_0(v)
   238  	case OpARMMVNshiftLL:
   239  		return rewriteValueARM_OpARMMVNshiftLL_0(v)
   240  	case OpARMMVNshiftLLreg:
   241  		return rewriteValueARM_OpARMMVNshiftLLreg_0(v)
   242  	case OpARMMVNshiftRA:
   243  		return rewriteValueARM_OpARMMVNshiftRA_0(v)
   244  	case OpARMMVNshiftRAreg:
   245  		return rewriteValueARM_OpARMMVNshiftRAreg_0(v)
   246  	case OpARMMVNshiftRL:
   247  		return rewriteValueARM_OpARMMVNshiftRL_0(v)
   248  	case OpARMMVNshiftRLreg:
   249  		return rewriteValueARM_OpARMMVNshiftRLreg_0(v)
   250  	case OpARMNEGD:
   251  		return rewriteValueARM_OpARMNEGD_0(v)
   252  	case OpARMNEGF:
   253  		return rewriteValueARM_OpARMNEGF_0(v)
   254  	case OpARMNMULD:
   255  		return rewriteValueARM_OpARMNMULD_0(v)
   256  	case OpARMNMULF:
   257  		return rewriteValueARM_OpARMNMULF_0(v)
   258  	case OpARMNotEqual:
   259  		return rewriteValueARM_OpARMNotEqual_0(v)
   260  	case OpARMOR:
   261  		return rewriteValueARM_OpARMOR_0(v) || rewriteValueARM_OpARMOR_10(v)
   262  	case OpARMORconst:
   263  		return rewriteValueARM_OpARMORconst_0(v)
   264  	case OpARMORshiftLL:
   265  		return rewriteValueARM_OpARMORshiftLL_0(v)
   266  	case OpARMORshiftLLreg:
   267  		return rewriteValueARM_OpARMORshiftLLreg_0(v)
   268  	case OpARMORshiftRA:
   269  		return rewriteValueARM_OpARMORshiftRA_0(v)
   270  	case OpARMORshiftRAreg:
   271  		return rewriteValueARM_OpARMORshiftRAreg_0(v)
   272  	case OpARMORshiftRL:
   273  		return rewriteValueARM_OpARMORshiftRL_0(v)
   274  	case OpARMORshiftRLreg:
   275  		return rewriteValueARM_OpARMORshiftRLreg_0(v)
   276  	case OpARMRSB:
   277  		return rewriteValueARM_OpARMRSB_0(v) || rewriteValueARM_OpARMRSB_10(v)
   278  	case OpARMRSBSshiftLL:
   279  		return rewriteValueARM_OpARMRSBSshiftLL_0(v)
   280  	case OpARMRSBSshiftLLreg:
   281  		return rewriteValueARM_OpARMRSBSshiftLLreg_0(v)
   282  	case OpARMRSBSshiftRA:
   283  		return rewriteValueARM_OpARMRSBSshiftRA_0(v)
   284  	case OpARMRSBSshiftRAreg:
   285  		return rewriteValueARM_OpARMRSBSshiftRAreg_0(v)
   286  	case OpARMRSBSshiftRL:
   287  		return rewriteValueARM_OpARMRSBSshiftRL_0(v)
   288  	case OpARMRSBSshiftRLreg:
   289  		return rewriteValueARM_OpARMRSBSshiftRLreg_0(v)
   290  	case OpARMRSBconst:
   291  		return rewriteValueARM_OpARMRSBconst_0(v)
   292  	case OpARMRSBshiftLL:
   293  		return rewriteValueARM_OpARMRSBshiftLL_0(v)
   294  	case OpARMRSBshiftLLreg:
   295  		return rewriteValueARM_OpARMRSBshiftLLreg_0(v)
   296  	case OpARMRSBshiftRA:
   297  		return rewriteValueARM_OpARMRSBshiftRA_0(v)
   298  	case OpARMRSBshiftRAreg:
   299  		return rewriteValueARM_OpARMRSBshiftRAreg_0(v)
   300  	case OpARMRSBshiftRL:
   301  		return rewriteValueARM_OpARMRSBshiftRL_0(v)
   302  	case OpARMRSBshiftRLreg:
   303  		return rewriteValueARM_OpARMRSBshiftRLreg_0(v)
   304  	case OpARMRSCconst:
   305  		return rewriteValueARM_OpARMRSCconst_0(v)
   306  	case OpARMRSCshiftLL:
   307  		return rewriteValueARM_OpARMRSCshiftLL_0(v)
   308  	case OpARMRSCshiftLLreg:
   309  		return rewriteValueARM_OpARMRSCshiftLLreg_0(v)
   310  	case OpARMRSCshiftRA:
   311  		return rewriteValueARM_OpARMRSCshiftRA_0(v)
   312  	case OpARMRSCshiftRAreg:
   313  		return rewriteValueARM_OpARMRSCshiftRAreg_0(v)
   314  	case OpARMRSCshiftRL:
   315  		return rewriteValueARM_OpARMRSCshiftRL_0(v)
   316  	case OpARMRSCshiftRLreg:
   317  		return rewriteValueARM_OpARMRSCshiftRLreg_0(v)
   318  	case OpARMSBC:
   319  		return rewriteValueARM_OpARMSBC_0(v) || rewriteValueARM_OpARMSBC_10(v)
   320  	case OpARMSBCconst:
   321  		return rewriteValueARM_OpARMSBCconst_0(v)
   322  	case OpARMSBCshiftLL:
   323  		return rewriteValueARM_OpARMSBCshiftLL_0(v)
   324  	case OpARMSBCshiftLLreg:
   325  		return rewriteValueARM_OpARMSBCshiftLLreg_0(v)
   326  	case OpARMSBCshiftRA:
   327  		return rewriteValueARM_OpARMSBCshiftRA_0(v)
   328  	case OpARMSBCshiftRAreg:
   329  		return rewriteValueARM_OpARMSBCshiftRAreg_0(v)
   330  	case OpARMSBCshiftRL:
   331  		return rewriteValueARM_OpARMSBCshiftRL_0(v)
   332  	case OpARMSBCshiftRLreg:
   333  		return rewriteValueARM_OpARMSBCshiftRLreg_0(v)
   334  	case OpARMSLL:
   335  		return rewriteValueARM_OpARMSLL_0(v)
   336  	case OpARMSLLconst:
   337  		return rewriteValueARM_OpARMSLLconst_0(v)
   338  	case OpARMSRA:
   339  		return rewriteValueARM_OpARMSRA_0(v)
   340  	case OpARMSRAcond:
   341  		return rewriteValueARM_OpARMSRAcond_0(v)
   342  	case OpARMSRAconst:
   343  		return rewriteValueARM_OpARMSRAconst_0(v)
   344  	case OpARMSRL:
   345  		return rewriteValueARM_OpARMSRL_0(v)
   346  	case OpARMSRLconst:
   347  		return rewriteValueARM_OpARMSRLconst_0(v)
   348  	case OpARMSUB:
   349  		return rewriteValueARM_OpARMSUB_0(v) || rewriteValueARM_OpARMSUB_10(v)
   350  	case OpARMSUBD:
   351  		return rewriteValueARM_OpARMSUBD_0(v)
   352  	case OpARMSUBF:
   353  		return rewriteValueARM_OpARMSUBF_0(v)
   354  	case OpARMSUBS:
   355  		return rewriteValueARM_OpARMSUBS_0(v) || rewriteValueARM_OpARMSUBS_10(v)
   356  	case OpARMSUBSshiftLL:
   357  		return rewriteValueARM_OpARMSUBSshiftLL_0(v)
   358  	case OpARMSUBSshiftLLreg:
   359  		return rewriteValueARM_OpARMSUBSshiftLLreg_0(v)
   360  	case OpARMSUBSshiftRA:
   361  		return rewriteValueARM_OpARMSUBSshiftRA_0(v)
   362  	case OpARMSUBSshiftRAreg:
   363  		return rewriteValueARM_OpARMSUBSshiftRAreg_0(v)
   364  	case OpARMSUBSshiftRL:
   365  		return rewriteValueARM_OpARMSUBSshiftRL_0(v)
   366  	case OpARMSUBSshiftRLreg:
   367  		return rewriteValueARM_OpARMSUBSshiftRLreg_0(v)
   368  	case OpARMSUBconst:
   369  		return rewriteValueARM_OpARMSUBconst_0(v)
   370  	case OpARMSUBshiftLL:
   371  		return rewriteValueARM_OpARMSUBshiftLL_0(v)
   372  	case OpARMSUBshiftLLreg:
   373  		return rewriteValueARM_OpARMSUBshiftLLreg_0(v)
   374  	case OpARMSUBshiftRA:
   375  		return rewriteValueARM_OpARMSUBshiftRA_0(v)
   376  	case OpARMSUBshiftRAreg:
   377  		return rewriteValueARM_OpARMSUBshiftRAreg_0(v)
   378  	case OpARMSUBshiftRL:
   379  		return rewriteValueARM_OpARMSUBshiftRL_0(v)
   380  	case OpARMSUBshiftRLreg:
   381  		return rewriteValueARM_OpARMSUBshiftRLreg_0(v)
   382  	case OpARMTEQ:
   383  		return rewriteValueARM_OpARMTEQ_0(v) || rewriteValueARM_OpARMTEQ_10(v)
   384  	case OpARMTEQconst:
   385  		return rewriteValueARM_OpARMTEQconst_0(v)
   386  	case OpARMTEQshiftLL:
   387  		return rewriteValueARM_OpARMTEQshiftLL_0(v)
   388  	case OpARMTEQshiftLLreg:
   389  		return rewriteValueARM_OpARMTEQshiftLLreg_0(v)
   390  	case OpARMTEQshiftRA:
   391  		return rewriteValueARM_OpARMTEQshiftRA_0(v)
   392  	case OpARMTEQshiftRAreg:
   393  		return rewriteValueARM_OpARMTEQshiftRAreg_0(v)
   394  	case OpARMTEQshiftRL:
   395  		return rewriteValueARM_OpARMTEQshiftRL_0(v)
   396  	case OpARMTEQshiftRLreg:
   397  		return rewriteValueARM_OpARMTEQshiftRLreg_0(v)
   398  	case OpARMTST:
   399  		return rewriteValueARM_OpARMTST_0(v) || rewriteValueARM_OpARMTST_10(v)
   400  	case OpARMTSTconst:
   401  		return rewriteValueARM_OpARMTSTconst_0(v)
   402  	case OpARMTSTshiftLL:
   403  		return rewriteValueARM_OpARMTSTshiftLL_0(v)
   404  	case OpARMTSTshiftLLreg:
   405  		return rewriteValueARM_OpARMTSTshiftLLreg_0(v)
   406  	case OpARMTSTshiftRA:
   407  		return rewriteValueARM_OpARMTSTshiftRA_0(v)
   408  	case OpARMTSTshiftRAreg:
   409  		return rewriteValueARM_OpARMTSTshiftRAreg_0(v)
   410  	case OpARMTSTshiftRL:
   411  		return rewriteValueARM_OpARMTSTshiftRL_0(v)
   412  	case OpARMTSTshiftRLreg:
   413  		return rewriteValueARM_OpARMTSTshiftRLreg_0(v)
   414  	case OpARMXOR:
   415  		return rewriteValueARM_OpARMXOR_0(v) || rewriteValueARM_OpARMXOR_10(v)
   416  	case OpARMXORconst:
   417  		return rewriteValueARM_OpARMXORconst_0(v)
   418  	case OpARMXORshiftLL:
   419  		return rewriteValueARM_OpARMXORshiftLL_0(v)
   420  	case OpARMXORshiftLLreg:
   421  		return rewriteValueARM_OpARMXORshiftLLreg_0(v)
   422  	case OpARMXORshiftRA:
   423  		return rewriteValueARM_OpARMXORshiftRA_0(v)
   424  	case OpARMXORshiftRAreg:
   425  		return rewriteValueARM_OpARMXORshiftRAreg_0(v)
   426  	case OpARMXORshiftRL:
   427  		return rewriteValueARM_OpARMXORshiftRL_0(v)
   428  	case OpARMXORshiftRLreg:
   429  		return rewriteValueARM_OpARMXORshiftRLreg_0(v)
   430  	case OpARMXORshiftRR:
   431  		return rewriteValueARM_OpARMXORshiftRR_0(v)
   432  	case OpAdd16:
   433  		return rewriteValueARM_OpAdd16_0(v)
   434  	case OpAdd32:
   435  		return rewriteValueARM_OpAdd32_0(v)
   436  	case OpAdd32F:
   437  		return rewriteValueARM_OpAdd32F_0(v)
   438  	case OpAdd32carry:
   439  		return rewriteValueARM_OpAdd32carry_0(v)
   440  	case OpAdd32withcarry:
   441  		return rewriteValueARM_OpAdd32withcarry_0(v)
   442  	case OpAdd64F:
   443  		return rewriteValueARM_OpAdd64F_0(v)
   444  	case OpAdd8:
   445  		return rewriteValueARM_OpAdd8_0(v)
   446  	case OpAddPtr:
   447  		return rewriteValueARM_OpAddPtr_0(v)
   448  	case OpAddr:
   449  		return rewriteValueARM_OpAddr_0(v)
   450  	case OpAnd16:
   451  		return rewriteValueARM_OpAnd16_0(v)
   452  	case OpAnd32:
   453  		return rewriteValueARM_OpAnd32_0(v)
   454  	case OpAnd8:
   455  		return rewriteValueARM_OpAnd8_0(v)
   456  	case OpAndB:
   457  		return rewriteValueARM_OpAndB_0(v)
   458  	case OpAvg32u:
   459  		return rewriteValueARM_OpAvg32u_0(v)
   460  	case OpBitLen32:
   461  		return rewriteValueARM_OpBitLen32_0(v)
   462  	case OpBswap32:
   463  		return rewriteValueARM_OpBswap32_0(v)
   464  	case OpClosureCall:
   465  		return rewriteValueARM_OpClosureCall_0(v)
   466  	case OpCom16:
   467  		return rewriteValueARM_OpCom16_0(v)
   468  	case OpCom32:
   469  		return rewriteValueARM_OpCom32_0(v)
   470  	case OpCom8:
   471  		return rewriteValueARM_OpCom8_0(v)
   472  	case OpConst16:
   473  		return rewriteValueARM_OpConst16_0(v)
   474  	case OpConst32:
   475  		return rewriteValueARM_OpConst32_0(v)
   476  	case OpConst32F:
   477  		return rewriteValueARM_OpConst32F_0(v)
   478  	case OpConst64F:
   479  		return rewriteValueARM_OpConst64F_0(v)
   480  	case OpConst8:
   481  		return rewriteValueARM_OpConst8_0(v)
   482  	case OpConstBool:
   483  		return rewriteValueARM_OpConstBool_0(v)
   484  	case OpConstNil:
   485  		return rewriteValueARM_OpConstNil_0(v)
   486  	case OpCtz32:
   487  		return rewriteValueARM_OpCtz32_0(v)
   488  	case OpCtz32NonZero:
   489  		return rewriteValueARM_OpCtz32NonZero_0(v)
   490  	case OpCvt32Fto32:
   491  		return rewriteValueARM_OpCvt32Fto32_0(v)
   492  	case OpCvt32Fto32U:
   493  		return rewriteValueARM_OpCvt32Fto32U_0(v)
   494  	case OpCvt32Fto64F:
   495  		return rewriteValueARM_OpCvt32Fto64F_0(v)
   496  	case OpCvt32Uto32F:
   497  		return rewriteValueARM_OpCvt32Uto32F_0(v)
   498  	case OpCvt32Uto64F:
   499  		return rewriteValueARM_OpCvt32Uto64F_0(v)
   500  	case OpCvt32to32F:
   501  		return rewriteValueARM_OpCvt32to32F_0(v)
   502  	case OpCvt32to64F:
   503  		return rewriteValueARM_OpCvt32to64F_0(v)
   504  	case OpCvt64Fto32:
   505  		return rewriteValueARM_OpCvt64Fto32_0(v)
   506  	case OpCvt64Fto32F:
   507  		return rewriteValueARM_OpCvt64Fto32F_0(v)
   508  	case OpCvt64Fto32U:
   509  		return rewriteValueARM_OpCvt64Fto32U_0(v)
   510  	case OpDiv16:
   511  		return rewriteValueARM_OpDiv16_0(v)
   512  	case OpDiv16u:
   513  		return rewriteValueARM_OpDiv16u_0(v)
   514  	case OpDiv32:
   515  		return rewriteValueARM_OpDiv32_0(v)
   516  	case OpDiv32F:
   517  		return rewriteValueARM_OpDiv32F_0(v)
   518  	case OpDiv32u:
   519  		return rewriteValueARM_OpDiv32u_0(v)
   520  	case OpDiv64F:
   521  		return rewriteValueARM_OpDiv64F_0(v)
   522  	case OpDiv8:
   523  		return rewriteValueARM_OpDiv8_0(v)
   524  	case OpDiv8u:
   525  		return rewriteValueARM_OpDiv8u_0(v)
   526  	case OpEq16:
   527  		return rewriteValueARM_OpEq16_0(v)
   528  	case OpEq32:
   529  		return rewriteValueARM_OpEq32_0(v)
   530  	case OpEq32F:
   531  		return rewriteValueARM_OpEq32F_0(v)
   532  	case OpEq64F:
   533  		return rewriteValueARM_OpEq64F_0(v)
   534  	case OpEq8:
   535  		return rewriteValueARM_OpEq8_0(v)
   536  	case OpEqB:
   537  		return rewriteValueARM_OpEqB_0(v)
   538  	case OpEqPtr:
   539  		return rewriteValueARM_OpEqPtr_0(v)
   540  	case OpGeq16:
   541  		return rewriteValueARM_OpGeq16_0(v)
   542  	case OpGeq16U:
   543  		return rewriteValueARM_OpGeq16U_0(v)
   544  	case OpGeq32:
   545  		return rewriteValueARM_OpGeq32_0(v)
   546  	case OpGeq32F:
   547  		return rewriteValueARM_OpGeq32F_0(v)
   548  	case OpGeq32U:
   549  		return rewriteValueARM_OpGeq32U_0(v)
   550  	case OpGeq64F:
   551  		return rewriteValueARM_OpGeq64F_0(v)
   552  	case OpGeq8:
   553  		return rewriteValueARM_OpGeq8_0(v)
   554  	case OpGeq8U:
   555  		return rewriteValueARM_OpGeq8U_0(v)
   556  	case OpGetCallerPC:
   557  		return rewriteValueARM_OpGetCallerPC_0(v)
   558  	case OpGetCallerSP:
   559  		return rewriteValueARM_OpGetCallerSP_0(v)
   560  	case OpGetClosurePtr:
   561  		return rewriteValueARM_OpGetClosurePtr_0(v)
   562  	case OpGreater16:
   563  		return rewriteValueARM_OpGreater16_0(v)
   564  	case OpGreater16U:
   565  		return rewriteValueARM_OpGreater16U_0(v)
   566  	case OpGreater32:
   567  		return rewriteValueARM_OpGreater32_0(v)
   568  	case OpGreater32F:
   569  		return rewriteValueARM_OpGreater32F_0(v)
   570  	case OpGreater32U:
   571  		return rewriteValueARM_OpGreater32U_0(v)
   572  	case OpGreater64F:
   573  		return rewriteValueARM_OpGreater64F_0(v)
   574  	case OpGreater8:
   575  		return rewriteValueARM_OpGreater8_0(v)
   576  	case OpGreater8U:
   577  		return rewriteValueARM_OpGreater8U_0(v)
   578  	case OpHmul32:
   579  		return rewriteValueARM_OpHmul32_0(v)
   580  	case OpHmul32u:
   581  		return rewriteValueARM_OpHmul32u_0(v)
   582  	case OpInterCall:
   583  		return rewriteValueARM_OpInterCall_0(v)
   584  	case OpIsInBounds:
   585  		return rewriteValueARM_OpIsInBounds_0(v)
   586  	case OpIsNonNil:
   587  		return rewriteValueARM_OpIsNonNil_0(v)
   588  	case OpIsSliceInBounds:
   589  		return rewriteValueARM_OpIsSliceInBounds_0(v)
   590  	case OpLeq16:
   591  		return rewriteValueARM_OpLeq16_0(v)
   592  	case OpLeq16U:
   593  		return rewriteValueARM_OpLeq16U_0(v)
   594  	case OpLeq32:
   595  		return rewriteValueARM_OpLeq32_0(v)
   596  	case OpLeq32F:
   597  		return rewriteValueARM_OpLeq32F_0(v)
   598  	case OpLeq32U:
   599  		return rewriteValueARM_OpLeq32U_0(v)
   600  	case OpLeq64F:
   601  		return rewriteValueARM_OpLeq64F_0(v)
   602  	case OpLeq8:
   603  		return rewriteValueARM_OpLeq8_0(v)
   604  	case OpLeq8U:
   605  		return rewriteValueARM_OpLeq8U_0(v)
   606  	case OpLess16:
   607  		return rewriteValueARM_OpLess16_0(v)
   608  	case OpLess16U:
   609  		return rewriteValueARM_OpLess16U_0(v)
   610  	case OpLess32:
   611  		return rewriteValueARM_OpLess32_0(v)
   612  	case OpLess32F:
   613  		return rewriteValueARM_OpLess32F_0(v)
   614  	case OpLess32U:
   615  		return rewriteValueARM_OpLess32U_0(v)
   616  	case OpLess64F:
   617  		return rewriteValueARM_OpLess64F_0(v)
   618  	case OpLess8:
   619  		return rewriteValueARM_OpLess8_0(v)
   620  	case OpLess8U:
   621  		return rewriteValueARM_OpLess8U_0(v)
   622  	case OpLoad:
   623  		return rewriteValueARM_OpLoad_0(v)
   624  	case OpLocalAddr:
   625  		return rewriteValueARM_OpLocalAddr_0(v)
   626  	case OpLsh16x16:
   627  		return rewriteValueARM_OpLsh16x16_0(v)
   628  	case OpLsh16x32:
   629  		return rewriteValueARM_OpLsh16x32_0(v)
   630  	case OpLsh16x64:
   631  		return rewriteValueARM_OpLsh16x64_0(v)
   632  	case OpLsh16x8:
   633  		return rewriteValueARM_OpLsh16x8_0(v)
   634  	case OpLsh32x16:
   635  		return rewriteValueARM_OpLsh32x16_0(v)
   636  	case OpLsh32x32:
   637  		return rewriteValueARM_OpLsh32x32_0(v)
   638  	case OpLsh32x64:
   639  		return rewriteValueARM_OpLsh32x64_0(v)
   640  	case OpLsh32x8:
   641  		return rewriteValueARM_OpLsh32x8_0(v)
   642  	case OpLsh8x16:
   643  		return rewriteValueARM_OpLsh8x16_0(v)
   644  	case OpLsh8x32:
   645  		return rewriteValueARM_OpLsh8x32_0(v)
   646  	case OpLsh8x64:
   647  		return rewriteValueARM_OpLsh8x64_0(v)
   648  	case OpLsh8x8:
   649  		return rewriteValueARM_OpLsh8x8_0(v)
   650  	case OpMod16:
   651  		return rewriteValueARM_OpMod16_0(v)
   652  	case OpMod16u:
   653  		return rewriteValueARM_OpMod16u_0(v)
   654  	case OpMod32:
   655  		return rewriteValueARM_OpMod32_0(v)
   656  	case OpMod32u:
   657  		return rewriteValueARM_OpMod32u_0(v)
   658  	case OpMod8:
   659  		return rewriteValueARM_OpMod8_0(v)
   660  	case OpMod8u:
   661  		return rewriteValueARM_OpMod8u_0(v)
   662  	case OpMove:
   663  		return rewriteValueARM_OpMove_0(v)
   664  	case OpMul16:
   665  		return rewriteValueARM_OpMul16_0(v)
   666  	case OpMul32:
   667  		return rewriteValueARM_OpMul32_0(v)
   668  	case OpMul32F:
   669  		return rewriteValueARM_OpMul32F_0(v)
   670  	case OpMul32uhilo:
   671  		return rewriteValueARM_OpMul32uhilo_0(v)
   672  	case OpMul64F:
   673  		return rewriteValueARM_OpMul64F_0(v)
   674  	case OpMul8:
   675  		return rewriteValueARM_OpMul8_0(v)
   676  	case OpNeg16:
   677  		return rewriteValueARM_OpNeg16_0(v)
   678  	case OpNeg32:
   679  		return rewriteValueARM_OpNeg32_0(v)
   680  	case OpNeg32F:
   681  		return rewriteValueARM_OpNeg32F_0(v)
   682  	case OpNeg64F:
   683  		return rewriteValueARM_OpNeg64F_0(v)
   684  	case OpNeg8:
   685  		return rewriteValueARM_OpNeg8_0(v)
   686  	case OpNeq16:
   687  		return rewriteValueARM_OpNeq16_0(v)
   688  	case OpNeq32:
   689  		return rewriteValueARM_OpNeq32_0(v)
   690  	case OpNeq32F:
   691  		return rewriteValueARM_OpNeq32F_0(v)
   692  	case OpNeq64F:
   693  		return rewriteValueARM_OpNeq64F_0(v)
   694  	case OpNeq8:
   695  		return rewriteValueARM_OpNeq8_0(v)
   696  	case OpNeqB:
   697  		return rewriteValueARM_OpNeqB_0(v)
   698  	case OpNeqPtr:
   699  		return rewriteValueARM_OpNeqPtr_0(v)
   700  	case OpNilCheck:
   701  		return rewriteValueARM_OpNilCheck_0(v)
   702  	case OpNot:
   703  		return rewriteValueARM_OpNot_0(v)
   704  	case OpOffPtr:
   705  		return rewriteValueARM_OpOffPtr_0(v)
   706  	case OpOr16:
   707  		return rewriteValueARM_OpOr16_0(v)
   708  	case OpOr32:
   709  		return rewriteValueARM_OpOr32_0(v)
   710  	case OpOr8:
   711  		return rewriteValueARM_OpOr8_0(v)
   712  	case OpOrB:
   713  		return rewriteValueARM_OpOrB_0(v)
   714  	case OpRound32F:
   715  		return rewriteValueARM_OpRound32F_0(v)
   716  	case OpRound64F:
   717  		return rewriteValueARM_OpRound64F_0(v)
   718  	case OpRsh16Ux16:
   719  		return rewriteValueARM_OpRsh16Ux16_0(v)
   720  	case OpRsh16Ux32:
   721  		return rewriteValueARM_OpRsh16Ux32_0(v)
   722  	case OpRsh16Ux64:
   723  		return rewriteValueARM_OpRsh16Ux64_0(v)
   724  	case OpRsh16Ux8:
   725  		return rewriteValueARM_OpRsh16Ux8_0(v)
   726  	case OpRsh16x16:
   727  		return rewriteValueARM_OpRsh16x16_0(v)
   728  	case OpRsh16x32:
   729  		return rewriteValueARM_OpRsh16x32_0(v)
   730  	case OpRsh16x64:
   731  		return rewriteValueARM_OpRsh16x64_0(v)
   732  	case OpRsh16x8:
   733  		return rewriteValueARM_OpRsh16x8_0(v)
   734  	case OpRsh32Ux16:
   735  		return rewriteValueARM_OpRsh32Ux16_0(v)
   736  	case OpRsh32Ux32:
   737  		return rewriteValueARM_OpRsh32Ux32_0(v)
   738  	case OpRsh32Ux64:
   739  		return rewriteValueARM_OpRsh32Ux64_0(v)
   740  	case OpRsh32Ux8:
   741  		return rewriteValueARM_OpRsh32Ux8_0(v)
   742  	case OpRsh32x16:
   743  		return rewriteValueARM_OpRsh32x16_0(v)
   744  	case OpRsh32x32:
   745  		return rewriteValueARM_OpRsh32x32_0(v)
   746  	case OpRsh32x64:
   747  		return rewriteValueARM_OpRsh32x64_0(v)
   748  	case OpRsh32x8:
   749  		return rewriteValueARM_OpRsh32x8_0(v)
   750  	case OpRsh8Ux16:
   751  		return rewriteValueARM_OpRsh8Ux16_0(v)
   752  	case OpRsh8Ux32:
   753  		return rewriteValueARM_OpRsh8Ux32_0(v)
   754  	case OpRsh8Ux64:
   755  		return rewriteValueARM_OpRsh8Ux64_0(v)
   756  	case OpRsh8Ux8:
   757  		return rewriteValueARM_OpRsh8Ux8_0(v)
   758  	case OpRsh8x16:
   759  		return rewriteValueARM_OpRsh8x16_0(v)
   760  	case OpRsh8x32:
   761  		return rewriteValueARM_OpRsh8x32_0(v)
   762  	case OpRsh8x64:
   763  		return rewriteValueARM_OpRsh8x64_0(v)
   764  	case OpRsh8x8:
   765  		return rewriteValueARM_OpRsh8x8_0(v)
   766  	case OpSelect0:
   767  		return rewriteValueARM_OpSelect0_0(v)
   768  	case OpSelect1:
   769  		return rewriteValueARM_OpSelect1_0(v)
   770  	case OpSignExt16to32:
   771  		return rewriteValueARM_OpSignExt16to32_0(v)
   772  	case OpSignExt8to16:
   773  		return rewriteValueARM_OpSignExt8to16_0(v)
   774  	case OpSignExt8to32:
   775  		return rewriteValueARM_OpSignExt8to32_0(v)
   776  	case OpSignmask:
   777  		return rewriteValueARM_OpSignmask_0(v)
   778  	case OpSlicemask:
   779  		return rewriteValueARM_OpSlicemask_0(v)
   780  	case OpSqrt:
   781  		return rewriteValueARM_OpSqrt_0(v)
   782  	case OpStaticCall:
   783  		return rewriteValueARM_OpStaticCall_0(v)
   784  	case OpStore:
   785  		return rewriteValueARM_OpStore_0(v)
   786  	case OpSub16:
   787  		return rewriteValueARM_OpSub16_0(v)
   788  	case OpSub32:
   789  		return rewriteValueARM_OpSub32_0(v)
   790  	case OpSub32F:
   791  		return rewriteValueARM_OpSub32F_0(v)
   792  	case OpSub32carry:
   793  		return rewriteValueARM_OpSub32carry_0(v)
   794  	case OpSub32withcarry:
   795  		return rewriteValueARM_OpSub32withcarry_0(v)
   796  	case OpSub64F:
   797  		return rewriteValueARM_OpSub64F_0(v)
   798  	case OpSub8:
   799  		return rewriteValueARM_OpSub8_0(v)
   800  	case OpSubPtr:
   801  		return rewriteValueARM_OpSubPtr_0(v)
   802  	case OpTrunc16to8:
   803  		return rewriteValueARM_OpTrunc16to8_0(v)
   804  	case OpTrunc32to16:
   805  		return rewriteValueARM_OpTrunc32to16_0(v)
   806  	case OpTrunc32to8:
   807  		return rewriteValueARM_OpTrunc32to8_0(v)
   808  	case OpWB:
   809  		return rewriteValueARM_OpWB_0(v)
   810  	case OpXor16:
   811  		return rewriteValueARM_OpXor16_0(v)
   812  	case OpXor32:
   813  		return rewriteValueARM_OpXor32_0(v)
   814  	case OpXor8:
   815  		return rewriteValueARM_OpXor8_0(v)
   816  	case OpZero:
   817  		return rewriteValueARM_OpZero_0(v)
   818  	case OpZeroExt16to32:
   819  		return rewriteValueARM_OpZeroExt16to32_0(v)
   820  	case OpZeroExt8to16:
   821  		return rewriteValueARM_OpZeroExt8to16_0(v)
   822  	case OpZeroExt8to32:
   823  		return rewriteValueARM_OpZeroExt8to32_0(v)
   824  	case OpZeromask:
   825  		return rewriteValueARM_OpZeromask_0(v)
   826  	}
   827  	return false
   828  }
   829  func rewriteValueARM_OpARMADC_0(v *Value) bool {
   830  	// match: (ADC (MOVWconst [c]) x flags)
   831  	// cond:
   832  	// result: (ADCconst [c] x flags)
   833  	for {
   834  		_ = v.Args[2]
   835  		v_0 := v.Args[0]
   836  		if v_0.Op != OpARMMOVWconst {
   837  			break
   838  		}
   839  		c := v_0.AuxInt
   840  		x := v.Args[1]
   841  		flags := v.Args[2]
   842  		v.reset(OpARMADCconst)
   843  		v.AuxInt = c
   844  		v.AddArg(x)
   845  		v.AddArg(flags)
   846  		return true
   847  	}
   848  	// match: (ADC x (MOVWconst [c]) flags)
   849  	// cond:
   850  	// result: (ADCconst [c] x flags)
   851  	for {
   852  		_ = v.Args[2]
   853  		x := v.Args[0]
   854  		v_1 := v.Args[1]
   855  		if v_1.Op != OpARMMOVWconst {
   856  			break
   857  		}
   858  		c := v_1.AuxInt
   859  		flags := v.Args[2]
   860  		v.reset(OpARMADCconst)
   861  		v.AuxInt = c
   862  		v.AddArg(x)
   863  		v.AddArg(flags)
   864  		return true
   865  	}
   866  	// match: (ADC x (MOVWconst [c]) flags)
   867  	// cond:
   868  	// result: (ADCconst [c] x flags)
   869  	for {
   870  		_ = v.Args[2]
   871  		x := v.Args[0]
   872  		v_1 := v.Args[1]
   873  		if v_1.Op != OpARMMOVWconst {
   874  			break
   875  		}
   876  		c := v_1.AuxInt
   877  		flags := v.Args[2]
   878  		v.reset(OpARMADCconst)
   879  		v.AuxInt = c
   880  		v.AddArg(x)
   881  		v.AddArg(flags)
   882  		return true
   883  	}
   884  	// match: (ADC (MOVWconst [c]) x flags)
   885  	// cond:
   886  	// result: (ADCconst [c] x flags)
   887  	for {
   888  		_ = v.Args[2]
   889  		v_0 := v.Args[0]
   890  		if v_0.Op != OpARMMOVWconst {
   891  			break
   892  		}
   893  		c := v_0.AuxInt
   894  		x := v.Args[1]
   895  		flags := v.Args[2]
   896  		v.reset(OpARMADCconst)
   897  		v.AuxInt = c
   898  		v.AddArg(x)
   899  		v.AddArg(flags)
   900  		return true
   901  	}
   902  	// match: (ADC x (SLLconst [c] y) flags)
   903  	// cond:
   904  	// result: (ADCshiftLL x y [c] flags)
   905  	for {
   906  		_ = v.Args[2]
   907  		x := v.Args[0]
   908  		v_1 := v.Args[1]
   909  		if v_1.Op != OpARMSLLconst {
   910  			break
   911  		}
   912  		c := v_1.AuxInt
   913  		y := v_1.Args[0]
   914  		flags := v.Args[2]
   915  		v.reset(OpARMADCshiftLL)
   916  		v.AuxInt = c
   917  		v.AddArg(x)
   918  		v.AddArg(y)
   919  		v.AddArg(flags)
   920  		return true
   921  	}
   922  	// match: (ADC (SLLconst [c] y) x flags)
   923  	// cond:
   924  	// result: (ADCshiftLL x y [c] flags)
   925  	for {
   926  		_ = v.Args[2]
   927  		v_0 := v.Args[0]
   928  		if v_0.Op != OpARMSLLconst {
   929  			break
   930  		}
   931  		c := v_0.AuxInt
   932  		y := v_0.Args[0]
   933  		x := v.Args[1]
   934  		flags := v.Args[2]
   935  		v.reset(OpARMADCshiftLL)
   936  		v.AuxInt = c
   937  		v.AddArg(x)
   938  		v.AddArg(y)
   939  		v.AddArg(flags)
   940  		return true
   941  	}
   942  	// match: (ADC (SLLconst [c] y) x flags)
   943  	// cond:
   944  	// result: (ADCshiftLL x y [c] flags)
   945  	for {
   946  		_ = v.Args[2]
   947  		v_0 := v.Args[0]
   948  		if v_0.Op != OpARMSLLconst {
   949  			break
   950  		}
   951  		c := v_0.AuxInt
   952  		y := v_0.Args[0]
   953  		x := v.Args[1]
   954  		flags := v.Args[2]
   955  		v.reset(OpARMADCshiftLL)
   956  		v.AuxInt = c
   957  		v.AddArg(x)
   958  		v.AddArg(y)
   959  		v.AddArg(flags)
   960  		return true
   961  	}
   962  	// match: (ADC x (SLLconst [c] y) flags)
   963  	// cond:
   964  	// result: (ADCshiftLL x y [c] flags)
   965  	for {
   966  		_ = v.Args[2]
   967  		x := v.Args[0]
   968  		v_1 := v.Args[1]
   969  		if v_1.Op != OpARMSLLconst {
   970  			break
   971  		}
   972  		c := v_1.AuxInt
   973  		y := v_1.Args[0]
   974  		flags := v.Args[2]
   975  		v.reset(OpARMADCshiftLL)
   976  		v.AuxInt = c
   977  		v.AddArg(x)
   978  		v.AddArg(y)
   979  		v.AddArg(flags)
   980  		return true
   981  	}
   982  	// match: (ADC x (SRLconst [c] y) flags)
   983  	// cond:
   984  	// result: (ADCshiftRL x y [c] flags)
   985  	for {
   986  		_ = v.Args[2]
   987  		x := v.Args[0]
   988  		v_1 := v.Args[1]
   989  		if v_1.Op != OpARMSRLconst {
   990  			break
   991  		}
   992  		c := v_1.AuxInt
   993  		y := v_1.Args[0]
   994  		flags := v.Args[2]
   995  		v.reset(OpARMADCshiftRL)
   996  		v.AuxInt = c
   997  		v.AddArg(x)
   998  		v.AddArg(y)
   999  		v.AddArg(flags)
  1000  		return true
  1001  	}
  1002  	// match: (ADC (SRLconst [c] y) x flags)
  1003  	// cond:
  1004  	// result: (ADCshiftRL x y [c] flags)
  1005  	for {
  1006  		_ = v.Args[2]
  1007  		v_0 := v.Args[0]
  1008  		if v_0.Op != OpARMSRLconst {
  1009  			break
  1010  		}
  1011  		c := v_0.AuxInt
  1012  		y := v_0.Args[0]
  1013  		x := v.Args[1]
  1014  		flags := v.Args[2]
  1015  		v.reset(OpARMADCshiftRL)
  1016  		v.AuxInt = c
  1017  		v.AddArg(x)
  1018  		v.AddArg(y)
  1019  		v.AddArg(flags)
  1020  		return true
  1021  	}
  1022  	return false
  1023  }
  1024  func rewriteValueARM_OpARMADC_10(v *Value) bool {
  1025  	// match: (ADC (SRLconst [c] y) x flags)
  1026  	// cond:
  1027  	// result: (ADCshiftRL x y [c] flags)
  1028  	for {
  1029  		_ = v.Args[2]
  1030  		v_0 := v.Args[0]
  1031  		if v_0.Op != OpARMSRLconst {
  1032  			break
  1033  		}
  1034  		c := v_0.AuxInt
  1035  		y := v_0.Args[0]
  1036  		x := v.Args[1]
  1037  		flags := v.Args[2]
  1038  		v.reset(OpARMADCshiftRL)
  1039  		v.AuxInt = c
  1040  		v.AddArg(x)
  1041  		v.AddArg(y)
  1042  		v.AddArg(flags)
  1043  		return true
  1044  	}
  1045  	// match: (ADC x (SRLconst [c] y) flags)
  1046  	// cond:
  1047  	// result: (ADCshiftRL x y [c] flags)
  1048  	for {
  1049  		_ = v.Args[2]
  1050  		x := v.Args[0]
  1051  		v_1 := v.Args[1]
  1052  		if v_1.Op != OpARMSRLconst {
  1053  			break
  1054  		}
  1055  		c := v_1.AuxInt
  1056  		y := v_1.Args[0]
  1057  		flags := v.Args[2]
  1058  		v.reset(OpARMADCshiftRL)
  1059  		v.AuxInt = c
  1060  		v.AddArg(x)
  1061  		v.AddArg(y)
  1062  		v.AddArg(flags)
  1063  		return true
  1064  	}
  1065  	// match: (ADC x (SRAconst [c] y) flags)
  1066  	// cond:
  1067  	// result: (ADCshiftRA x y [c] flags)
  1068  	for {
  1069  		_ = v.Args[2]
  1070  		x := v.Args[0]
  1071  		v_1 := v.Args[1]
  1072  		if v_1.Op != OpARMSRAconst {
  1073  			break
  1074  		}
  1075  		c := v_1.AuxInt
  1076  		y := v_1.Args[0]
  1077  		flags := v.Args[2]
  1078  		v.reset(OpARMADCshiftRA)
  1079  		v.AuxInt = c
  1080  		v.AddArg(x)
  1081  		v.AddArg(y)
  1082  		v.AddArg(flags)
  1083  		return true
  1084  	}
  1085  	// match: (ADC (SRAconst [c] y) x flags)
  1086  	// cond:
  1087  	// result: (ADCshiftRA x y [c] flags)
  1088  	for {
  1089  		_ = v.Args[2]
  1090  		v_0 := v.Args[0]
  1091  		if v_0.Op != OpARMSRAconst {
  1092  			break
  1093  		}
  1094  		c := v_0.AuxInt
  1095  		y := v_0.Args[0]
  1096  		x := v.Args[1]
  1097  		flags := v.Args[2]
  1098  		v.reset(OpARMADCshiftRA)
  1099  		v.AuxInt = c
  1100  		v.AddArg(x)
  1101  		v.AddArg(y)
  1102  		v.AddArg(flags)
  1103  		return true
  1104  	}
  1105  	// match: (ADC (SRAconst [c] y) x flags)
  1106  	// cond:
  1107  	// result: (ADCshiftRA x y [c] flags)
  1108  	for {
  1109  		_ = v.Args[2]
  1110  		v_0 := v.Args[0]
  1111  		if v_0.Op != OpARMSRAconst {
  1112  			break
  1113  		}
  1114  		c := v_0.AuxInt
  1115  		y := v_0.Args[0]
  1116  		x := v.Args[1]
  1117  		flags := v.Args[2]
  1118  		v.reset(OpARMADCshiftRA)
  1119  		v.AuxInt = c
  1120  		v.AddArg(x)
  1121  		v.AddArg(y)
  1122  		v.AddArg(flags)
  1123  		return true
  1124  	}
  1125  	// match: (ADC x (SRAconst [c] y) flags)
  1126  	// cond:
  1127  	// result: (ADCshiftRA x y [c] flags)
  1128  	for {
  1129  		_ = v.Args[2]
  1130  		x := v.Args[0]
  1131  		v_1 := v.Args[1]
  1132  		if v_1.Op != OpARMSRAconst {
  1133  			break
  1134  		}
  1135  		c := v_1.AuxInt
  1136  		y := v_1.Args[0]
  1137  		flags := v.Args[2]
  1138  		v.reset(OpARMADCshiftRA)
  1139  		v.AuxInt = c
  1140  		v.AddArg(x)
  1141  		v.AddArg(y)
  1142  		v.AddArg(flags)
  1143  		return true
  1144  	}
  1145  	// match: (ADC x (SLL y z) flags)
  1146  	// cond:
  1147  	// result: (ADCshiftLLreg x y z flags)
  1148  	for {
  1149  		_ = v.Args[2]
  1150  		x := v.Args[0]
  1151  		v_1 := v.Args[1]
  1152  		if v_1.Op != OpARMSLL {
  1153  			break
  1154  		}
  1155  		_ = v_1.Args[1]
  1156  		y := v_1.Args[0]
  1157  		z := v_1.Args[1]
  1158  		flags := v.Args[2]
  1159  		v.reset(OpARMADCshiftLLreg)
  1160  		v.AddArg(x)
  1161  		v.AddArg(y)
  1162  		v.AddArg(z)
  1163  		v.AddArg(flags)
  1164  		return true
  1165  	}
  1166  	// match: (ADC (SLL y z) x flags)
  1167  	// cond:
  1168  	// result: (ADCshiftLLreg x y z flags)
  1169  	for {
  1170  		_ = v.Args[2]
  1171  		v_0 := v.Args[0]
  1172  		if v_0.Op != OpARMSLL {
  1173  			break
  1174  		}
  1175  		_ = v_0.Args[1]
  1176  		y := v_0.Args[0]
  1177  		z := v_0.Args[1]
  1178  		x := v.Args[1]
  1179  		flags := v.Args[2]
  1180  		v.reset(OpARMADCshiftLLreg)
  1181  		v.AddArg(x)
  1182  		v.AddArg(y)
  1183  		v.AddArg(z)
  1184  		v.AddArg(flags)
  1185  		return true
  1186  	}
  1187  	// match: (ADC (SLL y z) x flags)
  1188  	// cond:
  1189  	// result: (ADCshiftLLreg x y z flags)
  1190  	for {
  1191  		_ = v.Args[2]
  1192  		v_0 := v.Args[0]
  1193  		if v_0.Op != OpARMSLL {
  1194  			break
  1195  		}
  1196  		_ = v_0.Args[1]
  1197  		y := v_0.Args[0]
  1198  		z := v_0.Args[1]
  1199  		x := v.Args[1]
  1200  		flags := v.Args[2]
  1201  		v.reset(OpARMADCshiftLLreg)
  1202  		v.AddArg(x)
  1203  		v.AddArg(y)
  1204  		v.AddArg(z)
  1205  		v.AddArg(flags)
  1206  		return true
  1207  	}
  1208  	// match: (ADC x (SLL y z) flags)
  1209  	// cond:
  1210  	// result: (ADCshiftLLreg x y z flags)
  1211  	for {
  1212  		_ = v.Args[2]
  1213  		x := v.Args[0]
  1214  		v_1 := v.Args[1]
  1215  		if v_1.Op != OpARMSLL {
  1216  			break
  1217  		}
  1218  		_ = v_1.Args[1]
  1219  		y := v_1.Args[0]
  1220  		z := v_1.Args[1]
  1221  		flags := v.Args[2]
  1222  		v.reset(OpARMADCshiftLLreg)
  1223  		v.AddArg(x)
  1224  		v.AddArg(y)
  1225  		v.AddArg(z)
  1226  		v.AddArg(flags)
  1227  		return true
  1228  	}
  1229  	return false
  1230  }
  1231  func rewriteValueARM_OpARMADC_20(v *Value) bool {
  1232  	// match: (ADC x (SRL y z) flags)
  1233  	// cond:
  1234  	// result: (ADCshiftRLreg x y z flags)
  1235  	for {
  1236  		_ = v.Args[2]
  1237  		x := v.Args[0]
  1238  		v_1 := v.Args[1]
  1239  		if v_1.Op != OpARMSRL {
  1240  			break
  1241  		}
  1242  		_ = v_1.Args[1]
  1243  		y := v_1.Args[0]
  1244  		z := v_1.Args[1]
  1245  		flags := v.Args[2]
  1246  		v.reset(OpARMADCshiftRLreg)
  1247  		v.AddArg(x)
  1248  		v.AddArg(y)
  1249  		v.AddArg(z)
  1250  		v.AddArg(flags)
  1251  		return true
  1252  	}
  1253  	// match: (ADC (SRL y z) x flags)
  1254  	// cond:
  1255  	// result: (ADCshiftRLreg x y z flags)
  1256  	for {
  1257  		_ = v.Args[2]
  1258  		v_0 := v.Args[0]
  1259  		if v_0.Op != OpARMSRL {
  1260  			break
  1261  		}
  1262  		_ = v_0.Args[1]
  1263  		y := v_0.Args[0]
  1264  		z := v_0.Args[1]
  1265  		x := v.Args[1]
  1266  		flags := v.Args[2]
  1267  		v.reset(OpARMADCshiftRLreg)
  1268  		v.AddArg(x)
  1269  		v.AddArg(y)
  1270  		v.AddArg(z)
  1271  		v.AddArg(flags)
  1272  		return true
  1273  	}
  1274  	// match: (ADC (SRL y z) x flags)
  1275  	// cond:
  1276  	// result: (ADCshiftRLreg x y z flags)
  1277  	for {
  1278  		_ = v.Args[2]
  1279  		v_0 := v.Args[0]
  1280  		if v_0.Op != OpARMSRL {
  1281  			break
  1282  		}
  1283  		_ = v_0.Args[1]
  1284  		y := v_0.Args[0]
  1285  		z := v_0.Args[1]
  1286  		x := v.Args[1]
  1287  		flags := v.Args[2]
  1288  		v.reset(OpARMADCshiftRLreg)
  1289  		v.AddArg(x)
  1290  		v.AddArg(y)
  1291  		v.AddArg(z)
  1292  		v.AddArg(flags)
  1293  		return true
  1294  	}
  1295  	// match: (ADC x (SRL y z) flags)
  1296  	// cond:
  1297  	// result: (ADCshiftRLreg x y z flags)
  1298  	for {
  1299  		_ = v.Args[2]
  1300  		x := v.Args[0]
  1301  		v_1 := v.Args[1]
  1302  		if v_1.Op != OpARMSRL {
  1303  			break
  1304  		}
  1305  		_ = v_1.Args[1]
  1306  		y := v_1.Args[0]
  1307  		z := v_1.Args[1]
  1308  		flags := v.Args[2]
  1309  		v.reset(OpARMADCshiftRLreg)
  1310  		v.AddArg(x)
  1311  		v.AddArg(y)
  1312  		v.AddArg(z)
  1313  		v.AddArg(flags)
  1314  		return true
  1315  	}
  1316  	// match: (ADC x (SRA y z) flags)
  1317  	// cond:
  1318  	// result: (ADCshiftRAreg x y z flags)
  1319  	for {
  1320  		_ = v.Args[2]
  1321  		x := v.Args[0]
  1322  		v_1 := v.Args[1]
  1323  		if v_1.Op != OpARMSRA {
  1324  			break
  1325  		}
  1326  		_ = v_1.Args[1]
  1327  		y := v_1.Args[0]
  1328  		z := v_1.Args[1]
  1329  		flags := v.Args[2]
  1330  		v.reset(OpARMADCshiftRAreg)
  1331  		v.AddArg(x)
  1332  		v.AddArg(y)
  1333  		v.AddArg(z)
  1334  		v.AddArg(flags)
  1335  		return true
  1336  	}
  1337  	// match: (ADC (SRA y z) x flags)
  1338  	// cond:
  1339  	// result: (ADCshiftRAreg x y z flags)
  1340  	for {
  1341  		_ = v.Args[2]
  1342  		v_0 := v.Args[0]
  1343  		if v_0.Op != OpARMSRA {
  1344  			break
  1345  		}
  1346  		_ = v_0.Args[1]
  1347  		y := v_0.Args[0]
  1348  		z := v_0.Args[1]
  1349  		x := v.Args[1]
  1350  		flags := v.Args[2]
  1351  		v.reset(OpARMADCshiftRAreg)
  1352  		v.AddArg(x)
  1353  		v.AddArg(y)
  1354  		v.AddArg(z)
  1355  		v.AddArg(flags)
  1356  		return true
  1357  	}
  1358  	// match: (ADC (SRA y z) x flags)
  1359  	// cond:
  1360  	// result: (ADCshiftRAreg x y z flags)
  1361  	for {
  1362  		_ = v.Args[2]
  1363  		v_0 := v.Args[0]
  1364  		if v_0.Op != OpARMSRA {
  1365  			break
  1366  		}
  1367  		_ = v_0.Args[1]
  1368  		y := v_0.Args[0]
  1369  		z := v_0.Args[1]
  1370  		x := v.Args[1]
  1371  		flags := v.Args[2]
  1372  		v.reset(OpARMADCshiftRAreg)
  1373  		v.AddArg(x)
  1374  		v.AddArg(y)
  1375  		v.AddArg(z)
  1376  		v.AddArg(flags)
  1377  		return true
  1378  	}
  1379  	// match: (ADC x (SRA y z) flags)
  1380  	// cond:
  1381  	// result: (ADCshiftRAreg x y z flags)
  1382  	for {
  1383  		_ = v.Args[2]
  1384  		x := v.Args[0]
  1385  		v_1 := v.Args[1]
  1386  		if v_1.Op != OpARMSRA {
  1387  			break
  1388  		}
  1389  		_ = v_1.Args[1]
  1390  		y := v_1.Args[0]
  1391  		z := v_1.Args[1]
  1392  		flags := v.Args[2]
  1393  		v.reset(OpARMADCshiftRAreg)
  1394  		v.AddArg(x)
  1395  		v.AddArg(y)
  1396  		v.AddArg(z)
  1397  		v.AddArg(flags)
  1398  		return true
  1399  	}
  1400  	return false
  1401  }
  1402  func rewriteValueARM_OpARMADCconst_0(v *Value) bool {
  1403  	// match: (ADCconst [c] (ADDconst [d] x) flags)
  1404  	// cond:
  1405  	// result: (ADCconst [int64(int32(c+d))] x flags)
  1406  	for {
  1407  		c := v.AuxInt
  1408  		_ = v.Args[1]
  1409  		v_0 := v.Args[0]
  1410  		if v_0.Op != OpARMADDconst {
  1411  			break
  1412  		}
  1413  		d := v_0.AuxInt
  1414  		x := v_0.Args[0]
  1415  		flags := v.Args[1]
  1416  		v.reset(OpARMADCconst)
  1417  		v.AuxInt = int64(int32(c + d))
  1418  		v.AddArg(x)
  1419  		v.AddArg(flags)
  1420  		return true
  1421  	}
  1422  	// match: (ADCconst [c] (SUBconst [d] x) flags)
  1423  	// cond:
  1424  	// result: (ADCconst [int64(int32(c-d))] x flags)
  1425  	for {
  1426  		c := v.AuxInt
  1427  		_ = v.Args[1]
  1428  		v_0 := v.Args[0]
  1429  		if v_0.Op != OpARMSUBconst {
  1430  			break
  1431  		}
  1432  		d := v_0.AuxInt
  1433  		x := v_0.Args[0]
  1434  		flags := v.Args[1]
  1435  		v.reset(OpARMADCconst)
  1436  		v.AuxInt = int64(int32(c - d))
  1437  		v.AddArg(x)
  1438  		v.AddArg(flags)
  1439  		return true
  1440  	}
  1441  	return false
  1442  }
  1443  func rewriteValueARM_OpARMADCshiftLL_0(v *Value) bool {
  1444  	b := v.Block
  1445  	_ = b
  1446  	// match: (ADCshiftLL (MOVWconst [c]) x [d] flags)
  1447  	// cond:
  1448  	// result: (ADCconst [c] (SLLconst <x.Type> x [d]) flags)
  1449  	for {
  1450  		d := v.AuxInt
  1451  		_ = v.Args[2]
  1452  		v_0 := v.Args[0]
  1453  		if v_0.Op != OpARMMOVWconst {
  1454  			break
  1455  		}
  1456  		c := v_0.AuxInt
  1457  		x := v.Args[1]
  1458  		flags := v.Args[2]
  1459  		v.reset(OpARMADCconst)
  1460  		v.AuxInt = c
  1461  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  1462  		v0.AuxInt = d
  1463  		v0.AddArg(x)
  1464  		v.AddArg(v0)
  1465  		v.AddArg(flags)
  1466  		return true
  1467  	}
  1468  	// match: (ADCshiftLL x (MOVWconst [c]) [d] flags)
  1469  	// cond:
  1470  	// result: (ADCconst x [int64(int32(uint32(c)<<uint64(d)))] flags)
  1471  	for {
  1472  		d := v.AuxInt
  1473  		_ = v.Args[2]
  1474  		x := v.Args[0]
  1475  		v_1 := v.Args[1]
  1476  		if v_1.Op != OpARMMOVWconst {
  1477  			break
  1478  		}
  1479  		c := v_1.AuxInt
  1480  		flags := v.Args[2]
  1481  		v.reset(OpARMADCconst)
  1482  		v.AuxInt = int64(int32(uint32(c) << uint64(d)))
  1483  		v.AddArg(x)
  1484  		v.AddArg(flags)
  1485  		return true
  1486  	}
  1487  	return false
  1488  }
  1489  func rewriteValueARM_OpARMADCshiftLLreg_0(v *Value) bool {
  1490  	b := v.Block
  1491  	_ = b
  1492  	// match: (ADCshiftLLreg (MOVWconst [c]) x y flags)
  1493  	// cond:
  1494  	// result: (ADCconst [c] (SLL <x.Type> x y) flags)
  1495  	for {
  1496  		_ = v.Args[3]
  1497  		v_0 := v.Args[0]
  1498  		if v_0.Op != OpARMMOVWconst {
  1499  			break
  1500  		}
  1501  		c := v_0.AuxInt
  1502  		x := v.Args[1]
  1503  		y := v.Args[2]
  1504  		flags := v.Args[3]
  1505  		v.reset(OpARMADCconst)
  1506  		v.AuxInt = c
  1507  		v0 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
  1508  		v0.AddArg(x)
  1509  		v0.AddArg(y)
  1510  		v.AddArg(v0)
  1511  		v.AddArg(flags)
  1512  		return true
  1513  	}
  1514  	// match: (ADCshiftLLreg x y (MOVWconst [c]) flags)
  1515  	// cond:
  1516  	// result: (ADCshiftLL x y [c] flags)
  1517  	for {
  1518  		_ = v.Args[3]
  1519  		x := v.Args[0]
  1520  		y := v.Args[1]
  1521  		v_2 := v.Args[2]
  1522  		if v_2.Op != OpARMMOVWconst {
  1523  			break
  1524  		}
  1525  		c := v_2.AuxInt
  1526  		flags := v.Args[3]
  1527  		v.reset(OpARMADCshiftLL)
  1528  		v.AuxInt = c
  1529  		v.AddArg(x)
  1530  		v.AddArg(y)
  1531  		v.AddArg(flags)
  1532  		return true
  1533  	}
  1534  	return false
  1535  }
  1536  func rewriteValueARM_OpARMADCshiftRA_0(v *Value) bool {
  1537  	b := v.Block
  1538  	_ = b
  1539  	// match: (ADCshiftRA (MOVWconst [c]) x [d] flags)
  1540  	// cond:
  1541  	// result: (ADCconst [c] (SRAconst <x.Type> x [d]) flags)
  1542  	for {
  1543  		d := v.AuxInt
  1544  		_ = v.Args[2]
  1545  		v_0 := v.Args[0]
  1546  		if v_0.Op != OpARMMOVWconst {
  1547  			break
  1548  		}
  1549  		c := v_0.AuxInt
  1550  		x := v.Args[1]
  1551  		flags := v.Args[2]
  1552  		v.reset(OpARMADCconst)
  1553  		v.AuxInt = c
  1554  		v0 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
  1555  		v0.AuxInt = d
  1556  		v0.AddArg(x)
  1557  		v.AddArg(v0)
  1558  		v.AddArg(flags)
  1559  		return true
  1560  	}
  1561  	// match: (ADCshiftRA x (MOVWconst [c]) [d] flags)
  1562  	// cond:
  1563  	// result: (ADCconst x [int64(int32(c)>>uint64(d))] flags)
  1564  	for {
  1565  		d := v.AuxInt
  1566  		_ = v.Args[2]
  1567  		x := v.Args[0]
  1568  		v_1 := v.Args[1]
  1569  		if v_1.Op != OpARMMOVWconst {
  1570  			break
  1571  		}
  1572  		c := v_1.AuxInt
  1573  		flags := v.Args[2]
  1574  		v.reset(OpARMADCconst)
  1575  		v.AuxInt = int64(int32(c) >> uint64(d))
  1576  		v.AddArg(x)
  1577  		v.AddArg(flags)
  1578  		return true
  1579  	}
  1580  	return false
  1581  }
  1582  func rewriteValueARM_OpARMADCshiftRAreg_0(v *Value) bool {
  1583  	b := v.Block
  1584  	_ = b
  1585  	// match: (ADCshiftRAreg (MOVWconst [c]) x y flags)
  1586  	// cond:
  1587  	// result: (ADCconst [c] (SRA <x.Type> x y) flags)
  1588  	for {
  1589  		_ = v.Args[3]
  1590  		v_0 := v.Args[0]
  1591  		if v_0.Op != OpARMMOVWconst {
  1592  			break
  1593  		}
  1594  		c := v_0.AuxInt
  1595  		x := v.Args[1]
  1596  		y := v.Args[2]
  1597  		flags := v.Args[3]
  1598  		v.reset(OpARMADCconst)
  1599  		v.AuxInt = c
  1600  		v0 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
  1601  		v0.AddArg(x)
  1602  		v0.AddArg(y)
  1603  		v.AddArg(v0)
  1604  		v.AddArg(flags)
  1605  		return true
  1606  	}
  1607  	// match: (ADCshiftRAreg x y (MOVWconst [c]) flags)
  1608  	// cond:
  1609  	// result: (ADCshiftRA x y [c] flags)
  1610  	for {
  1611  		_ = v.Args[3]
  1612  		x := v.Args[0]
  1613  		y := v.Args[1]
  1614  		v_2 := v.Args[2]
  1615  		if v_2.Op != OpARMMOVWconst {
  1616  			break
  1617  		}
  1618  		c := v_2.AuxInt
  1619  		flags := v.Args[3]
  1620  		v.reset(OpARMADCshiftRA)
  1621  		v.AuxInt = c
  1622  		v.AddArg(x)
  1623  		v.AddArg(y)
  1624  		v.AddArg(flags)
  1625  		return true
  1626  	}
  1627  	return false
  1628  }
  1629  func rewriteValueARM_OpARMADCshiftRL_0(v *Value) bool {
  1630  	b := v.Block
  1631  	_ = b
  1632  	// match: (ADCshiftRL (MOVWconst [c]) x [d] flags)
  1633  	// cond:
  1634  	// result: (ADCconst [c] (SRLconst <x.Type> x [d]) flags)
  1635  	for {
  1636  		d := v.AuxInt
  1637  		_ = v.Args[2]
  1638  		v_0 := v.Args[0]
  1639  		if v_0.Op != OpARMMOVWconst {
  1640  			break
  1641  		}
  1642  		c := v_0.AuxInt
  1643  		x := v.Args[1]
  1644  		flags := v.Args[2]
  1645  		v.reset(OpARMADCconst)
  1646  		v.AuxInt = c
  1647  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
  1648  		v0.AuxInt = d
  1649  		v0.AddArg(x)
  1650  		v.AddArg(v0)
  1651  		v.AddArg(flags)
  1652  		return true
  1653  	}
  1654  	// match: (ADCshiftRL x (MOVWconst [c]) [d] flags)
  1655  	// cond:
  1656  	// result: (ADCconst x [int64(int32(uint32(c)>>uint64(d)))] flags)
  1657  	for {
  1658  		d := v.AuxInt
  1659  		_ = v.Args[2]
  1660  		x := v.Args[0]
  1661  		v_1 := v.Args[1]
  1662  		if v_1.Op != OpARMMOVWconst {
  1663  			break
  1664  		}
  1665  		c := v_1.AuxInt
  1666  		flags := v.Args[2]
  1667  		v.reset(OpARMADCconst)
  1668  		v.AuxInt = int64(int32(uint32(c) >> uint64(d)))
  1669  		v.AddArg(x)
  1670  		v.AddArg(flags)
  1671  		return true
  1672  	}
  1673  	return false
  1674  }
  1675  func rewriteValueARM_OpARMADCshiftRLreg_0(v *Value) bool {
  1676  	b := v.Block
  1677  	_ = b
  1678  	// match: (ADCshiftRLreg (MOVWconst [c]) x y flags)
  1679  	// cond:
  1680  	// result: (ADCconst [c] (SRL <x.Type> x y) flags)
  1681  	for {
  1682  		_ = v.Args[3]
  1683  		v_0 := v.Args[0]
  1684  		if v_0.Op != OpARMMOVWconst {
  1685  			break
  1686  		}
  1687  		c := v_0.AuxInt
  1688  		x := v.Args[1]
  1689  		y := v.Args[2]
  1690  		flags := v.Args[3]
  1691  		v.reset(OpARMADCconst)
  1692  		v.AuxInt = c
  1693  		v0 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
  1694  		v0.AddArg(x)
  1695  		v0.AddArg(y)
  1696  		v.AddArg(v0)
  1697  		v.AddArg(flags)
  1698  		return true
  1699  	}
  1700  	// match: (ADCshiftRLreg x y (MOVWconst [c]) flags)
  1701  	// cond:
  1702  	// result: (ADCshiftRL x y [c] flags)
  1703  	for {
  1704  		_ = v.Args[3]
  1705  		x := v.Args[0]
  1706  		y := v.Args[1]
  1707  		v_2 := v.Args[2]
  1708  		if v_2.Op != OpARMMOVWconst {
  1709  			break
  1710  		}
  1711  		c := v_2.AuxInt
  1712  		flags := v.Args[3]
  1713  		v.reset(OpARMADCshiftRL)
  1714  		v.AuxInt = c
  1715  		v.AddArg(x)
  1716  		v.AddArg(y)
  1717  		v.AddArg(flags)
  1718  		return true
  1719  	}
  1720  	return false
  1721  }
  1722  func rewriteValueARM_OpARMADD_0(v *Value) bool {
  1723  	// match: (ADD x (MOVWconst [c]))
  1724  	// cond:
  1725  	// result: (ADDconst [c] x)
  1726  	for {
  1727  		_ = v.Args[1]
  1728  		x := v.Args[0]
  1729  		v_1 := v.Args[1]
  1730  		if v_1.Op != OpARMMOVWconst {
  1731  			break
  1732  		}
  1733  		c := v_1.AuxInt
  1734  		v.reset(OpARMADDconst)
  1735  		v.AuxInt = c
  1736  		v.AddArg(x)
  1737  		return true
  1738  	}
  1739  	// match: (ADD (MOVWconst [c]) x)
  1740  	// cond:
  1741  	// result: (ADDconst [c] x)
  1742  	for {
  1743  		_ = v.Args[1]
  1744  		v_0 := v.Args[0]
  1745  		if v_0.Op != OpARMMOVWconst {
  1746  			break
  1747  		}
  1748  		c := v_0.AuxInt
  1749  		x := v.Args[1]
  1750  		v.reset(OpARMADDconst)
  1751  		v.AuxInt = c
  1752  		v.AddArg(x)
  1753  		return true
  1754  	}
  1755  	// match: (ADD x (SLLconst [c] y))
  1756  	// cond:
  1757  	// result: (ADDshiftLL x y [c])
  1758  	for {
  1759  		_ = v.Args[1]
  1760  		x := v.Args[0]
  1761  		v_1 := v.Args[1]
  1762  		if v_1.Op != OpARMSLLconst {
  1763  			break
  1764  		}
  1765  		c := v_1.AuxInt
  1766  		y := v_1.Args[0]
  1767  		v.reset(OpARMADDshiftLL)
  1768  		v.AuxInt = c
  1769  		v.AddArg(x)
  1770  		v.AddArg(y)
  1771  		return true
  1772  	}
  1773  	// match: (ADD (SLLconst [c] y) x)
  1774  	// cond:
  1775  	// result: (ADDshiftLL x y [c])
  1776  	for {
  1777  		_ = v.Args[1]
  1778  		v_0 := v.Args[0]
  1779  		if v_0.Op != OpARMSLLconst {
  1780  			break
  1781  		}
  1782  		c := v_0.AuxInt
  1783  		y := v_0.Args[0]
  1784  		x := v.Args[1]
  1785  		v.reset(OpARMADDshiftLL)
  1786  		v.AuxInt = c
  1787  		v.AddArg(x)
  1788  		v.AddArg(y)
  1789  		return true
  1790  	}
  1791  	// match: (ADD x (SRLconst [c] y))
  1792  	// cond:
  1793  	// result: (ADDshiftRL x y [c])
  1794  	for {
  1795  		_ = v.Args[1]
  1796  		x := v.Args[0]
  1797  		v_1 := v.Args[1]
  1798  		if v_1.Op != OpARMSRLconst {
  1799  			break
  1800  		}
  1801  		c := v_1.AuxInt
  1802  		y := v_1.Args[0]
  1803  		v.reset(OpARMADDshiftRL)
  1804  		v.AuxInt = c
  1805  		v.AddArg(x)
  1806  		v.AddArg(y)
  1807  		return true
  1808  	}
  1809  	// match: (ADD (SRLconst [c] y) x)
  1810  	// cond:
  1811  	// result: (ADDshiftRL x y [c])
  1812  	for {
  1813  		_ = v.Args[1]
  1814  		v_0 := v.Args[0]
  1815  		if v_0.Op != OpARMSRLconst {
  1816  			break
  1817  		}
  1818  		c := v_0.AuxInt
  1819  		y := v_0.Args[0]
  1820  		x := v.Args[1]
  1821  		v.reset(OpARMADDshiftRL)
  1822  		v.AuxInt = c
  1823  		v.AddArg(x)
  1824  		v.AddArg(y)
  1825  		return true
  1826  	}
  1827  	// match: (ADD x (SRAconst [c] y))
  1828  	// cond:
  1829  	// result: (ADDshiftRA x y [c])
  1830  	for {
  1831  		_ = v.Args[1]
  1832  		x := v.Args[0]
  1833  		v_1 := v.Args[1]
  1834  		if v_1.Op != OpARMSRAconst {
  1835  			break
  1836  		}
  1837  		c := v_1.AuxInt
  1838  		y := v_1.Args[0]
  1839  		v.reset(OpARMADDshiftRA)
  1840  		v.AuxInt = c
  1841  		v.AddArg(x)
  1842  		v.AddArg(y)
  1843  		return true
  1844  	}
  1845  	// match: (ADD (SRAconst [c] y) x)
  1846  	// cond:
  1847  	// result: (ADDshiftRA x y [c])
  1848  	for {
  1849  		_ = v.Args[1]
  1850  		v_0 := v.Args[0]
  1851  		if v_0.Op != OpARMSRAconst {
  1852  			break
  1853  		}
  1854  		c := v_0.AuxInt
  1855  		y := v_0.Args[0]
  1856  		x := v.Args[1]
  1857  		v.reset(OpARMADDshiftRA)
  1858  		v.AuxInt = c
  1859  		v.AddArg(x)
  1860  		v.AddArg(y)
  1861  		return true
  1862  	}
  1863  	// match: (ADD x (SLL y z))
  1864  	// cond:
  1865  	// result: (ADDshiftLLreg x y z)
  1866  	for {
  1867  		_ = v.Args[1]
  1868  		x := v.Args[0]
  1869  		v_1 := v.Args[1]
  1870  		if v_1.Op != OpARMSLL {
  1871  			break
  1872  		}
  1873  		_ = v_1.Args[1]
  1874  		y := v_1.Args[0]
  1875  		z := v_1.Args[1]
  1876  		v.reset(OpARMADDshiftLLreg)
  1877  		v.AddArg(x)
  1878  		v.AddArg(y)
  1879  		v.AddArg(z)
  1880  		return true
  1881  	}
  1882  	// match: (ADD (SLL y z) x)
  1883  	// cond:
  1884  	// result: (ADDshiftLLreg x y z)
  1885  	for {
  1886  		_ = v.Args[1]
  1887  		v_0 := v.Args[0]
  1888  		if v_0.Op != OpARMSLL {
  1889  			break
  1890  		}
  1891  		_ = v_0.Args[1]
  1892  		y := v_0.Args[0]
  1893  		z := v_0.Args[1]
  1894  		x := v.Args[1]
  1895  		v.reset(OpARMADDshiftLLreg)
  1896  		v.AddArg(x)
  1897  		v.AddArg(y)
  1898  		v.AddArg(z)
  1899  		return true
  1900  	}
  1901  	return false
  1902  }
  1903  func rewriteValueARM_OpARMADD_10(v *Value) bool {
  1904  	b := v.Block
  1905  	_ = b
  1906  	// match: (ADD x (SRL y z))
  1907  	// cond:
  1908  	// result: (ADDshiftRLreg x y z)
  1909  	for {
  1910  		_ = v.Args[1]
  1911  		x := v.Args[0]
  1912  		v_1 := v.Args[1]
  1913  		if v_1.Op != OpARMSRL {
  1914  			break
  1915  		}
  1916  		_ = v_1.Args[1]
  1917  		y := v_1.Args[0]
  1918  		z := v_1.Args[1]
  1919  		v.reset(OpARMADDshiftRLreg)
  1920  		v.AddArg(x)
  1921  		v.AddArg(y)
  1922  		v.AddArg(z)
  1923  		return true
  1924  	}
  1925  	// match: (ADD (SRL y z) x)
  1926  	// cond:
  1927  	// result: (ADDshiftRLreg x y z)
  1928  	for {
  1929  		_ = v.Args[1]
  1930  		v_0 := v.Args[0]
  1931  		if v_0.Op != OpARMSRL {
  1932  			break
  1933  		}
  1934  		_ = v_0.Args[1]
  1935  		y := v_0.Args[0]
  1936  		z := v_0.Args[1]
  1937  		x := v.Args[1]
  1938  		v.reset(OpARMADDshiftRLreg)
  1939  		v.AddArg(x)
  1940  		v.AddArg(y)
  1941  		v.AddArg(z)
  1942  		return true
  1943  	}
  1944  	// match: (ADD x (SRA y z))
  1945  	// cond:
  1946  	// result: (ADDshiftRAreg x y z)
  1947  	for {
  1948  		_ = v.Args[1]
  1949  		x := v.Args[0]
  1950  		v_1 := v.Args[1]
  1951  		if v_1.Op != OpARMSRA {
  1952  			break
  1953  		}
  1954  		_ = v_1.Args[1]
  1955  		y := v_1.Args[0]
  1956  		z := v_1.Args[1]
  1957  		v.reset(OpARMADDshiftRAreg)
  1958  		v.AddArg(x)
  1959  		v.AddArg(y)
  1960  		v.AddArg(z)
  1961  		return true
  1962  	}
  1963  	// match: (ADD (SRA y z) x)
  1964  	// cond:
  1965  	// result: (ADDshiftRAreg x y z)
  1966  	for {
  1967  		_ = v.Args[1]
  1968  		v_0 := v.Args[0]
  1969  		if v_0.Op != OpARMSRA {
  1970  			break
  1971  		}
  1972  		_ = v_0.Args[1]
  1973  		y := v_0.Args[0]
  1974  		z := v_0.Args[1]
  1975  		x := v.Args[1]
  1976  		v.reset(OpARMADDshiftRAreg)
  1977  		v.AddArg(x)
  1978  		v.AddArg(y)
  1979  		v.AddArg(z)
  1980  		return true
  1981  	}
  1982  	// match: (ADD x (RSBconst [0] y))
  1983  	// cond:
  1984  	// result: (SUB x y)
  1985  	for {
  1986  		_ = v.Args[1]
  1987  		x := v.Args[0]
  1988  		v_1 := v.Args[1]
  1989  		if v_1.Op != OpARMRSBconst {
  1990  			break
  1991  		}
  1992  		if v_1.AuxInt != 0 {
  1993  			break
  1994  		}
  1995  		y := v_1.Args[0]
  1996  		v.reset(OpARMSUB)
  1997  		v.AddArg(x)
  1998  		v.AddArg(y)
  1999  		return true
  2000  	}
  2001  	// match: (ADD (RSBconst [0] y) x)
  2002  	// cond:
  2003  	// result: (SUB x y)
  2004  	for {
  2005  		_ = v.Args[1]
  2006  		v_0 := v.Args[0]
  2007  		if v_0.Op != OpARMRSBconst {
  2008  			break
  2009  		}
  2010  		if v_0.AuxInt != 0 {
  2011  			break
  2012  		}
  2013  		y := v_0.Args[0]
  2014  		x := v.Args[1]
  2015  		v.reset(OpARMSUB)
  2016  		v.AddArg(x)
  2017  		v.AddArg(y)
  2018  		return true
  2019  	}
  2020  	// match: (ADD <t> (RSBconst [c] x) (RSBconst [d] y))
  2021  	// cond:
  2022  	// result: (RSBconst [c+d] (ADD <t> x y))
  2023  	for {
  2024  		t := v.Type
  2025  		_ = v.Args[1]
  2026  		v_0 := v.Args[0]
  2027  		if v_0.Op != OpARMRSBconst {
  2028  			break
  2029  		}
  2030  		c := v_0.AuxInt
  2031  		x := v_0.Args[0]
  2032  		v_1 := v.Args[1]
  2033  		if v_1.Op != OpARMRSBconst {
  2034  			break
  2035  		}
  2036  		d := v_1.AuxInt
  2037  		y := v_1.Args[0]
  2038  		v.reset(OpARMRSBconst)
  2039  		v.AuxInt = c + d
  2040  		v0 := b.NewValue0(v.Pos, OpARMADD, t)
  2041  		v0.AddArg(x)
  2042  		v0.AddArg(y)
  2043  		v.AddArg(v0)
  2044  		return true
  2045  	}
  2046  	// match: (ADD <t> (RSBconst [d] y) (RSBconst [c] x))
  2047  	// cond:
  2048  	// result: (RSBconst [c+d] (ADD <t> x y))
  2049  	for {
  2050  		t := v.Type
  2051  		_ = v.Args[1]
  2052  		v_0 := v.Args[0]
  2053  		if v_0.Op != OpARMRSBconst {
  2054  			break
  2055  		}
  2056  		d := v_0.AuxInt
  2057  		y := v_0.Args[0]
  2058  		v_1 := v.Args[1]
  2059  		if v_1.Op != OpARMRSBconst {
  2060  			break
  2061  		}
  2062  		c := v_1.AuxInt
  2063  		x := v_1.Args[0]
  2064  		v.reset(OpARMRSBconst)
  2065  		v.AuxInt = c + d
  2066  		v0 := b.NewValue0(v.Pos, OpARMADD, t)
  2067  		v0.AddArg(x)
  2068  		v0.AddArg(y)
  2069  		v.AddArg(v0)
  2070  		return true
  2071  	}
  2072  	// match: (ADD (MUL x y) a)
  2073  	// cond:
  2074  	// result: (MULA x y a)
  2075  	for {
  2076  		_ = v.Args[1]
  2077  		v_0 := v.Args[0]
  2078  		if v_0.Op != OpARMMUL {
  2079  			break
  2080  		}
  2081  		_ = v_0.Args[1]
  2082  		x := v_0.Args[0]
  2083  		y := v_0.Args[1]
  2084  		a := v.Args[1]
  2085  		v.reset(OpARMMULA)
  2086  		v.AddArg(x)
  2087  		v.AddArg(y)
  2088  		v.AddArg(a)
  2089  		return true
  2090  	}
  2091  	// match: (ADD a (MUL x y))
  2092  	// cond:
  2093  	// result: (MULA x y a)
  2094  	for {
  2095  		_ = v.Args[1]
  2096  		a := v.Args[0]
  2097  		v_1 := v.Args[1]
  2098  		if v_1.Op != OpARMMUL {
  2099  			break
  2100  		}
  2101  		_ = v_1.Args[1]
  2102  		x := v_1.Args[0]
  2103  		y := v_1.Args[1]
  2104  		v.reset(OpARMMULA)
  2105  		v.AddArg(x)
  2106  		v.AddArg(y)
  2107  		v.AddArg(a)
  2108  		return true
  2109  	}
  2110  	return false
  2111  }
  2112  func rewriteValueARM_OpARMADDD_0(v *Value) bool {
  2113  	// match: (ADDD a (MULD x y))
  2114  	// cond: a.Uses == 1 && objabi.GOARM >= 6
  2115  	// result: (MULAD a x y)
  2116  	for {
  2117  		_ = v.Args[1]
  2118  		a := v.Args[0]
  2119  		v_1 := v.Args[1]
  2120  		if v_1.Op != OpARMMULD {
  2121  			break
  2122  		}
  2123  		_ = v_1.Args[1]
  2124  		x := v_1.Args[0]
  2125  		y := v_1.Args[1]
  2126  		if !(a.Uses == 1 && objabi.GOARM >= 6) {
  2127  			break
  2128  		}
  2129  		v.reset(OpARMMULAD)
  2130  		v.AddArg(a)
  2131  		v.AddArg(x)
  2132  		v.AddArg(y)
  2133  		return true
  2134  	}
  2135  	// match: (ADDD (MULD x y) a)
  2136  	// cond: a.Uses == 1 && objabi.GOARM >= 6
  2137  	// result: (MULAD a x y)
  2138  	for {
  2139  		_ = v.Args[1]
  2140  		v_0 := v.Args[0]
  2141  		if v_0.Op != OpARMMULD {
  2142  			break
  2143  		}
  2144  		_ = v_0.Args[1]
  2145  		x := v_0.Args[0]
  2146  		y := v_0.Args[1]
  2147  		a := v.Args[1]
  2148  		if !(a.Uses == 1 && objabi.GOARM >= 6) {
  2149  			break
  2150  		}
  2151  		v.reset(OpARMMULAD)
  2152  		v.AddArg(a)
  2153  		v.AddArg(x)
  2154  		v.AddArg(y)
  2155  		return true
  2156  	}
  2157  	// match: (ADDD a (NMULD x y))
  2158  	// cond: a.Uses == 1 && objabi.GOARM >= 6
  2159  	// result: (MULSD a x y)
  2160  	for {
  2161  		_ = v.Args[1]
  2162  		a := v.Args[0]
  2163  		v_1 := v.Args[1]
  2164  		if v_1.Op != OpARMNMULD {
  2165  			break
  2166  		}
  2167  		_ = v_1.Args[1]
  2168  		x := v_1.Args[0]
  2169  		y := v_1.Args[1]
  2170  		if !(a.Uses == 1 && objabi.GOARM >= 6) {
  2171  			break
  2172  		}
  2173  		v.reset(OpARMMULSD)
  2174  		v.AddArg(a)
  2175  		v.AddArg(x)
  2176  		v.AddArg(y)
  2177  		return true
  2178  	}
  2179  	// match: (ADDD (NMULD x y) a)
  2180  	// cond: a.Uses == 1 && objabi.GOARM >= 6
  2181  	// result: (MULSD a x y)
  2182  	for {
  2183  		_ = v.Args[1]
  2184  		v_0 := v.Args[0]
  2185  		if v_0.Op != OpARMNMULD {
  2186  			break
  2187  		}
  2188  		_ = v_0.Args[1]
  2189  		x := v_0.Args[0]
  2190  		y := v_0.Args[1]
  2191  		a := v.Args[1]
  2192  		if !(a.Uses == 1 && objabi.GOARM >= 6) {
  2193  			break
  2194  		}
  2195  		v.reset(OpARMMULSD)
  2196  		v.AddArg(a)
  2197  		v.AddArg(x)
  2198  		v.AddArg(y)
  2199  		return true
  2200  	}
  2201  	return false
  2202  }
  2203  func rewriteValueARM_OpARMADDF_0(v *Value) bool {
  2204  	// match: (ADDF a (MULF x y))
  2205  	// cond: a.Uses == 1 && objabi.GOARM >= 6
  2206  	// result: (MULAF a x y)
  2207  	for {
  2208  		_ = v.Args[1]
  2209  		a := v.Args[0]
  2210  		v_1 := v.Args[1]
  2211  		if v_1.Op != OpARMMULF {
  2212  			break
  2213  		}
  2214  		_ = v_1.Args[1]
  2215  		x := v_1.Args[0]
  2216  		y := v_1.Args[1]
  2217  		if !(a.Uses == 1 && objabi.GOARM >= 6) {
  2218  			break
  2219  		}
  2220  		v.reset(OpARMMULAF)
  2221  		v.AddArg(a)
  2222  		v.AddArg(x)
  2223  		v.AddArg(y)
  2224  		return true
  2225  	}
  2226  	// match: (ADDF (MULF x y) a)
  2227  	// cond: a.Uses == 1 && objabi.GOARM >= 6
  2228  	// result: (MULAF a x y)
  2229  	for {
  2230  		_ = v.Args[1]
  2231  		v_0 := v.Args[0]
  2232  		if v_0.Op != OpARMMULF {
  2233  			break
  2234  		}
  2235  		_ = v_0.Args[1]
  2236  		x := v_0.Args[0]
  2237  		y := v_0.Args[1]
  2238  		a := v.Args[1]
  2239  		if !(a.Uses == 1 && objabi.GOARM >= 6) {
  2240  			break
  2241  		}
  2242  		v.reset(OpARMMULAF)
  2243  		v.AddArg(a)
  2244  		v.AddArg(x)
  2245  		v.AddArg(y)
  2246  		return true
  2247  	}
  2248  	// match: (ADDF a (NMULF x y))
  2249  	// cond: a.Uses == 1 && objabi.GOARM >= 6
  2250  	// result: (MULSF a x y)
  2251  	for {
  2252  		_ = v.Args[1]
  2253  		a := v.Args[0]
  2254  		v_1 := v.Args[1]
  2255  		if v_1.Op != OpARMNMULF {
  2256  			break
  2257  		}
  2258  		_ = v_1.Args[1]
  2259  		x := v_1.Args[0]
  2260  		y := v_1.Args[1]
  2261  		if !(a.Uses == 1 && objabi.GOARM >= 6) {
  2262  			break
  2263  		}
  2264  		v.reset(OpARMMULSF)
  2265  		v.AddArg(a)
  2266  		v.AddArg(x)
  2267  		v.AddArg(y)
  2268  		return true
  2269  	}
  2270  	// match: (ADDF (NMULF x y) a)
  2271  	// cond: a.Uses == 1 && objabi.GOARM >= 6
  2272  	// result: (MULSF a x y)
  2273  	for {
  2274  		_ = v.Args[1]
  2275  		v_0 := v.Args[0]
  2276  		if v_0.Op != OpARMNMULF {
  2277  			break
  2278  		}
  2279  		_ = v_0.Args[1]
  2280  		x := v_0.Args[0]
  2281  		y := v_0.Args[1]
  2282  		a := v.Args[1]
  2283  		if !(a.Uses == 1 && objabi.GOARM >= 6) {
  2284  			break
  2285  		}
  2286  		v.reset(OpARMMULSF)
  2287  		v.AddArg(a)
  2288  		v.AddArg(x)
  2289  		v.AddArg(y)
  2290  		return true
  2291  	}
  2292  	return false
  2293  }
  2294  func rewriteValueARM_OpARMADDS_0(v *Value) bool {
  2295  	// match: (ADDS x (MOVWconst [c]))
  2296  	// cond:
  2297  	// result: (ADDSconst [c] x)
  2298  	for {
  2299  		_ = v.Args[1]
  2300  		x := v.Args[0]
  2301  		v_1 := v.Args[1]
  2302  		if v_1.Op != OpARMMOVWconst {
  2303  			break
  2304  		}
  2305  		c := v_1.AuxInt
  2306  		v.reset(OpARMADDSconst)
  2307  		v.AuxInt = c
  2308  		v.AddArg(x)
  2309  		return true
  2310  	}
  2311  	// match: (ADDS (MOVWconst [c]) x)
  2312  	// cond:
  2313  	// result: (ADDSconst [c] x)
  2314  	for {
  2315  		_ = v.Args[1]
  2316  		v_0 := v.Args[0]
  2317  		if v_0.Op != OpARMMOVWconst {
  2318  			break
  2319  		}
  2320  		c := v_0.AuxInt
  2321  		x := v.Args[1]
  2322  		v.reset(OpARMADDSconst)
  2323  		v.AuxInt = c
  2324  		v.AddArg(x)
  2325  		return true
  2326  	}
  2327  	// match: (ADDS x (SLLconst [c] y))
  2328  	// cond:
  2329  	// result: (ADDSshiftLL x y [c])
  2330  	for {
  2331  		_ = v.Args[1]
  2332  		x := v.Args[0]
  2333  		v_1 := v.Args[1]
  2334  		if v_1.Op != OpARMSLLconst {
  2335  			break
  2336  		}
  2337  		c := v_1.AuxInt
  2338  		y := v_1.Args[0]
  2339  		v.reset(OpARMADDSshiftLL)
  2340  		v.AuxInt = c
  2341  		v.AddArg(x)
  2342  		v.AddArg(y)
  2343  		return true
  2344  	}
  2345  	// match: (ADDS (SLLconst [c] y) x)
  2346  	// cond:
  2347  	// result: (ADDSshiftLL x y [c])
  2348  	for {
  2349  		_ = v.Args[1]
  2350  		v_0 := v.Args[0]
  2351  		if v_0.Op != OpARMSLLconst {
  2352  			break
  2353  		}
  2354  		c := v_0.AuxInt
  2355  		y := v_0.Args[0]
  2356  		x := v.Args[1]
  2357  		v.reset(OpARMADDSshiftLL)
  2358  		v.AuxInt = c
  2359  		v.AddArg(x)
  2360  		v.AddArg(y)
  2361  		return true
  2362  	}
  2363  	// match: (ADDS x (SRLconst [c] y))
  2364  	// cond:
  2365  	// result: (ADDSshiftRL x y [c])
  2366  	for {
  2367  		_ = v.Args[1]
  2368  		x := v.Args[0]
  2369  		v_1 := v.Args[1]
  2370  		if v_1.Op != OpARMSRLconst {
  2371  			break
  2372  		}
  2373  		c := v_1.AuxInt
  2374  		y := v_1.Args[0]
  2375  		v.reset(OpARMADDSshiftRL)
  2376  		v.AuxInt = c
  2377  		v.AddArg(x)
  2378  		v.AddArg(y)
  2379  		return true
  2380  	}
  2381  	// match: (ADDS (SRLconst [c] y) x)
  2382  	// cond:
  2383  	// result: (ADDSshiftRL x y [c])
  2384  	for {
  2385  		_ = v.Args[1]
  2386  		v_0 := v.Args[0]
  2387  		if v_0.Op != OpARMSRLconst {
  2388  			break
  2389  		}
  2390  		c := v_0.AuxInt
  2391  		y := v_0.Args[0]
  2392  		x := v.Args[1]
  2393  		v.reset(OpARMADDSshiftRL)
  2394  		v.AuxInt = c
  2395  		v.AddArg(x)
  2396  		v.AddArg(y)
  2397  		return true
  2398  	}
  2399  	// match: (ADDS x (SRAconst [c] y))
  2400  	// cond:
  2401  	// result: (ADDSshiftRA x y [c])
  2402  	for {
  2403  		_ = v.Args[1]
  2404  		x := v.Args[0]
  2405  		v_1 := v.Args[1]
  2406  		if v_1.Op != OpARMSRAconst {
  2407  			break
  2408  		}
  2409  		c := v_1.AuxInt
  2410  		y := v_1.Args[0]
  2411  		v.reset(OpARMADDSshiftRA)
  2412  		v.AuxInt = c
  2413  		v.AddArg(x)
  2414  		v.AddArg(y)
  2415  		return true
  2416  	}
  2417  	// match: (ADDS (SRAconst [c] y) x)
  2418  	// cond:
  2419  	// result: (ADDSshiftRA x y [c])
  2420  	for {
  2421  		_ = v.Args[1]
  2422  		v_0 := v.Args[0]
  2423  		if v_0.Op != OpARMSRAconst {
  2424  			break
  2425  		}
  2426  		c := v_0.AuxInt
  2427  		y := v_0.Args[0]
  2428  		x := v.Args[1]
  2429  		v.reset(OpARMADDSshiftRA)
  2430  		v.AuxInt = c
  2431  		v.AddArg(x)
  2432  		v.AddArg(y)
  2433  		return true
  2434  	}
  2435  	// match: (ADDS x (SLL y z))
  2436  	// cond:
  2437  	// result: (ADDSshiftLLreg x y z)
  2438  	for {
  2439  		_ = v.Args[1]
  2440  		x := v.Args[0]
  2441  		v_1 := v.Args[1]
  2442  		if v_1.Op != OpARMSLL {
  2443  			break
  2444  		}
  2445  		_ = v_1.Args[1]
  2446  		y := v_1.Args[0]
  2447  		z := v_1.Args[1]
  2448  		v.reset(OpARMADDSshiftLLreg)
  2449  		v.AddArg(x)
  2450  		v.AddArg(y)
  2451  		v.AddArg(z)
  2452  		return true
  2453  	}
  2454  	// match: (ADDS (SLL y z) x)
  2455  	// cond:
  2456  	// result: (ADDSshiftLLreg x y z)
  2457  	for {
  2458  		_ = v.Args[1]
  2459  		v_0 := v.Args[0]
  2460  		if v_0.Op != OpARMSLL {
  2461  			break
  2462  		}
  2463  		_ = v_0.Args[1]
  2464  		y := v_0.Args[0]
  2465  		z := v_0.Args[1]
  2466  		x := v.Args[1]
  2467  		v.reset(OpARMADDSshiftLLreg)
  2468  		v.AddArg(x)
  2469  		v.AddArg(y)
  2470  		v.AddArg(z)
  2471  		return true
  2472  	}
  2473  	return false
  2474  }
  2475  func rewriteValueARM_OpARMADDS_10(v *Value) bool {
  2476  	// match: (ADDS x (SRL y z))
  2477  	// cond:
  2478  	// result: (ADDSshiftRLreg x y z)
  2479  	for {
  2480  		_ = v.Args[1]
  2481  		x := v.Args[0]
  2482  		v_1 := v.Args[1]
  2483  		if v_1.Op != OpARMSRL {
  2484  			break
  2485  		}
  2486  		_ = v_1.Args[1]
  2487  		y := v_1.Args[0]
  2488  		z := v_1.Args[1]
  2489  		v.reset(OpARMADDSshiftRLreg)
  2490  		v.AddArg(x)
  2491  		v.AddArg(y)
  2492  		v.AddArg(z)
  2493  		return true
  2494  	}
  2495  	// match: (ADDS (SRL y z) x)
  2496  	// cond:
  2497  	// result: (ADDSshiftRLreg x y z)
  2498  	for {
  2499  		_ = v.Args[1]
  2500  		v_0 := v.Args[0]
  2501  		if v_0.Op != OpARMSRL {
  2502  			break
  2503  		}
  2504  		_ = v_0.Args[1]
  2505  		y := v_0.Args[0]
  2506  		z := v_0.Args[1]
  2507  		x := v.Args[1]
  2508  		v.reset(OpARMADDSshiftRLreg)
  2509  		v.AddArg(x)
  2510  		v.AddArg(y)
  2511  		v.AddArg(z)
  2512  		return true
  2513  	}
  2514  	// match: (ADDS x (SRA y z))
  2515  	// cond:
  2516  	// result: (ADDSshiftRAreg x y z)
  2517  	for {
  2518  		_ = v.Args[1]
  2519  		x := v.Args[0]
  2520  		v_1 := v.Args[1]
  2521  		if v_1.Op != OpARMSRA {
  2522  			break
  2523  		}
  2524  		_ = v_1.Args[1]
  2525  		y := v_1.Args[0]
  2526  		z := v_1.Args[1]
  2527  		v.reset(OpARMADDSshiftRAreg)
  2528  		v.AddArg(x)
  2529  		v.AddArg(y)
  2530  		v.AddArg(z)
  2531  		return true
  2532  	}
  2533  	// match: (ADDS (SRA y z) x)
  2534  	// cond:
  2535  	// result: (ADDSshiftRAreg x y z)
  2536  	for {
  2537  		_ = v.Args[1]
  2538  		v_0 := v.Args[0]
  2539  		if v_0.Op != OpARMSRA {
  2540  			break
  2541  		}
  2542  		_ = v_0.Args[1]
  2543  		y := v_0.Args[0]
  2544  		z := v_0.Args[1]
  2545  		x := v.Args[1]
  2546  		v.reset(OpARMADDSshiftRAreg)
  2547  		v.AddArg(x)
  2548  		v.AddArg(y)
  2549  		v.AddArg(z)
  2550  		return true
  2551  	}
  2552  	return false
  2553  }
  2554  func rewriteValueARM_OpARMADDSshiftLL_0(v *Value) bool {
  2555  	b := v.Block
  2556  	_ = b
  2557  	// match: (ADDSshiftLL (MOVWconst [c]) x [d])
  2558  	// cond:
  2559  	// result: (ADDSconst [c] (SLLconst <x.Type> x [d]))
  2560  	for {
  2561  		d := v.AuxInt
  2562  		_ = v.Args[1]
  2563  		v_0 := v.Args[0]
  2564  		if v_0.Op != OpARMMOVWconst {
  2565  			break
  2566  		}
  2567  		c := v_0.AuxInt
  2568  		x := v.Args[1]
  2569  		v.reset(OpARMADDSconst)
  2570  		v.AuxInt = c
  2571  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  2572  		v0.AuxInt = d
  2573  		v0.AddArg(x)
  2574  		v.AddArg(v0)
  2575  		return true
  2576  	}
  2577  	// match: (ADDSshiftLL x (MOVWconst [c]) [d])
  2578  	// cond:
  2579  	// result: (ADDSconst x [int64(int32(uint32(c)<<uint64(d)))])
  2580  	for {
  2581  		d := v.AuxInt
  2582  		_ = v.Args[1]
  2583  		x := v.Args[0]
  2584  		v_1 := v.Args[1]
  2585  		if v_1.Op != OpARMMOVWconst {
  2586  			break
  2587  		}
  2588  		c := v_1.AuxInt
  2589  		v.reset(OpARMADDSconst)
  2590  		v.AuxInt = int64(int32(uint32(c) << uint64(d)))
  2591  		v.AddArg(x)
  2592  		return true
  2593  	}
  2594  	return false
  2595  }
  2596  func rewriteValueARM_OpARMADDSshiftLLreg_0(v *Value) bool {
  2597  	b := v.Block
  2598  	_ = b
  2599  	// match: (ADDSshiftLLreg (MOVWconst [c]) x y)
  2600  	// cond:
  2601  	// result: (ADDSconst [c] (SLL <x.Type> x y))
  2602  	for {
  2603  		_ = v.Args[2]
  2604  		v_0 := v.Args[0]
  2605  		if v_0.Op != OpARMMOVWconst {
  2606  			break
  2607  		}
  2608  		c := v_0.AuxInt
  2609  		x := v.Args[1]
  2610  		y := v.Args[2]
  2611  		v.reset(OpARMADDSconst)
  2612  		v.AuxInt = c
  2613  		v0 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
  2614  		v0.AddArg(x)
  2615  		v0.AddArg(y)
  2616  		v.AddArg(v0)
  2617  		return true
  2618  	}
  2619  	// match: (ADDSshiftLLreg x y (MOVWconst [c]))
  2620  	// cond:
  2621  	// result: (ADDSshiftLL x y [c])
  2622  	for {
  2623  		_ = v.Args[2]
  2624  		x := v.Args[0]
  2625  		y := v.Args[1]
  2626  		v_2 := v.Args[2]
  2627  		if v_2.Op != OpARMMOVWconst {
  2628  			break
  2629  		}
  2630  		c := v_2.AuxInt
  2631  		v.reset(OpARMADDSshiftLL)
  2632  		v.AuxInt = c
  2633  		v.AddArg(x)
  2634  		v.AddArg(y)
  2635  		return true
  2636  	}
  2637  	return false
  2638  }
  2639  func rewriteValueARM_OpARMADDSshiftRA_0(v *Value) bool {
  2640  	b := v.Block
  2641  	_ = b
  2642  	// match: (ADDSshiftRA (MOVWconst [c]) x [d])
  2643  	// cond:
  2644  	// result: (ADDSconst [c] (SRAconst <x.Type> x [d]))
  2645  	for {
  2646  		d := v.AuxInt
  2647  		_ = v.Args[1]
  2648  		v_0 := v.Args[0]
  2649  		if v_0.Op != OpARMMOVWconst {
  2650  			break
  2651  		}
  2652  		c := v_0.AuxInt
  2653  		x := v.Args[1]
  2654  		v.reset(OpARMADDSconst)
  2655  		v.AuxInt = c
  2656  		v0 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
  2657  		v0.AuxInt = d
  2658  		v0.AddArg(x)
  2659  		v.AddArg(v0)
  2660  		return true
  2661  	}
  2662  	// match: (ADDSshiftRA x (MOVWconst [c]) [d])
  2663  	// cond:
  2664  	// result: (ADDSconst x [int64(int32(c)>>uint64(d))])
  2665  	for {
  2666  		d := v.AuxInt
  2667  		_ = v.Args[1]
  2668  		x := v.Args[0]
  2669  		v_1 := v.Args[1]
  2670  		if v_1.Op != OpARMMOVWconst {
  2671  			break
  2672  		}
  2673  		c := v_1.AuxInt
  2674  		v.reset(OpARMADDSconst)
  2675  		v.AuxInt = int64(int32(c) >> uint64(d))
  2676  		v.AddArg(x)
  2677  		return true
  2678  	}
  2679  	return false
  2680  }
  2681  func rewriteValueARM_OpARMADDSshiftRAreg_0(v *Value) bool {
  2682  	b := v.Block
  2683  	_ = b
  2684  	// match: (ADDSshiftRAreg (MOVWconst [c]) x y)
  2685  	// cond:
  2686  	// result: (ADDSconst [c] (SRA <x.Type> x y))
  2687  	for {
  2688  		_ = v.Args[2]
  2689  		v_0 := v.Args[0]
  2690  		if v_0.Op != OpARMMOVWconst {
  2691  			break
  2692  		}
  2693  		c := v_0.AuxInt
  2694  		x := v.Args[1]
  2695  		y := v.Args[2]
  2696  		v.reset(OpARMADDSconst)
  2697  		v.AuxInt = c
  2698  		v0 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
  2699  		v0.AddArg(x)
  2700  		v0.AddArg(y)
  2701  		v.AddArg(v0)
  2702  		return true
  2703  	}
  2704  	// match: (ADDSshiftRAreg x y (MOVWconst [c]))
  2705  	// cond:
  2706  	// result: (ADDSshiftRA x y [c])
  2707  	for {
  2708  		_ = v.Args[2]
  2709  		x := v.Args[0]
  2710  		y := v.Args[1]
  2711  		v_2 := v.Args[2]
  2712  		if v_2.Op != OpARMMOVWconst {
  2713  			break
  2714  		}
  2715  		c := v_2.AuxInt
  2716  		v.reset(OpARMADDSshiftRA)
  2717  		v.AuxInt = c
  2718  		v.AddArg(x)
  2719  		v.AddArg(y)
  2720  		return true
  2721  	}
  2722  	return false
  2723  }
  2724  func rewriteValueARM_OpARMADDSshiftRL_0(v *Value) bool {
  2725  	b := v.Block
  2726  	_ = b
  2727  	// match: (ADDSshiftRL (MOVWconst [c]) x [d])
  2728  	// cond:
  2729  	// result: (ADDSconst [c] (SRLconst <x.Type> x [d]))
  2730  	for {
  2731  		d := v.AuxInt
  2732  		_ = v.Args[1]
  2733  		v_0 := v.Args[0]
  2734  		if v_0.Op != OpARMMOVWconst {
  2735  			break
  2736  		}
  2737  		c := v_0.AuxInt
  2738  		x := v.Args[1]
  2739  		v.reset(OpARMADDSconst)
  2740  		v.AuxInt = c
  2741  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
  2742  		v0.AuxInt = d
  2743  		v0.AddArg(x)
  2744  		v.AddArg(v0)
  2745  		return true
  2746  	}
  2747  	// match: (ADDSshiftRL x (MOVWconst [c]) [d])
  2748  	// cond:
  2749  	// result: (ADDSconst x [int64(int32(uint32(c)>>uint64(d)))])
  2750  	for {
  2751  		d := v.AuxInt
  2752  		_ = v.Args[1]
  2753  		x := v.Args[0]
  2754  		v_1 := v.Args[1]
  2755  		if v_1.Op != OpARMMOVWconst {
  2756  			break
  2757  		}
  2758  		c := v_1.AuxInt
  2759  		v.reset(OpARMADDSconst)
  2760  		v.AuxInt = int64(int32(uint32(c) >> uint64(d)))
  2761  		v.AddArg(x)
  2762  		return true
  2763  	}
  2764  	return false
  2765  }
  2766  func rewriteValueARM_OpARMADDSshiftRLreg_0(v *Value) bool {
  2767  	b := v.Block
  2768  	_ = b
  2769  	// match: (ADDSshiftRLreg (MOVWconst [c]) x y)
  2770  	// cond:
  2771  	// result: (ADDSconst [c] (SRL <x.Type> x y))
  2772  	for {
  2773  		_ = v.Args[2]
  2774  		v_0 := v.Args[0]
  2775  		if v_0.Op != OpARMMOVWconst {
  2776  			break
  2777  		}
  2778  		c := v_0.AuxInt
  2779  		x := v.Args[1]
  2780  		y := v.Args[2]
  2781  		v.reset(OpARMADDSconst)
  2782  		v.AuxInt = c
  2783  		v0 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
  2784  		v0.AddArg(x)
  2785  		v0.AddArg(y)
  2786  		v.AddArg(v0)
  2787  		return true
  2788  	}
  2789  	// match: (ADDSshiftRLreg x y (MOVWconst [c]))
  2790  	// cond:
  2791  	// result: (ADDSshiftRL x y [c])
  2792  	for {
  2793  		_ = v.Args[2]
  2794  		x := v.Args[0]
  2795  		y := v.Args[1]
  2796  		v_2 := v.Args[2]
  2797  		if v_2.Op != OpARMMOVWconst {
  2798  			break
  2799  		}
  2800  		c := v_2.AuxInt
  2801  		v.reset(OpARMADDSshiftRL)
  2802  		v.AuxInt = c
  2803  		v.AddArg(x)
  2804  		v.AddArg(y)
  2805  		return true
  2806  	}
  2807  	return false
  2808  }
  2809  func rewriteValueARM_OpARMADDconst_0(v *Value) bool {
  2810  	// match: (ADDconst [off1] (MOVWaddr [off2] {sym} ptr))
  2811  	// cond:
  2812  	// result: (MOVWaddr [off1+off2] {sym} ptr)
  2813  	for {
  2814  		off1 := v.AuxInt
  2815  		v_0 := v.Args[0]
  2816  		if v_0.Op != OpARMMOVWaddr {
  2817  			break
  2818  		}
  2819  		off2 := v_0.AuxInt
  2820  		sym := v_0.Aux
  2821  		ptr := v_0.Args[0]
  2822  		v.reset(OpARMMOVWaddr)
  2823  		v.AuxInt = off1 + off2
  2824  		v.Aux = sym
  2825  		v.AddArg(ptr)
  2826  		return true
  2827  	}
  2828  	// match: (ADDconst [0] x)
  2829  	// cond:
  2830  	// result: x
  2831  	for {
  2832  		if v.AuxInt != 0 {
  2833  			break
  2834  		}
  2835  		x := v.Args[0]
  2836  		v.reset(OpCopy)
  2837  		v.Type = x.Type
  2838  		v.AddArg(x)
  2839  		return true
  2840  	}
  2841  	// match: (ADDconst [c] x)
  2842  	// cond: !isARMImmRot(uint32(c)) && isARMImmRot(uint32(-c))
  2843  	// result: (SUBconst [int64(int32(-c))] x)
  2844  	for {
  2845  		c := v.AuxInt
  2846  		x := v.Args[0]
  2847  		if !(!isARMImmRot(uint32(c)) && isARMImmRot(uint32(-c))) {
  2848  			break
  2849  		}
  2850  		v.reset(OpARMSUBconst)
  2851  		v.AuxInt = int64(int32(-c))
  2852  		v.AddArg(x)
  2853  		return true
  2854  	}
  2855  	// match: (ADDconst [c] x)
  2856  	// cond: objabi.GOARM==7 && !isARMImmRot(uint32(c)) && uint32(c)>0xffff && uint32(-c)<=0xffff
  2857  	// result: (SUBconst [int64(int32(-c))] x)
  2858  	for {
  2859  		c := v.AuxInt
  2860  		x := v.Args[0]
  2861  		if !(objabi.GOARM == 7 && !isARMImmRot(uint32(c)) && uint32(c) > 0xffff && uint32(-c) <= 0xffff) {
  2862  			break
  2863  		}
  2864  		v.reset(OpARMSUBconst)
  2865  		v.AuxInt = int64(int32(-c))
  2866  		v.AddArg(x)
  2867  		return true
  2868  	}
  2869  	// match: (ADDconst [c] (MOVWconst [d]))
  2870  	// cond:
  2871  	// result: (MOVWconst [int64(int32(c+d))])
  2872  	for {
  2873  		c := v.AuxInt
  2874  		v_0 := v.Args[0]
  2875  		if v_0.Op != OpARMMOVWconst {
  2876  			break
  2877  		}
  2878  		d := v_0.AuxInt
  2879  		v.reset(OpARMMOVWconst)
  2880  		v.AuxInt = int64(int32(c + d))
  2881  		return true
  2882  	}
  2883  	// match: (ADDconst [c] (ADDconst [d] x))
  2884  	// cond:
  2885  	// result: (ADDconst [int64(int32(c+d))] x)
  2886  	for {
  2887  		c := v.AuxInt
  2888  		v_0 := v.Args[0]
  2889  		if v_0.Op != OpARMADDconst {
  2890  			break
  2891  		}
  2892  		d := v_0.AuxInt
  2893  		x := v_0.Args[0]
  2894  		v.reset(OpARMADDconst)
  2895  		v.AuxInt = int64(int32(c + d))
  2896  		v.AddArg(x)
  2897  		return true
  2898  	}
  2899  	// match: (ADDconst [c] (SUBconst [d] x))
  2900  	// cond:
  2901  	// result: (ADDconst [int64(int32(c-d))] x)
  2902  	for {
  2903  		c := v.AuxInt
  2904  		v_0 := v.Args[0]
  2905  		if v_0.Op != OpARMSUBconst {
  2906  			break
  2907  		}
  2908  		d := v_0.AuxInt
  2909  		x := v_0.Args[0]
  2910  		v.reset(OpARMADDconst)
  2911  		v.AuxInt = int64(int32(c - d))
  2912  		v.AddArg(x)
  2913  		return true
  2914  	}
  2915  	// match: (ADDconst [c] (RSBconst [d] x))
  2916  	// cond:
  2917  	// result: (RSBconst [int64(int32(c+d))] x)
  2918  	for {
  2919  		c := v.AuxInt
  2920  		v_0 := v.Args[0]
  2921  		if v_0.Op != OpARMRSBconst {
  2922  			break
  2923  		}
  2924  		d := v_0.AuxInt
  2925  		x := v_0.Args[0]
  2926  		v.reset(OpARMRSBconst)
  2927  		v.AuxInt = int64(int32(c + d))
  2928  		v.AddArg(x)
  2929  		return true
  2930  	}
  2931  	return false
  2932  }
  2933  func rewriteValueARM_OpARMADDshiftLL_0(v *Value) bool {
  2934  	b := v.Block
  2935  	_ = b
  2936  	// match: (ADDshiftLL (MOVWconst [c]) x [d])
  2937  	// cond:
  2938  	// result: (ADDconst [c] (SLLconst <x.Type> x [d]))
  2939  	for {
  2940  		d := v.AuxInt
  2941  		_ = v.Args[1]
  2942  		v_0 := v.Args[0]
  2943  		if v_0.Op != OpARMMOVWconst {
  2944  			break
  2945  		}
  2946  		c := v_0.AuxInt
  2947  		x := v.Args[1]
  2948  		v.reset(OpARMADDconst)
  2949  		v.AuxInt = c
  2950  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  2951  		v0.AuxInt = d
  2952  		v0.AddArg(x)
  2953  		v.AddArg(v0)
  2954  		return true
  2955  	}
  2956  	// match: (ADDshiftLL x (MOVWconst [c]) [d])
  2957  	// cond:
  2958  	// result: (ADDconst x [int64(int32(uint32(c)<<uint64(d)))])
  2959  	for {
  2960  		d := v.AuxInt
  2961  		_ = v.Args[1]
  2962  		x := v.Args[0]
  2963  		v_1 := v.Args[1]
  2964  		if v_1.Op != OpARMMOVWconst {
  2965  			break
  2966  		}
  2967  		c := v_1.AuxInt
  2968  		v.reset(OpARMADDconst)
  2969  		v.AuxInt = int64(int32(uint32(c) << uint64(d)))
  2970  		v.AddArg(x)
  2971  		return true
  2972  	}
  2973  	// match: (ADDshiftLL [c] (SRLconst x [32-c]) x)
  2974  	// cond:
  2975  	// result: (SRRconst [32-c] x)
  2976  	for {
  2977  		c := v.AuxInt
  2978  		_ = v.Args[1]
  2979  		v_0 := v.Args[0]
  2980  		if v_0.Op != OpARMSRLconst {
  2981  			break
  2982  		}
  2983  		if v_0.AuxInt != 32-c {
  2984  			break
  2985  		}
  2986  		x := v_0.Args[0]
  2987  		if x != v.Args[1] {
  2988  			break
  2989  		}
  2990  		v.reset(OpARMSRRconst)
  2991  		v.AuxInt = 32 - c
  2992  		v.AddArg(x)
  2993  		return true
  2994  	}
  2995  	return false
  2996  }
  2997  func rewriteValueARM_OpARMADDshiftLLreg_0(v *Value) bool {
  2998  	b := v.Block
  2999  	_ = b
  3000  	// match: (ADDshiftLLreg (MOVWconst [c]) x y)
  3001  	// cond:
  3002  	// result: (ADDconst [c] (SLL <x.Type> x y))
  3003  	for {
  3004  		_ = v.Args[2]
  3005  		v_0 := v.Args[0]
  3006  		if v_0.Op != OpARMMOVWconst {
  3007  			break
  3008  		}
  3009  		c := v_0.AuxInt
  3010  		x := v.Args[1]
  3011  		y := v.Args[2]
  3012  		v.reset(OpARMADDconst)
  3013  		v.AuxInt = c
  3014  		v0 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
  3015  		v0.AddArg(x)
  3016  		v0.AddArg(y)
  3017  		v.AddArg(v0)
  3018  		return true
  3019  	}
  3020  	// match: (ADDshiftLLreg x y (MOVWconst [c]))
  3021  	// cond:
  3022  	// result: (ADDshiftLL x y [c])
  3023  	for {
  3024  		_ = v.Args[2]
  3025  		x := v.Args[0]
  3026  		y := v.Args[1]
  3027  		v_2 := v.Args[2]
  3028  		if v_2.Op != OpARMMOVWconst {
  3029  			break
  3030  		}
  3031  		c := v_2.AuxInt
  3032  		v.reset(OpARMADDshiftLL)
  3033  		v.AuxInt = c
  3034  		v.AddArg(x)
  3035  		v.AddArg(y)
  3036  		return true
  3037  	}
  3038  	return false
  3039  }
  3040  func rewriteValueARM_OpARMADDshiftRA_0(v *Value) bool {
  3041  	b := v.Block
  3042  	_ = b
  3043  	// match: (ADDshiftRA (MOVWconst [c]) x [d])
  3044  	// cond:
  3045  	// result: (ADDconst [c] (SRAconst <x.Type> x [d]))
  3046  	for {
  3047  		d := v.AuxInt
  3048  		_ = v.Args[1]
  3049  		v_0 := v.Args[0]
  3050  		if v_0.Op != OpARMMOVWconst {
  3051  			break
  3052  		}
  3053  		c := v_0.AuxInt
  3054  		x := v.Args[1]
  3055  		v.reset(OpARMADDconst)
  3056  		v.AuxInt = c
  3057  		v0 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
  3058  		v0.AuxInt = d
  3059  		v0.AddArg(x)
  3060  		v.AddArg(v0)
  3061  		return true
  3062  	}
  3063  	// match: (ADDshiftRA x (MOVWconst [c]) [d])
  3064  	// cond:
  3065  	// result: (ADDconst x [int64(int32(c)>>uint64(d))])
  3066  	for {
  3067  		d := v.AuxInt
  3068  		_ = v.Args[1]
  3069  		x := v.Args[0]
  3070  		v_1 := v.Args[1]
  3071  		if v_1.Op != OpARMMOVWconst {
  3072  			break
  3073  		}
  3074  		c := v_1.AuxInt
  3075  		v.reset(OpARMADDconst)
  3076  		v.AuxInt = int64(int32(c) >> uint64(d))
  3077  		v.AddArg(x)
  3078  		return true
  3079  	}
  3080  	return false
  3081  }
  3082  func rewriteValueARM_OpARMADDshiftRAreg_0(v *Value) bool {
  3083  	b := v.Block
  3084  	_ = b
  3085  	// match: (ADDshiftRAreg (MOVWconst [c]) x y)
  3086  	// cond:
  3087  	// result: (ADDconst [c] (SRA <x.Type> x y))
  3088  	for {
  3089  		_ = v.Args[2]
  3090  		v_0 := v.Args[0]
  3091  		if v_0.Op != OpARMMOVWconst {
  3092  			break
  3093  		}
  3094  		c := v_0.AuxInt
  3095  		x := v.Args[1]
  3096  		y := v.Args[2]
  3097  		v.reset(OpARMADDconst)
  3098  		v.AuxInt = c
  3099  		v0 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
  3100  		v0.AddArg(x)
  3101  		v0.AddArg(y)
  3102  		v.AddArg(v0)
  3103  		return true
  3104  	}
  3105  	// match: (ADDshiftRAreg x y (MOVWconst [c]))
  3106  	// cond:
  3107  	// result: (ADDshiftRA x y [c])
  3108  	for {
  3109  		_ = v.Args[2]
  3110  		x := v.Args[0]
  3111  		y := v.Args[1]
  3112  		v_2 := v.Args[2]
  3113  		if v_2.Op != OpARMMOVWconst {
  3114  			break
  3115  		}
  3116  		c := v_2.AuxInt
  3117  		v.reset(OpARMADDshiftRA)
  3118  		v.AuxInt = c
  3119  		v.AddArg(x)
  3120  		v.AddArg(y)
  3121  		return true
  3122  	}
  3123  	return false
  3124  }
  3125  func rewriteValueARM_OpARMADDshiftRL_0(v *Value) bool {
  3126  	b := v.Block
  3127  	_ = b
  3128  	// match: (ADDshiftRL (MOVWconst [c]) x [d])
  3129  	// cond:
  3130  	// result: (ADDconst [c] (SRLconst <x.Type> x [d]))
  3131  	for {
  3132  		d := v.AuxInt
  3133  		_ = v.Args[1]
  3134  		v_0 := v.Args[0]
  3135  		if v_0.Op != OpARMMOVWconst {
  3136  			break
  3137  		}
  3138  		c := v_0.AuxInt
  3139  		x := v.Args[1]
  3140  		v.reset(OpARMADDconst)
  3141  		v.AuxInt = c
  3142  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
  3143  		v0.AuxInt = d
  3144  		v0.AddArg(x)
  3145  		v.AddArg(v0)
  3146  		return true
  3147  	}
  3148  	// match: (ADDshiftRL x (MOVWconst [c]) [d])
  3149  	// cond:
  3150  	// result: (ADDconst x [int64(int32(uint32(c)>>uint64(d)))])
  3151  	for {
  3152  		d := v.AuxInt
  3153  		_ = v.Args[1]
  3154  		x := v.Args[0]
  3155  		v_1 := v.Args[1]
  3156  		if v_1.Op != OpARMMOVWconst {
  3157  			break
  3158  		}
  3159  		c := v_1.AuxInt
  3160  		v.reset(OpARMADDconst)
  3161  		v.AuxInt = int64(int32(uint32(c) >> uint64(d)))
  3162  		v.AddArg(x)
  3163  		return true
  3164  	}
  3165  	// match: (ADDshiftRL [c] (SLLconst x [32-c]) x)
  3166  	// cond:
  3167  	// result: (SRRconst [ c] x)
  3168  	for {
  3169  		c := v.AuxInt
  3170  		_ = v.Args[1]
  3171  		v_0 := v.Args[0]
  3172  		if v_0.Op != OpARMSLLconst {
  3173  			break
  3174  		}
  3175  		if v_0.AuxInt != 32-c {
  3176  			break
  3177  		}
  3178  		x := v_0.Args[0]
  3179  		if x != v.Args[1] {
  3180  			break
  3181  		}
  3182  		v.reset(OpARMSRRconst)
  3183  		v.AuxInt = c
  3184  		v.AddArg(x)
  3185  		return true
  3186  	}
  3187  	return false
  3188  }
  3189  func rewriteValueARM_OpARMADDshiftRLreg_0(v *Value) bool {
  3190  	b := v.Block
  3191  	_ = b
  3192  	// match: (ADDshiftRLreg (MOVWconst [c]) x y)
  3193  	// cond:
  3194  	// result: (ADDconst [c] (SRL <x.Type> x y))
  3195  	for {
  3196  		_ = v.Args[2]
  3197  		v_0 := v.Args[0]
  3198  		if v_0.Op != OpARMMOVWconst {
  3199  			break
  3200  		}
  3201  		c := v_0.AuxInt
  3202  		x := v.Args[1]
  3203  		y := v.Args[2]
  3204  		v.reset(OpARMADDconst)
  3205  		v.AuxInt = c
  3206  		v0 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
  3207  		v0.AddArg(x)
  3208  		v0.AddArg(y)
  3209  		v.AddArg(v0)
  3210  		return true
  3211  	}
  3212  	// match: (ADDshiftRLreg x y (MOVWconst [c]))
  3213  	// cond:
  3214  	// result: (ADDshiftRL x y [c])
  3215  	for {
  3216  		_ = v.Args[2]
  3217  		x := v.Args[0]
  3218  		y := v.Args[1]
  3219  		v_2 := v.Args[2]
  3220  		if v_2.Op != OpARMMOVWconst {
  3221  			break
  3222  		}
  3223  		c := v_2.AuxInt
  3224  		v.reset(OpARMADDshiftRL)
  3225  		v.AuxInt = c
  3226  		v.AddArg(x)
  3227  		v.AddArg(y)
  3228  		return true
  3229  	}
  3230  	return false
  3231  }
  3232  func rewriteValueARM_OpARMAND_0(v *Value) bool {
  3233  	// match: (AND x (MOVWconst [c]))
  3234  	// cond:
  3235  	// result: (ANDconst [c] x)
  3236  	for {
  3237  		_ = v.Args[1]
  3238  		x := v.Args[0]
  3239  		v_1 := v.Args[1]
  3240  		if v_1.Op != OpARMMOVWconst {
  3241  			break
  3242  		}
  3243  		c := v_1.AuxInt
  3244  		v.reset(OpARMANDconst)
  3245  		v.AuxInt = c
  3246  		v.AddArg(x)
  3247  		return true
  3248  	}
  3249  	// match: (AND (MOVWconst [c]) x)
  3250  	// cond:
  3251  	// result: (ANDconst [c] x)
  3252  	for {
  3253  		_ = v.Args[1]
  3254  		v_0 := v.Args[0]
  3255  		if v_0.Op != OpARMMOVWconst {
  3256  			break
  3257  		}
  3258  		c := v_0.AuxInt
  3259  		x := v.Args[1]
  3260  		v.reset(OpARMANDconst)
  3261  		v.AuxInt = c
  3262  		v.AddArg(x)
  3263  		return true
  3264  	}
  3265  	// match: (AND x (SLLconst [c] y))
  3266  	// cond:
  3267  	// result: (ANDshiftLL x y [c])
  3268  	for {
  3269  		_ = v.Args[1]
  3270  		x := v.Args[0]
  3271  		v_1 := v.Args[1]
  3272  		if v_1.Op != OpARMSLLconst {
  3273  			break
  3274  		}
  3275  		c := v_1.AuxInt
  3276  		y := v_1.Args[0]
  3277  		v.reset(OpARMANDshiftLL)
  3278  		v.AuxInt = c
  3279  		v.AddArg(x)
  3280  		v.AddArg(y)
  3281  		return true
  3282  	}
  3283  	// match: (AND (SLLconst [c] y) x)
  3284  	// cond:
  3285  	// result: (ANDshiftLL x y [c])
  3286  	for {
  3287  		_ = v.Args[1]
  3288  		v_0 := v.Args[0]
  3289  		if v_0.Op != OpARMSLLconst {
  3290  			break
  3291  		}
  3292  		c := v_0.AuxInt
  3293  		y := v_0.Args[0]
  3294  		x := v.Args[1]
  3295  		v.reset(OpARMANDshiftLL)
  3296  		v.AuxInt = c
  3297  		v.AddArg(x)
  3298  		v.AddArg(y)
  3299  		return true
  3300  	}
  3301  	// match: (AND x (SRLconst [c] y))
  3302  	// cond:
  3303  	// result: (ANDshiftRL x y [c])
  3304  	for {
  3305  		_ = v.Args[1]
  3306  		x := v.Args[0]
  3307  		v_1 := v.Args[1]
  3308  		if v_1.Op != OpARMSRLconst {
  3309  			break
  3310  		}
  3311  		c := v_1.AuxInt
  3312  		y := v_1.Args[0]
  3313  		v.reset(OpARMANDshiftRL)
  3314  		v.AuxInt = c
  3315  		v.AddArg(x)
  3316  		v.AddArg(y)
  3317  		return true
  3318  	}
  3319  	// match: (AND (SRLconst [c] y) x)
  3320  	// cond:
  3321  	// result: (ANDshiftRL x y [c])
  3322  	for {
  3323  		_ = v.Args[1]
  3324  		v_0 := v.Args[0]
  3325  		if v_0.Op != OpARMSRLconst {
  3326  			break
  3327  		}
  3328  		c := v_0.AuxInt
  3329  		y := v_0.Args[0]
  3330  		x := v.Args[1]
  3331  		v.reset(OpARMANDshiftRL)
  3332  		v.AuxInt = c
  3333  		v.AddArg(x)
  3334  		v.AddArg(y)
  3335  		return true
  3336  	}
  3337  	// match: (AND x (SRAconst [c] y))
  3338  	// cond:
  3339  	// result: (ANDshiftRA x y [c])
  3340  	for {
  3341  		_ = v.Args[1]
  3342  		x := v.Args[0]
  3343  		v_1 := v.Args[1]
  3344  		if v_1.Op != OpARMSRAconst {
  3345  			break
  3346  		}
  3347  		c := v_1.AuxInt
  3348  		y := v_1.Args[0]
  3349  		v.reset(OpARMANDshiftRA)
  3350  		v.AuxInt = c
  3351  		v.AddArg(x)
  3352  		v.AddArg(y)
  3353  		return true
  3354  	}
  3355  	// match: (AND (SRAconst [c] y) x)
  3356  	// cond:
  3357  	// result: (ANDshiftRA x y [c])
  3358  	for {
  3359  		_ = v.Args[1]
  3360  		v_0 := v.Args[0]
  3361  		if v_0.Op != OpARMSRAconst {
  3362  			break
  3363  		}
  3364  		c := v_0.AuxInt
  3365  		y := v_0.Args[0]
  3366  		x := v.Args[1]
  3367  		v.reset(OpARMANDshiftRA)
  3368  		v.AuxInt = c
  3369  		v.AddArg(x)
  3370  		v.AddArg(y)
  3371  		return true
  3372  	}
  3373  	// match: (AND x (SLL y z))
  3374  	// cond:
  3375  	// result: (ANDshiftLLreg x y z)
  3376  	for {
  3377  		_ = v.Args[1]
  3378  		x := v.Args[0]
  3379  		v_1 := v.Args[1]
  3380  		if v_1.Op != OpARMSLL {
  3381  			break
  3382  		}
  3383  		_ = v_1.Args[1]
  3384  		y := v_1.Args[0]
  3385  		z := v_1.Args[1]
  3386  		v.reset(OpARMANDshiftLLreg)
  3387  		v.AddArg(x)
  3388  		v.AddArg(y)
  3389  		v.AddArg(z)
  3390  		return true
  3391  	}
  3392  	// match: (AND (SLL y z) x)
  3393  	// cond:
  3394  	// result: (ANDshiftLLreg x y z)
  3395  	for {
  3396  		_ = v.Args[1]
  3397  		v_0 := v.Args[0]
  3398  		if v_0.Op != OpARMSLL {
  3399  			break
  3400  		}
  3401  		_ = v_0.Args[1]
  3402  		y := v_0.Args[0]
  3403  		z := v_0.Args[1]
  3404  		x := v.Args[1]
  3405  		v.reset(OpARMANDshiftLLreg)
  3406  		v.AddArg(x)
  3407  		v.AddArg(y)
  3408  		v.AddArg(z)
  3409  		return true
  3410  	}
  3411  	return false
  3412  }
  3413  func rewriteValueARM_OpARMAND_10(v *Value) bool {
  3414  	// match: (AND x (SRL y z))
  3415  	// cond:
  3416  	// result: (ANDshiftRLreg x y z)
  3417  	for {
  3418  		_ = v.Args[1]
  3419  		x := v.Args[0]
  3420  		v_1 := v.Args[1]
  3421  		if v_1.Op != OpARMSRL {
  3422  			break
  3423  		}
  3424  		_ = v_1.Args[1]
  3425  		y := v_1.Args[0]
  3426  		z := v_1.Args[1]
  3427  		v.reset(OpARMANDshiftRLreg)
  3428  		v.AddArg(x)
  3429  		v.AddArg(y)
  3430  		v.AddArg(z)
  3431  		return true
  3432  	}
  3433  	// match: (AND (SRL y z) x)
  3434  	// cond:
  3435  	// result: (ANDshiftRLreg x y z)
  3436  	for {
  3437  		_ = v.Args[1]
  3438  		v_0 := v.Args[0]
  3439  		if v_0.Op != OpARMSRL {
  3440  			break
  3441  		}
  3442  		_ = v_0.Args[1]
  3443  		y := v_0.Args[0]
  3444  		z := v_0.Args[1]
  3445  		x := v.Args[1]
  3446  		v.reset(OpARMANDshiftRLreg)
  3447  		v.AddArg(x)
  3448  		v.AddArg(y)
  3449  		v.AddArg(z)
  3450  		return true
  3451  	}
  3452  	// match: (AND x (SRA y z))
  3453  	// cond:
  3454  	// result: (ANDshiftRAreg x y z)
  3455  	for {
  3456  		_ = v.Args[1]
  3457  		x := v.Args[0]
  3458  		v_1 := v.Args[1]
  3459  		if v_1.Op != OpARMSRA {
  3460  			break
  3461  		}
  3462  		_ = v_1.Args[1]
  3463  		y := v_1.Args[0]
  3464  		z := v_1.Args[1]
  3465  		v.reset(OpARMANDshiftRAreg)
  3466  		v.AddArg(x)
  3467  		v.AddArg(y)
  3468  		v.AddArg(z)
  3469  		return true
  3470  	}
  3471  	// match: (AND (SRA y z) x)
  3472  	// cond:
  3473  	// result: (ANDshiftRAreg x y z)
  3474  	for {
  3475  		_ = v.Args[1]
  3476  		v_0 := v.Args[0]
  3477  		if v_0.Op != OpARMSRA {
  3478  			break
  3479  		}
  3480  		_ = v_0.Args[1]
  3481  		y := v_0.Args[0]
  3482  		z := v_0.Args[1]
  3483  		x := v.Args[1]
  3484  		v.reset(OpARMANDshiftRAreg)
  3485  		v.AddArg(x)
  3486  		v.AddArg(y)
  3487  		v.AddArg(z)
  3488  		return true
  3489  	}
  3490  	// match: (AND x x)
  3491  	// cond:
  3492  	// result: x
  3493  	for {
  3494  		_ = v.Args[1]
  3495  		x := v.Args[0]
  3496  		if x != v.Args[1] {
  3497  			break
  3498  		}
  3499  		v.reset(OpCopy)
  3500  		v.Type = x.Type
  3501  		v.AddArg(x)
  3502  		return true
  3503  	}
  3504  	// match: (AND x (MVN y))
  3505  	// cond:
  3506  	// result: (BIC x y)
  3507  	for {
  3508  		_ = v.Args[1]
  3509  		x := v.Args[0]
  3510  		v_1 := v.Args[1]
  3511  		if v_1.Op != OpARMMVN {
  3512  			break
  3513  		}
  3514  		y := v_1.Args[0]
  3515  		v.reset(OpARMBIC)
  3516  		v.AddArg(x)
  3517  		v.AddArg(y)
  3518  		return true
  3519  	}
  3520  	// match: (AND (MVN y) x)
  3521  	// cond:
  3522  	// result: (BIC x y)
  3523  	for {
  3524  		_ = v.Args[1]
  3525  		v_0 := v.Args[0]
  3526  		if v_0.Op != OpARMMVN {
  3527  			break
  3528  		}
  3529  		y := v_0.Args[0]
  3530  		x := v.Args[1]
  3531  		v.reset(OpARMBIC)
  3532  		v.AddArg(x)
  3533  		v.AddArg(y)
  3534  		return true
  3535  	}
  3536  	// match: (AND x (MVNshiftLL y [c]))
  3537  	// cond:
  3538  	// result: (BICshiftLL x y [c])
  3539  	for {
  3540  		_ = v.Args[1]
  3541  		x := v.Args[0]
  3542  		v_1 := v.Args[1]
  3543  		if v_1.Op != OpARMMVNshiftLL {
  3544  			break
  3545  		}
  3546  		c := v_1.AuxInt
  3547  		y := v_1.Args[0]
  3548  		v.reset(OpARMBICshiftLL)
  3549  		v.AuxInt = c
  3550  		v.AddArg(x)
  3551  		v.AddArg(y)
  3552  		return true
  3553  	}
  3554  	// match: (AND (MVNshiftLL y [c]) x)
  3555  	// cond:
  3556  	// result: (BICshiftLL x y [c])
  3557  	for {
  3558  		_ = v.Args[1]
  3559  		v_0 := v.Args[0]
  3560  		if v_0.Op != OpARMMVNshiftLL {
  3561  			break
  3562  		}
  3563  		c := v_0.AuxInt
  3564  		y := v_0.Args[0]
  3565  		x := v.Args[1]
  3566  		v.reset(OpARMBICshiftLL)
  3567  		v.AuxInt = c
  3568  		v.AddArg(x)
  3569  		v.AddArg(y)
  3570  		return true
  3571  	}
  3572  	// match: (AND x (MVNshiftRL y [c]))
  3573  	// cond:
  3574  	// result: (BICshiftRL x y [c])
  3575  	for {
  3576  		_ = v.Args[1]
  3577  		x := v.Args[0]
  3578  		v_1 := v.Args[1]
  3579  		if v_1.Op != OpARMMVNshiftRL {
  3580  			break
  3581  		}
  3582  		c := v_1.AuxInt
  3583  		y := v_1.Args[0]
  3584  		v.reset(OpARMBICshiftRL)
  3585  		v.AuxInt = c
  3586  		v.AddArg(x)
  3587  		v.AddArg(y)
  3588  		return true
  3589  	}
  3590  	return false
  3591  }
  3592  func rewriteValueARM_OpARMAND_20(v *Value) bool {
  3593  	// match: (AND (MVNshiftRL y [c]) x)
  3594  	// cond:
  3595  	// result: (BICshiftRL x y [c])
  3596  	for {
  3597  		_ = v.Args[1]
  3598  		v_0 := v.Args[0]
  3599  		if v_0.Op != OpARMMVNshiftRL {
  3600  			break
  3601  		}
  3602  		c := v_0.AuxInt
  3603  		y := v_0.Args[0]
  3604  		x := v.Args[1]
  3605  		v.reset(OpARMBICshiftRL)
  3606  		v.AuxInt = c
  3607  		v.AddArg(x)
  3608  		v.AddArg(y)
  3609  		return true
  3610  	}
  3611  	// match: (AND x (MVNshiftRA y [c]))
  3612  	// cond:
  3613  	// result: (BICshiftRA x y [c])
  3614  	for {
  3615  		_ = v.Args[1]
  3616  		x := v.Args[0]
  3617  		v_1 := v.Args[1]
  3618  		if v_1.Op != OpARMMVNshiftRA {
  3619  			break
  3620  		}
  3621  		c := v_1.AuxInt
  3622  		y := v_1.Args[0]
  3623  		v.reset(OpARMBICshiftRA)
  3624  		v.AuxInt = c
  3625  		v.AddArg(x)
  3626  		v.AddArg(y)
  3627  		return true
  3628  	}
  3629  	// match: (AND (MVNshiftRA y [c]) x)
  3630  	// cond:
  3631  	// result: (BICshiftRA x y [c])
  3632  	for {
  3633  		_ = v.Args[1]
  3634  		v_0 := v.Args[0]
  3635  		if v_0.Op != OpARMMVNshiftRA {
  3636  			break
  3637  		}
  3638  		c := v_0.AuxInt
  3639  		y := v_0.Args[0]
  3640  		x := v.Args[1]
  3641  		v.reset(OpARMBICshiftRA)
  3642  		v.AuxInt = c
  3643  		v.AddArg(x)
  3644  		v.AddArg(y)
  3645  		return true
  3646  	}
  3647  	return false
  3648  }
  3649  func rewriteValueARM_OpARMANDconst_0(v *Value) bool {
  3650  	// match: (ANDconst [0] _)
  3651  	// cond:
  3652  	// result: (MOVWconst [0])
  3653  	for {
  3654  		if v.AuxInt != 0 {
  3655  			break
  3656  		}
  3657  		v.reset(OpARMMOVWconst)
  3658  		v.AuxInt = 0
  3659  		return true
  3660  	}
  3661  	// match: (ANDconst [c] x)
  3662  	// cond: int32(c)==-1
  3663  	// result: x
  3664  	for {
  3665  		c := v.AuxInt
  3666  		x := v.Args[0]
  3667  		if !(int32(c) == -1) {
  3668  			break
  3669  		}
  3670  		v.reset(OpCopy)
  3671  		v.Type = x.Type
  3672  		v.AddArg(x)
  3673  		return true
  3674  	}
  3675  	// match: (ANDconst [c] x)
  3676  	// cond: !isARMImmRot(uint32(c)) && isARMImmRot(^uint32(c))
  3677  	// result: (BICconst [int64(int32(^uint32(c)))] x)
  3678  	for {
  3679  		c := v.AuxInt
  3680  		x := v.Args[0]
  3681  		if !(!isARMImmRot(uint32(c)) && isARMImmRot(^uint32(c))) {
  3682  			break
  3683  		}
  3684  		v.reset(OpARMBICconst)
  3685  		v.AuxInt = int64(int32(^uint32(c)))
  3686  		v.AddArg(x)
  3687  		return true
  3688  	}
  3689  	// match: (ANDconst [c] x)
  3690  	// cond: objabi.GOARM==7 && !isARMImmRot(uint32(c)) && uint32(c)>0xffff && ^uint32(c)<=0xffff
  3691  	// result: (BICconst [int64(int32(^uint32(c)))] x)
  3692  	for {
  3693  		c := v.AuxInt
  3694  		x := v.Args[0]
  3695  		if !(objabi.GOARM == 7 && !isARMImmRot(uint32(c)) && uint32(c) > 0xffff && ^uint32(c) <= 0xffff) {
  3696  			break
  3697  		}
  3698  		v.reset(OpARMBICconst)
  3699  		v.AuxInt = int64(int32(^uint32(c)))
  3700  		v.AddArg(x)
  3701  		return true
  3702  	}
  3703  	// match: (ANDconst [c] (MOVWconst [d]))
  3704  	// cond:
  3705  	// result: (MOVWconst [c&d])
  3706  	for {
  3707  		c := v.AuxInt
  3708  		v_0 := v.Args[0]
  3709  		if v_0.Op != OpARMMOVWconst {
  3710  			break
  3711  		}
  3712  		d := v_0.AuxInt
  3713  		v.reset(OpARMMOVWconst)
  3714  		v.AuxInt = c & d
  3715  		return true
  3716  	}
  3717  	// match: (ANDconst [c] (ANDconst [d] x))
  3718  	// cond:
  3719  	// result: (ANDconst [c&d] x)
  3720  	for {
  3721  		c := v.AuxInt
  3722  		v_0 := v.Args[0]
  3723  		if v_0.Op != OpARMANDconst {
  3724  			break
  3725  		}
  3726  		d := v_0.AuxInt
  3727  		x := v_0.Args[0]
  3728  		v.reset(OpARMANDconst)
  3729  		v.AuxInt = c & d
  3730  		v.AddArg(x)
  3731  		return true
  3732  	}
  3733  	return false
  3734  }
  3735  func rewriteValueARM_OpARMANDshiftLL_0(v *Value) bool {
  3736  	b := v.Block
  3737  	_ = b
  3738  	// match: (ANDshiftLL (MOVWconst [c]) x [d])
  3739  	// cond:
  3740  	// result: (ANDconst [c] (SLLconst <x.Type> x [d]))
  3741  	for {
  3742  		d := v.AuxInt
  3743  		_ = v.Args[1]
  3744  		v_0 := v.Args[0]
  3745  		if v_0.Op != OpARMMOVWconst {
  3746  			break
  3747  		}
  3748  		c := v_0.AuxInt
  3749  		x := v.Args[1]
  3750  		v.reset(OpARMANDconst)
  3751  		v.AuxInt = c
  3752  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  3753  		v0.AuxInt = d
  3754  		v0.AddArg(x)
  3755  		v.AddArg(v0)
  3756  		return true
  3757  	}
  3758  	// match: (ANDshiftLL x (MOVWconst [c]) [d])
  3759  	// cond:
  3760  	// result: (ANDconst x [int64(int32(uint32(c)<<uint64(d)))])
  3761  	for {
  3762  		d := v.AuxInt
  3763  		_ = v.Args[1]
  3764  		x := v.Args[0]
  3765  		v_1 := v.Args[1]
  3766  		if v_1.Op != OpARMMOVWconst {
  3767  			break
  3768  		}
  3769  		c := v_1.AuxInt
  3770  		v.reset(OpARMANDconst)
  3771  		v.AuxInt = int64(int32(uint32(c) << uint64(d)))
  3772  		v.AddArg(x)
  3773  		return true
  3774  	}
  3775  	// match: (ANDshiftLL x y:(SLLconst x [c]) [d])
  3776  	// cond: c==d
  3777  	// result: y
  3778  	for {
  3779  		d := v.AuxInt
  3780  		_ = v.Args[1]
  3781  		x := v.Args[0]
  3782  		y := v.Args[1]
  3783  		if y.Op != OpARMSLLconst {
  3784  			break
  3785  		}
  3786  		c := y.AuxInt
  3787  		if x != y.Args[0] {
  3788  			break
  3789  		}
  3790  		if !(c == d) {
  3791  			break
  3792  		}
  3793  		v.reset(OpCopy)
  3794  		v.Type = y.Type
  3795  		v.AddArg(y)
  3796  		return true
  3797  	}
  3798  	return false
  3799  }
  3800  func rewriteValueARM_OpARMANDshiftLLreg_0(v *Value) bool {
  3801  	b := v.Block
  3802  	_ = b
  3803  	// match: (ANDshiftLLreg (MOVWconst [c]) x y)
  3804  	// cond:
  3805  	// result: (ANDconst [c] (SLL <x.Type> x y))
  3806  	for {
  3807  		_ = v.Args[2]
  3808  		v_0 := v.Args[0]
  3809  		if v_0.Op != OpARMMOVWconst {
  3810  			break
  3811  		}
  3812  		c := v_0.AuxInt
  3813  		x := v.Args[1]
  3814  		y := v.Args[2]
  3815  		v.reset(OpARMANDconst)
  3816  		v.AuxInt = c
  3817  		v0 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
  3818  		v0.AddArg(x)
  3819  		v0.AddArg(y)
  3820  		v.AddArg(v0)
  3821  		return true
  3822  	}
  3823  	// match: (ANDshiftLLreg x y (MOVWconst [c]))
  3824  	// cond:
  3825  	// result: (ANDshiftLL x y [c])
  3826  	for {
  3827  		_ = v.Args[2]
  3828  		x := v.Args[0]
  3829  		y := v.Args[1]
  3830  		v_2 := v.Args[2]
  3831  		if v_2.Op != OpARMMOVWconst {
  3832  			break
  3833  		}
  3834  		c := v_2.AuxInt
  3835  		v.reset(OpARMANDshiftLL)
  3836  		v.AuxInt = c
  3837  		v.AddArg(x)
  3838  		v.AddArg(y)
  3839  		return true
  3840  	}
  3841  	return false
  3842  }
  3843  func rewriteValueARM_OpARMANDshiftRA_0(v *Value) bool {
  3844  	b := v.Block
  3845  	_ = b
  3846  	// match: (ANDshiftRA (MOVWconst [c]) x [d])
  3847  	// cond:
  3848  	// result: (ANDconst [c] (SRAconst <x.Type> x [d]))
  3849  	for {
  3850  		d := v.AuxInt
  3851  		_ = v.Args[1]
  3852  		v_0 := v.Args[0]
  3853  		if v_0.Op != OpARMMOVWconst {
  3854  			break
  3855  		}
  3856  		c := v_0.AuxInt
  3857  		x := v.Args[1]
  3858  		v.reset(OpARMANDconst)
  3859  		v.AuxInt = c
  3860  		v0 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
  3861  		v0.AuxInt = d
  3862  		v0.AddArg(x)
  3863  		v.AddArg(v0)
  3864  		return true
  3865  	}
  3866  	// match: (ANDshiftRA x (MOVWconst [c]) [d])
  3867  	// cond:
  3868  	// result: (ANDconst x [int64(int32(c)>>uint64(d))])
  3869  	for {
  3870  		d := v.AuxInt
  3871  		_ = v.Args[1]
  3872  		x := v.Args[0]
  3873  		v_1 := v.Args[1]
  3874  		if v_1.Op != OpARMMOVWconst {
  3875  			break
  3876  		}
  3877  		c := v_1.AuxInt
  3878  		v.reset(OpARMANDconst)
  3879  		v.AuxInt = int64(int32(c) >> uint64(d))
  3880  		v.AddArg(x)
  3881  		return true
  3882  	}
  3883  	// match: (ANDshiftRA x y:(SRAconst x [c]) [d])
  3884  	// cond: c==d
  3885  	// result: y
  3886  	for {
  3887  		d := v.AuxInt
  3888  		_ = v.Args[1]
  3889  		x := v.Args[0]
  3890  		y := v.Args[1]
  3891  		if y.Op != OpARMSRAconst {
  3892  			break
  3893  		}
  3894  		c := y.AuxInt
  3895  		if x != y.Args[0] {
  3896  			break
  3897  		}
  3898  		if !(c == d) {
  3899  			break
  3900  		}
  3901  		v.reset(OpCopy)
  3902  		v.Type = y.Type
  3903  		v.AddArg(y)
  3904  		return true
  3905  	}
  3906  	return false
  3907  }
  3908  func rewriteValueARM_OpARMANDshiftRAreg_0(v *Value) bool {
  3909  	b := v.Block
  3910  	_ = b
  3911  	// match: (ANDshiftRAreg (MOVWconst [c]) x y)
  3912  	// cond:
  3913  	// result: (ANDconst [c] (SRA <x.Type> x y))
  3914  	for {
  3915  		_ = v.Args[2]
  3916  		v_0 := v.Args[0]
  3917  		if v_0.Op != OpARMMOVWconst {
  3918  			break
  3919  		}
  3920  		c := v_0.AuxInt
  3921  		x := v.Args[1]
  3922  		y := v.Args[2]
  3923  		v.reset(OpARMANDconst)
  3924  		v.AuxInt = c
  3925  		v0 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
  3926  		v0.AddArg(x)
  3927  		v0.AddArg(y)
  3928  		v.AddArg(v0)
  3929  		return true
  3930  	}
  3931  	// match: (ANDshiftRAreg x y (MOVWconst [c]))
  3932  	// cond:
  3933  	// result: (ANDshiftRA x y [c])
  3934  	for {
  3935  		_ = v.Args[2]
  3936  		x := v.Args[0]
  3937  		y := v.Args[1]
  3938  		v_2 := v.Args[2]
  3939  		if v_2.Op != OpARMMOVWconst {
  3940  			break
  3941  		}
  3942  		c := v_2.AuxInt
  3943  		v.reset(OpARMANDshiftRA)
  3944  		v.AuxInt = c
  3945  		v.AddArg(x)
  3946  		v.AddArg(y)
  3947  		return true
  3948  	}
  3949  	return false
  3950  }
  3951  func rewriteValueARM_OpARMANDshiftRL_0(v *Value) bool {
  3952  	b := v.Block
  3953  	_ = b
  3954  	// match: (ANDshiftRL (MOVWconst [c]) x [d])
  3955  	// cond:
  3956  	// result: (ANDconst [c] (SRLconst <x.Type> x [d]))
  3957  	for {
  3958  		d := v.AuxInt
  3959  		_ = v.Args[1]
  3960  		v_0 := v.Args[0]
  3961  		if v_0.Op != OpARMMOVWconst {
  3962  			break
  3963  		}
  3964  		c := v_0.AuxInt
  3965  		x := v.Args[1]
  3966  		v.reset(OpARMANDconst)
  3967  		v.AuxInt = c
  3968  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
  3969  		v0.AuxInt = d
  3970  		v0.AddArg(x)
  3971  		v.AddArg(v0)
  3972  		return true
  3973  	}
  3974  	// match: (ANDshiftRL x (MOVWconst [c]) [d])
  3975  	// cond:
  3976  	// result: (ANDconst x [int64(int32(uint32(c)>>uint64(d)))])
  3977  	for {
  3978  		d := v.AuxInt
  3979  		_ = v.Args[1]
  3980  		x := v.Args[0]
  3981  		v_1 := v.Args[1]
  3982  		if v_1.Op != OpARMMOVWconst {
  3983  			break
  3984  		}
  3985  		c := v_1.AuxInt
  3986  		v.reset(OpARMANDconst)
  3987  		v.AuxInt = int64(int32(uint32(c) >> uint64(d)))
  3988  		v.AddArg(x)
  3989  		return true
  3990  	}
  3991  	// match: (ANDshiftRL x y:(SRLconst x [c]) [d])
  3992  	// cond: c==d
  3993  	// result: y
  3994  	for {
  3995  		d := v.AuxInt
  3996  		_ = v.Args[1]
  3997  		x := v.Args[0]
  3998  		y := v.Args[1]
  3999  		if y.Op != OpARMSRLconst {
  4000  			break
  4001  		}
  4002  		c := y.AuxInt
  4003  		if x != y.Args[0] {
  4004  			break
  4005  		}
  4006  		if !(c == d) {
  4007  			break
  4008  		}
  4009  		v.reset(OpCopy)
  4010  		v.Type = y.Type
  4011  		v.AddArg(y)
  4012  		return true
  4013  	}
  4014  	return false
  4015  }
  4016  func rewriteValueARM_OpARMANDshiftRLreg_0(v *Value) bool {
  4017  	b := v.Block
  4018  	_ = b
  4019  	// match: (ANDshiftRLreg (MOVWconst [c]) x y)
  4020  	// cond:
  4021  	// result: (ANDconst [c] (SRL <x.Type> x y))
  4022  	for {
  4023  		_ = v.Args[2]
  4024  		v_0 := v.Args[0]
  4025  		if v_0.Op != OpARMMOVWconst {
  4026  			break
  4027  		}
  4028  		c := v_0.AuxInt
  4029  		x := v.Args[1]
  4030  		y := v.Args[2]
  4031  		v.reset(OpARMANDconst)
  4032  		v.AuxInt = c
  4033  		v0 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
  4034  		v0.AddArg(x)
  4035  		v0.AddArg(y)
  4036  		v.AddArg(v0)
  4037  		return true
  4038  	}
  4039  	// match: (ANDshiftRLreg x y (MOVWconst [c]))
  4040  	// cond:
  4041  	// result: (ANDshiftRL x y [c])
  4042  	for {
  4043  		_ = v.Args[2]
  4044  		x := v.Args[0]
  4045  		y := v.Args[1]
  4046  		v_2 := v.Args[2]
  4047  		if v_2.Op != OpARMMOVWconst {
  4048  			break
  4049  		}
  4050  		c := v_2.AuxInt
  4051  		v.reset(OpARMANDshiftRL)
  4052  		v.AuxInt = c
  4053  		v.AddArg(x)
  4054  		v.AddArg(y)
  4055  		return true
  4056  	}
  4057  	return false
  4058  }
  4059  func rewriteValueARM_OpARMBFX_0(v *Value) bool {
  4060  	// match: (BFX [c] (MOVWconst [d]))
  4061  	// cond:
  4062  	// result: (MOVWconst [int64(int32(d)<<(32-uint32(c&0xff)-uint32(c>>8))>>(32-uint32(c>>8)))])
  4063  	for {
  4064  		c := v.AuxInt
  4065  		v_0 := v.Args[0]
  4066  		if v_0.Op != OpARMMOVWconst {
  4067  			break
  4068  		}
  4069  		d := v_0.AuxInt
  4070  		v.reset(OpARMMOVWconst)
  4071  		v.AuxInt = int64(int32(d) << (32 - uint32(c&0xff) - uint32(c>>8)) >> (32 - uint32(c>>8)))
  4072  		return true
  4073  	}
  4074  	return false
  4075  }
  4076  func rewriteValueARM_OpARMBFXU_0(v *Value) bool {
  4077  	// match: (BFXU [c] (MOVWconst [d]))
  4078  	// cond:
  4079  	// result: (MOVWconst [int64(int32(uint32(d)<<(32-uint32(c&0xff)-uint32(c>>8))>>(32-uint32(c>>8))))])
  4080  	for {
  4081  		c := v.AuxInt
  4082  		v_0 := v.Args[0]
  4083  		if v_0.Op != OpARMMOVWconst {
  4084  			break
  4085  		}
  4086  		d := v_0.AuxInt
  4087  		v.reset(OpARMMOVWconst)
  4088  		v.AuxInt = int64(int32(uint32(d) << (32 - uint32(c&0xff) - uint32(c>>8)) >> (32 - uint32(c>>8))))
  4089  		return true
  4090  	}
  4091  	return false
  4092  }
  4093  func rewriteValueARM_OpARMBIC_0(v *Value) bool {
  4094  	// match: (BIC x (MOVWconst [c]))
  4095  	// cond:
  4096  	// result: (BICconst [c] x)
  4097  	for {
  4098  		_ = v.Args[1]
  4099  		x := v.Args[0]
  4100  		v_1 := v.Args[1]
  4101  		if v_1.Op != OpARMMOVWconst {
  4102  			break
  4103  		}
  4104  		c := v_1.AuxInt
  4105  		v.reset(OpARMBICconst)
  4106  		v.AuxInt = c
  4107  		v.AddArg(x)
  4108  		return true
  4109  	}
  4110  	// match: (BIC x (SLLconst [c] y))
  4111  	// cond:
  4112  	// result: (BICshiftLL x y [c])
  4113  	for {
  4114  		_ = v.Args[1]
  4115  		x := v.Args[0]
  4116  		v_1 := v.Args[1]
  4117  		if v_1.Op != OpARMSLLconst {
  4118  			break
  4119  		}
  4120  		c := v_1.AuxInt
  4121  		y := v_1.Args[0]
  4122  		v.reset(OpARMBICshiftLL)
  4123  		v.AuxInt = c
  4124  		v.AddArg(x)
  4125  		v.AddArg(y)
  4126  		return true
  4127  	}
  4128  	// match: (BIC x (SRLconst [c] y))
  4129  	// cond:
  4130  	// result: (BICshiftRL x y [c])
  4131  	for {
  4132  		_ = v.Args[1]
  4133  		x := v.Args[0]
  4134  		v_1 := v.Args[1]
  4135  		if v_1.Op != OpARMSRLconst {
  4136  			break
  4137  		}
  4138  		c := v_1.AuxInt
  4139  		y := v_1.Args[0]
  4140  		v.reset(OpARMBICshiftRL)
  4141  		v.AuxInt = c
  4142  		v.AddArg(x)
  4143  		v.AddArg(y)
  4144  		return true
  4145  	}
  4146  	// match: (BIC x (SRAconst [c] y))
  4147  	// cond:
  4148  	// result: (BICshiftRA x y [c])
  4149  	for {
  4150  		_ = v.Args[1]
  4151  		x := v.Args[0]
  4152  		v_1 := v.Args[1]
  4153  		if v_1.Op != OpARMSRAconst {
  4154  			break
  4155  		}
  4156  		c := v_1.AuxInt
  4157  		y := v_1.Args[0]
  4158  		v.reset(OpARMBICshiftRA)
  4159  		v.AuxInt = c
  4160  		v.AddArg(x)
  4161  		v.AddArg(y)
  4162  		return true
  4163  	}
  4164  	// match: (BIC x (SLL y z))
  4165  	// cond:
  4166  	// result: (BICshiftLLreg x y z)
  4167  	for {
  4168  		_ = v.Args[1]
  4169  		x := v.Args[0]
  4170  		v_1 := v.Args[1]
  4171  		if v_1.Op != OpARMSLL {
  4172  			break
  4173  		}
  4174  		_ = v_1.Args[1]
  4175  		y := v_1.Args[0]
  4176  		z := v_1.Args[1]
  4177  		v.reset(OpARMBICshiftLLreg)
  4178  		v.AddArg(x)
  4179  		v.AddArg(y)
  4180  		v.AddArg(z)
  4181  		return true
  4182  	}
  4183  	// match: (BIC x (SRL y z))
  4184  	// cond:
  4185  	// result: (BICshiftRLreg x y z)
  4186  	for {
  4187  		_ = v.Args[1]
  4188  		x := v.Args[0]
  4189  		v_1 := v.Args[1]
  4190  		if v_1.Op != OpARMSRL {
  4191  			break
  4192  		}
  4193  		_ = v_1.Args[1]
  4194  		y := v_1.Args[0]
  4195  		z := v_1.Args[1]
  4196  		v.reset(OpARMBICshiftRLreg)
  4197  		v.AddArg(x)
  4198  		v.AddArg(y)
  4199  		v.AddArg(z)
  4200  		return true
  4201  	}
  4202  	// match: (BIC x (SRA y z))
  4203  	// cond:
  4204  	// result: (BICshiftRAreg x y z)
  4205  	for {
  4206  		_ = v.Args[1]
  4207  		x := v.Args[0]
  4208  		v_1 := v.Args[1]
  4209  		if v_1.Op != OpARMSRA {
  4210  			break
  4211  		}
  4212  		_ = v_1.Args[1]
  4213  		y := v_1.Args[0]
  4214  		z := v_1.Args[1]
  4215  		v.reset(OpARMBICshiftRAreg)
  4216  		v.AddArg(x)
  4217  		v.AddArg(y)
  4218  		v.AddArg(z)
  4219  		return true
  4220  	}
  4221  	// match: (BIC x x)
  4222  	// cond:
  4223  	// result: (MOVWconst [0])
  4224  	for {
  4225  		_ = v.Args[1]
  4226  		x := v.Args[0]
  4227  		if x != v.Args[1] {
  4228  			break
  4229  		}
  4230  		v.reset(OpARMMOVWconst)
  4231  		v.AuxInt = 0
  4232  		return true
  4233  	}
  4234  	return false
  4235  }
  4236  func rewriteValueARM_OpARMBICconst_0(v *Value) bool {
  4237  	// match: (BICconst [0] x)
  4238  	// cond:
  4239  	// result: x
  4240  	for {
  4241  		if v.AuxInt != 0 {
  4242  			break
  4243  		}
  4244  		x := v.Args[0]
  4245  		v.reset(OpCopy)
  4246  		v.Type = x.Type
  4247  		v.AddArg(x)
  4248  		return true
  4249  	}
  4250  	// match: (BICconst [c] _)
  4251  	// cond: int32(c)==-1
  4252  	// result: (MOVWconst [0])
  4253  	for {
  4254  		c := v.AuxInt
  4255  		if !(int32(c) == -1) {
  4256  			break
  4257  		}
  4258  		v.reset(OpARMMOVWconst)
  4259  		v.AuxInt = 0
  4260  		return true
  4261  	}
  4262  	// match: (BICconst [c] x)
  4263  	// cond: !isARMImmRot(uint32(c)) && isARMImmRot(^uint32(c))
  4264  	// result: (ANDconst [int64(int32(^uint32(c)))] x)
  4265  	for {
  4266  		c := v.AuxInt
  4267  		x := v.Args[0]
  4268  		if !(!isARMImmRot(uint32(c)) && isARMImmRot(^uint32(c))) {
  4269  			break
  4270  		}
  4271  		v.reset(OpARMANDconst)
  4272  		v.AuxInt = int64(int32(^uint32(c)))
  4273  		v.AddArg(x)
  4274  		return true
  4275  	}
  4276  	// match: (BICconst [c] x)
  4277  	// cond: objabi.GOARM==7 && !isARMImmRot(uint32(c)) && uint32(c)>0xffff && ^uint32(c)<=0xffff
  4278  	// result: (ANDconst [int64(int32(^uint32(c)))] x)
  4279  	for {
  4280  		c := v.AuxInt
  4281  		x := v.Args[0]
  4282  		if !(objabi.GOARM == 7 && !isARMImmRot(uint32(c)) && uint32(c) > 0xffff && ^uint32(c) <= 0xffff) {
  4283  			break
  4284  		}
  4285  		v.reset(OpARMANDconst)
  4286  		v.AuxInt = int64(int32(^uint32(c)))
  4287  		v.AddArg(x)
  4288  		return true
  4289  	}
  4290  	// match: (BICconst [c] (MOVWconst [d]))
  4291  	// cond:
  4292  	// result: (MOVWconst [d&^c])
  4293  	for {
  4294  		c := v.AuxInt
  4295  		v_0 := v.Args[0]
  4296  		if v_0.Op != OpARMMOVWconst {
  4297  			break
  4298  		}
  4299  		d := v_0.AuxInt
  4300  		v.reset(OpARMMOVWconst)
  4301  		v.AuxInt = d &^ c
  4302  		return true
  4303  	}
  4304  	// match: (BICconst [c] (BICconst [d] x))
  4305  	// cond:
  4306  	// result: (BICconst [int64(int32(c|d))] x)
  4307  	for {
  4308  		c := v.AuxInt
  4309  		v_0 := v.Args[0]
  4310  		if v_0.Op != OpARMBICconst {
  4311  			break
  4312  		}
  4313  		d := v_0.AuxInt
  4314  		x := v_0.Args[0]
  4315  		v.reset(OpARMBICconst)
  4316  		v.AuxInt = int64(int32(c | d))
  4317  		v.AddArg(x)
  4318  		return true
  4319  	}
  4320  	return false
  4321  }
  4322  func rewriteValueARM_OpARMBICshiftLL_0(v *Value) bool {
  4323  	// match: (BICshiftLL x (MOVWconst [c]) [d])
  4324  	// cond:
  4325  	// result: (BICconst x [int64(int32(uint32(c)<<uint64(d)))])
  4326  	for {
  4327  		d := v.AuxInt
  4328  		_ = v.Args[1]
  4329  		x := v.Args[0]
  4330  		v_1 := v.Args[1]
  4331  		if v_1.Op != OpARMMOVWconst {
  4332  			break
  4333  		}
  4334  		c := v_1.AuxInt
  4335  		v.reset(OpARMBICconst)
  4336  		v.AuxInt = int64(int32(uint32(c) << uint64(d)))
  4337  		v.AddArg(x)
  4338  		return true
  4339  	}
  4340  	// match: (BICshiftLL x (SLLconst x [c]) [d])
  4341  	// cond: c==d
  4342  	// result: (MOVWconst [0])
  4343  	for {
  4344  		d := v.AuxInt
  4345  		_ = v.Args[1]
  4346  		x := v.Args[0]
  4347  		v_1 := v.Args[1]
  4348  		if v_1.Op != OpARMSLLconst {
  4349  			break
  4350  		}
  4351  		c := v_1.AuxInt
  4352  		if x != v_1.Args[0] {
  4353  			break
  4354  		}
  4355  		if !(c == d) {
  4356  			break
  4357  		}
  4358  		v.reset(OpARMMOVWconst)
  4359  		v.AuxInt = 0
  4360  		return true
  4361  	}
  4362  	return false
  4363  }
  4364  func rewriteValueARM_OpARMBICshiftLLreg_0(v *Value) bool {
  4365  	// match: (BICshiftLLreg x y (MOVWconst [c]))
  4366  	// cond:
  4367  	// result: (BICshiftLL x y [c])
  4368  	for {
  4369  		_ = v.Args[2]
  4370  		x := v.Args[0]
  4371  		y := v.Args[1]
  4372  		v_2 := v.Args[2]
  4373  		if v_2.Op != OpARMMOVWconst {
  4374  			break
  4375  		}
  4376  		c := v_2.AuxInt
  4377  		v.reset(OpARMBICshiftLL)
  4378  		v.AuxInt = c
  4379  		v.AddArg(x)
  4380  		v.AddArg(y)
  4381  		return true
  4382  	}
  4383  	return false
  4384  }
  4385  func rewriteValueARM_OpARMBICshiftRA_0(v *Value) bool {
  4386  	// match: (BICshiftRA x (MOVWconst [c]) [d])
  4387  	// cond:
  4388  	// result: (BICconst x [int64(int32(c)>>uint64(d))])
  4389  	for {
  4390  		d := v.AuxInt
  4391  		_ = v.Args[1]
  4392  		x := v.Args[0]
  4393  		v_1 := v.Args[1]
  4394  		if v_1.Op != OpARMMOVWconst {
  4395  			break
  4396  		}
  4397  		c := v_1.AuxInt
  4398  		v.reset(OpARMBICconst)
  4399  		v.AuxInt = int64(int32(c) >> uint64(d))
  4400  		v.AddArg(x)
  4401  		return true
  4402  	}
  4403  	// match: (BICshiftRA x (SRAconst x [c]) [d])
  4404  	// cond: c==d
  4405  	// result: (MOVWconst [0])
  4406  	for {
  4407  		d := v.AuxInt
  4408  		_ = v.Args[1]
  4409  		x := v.Args[0]
  4410  		v_1 := v.Args[1]
  4411  		if v_1.Op != OpARMSRAconst {
  4412  			break
  4413  		}
  4414  		c := v_1.AuxInt
  4415  		if x != v_1.Args[0] {
  4416  			break
  4417  		}
  4418  		if !(c == d) {
  4419  			break
  4420  		}
  4421  		v.reset(OpARMMOVWconst)
  4422  		v.AuxInt = 0
  4423  		return true
  4424  	}
  4425  	return false
  4426  }
  4427  func rewriteValueARM_OpARMBICshiftRAreg_0(v *Value) bool {
  4428  	// match: (BICshiftRAreg x y (MOVWconst [c]))
  4429  	// cond:
  4430  	// result: (BICshiftRA x y [c])
  4431  	for {
  4432  		_ = v.Args[2]
  4433  		x := v.Args[0]
  4434  		y := v.Args[1]
  4435  		v_2 := v.Args[2]
  4436  		if v_2.Op != OpARMMOVWconst {
  4437  			break
  4438  		}
  4439  		c := v_2.AuxInt
  4440  		v.reset(OpARMBICshiftRA)
  4441  		v.AuxInt = c
  4442  		v.AddArg(x)
  4443  		v.AddArg(y)
  4444  		return true
  4445  	}
  4446  	return false
  4447  }
  4448  func rewriteValueARM_OpARMBICshiftRL_0(v *Value) bool {
  4449  	// match: (BICshiftRL x (MOVWconst [c]) [d])
  4450  	// cond:
  4451  	// result: (BICconst x [int64(int32(uint32(c)>>uint64(d)))])
  4452  	for {
  4453  		d := v.AuxInt
  4454  		_ = v.Args[1]
  4455  		x := v.Args[0]
  4456  		v_1 := v.Args[1]
  4457  		if v_1.Op != OpARMMOVWconst {
  4458  			break
  4459  		}
  4460  		c := v_1.AuxInt
  4461  		v.reset(OpARMBICconst)
  4462  		v.AuxInt = int64(int32(uint32(c) >> uint64(d)))
  4463  		v.AddArg(x)
  4464  		return true
  4465  	}
  4466  	// match: (BICshiftRL x (SRLconst x [c]) [d])
  4467  	// cond: c==d
  4468  	// result: (MOVWconst [0])
  4469  	for {
  4470  		d := v.AuxInt
  4471  		_ = v.Args[1]
  4472  		x := v.Args[0]
  4473  		v_1 := v.Args[1]
  4474  		if v_1.Op != OpARMSRLconst {
  4475  			break
  4476  		}
  4477  		c := v_1.AuxInt
  4478  		if x != v_1.Args[0] {
  4479  			break
  4480  		}
  4481  		if !(c == d) {
  4482  			break
  4483  		}
  4484  		v.reset(OpARMMOVWconst)
  4485  		v.AuxInt = 0
  4486  		return true
  4487  	}
  4488  	return false
  4489  }
  4490  func rewriteValueARM_OpARMBICshiftRLreg_0(v *Value) bool {
  4491  	// match: (BICshiftRLreg x y (MOVWconst [c]))
  4492  	// cond:
  4493  	// result: (BICshiftRL x y [c])
  4494  	for {
  4495  		_ = v.Args[2]
  4496  		x := v.Args[0]
  4497  		y := v.Args[1]
  4498  		v_2 := v.Args[2]
  4499  		if v_2.Op != OpARMMOVWconst {
  4500  			break
  4501  		}
  4502  		c := v_2.AuxInt
  4503  		v.reset(OpARMBICshiftRL)
  4504  		v.AuxInt = c
  4505  		v.AddArg(x)
  4506  		v.AddArg(y)
  4507  		return true
  4508  	}
  4509  	return false
  4510  }
  4511  func rewriteValueARM_OpARMCMN_0(v *Value) bool {
  4512  	// match: (CMN x (MOVWconst [c]))
  4513  	// cond:
  4514  	// result: (CMNconst [c] x)
  4515  	for {
  4516  		_ = v.Args[1]
  4517  		x := v.Args[0]
  4518  		v_1 := v.Args[1]
  4519  		if v_1.Op != OpARMMOVWconst {
  4520  			break
  4521  		}
  4522  		c := v_1.AuxInt
  4523  		v.reset(OpARMCMNconst)
  4524  		v.AuxInt = c
  4525  		v.AddArg(x)
  4526  		return true
  4527  	}
  4528  	// match: (CMN (MOVWconst [c]) x)
  4529  	// cond:
  4530  	// result: (CMNconst [c] x)
  4531  	for {
  4532  		_ = v.Args[1]
  4533  		v_0 := v.Args[0]
  4534  		if v_0.Op != OpARMMOVWconst {
  4535  			break
  4536  		}
  4537  		c := v_0.AuxInt
  4538  		x := v.Args[1]
  4539  		v.reset(OpARMCMNconst)
  4540  		v.AuxInt = c
  4541  		v.AddArg(x)
  4542  		return true
  4543  	}
  4544  	// match: (CMN x (SLLconst [c] y))
  4545  	// cond:
  4546  	// result: (CMNshiftLL x y [c])
  4547  	for {
  4548  		_ = v.Args[1]
  4549  		x := v.Args[0]
  4550  		v_1 := v.Args[1]
  4551  		if v_1.Op != OpARMSLLconst {
  4552  			break
  4553  		}
  4554  		c := v_1.AuxInt
  4555  		y := v_1.Args[0]
  4556  		v.reset(OpARMCMNshiftLL)
  4557  		v.AuxInt = c
  4558  		v.AddArg(x)
  4559  		v.AddArg(y)
  4560  		return true
  4561  	}
  4562  	// match: (CMN (SLLconst [c] y) x)
  4563  	// cond:
  4564  	// result: (CMNshiftLL x y [c])
  4565  	for {
  4566  		_ = v.Args[1]
  4567  		v_0 := v.Args[0]
  4568  		if v_0.Op != OpARMSLLconst {
  4569  			break
  4570  		}
  4571  		c := v_0.AuxInt
  4572  		y := v_0.Args[0]
  4573  		x := v.Args[1]
  4574  		v.reset(OpARMCMNshiftLL)
  4575  		v.AuxInt = c
  4576  		v.AddArg(x)
  4577  		v.AddArg(y)
  4578  		return true
  4579  	}
  4580  	// match: (CMN x (SRLconst [c] y))
  4581  	// cond:
  4582  	// result: (CMNshiftRL x y [c])
  4583  	for {
  4584  		_ = v.Args[1]
  4585  		x := v.Args[0]
  4586  		v_1 := v.Args[1]
  4587  		if v_1.Op != OpARMSRLconst {
  4588  			break
  4589  		}
  4590  		c := v_1.AuxInt
  4591  		y := v_1.Args[0]
  4592  		v.reset(OpARMCMNshiftRL)
  4593  		v.AuxInt = c
  4594  		v.AddArg(x)
  4595  		v.AddArg(y)
  4596  		return true
  4597  	}
  4598  	// match: (CMN (SRLconst [c] y) x)
  4599  	// cond:
  4600  	// result: (CMNshiftRL x y [c])
  4601  	for {
  4602  		_ = v.Args[1]
  4603  		v_0 := v.Args[0]
  4604  		if v_0.Op != OpARMSRLconst {
  4605  			break
  4606  		}
  4607  		c := v_0.AuxInt
  4608  		y := v_0.Args[0]
  4609  		x := v.Args[1]
  4610  		v.reset(OpARMCMNshiftRL)
  4611  		v.AuxInt = c
  4612  		v.AddArg(x)
  4613  		v.AddArg(y)
  4614  		return true
  4615  	}
  4616  	// match: (CMN x (SRAconst [c] y))
  4617  	// cond:
  4618  	// result: (CMNshiftRA x y [c])
  4619  	for {
  4620  		_ = v.Args[1]
  4621  		x := v.Args[0]
  4622  		v_1 := v.Args[1]
  4623  		if v_1.Op != OpARMSRAconst {
  4624  			break
  4625  		}
  4626  		c := v_1.AuxInt
  4627  		y := v_1.Args[0]
  4628  		v.reset(OpARMCMNshiftRA)
  4629  		v.AuxInt = c
  4630  		v.AddArg(x)
  4631  		v.AddArg(y)
  4632  		return true
  4633  	}
  4634  	// match: (CMN (SRAconst [c] y) x)
  4635  	// cond:
  4636  	// result: (CMNshiftRA x y [c])
  4637  	for {
  4638  		_ = v.Args[1]
  4639  		v_0 := v.Args[0]
  4640  		if v_0.Op != OpARMSRAconst {
  4641  			break
  4642  		}
  4643  		c := v_0.AuxInt
  4644  		y := v_0.Args[0]
  4645  		x := v.Args[1]
  4646  		v.reset(OpARMCMNshiftRA)
  4647  		v.AuxInt = c
  4648  		v.AddArg(x)
  4649  		v.AddArg(y)
  4650  		return true
  4651  	}
  4652  	// match: (CMN x (SLL y z))
  4653  	// cond:
  4654  	// result: (CMNshiftLLreg x y z)
  4655  	for {
  4656  		_ = v.Args[1]
  4657  		x := v.Args[0]
  4658  		v_1 := v.Args[1]
  4659  		if v_1.Op != OpARMSLL {
  4660  			break
  4661  		}
  4662  		_ = v_1.Args[1]
  4663  		y := v_1.Args[0]
  4664  		z := v_1.Args[1]
  4665  		v.reset(OpARMCMNshiftLLreg)
  4666  		v.AddArg(x)
  4667  		v.AddArg(y)
  4668  		v.AddArg(z)
  4669  		return true
  4670  	}
  4671  	// match: (CMN (SLL y z) x)
  4672  	// cond:
  4673  	// result: (CMNshiftLLreg x y z)
  4674  	for {
  4675  		_ = v.Args[1]
  4676  		v_0 := v.Args[0]
  4677  		if v_0.Op != OpARMSLL {
  4678  			break
  4679  		}
  4680  		_ = v_0.Args[1]
  4681  		y := v_0.Args[0]
  4682  		z := v_0.Args[1]
  4683  		x := v.Args[1]
  4684  		v.reset(OpARMCMNshiftLLreg)
  4685  		v.AddArg(x)
  4686  		v.AddArg(y)
  4687  		v.AddArg(z)
  4688  		return true
  4689  	}
  4690  	return false
  4691  }
  4692  func rewriteValueARM_OpARMCMN_10(v *Value) bool {
  4693  	// match: (CMN x (SRL y z))
  4694  	// cond:
  4695  	// result: (CMNshiftRLreg x y z)
  4696  	for {
  4697  		_ = v.Args[1]
  4698  		x := v.Args[0]
  4699  		v_1 := v.Args[1]
  4700  		if v_1.Op != OpARMSRL {
  4701  			break
  4702  		}
  4703  		_ = v_1.Args[1]
  4704  		y := v_1.Args[0]
  4705  		z := v_1.Args[1]
  4706  		v.reset(OpARMCMNshiftRLreg)
  4707  		v.AddArg(x)
  4708  		v.AddArg(y)
  4709  		v.AddArg(z)
  4710  		return true
  4711  	}
  4712  	// match: (CMN (SRL y z) x)
  4713  	// cond:
  4714  	// result: (CMNshiftRLreg x y z)
  4715  	for {
  4716  		_ = v.Args[1]
  4717  		v_0 := v.Args[0]
  4718  		if v_0.Op != OpARMSRL {
  4719  			break
  4720  		}
  4721  		_ = v_0.Args[1]
  4722  		y := v_0.Args[0]
  4723  		z := v_0.Args[1]
  4724  		x := v.Args[1]
  4725  		v.reset(OpARMCMNshiftRLreg)
  4726  		v.AddArg(x)
  4727  		v.AddArg(y)
  4728  		v.AddArg(z)
  4729  		return true
  4730  	}
  4731  	// match: (CMN x (SRA y z))
  4732  	// cond:
  4733  	// result: (CMNshiftRAreg x y z)
  4734  	for {
  4735  		_ = v.Args[1]
  4736  		x := v.Args[0]
  4737  		v_1 := v.Args[1]
  4738  		if v_1.Op != OpARMSRA {
  4739  			break
  4740  		}
  4741  		_ = v_1.Args[1]
  4742  		y := v_1.Args[0]
  4743  		z := v_1.Args[1]
  4744  		v.reset(OpARMCMNshiftRAreg)
  4745  		v.AddArg(x)
  4746  		v.AddArg(y)
  4747  		v.AddArg(z)
  4748  		return true
  4749  	}
  4750  	// match: (CMN (SRA y z) x)
  4751  	// cond:
  4752  	// result: (CMNshiftRAreg x y z)
  4753  	for {
  4754  		_ = v.Args[1]
  4755  		v_0 := v.Args[0]
  4756  		if v_0.Op != OpARMSRA {
  4757  			break
  4758  		}
  4759  		_ = v_0.Args[1]
  4760  		y := v_0.Args[0]
  4761  		z := v_0.Args[1]
  4762  		x := v.Args[1]
  4763  		v.reset(OpARMCMNshiftRAreg)
  4764  		v.AddArg(x)
  4765  		v.AddArg(y)
  4766  		v.AddArg(z)
  4767  		return true
  4768  	}
  4769  	// match: (CMN x (RSBconst [0] y))
  4770  	// cond:
  4771  	// result: (CMP x y)
  4772  	for {
  4773  		_ = v.Args[1]
  4774  		x := v.Args[0]
  4775  		v_1 := v.Args[1]
  4776  		if v_1.Op != OpARMRSBconst {
  4777  			break
  4778  		}
  4779  		if v_1.AuxInt != 0 {
  4780  			break
  4781  		}
  4782  		y := v_1.Args[0]
  4783  		v.reset(OpARMCMP)
  4784  		v.AddArg(x)
  4785  		v.AddArg(y)
  4786  		return true
  4787  	}
  4788  	// match: (CMN (RSBconst [0] y) x)
  4789  	// cond:
  4790  	// result: (CMP x y)
  4791  	for {
  4792  		_ = v.Args[1]
  4793  		v_0 := v.Args[0]
  4794  		if v_0.Op != OpARMRSBconst {
  4795  			break
  4796  		}
  4797  		if v_0.AuxInt != 0 {
  4798  			break
  4799  		}
  4800  		y := v_0.Args[0]
  4801  		x := v.Args[1]
  4802  		v.reset(OpARMCMP)
  4803  		v.AddArg(x)
  4804  		v.AddArg(y)
  4805  		return true
  4806  	}
  4807  	return false
  4808  }
  4809  func rewriteValueARM_OpARMCMNconst_0(v *Value) bool {
  4810  	// match: (CMNconst (MOVWconst [x]) [y])
  4811  	// cond: int32(x)==int32(-y)
  4812  	// result: (FlagEQ)
  4813  	for {
  4814  		y := v.AuxInt
  4815  		v_0 := v.Args[0]
  4816  		if v_0.Op != OpARMMOVWconst {
  4817  			break
  4818  		}
  4819  		x := v_0.AuxInt
  4820  		if !(int32(x) == int32(-y)) {
  4821  			break
  4822  		}
  4823  		v.reset(OpARMFlagEQ)
  4824  		return true
  4825  	}
  4826  	// match: (CMNconst (MOVWconst [x]) [y])
  4827  	// cond: int32(x)<int32(-y) && uint32(x)<uint32(-y)
  4828  	// result: (FlagLT_ULT)
  4829  	for {
  4830  		y := v.AuxInt
  4831  		v_0 := v.Args[0]
  4832  		if v_0.Op != OpARMMOVWconst {
  4833  			break
  4834  		}
  4835  		x := v_0.AuxInt
  4836  		if !(int32(x) < int32(-y) && uint32(x) < uint32(-y)) {
  4837  			break
  4838  		}
  4839  		v.reset(OpARMFlagLT_ULT)
  4840  		return true
  4841  	}
  4842  	// match: (CMNconst (MOVWconst [x]) [y])
  4843  	// cond: int32(x)<int32(-y) && uint32(x)>uint32(-y)
  4844  	// result: (FlagLT_UGT)
  4845  	for {
  4846  		y := v.AuxInt
  4847  		v_0 := v.Args[0]
  4848  		if v_0.Op != OpARMMOVWconst {
  4849  			break
  4850  		}
  4851  		x := v_0.AuxInt
  4852  		if !(int32(x) < int32(-y) && uint32(x) > uint32(-y)) {
  4853  			break
  4854  		}
  4855  		v.reset(OpARMFlagLT_UGT)
  4856  		return true
  4857  	}
  4858  	// match: (CMNconst (MOVWconst [x]) [y])
  4859  	// cond: int32(x)>int32(-y) && uint32(x)<uint32(-y)
  4860  	// result: (FlagGT_ULT)
  4861  	for {
  4862  		y := v.AuxInt
  4863  		v_0 := v.Args[0]
  4864  		if v_0.Op != OpARMMOVWconst {
  4865  			break
  4866  		}
  4867  		x := v_0.AuxInt
  4868  		if !(int32(x) > int32(-y) && uint32(x) < uint32(-y)) {
  4869  			break
  4870  		}
  4871  		v.reset(OpARMFlagGT_ULT)
  4872  		return true
  4873  	}
  4874  	// match: (CMNconst (MOVWconst [x]) [y])
  4875  	// cond: int32(x)>int32(-y) && uint32(x)>uint32(-y)
  4876  	// result: (FlagGT_UGT)
  4877  	for {
  4878  		y := v.AuxInt
  4879  		v_0 := v.Args[0]
  4880  		if v_0.Op != OpARMMOVWconst {
  4881  			break
  4882  		}
  4883  		x := v_0.AuxInt
  4884  		if !(int32(x) > int32(-y) && uint32(x) > uint32(-y)) {
  4885  			break
  4886  		}
  4887  		v.reset(OpARMFlagGT_UGT)
  4888  		return true
  4889  	}
  4890  	return false
  4891  }
  4892  func rewriteValueARM_OpARMCMNshiftLL_0(v *Value) bool {
  4893  	b := v.Block
  4894  	_ = b
  4895  	// match: (CMNshiftLL (MOVWconst [c]) x [d])
  4896  	// cond:
  4897  	// result: (CMNconst [c] (SLLconst <x.Type> x [d]))
  4898  	for {
  4899  		d := v.AuxInt
  4900  		_ = v.Args[1]
  4901  		v_0 := v.Args[0]
  4902  		if v_0.Op != OpARMMOVWconst {
  4903  			break
  4904  		}
  4905  		c := v_0.AuxInt
  4906  		x := v.Args[1]
  4907  		v.reset(OpARMCMNconst)
  4908  		v.AuxInt = c
  4909  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  4910  		v0.AuxInt = d
  4911  		v0.AddArg(x)
  4912  		v.AddArg(v0)
  4913  		return true
  4914  	}
  4915  	// match: (CMNshiftLL x (MOVWconst [c]) [d])
  4916  	// cond:
  4917  	// result: (CMNconst x [int64(int32(uint32(c)<<uint64(d)))])
  4918  	for {
  4919  		d := v.AuxInt
  4920  		_ = v.Args[1]
  4921  		x := v.Args[0]
  4922  		v_1 := v.Args[1]
  4923  		if v_1.Op != OpARMMOVWconst {
  4924  			break
  4925  		}
  4926  		c := v_1.AuxInt
  4927  		v.reset(OpARMCMNconst)
  4928  		v.AuxInt = int64(int32(uint32(c) << uint64(d)))
  4929  		v.AddArg(x)
  4930  		return true
  4931  	}
  4932  	return false
  4933  }
  4934  func rewriteValueARM_OpARMCMNshiftLLreg_0(v *Value) bool {
  4935  	b := v.Block
  4936  	_ = b
  4937  	// match: (CMNshiftLLreg (MOVWconst [c]) x y)
  4938  	// cond:
  4939  	// result: (CMNconst [c] (SLL <x.Type> x y))
  4940  	for {
  4941  		_ = v.Args[2]
  4942  		v_0 := v.Args[0]
  4943  		if v_0.Op != OpARMMOVWconst {
  4944  			break
  4945  		}
  4946  		c := v_0.AuxInt
  4947  		x := v.Args[1]
  4948  		y := v.Args[2]
  4949  		v.reset(OpARMCMNconst)
  4950  		v.AuxInt = c
  4951  		v0 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
  4952  		v0.AddArg(x)
  4953  		v0.AddArg(y)
  4954  		v.AddArg(v0)
  4955  		return true
  4956  	}
  4957  	// match: (CMNshiftLLreg x y (MOVWconst [c]))
  4958  	// cond:
  4959  	// result: (CMNshiftLL x y [c])
  4960  	for {
  4961  		_ = v.Args[2]
  4962  		x := v.Args[0]
  4963  		y := v.Args[1]
  4964  		v_2 := v.Args[2]
  4965  		if v_2.Op != OpARMMOVWconst {
  4966  			break
  4967  		}
  4968  		c := v_2.AuxInt
  4969  		v.reset(OpARMCMNshiftLL)
  4970  		v.AuxInt = c
  4971  		v.AddArg(x)
  4972  		v.AddArg(y)
  4973  		return true
  4974  	}
  4975  	return false
  4976  }
  4977  func rewriteValueARM_OpARMCMNshiftRA_0(v *Value) bool {
  4978  	b := v.Block
  4979  	_ = b
  4980  	// match: (CMNshiftRA (MOVWconst [c]) x [d])
  4981  	// cond:
  4982  	// result: (CMNconst [c] (SRAconst <x.Type> x [d]))
  4983  	for {
  4984  		d := v.AuxInt
  4985  		_ = v.Args[1]
  4986  		v_0 := v.Args[0]
  4987  		if v_0.Op != OpARMMOVWconst {
  4988  			break
  4989  		}
  4990  		c := v_0.AuxInt
  4991  		x := v.Args[1]
  4992  		v.reset(OpARMCMNconst)
  4993  		v.AuxInt = c
  4994  		v0 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
  4995  		v0.AuxInt = d
  4996  		v0.AddArg(x)
  4997  		v.AddArg(v0)
  4998  		return true
  4999  	}
  5000  	// match: (CMNshiftRA x (MOVWconst [c]) [d])
  5001  	// cond:
  5002  	// result: (CMNconst x [int64(int32(c)>>uint64(d))])
  5003  	for {
  5004  		d := v.AuxInt
  5005  		_ = v.Args[1]
  5006  		x := v.Args[0]
  5007  		v_1 := v.Args[1]
  5008  		if v_1.Op != OpARMMOVWconst {
  5009  			break
  5010  		}
  5011  		c := v_1.AuxInt
  5012  		v.reset(OpARMCMNconst)
  5013  		v.AuxInt = int64(int32(c) >> uint64(d))
  5014  		v.AddArg(x)
  5015  		return true
  5016  	}
  5017  	return false
  5018  }
  5019  func rewriteValueARM_OpARMCMNshiftRAreg_0(v *Value) bool {
  5020  	b := v.Block
  5021  	_ = b
  5022  	// match: (CMNshiftRAreg (MOVWconst [c]) x y)
  5023  	// cond:
  5024  	// result: (CMNconst [c] (SRA <x.Type> x y))
  5025  	for {
  5026  		_ = v.Args[2]
  5027  		v_0 := v.Args[0]
  5028  		if v_0.Op != OpARMMOVWconst {
  5029  			break
  5030  		}
  5031  		c := v_0.AuxInt
  5032  		x := v.Args[1]
  5033  		y := v.Args[2]
  5034  		v.reset(OpARMCMNconst)
  5035  		v.AuxInt = c
  5036  		v0 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
  5037  		v0.AddArg(x)
  5038  		v0.AddArg(y)
  5039  		v.AddArg(v0)
  5040  		return true
  5041  	}
  5042  	// match: (CMNshiftRAreg x y (MOVWconst [c]))
  5043  	// cond:
  5044  	// result: (CMNshiftRA x y [c])
  5045  	for {
  5046  		_ = v.Args[2]
  5047  		x := v.Args[0]
  5048  		y := v.Args[1]
  5049  		v_2 := v.Args[2]
  5050  		if v_2.Op != OpARMMOVWconst {
  5051  			break
  5052  		}
  5053  		c := v_2.AuxInt
  5054  		v.reset(OpARMCMNshiftRA)
  5055  		v.AuxInt = c
  5056  		v.AddArg(x)
  5057  		v.AddArg(y)
  5058  		return true
  5059  	}
  5060  	return false
  5061  }
  5062  func rewriteValueARM_OpARMCMNshiftRL_0(v *Value) bool {
  5063  	b := v.Block
  5064  	_ = b
  5065  	// match: (CMNshiftRL (MOVWconst [c]) x [d])
  5066  	// cond:
  5067  	// result: (CMNconst [c] (SRLconst <x.Type> x [d]))
  5068  	for {
  5069  		d := v.AuxInt
  5070  		_ = v.Args[1]
  5071  		v_0 := v.Args[0]
  5072  		if v_0.Op != OpARMMOVWconst {
  5073  			break
  5074  		}
  5075  		c := v_0.AuxInt
  5076  		x := v.Args[1]
  5077  		v.reset(OpARMCMNconst)
  5078  		v.AuxInt = c
  5079  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
  5080  		v0.AuxInt = d
  5081  		v0.AddArg(x)
  5082  		v.AddArg(v0)
  5083  		return true
  5084  	}
  5085  	// match: (CMNshiftRL x (MOVWconst [c]) [d])
  5086  	// cond:
  5087  	// result: (CMNconst x [int64(int32(uint32(c)>>uint64(d)))])
  5088  	for {
  5089  		d := v.AuxInt
  5090  		_ = v.Args[1]
  5091  		x := v.Args[0]
  5092  		v_1 := v.Args[1]
  5093  		if v_1.Op != OpARMMOVWconst {
  5094  			break
  5095  		}
  5096  		c := v_1.AuxInt
  5097  		v.reset(OpARMCMNconst)
  5098  		v.AuxInt = int64(int32(uint32(c) >> uint64(d)))
  5099  		v.AddArg(x)
  5100  		return true
  5101  	}
  5102  	return false
  5103  }
  5104  func rewriteValueARM_OpARMCMNshiftRLreg_0(v *Value) bool {
  5105  	b := v.Block
  5106  	_ = b
  5107  	// match: (CMNshiftRLreg (MOVWconst [c]) x y)
  5108  	// cond:
  5109  	// result: (CMNconst [c] (SRL <x.Type> x y))
  5110  	for {
  5111  		_ = v.Args[2]
  5112  		v_0 := v.Args[0]
  5113  		if v_0.Op != OpARMMOVWconst {
  5114  			break
  5115  		}
  5116  		c := v_0.AuxInt
  5117  		x := v.Args[1]
  5118  		y := v.Args[2]
  5119  		v.reset(OpARMCMNconst)
  5120  		v.AuxInt = c
  5121  		v0 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
  5122  		v0.AddArg(x)
  5123  		v0.AddArg(y)
  5124  		v.AddArg(v0)
  5125  		return true
  5126  	}
  5127  	// match: (CMNshiftRLreg x y (MOVWconst [c]))
  5128  	// cond:
  5129  	// result: (CMNshiftRL x y [c])
  5130  	for {
  5131  		_ = v.Args[2]
  5132  		x := v.Args[0]
  5133  		y := v.Args[1]
  5134  		v_2 := v.Args[2]
  5135  		if v_2.Op != OpARMMOVWconst {
  5136  			break
  5137  		}
  5138  		c := v_2.AuxInt
  5139  		v.reset(OpARMCMNshiftRL)
  5140  		v.AuxInt = c
  5141  		v.AddArg(x)
  5142  		v.AddArg(y)
  5143  		return true
  5144  	}
  5145  	return false
  5146  }
  5147  func rewriteValueARM_OpARMCMOVWHSconst_0(v *Value) bool {
  5148  	// match: (CMOVWHSconst _ (FlagEQ) [c])
  5149  	// cond:
  5150  	// result: (MOVWconst [c])
  5151  	for {
  5152  		c := v.AuxInt
  5153  		_ = v.Args[1]
  5154  		v_1 := v.Args[1]
  5155  		if v_1.Op != OpARMFlagEQ {
  5156  			break
  5157  		}
  5158  		v.reset(OpARMMOVWconst)
  5159  		v.AuxInt = c
  5160  		return true
  5161  	}
  5162  	// match: (CMOVWHSconst x (FlagLT_ULT))
  5163  	// cond:
  5164  	// result: x
  5165  	for {
  5166  		_ = v.Args[1]
  5167  		x := v.Args[0]
  5168  		v_1 := v.Args[1]
  5169  		if v_1.Op != OpARMFlagLT_ULT {
  5170  			break
  5171  		}
  5172  		v.reset(OpCopy)
  5173  		v.Type = x.Type
  5174  		v.AddArg(x)
  5175  		return true
  5176  	}
  5177  	// match: (CMOVWHSconst _ (FlagLT_UGT) [c])
  5178  	// cond:
  5179  	// result: (MOVWconst [c])
  5180  	for {
  5181  		c := v.AuxInt
  5182  		_ = v.Args[1]
  5183  		v_1 := v.Args[1]
  5184  		if v_1.Op != OpARMFlagLT_UGT {
  5185  			break
  5186  		}
  5187  		v.reset(OpARMMOVWconst)
  5188  		v.AuxInt = c
  5189  		return true
  5190  	}
  5191  	// match: (CMOVWHSconst x (FlagGT_ULT))
  5192  	// cond:
  5193  	// result: x
  5194  	for {
  5195  		_ = v.Args[1]
  5196  		x := v.Args[0]
  5197  		v_1 := v.Args[1]
  5198  		if v_1.Op != OpARMFlagGT_ULT {
  5199  			break
  5200  		}
  5201  		v.reset(OpCopy)
  5202  		v.Type = x.Type
  5203  		v.AddArg(x)
  5204  		return true
  5205  	}
  5206  	// match: (CMOVWHSconst _ (FlagGT_UGT) [c])
  5207  	// cond:
  5208  	// result: (MOVWconst [c])
  5209  	for {
  5210  		c := v.AuxInt
  5211  		_ = v.Args[1]
  5212  		v_1 := v.Args[1]
  5213  		if v_1.Op != OpARMFlagGT_UGT {
  5214  			break
  5215  		}
  5216  		v.reset(OpARMMOVWconst)
  5217  		v.AuxInt = c
  5218  		return true
  5219  	}
  5220  	// match: (CMOVWHSconst x (InvertFlags flags) [c])
  5221  	// cond:
  5222  	// result: (CMOVWLSconst x flags [c])
  5223  	for {
  5224  		c := v.AuxInt
  5225  		_ = v.Args[1]
  5226  		x := v.Args[0]
  5227  		v_1 := v.Args[1]
  5228  		if v_1.Op != OpARMInvertFlags {
  5229  			break
  5230  		}
  5231  		flags := v_1.Args[0]
  5232  		v.reset(OpARMCMOVWLSconst)
  5233  		v.AuxInt = c
  5234  		v.AddArg(x)
  5235  		v.AddArg(flags)
  5236  		return true
  5237  	}
  5238  	return false
  5239  }
  5240  func rewriteValueARM_OpARMCMOVWLSconst_0(v *Value) bool {
  5241  	// match: (CMOVWLSconst _ (FlagEQ) [c])
  5242  	// cond:
  5243  	// result: (MOVWconst [c])
  5244  	for {
  5245  		c := v.AuxInt
  5246  		_ = v.Args[1]
  5247  		v_1 := v.Args[1]
  5248  		if v_1.Op != OpARMFlagEQ {
  5249  			break
  5250  		}
  5251  		v.reset(OpARMMOVWconst)
  5252  		v.AuxInt = c
  5253  		return true
  5254  	}
  5255  	// match: (CMOVWLSconst _ (FlagLT_ULT) [c])
  5256  	// cond:
  5257  	// result: (MOVWconst [c])
  5258  	for {
  5259  		c := v.AuxInt
  5260  		_ = v.Args[1]
  5261  		v_1 := v.Args[1]
  5262  		if v_1.Op != OpARMFlagLT_ULT {
  5263  			break
  5264  		}
  5265  		v.reset(OpARMMOVWconst)
  5266  		v.AuxInt = c
  5267  		return true
  5268  	}
  5269  	// match: (CMOVWLSconst x (FlagLT_UGT))
  5270  	// cond:
  5271  	// result: x
  5272  	for {
  5273  		_ = v.Args[1]
  5274  		x := v.Args[0]
  5275  		v_1 := v.Args[1]
  5276  		if v_1.Op != OpARMFlagLT_UGT {
  5277  			break
  5278  		}
  5279  		v.reset(OpCopy)
  5280  		v.Type = x.Type
  5281  		v.AddArg(x)
  5282  		return true
  5283  	}
  5284  	// match: (CMOVWLSconst _ (FlagGT_ULT) [c])
  5285  	// cond:
  5286  	// result: (MOVWconst [c])
  5287  	for {
  5288  		c := v.AuxInt
  5289  		_ = v.Args[1]
  5290  		v_1 := v.Args[1]
  5291  		if v_1.Op != OpARMFlagGT_ULT {
  5292  			break
  5293  		}
  5294  		v.reset(OpARMMOVWconst)
  5295  		v.AuxInt = c
  5296  		return true
  5297  	}
  5298  	// match: (CMOVWLSconst x (FlagGT_UGT))
  5299  	// cond:
  5300  	// result: x
  5301  	for {
  5302  		_ = v.Args[1]
  5303  		x := v.Args[0]
  5304  		v_1 := v.Args[1]
  5305  		if v_1.Op != OpARMFlagGT_UGT {
  5306  			break
  5307  		}
  5308  		v.reset(OpCopy)
  5309  		v.Type = x.Type
  5310  		v.AddArg(x)
  5311  		return true
  5312  	}
  5313  	// match: (CMOVWLSconst x (InvertFlags flags) [c])
  5314  	// cond:
  5315  	// result: (CMOVWHSconst x flags [c])
  5316  	for {
  5317  		c := v.AuxInt
  5318  		_ = v.Args[1]
  5319  		x := v.Args[0]
  5320  		v_1 := v.Args[1]
  5321  		if v_1.Op != OpARMInvertFlags {
  5322  			break
  5323  		}
  5324  		flags := v_1.Args[0]
  5325  		v.reset(OpARMCMOVWHSconst)
  5326  		v.AuxInt = c
  5327  		v.AddArg(x)
  5328  		v.AddArg(flags)
  5329  		return true
  5330  	}
  5331  	return false
  5332  }
  5333  func rewriteValueARM_OpARMCMP_0(v *Value) bool {
  5334  	b := v.Block
  5335  	_ = b
  5336  	// match: (CMP x (MOVWconst [c]))
  5337  	// cond:
  5338  	// result: (CMPconst [c] x)
  5339  	for {
  5340  		_ = v.Args[1]
  5341  		x := v.Args[0]
  5342  		v_1 := v.Args[1]
  5343  		if v_1.Op != OpARMMOVWconst {
  5344  			break
  5345  		}
  5346  		c := v_1.AuxInt
  5347  		v.reset(OpARMCMPconst)
  5348  		v.AuxInt = c
  5349  		v.AddArg(x)
  5350  		return true
  5351  	}
  5352  	// match: (CMP (MOVWconst [c]) x)
  5353  	// cond:
  5354  	// result: (InvertFlags (CMPconst [c] x))
  5355  	for {
  5356  		_ = v.Args[1]
  5357  		v_0 := v.Args[0]
  5358  		if v_0.Op != OpARMMOVWconst {
  5359  			break
  5360  		}
  5361  		c := v_0.AuxInt
  5362  		x := v.Args[1]
  5363  		v.reset(OpARMInvertFlags)
  5364  		v0 := b.NewValue0(v.Pos, OpARMCMPconst, types.TypeFlags)
  5365  		v0.AuxInt = c
  5366  		v0.AddArg(x)
  5367  		v.AddArg(v0)
  5368  		return true
  5369  	}
  5370  	// match: (CMP x (SLLconst [c] y))
  5371  	// cond:
  5372  	// result: (CMPshiftLL x y [c])
  5373  	for {
  5374  		_ = v.Args[1]
  5375  		x := v.Args[0]
  5376  		v_1 := v.Args[1]
  5377  		if v_1.Op != OpARMSLLconst {
  5378  			break
  5379  		}
  5380  		c := v_1.AuxInt
  5381  		y := v_1.Args[0]
  5382  		v.reset(OpARMCMPshiftLL)
  5383  		v.AuxInt = c
  5384  		v.AddArg(x)
  5385  		v.AddArg(y)
  5386  		return true
  5387  	}
  5388  	// match: (CMP (SLLconst [c] y) x)
  5389  	// cond:
  5390  	// result: (InvertFlags (CMPshiftLL x y [c]))
  5391  	for {
  5392  		_ = v.Args[1]
  5393  		v_0 := v.Args[0]
  5394  		if v_0.Op != OpARMSLLconst {
  5395  			break
  5396  		}
  5397  		c := v_0.AuxInt
  5398  		y := v_0.Args[0]
  5399  		x := v.Args[1]
  5400  		v.reset(OpARMInvertFlags)
  5401  		v0 := b.NewValue0(v.Pos, OpARMCMPshiftLL, types.TypeFlags)
  5402  		v0.AuxInt = c
  5403  		v0.AddArg(x)
  5404  		v0.AddArg(y)
  5405  		v.AddArg(v0)
  5406  		return true
  5407  	}
  5408  	// match: (CMP x (SRLconst [c] y))
  5409  	// cond:
  5410  	// result: (CMPshiftRL x y [c])
  5411  	for {
  5412  		_ = v.Args[1]
  5413  		x := v.Args[0]
  5414  		v_1 := v.Args[1]
  5415  		if v_1.Op != OpARMSRLconst {
  5416  			break
  5417  		}
  5418  		c := v_1.AuxInt
  5419  		y := v_1.Args[0]
  5420  		v.reset(OpARMCMPshiftRL)
  5421  		v.AuxInt = c
  5422  		v.AddArg(x)
  5423  		v.AddArg(y)
  5424  		return true
  5425  	}
  5426  	// match: (CMP (SRLconst [c] y) x)
  5427  	// cond:
  5428  	// result: (InvertFlags (CMPshiftRL x y [c]))
  5429  	for {
  5430  		_ = v.Args[1]
  5431  		v_0 := v.Args[0]
  5432  		if v_0.Op != OpARMSRLconst {
  5433  			break
  5434  		}
  5435  		c := v_0.AuxInt
  5436  		y := v_0.Args[0]
  5437  		x := v.Args[1]
  5438  		v.reset(OpARMInvertFlags)
  5439  		v0 := b.NewValue0(v.Pos, OpARMCMPshiftRL, types.TypeFlags)
  5440  		v0.AuxInt = c
  5441  		v0.AddArg(x)
  5442  		v0.AddArg(y)
  5443  		v.AddArg(v0)
  5444  		return true
  5445  	}
  5446  	// match: (CMP x (SRAconst [c] y))
  5447  	// cond:
  5448  	// result: (CMPshiftRA x y [c])
  5449  	for {
  5450  		_ = v.Args[1]
  5451  		x := v.Args[0]
  5452  		v_1 := v.Args[1]
  5453  		if v_1.Op != OpARMSRAconst {
  5454  			break
  5455  		}
  5456  		c := v_1.AuxInt
  5457  		y := v_1.Args[0]
  5458  		v.reset(OpARMCMPshiftRA)
  5459  		v.AuxInt = c
  5460  		v.AddArg(x)
  5461  		v.AddArg(y)
  5462  		return true
  5463  	}
  5464  	// match: (CMP (SRAconst [c] y) x)
  5465  	// cond:
  5466  	// result: (InvertFlags (CMPshiftRA x y [c]))
  5467  	for {
  5468  		_ = v.Args[1]
  5469  		v_0 := v.Args[0]
  5470  		if v_0.Op != OpARMSRAconst {
  5471  			break
  5472  		}
  5473  		c := v_0.AuxInt
  5474  		y := v_0.Args[0]
  5475  		x := v.Args[1]
  5476  		v.reset(OpARMInvertFlags)
  5477  		v0 := b.NewValue0(v.Pos, OpARMCMPshiftRA, types.TypeFlags)
  5478  		v0.AuxInt = c
  5479  		v0.AddArg(x)
  5480  		v0.AddArg(y)
  5481  		v.AddArg(v0)
  5482  		return true
  5483  	}
  5484  	// match: (CMP x (SLL y z))
  5485  	// cond:
  5486  	// result: (CMPshiftLLreg x y z)
  5487  	for {
  5488  		_ = v.Args[1]
  5489  		x := v.Args[0]
  5490  		v_1 := v.Args[1]
  5491  		if v_1.Op != OpARMSLL {
  5492  			break
  5493  		}
  5494  		_ = v_1.Args[1]
  5495  		y := v_1.Args[0]
  5496  		z := v_1.Args[1]
  5497  		v.reset(OpARMCMPshiftLLreg)
  5498  		v.AddArg(x)
  5499  		v.AddArg(y)
  5500  		v.AddArg(z)
  5501  		return true
  5502  	}
  5503  	// match: (CMP (SLL y z) x)
  5504  	// cond:
  5505  	// result: (InvertFlags (CMPshiftLLreg x y z))
  5506  	for {
  5507  		_ = v.Args[1]
  5508  		v_0 := v.Args[0]
  5509  		if v_0.Op != OpARMSLL {
  5510  			break
  5511  		}
  5512  		_ = v_0.Args[1]
  5513  		y := v_0.Args[0]
  5514  		z := v_0.Args[1]
  5515  		x := v.Args[1]
  5516  		v.reset(OpARMInvertFlags)
  5517  		v0 := b.NewValue0(v.Pos, OpARMCMPshiftLLreg, types.TypeFlags)
  5518  		v0.AddArg(x)
  5519  		v0.AddArg(y)
  5520  		v0.AddArg(z)
  5521  		v.AddArg(v0)
  5522  		return true
  5523  	}
  5524  	return false
  5525  }
  5526  func rewriteValueARM_OpARMCMP_10(v *Value) bool {
  5527  	b := v.Block
  5528  	_ = b
  5529  	// match: (CMP x (SRL y z))
  5530  	// cond:
  5531  	// result: (CMPshiftRLreg x y z)
  5532  	for {
  5533  		_ = v.Args[1]
  5534  		x := v.Args[0]
  5535  		v_1 := v.Args[1]
  5536  		if v_1.Op != OpARMSRL {
  5537  			break
  5538  		}
  5539  		_ = v_1.Args[1]
  5540  		y := v_1.Args[0]
  5541  		z := v_1.Args[1]
  5542  		v.reset(OpARMCMPshiftRLreg)
  5543  		v.AddArg(x)
  5544  		v.AddArg(y)
  5545  		v.AddArg(z)
  5546  		return true
  5547  	}
  5548  	// match: (CMP (SRL y z) x)
  5549  	// cond:
  5550  	// result: (InvertFlags (CMPshiftRLreg x y z))
  5551  	for {
  5552  		_ = v.Args[1]
  5553  		v_0 := v.Args[0]
  5554  		if v_0.Op != OpARMSRL {
  5555  			break
  5556  		}
  5557  		_ = v_0.Args[1]
  5558  		y := v_0.Args[0]
  5559  		z := v_0.Args[1]
  5560  		x := v.Args[1]
  5561  		v.reset(OpARMInvertFlags)
  5562  		v0 := b.NewValue0(v.Pos, OpARMCMPshiftRLreg, types.TypeFlags)
  5563  		v0.AddArg(x)
  5564  		v0.AddArg(y)
  5565  		v0.AddArg(z)
  5566  		v.AddArg(v0)
  5567  		return true
  5568  	}
  5569  	// match: (CMP x (SRA y z))
  5570  	// cond:
  5571  	// result: (CMPshiftRAreg x y z)
  5572  	for {
  5573  		_ = v.Args[1]
  5574  		x := v.Args[0]
  5575  		v_1 := v.Args[1]
  5576  		if v_1.Op != OpARMSRA {
  5577  			break
  5578  		}
  5579  		_ = v_1.Args[1]
  5580  		y := v_1.Args[0]
  5581  		z := v_1.Args[1]
  5582  		v.reset(OpARMCMPshiftRAreg)
  5583  		v.AddArg(x)
  5584  		v.AddArg(y)
  5585  		v.AddArg(z)
  5586  		return true
  5587  	}
  5588  	// match: (CMP (SRA y z) x)
  5589  	// cond:
  5590  	// result: (InvertFlags (CMPshiftRAreg x y z))
  5591  	for {
  5592  		_ = v.Args[1]
  5593  		v_0 := v.Args[0]
  5594  		if v_0.Op != OpARMSRA {
  5595  			break
  5596  		}
  5597  		_ = v_0.Args[1]
  5598  		y := v_0.Args[0]
  5599  		z := v_0.Args[1]
  5600  		x := v.Args[1]
  5601  		v.reset(OpARMInvertFlags)
  5602  		v0 := b.NewValue0(v.Pos, OpARMCMPshiftRAreg, types.TypeFlags)
  5603  		v0.AddArg(x)
  5604  		v0.AddArg(y)
  5605  		v0.AddArg(z)
  5606  		v.AddArg(v0)
  5607  		return true
  5608  	}
  5609  	// match: (CMP x (RSBconst [0] y))
  5610  	// cond:
  5611  	// result: (CMN x y)
  5612  	for {
  5613  		_ = v.Args[1]
  5614  		x := v.Args[0]
  5615  		v_1 := v.Args[1]
  5616  		if v_1.Op != OpARMRSBconst {
  5617  			break
  5618  		}
  5619  		if v_1.AuxInt != 0 {
  5620  			break
  5621  		}
  5622  		y := v_1.Args[0]
  5623  		v.reset(OpARMCMN)
  5624  		v.AddArg(x)
  5625  		v.AddArg(y)
  5626  		return true
  5627  	}
  5628  	return false
  5629  }
  5630  func rewriteValueARM_OpARMCMPD_0(v *Value) bool {
  5631  	// match: (CMPD x (MOVDconst [0]))
  5632  	// cond:
  5633  	// result: (CMPD0 x)
  5634  	for {
  5635  		_ = v.Args[1]
  5636  		x := v.Args[0]
  5637  		v_1 := v.Args[1]
  5638  		if v_1.Op != OpARMMOVDconst {
  5639  			break
  5640  		}
  5641  		if v_1.AuxInt != 0 {
  5642  			break
  5643  		}
  5644  		v.reset(OpARMCMPD0)
  5645  		v.AddArg(x)
  5646  		return true
  5647  	}
  5648  	return false
  5649  }
  5650  func rewriteValueARM_OpARMCMPF_0(v *Value) bool {
  5651  	// match: (CMPF x (MOVFconst [0]))
  5652  	// cond:
  5653  	// result: (CMPF0 x)
  5654  	for {
  5655  		_ = v.Args[1]
  5656  		x := v.Args[0]
  5657  		v_1 := v.Args[1]
  5658  		if v_1.Op != OpARMMOVFconst {
  5659  			break
  5660  		}
  5661  		if v_1.AuxInt != 0 {
  5662  			break
  5663  		}
  5664  		v.reset(OpARMCMPF0)
  5665  		v.AddArg(x)
  5666  		return true
  5667  	}
  5668  	return false
  5669  }
  5670  func rewriteValueARM_OpARMCMPconst_0(v *Value) bool {
  5671  	// match: (CMPconst (MOVWconst [x]) [y])
  5672  	// cond: int32(x)==int32(y)
  5673  	// result: (FlagEQ)
  5674  	for {
  5675  		y := v.AuxInt
  5676  		v_0 := v.Args[0]
  5677  		if v_0.Op != OpARMMOVWconst {
  5678  			break
  5679  		}
  5680  		x := v_0.AuxInt
  5681  		if !(int32(x) == int32(y)) {
  5682  			break
  5683  		}
  5684  		v.reset(OpARMFlagEQ)
  5685  		return true
  5686  	}
  5687  	// match: (CMPconst (MOVWconst [x]) [y])
  5688  	// cond: int32(x)<int32(y) && uint32(x)<uint32(y)
  5689  	// result: (FlagLT_ULT)
  5690  	for {
  5691  		y := v.AuxInt
  5692  		v_0 := v.Args[0]
  5693  		if v_0.Op != OpARMMOVWconst {
  5694  			break
  5695  		}
  5696  		x := v_0.AuxInt
  5697  		if !(int32(x) < int32(y) && uint32(x) < uint32(y)) {
  5698  			break
  5699  		}
  5700  		v.reset(OpARMFlagLT_ULT)
  5701  		return true
  5702  	}
  5703  	// match: (CMPconst (MOVWconst [x]) [y])
  5704  	// cond: int32(x)<int32(y) && uint32(x)>uint32(y)
  5705  	// result: (FlagLT_UGT)
  5706  	for {
  5707  		y := v.AuxInt
  5708  		v_0 := v.Args[0]
  5709  		if v_0.Op != OpARMMOVWconst {
  5710  			break
  5711  		}
  5712  		x := v_0.AuxInt
  5713  		if !(int32(x) < int32(y) && uint32(x) > uint32(y)) {
  5714  			break
  5715  		}
  5716  		v.reset(OpARMFlagLT_UGT)
  5717  		return true
  5718  	}
  5719  	// match: (CMPconst (MOVWconst [x]) [y])
  5720  	// cond: int32(x)>int32(y) && uint32(x)<uint32(y)
  5721  	// result: (FlagGT_ULT)
  5722  	for {
  5723  		y := v.AuxInt
  5724  		v_0 := v.Args[0]
  5725  		if v_0.Op != OpARMMOVWconst {
  5726  			break
  5727  		}
  5728  		x := v_0.AuxInt
  5729  		if !(int32(x) > int32(y) && uint32(x) < uint32(y)) {
  5730  			break
  5731  		}
  5732  		v.reset(OpARMFlagGT_ULT)
  5733  		return true
  5734  	}
  5735  	// match: (CMPconst (MOVWconst [x]) [y])
  5736  	// cond: int32(x)>int32(y) && uint32(x)>uint32(y)
  5737  	// result: (FlagGT_UGT)
  5738  	for {
  5739  		y := v.AuxInt
  5740  		v_0 := v.Args[0]
  5741  		if v_0.Op != OpARMMOVWconst {
  5742  			break
  5743  		}
  5744  		x := v_0.AuxInt
  5745  		if !(int32(x) > int32(y) && uint32(x) > uint32(y)) {
  5746  			break
  5747  		}
  5748  		v.reset(OpARMFlagGT_UGT)
  5749  		return true
  5750  	}
  5751  	// match: (CMPconst (MOVBUreg _) [c])
  5752  	// cond: 0xff < c
  5753  	// result: (FlagLT_ULT)
  5754  	for {
  5755  		c := v.AuxInt
  5756  		v_0 := v.Args[0]
  5757  		if v_0.Op != OpARMMOVBUreg {
  5758  			break
  5759  		}
  5760  		if !(0xff < c) {
  5761  			break
  5762  		}
  5763  		v.reset(OpARMFlagLT_ULT)
  5764  		return true
  5765  	}
  5766  	// match: (CMPconst (MOVHUreg _) [c])
  5767  	// cond: 0xffff < c
  5768  	// result: (FlagLT_ULT)
  5769  	for {
  5770  		c := v.AuxInt
  5771  		v_0 := v.Args[0]
  5772  		if v_0.Op != OpARMMOVHUreg {
  5773  			break
  5774  		}
  5775  		if !(0xffff < c) {
  5776  			break
  5777  		}
  5778  		v.reset(OpARMFlagLT_ULT)
  5779  		return true
  5780  	}
  5781  	// match: (CMPconst (ANDconst _ [m]) [n])
  5782  	// cond: 0 <= int32(m) && int32(m) < int32(n)
  5783  	// result: (FlagLT_ULT)
  5784  	for {
  5785  		n := v.AuxInt
  5786  		v_0 := v.Args[0]
  5787  		if v_0.Op != OpARMANDconst {
  5788  			break
  5789  		}
  5790  		m := v_0.AuxInt
  5791  		if !(0 <= int32(m) && int32(m) < int32(n)) {
  5792  			break
  5793  		}
  5794  		v.reset(OpARMFlagLT_ULT)
  5795  		return true
  5796  	}
  5797  	// match: (CMPconst (SRLconst _ [c]) [n])
  5798  	// cond: 0 <= n && 0 < c && c <= 32 && (1<<uint32(32-c)) <= uint32(n)
  5799  	// result: (FlagLT_ULT)
  5800  	for {
  5801  		n := v.AuxInt
  5802  		v_0 := v.Args[0]
  5803  		if v_0.Op != OpARMSRLconst {
  5804  			break
  5805  		}
  5806  		c := v_0.AuxInt
  5807  		if !(0 <= n && 0 < c && c <= 32 && (1<<uint32(32-c)) <= uint32(n)) {
  5808  			break
  5809  		}
  5810  		v.reset(OpARMFlagLT_ULT)
  5811  		return true
  5812  	}
  5813  	return false
  5814  }
  5815  func rewriteValueARM_OpARMCMPshiftLL_0(v *Value) bool {
  5816  	b := v.Block
  5817  	_ = b
  5818  	// match: (CMPshiftLL (MOVWconst [c]) x [d])
  5819  	// cond:
  5820  	// result: (InvertFlags (CMPconst [c] (SLLconst <x.Type> x [d])))
  5821  	for {
  5822  		d := v.AuxInt
  5823  		_ = v.Args[1]
  5824  		v_0 := v.Args[0]
  5825  		if v_0.Op != OpARMMOVWconst {
  5826  			break
  5827  		}
  5828  		c := v_0.AuxInt
  5829  		x := v.Args[1]
  5830  		v.reset(OpARMInvertFlags)
  5831  		v0 := b.NewValue0(v.Pos, OpARMCMPconst, types.TypeFlags)
  5832  		v0.AuxInt = c
  5833  		v1 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
  5834  		v1.AuxInt = d
  5835  		v1.AddArg(x)
  5836  		v0.AddArg(v1)
  5837  		v.AddArg(v0)
  5838  		return true
  5839  	}
  5840  	// match: (CMPshiftLL x (MOVWconst [c]) [d])
  5841  	// cond:
  5842  	// result: (CMPconst x [int64(int32(uint32(c)<<uint64(d)))])
  5843  	for {
  5844  		d := v.AuxInt
  5845  		_ = v.Args[1]
  5846  		x := v.Args[0]
  5847  		v_1 := v.Args[1]
  5848  		if v_1.Op != OpARMMOVWconst {
  5849  			break
  5850  		}
  5851  		c := v_1.AuxInt
  5852  		v.reset(OpARMCMPconst)
  5853  		v.AuxInt = int64(int32(uint32(c) << uint64(d)))
  5854  		v.AddArg(x)
  5855  		return true
  5856  	}
  5857  	return false
  5858  }
  5859  func rewriteValueARM_OpARMCMPshiftLLreg_0(v *Value) bool {
  5860  	b := v.Block
  5861  	_ = b
  5862  	// match: (CMPshiftLLreg (MOVWconst [c]) x y)
  5863  	// cond:
  5864  	// result: (InvertFlags (CMPconst [c] (SLL <x.Type> x y)))
  5865  	for {
  5866  		_ = v.Args[2]
  5867  		v_0 := v.Args[0]
  5868  		if v_0.Op != OpARMMOVWconst {
  5869  			break
  5870  		}
  5871  		c := v_0.AuxInt
  5872  		x := v.Args[1]
  5873  		y := v.Args[2]
  5874  		v.reset(OpARMInvertFlags)
  5875  		v0 := b.NewValue0(v.Pos, OpARMCMPconst, types.TypeFlags)
  5876  		v0.AuxInt = c
  5877  		v1 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
  5878  		v1.AddArg(x)
  5879  		v1.AddArg(y)
  5880  		v0.AddArg(v1)
  5881  		v.AddArg(v0)
  5882  		return true
  5883  	}
  5884  	// match: (CMPshiftLLreg x y (MOVWconst [c]))
  5885  	// cond:
  5886  	// result: (CMPshiftLL x y [c])
  5887  	for {
  5888  		_ = v.Args[2]
  5889  		x := v.Args[0]
  5890  		y := v.Args[1]
  5891  		v_2 := v.Args[2]
  5892  		if v_2.Op != OpARMMOVWconst {
  5893  			break
  5894  		}
  5895  		c := v_2.AuxInt
  5896  		v.reset(OpARMCMPshiftLL)
  5897  		v.AuxInt = c
  5898  		v.AddArg(x)
  5899  		v.AddArg(y)
  5900  		return true
  5901  	}
  5902  	return false
  5903  }
  5904  func rewriteValueARM_OpARMCMPshiftRA_0(v *Value) bool {
  5905  	b := v.Block
  5906  	_ = b
  5907  	// match: (CMPshiftRA (MOVWconst [c]) x [d])
  5908  	// cond:
  5909  	// result: (InvertFlags (CMPconst [c] (SRAconst <x.Type> x [d])))
  5910  	for {
  5911  		d := v.AuxInt
  5912  		_ = v.Args[1]
  5913  		v_0 := v.Args[0]
  5914  		if v_0.Op != OpARMMOVWconst {
  5915  			break
  5916  		}
  5917  		c := v_0.AuxInt
  5918  		x := v.Args[1]
  5919  		v.reset(OpARMInvertFlags)
  5920  		v0 := b.NewValue0(v.Pos, OpARMCMPconst, types.TypeFlags)
  5921  		v0.AuxInt = c
  5922  		v1 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
  5923  		v1.AuxInt = d
  5924  		v1.AddArg(x)
  5925  		v0.AddArg(v1)
  5926  		v.AddArg(v0)
  5927  		return true
  5928  	}
  5929  	// match: (CMPshiftRA x (MOVWconst [c]) [d])
  5930  	// cond:
  5931  	// result: (CMPconst x [int64(int32(c)>>uint64(d))])
  5932  	for {
  5933  		d := v.AuxInt
  5934  		_ = v.Args[1]
  5935  		x := v.Args[0]
  5936  		v_1 := v.Args[1]
  5937  		if v_1.Op != OpARMMOVWconst {
  5938  			break
  5939  		}
  5940  		c := v_1.AuxInt
  5941  		v.reset(OpARMCMPconst)
  5942  		v.AuxInt = int64(int32(c) >> uint64(d))
  5943  		v.AddArg(x)
  5944  		return true
  5945  	}
  5946  	return false
  5947  }
  5948  func rewriteValueARM_OpARMCMPshiftRAreg_0(v *Value) bool {
  5949  	b := v.Block
  5950  	_ = b
  5951  	// match: (CMPshiftRAreg (MOVWconst [c]) x y)
  5952  	// cond:
  5953  	// result: (InvertFlags (CMPconst [c] (SRA <x.Type> x y)))
  5954  	for {
  5955  		_ = v.Args[2]
  5956  		v_0 := v.Args[0]
  5957  		if v_0.Op != OpARMMOVWconst {
  5958  			break
  5959  		}
  5960  		c := v_0.AuxInt
  5961  		x := v.Args[1]
  5962  		y := v.Args[2]
  5963  		v.reset(OpARMInvertFlags)
  5964  		v0 := b.NewValue0(v.Pos, OpARMCMPconst, types.TypeFlags)
  5965  		v0.AuxInt = c
  5966  		v1 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
  5967  		v1.AddArg(x)
  5968  		v1.AddArg(y)
  5969  		v0.AddArg(v1)
  5970  		v.AddArg(v0)
  5971  		return true
  5972  	}
  5973  	// match: (CMPshiftRAreg x y (MOVWconst [c]))
  5974  	// cond:
  5975  	// result: (CMPshiftRA x y [c])
  5976  	for {
  5977  		_ = v.Args[2]
  5978  		x := v.Args[0]
  5979  		y := v.Args[1]
  5980  		v_2 := v.Args[2]
  5981  		if v_2.Op != OpARMMOVWconst {
  5982  			break
  5983  		}
  5984  		c := v_2.AuxInt
  5985  		v.reset(OpARMCMPshiftRA)
  5986  		v.AuxInt = c
  5987  		v.AddArg(x)
  5988  		v.AddArg(y)
  5989  		return true
  5990  	}
  5991  	return false
  5992  }
  5993  func rewriteValueARM_OpARMCMPshiftRL_0(v *Value) bool {
  5994  	b := v.Block
  5995  	_ = b
  5996  	// match: (CMPshiftRL (MOVWconst [c]) x [d])
  5997  	// cond:
  5998  	// result: (InvertFlags (CMPconst [c] (SRLconst <x.Type> x [d])))
  5999  	for {
  6000  		d := v.AuxInt
  6001  		_ = v.Args[1]
  6002  		v_0 := v.Args[0]
  6003  		if v_0.Op != OpARMMOVWconst {
  6004  			break
  6005  		}
  6006  		c := v_0.AuxInt
  6007  		x := v.Args[1]
  6008  		v.reset(OpARMInvertFlags)
  6009  		v0 := b.NewValue0(v.Pos, OpARMCMPconst, types.TypeFlags)
  6010  		v0.AuxInt = c
  6011  		v1 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
  6012  		v1.AuxInt = d
  6013  		v1.AddArg(x)
  6014  		v0.AddArg(v1)
  6015  		v.AddArg(v0)
  6016  		return true
  6017  	}
  6018  	// match: (CMPshiftRL x (MOVWconst [c]) [d])
  6019  	// cond:
  6020  	// result: (CMPconst x [int64(int32(uint32(c)>>uint64(d)))])
  6021  	for {
  6022  		d := v.AuxInt
  6023  		_ = v.Args[1]
  6024  		x := v.Args[0]
  6025  		v_1 := v.Args[1]
  6026  		if v_1.Op != OpARMMOVWconst {
  6027  			break
  6028  		}
  6029  		c := v_1.AuxInt
  6030  		v.reset(OpARMCMPconst)
  6031  		v.AuxInt = int64(int32(uint32(c) >> uint64(d)))
  6032  		v.AddArg(x)
  6033  		return true
  6034  	}
  6035  	return false
  6036  }
  6037  func rewriteValueARM_OpARMCMPshiftRLreg_0(v *Value) bool {
  6038  	b := v.Block
  6039  	_ = b
  6040  	// match: (CMPshiftRLreg (MOVWconst [c]) x y)
  6041  	// cond:
  6042  	// result: (InvertFlags (CMPconst [c] (SRL <x.Type> x y)))
  6043  	for {
  6044  		_ = v.Args[2]
  6045  		v_0 := v.Args[0]
  6046  		if v_0.Op != OpARMMOVWconst {
  6047  			break
  6048  		}
  6049  		c := v_0.AuxInt
  6050  		x := v.Args[1]
  6051  		y := v.Args[2]
  6052  		v.reset(OpARMInvertFlags)
  6053  		v0 := b.NewValue0(v.Pos, OpARMCMPconst, types.TypeFlags)
  6054  		v0.AuxInt = c
  6055  		v1 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
  6056  		v1.AddArg(x)
  6057  		v1.AddArg(y)
  6058  		v0.AddArg(v1)
  6059  		v.AddArg(v0)
  6060  		return true
  6061  	}
  6062  	// match: (CMPshiftRLreg x y (MOVWconst [c]))
  6063  	// cond:
  6064  	// result: (CMPshiftRL x y [c])
  6065  	for {
  6066  		_ = v.Args[2]
  6067  		x := v.Args[0]
  6068  		y := v.Args[1]
  6069  		v_2 := v.Args[2]
  6070  		if v_2.Op != OpARMMOVWconst {
  6071  			break
  6072  		}
  6073  		c := v_2.AuxInt
  6074  		v.reset(OpARMCMPshiftRL)
  6075  		v.AuxInt = c
  6076  		v.AddArg(x)
  6077  		v.AddArg(y)
  6078  		return true
  6079  	}
  6080  	return false
  6081  }
  6082  func rewriteValueARM_OpARMEqual_0(v *Value) bool {
  6083  	// match: (Equal (FlagEQ))
  6084  	// cond:
  6085  	// result: (MOVWconst [1])
  6086  	for {
  6087  		v_0 := v.Args[0]
  6088  		if v_0.Op != OpARMFlagEQ {
  6089  			break
  6090  		}
  6091  		v.reset(OpARMMOVWconst)
  6092  		v.AuxInt = 1
  6093  		return true
  6094  	}
  6095  	// match: (Equal (FlagLT_ULT))
  6096  	// cond:
  6097  	// result: (MOVWconst [0])
  6098  	for {
  6099  		v_0 := v.Args[0]
  6100  		if v_0.Op != OpARMFlagLT_ULT {
  6101  			break
  6102  		}
  6103  		v.reset(OpARMMOVWconst)
  6104  		v.AuxInt = 0
  6105  		return true
  6106  	}
  6107  	// match: (Equal (FlagLT_UGT))
  6108  	// cond:
  6109  	// result: (MOVWconst [0])
  6110  	for {
  6111  		v_0 := v.Args[0]
  6112  		if v_0.Op != OpARMFlagLT_UGT {
  6113  			break
  6114  		}
  6115  		v.reset(OpARMMOVWconst)
  6116  		v.AuxInt = 0
  6117  		return true
  6118  	}
  6119  	// match: (Equal (FlagGT_ULT))
  6120  	// cond:
  6121  	// result: (MOVWconst [0])
  6122  	for {
  6123  		v_0 := v.Args[0]
  6124  		if v_0.Op != OpARMFlagGT_ULT {
  6125  			break
  6126  		}
  6127  		v.reset(OpARMMOVWconst)
  6128  		v.AuxInt = 0
  6129  		return true
  6130  	}
  6131  	// match: (Equal (FlagGT_UGT))
  6132  	// cond:
  6133  	// result: (MOVWconst [0])
  6134  	for {
  6135  		v_0 := v.Args[0]
  6136  		if v_0.Op != OpARMFlagGT_UGT {
  6137  			break
  6138  		}
  6139  		v.reset(OpARMMOVWconst)
  6140  		v.AuxInt = 0
  6141  		return true
  6142  	}
  6143  	// match: (Equal (InvertFlags x))
  6144  	// cond:
  6145  	// result: (Equal x)
  6146  	for {
  6147  		v_0 := v.Args[0]
  6148  		if v_0.Op != OpARMInvertFlags {
  6149  			break
  6150  		}
  6151  		x := v_0.Args[0]
  6152  		v.reset(OpARMEqual)
  6153  		v.AddArg(x)
  6154  		return true
  6155  	}
  6156  	return false
  6157  }
  6158  func rewriteValueARM_OpARMGreaterEqual_0(v *Value) bool {
  6159  	// match: (GreaterEqual (FlagEQ))
  6160  	// cond:
  6161  	// result: (MOVWconst [1])
  6162  	for {
  6163  		v_0 := v.Args[0]
  6164  		if v_0.Op != OpARMFlagEQ {
  6165  			break
  6166  		}
  6167  		v.reset(OpARMMOVWconst)
  6168  		v.AuxInt = 1
  6169  		return true
  6170  	}
  6171  	// match: (GreaterEqual (FlagLT_ULT))
  6172  	// cond:
  6173  	// result: (MOVWconst [0])
  6174  	for {
  6175  		v_0 := v.Args[0]
  6176  		if v_0.Op != OpARMFlagLT_ULT {
  6177  			break
  6178  		}
  6179  		v.reset(OpARMMOVWconst)
  6180  		v.AuxInt = 0
  6181  		return true
  6182  	}
  6183  	// match: (GreaterEqual (FlagLT_UGT))
  6184  	// cond:
  6185  	// result: (MOVWconst [0])
  6186  	for {
  6187  		v_0 := v.Args[0]
  6188  		if v_0.Op != OpARMFlagLT_UGT {
  6189  			break
  6190  		}
  6191  		v.reset(OpARMMOVWconst)
  6192  		v.AuxInt = 0
  6193  		return true
  6194  	}
  6195  	// match: (GreaterEqual (FlagGT_ULT))
  6196  	// cond:
  6197  	// result: (MOVWconst [1])
  6198  	for {
  6199  		v_0 := v.Args[0]
  6200  		if v_0.Op != OpARMFlagGT_ULT {
  6201  			break
  6202  		}
  6203  		v.reset(OpARMMOVWconst)
  6204  		v.AuxInt = 1
  6205  		return true
  6206  	}
  6207  	// match: (GreaterEqual (FlagGT_UGT))
  6208  	// cond:
  6209  	// result: (MOVWconst [1])
  6210  	for {
  6211  		v_0 := v.Args[0]
  6212  		if v_0.Op != OpARMFlagGT_UGT {
  6213  			break
  6214  		}
  6215  		v.reset(OpARMMOVWconst)
  6216  		v.AuxInt = 1
  6217  		return true
  6218  	}
  6219  	// match: (GreaterEqual (InvertFlags x))
  6220  	// cond:
  6221  	// result: (LessEqual x)
  6222  	for {
  6223  		v_0 := v.Args[0]
  6224  		if v_0.Op != OpARMInvertFlags {
  6225  			break
  6226  		}
  6227  		x := v_0.Args[0]
  6228  		v.reset(OpARMLessEqual)
  6229  		v.AddArg(x)
  6230  		return true
  6231  	}
  6232  	return false
  6233  }
  6234  func rewriteValueARM_OpARMGreaterEqualU_0(v *Value) bool {
  6235  	// match: (GreaterEqualU (FlagEQ))
  6236  	// cond:
  6237  	// result: (MOVWconst [1])
  6238  	for {
  6239  		v_0 := v.Args[0]
  6240  		if v_0.Op != OpARMFlagEQ {
  6241  			break
  6242  		}
  6243  		v.reset(OpARMMOVWconst)
  6244  		v.AuxInt = 1
  6245  		return true
  6246  	}
  6247  	// match: (GreaterEqualU (FlagLT_ULT))
  6248  	// cond:
  6249  	// result: (MOVWconst [0])
  6250  	for {
  6251  		v_0 := v.Args[0]
  6252  		if v_0.Op != OpARMFlagLT_ULT {
  6253  			break
  6254  		}
  6255  		v.reset(OpARMMOVWconst)
  6256  		v.AuxInt = 0
  6257  		return true
  6258  	}
  6259  	// match: (GreaterEqualU (FlagLT_UGT))
  6260  	// cond:
  6261  	// result: (MOVWconst [1])
  6262  	for {
  6263  		v_0 := v.Args[0]
  6264  		if v_0.Op != OpARMFlagLT_UGT {
  6265  			break
  6266  		}
  6267  		v.reset(OpARMMOVWconst)
  6268  		v.AuxInt = 1
  6269  		return true
  6270  	}
  6271  	// match: (GreaterEqualU (FlagGT_ULT))
  6272  	// cond:
  6273  	// result: (MOVWconst [0])
  6274  	for {
  6275  		v_0 := v.Args[0]
  6276  		if v_0.Op != OpARMFlagGT_ULT {
  6277  			break
  6278  		}
  6279  		v.reset(OpARMMOVWconst)
  6280  		v.AuxInt = 0
  6281  		return true
  6282  	}
  6283  	// match: (GreaterEqualU (FlagGT_UGT))
  6284  	// cond:
  6285  	// result: (MOVWconst [1])
  6286  	for {
  6287  		v_0 := v.Args[0]
  6288  		if v_0.Op != OpARMFlagGT_UGT {
  6289  			break
  6290  		}
  6291  		v.reset(OpARMMOVWconst)
  6292  		v.AuxInt = 1
  6293  		return true
  6294  	}
  6295  	// match: (GreaterEqualU (InvertFlags x))
  6296  	// cond:
  6297  	// result: (LessEqualU x)
  6298  	for {
  6299  		v_0 := v.Args[0]
  6300  		if v_0.Op != OpARMInvertFlags {
  6301  			break
  6302  		}
  6303  		x := v_0.Args[0]
  6304  		v.reset(OpARMLessEqualU)
  6305  		v.AddArg(x)
  6306  		return true
  6307  	}
  6308  	return false
  6309  }
  6310  func rewriteValueARM_OpARMGreaterThan_0(v *Value) bool {
  6311  	// match: (GreaterThan (FlagEQ))
  6312  	// cond:
  6313  	// result: (MOVWconst [0])
  6314  	for {
  6315  		v_0 := v.Args[0]
  6316  		if v_0.Op != OpARMFlagEQ {
  6317  			break
  6318  		}
  6319  		v.reset(OpARMMOVWconst)
  6320  		v.AuxInt = 0
  6321  		return true
  6322  	}
  6323  	// match: (GreaterThan (FlagLT_ULT))
  6324  	// cond:
  6325  	// result: (MOVWconst [0])
  6326  	for {
  6327  		v_0 := v.Args[0]
  6328  		if v_0.Op != OpARMFlagLT_ULT {
  6329  			break
  6330  		}
  6331  		v.reset(OpARMMOVWconst)
  6332  		v.AuxInt = 0
  6333  		return true
  6334  	}
  6335  	// match: (GreaterThan (FlagLT_UGT))
  6336  	// cond:
  6337  	// result: (MOVWconst [0])
  6338  	for {
  6339  		v_0 := v.Args[0]
  6340  		if v_0.Op != OpARMFlagLT_UGT {
  6341  			break
  6342  		}
  6343  		v.reset(OpARMMOVWconst)
  6344  		v.AuxInt = 0
  6345  		return true
  6346  	}
  6347  	// match: (GreaterThan (FlagGT_ULT))
  6348  	// cond:
  6349  	// result: (MOVWconst [1])
  6350  	for {
  6351  		v_0 := v.Args[0]
  6352  		if v_0.Op != OpARMFlagGT_ULT {
  6353  			break
  6354  		}
  6355  		v.reset(OpARMMOVWconst)
  6356  		v.AuxInt = 1
  6357  		return true
  6358  	}
  6359  	// match: (GreaterThan (FlagGT_UGT))
  6360  	// cond:
  6361  	// result: (MOVWconst [1])
  6362  	for {
  6363  		v_0 := v.Args[0]
  6364  		if v_0.Op != OpARMFlagGT_UGT {
  6365  			break
  6366  		}
  6367  		v.reset(OpARMMOVWconst)
  6368  		v.AuxInt = 1
  6369  		return true
  6370  	}
  6371  	// match: (GreaterThan (InvertFlags x))
  6372  	// cond:
  6373  	// result: (LessThan x)
  6374  	for {
  6375  		v_0 := v.Args[0]
  6376  		if v_0.Op != OpARMInvertFlags {
  6377  			break
  6378  		}
  6379  		x := v_0.Args[0]
  6380  		v.reset(OpARMLessThan)
  6381  		v.AddArg(x)
  6382  		return true
  6383  	}
  6384  	return false
  6385  }
  6386  func rewriteValueARM_OpARMGreaterThanU_0(v *Value) bool {
  6387  	// match: (GreaterThanU (FlagEQ))
  6388  	// cond:
  6389  	// result: (MOVWconst [0])
  6390  	for {
  6391  		v_0 := v.Args[0]
  6392  		if v_0.Op != OpARMFlagEQ {
  6393  			break
  6394  		}
  6395  		v.reset(OpARMMOVWconst)
  6396  		v.AuxInt = 0
  6397  		return true
  6398  	}
  6399  	// match: (GreaterThanU (FlagLT_ULT))
  6400  	// cond:
  6401  	// result: (MOVWconst [0])
  6402  	for {
  6403  		v_0 := v.Args[0]
  6404  		if v_0.Op != OpARMFlagLT_ULT {
  6405  			break
  6406  		}
  6407  		v.reset(OpARMMOVWconst)
  6408  		v.AuxInt = 0
  6409  		return true
  6410  	}
  6411  	// match: (GreaterThanU (FlagLT_UGT))
  6412  	// cond:
  6413  	// result: (MOVWconst [1])
  6414  	for {
  6415  		v_0 := v.Args[0]
  6416  		if v_0.Op != OpARMFlagLT_UGT {
  6417  			break
  6418  		}
  6419  		v.reset(OpARMMOVWconst)
  6420  		v.AuxInt = 1
  6421  		return true
  6422  	}
  6423  	// match: (GreaterThanU (FlagGT_ULT))
  6424  	// cond:
  6425  	// result: (MOVWconst [0])
  6426  	for {
  6427  		v_0 := v.Args[0]
  6428  		if v_0.Op != OpARMFlagGT_ULT {
  6429  			break
  6430  		}
  6431  		v.reset(OpARMMOVWconst)
  6432  		v.AuxInt = 0
  6433  		return true
  6434  	}
  6435  	// match: (GreaterThanU (FlagGT_UGT))
  6436  	// cond:
  6437  	// result: (MOVWconst [1])
  6438  	for {
  6439  		v_0 := v.Args[0]
  6440  		if v_0.Op != OpARMFlagGT_UGT {
  6441  			break
  6442  		}
  6443  		v.reset(OpARMMOVWconst)
  6444  		v.AuxInt = 1
  6445  		return true
  6446  	}
  6447  	// match: (GreaterThanU (InvertFlags x))
  6448  	// cond:
  6449  	// result: (LessThanU x)
  6450  	for {
  6451  		v_0 := v.Args[0]
  6452  		if v_0.Op != OpARMInvertFlags {
  6453  			break
  6454  		}
  6455  		x := v_0.Args[0]
  6456  		v.reset(OpARMLessThanU)
  6457  		v.AddArg(x)
  6458  		return true
  6459  	}
  6460  	return false
  6461  }
  6462  func rewriteValueARM_OpARMLessEqual_0(v *Value) bool {
  6463  	// match: (LessEqual (FlagEQ))
  6464  	// cond:
  6465  	// result: (MOVWconst [1])
  6466  	for {
  6467  		v_0 := v.Args[0]
  6468  		if v_0.Op != OpARMFlagEQ {
  6469  			break
  6470  		}
  6471  		v.reset(OpARMMOVWconst)
  6472  		v.AuxInt = 1
  6473  		return true
  6474  	}
  6475  	// match: (LessEqual (FlagLT_ULT))
  6476  	// cond:
  6477  	// result: (MOVWconst [1])
  6478  	for {
  6479  		v_0 := v.Args[0]
  6480  		if v_0.Op != OpARMFlagLT_ULT {
  6481  			break
  6482  		}
  6483  		v.reset(OpARMMOVWconst)
  6484  		v.AuxInt = 1
  6485  		return true
  6486  	}
  6487  	// match: (LessEqual (FlagLT_UGT))
  6488  	// cond:
  6489  	// result: (MOVWconst [1])
  6490  	for {
  6491  		v_0 := v.Args[0]
  6492  		if v_0.Op != OpARMFlagLT_UGT {
  6493  			break
  6494  		}
  6495  		v.reset(OpARMMOVWconst)
  6496  		v.AuxInt = 1
  6497  		return true
  6498  	}
  6499  	// match: (LessEqual (FlagGT_ULT))
  6500  	// cond:
  6501  	// result: (MOVWconst [0])
  6502  	for {
  6503  		v_0 := v.Args[0]
  6504  		if v_0.Op != OpARMFlagGT_ULT {
  6505  			break
  6506  		}
  6507  		v.reset(OpARMMOVWconst)
  6508  		v.AuxInt = 0
  6509  		return true
  6510  	}
  6511  	// match: (LessEqual (FlagGT_UGT))
  6512  	// cond:
  6513  	// result: (MOVWconst [0])
  6514  	for {
  6515  		v_0 := v.Args[0]
  6516  		if v_0.Op != OpARMFlagGT_UGT {
  6517  			break
  6518  		}
  6519  		v.reset(OpARMMOVWconst)
  6520  		v.AuxInt = 0
  6521  		return true
  6522  	}
  6523  	// match: (LessEqual (InvertFlags x))
  6524  	// cond:
  6525  	// result: (GreaterEqual x)
  6526  	for {
  6527  		v_0 := v.Args[0]
  6528  		if v_0.Op != OpARMInvertFlags {
  6529  			break
  6530  		}
  6531  		x := v_0.Args[0]
  6532  		v.reset(OpARMGreaterEqual)
  6533  		v.AddArg(x)
  6534  		return true
  6535  	}
  6536  	return false
  6537  }
  6538  func rewriteValueARM_OpARMLessEqualU_0(v *Value) bool {
  6539  	// match: (LessEqualU (FlagEQ))
  6540  	// cond:
  6541  	// result: (MOVWconst [1])
  6542  	for {
  6543  		v_0 := v.Args[0]
  6544  		if v_0.Op != OpARMFlagEQ {
  6545  			break
  6546  		}
  6547  		v.reset(OpARMMOVWconst)
  6548  		v.AuxInt = 1
  6549  		return true
  6550  	}
  6551  	// match: (LessEqualU (FlagLT_ULT))
  6552  	// cond:
  6553  	// result: (MOVWconst [1])
  6554  	for {
  6555  		v_0 := v.Args[0]
  6556  		if v_0.Op != OpARMFlagLT_ULT {
  6557  			break
  6558  		}
  6559  		v.reset(OpARMMOVWconst)
  6560  		v.AuxInt = 1
  6561  		return true
  6562  	}
  6563  	// match: (LessEqualU (FlagLT_UGT))
  6564  	// cond:
  6565  	// result: (MOVWconst [0])
  6566  	for {
  6567  		v_0 := v.Args[0]
  6568  		if v_0.Op != OpARMFlagLT_UGT {
  6569  			break
  6570  		}
  6571  		v.reset(OpARMMOVWconst)
  6572  		v.AuxInt = 0
  6573  		return true
  6574  	}
  6575  	// match: (LessEqualU (FlagGT_ULT))
  6576  	// cond:
  6577  	// result: (MOVWconst [1])
  6578  	for {
  6579  		v_0 := v.Args[0]
  6580  		if v_0.Op != OpARMFlagGT_ULT {
  6581  			break
  6582  		}
  6583  		v.reset(OpARMMOVWconst)
  6584  		v.AuxInt = 1
  6585  		return true
  6586  	}
  6587  	// match: (LessEqualU (FlagGT_UGT))
  6588  	// cond:
  6589  	// result: (MOVWconst [0])
  6590  	for {
  6591  		v_0 := v.Args[0]
  6592  		if v_0.Op != OpARMFlagGT_UGT {
  6593  			break
  6594  		}
  6595  		v.reset(OpARMMOVWconst)
  6596  		v.AuxInt = 0
  6597  		return true
  6598  	}
  6599  	// match: (LessEqualU (InvertFlags x))
  6600  	// cond:
  6601  	// result: (GreaterEqualU x)
  6602  	for {
  6603  		v_0 := v.Args[0]
  6604  		if v_0.Op != OpARMInvertFlags {
  6605  			break
  6606  		}
  6607  		x := v_0.Args[0]
  6608  		v.reset(OpARMGreaterEqualU)
  6609  		v.AddArg(x)
  6610  		return true
  6611  	}
  6612  	return false
  6613  }
  6614  func rewriteValueARM_OpARMLessThan_0(v *Value) bool {
  6615  	// match: (LessThan (FlagEQ))
  6616  	// cond:
  6617  	// result: (MOVWconst [0])
  6618  	for {
  6619  		v_0 := v.Args[0]
  6620  		if v_0.Op != OpARMFlagEQ {
  6621  			break
  6622  		}
  6623  		v.reset(OpARMMOVWconst)
  6624  		v.AuxInt = 0
  6625  		return true
  6626  	}
  6627  	// match: (LessThan (FlagLT_ULT))
  6628  	// cond:
  6629  	// result: (MOVWconst [1])
  6630  	for {
  6631  		v_0 := v.Args[0]
  6632  		if v_0.Op != OpARMFlagLT_ULT {
  6633  			break
  6634  		}
  6635  		v.reset(OpARMMOVWconst)
  6636  		v.AuxInt = 1
  6637  		return true
  6638  	}
  6639  	// match: (LessThan (FlagLT_UGT))
  6640  	// cond:
  6641  	// result: (MOVWconst [1])
  6642  	for {
  6643  		v_0 := v.Args[0]
  6644  		if v_0.Op != OpARMFlagLT_UGT {
  6645  			break
  6646  		}
  6647  		v.reset(OpARMMOVWconst)
  6648  		v.AuxInt = 1
  6649  		return true
  6650  	}
  6651  	// match: (LessThan (FlagGT_ULT))
  6652  	// cond:
  6653  	// result: (MOVWconst [0])
  6654  	for {
  6655  		v_0 := v.Args[0]
  6656  		if v_0.Op != OpARMFlagGT_ULT {
  6657  			break
  6658  		}
  6659  		v.reset(OpARMMOVWconst)
  6660  		v.AuxInt = 0
  6661  		return true
  6662  	}
  6663  	// match: (LessThan (FlagGT_UGT))
  6664  	// cond:
  6665  	// result: (MOVWconst [0])
  6666  	for {
  6667  		v_0 := v.Args[0]
  6668  		if v_0.Op != OpARMFlagGT_UGT {
  6669  			break
  6670  		}
  6671  		v.reset(OpARMMOVWconst)
  6672  		v.AuxInt = 0
  6673  		return true
  6674  	}
  6675  	// match: (LessThan (InvertFlags x))
  6676  	// cond:
  6677  	// result: (GreaterThan x)
  6678  	for {
  6679  		v_0 := v.Args[0]
  6680  		if v_0.Op != OpARMInvertFlags {
  6681  			break
  6682  		}
  6683  		x := v_0.Args[0]
  6684  		v.reset(OpARMGreaterThan)
  6685  		v.AddArg(x)
  6686  		return true
  6687  	}
  6688  	return false
  6689  }
  6690  func rewriteValueARM_OpARMLessThanU_0(v *Value) bool {
  6691  	// match: (LessThanU (FlagEQ))
  6692  	// cond:
  6693  	// result: (MOVWconst [0])
  6694  	for {
  6695  		v_0 := v.Args[0]
  6696  		if v_0.Op != OpARMFlagEQ {
  6697  			break
  6698  		}
  6699  		v.reset(OpARMMOVWconst)
  6700  		v.AuxInt = 0
  6701  		return true
  6702  	}
  6703  	// match: (LessThanU (FlagLT_ULT))
  6704  	// cond:
  6705  	// result: (MOVWconst [1])
  6706  	for {
  6707  		v_0 := v.Args[0]
  6708  		if v_0.Op != OpARMFlagLT_ULT {
  6709  			break
  6710  		}
  6711  		v.reset(OpARMMOVWconst)
  6712  		v.AuxInt = 1
  6713  		return true
  6714  	}
  6715  	// match: (LessThanU (FlagLT_UGT))
  6716  	// cond:
  6717  	// result: (MOVWconst [0])
  6718  	for {
  6719  		v_0 := v.Args[0]
  6720  		if v_0.Op != OpARMFlagLT_UGT {
  6721  			break
  6722  		}
  6723  		v.reset(OpARMMOVWconst)
  6724  		v.AuxInt = 0
  6725  		return true
  6726  	}
  6727  	// match: (LessThanU (FlagGT_ULT))
  6728  	// cond:
  6729  	// result: (MOVWconst [1])
  6730  	for {
  6731  		v_0 := v.Args[0]
  6732  		if v_0.Op != OpARMFlagGT_ULT {
  6733  			break
  6734  		}
  6735  		v.reset(OpARMMOVWconst)
  6736  		v.AuxInt = 1
  6737  		return true
  6738  	}
  6739  	// match: (LessThanU (FlagGT_UGT))
  6740  	// cond:
  6741  	// result: (MOVWconst [0])
  6742  	for {
  6743  		v_0 := v.Args[0]
  6744  		if v_0.Op != OpARMFlagGT_UGT {
  6745  			break
  6746  		}
  6747  		v.reset(OpARMMOVWconst)
  6748  		v.AuxInt = 0
  6749  		return true
  6750  	}
  6751  	// match: (LessThanU (InvertFlags x))
  6752  	// cond:
  6753  	// result: (GreaterThanU x)
  6754  	for {
  6755  		v_0 := v.Args[0]
  6756  		if v_0.Op != OpARMInvertFlags {
  6757  			break
  6758  		}
  6759  		x := v_0.Args[0]
  6760  		v.reset(OpARMGreaterThanU)
  6761  		v.AddArg(x)
  6762  		return true
  6763  	}
  6764  	return false
  6765  }
  6766  func rewriteValueARM_OpARMMOVBUload_0(v *Value) bool {
  6767  	b := v.Block
  6768  	_ = b
  6769  	config := b.Func.Config
  6770  	_ = config
  6771  	// match: (MOVBUload [off1] {sym} (ADDconst [off2] ptr) mem)
  6772  	// cond:
  6773  	// result: (MOVBUload [off1+off2] {sym} ptr mem)
  6774  	for {
  6775  		off1 := v.AuxInt
  6776  		sym := v.Aux
  6777  		_ = v.Args[1]
  6778  		v_0 := v.Args[0]
  6779  		if v_0.Op != OpARMADDconst {
  6780  			break
  6781  		}
  6782  		off2 := v_0.AuxInt
  6783  		ptr := v_0.Args[0]
  6784  		mem := v.Args[1]
  6785  		v.reset(OpARMMOVBUload)
  6786  		v.AuxInt = off1 + off2
  6787  		v.Aux = sym
  6788  		v.AddArg(ptr)
  6789  		v.AddArg(mem)
  6790  		return true
  6791  	}
  6792  	// match: (MOVBUload [off1] {sym} (SUBconst [off2] ptr) mem)
  6793  	// cond:
  6794  	// result: (MOVBUload [off1-off2] {sym} ptr mem)
  6795  	for {
  6796  		off1 := v.AuxInt
  6797  		sym := v.Aux
  6798  		_ = v.Args[1]
  6799  		v_0 := v.Args[0]
  6800  		if v_0.Op != OpARMSUBconst {
  6801  			break
  6802  		}
  6803  		off2 := v_0.AuxInt
  6804  		ptr := v_0.Args[0]
  6805  		mem := v.Args[1]
  6806  		v.reset(OpARMMOVBUload)
  6807  		v.AuxInt = off1 - off2
  6808  		v.Aux = sym
  6809  		v.AddArg(ptr)
  6810  		v.AddArg(mem)
  6811  		return true
  6812  	}
  6813  	// match: (MOVBUload [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) mem)
  6814  	// cond: canMergeSym(sym1,sym2)
  6815  	// result: (MOVBUload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  6816  	for {
  6817  		off1 := v.AuxInt
  6818  		sym1 := v.Aux
  6819  		_ = v.Args[1]
  6820  		v_0 := v.Args[0]
  6821  		if v_0.Op != OpARMMOVWaddr {
  6822  			break
  6823  		}
  6824  		off2 := v_0.AuxInt
  6825  		sym2 := v_0.Aux
  6826  		ptr := v_0.Args[0]
  6827  		mem := v.Args[1]
  6828  		if !(canMergeSym(sym1, sym2)) {
  6829  			break
  6830  		}
  6831  		v.reset(OpARMMOVBUload)
  6832  		v.AuxInt = off1 + off2
  6833  		v.Aux = mergeSym(sym1, sym2)
  6834  		v.AddArg(ptr)
  6835  		v.AddArg(mem)
  6836  		return true
  6837  	}
  6838  	// match: (MOVBUload [off] {sym} ptr (MOVBstore [off2] {sym2} ptr2 x _))
  6839  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  6840  	// result: (MOVBUreg x)
  6841  	for {
  6842  		off := v.AuxInt
  6843  		sym := v.Aux
  6844  		_ = v.Args[1]
  6845  		ptr := v.Args[0]
  6846  		v_1 := v.Args[1]
  6847  		if v_1.Op != OpARMMOVBstore {
  6848  			break
  6849  		}
  6850  		off2 := v_1.AuxInt
  6851  		sym2 := v_1.Aux
  6852  		_ = v_1.Args[2]
  6853  		ptr2 := v_1.Args[0]
  6854  		x := v_1.Args[1]
  6855  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  6856  			break
  6857  		}
  6858  		v.reset(OpARMMOVBUreg)
  6859  		v.AddArg(x)
  6860  		return true
  6861  	}
  6862  	// match: (MOVBUload [0] {sym} (ADD ptr idx) mem)
  6863  	// cond: sym == nil && !config.nacl
  6864  	// result: (MOVBUloadidx ptr idx mem)
  6865  	for {
  6866  		if v.AuxInt != 0 {
  6867  			break
  6868  		}
  6869  		sym := v.Aux
  6870  		_ = v.Args[1]
  6871  		v_0 := v.Args[0]
  6872  		if v_0.Op != OpARMADD {
  6873  			break
  6874  		}
  6875  		_ = v_0.Args[1]
  6876  		ptr := v_0.Args[0]
  6877  		idx := v_0.Args[1]
  6878  		mem := v.Args[1]
  6879  		if !(sym == nil && !config.nacl) {
  6880  			break
  6881  		}
  6882  		v.reset(OpARMMOVBUloadidx)
  6883  		v.AddArg(ptr)
  6884  		v.AddArg(idx)
  6885  		v.AddArg(mem)
  6886  		return true
  6887  	}
  6888  	// match: (MOVBUload [off] {sym} (SB) _)
  6889  	// cond: symIsRO(sym)
  6890  	// result: (MOVWconst [int64(read8(sym, off))])
  6891  	for {
  6892  		off := v.AuxInt
  6893  		sym := v.Aux
  6894  		_ = v.Args[1]
  6895  		v_0 := v.Args[0]
  6896  		if v_0.Op != OpSB {
  6897  			break
  6898  		}
  6899  		if !(symIsRO(sym)) {
  6900  			break
  6901  		}
  6902  		v.reset(OpARMMOVWconst)
  6903  		v.AuxInt = int64(read8(sym, off))
  6904  		return true
  6905  	}
  6906  	return false
  6907  }
  6908  func rewriteValueARM_OpARMMOVBUloadidx_0(v *Value) bool {
  6909  	// match: (MOVBUloadidx ptr idx (MOVBstoreidx ptr2 idx x _))
  6910  	// cond: isSamePtr(ptr, ptr2)
  6911  	// result: (MOVBUreg x)
  6912  	for {
  6913  		_ = v.Args[2]
  6914  		ptr := v.Args[0]
  6915  		idx := v.Args[1]
  6916  		v_2 := v.Args[2]
  6917  		if v_2.Op != OpARMMOVBstoreidx {
  6918  			break
  6919  		}
  6920  		_ = v_2.Args[3]
  6921  		ptr2 := v_2.Args[0]
  6922  		if idx != v_2.Args[1] {
  6923  			break
  6924  		}
  6925  		x := v_2.Args[2]
  6926  		if !(isSamePtr(ptr, ptr2)) {
  6927  			break
  6928  		}
  6929  		v.reset(OpARMMOVBUreg)
  6930  		v.AddArg(x)
  6931  		return true
  6932  	}
  6933  	// match: (MOVBUloadidx ptr (MOVWconst [c]) mem)
  6934  	// cond:
  6935  	// result: (MOVBUload [c] ptr mem)
  6936  	for {
  6937  		_ = v.Args[2]
  6938  		ptr := v.Args[0]
  6939  		v_1 := v.Args[1]
  6940  		if v_1.Op != OpARMMOVWconst {
  6941  			break
  6942  		}
  6943  		c := v_1.AuxInt
  6944  		mem := v.Args[2]
  6945  		v.reset(OpARMMOVBUload)
  6946  		v.AuxInt = c
  6947  		v.AddArg(ptr)
  6948  		v.AddArg(mem)
  6949  		return true
  6950  	}
  6951  	// match: (MOVBUloadidx (MOVWconst [c]) ptr mem)
  6952  	// cond:
  6953  	// result: (MOVBUload [c] ptr mem)
  6954  	for {
  6955  		_ = v.Args[2]
  6956  		v_0 := v.Args[0]
  6957  		if v_0.Op != OpARMMOVWconst {
  6958  			break
  6959  		}
  6960  		c := v_0.AuxInt
  6961  		ptr := v.Args[1]
  6962  		mem := v.Args[2]
  6963  		v.reset(OpARMMOVBUload)
  6964  		v.AuxInt = c
  6965  		v.AddArg(ptr)
  6966  		v.AddArg(mem)
  6967  		return true
  6968  	}
  6969  	return false
  6970  }
  6971  func rewriteValueARM_OpARMMOVBUreg_0(v *Value) bool {
  6972  	// match: (MOVBUreg x:(MOVBUload _ _))
  6973  	// cond:
  6974  	// result: (MOVWreg x)
  6975  	for {
  6976  		x := v.Args[0]
  6977  		if x.Op != OpARMMOVBUload {
  6978  			break
  6979  		}
  6980  		_ = x.Args[1]
  6981  		v.reset(OpARMMOVWreg)
  6982  		v.AddArg(x)
  6983  		return true
  6984  	}
  6985  	// match: (MOVBUreg (ANDconst [c] x))
  6986  	// cond:
  6987  	// result: (ANDconst [c&0xff] x)
  6988  	for {
  6989  		v_0 := v.Args[0]
  6990  		if v_0.Op != OpARMANDconst {
  6991  			break
  6992  		}
  6993  		c := v_0.AuxInt
  6994  		x := v_0.Args[0]
  6995  		v.reset(OpARMANDconst)
  6996  		v.AuxInt = c & 0xff
  6997  		v.AddArg(x)
  6998  		return true
  6999  	}
  7000  	// match: (MOVBUreg x:(MOVBUreg _))
  7001  	// cond:
  7002  	// result: (MOVWreg x)
  7003  	for {
  7004  		x := v.Args[0]
  7005  		if x.Op != OpARMMOVBUreg {
  7006  			break
  7007  		}
  7008  		v.reset(OpARMMOVWreg)
  7009  		v.AddArg(x)
  7010  		return true
  7011  	}
  7012  	// match: (MOVBUreg (MOVWconst [c]))
  7013  	// cond:
  7014  	// result: (MOVWconst [int64(uint8(c))])
  7015  	for {
  7016  		v_0 := v.Args[0]
  7017  		if v_0.Op != OpARMMOVWconst {
  7018  			break
  7019  		}
  7020  		c := v_0.AuxInt
  7021  		v.reset(OpARMMOVWconst)
  7022  		v.AuxInt = int64(uint8(c))
  7023  		return true
  7024  	}
  7025  	return false
  7026  }
  7027  func rewriteValueARM_OpARMMOVBload_0(v *Value) bool {
  7028  	b := v.Block
  7029  	_ = b
  7030  	config := b.Func.Config
  7031  	_ = config
  7032  	// match: (MOVBload [off1] {sym} (ADDconst [off2] ptr) mem)
  7033  	// cond:
  7034  	// result: (MOVBload [off1+off2] {sym} ptr mem)
  7035  	for {
  7036  		off1 := v.AuxInt
  7037  		sym := v.Aux
  7038  		_ = v.Args[1]
  7039  		v_0 := v.Args[0]
  7040  		if v_0.Op != OpARMADDconst {
  7041  			break
  7042  		}
  7043  		off2 := v_0.AuxInt
  7044  		ptr := v_0.Args[0]
  7045  		mem := v.Args[1]
  7046  		v.reset(OpARMMOVBload)
  7047  		v.AuxInt = off1 + off2
  7048  		v.Aux = sym
  7049  		v.AddArg(ptr)
  7050  		v.AddArg(mem)
  7051  		return true
  7052  	}
  7053  	// match: (MOVBload [off1] {sym} (SUBconst [off2] ptr) mem)
  7054  	// cond:
  7055  	// result: (MOVBload [off1-off2] {sym} ptr mem)
  7056  	for {
  7057  		off1 := v.AuxInt
  7058  		sym := v.Aux
  7059  		_ = v.Args[1]
  7060  		v_0 := v.Args[0]
  7061  		if v_0.Op != OpARMSUBconst {
  7062  			break
  7063  		}
  7064  		off2 := v_0.AuxInt
  7065  		ptr := v_0.Args[0]
  7066  		mem := v.Args[1]
  7067  		v.reset(OpARMMOVBload)
  7068  		v.AuxInt = off1 - off2
  7069  		v.Aux = sym
  7070  		v.AddArg(ptr)
  7071  		v.AddArg(mem)
  7072  		return true
  7073  	}
  7074  	// match: (MOVBload [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) mem)
  7075  	// cond: canMergeSym(sym1,sym2)
  7076  	// result: (MOVBload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  7077  	for {
  7078  		off1 := v.AuxInt
  7079  		sym1 := v.Aux
  7080  		_ = v.Args[1]
  7081  		v_0 := v.Args[0]
  7082  		if v_0.Op != OpARMMOVWaddr {
  7083  			break
  7084  		}
  7085  		off2 := v_0.AuxInt
  7086  		sym2 := v_0.Aux
  7087  		ptr := v_0.Args[0]
  7088  		mem := v.Args[1]
  7089  		if !(canMergeSym(sym1, sym2)) {
  7090  			break
  7091  		}
  7092  		v.reset(OpARMMOVBload)
  7093  		v.AuxInt = off1 + off2
  7094  		v.Aux = mergeSym(sym1, sym2)
  7095  		v.AddArg(ptr)
  7096  		v.AddArg(mem)
  7097  		return true
  7098  	}
  7099  	// match: (MOVBload [off] {sym} ptr (MOVBstore [off2] {sym2} ptr2 x _))
  7100  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  7101  	// result: (MOVBreg x)
  7102  	for {
  7103  		off := v.AuxInt
  7104  		sym := v.Aux
  7105  		_ = v.Args[1]
  7106  		ptr := v.Args[0]
  7107  		v_1 := v.Args[1]
  7108  		if v_1.Op != OpARMMOVBstore {
  7109  			break
  7110  		}
  7111  		off2 := v_1.AuxInt
  7112  		sym2 := v_1.Aux
  7113  		_ = v_1.Args[2]
  7114  		ptr2 := v_1.Args[0]
  7115  		x := v_1.Args[1]
  7116  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  7117  			break
  7118  		}
  7119  		v.reset(OpARMMOVBreg)
  7120  		v.AddArg(x)
  7121  		return true
  7122  	}
  7123  	// match: (MOVBload [0] {sym} (ADD ptr idx) mem)
  7124  	// cond: sym == nil && !config.nacl
  7125  	// result: (MOVBloadidx ptr idx mem)
  7126  	for {
  7127  		if v.AuxInt != 0 {
  7128  			break
  7129  		}
  7130  		sym := v.Aux
  7131  		_ = v.Args[1]
  7132  		v_0 := v.Args[0]
  7133  		if v_0.Op != OpARMADD {
  7134  			break
  7135  		}
  7136  		_ = v_0.Args[1]
  7137  		ptr := v_0.Args[0]
  7138  		idx := v_0.Args[1]
  7139  		mem := v.Args[1]
  7140  		if !(sym == nil && !config.nacl) {
  7141  			break
  7142  		}
  7143  		v.reset(OpARMMOVBloadidx)
  7144  		v.AddArg(ptr)
  7145  		v.AddArg(idx)
  7146  		v.AddArg(mem)
  7147  		return true
  7148  	}
  7149  	return false
  7150  }
  7151  func rewriteValueARM_OpARMMOVBloadidx_0(v *Value) bool {
  7152  	// match: (MOVBloadidx ptr idx (MOVBstoreidx ptr2 idx x _))
  7153  	// cond: isSamePtr(ptr, ptr2)
  7154  	// result: (MOVBreg x)
  7155  	for {
  7156  		_ = v.Args[2]
  7157  		ptr := v.Args[0]
  7158  		idx := v.Args[1]
  7159  		v_2 := v.Args[2]
  7160  		if v_2.Op != OpARMMOVBstoreidx {
  7161  			break
  7162  		}
  7163  		_ = v_2.Args[3]
  7164  		ptr2 := v_2.Args[0]
  7165  		if idx != v_2.Args[1] {
  7166  			break
  7167  		}
  7168  		x := v_2.Args[2]
  7169  		if !(isSamePtr(ptr, ptr2)) {
  7170  			break
  7171  		}
  7172  		v.reset(OpARMMOVBreg)
  7173  		v.AddArg(x)
  7174  		return true
  7175  	}
  7176  	// match: (MOVBloadidx ptr (MOVWconst [c]) mem)
  7177  	// cond:
  7178  	// result: (MOVBload [c] ptr mem)
  7179  	for {
  7180  		_ = v.Args[2]
  7181  		ptr := v.Args[0]
  7182  		v_1 := v.Args[1]
  7183  		if v_1.Op != OpARMMOVWconst {
  7184  			break
  7185  		}
  7186  		c := v_1.AuxInt
  7187  		mem := v.Args[2]
  7188  		v.reset(OpARMMOVBload)
  7189  		v.AuxInt = c
  7190  		v.AddArg(ptr)
  7191  		v.AddArg(mem)
  7192  		return true
  7193  	}
  7194  	// match: (MOVBloadidx (MOVWconst [c]) ptr mem)
  7195  	// cond:
  7196  	// result: (MOVBload [c] ptr mem)
  7197  	for {
  7198  		_ = v.Args[2]
  7199  		v_0 := v.Args[0]
  7200  		if v_0.Op != OpARMMOVWconst {
  7201  			break
  7202  		}
  7203  		c := v_0.AuxInt
  7204  		ptr := v.Args[1]
  7205  		mem := v.Args[2]
  7206  		v.reset(OpARMMOVBload)
  7207  		v.AuxInt = c
  7208  		v.AddArg(ptr)
  7209  		v.AddArg(mem)
  7210  		return true
  7211  	}
  7212  	return false
  7213  }
  7214  func rewriteValueARM_OpARMMOVBreg_0(v *Value) bool {
  7215  	// match: (MOVBreg x:(MOVBload _ _))
  7216  	// cond:
  7217  	// result: (MOVWreg x)
  7218  	for {
  7219  		x := v.Args[0]
  7220  		if x.Op != OpARMMOVBload {
  7221  			break
  7222  		}
  7223  		_ = x.Args[1]
  7224  		v.reset(OpARMMOVWreg)
  7225  		v.AddArg(x)
  7226  		return true
  7227  	}
  7228  	// match: (MOVBreg (ANDconst [c] x))
  7229  	// cond: c & 0x80 == 0
  7230  	// result: (ANDconst [c&0x7f] x)
  7231  	for {
  7232  		v_0 := v.Args[0]
  7233  		if v_0.Op != OpARMANDconst {
  7234  			break
  7235  		}
  7236  		c := v_0.AuxInt
  7237  		x := v_0.Args[0]
  7238  		if !(c&0x80 == 0) {
  7239  			break
  7240  		}
  7241  		v.reset(OpARMANDconst)
  7242  		v.AuxInt = c & 0x7f
  7243  		v.AddArg(x)
  7244  		return true
  7245  	}
  7246  	// match: (MOVBreg x:(MOVBreg _))
  7247  	// cond:
  7248  	// result: (MOVWreg x)
  7249  	for {
  7250  		x := v.Args[0]
  7251  		if x.Op != OpARMMOVBreg {
  7252  			break
  7253  		}
  7254  		v.reset(OpARMMOVWreg)
  7255  		v.AddArg(x)
  7256  		return true
  7257  	}
  7258  	// match: (MOVBreg (MOVWconst [c]))
  7259  	// cond:
  7260  	// result: (MOVWconst [int64(int8(c))])
  7261  	for {
  7262  		v_0 := v.Args[0]
  7263  		if v_0.Op != OpARMMOVWconst {
  7264  			break
  7265  		}
  7266  		c := v_0.AuxInt
  7267  		v.reset(OpARMMOVWconst)
  7268  		v.AuxInt = int64(int8(c))
  7269  		return true
  7270  	}
  7271  	return false
  7272  }
  7273  func rewriteValueARM_OpARMMOVBstore_0(v *Value) bool {
  7274  	b := v.Block
  7275  	_ = b
  7276  	config := b.Func.Config
  7277  	_ = config
  7278  	// match: (MOVBstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  7279  	// cond:
  7280  	// result: (MOVBstore [off1+off2] {sym} ptr val mem)
  7281  	for {
  7282  		off1 := v.AuxInt
  7283  		sym := v.Aux
  7284  		_ = v.Args[2]
  7285  		v_0 := v.Args[0]
  7286  		if v_0.Op != OpARMADDconst {
  7287  			break
  7288  		}
  7289  		off2 := v_0.AuxInt
  7290  		ptr := v_0.Args[0]
  7291  		val := v.Args[1]
  7292  		mem := v.Args[2]
  7293  		v.reset(OpARMMOVBstore)
  7294  		v.AuxInt = off1 + off2
  7295  		v.Aux = sym
  7296  		v.AddArg(ptr)
  7297  		v.AddArg(val)
  7298  		v.AddArg(mem)
  7299  		return true
  7300  	}
  7301  	// match: (MOVBstore [off1] {sym} (SUBconst [off2] ptr) val mem)
  7302  	// cond:
  7303  	// result: (MOVBstore [off1-off2] {sym} ptr val mem)
  7304  	for {
  7305  		off1 := v.AuxInt
  7306  		sym := v.Aux
  7307  		_ = v.Args[2]
  7308  		v_0 := v.Args[0]
  7309  		if v_0.Op != OpARMSUBconst {
  7310  			break
  7311  		}
  7312  		off2 := v_0.AuxInt
  7313  		ptr := v_0.Args[0]
  7314  		val := v.Args[1]
  7315  		mem := v.Args[2]
  7316  		v.reset(OpARMMOVBstore)
  7317  		v.AuxInt = off1 - off2
  7318  		v.Aux = sym
  7319  		v.AddArg(ptr)
  7320  		v.AddArg(val)
  7321  		v.AddArg(mem)
  7322  		return true
  7323  	}
  7324  	// match: (MOVBstore [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) val mem)
  7325  	// cond: canMergeSym(sym1,sym2)
  7326  	// result: (MOVBstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  7327  	for {
  7328  		off1 := v.AuxInt
  7329  		sym1 := v.Aux
  7330  		_ = v.Args[2]
  7331  		v_0 := v.Args[0]
  7332  		if v_0.Op != OpARMMOVWaddr {
  7333  			break
  7334  		}
  7335  		off2 := v_0.AuxInt
  7336  		sym2 := v_0.Aux
  7337  		ptr := v_0.Args[0]
  7338  		val := v.Args[1]
  7339  		mem := v.Args[2]
  7340  		if !(canMergeSym(sym1, sym2)) {
  7341  			break
  7342  		}
  7343  		v.reset(OpARMMOVBstore)
  7344  		v.AuxInt = off1 + off2
  7345  		v.Aux = mergeSym(sym1, sym2)
  7346  		v.AddArg(ptr)
  7347  		v.AddArg(val)
  7348  		v.AddArg(mem)
  7349  		return true
  7350  	}
  7351  	// match: (MOVBstore [off] {sym} ptr (MOVBreg x) mem)
  7352  	// cond:
  7353  	// result: (MOVBstore [off] {sym} ptr x mem)
  7354  	for {
  7355  		off := v.AuxInt
  7356  		sym := v.Aux
  7357  		_ = v.Args[2]
  7358  		ptr := v.Args[0]
  7359  		v_1 := v.Args[1]
  7360  		if v_1.Op != OpARMMOVBreg {
  7361  			break
  7362  		}
  7363  		x := v_1.Args[0]
  7364  		mem := v.Args[2]
  7365  		v.reset(OpARMMOVBstore)
  7366  		v.AuxInt = off
  7367  		v.Aux = sym
  7368  		v.AddArg(ptr)
  7369  		v.AddArg(x)
  7370  		v.AddArg(mem)
  7371  		return true
  7372  	}
  7373  	// match: (MOVBstore [off] {sym} ptr (MOVBUreg x) mem)
  7374  	// cond:
  7375  	// result: (MOVBstore [off] {sym} ptr x mem)
  7376  	for {
  7377  		off := v.AuxInt
  7378  		sym := v.Aux
  7379  		_ = v.Args[2]
  7380  		ptr := v.Args[0]
  7381  		v_1 := v.Args[1]
  7382  		if v_1.Op != OpARMMOVBUreg {
  7383  			break
  7384  		}
  7385  		x := v_1.Args[0]
  7386  		mem := v.Args[2]
  7387  		v.reset(OpARMMOVBstore)
  7388  		v.AuxInt = off
  7389  		v.Aux = sym
  7390  		v.AddArg(ptr)
  7391  		v.AddArg(x)
  7392  		v.AddArg(mem)
  7393  		return true
  7394  	}
  7395  	// match: (MOVBstore [off] {sym} ptr (MOVHreg x) mem)
  7396  	// cond:
  7397  	// result: (MOVBstore [off] {sym} ptr x mem)
  7398  	for {
  7399  		off := v.AuxInt
  7400  		sym := v.Aux
  7401  		_ = v.Args[2]
  7402  		ptr := v.Args[0]
  7403  		v_1 := v.Args[1]
  7404  		if v_1.Op != OpARMMOVHreg {
  7405  			break
  7406  		}
  7407  		x := v_1.Args[0]
  7408  		mem := v.Args[2]
  7409  		v.reset(OpARMMOVBstore)
  7410  		v.AuxInt = off
  7411  		v.Aux = sym
  7412  		v.AddArg(ptr)
  7413  		v.AddArg(x)
  7414  		v.AddArg(mem)
  7415  		return true
  7416  	}
  7417  	// match: (MOVBstore [off] {sym} ptr (MOVHUreg x) mem)
  7418  	// cond:
  7419  	// result: (MOVBstore [off] {sym} ptr x mem)
  7420  	for {
  7421  		off := v.AuxInt
  7422  		sym := v.Aux
  7423  		_ = v.Args[2]
  7424  		ptr := v.Args[0]
  7425  		v_1 := v.Args[1]
  7426  		if v_1.Op != OpARMMOVHUreg {
  7427  			break
  7428  		}
  7429  		x := v_1.Args[0]
  7430  		mem := v.Args[2]
  7431  		v.reset(OpARMMOVBstore)
  7432  		v.AuxInt = off
  7433  		v.Aux = sym
  7434  		v.AddArg(ptr)
  7435  		v.AddArg(x)
  7436  		v.AddArg(mem)
  7437  		return true
  7438  	}
  7439  	// match: (MOVBstore [0] {sym} (ADD ptr idx) val mem)
  7440  	// cond: sym == nil && !config.nacl
  7441  	// result: (MOVBstoreidx ptr idx val mem)
  7442  	for {
  7443  		if v.AuxInt != 0 {
  7444  			break
  7445  		}
  7446  		sym := v.Aux
  7447  		_ = v.Args[2]
  7448  		v_0 := v.Args[0]
  7449  		if v_0.Op != OpARMADD {
  7450  			break
  7451  		}
  7452  		_ = v_0.Args[1]
  7453  		ptr := v_0.Args[0]
  7454  		idx := v_0.Args[1]
  7455  		val := v.Args[1]
  7456  		mem := v.Args[2]
  7457  		if !(sym == nil && !config.nacl) {
  7458  			break
  7459  		}
  7460  		v.reset(OpARMMOVBstoreidx)
  7461  		v.AddArg(ptr)
  7462  		v.AddArg(idx)
  7463  		v.AddArg(val)
  7464  		v.AddArg(mem)
  7465  		return true
  7466  	}
  7467  	return false
  7468  }
  7469  func rewriteValueARM_OpARMMOVBstoreidx_0(v *Value) bool {
  7470  	// match: (MOVBstoreidx ptr (MOVWconst [c]) val mem)
  7471  	// cond:
  7472  	// result: (MOVBstore [c] ptr val mem)
  7473  	for {
  7474  		_ = v.Args[3]
  7475  		ptr := v.Args[0]
  7476  		v_1 := v.Args[1]
  7477  		if v_1.Op != OpARMMOVWconst {
  7478  			break
  7479  		}
  7480  		c := v_1.AuxInt
  7481  		val := v.Args[2]
  7482  		mem := v.Args[3]
  7483  		v.reset(OpARMMOVBstore)
  7484  		v.AuxInt = c
  7485  		v.AddArg(ptr)
  7486  		v.AddArg(val)
  7487  		v.AddArg(mem)
  7488  		return true
  7489  	}
  7490  	// match: (MOVBstoreidx (MOVWconst [c]) ptr val mem)
  7491  	// cond:
  7492  	// result: (MOVBstore [c] ptr val mem)
  7493  	for {
  7494  		_ = v.Args[3]
  7495  		v_0 := v.Args[0]
  7496  		if v_0.Op != OpARMMOVWconst {
  7497  			break
  7498  		}
  7499  		c := v_0.AuxInt
  7500  		ptr := v.Args[1]
  7501  		val := v.Args[2]
  7502  		mem := v.Args[3]
  7503  		v.reset(OpARMMOVBstore)
  7504  		v.AuxInt = c
  7505  		v.AddArg(ptr)
  7506  		v.AddArg(val)
  7507  		v.AddArg(mem)
  7508  		return true
  7509  	}
  7510  	return false
  7511  }
  7512  func rewriteValueARM_OpARMMOVDload_0(v *Value) bool {
  7513  	// match: (MOVDload [off1] {sym} (ADDconst [off2] ptr) mem)
  7514  	// cond:
  7515  	// result: (MOVDload [off1+off2] {sym} ptr mem)
  7516  	for {
  7517  		off1 := v.AuxInt
  7518  		sym := v.Aux
  7519  		_ = v.Args[1]
  7520  		v_0 := v.Args[0]
  7521  		if v_0.Op != OpARMADDconst {
  7522  			break
  7523  		}
  7524  		off2 := v_0.AuxInt
  7525  		ptr := v_0.Args[0]
  7526  		mem := v.Args[1]
  7527  		v.reset(OpARMMOVDload)
  7528  		v.AuxInt = off1 + off2
  7529  		v.Aux = sym
  7530  		v.AddArg(ptr)
  7531  		v.AddArg(mem)
  7532  		return true
  7533  	}
  7534  	// match: (MOVDload [off1] {sym} (SUBconst [off2] ptr) mem)
  7535  	// cond:
  7536  	// result: (MOVDload [off1-off2] {sym} ptr mem)
  7537  	for {
  7538  		off1 := v.AuxInt
  7539  		sym := v.Aux
  7540  		_ = v.Args[1]
  7541  		v_0 := v.Args[0]
  7542  		if v_0.Op != OpARMSUBconst {
  7543  			break
  7544  		}
  7545  		off2 := v_0.AuxInt
  7546  		ptr := v_0.Args[0]
  7547  		mem := v.Args[1]
  7548  		v.reset(OpARMMOVDload)
  7549  		v.AuxInt = off1 - off2
  7550  		v.Aux = sym
  7551  		v.AddArg(ptr)
  7552  		v.AddArg(mem)
  7553  		return true
  7554  	}
  7555  	// match: (MOVDload [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) mem)
  7556  	// cond: canMergeSym(sym1,sym2)
  7557  	// result: (MOVDload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  7558  	for {
  7559  		off1 := v.AuxInt
  7560  		sym1 := v.Aux
  7561  		_ = v.Args[1]
  7562  		v_0 := v.Args[0]
  7563  		if v_0.Op != OpARMMOVWaddr {
  7564  			break
  7565  		}
  7566  		off2 := v_0.AuxInt
  7567  		sym2 := v_0.Aux
  7568  		ptr := v_0.Args[0]
  7569  		mem := v.Args[1]
  7570  		if !(canMergeSym(sym1, sym2)) {
  7571  			break
  7572  		}
  7573  		v.reset(OpARMMOVDload)
  7574  		v.AuxInt = off1 + off2
  7575  		v.Aux = mergeSym(sym1, sym2)
  7576  		v.AddArg(ptr)
  7577  		v.AddArg(mem)
  7578  		return true
  7579  	}
  7580  	// match: (MOVDload [off] {sym} ptr (MOVDstore [off2] {sym2} ptr2 x _))
  7581  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  7582  	// result: x
  7583  	for {
  7584  		off := v.AuxInt
  7585  		sym := v.Aux
  7586  		_ = v.Args[1]
  7587  		ptr := v.Args[0]
  7588  		v_1 := v.Args[1]
  7589  		if v_1.Op != OpARMMOVDstore {
  7590  			break
  7591  		}
  7592  		off2 := v_1.AuxInt
  7593  		sym2 := v_1.Aux
  7594  		_ = v_1.Args[2]
  7595  		ptr2 := v_1.Args[0]
  7596  		x := v_1.Args[1]
  7597  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  7598  			break
  7599  		}
  7600  		v.reset(OpCopy)
  7601  		v.Type = x.Type
  7602  		v.AddArg(x)
  7603  		return true
  7604  	}
  7605  	return false
  7606  }
  7607  func rewriteValueARM_OpARMMOVDstore_0(v *Value) bool {
  7608  	// match: (MOVDstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  7609  	// cond:
  7610  	// result: (MOVDstore [off1+off2] {sym} ptr val mem)
  7611  	for {
  7612  		off1 := v.AuxInt
  7613  		sym := v.Aux
  7614  		_ = v.Args[2]
  7615  		v_0 := v.Args[0]
  7616  		if v_0.Op != OpARMADDconst {
  7617  			break
  7618  		}
  7619  		off2 := v_0.AuxInt
  7620  		ptr := v_0.Args[0]
  7621  		val := v.Args[1]
  7622  		mem := v.Args[2]
  7623  		v.reset(OpARMMOVDstore)
  7624  		v.AuxInt = off1 + off2
  7625  		v.Aux = sym
  7626  		v.AddArg(ptr)
  7627  		v.AddArg(val)
  7628  		v.AddArg(mem)
  7629  		return true
  7630  	}
  7631  	// match: (MOVDstore [off1] {sym} (SUBconst [off2] ptr) val mem)
  7632  	// cond:
  7633  	// result: (MOVDstore [off1-off2] {sym} ptr val mem)
  7634  	for {
  7635  		off1 := v.AuxInt
  7636  		sym := v.Aux
  7637  		_ = v.Args[2]
  7638  		v_0 := v.Args[0]
  7639  		if v_0.Op != OpARMSUBconst {
  7640  			break
  7641  		}
  7642  		off2 := v_0.AuxInt
  7643  		ptr := v_0.Args[0]
  7644  		val := v.Args[1]
  7645  		mem := v.Args[2]
  7646  		v.reset(OpARMMOVDstore)
  7647  		v.AuxInt = off1 - off2
  7648  		v.Aux = sym
  7649  		v.AddArg(ptr)
  7650  		v.AddArg(val)
  7651  		v.AddArg(mem)
  7652  		return true
  7653  	}
  7654  	// match: (MOVDstore [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) val mem)
  7655  	// cond: canMergeSym(sym1,sym2)
  7656  	// result: (MOVDstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  7657  	for {
  7658  		off1 := v.AuxInt
  7659  		sym1 := v.Aux
  7660  		_ = v.Args[2]
  7661  		v_0 := v.Args[0]
  7662  		if v_0.Op != OpARMMOVWaddr {
  7663  			break
  7664  		}
  7665  		off2 := v_0.AuxInt
  7666  		sym2 := v_0.Aux
  7667  		ptr := v_0.Args[0]
  7668  		val := v.Args[1]
  7669  		mem := v.Args[2]
  7670  		if !(canMergeSym(sym1, sym2)) {
  7671  			break
  7672  		}
  7673  		v.reset(OpARMMOVDstore)
  7674  		v.AuxInt = off1 + off2
  7675  		v.Aux = mergeSym(sym1, sym2)
  7676  		v.AddArg(ptr)
  7677  		v.AddArg(val)
  7678  		v.AddArg(mem)
  7679  		return true
  7680  	}
  7681  	return false
  7682  }
  7683  func rewriteValueARM_OpARMMOVFload_0(v *Value) bool {
  7684  	// match: (MOVFload [off1] {sym} (ADDconst [off2] ptr) mem)
  7685  	// cond:
  7686  	// result: (MOVFload [off1+off2] {sym} ptr mem)
  7687  	for {
  7688  		off1 := v.AuxInt
  7689  		sym := v.Aux
  7690  		_ = v.Args[1]
  7691  		v_0 := v.Args[0]
  7692  		if v_0.Op != OpARMADDconst {
  7693  			break
  7694  		}
  7695  		off2 := v_0.AuxInt
  7696  		ptr := v_0.Args[0]
  7697  		mem := v.Args[1]
  7698  		v.reset(OpARMMOVFload)
  7699  		v.AuxInt = off1 + off2
  7700  		v.Aux = sym
  7701  		v.AddArg(ptr)
  7702  		v.AddArg(mem)
  7703  		return true
  7704  	}
  7705  	// match: (MOVFload [off1] {sym} (SUBconst [off2] ptr) mem)
  7706  	// cond:
  7707  	// result: (MOVFload [off1-off2] {sym} ptr mem)
  7708  	for {
  7709  		off1 := v.AuxInt
  7710  		sym := v.Aux
  7711  		_ = v.Args[1]
  7712  		v_0 := v.Args[0]
  7713  		if v_0.Op != OpARMSUBconst {
  7714  			break
  7715  		}
  7716  		off2 := v_0.AuxInt
  7717  		ptr := v_0.Args[0]
  7718  		mem := v.Args[1]
  7719  		v.reset(OpARMMOVFload)
  7720  		v.AuxInt = off1 - off2
  7721  		v.Aux = sym
  7722  		v.AddArg(ptr)
  7723  		v.AddArg(mem)
  7724  		return true
  7725  	}
  7726  	// match: (MOVFload [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) mem)
  7727  	// cond: canMergeSym(sym1,sym2)
  7728  	// result: (MOVFload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  7729  	for {
  7730  		off1 := v.AuxInt
  7731  		sym1 := v.Aux
  7732  		_ = v.Args[1]
  7733  		v_0 := v.Args[0]
  7734  		if v_0.Op != OpARMMOVWaddr {
  7735  			break
  7736  		}
  7737  		off2 := v_0.AuxInt
  7738  		sym2 := v_0.Aux
  7739  		ptr := v_0.Args[0]
  7740  		mem := v.Args[1]
  7741  		if !(canMergeSym(sym1, sym2)) {
  7742  			break
  7743  		}
  7744  		v.reset(OpARMMOVFload)
  7745  		v.AuxInt = off1 + off2
  7746  		v.Aux = mergeSym(sym1, sym2)
  7747  		v.AddArg(ptr)
  7748  		v.AddArg(mem)
  7749  		return true
  7750  	}
  7751  	// match: (MOVFload [off] {sym} ptr (MOVFstore [off2] {sym2} ptr2 x _))
  7752  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  7753  	// result: x
  7754  	for {
  7755  		off := v.AuxInt
  7756  		sym := v.Aux
  7757  		_ = v.Args[1]
  7758  		ptr := v.Args[0]
  7759  		v_1 := v.Args[1]
  7760  		if v_1.Op != OpARMMOVFstore {
  7761  			break
  7762  		}
  7763  		off2 := v_1.AuxInt
  7764  		sym2 := v_1.Aux
  7765  		_ = v_1.Args[2]
  7766  		ptr2 := v_1.Args[0]
  7767  		x := v_1.Args[1]
  7768  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  7769  			break
  7770  		}
  7771  		v.reset(OpCopy)
  7772  		v.Type = x.Type
  7773  		v.AddArg(x)
  7774  		return true
  7775  	}
  7776  	return false
  7777  }
  7778  func rewriteValueARM_OpARMMOVFstore_0(v *Value) bool {
  7779  	// match: (MOVFstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  7780  	// cond:
  7781  	// result: (MOVFstore [off1+off2] {sym} ptr val mem)
  7782  	for {
  7783  		off1 := v.AuxInt
  7784  		sym := v.Aux
  7785  		_ = v.Args[2]
  7786  		v_0 := v.Args[0]
  7787  		if v_0.Op != OpARMADDconst {
  7788  			break
  7789  		}
  7790  		off2 := v_0.AuxInt
  7791  		ptr := v_0.Args[0]
  7792  		val := v.Args[1]
  7793  		mem := v.Args[2]
  7794  		v.reset(OpARMMOVFstore)
  7795  		v.AuxInt = off1 + off2
  7796  		v.Aux = sym
  7797  		v.AddArg(ptr)
  7798  		v.AddArg(val)
  7799  		v.AddArg(mem)
  7800  		return true
  7801  	}
  7802  	// match: (MOVFstore [off1] {sym} (SUBconst [off2] ptr) val mem)
  7803  	// cond:
  7804  	// result: (MOVFstore [off1-off2] {sym} ptr val mem)
  7805  	for {
  7806  		off1 := v.AuxInt
  7807  		sym := v.Aux
  7808  		_ = v.Args[2]
  7809  		v_0 := v.Args[0]
  7810  		if v_0.Op != OpARMSUBconst {
  7811  			break
  7812  		}
  7813  		off2 := v_0.AuxInt
  7814  		ptr := v_0.Args[0]
  7815  		val := v.Args[1]
  7816  		mem := v.Args[2]
  7817  		v.reset(OpARMMOVFstore)
  7818  		v.AuxInt = off1 - off2
  7819  		v.Aux = sym
  7820  		v.AddArg(ptr)
  7821  		v.AddArg(val)
  7822  		v.AddArg(mem)
  7823  		return true
  7824  	}
  7825  	// match: (MOVFstore [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) val mem)
  7826  	// cond: canMergeSym(sym1,sym2)
  7827  	// result: (MOVFstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  7828  	for {
  7829  		off1 := v.AuxInt
  7830  		sym1 := v.Aux
  7831  		_ = v.Args[2]
  7832  		v_0 := v.Args[0]
  7833  		if v_0.Op != OpARMMOVWaddr {
  7834  			break
  7835  		}
  7836  		off2 := v_0.AuxInt
  7837  		sym2 := v_0.Aux
  7838  		ptr := v_0.Args[0]
  7839  		val := v.Args[1]
  7840  		mem := v.Args[2]
  7841  		if !(canMergeSym(sym1, sym2)) {
  7842  			break
  7843  		}
  7844  		v.reset(OpARMMOVFstore)
  7845  		v.AuxInt = off1 + off2
  7846  		v.Aux = mergeSym(sym1, sym2)
  7847  		v.AddArg(ptr)
  7848  		v.AddArg(val)
  7849  		v.AddArg(mem)
  7850  		return true
  7851  	}
  7852  	return false
  7853  }
  7854  func rewriteValueARM_OpARMMOVHUload_0(v *Value) bool {
  7855  	b := v.Block
  7856  	_ = b
  7857  	config := b.Func.Config
  7858  	_ = config
  7859  	// match: (MOVHUload [off1] {sym} (ADDconst [off2] ptr) mem)
  7860  	// cond:
  7861  	// result: (MOVHUload [off1+off2] {sym} ptr mem)
  7862  	for {
  7863  		off1 := v.AuxInt
  7864  		sym := v.Aux
  7865  		_ = v.Args[1]
  7866  		v_0 := v.Args[0]
  7867  		if v_0.Op != OpARMADDconst {
  7868  			break
  7869  		}
  7870  		off2 := v_0.AuxInt
  7871  		ptr := v_0.Args[0]
  7872  		mem := v.Args[1]
  7873  		v.reset(OpARMMOVHUload)
  7874  		v.AuxInt = off1 + off2
  7875  		v.Aux = sym
  7876  		v.AddArg(ptr)
  7877  		v.AddArg(mem)
  7878  		return true
  7879  	}
  7880  	// match: (MOVHUload [off1] {sym} (SUBconst [off2] ptr) mem)
  7881  	// cond:
  7882  	// result: (MOVHUload [off1-off2] {sym} ptr mem)
  7883  	for {
  7884  		off1 := v.AuxInt
  7885  		sym := v.Aux
  7886  		_ = v.Args[1]
  7887  		v_0 := v.Args[0]
  7888  		if v_0.Op != OpARMSUBconst {
  7889  			break
  7890  		}
  7891  		off2 := v_0.AuxInt
  7892  		ptr := v_0.Args[0]
  7893  		mem := v.Args[1]
  7894  		v.reset(OpARMMOVHUload)
  7895  		v.AuxInt = off1 - off2
  7896  		v.Aux = sym
  7897  		v.AddArg(ptr)
  7898  		v.AddArg(mem)
  7899  		return true
  7900  	}
  7901  	// match: (MOVHUload [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) mem)
  7902  	// cond: canMergeSym(sym1,sym2)
  7903  	// result: (MOVHUload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  7904  	for {
  7905  		off1 := v.AuxInt
  7906  		sym1 := v.Aux
  7907  		_ = v.Args[1]
  7908  		v_0 := v.Args[0]
  7909  		if v_0.Op != OpARMMOVWaddr {
  7910  			break
  7911  		}
  7912  		off2 := v_0.AuxInt
  7913  		sym2 := v_0.Aux
  7914  		ptr := v_0.Args[0]
  7915  		mem := v.Args[1]
  7916  		if !(canMergeSym(sym1, sym2)) {
  7917  			break
  7918  		}
  7919  		v.reset(OpARMMOVHUload)
  7920  		v.AuxInt = off1 + off2
  7921  		v.Aux = mergeSym(sym1, sym2)
  7922  		v.AddArg(ptr)
  7923  		v.AddArg(mem)
  7924  		return true
  7925  	}
  7926  	// match: (MOVHUload [off] {sym} ptr (MOVHstore [off2] {sym2} ptr2 x _))
  7927  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  7928  	// result: (MOVHUreg x)
  7929  	for {
  7930  		off := v.AuxInt
  7931  		sym := v.Aux
  7932  		_ = v.Args[1]
  7933  		ptr := v.Args[0]
  7934  		v_1 := v.Args[1]
  7935  		if v_1.Op != OpARMMOVHstore {
  7936  			break
  7937  		}
  7938  		off2 := v_1.AuxInt
  7939  		sym2 := v_1.Aux
  7940  		_ = v_1.Args[2]
  7941  		ptr2 := v_1.Args[0]
  7942  		x := v_1.Args[1]
  7943  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  7944  			break
  7945  		}
  7946  		v.reset(OpARMMOVHUreg)
  7947  		v.AddArg(x)
  7948  		return true
  7949  	}
  7950  	// match: (MOVHUload [0] {sym} (ADD ptr idx) mem)
  7951  	// cond: sym == nil && !config.nacl
  7952  	// result: (MOVHUloadidx ptr idx mem)
  7953  	for {
  7954  		if v.AuxInt != 0 {
  7955  			break
  7956  		}
  7957  		sym := v.Aux
  7958  		_ = v.Args[1]
  7959  		v_0 := v.Args[0]
  7960  		if v_0.Op != OpARMADD {
  7961  			break
  7962  		}
  7963  		_ = v_0.Args[1]
  7964  		ptr := v_0.Args[0]
  7965  		idx := v_0.Args[1]
  7966  		mem := v.Args[1]
  7967  		if !(sym == nil && !config.nacl) {
  7968  			break
  7969  		}
  7970  		v.reset(OpARMMOVHUloadidx)
  7971  		v.AddArg(ptr)
  7972  		v.AddArg(idx)
  7973  		v.AddArg(mem)
  7974  		return true
  7975  	}
  7976  	// match: (MOVHUload [off] {sym} (SB) _)
  7977  	// cond: symIsRO(sym)
  7978  	// result: (MOVWconst [int64(read16(sym, off, config.BigEndian))])
  7979  	for {
  7980  		off := v.AuxInt
  7981  		sym := v.Aux
  7982  		_ = v.Args[1]
  7983  		v_0 := v.Args[0]
  7984  		if v_0.Op != OpSB {
  7985  			break
  7986  		}
  7987  		if !(symIsRO(sym)) {
  7988  			break
  7989  		}
  7990  		v.reset(OpARMMOVWconst)
  7991  		v.AuxInt = int64(read16(sym, off, config.BigEndian))
  7992  		return true
  7993  	}
  7994  	return false
  7995  }
  7996  func rewriteValueARM_OpARMMOVHUloadidx_0(v *Value) bool {
  7997  	// match: (MOVHUloadidx ptr idx (MOVHstoreidx ptr2 idx x _))
  7998  	// cond: isSamePtr(ptr, ptr2)
  7999  	// result: (MOVHUreg x)
  8000  	for {
  8001  		_ = v.Args[2]
  8002  		ptr := v.Args[0]
  8003  		idx := v.Args[1]
  8004  		v_2 := v.Args[2]
  8005  		if v_2.Op != OpARMMOVHstoreidx {
  8006  			break
  8007  		}
  8008  		_ = v_2.Args[3]
  8009  		ptr2 := v_2.Args[0]
  8010  		if idx != v_2.Args[1] {
  8011  			break
  8012  		}
  8013  		x := v_2.Args[2]
  8014  		if !(isSamePtr(ptr, ptr2)) {
  8015  			break
  8016  		}
  8017  		v.reset(OpARMMOVHUreg)
  8018  		v.AddArg(x)
  8019  		return true
  8020  	}
  8021  	// match: (MOVHUloadidx ptr (MOVWconst [c]) mem)
  8022  	// cond:
  8023  	// result: (MOVHUload [c] ptr mem)
  8024  	for {
  8025  		_ = v.Args[2]
  8026  		ptr := v.Args[0]
  8027  		v_1 := v.Args[1]
  8028  		if v_1.Op != OpARMMOVWconst {
  8029  			break
  8030  		}
  8031  		c := v_1.AuxInt
  8032  		mem := v.Args[2]
  8033  		v.reset(OpARMMOVHUload)
  8034  		v.AuxInt = c
  8035  		v.AddArg(ptr)
  8036  		v.AddArg(mem)
  8037  		return true
  8038  	}
  8039  	// match: (MOVHUloadidx (MOVWconst [c]) ptr mem)
  8040  	// cond:
  8041  	// result: (MOVHUload [c] ptr mem)
  8042  	for {
  8043  		_ = v.Args[2]
  8044  		v_0 := v.Args[0]
  8045  		if v_0.Op != OpARMMOVWconst {
  8046  			break
  8047  		}
  8048  		c := v_0.AuxInt
  8049  		ptr := v.Args[1]
  8050  		mem := v.Args[2]
  8051  		v.reset(OpARMMOVHUload)
  8052  		v.AuxInt = c
  8053  		v.AddArg(ptr)
  8054  		v.AddArg(mem)
  8055  		return true
  8056  	}
  8057  	return false
  8058  }
  8059  func rewriteValueARM_OpARMMOVHUreg_0(v *Value) bool {
  8060  	// match: (MOVHUreg x:(MOVBUload _ _))
  8061  	// cond:
  8062  	// result: (MOVWreg x)
  8063  	for {
  8064  		x := v.Args[0]
  8065  		if x.Op != OpARMMOVBUload {
  8066  			break
  8067  		}
  8068  		_ = x.Args[1]
  8069  		v.reset(OpARMMOVWreg)
  8070  		v.AddArg(x)
  8071  		return true
  8072  	}
  8073  	// match: (MOVHUreg x:(MOVHUload _ _))
  8074  	// cond:
  8075  	// result: (MOVWreg x)
  8076  	for {
  8077  		x := v.Args[0]
  8078  		if x.Op != OpARMMOVHUload {
  8079  			break
  8080  		}
  8081  		_ = x.Args[1]
  8082  		v.reset(OpARMMOVWreg)
  8083  		v.AddArg(x)
  8084  		return true
  8085  	}
  8086  	// match: (MOVHUreg (ANDconst [c] x))
  8087  	// cond:
  8088  	// result: (ANDconst [c&0xffff] x)
  8089  	for {
  8090  		v_0 := v.Args[0]
  8091  		if v_0.Op != OpARMANDconst {
  8092  			break
  8093  		}
  8094  		c := v_0.AuxInt
  8095  		x := v_0.Args[0]
  8096  		v.reset(OpARMANDconst)
  8097  		v.AuxInt = c & 0xffff
  8098  		v.AddArg(x)
  8099  		return true
  8100  	}
  8101  	// match: (MOVHUreg x:(MOVBUreg _))
  8102  	// cond:
  8103  	// result: (MOVWreg x)
  8104  	for {
  8105  		x := v.Args[0]
  8106  		if x.Op != OpARMMOVBUreg {
  8107  			break
  8108  		}
  8109  		v.reset(OpARMMOVWreg)
  8110  		v.AddArg(x)
  8111  		return true
  8112  	}
  8113  	// match: (MOVHUreg x:(MOVHUreg _))
  8114  	// cond:
  8115  	// result: (MOVWreg x)
  8116  	for {
  8117  		x := v.Args[0]
  8118  		if x.Op != OpARMMOVHUreg {
  8119  			break
  8120  		}
  8121  		v.reset(OpARMMOVWreg)
  8122  		v.AddArg(x)
  8123  		return true
  8124  	}
  8125  	// match: (MOVHUreg (MOVWconst [c]))
  8126  	// cond:
  8127  	// result: (MOVWconst [int64(uint16(c))])
  8128  	for {
  8129  		v_0 := v.Args[0]
  8130  		if v_0.Op != OpARMMOVWconst {
  8131  			break
  8132  		}
  8133  		c := v_0.AuxInt
  8134  		v.reset(OpARMMOVWconst)
  8135  		v.AuxInt = int64(uint16(c))
  8136  		return true
  8137  	}
  8138  	return false
  8139  }
  8140  func rewriteValueARM_OpARMMOVHload_0(v *Value) bool {
  8141  	b := v.Block
  8142  	_ = b
  8143  	config := b.Func.Config
  8144  	_ = config
  8145  	// match: (MOVHload [off1] {sym} (ADDconst [off2] ptr) mem)
  8146  	// cond:
  8147  	// result: (MOVHload [off1+off2] {sym} ptr mem)
  8148  	for {
  8149  		off1 := v.AuxInt
  8150  		sym := v.Aux
  8151  		_ = v.Args[1]
  8152  		v_0 := v.Args[0]
  8153  		if v_0.Op != OpARMADDconst {
  8154  			break
  8155  		}
  8156  		off2 := v_0.AuxInt
  8157  		ptr := v_0.Args[0]
  8158  		mem := v.Args[1]
  8159  		v.reset(OpARMMOVHload)
  8160  		v.AuxInt = off1 + off2
  8161  		v.Aux = sym
  8162  		v.AddArg(ptr)
  8163  		v.AddArg(mem)
  8164  		return true
  8165  	}
  8166  	// match: (MOVHload [off1] {sym} (SUBconst [off2] ptr) mem)
  8167  	// cond:
  8168  	// result: (MOVHload [off1-off2] {sym} ptr mem)
  8169  	for {
  8170  		off1 := v.AuxInt
  8171  		sym := v.Aux
  8172  		_ = v.Args[1]
  8173  		v_0 := v.Args[0]
  8174  		if v_0.Op != OpARMSUBconst {
  8175  			break
  8176  		}
  8177  		off2 := v_0.AuxInt
  8178  		ptr := v_0.Args[0]
  8179  		mem := v.Args[1]
  8180  		v.reset(OpARMMOVHload)
  8181  		v.AuxInt = off1 - off2
  8182  		v.Aux = sym
  8183  		v.AddArg(ptr)
  8184  		v.AddArg(mem)
  8185  		return true
  8186  	}
  8187  	// match: (MOVHload [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) mem)
  8188  	// cond: canMergeSym(sym1,sym2)
  8189  	// result: (MOVHload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  8190  	for {
  8191  		off1 := v.AuxInt
  8192  		sym1 := v.Aux
  8193  		_ = v.Args[1]
  8194  		v_0 := v.Args[0]
  8195  		if v_0.Op != OpARMMOVWaddr {
  8196  			break
  8197  		}
  8198  		off2 := v_0.AuxInt
  8199  		sym2 := v_0.Aux
  8200  		ptr := v_0.Args[0]
  8201  		mem := v.Args[1]
  8202  		if !(canMergeSym(sym1, sym2)) {
  8203  			break
  8204  		}
  8205  		v.reset(OpARMMOVHload)
  8206  		v.AuxInt = off1 + off2
  8207  		v.Aux = mergeSym(sym1, sym2)
  8208  		v.AddArg(ptr)
  8209  		v.AddArg(mem)
  8210  		return true
  8211  	}
  8212  	// match: (MOVHload [off] {sym} ptr (MOVHstore [off2] {sym2} ptr2 x _))
  8213  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  8214  	// result: (MOVHreg x)
  8215  	for {
  8216  		off := v.AuxInt
  8217  		sym := v.Aux
  8218  		_ = v.Args[1]
  8219  		ptr := v.Args[0]
  8220  		v_1 := v.Args[1]
  8221  		if v_1.Op != OpARMMOVHstore {
  8222  			break
  8223  		}
  8224  		off2 := v_1.AuxInt
  8225  		sym2 := v_1.Aux
  8226  		_ = v_1.Args[2]
  8227  		ptr2 := v_1.Args[0]
  8228  		x := v_1.Args[1]
  8229  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  8230  			break
  8231  		}
  8232  		v.reset(OpARMMOVHreg)
  8233  		v.AddArg(x)
  8234  		return true
  8235  	}
  8236  	// match: (MOVHload [0] {sym} (ADD ptr idx) mem)
  8237  	// cond: sym == nil && !config.nacl
  8238  	// result: (MOVHloadidx ptr idx mem)
  8239  	for {
  8240  		if v.AuxInt != 0 {
  8241  			break
  8242  		}
  8243  		sym := v.Aux
  8244  		_ = v.Args[1]
  8245  		v_0 := v.Args[0]
  8246  		if v_0.Op != OpARMADD {
  8247  			break
  8248  		}
  8249  		_ = v_0.Args[1]
  8250  		ptr := v_0.Args[0]
  8251  		idx := v_0.Args[1]
  8252  		mem := v.Args[1]
  8253  		if !(sym == nil && !config.nacl) {
  8254  			break
  8255  		}
  8256  		v.reset(OpARMMOVHloadidx)
  8257  		v.AddArg(ptr)
  8258  		v.AddArg(idx)
  8259  		v.AddArg(mem)
  8260  		return true
  8261  	}
  8262  	return false
  8263  }
  8264  func rewriteValueARM_OpARMMOVHloadidx_0(v *Value) bool {
  8265  	// match: (MOVHloadidx ptr idx (MOVHstoreidx ptr2 idx x _))
  8266  	// cond: isSamePtr(ptr, ptr2)
  8267  	// result: (MOVHreg x)
  8268  	for {
  8269  		_ = v.Args[2]
  8270  		ptr := v.Args[0]
  8271  		idx := v.Args[1]
  8272  		v_2 := v.Args[2]
  8273  		if v_2.Op != OpARMMOVHstoreidx {
  8274  			break
  8275  		}
  8276  		_ = v_2.Args[3]
  8277  		ptr2 := v_2.Args[0]
  8278  		if idx != v_2.Args[1] {
  8279  			break
  8280  		}
  8281  		x := v_2.Args[2]
  8282  		if !(isSamePtr(ptr, ptr2)) {
  8283  			break
  8284  		}
  8285  		v.reset(OpARMMOVHreg)
  8286  		v.AddArg(x)
  8287  		return true
  8288  	}
  8289  	// match: (MOVHloadidx ptr (MOVWconst [c]) mem)
  8290  	// cond:
  8291  	// result: (MOVHload [c] ptr mem)
  8292  	for {
  8293  		_ = v.Args[2]
  8294  		ptr := v.Args[0]
  8295  		v_1 := v.Args[1]
  8296  		if v_1.Op != OpARMMOVWconst {
  8297  			break
  8298  		}
  8299  		c := v_1.AuxInt
  8300  		mem := v.Args[2]
  8301  		v.reset(OpARMMOVHload)
  8302  		v.AuxInt = c
  8303  		v.AddArg(ptr)
  8304  		v.AddArg(mem)
  8305  		return true
  8306  	}
  8307  	// match: (MOVHloadidx (MOVWconst [c]) ptr mem)
  8308  	// cond:
  8309  	// result: (MOVHload [c] ptr mem)
  8310  	for {
  8311  		_ = v.Args[2]
  8312  		v_0 := v.Args[0]
  8313  		if v_0.Op != OpARMMOVWconst {
  8314  			break
  8315  		}
  8316  		c := v_0.AuxInt
  8317  		ptr := v.Args[1]
  8318  		mem := v.Args[2]
  8319  		v.reset(OpARMMOVHload)
  8320  		v.AuxInt = c
  8321  		v.AddArg(ptr)
  8322  		v.AddArg(mem)
  8323  		return true
  8324  	}
  8325  	return false
  8326  }
  8327  func rewriteValueARM_OpARMMOVHreg_0(v *Value) bool {
  8328  	// match: (MOVHreg x:(MOVBload _ _))
  8329  	// cond:
  8330  	// result: (MOVWreg x)
  8331  	for {
  8332  		x := v.Args[0]
  8333  		if x.Op != OpARMMOVBload {
  8334  			break
  8335  		}
  8336  		_ = x.Args[1]
  8337  		v.reset(OpARMMOVWreg)
  8338  		v.AddArg(x)
  8339  		return true
  8340  	}
  8341  	// match: (MOVHreg x:(MOVBUload _ _))
  8342  	// cond:
  8343  	// result: (MOVWreg x)
  8344  	for {
  8345  		x := v.Args[0]
  8346  		if x.Op != OpARMMOVBUload {
  8347  			break
  8348  		}
  8349  		_ = x.Args[1]
  8350  		v.reset(OpARMMOVWreg)
  8351  		v.AddArg(x)
  8352  		return true
  8353  	}
  8354  	// match: (MOVHreg x:(MOVHload _ _))
  8355  	// cond:
  8356  	// result: (MOVWreg x)
  8357  	for {
  8358  		x := v.Args[0]
  8359  		if x.Op != OpARMMOVHload {
  8360  			break
  8361  		}
  8362  		_ = x.Args[1]
  8363  		v.reset(OpARMMOVWreg)
  8364  		v.AddArg(x)
  8365  		return true
  8366  	}
  8367  	// match: (MOVHreg (ANDconst [c] x))
  8368  	// cond: c & 0x8000 == 0
  8369  	// result: (ANDconst [c&0x7fff] x)
  8370  	for {
  8371  		v_0 := v.Args[0]
  8372  		if v_0.Op != OpARMANDconst {
  8373  			break
  8374  		}
  8375  		c := v_0.AuxInt
  8376  		x := v_0.Args[0]
  8377  		if !(c&0x8000 == 0) {
  8378  			break
  8379  		}
  8380  		v.reset(OpARMANDconst)
  8381  		v.AuxInt = c & 0x7fff
  8382  		v.AddArg(x)
  8383  		return true
  8384  	}
  8385  	// match: (MOVHreg x:(MOVBreg _))
  8386  	// cond:
  8387  	// result: (MOVWreg x)
  8388  	for {
  8389  		x := v.Args[0]
  8390  		if x.Op != OpARMMOVBreg {
  8391  			break
  8392  		}
  8393  		v.reset(OpARMMOVWreg)
  8394  		v.AddArg(x)
  8395  		return true
  8396  	}
  8397  	// match: (MOVHreg x:(MOVBUreg _))
  8398  	// cond:
  8399  	// result: (MOVWreg x)
  8400  	for {
  8401  		x := v.Args[0]
  8402  		if x.Op != OpARMMOVBUreg {
  8403  			break
  8404  		}
  8405  		v.reset(OpARMMOVWreg)
  8406  		v.AddArg(x)
  8407  		return true
  8408  	}
  8409  	// match: (MOVHreg x:(MOVHreg _))
  8410  	// cond:
  8411  	// result: (MOVWreg x)
  8412  	for {
  8413  		x := v.Args[0]
  8414  		if x.Op != OpARMMOVHreg {
  8415  			break
  8416  		}
  8417  		v.reset(OpARMMOVWreg)
  8418  		v.AddArg(x)
  8419  		return true
  8420  	}
  8421  	// match: (MOVHreg (MOVWconst [c]))
  8422  	// cond:
  8423  	// result: (MOVWconst [int64(int16(c))])
  8424  	for {
  8425  		v_0 := v.Args[0]
  8426  		if v_0.Op != OpARMMOVWconst {
  8427  			break
  8428  		}
  8429  		c := v_0.AuxInt
  8430  		v.reset(OpARMMOVWconst)
  8431  		v.AuxInt = int64(int16(c))
  8432  		return true
  8433  	}
  8434  	return false
  8435  }
  8436  func rewriteValueARM_OpARMMOVHstore_0(v *Value) bool {
  8437  	b := v.Block
  8438  	_ = b
  8439  	config := b.Func.Config
  8440  	_ = config
  8441  	// match: (MOVHstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  8442  	// cond:
  8443  	// result: (MOVHstore [off1+off2] {sym} ptr val mem)
  8444  	for {
  8445  		off1 := v.AuxInt
  8446  		sym := v.Aux
  8447  		_ = v.Args[2]
  8448  		v_0 := v.Args[0]
  8449  		if v_0.Op != OpARMADDconst {
  8450  			break
  8451  		}
  8452  		off2 := v_0.AuxInt
  8453  		ptr := v_0.Args[0]
  8454  		val := v.Args[1]
  8455  		mem := v.Args[2]
  8456  		v.reset(OpARMMOVHstore)
  8457  		v.AuxInt = off1 + off2
  8458  		v.Aux = sym
  8459  		v.AddArg(ptr)
  8460  		v.AddArg(val)
  8461  		v.AddArg(mem)
  8462  		return true
  8463  	}
  8464  	// match: (MOVHstore [off1] {sym} (SUBconst [off2] ptr) val mem)
  8465  	// cond:
  8466  	// result: (MOVHstore [off1-off2] {sym} ptr val mem)
  8467  	for {
  8468  		off1 := v.AuxInt
  8469  		sym := v.Aux
  8470  		_ = v.Args[2]
  8471  		v_0 := v.Args[0]
  8472  		if v_0.Op != OpARMSUBconst {
  8473  			break
  8474  		}
  8475  		off2 := v_0.AuxInt
  8476  		ptr := v_0.Args[0]
  8477  		val := v.Args[1]
  8478  		mem := v.Args[2]
  8479  		v.reset(OpARMMOVHstore)
  8480  		v.AuxInt = off1 - off2
  8481  		v.Aux = sym
  8482  		v.AddArg(ptr)
  8483  		v.AddArg(val)
  8484  		v.AddArg(mem)
  8485  		return true
  8486  	}
  8487  	// match: (MOVHstore [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) val mem)
  8488  	// cond: canMergeSym(sym1,sym2)
  8489  	// result: (MOVHstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  8490  	for {
  8491  		off1 := v.AuxInt
  8492  		sym1 := v.Aux
  8493  		_ = v.Args[2]
  8494  		v_0 := v.Args[0]
  8495  		if v_0.Op != OpARMMOVWaddr {
  8496  			break
  8497  		}
  8498  		off2 := v_0.AuxInt
  8499  		sym2 := v_0.Aux
  8500  		ptr := v_0.Args[0]
  8501  		val := v.Args[1]
  8502  		mem := v.Args[2]
  8503  		if !(canMergeSym(sym1, sym2)) {
  8504  			break
  8505  		}
  8506  		v.reset(OpARMMOVHstore)
  8507  		v.AuxInt = off1 + off2
  8508  		v.Aux = mergeSym(sym1, sym2)
  8509  		v.AddArg(ptr)
  8510  		v.AddArg(val)
  8511  		v.AddArg(mem)
  8512  		return true
  8513  	}
  8514  	// match: (MOVHstore [off] {sym} ptr (MOVHreg x) mem)
  8515  	// cond:
  8516  	// result: (MOVHstore [off] {sym} ptr x mem)
  8517  	for {
  8518  		off := v.AuxInt
  8519  		sym := v.Aux
  8520  		_ = v.Args[2]
  8521  		ptr := v.Args[0]
  8522  		v_1 := v.Args[1]
  8523  		if v_1.Op != OpARMMOVHreg {
  8524  			break
  8525  		}
  8526  		x := v_1.Args[0]
  8527  		mem := v.Args[2]
  8528  		v.reset(OpARMMOVHstore)
  8529  		v.AuxInt = off
  8530  		v.Aux = sym
  8531  		v.AddArg(ptr)
  8532  		v.AddArg(x)
  8533  		v.AddArg(mem)
  8534  		return true
  8535  	}
  8536  	// match: (MOVHstore [off] {sym} ptr (MOVHUreg x) mem)
  8537  	// cond:
  8538  	// result: (MOVHstore [off] {sym} ptr x mem)
  8539  	for {
  8540  		off := v.AuxInt
  8541  		sym := v.Aux
  8542  		_ = v.Args[2]
  8543  		ptr := v.Args[0]
  8544  		v_1 := v.Args[1]
  8545  		if v_1.Op != OpARMMOVHUreg {
  8546  			break
  8547  		}
  8548  		x := v_1.Args[0]
  8549  		mem := v.Args[2]
  8550  		v.reset(OpARMMOVHstore)
  8551  		v.AuxInt = off
  8552  		v.Aux = sym
  8553  		v.AddArg(ptr)
  8554  		v.AddArg(x)
  8555  		v.AddArg(mem)
  8556  		return true
  8557  	}
  8558  	// match: (MOVHstore [0] {sym} (ADD ptr idx) val mem)
  8559  	// cond: sym == nil && !config.nacl
  8560  	// result: (MOVHstoreidx ptr idx val mem)
  8561  	for {
  8562  		if v.AuxInt != 0 {
  8563  			break
  8564  		}
  8565  		sym := v.Aux
  8566  		_ = v.Args[2]
  8567  		v_0 := v.Args[0]
  8568  		if v_0.Op != OpARMADD {
  8569  			break
  8570  		}
  8571  		_ = v_0.Args[1]
  8572  		ptr := v_0.Args[0]
  8573  		idx := v_0.Args[1]
  8574  		val := v.Args[1]
  8575  		mem := v.Args[2]
  8576  		if !(sym == nil && !config.nacl) {
  8577  			break
  8578  		}
  8579  		v.reset(OpARMMOVHstoreidx)
  8580  		v.AddArg(ptr)
  8581  		v.AddArg(idx)
  8582  		v.AddArg(val)
  8583  		v.AddArg(mem)
  8584  		return true
  8585  	}
  8586  	return false
  8587  }
  8588  func rewriteValueARM_OpARMMOVHstoreidx_0(v *Value) bool {
  8589  	// match: (MOVHstoreidx ptr (MOVWconst [c]) val mem)
  8590  	// cond:
  8591  	// result: (MOVHstore [c] ptr val mem)
  8592  	for {
  8593  		_ = v.Args[3]
  8594  		ptr := v.Args[0]
  8595  		v_1 := v.Args[1]
  8596  		if v_1.Op != OpARMMOVWconst {
  8597  			break
  8598  		}
  8599  		c := v_1.AuxInt
  8600  		val := v.Args[2]
  8601  		mem := v.Args[3]
  8602  		v.reset(OpARMMOVHstore)
  8603  		v.AuxInt = c
  8604  		v.AddArg(ptr)
  8605  		v.AddArg(val)
  8606  		v.AddArg(mem)
  8607  		return true
  8608  	}
  8609  	// match: (MOVHstoreidx (MOVWconst [c]) ptr val mem)
  8610  	// cond:
  8611  	// result: (MOVHstore [c] ptr val mem)
  8612  	for {
  8613  		_ = v.Args[3]
  8614  		v_0 := v.Args[0]
  8615  		if v_0.Op != OpARMMOVWconst {
  8616  			break
  8617  		}
  8618  		c := v_0.AuxInt
  8619  		ptr := v.Args[1]
  8620  		val := v.Args[2]
  8621  		mem := v.Args[3]
  8622  		v.reset(OpARMMOVHstore)
  8623  		v.AuxInt = c
  8624  		v.AddArg(ptr)
  8625  		v.AddArg(val)
  8626  		v.AddArg(mem)
  8627  		return true
  8628  	}
  8629  	return false
  8630  }
  8631  func rewriteValueARM_OpARMMOVWload_0(v *Value) bool {
  8632  	b := v.Block
  8633  	_ = b
  8634  	config := b.Func.Config
  8635  	_ = config
  8636  	// match: (MOVWload [off1] {sym} (ADDconst [off2] ptr) mem)
  8637  	// cond:
  8638  	// result: (MOVWload [off1+off2] {sym} ptr mem)
  8639  	for {
  8640  		off1 := v.AuxInt
  8641  		sym := v.Aux
  8642  		_ = v.Args[1]
  8643  		v_0 := v.Args[0]
  8644  		if v_0.Op != OpARMADDconst {
  8645  			break
  8646  		}
  8647  		off2 := v_0.AuxInt
  8648  		ptr := v_0.Args[0]
  8649  		mem := v.Args[1]
  8650  		v.reset(OpARMMOVWload)
  8651  		v.AuxInt = off1 + off2
  8652  		v.Aux = sym
  8653  		v.AddArg(ptr)
  8654  		v.AddArg(mem)
  8655  		return true
  8656  	}
  8657  	// match: (MOVWload [off1] {sym} (SUBconst [off2] ptr) mem)
  8658  	// cond:
  8659  	// result: (MOVWload [off1-off2] {sym} ptr mem)
  8660  	for {
  8661  		off1 := v.AuxInt
  8662  		sym := v.Aux
  8663  		_ = v.Args[1]
  8664  		v_0 := v.Args[0]
  8665  		if v_0.Op != OpARMSUBconst {
  8666  			break
  8667  		}
  8668  		off2 := v_0.AuxInt
  8669  		ptr := v_0.Args[0]
  8670  		mem := v.Args[1]
  8671  		v.reset(OpARMMOVWload)
  8672  		v.AuxInt = off1 - off2
  8673  		v.Aux = sym
  8674  		v.AddArg(ptr)
  8675  		v.AddArg(mem)
  8676  		return true
  8677  	}
  8678  	// match: (MOVWload [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) mem)
  8679  	// cond: canMergeSym(sym1,sym2)
  8680  	// result: (MOVWload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  8681  	for {
  8682  		off1 := v.AuxInt
  8683  		sym1 := v.Aux
  8684  		_ = v.Args[1]
  8685  		v_0 := v.Args[0]
  8686  		if v_0.Op != OpARMMOVWaddr {
  8687  			break
  8688  		}
  8689  		off2 := v_0.AuxInt
  8690  		sym2 := v_0.Aux
  8691  		ptr := v_0.Args[0]
  8692  		mem := v.Args[1]
  8693  		if !(canMergeSym(sym1, sym2)) {
  8694  			break
  8695  		}
  8696  		v.reset(OpARMMOVWload)
  8697  		v.AuxInt = off1 + off2
  8698  		v.Aux = mergeSym(sym1, sym2)
  8699  		v.AddArg(ptr)
  8700  		v.AddArg(mem)
  8701  		return true
  8702  	}
  8703  	// match: (MOVWload [off] {sym} ptr (MOVWstore [off2] {sym2} ptr2 x _))
  8704  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  8705  	// result: x
  8706  	for {
  8707  		off := v.AuxInt
  8708  		sym := v.Aux
  8709  		_ = v.Args[1]
  8710  		ptr := v.Args[0]
  8711  		v_1 := v.Args[1]
  8712  		if v_1.Op != OpARMMOVWstore {
  8713  			break
  8714  		}
  8715  		off2 := v_1.AuxInt
  8716  		sym2 := v_1.Aux
  8717  		_ = v_1.Args[2]
  8718  		ptr2 := v_1.Args[0]
  8719  		x := v_1.Args[1]
  8720  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  8721  			break
  8722  		}
  8723  		v.reset(OpCopy)
  8724  		v.Type = x.Type
  8725  		v.AddArg(x)
  8726  		return true
  8727  	}
  8728  	// match: (MOVWload [0] {sym} (ADD ptr idx) mem)
  8729  	// cond: sym == nil && !config.nacl
  8730  	// result: (MOVWloadidx ptr idx mem)
  8731  	for {
  8732  		if v.AuxInt != 0 {
  8733  			break
  8734  		}
  8735  		sym := v.Aux
  8736  		_ = v.Args[1]
  8737  		v_0 := v.Args[0]
  8738  		if v_0.Op != OpARMADD {
  8739  			break
  8740  		}
  8741  		_ = v_0.Args[1]
  8742  		ptr := v_0.Args[0]
  8743  		idx := v_0.Args[1]
  8744  		mem := v.Args[1]
  8745  		if !(sym == nil && !config.nacl) {
  8746  			break
  8747  		}
  8748  		v.reset(OpARMMOVWloadidx)
  8749  		v.AddArg(ptr)
  8750  		v.AddArg(idx)
  8751  		v.AddArg(mem)
  8752  		return true
  8753  	}
  8754  	// match: (MOVWload [0] {sym} (ADDshiftLL ptr idx [c]) mem)
  8755  	// cond: sym == nil && !config.nacl
  8756  	// result: (MOVWloadshiftLL ptr idx [c] mem)
  8757  	for {
  8758  		if v.AuxInt != 0 {
  8759  			break
  8760  		}
  8761  		sym := v.Aux
  8762  		_ = v.Args[1]
  8763  		v_0 := v.Args[0]
  8764  		if v_0.Op != OpARMADDshiftLL {
  8765  			break
  8766  		}
  8767  		c := v_0.AuxInt
  8768  		_ = v_0.Args[1]
  8769  		ptr := v_0.Args[0]
  8770  		idx := v_0.Args[1]
  8771  		mem := v.Args[1]
  8772  		if !(sym == nil && !config.nacl) {
  8773  			break
  8774  		}
  8775  		v.reset(OpARMMOVWloadshiftLL)
  8776  		v.AuxInt = c
  8777  		v.AddArg(ptr)
  8778  		v.AddArg(idx)
  8779  		v.AddArg(mem)
  8780  		return true
  8781  	}
  8782  	// match: (MOVWload [0] {sym} (ADDshiftRL ptr idx [c]) mem)
  8783  	// cond: sym == nil && !config.nacl
  8784  	// result: (MOVWloadshiftRL ptr idx [c] mem)
  8785  	for {
  8786  		if v.AuxInt != 0 {
  8787  			break
  8788  		}
  8789  		sym := v.Aux
  8790  		_ = v.Args[1]
  8791  		v_0 := v.Args[0]
  8792  		if v_0.Op != OpARMADDshiftRL {
  8793  			break
  8794  		}
  8795  		c := v_0.AuxInt
  8796  		_ = v_0.Args[1]
  8797  		ptr := v_0.Args[0]
  8798  		idx := v_0.Args[1]
  8799  		mem := v.Args[1]
  8800  		if !(sym == nil && !config.nacl) {
  8801  			break
  8802  		}
  8803  		v.reset(OpARMMOVWloadshiftRL)
  8804  		v.AuxInt = c
  8805  		v.AddArg(ptr)
  8806  		v.AddArg(idx)
  8807  		v.AddArg(mem)
  8808  		return true
  8809  	}
  8810  	// match: (MOVWload [0] {sym} (ADDshiftRA ptr idx [c]) mem)
  8811  	// cond: sym == nil && !config.nacl
  8812  	// result: (MOVWloadshiftRA ptr idx [c] mem)
  8813  	for {
  8814  		if v.AuxInt != 0 {
  8815  			break
  8816  		}
  8817  		sym := v.Aux
  8818  		_ = v.Args[1]
  8819  		v_0 := v.Args[0]
  8820  		if v_0.Op != OpARMADDshiftRA {
  8821  			break
  8822  		}
  8823  		c := v_0.AuxInt
  8824  		_ = v_0.Args[1]
  8825  		ptr := v_0.Args[0]
  8826  		idx := v_0.Args[1]
  8827  		mem := v.Args[1]
  8828  		if !(sym == nil && !config.nacl) {
  8829  			break
  8830  		}
  8831  		v.reset(OpARMMOVWloadshiftRA)
  8832  		v.AuxInt = c
  8833  		v.AddArg(ptr)
  8834  		v.AddArg(idx)
  8835  		v.AddArg(mem)
  8836  		return true
  8837  	}
  8838  	// match: (MOVWload [off] {sym} (SB) _)
  8839  	// cond: symIsRO(sym)
  8840  	// result: (MOVWconst [int64(int32(read32(sym, off, config.BigEndian)))])
  8841  	for {
  8842  		off := v.AuxInt
  8843  		sym := v.Aux
  8844  		_ = v.Args[1]
  8845  		v_0 := v.Args[0]
  8846  		if v_0.Op != OpSB {
  8847  			break
  8848  		}
  8849  		if !(symIsRO(sym)) {
  8850  			break
  8851  		}
  8852  		v.reset(OpARMMOVWconst)
  8853  		v.AuxInt = int64(int32(read32(sym, off, config.BigEndian)))
  8854  		return true
  8855  	}
  8856  	return false
  8857  }
  8858  func rewriteValueARM_OpARMMOVWloadidx_0(v *Value) bool {
  8859  	// match: (MOVWloadidx ptr idx (MOVWstoreidx ptr2 idx x _))
  8860  	// cond: isSamePtr(ptr, ptr2)
  8861  	// result: x
  8862  	for {
  8863  		_ = v.Args[2]
  8864  		ptr := v.Args[0]
  8865  		idx := v.Args[1]
  8866  		v_2 := v.Args[2]
  8867  		if v_2.Op != OpARMMOVWstoreidx {
  8868  			break
  8869  		}
  8870  		_ = v_2.Args[3]
  8871  		ptr2 := v_2.Args[0]
  8872  		if idx != v_2.Args[1] {
  8873  			break
  8874  		}
  8875  		x := v_2.Args[2]
  8876  		if !(isSamePtr(ptr, ptr2)) {
  8877  			break
  8878  		}
  8879  		v.reset(OpCopy)
  8880  		v.Type = x.Type
  8881  		v.AddArg(x)
  8882  		return true
  8883  	}
  8884  	// match: (MOVWloadidx ptr (MOVWconst [c]) mem)
  8885  	// cond:
  8886  	// result: (MOVWload [c] ptr mem)
  8887  	for {
  8888  		_ = v.Args[2]
  8889  		ptr := v.Args[0]
  8890  		v_1 := v.Args[1]
  8891  		if v_1.Op != OpARMMOVWconst {
  8892  			break
  8893  		}
  8894  		c := v_1.AuxInt
  8895  		mem := v.Args[2]
  8896  		v.reset(OpARMMOVWload)
  8897  		v.AuxInt = c
  8898  		v.AddArg(ptr)
  8899  		v.AddArg(mem)
  8900  		return true
  8901  	}
  8902  	// match: (MOVWloadidx (MOVWconst [c]) ptr mem)
  8903  	// cond:
  8904  	// result: (MOVWload [c] ptr mem)
  8905  	for {
  8906  		_ = v.Args[2]
  8907  		v_0 := v.Args[0]
  8908  		if v_0.Op != OpARMMOVWconst {
  8909  			break
  8910  		}
  8911  		c := v_0.AuxInt
  8912  		ptr := v.Args[1]
  8913  		mem := v.Args[2]
  8914  		v.reset(OpARMMOVWload)
  8915  		v.AuxInt = c
  8916  		v.AddArg(ptr)
  8917  		v.AddArg(mem)
  8918  		return true
  8919  	}
  8920  	// match: (MOVWloadidx ptr (SLLconst idx [c]) mem)
  8921  	// cond:
  8922  	// result: (MOVWloadshiftLL ptr idx [c] mem)
  8923  	for {
  8924  		_ = v.Args[2]
  8925  		ptr := v.Args[0]
  8926  		v_1 := v.Args[1]
  8927  		if v_1.Op != OpARMSLLconst {
  8928  			break
  8929  		}
  8930  		c := v_1.AuxInt
  8931  		idx := v_1.Args[0]
  8932  		mem := v.Args[2]
  8933  		v.reset(OpARMMOVWloadshiftLL)
  8934  		v.AuxInt = c
  8935  		v.AddArg(ptr)
  8936  		v.AddArg(idx)
  8937  		v.AddArg(mem)
  8938  		return true
  8939  	}
  8940  	// match: (MOVWloadidx (SLLconst idx [c]) ptr mem)
  8941  	// cond:
  8942  	// result: (MOVWloadshiftLL ptr idx [c] mem)
  8943  	for {
  8944  		_ = v.Args[2]
  8945  		v_0 := v.Args[0]
  8946  		if v_0.Op != OpARMSLLconst {
  8947  			break
  8948  		}
  8949  		c := v_0.AuxInt
  8950  		idx := v_0.Args[0]
  8951  		ptr := v.Args[1]
  8952  		mem := v.Args[2]
  8953  		v.reset(OpARMMOVWloadshiftLL)
  8954  		v.AuxInt = c
  8955  		v.AddArg(ptr)
  8956  		v.AddArg(idx)
  8957  		v.AddArg(mem)
  8958  		return true
  8959  	}
  8960  	// match: (MOVWloadidx ptr (SRLconst idx [c]) mem)
  8961  	// cond:
  8962  	// result: (MOVWloadshiftRL ptr idx [c] mem)
  8963  	for {
  8964  		_ = v.Args[2]
  8965  		ptr := v.Args[0]
  8966  		v_1 := v.Args[1]
  8967  		if v_1.Op != OpARMSRLconst {
  8968  			break
  8969  		}
  8970  		c := v_1.AuxInt
  8971  		idx := v_1.Args[0]
  8972  		mem := v.Args[2]
  8973  		v.reset(OpARMMOVWloadshiftRL)
  8974  		v.AuxInt = c
  8975  		v.AddArg(ptr)
  8976  		v.AddArg(idx)
  8977  		v.AddArg(mem)
  8978  		return true
  8979  	}
  8980  	// match: (MOVWloadidx (SRLconst idx [c]) ptr mem)
  8981  	// cond:
  8982  	// result: (MOVWloadshiftRL ptr idx [c] mem)
  8983  	for {
  8984  		_ = v.Args[2]
  8985  		v_0 := v.Args[0]
  8986  		if v_0.Op != OpARMSRLconst {
  8987  			break
  8988  		}
  8989  		c := v_0.AuxInt
  8990  		idx := v_0.Args[0]
  8991  		ptr := v.Args[1]
  8992  		mem := v.Args[2]
  8993  		v.reset(OpARMMOVWloadshiftRL)
  8994  		v.AuxInt = c
  8995  		v.AddArg(ptr)
  8996  		v.AddArg(idx)
  8997  		v.AddArg(mem)
  8998  		return true
  8999  	}
  9000  	// match: (MOVWloadidx ptr (SRAconst idx [c]) mem)
  9001  	// cond:
  9002  	// result: (MOVWloadshiftRA ptr idx [c] mem)
  9003  	for {
  9004  		_ = v.Args[2]
  9005  		ptr := v.Args[0]
  9006  		v_1 := v.Args[1]
  9007  		if v_1.Op != OpARMSRAconst {
  9008  			break
  9009  		}
  9010  		c := v_1.AuxInt
  9011  		idx := v_1.Args[0]
  9012  		mem := v.Args[2]
  9013  		v.reset(OpARMMOVWloadshiftRA)
  9014  		v.AuxInt = c
  9015  		v.AddArg(ptr)
  9016  		v.AddArg(idx)
  9017  		v.AddArg(mem)
  9018  		return true
  9019  	}
  9020  	// match: (MOVWloadidx (SRAconst idx [c]) ptr mem)
  9021  	// cond:
  9022  	// result: (MOVWloadshiftRA ptr idx [c] mem)
  9023  	for {
  9024  		_ = v.Args[2]
  9025  		v_0 := v.Args[0]
  9026  		if v_0.Op != OpARMSRAconst {
  9027  			break
  9028  		}
  9029  		c := v_0.AuxInt
  9030  		idx := v_0.Args[0]
  9031  		ptr := v.Args[1]
  9032  		mem := v.Args[2]
  9033  		v.reset(OpARMMOVWloadshiftRA)
  9034  		v.AuxInt = c
  9035  		v.AddArg(ptr)
  9036  		v.AddArg(idx)
  9037  		v.AddArg(mem)
  9038  		return true
  9039  	}
  9040  	return false
  9041  }
  9042  func rewriteValueARM_OpARMMOVWloadshiftLL_0(v *Value) bool {
  9043  	// match: (MOVWloadshiftLL ptr idx [c] (MOVWstoreshiftLL ptr2 idx [d] x _))
  9044  	// cond: c==d && isSamePtr(ptr, ptr2)
  9045  	// result: x
  9046  	for {
  9047  		c := v.AuxInt
  9048  		_ = v.Args[2]
  9049  		ptr := v.Args[0]
  9050  		idx := v.Args[1]
  9051  		v_2 := v.Args[2]
  9052  		if v_2.Op != OpARMMOVWstoreshiftLL {
  9053  			break
  9054  		}
  9055  		d := v_2.AuxInt
  9056  		_ = v_2.Args[3]
  9057  		ptr2 := v_2.Args[0]
  9058  		if idx != v_2.Args[1] {
  9059  			break
  9060  		}
  9061  		x := v_2.Args[2]
  9062  		if !(c == d && isSamePtr(ptr, ptr2)) {
  9063  			break
  9064  		}
  9065  		v.reset(OpCopy)
  9066  		v.Type = x.Type
  9067  		v.AddArg(x)
  9068  		return true
  9069  	}
  9070  	// match: (MOVWloadshiftLL ptr (MOVWconst [c]) [d] mem)
  9071  	// cond:
  9072  	// result: (MOVWload [int64(uint32(c)<<uint64(d))] ptr mem)
  9073  	for {
  9074  		d := v.AuxInt
  9075  		_ = v.Args[2]
  9076  		ptr := v.Args[0]
  9077  		v_1 := v.Args[1]
  9078  		if v_1.Op != OpARMMOVWconst {
  9079  			break
  9080  		}
  9081  		c := v_1.AuxInt
  9082  		mem := v.Args[2]
  9083  		v.reset(OpARMMOVWload)
  9084  		v.AuxInt = int64(uint32(c) << uint64(d))
  9085  		v.AddArg(ptr)
  9086  		v.AddArg(mem)
  9087  		return true
  9088  	}
  9089  	return false
  9090  }
  9091  func rewriteValueARM_OpARMMOVWloadshiftRA_0(v *Value) bool {
  9092  	// match: (MOVWloadshiftRA ptr idx [c] (MOVWstoreshiftRA ptr2 idx [d] x _))
  9093  	// cond: c==d && isSamePtr(ptr, ptr2)
  9094  	// result: x
  9095  	for {
  9096  		c := v.AuxInt
  9097  		_ = v.Args[2]
  9098  		ptr := v.Args[0]
  9099  		idx := v.Args[1]
  9100  		v_2 := v.Args[2]
  9101  		if v_2.Op != OpARMMOVWstoreshiftRA {
  9102  			break
  9103  		}
  9104  		d := v_2.AuxInt
  9105  		_ = v_2.Args[3]
  9106  		ptr2 := v_2.Args[0]
  9107  		if idx != v_2.Args[1] {
  9108  			break
  9109  		}
  9110  		x := v_2.Args[2]
  9111  		if !(c == d && isSamePtr(ptr, ptr2)) {
  9112  			break
  9113  		}
  9114  		v.reset(OpCopy)
  9115  		v.Type = x.Type
  9116  		v.AddArg(x)
  9117  		return true
  9118  	}
  9119  	// match: (MOVWloadshiftRA ptr (MOVWconst [c]) [d] mem)
  9120  	// cond:
  9121  	// result: (MOVWload [int64(int32(c)>>uint64(d))] ptr mem)
  9122  	for {
  9123  		d := v.AuxInt
  9124  		_ = v.Args[2]
  9125  		ptr := v.Args[0]
  9126  		v_1 := v.Args[1]
  9127  		if v_1.Op != OpARMMOVWconst {
  9128  			break
  9129  		}
  9130  		c := v_1.AuxInt
  9131  		mem := v.Args[2]
  9132  		v.reset(OpARMMOVWload)
  9133  		v.AuxInt = int64(int32(c) >> uint64(d))
  9134  		v.AddArg(ptr)
  9135  		v.AddArg(mem)
  9136  		return true
  9137  	}
  9138  	return false
  9139  }
  9140  func rewriteValueARM_OpARMMOVWloadshiftRL_0(v *Value) bool {
  9141  	// match: (MOVWloadshiftRL ptr idx [c] (MOVWstoreshiftRL ptr2 idx [d] x _))
  9142  	// cond: c==d && isSamePtr(ptr, ptr2)
  9143  	// result: x
  9144  	for {
  9145  		c := v.AuxInt
  9146  		_ = v.Args[2]
  9147  		ptr := v.Args[0]
  9148  		idx := v.Args[1]
  9149  		v_2 := v.Args[2]
  9150  		if v_2.Op != OpARMMOVWstoreshiftRL {
  9151  			break
  9152  		}
  9153  		d := v_2.AuxInt
  9154  		_ = v_2.Args[3]
  9155  		ptr2 := v_2.Args[0]
  9156  		if idx != v_2.Args[1] {
  9157  			break
  9158  		}
  9159  		x := v_2.Args[2]
  9160  		if !(c == d && isSamePtr(ptr, ptr2)) {
  9161  			break
  9162  		}
  9163  		v.reset(OpCopy)
  9164  		v.Type = x.Type
  9165  		v.AddArg(x)
  9166  		return true
  9167  	}
  9168  	// match: (MOVWloadshiftRL ptr (MOVWconst [c]) [d] mem)
  9169  	// cond:
  9170  	// result: (MOVWload [int64(uint32(c)>>uint64(d))] ptr mem)
  9171  	for {
  9172  		d := v.AuxInt
  9173  		_ = v.Args[2]
  9174  		ptr := v.Args[0]
  9175  		v_1 := v.Args[1]
  9176  		if v_1.Op != OpARMMOVWconst {
  9177  			break
  9178  		}
  9179  		c := v_1.AuxInt
  9180  		mem := v.Args[2]
  9181  		v.reset(OpARMMOVWload)
  9182  		v.AuxInt = int64(uint32(c) >> uint64(d))
  9183  		v.AddArg(ptr)
  9184  		v.AddArg(mem)
  9185  		return true
  9186  	}
  9187  	return false
  9188  }
  9189  func rewriteValueARM_OpARMMOVWreg_0(v *Value) bool {
  9190  	// match: (MOVWreg x)
  9191  	// cond: x.Uses == 1
  9192  	// result: (MOVWnop x)
  9193  	for {
  9194  		x := v.Args[0]
  9195  		if !(x.Uses == 1) {
  9196  			break
  9197  		}
  9198  		v.reset(OpARMMOVWnop)
  9199  		v.AddArg(x)
  9200  		return true
  9201  	}
  9202  	// match: (MOVWreg (MOVWconst [c]))
  9203  	// cond:
  9204  	// result: (MOVWconst [c])
  9205  	for {
  9206  		v_0 := v.Args[0]
  9207  		if v_0.Op != OpARMMOVWconst {
  9208  			break
  9209  		}
  9210  		c := v_0.AuxInt
  9211  		v.reset(OpARMMOVWconst)
  9212  		v.AuxInt = c
  9213  		return true
  9214  	}
  9215  	return false
  9216  }
  9217  func rewriteValueARM_OpARMMOVWstore_0(v *Value) bool {
  9218  	b := v.Block
  9219  	_ = b
  9220  	config := b.Func.Config
  9221  	_ = config
  9222  	// match: (MOVWstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  9223  	// cond:
  9224  	// result: (MOVWstore [off1+off2] {sym} ptr val mem)
  9225  	for {
  9226  		off1 := v.AuxInt
  9227  		sym := v.Aux
  9228  		_ = v.Args[2]
  9229  		v_0 := v.Args[0]
  9230  		if v_0.Op != OpARMADDconst {
  9231  			break
  9232  		}
  9233  		off2 := v_0.AuxInt
  9234  		ptr := v_0.Args[0]
  9235  		val := v.Args[1]
  9236  		mem := v.Args[2]
  9237  		v.reset(OpARMMOVWstore)
  9238  		v.AuxInt = off1 + off2
  9239  		v.Aux = sym
  9240  		v.AddArg(ptr)
  9241  		v.AddArg(val)
  9242  		v.AddArg(mem)
  9243  		return true
  9244  	}
  9245  	// match: (MOVWstore [off1] {sym} (SUBconst [off2] ptr) val mem)
  9246  	// cond:
  9247  	// result: (MOVWstore [off1-off2] {sym} ptr val mem)
  9248  	for {
  9249  		off1 := v.AuxInt
  9250  		sym := v.Aux
  9251  		_ = v.Args[2]
  9252  		v_0 := v.Args[0]
  9253  		if v_0.Op != OpARMSUBconst {
  9254  			break
  9255  		}
  9256  		off2 := v_0.AuxInt
  9257  		ptr := v_0.Args[0]
  9258  		val := v.Args[1]
  9259  		mem := v.Args[2]
  9260  		v.reset(OpARMMOVWstore)
  9261  		v.AuxInt = off1 - off2
  9262  		v.Aux = sym
  9263  		v.AddArg(ptr)
  9264  		v.AddArg(val)
  9265  		v.AddArg(mem)
  9266  		return true
  9267  	}
  9268  	// match: (MOVWstore [off1] {sym1} (MOVWaddr [off2] {sym2} ptr) val mem)
  9269  	// cond: canMergeSym(sym1,sym2)
  9270  	// result: (MOVWstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  9271  	for {
  9272  		off1 := v.AuxInt
  9273  		sym1 := v.Aux
  9274  		_ = v.Args[2]
  9275  		v_0 := v.Args[0]
  9276  		if v_0.Op != OpARMMOVWaddr {
  9277  			break
  9278  		}
  9279  		off2 := v_0.AuxInt
  9280  		sym2 := v_0.Aux
  9281  		ptr := v_0.Args[0]
  9282  		val := v.Args[1]
  9283  		mem := v.Args[2]
  9284  		if !(canMergeSym(sym1, sym2)) {
  9285  			break
  9286  		}
  9287  		v.reset(OpARMMOVWstore)
  9288  		v.AuxInt = off1 + off2
  9289  		v.Aux = mergeSym(sym1, sym2)
  9290  		v.AddArg(ptr)
  9291  		v.AddArg(val)
  9292  		v.AddArg(mem)
  9293  		return true
  9294  	}
  9295  	// match: (MOVWstore [0] {sym} (ADD ptr idx) val mem)
  9296  	// cond: sym == nil && !config.nacl
  9297  	// result: (MOVWstoreidx ptr idx val mem)
  9298  	for {
  9299  		if v.AuxInt != 0 {
  9300  			break
  9301  		}
  9302  		sym := v.Aux
  9303  		_ = v.Args[2]
  9304  		v_0 := v.Args[0]
  9305  		if v_0.Op != OpARMADD {
  9306  			break
  9307  		}
  9308  		_ = v_0.Args[1]
  9309  		ptr := v_0.Args[0]
  9310  		idx := v_0.Args[1]
  9311  		val := v.Args[1]
  9312  		mem := v.Args[2]
  9313  		if !(sym == nil && !config.nacl) {
  9314  			break
  9315  		}
  9316  		v.reset(OpARMMOVWstoreidx)
  9317  		v.AddArg(ptr)
  9318  		v.AddArg(idx)
  9319  		v.AddArg(val)
  9320  		v.AddArg(mem)
  9321  		return true
  9322  	}
  9323  	// match: (MOVWstore [0] {sym} (ADDshiftLL ptr idx [c]) val mem)
  9324  	// cond: sym == nil && !config.nacl
  9325  	// result: (MOVWstoreshiftLL ptr idx [c] val mem)
  9326  	for {
  9327  		if v.AuxInt != 0 {
  9328  			break
  9329  		}
  9330  		sym := v.Aux
  9331  		_ = v.Args[2]
  9332  		v_0 := v.Args[0]
  9333  		if v_0.Op != OpARMADDshiftLL {
  9334  			break
  9335  		}
  9336  		c := v_0.AuxInt
  9337  		_ = v_0.Args[1]
  9338  		ptr := v_0.Args[0]
  9339  		idx := v_0.Args[1]
  9340  		val := v.Args[1]
  9341  		mem := v.Args[2]
  9342  		if !(sym == nil && !config.nacl) {
  9343  			break
  9344  		}
  9345  		v.reset(OpARMMOVWstoreshiftLL)
  9346  		v.AuxInt = c
  9347  		v.AddArg(ptr)
  9348  		v.AddArg(idx)
  9349  		v.AddArg(val)
  9350  		v.AddArg(mem)
  9351  		return true
  9352  	}
  9353  	// match: (MOVWstore [0] {sym} (ADDshiftRL ptr idx [c]) val mem)
  9354  	// cond: sym == nil && !config.nacl
  9355  	// result: (MOVWstoreshiftRL ptr idx [c] val mem)
  9356  	for {
  9357  		if v.AuxInt != 0 {
  9358  			break
  9359  		}
  9360  		sym := v.Aux
  9361  		_ = v.Args[2]
  9362  		v_0 := v.Args[0]
  9363  		if v_0.Op != OpARMADDshiftRL {
  9364  			break
  9365  		}
  9366  		c := v_0.AuxInt
  9367  		_ = v_0.Args[1]
  9368  		ptr := v_0.Args[0]
  9369  		idx := v_0.Args[1]
  9370  		val := v.Args[1]
  9371  		mem := v.Args[2]
  9372  		if !(sym == nil && !config.nacl) {
  9373  			break
  9374  		}
  9375  		v.reset(OpARMMOVWstoreshiftRL)
  9376  		v.AuxInt = c
  9377  		v.AddArg(ptr)
  9378  		v.AddArg(idx)
  9379  		v.AddArg(val)
  9380  		v.AddArg(mem)
  9381  		return true
  9382  	}
  9383  	// match: (MOVWstore [0] {sym} (ADDshiftRA ptr idx [c]) val mem)
  9384  	// cond: sym == nil && !config.nacl
  9385  	// result: (MOVWstoreshiftRA ptr idx [c] val mem)
  9386  	for {
  9387  		if v.AuxInt != 0 {
  9388  			break
  9389  		}
  9390  		sym := v.Aux
  9391  		_ = v.Args[2]
  9392  		v_0 := v.Args[0]
  9393  		if v_0.Op != OpARMADDshiftRA {
  9394  			break
  9395  		}
  9396  		c := v_0.AuxInt
  9397  		_ = v_0.Args[1]
  9398  		ptr := v_0.Args[0]
  9399  		idx := v_0.Args[1]
  9400  		val := v.Args[1]
  9401  		mem := v.Args[2]
  9402  		if !(sym == nil && !config.nacl) {
  9403  			break
  9404  		}
  9405  		v.reset(OpARMMOVWstoreshiftRA)
  9406  		v.AuxInt = c
  9407  		v.AddArg(ptr)
  9408  		v.AddArg(idx)
  9409  		v.AddArg(val)
  9410  		v.AddArg(mem)
  9411  		return true
  9412  	}
  9413  	return false
  9414  }
  9415  func rewriteValueARM_OpARMMOVWstoreidx_0(v *Value) bool {
  9416  	// match: (MOVWstoreidx ptr (MOVWconst [c]) val mem)
  9417  	// cond:
  9418  	// result: (MOVWstore [c] ptr val mem)
  9419  	for {
  9420  		_ = v.Args[3]
  9421  		ptr := v.Args[0]
  9422  		v_1 := v.Args[1]
  9423  		if v_1.Op != OpARMMOVWconst {
  9424  			break
  9425  		}
  9426  		c := v_1.AuxInt
  9427  		val := v.Args[2]
  9428  		mem := v.Args[3]
  9429  		v.reset(OpARMMOVWstore)
  9430  		v.AuxInt = c
  9431  		v.AddArg(ptr)
  9432  		v.AddArg(val)
  9433  		v.AddArg(mem)
  9434  		return true
  9435  	}
  9436  	// match: (MOVWstoreidx (MOVWconst [c]) ptr val mem)
  9437  	// cond:
  9438  	// result: (MOVWstore [c] ptr val mem)
  9439  	for {
  9440  		_ = v.Args[3]
  9441  		v_0 := v.Args[0]
  9442  		if v_0.Op != OpARMMOVWconst {
  9443  			break
  9444  		}
  9445  		c := v_0.AuxInt
  9446  		ptr := v.Args[1]
  9447  		val := v.Args[2]
  9448  		mem := v.Args[3]
  9449  		v.reset(OpARMMOVWstore)
  9450  		v.AuxInt = c
  9451  		v.AddArg(ptr)
  9452  		v.AddArg(val)
  9453  		v.AddArg(mem)
  9454  		return true
  9455  	}
  9456  	// match: (MOVWstoreidx ptr (SLLconst idx [c]) val mem)
  9457  	// cond:
  9458  	// result: (MOVWstoreshiftLL ptr idx [c] val mem)
  9459  	for {
  9460  		_ = v.Args[3]
  9461  		ptr := v.Args[0]
  9462  		v_1 := v.Args[1]
  9463  		if v_1.Op != OpARMSLLconst {
  9464  			break
  9465  		}
  9466  		c := v_1.AuxInt
  9467  		idx := v_1.Args[0]
  9468  		val := v.Args[2]
  9469  		mem := v.Args[3]
  9470  		v.reset(OpARMMOVWstoreshiftLL)
  9471  		v.AuxInt = c
  9472  		v.AddArg(ptr)
  9473  		v.AddArg(idx)
  9474  		v.AddArg(val)
  9475  		v.AddArg(mem)
  9476  		return true
  9477  	}
  9478  	// match: (MOVWstoreidx (SLLconst idx [c]) ptr val mem)
  9479  	// cond:
  9480  	// result: (MOVWstoreshiftLL ptr idx [c] val mem)
  9481  	for {
  9482  		_ = v.Args[3]
  9483  		v_0 := v.Args[0]
  9484  		if v_0.Op != OpARMSLLconst {
  9485  			break
  9486  		}
  9487  		c := v_0.AuxInt
  9488  		idx := v_0.Args[0]
  9489  		ptr := v.Args[1]
  9490  		val := v.Args[2]
  9491  		mem := v.Args[3]
  9492  		v.reset(OpARMMOVWstoreshiftLL)
  9493  		v.AuxInt = c
  9494  		v.AddArg(ptr)
  9495  		v.AddArg(idx)
  9496  		v.AddArg(val)
  9497  		v.AddArg(mem)
  9498  		return true
  9499  	}
  9500  	// match: (MOVWstoreidx ptr (SRLconst idx [c]) val mem)
  9501  	// cond:
  9502  	// result: (MOVWstoreshiftRL ptr idx [c] val mem)
  9503  	for {
  9504  		_ = v.Args[3]
  9505  		ptr := v.Args[0]
  9506  		v_1 := v.Args[1]
  9507  		if v_1.Op != OpARMSRLconst {
  9508  			break
  9509  		}
  9510  		c := v_1.AuxInt
  9511  		idx := v_1.Args[0]
  9512  		val := v.Args[2]
  9513  		mem := v.Args[3]
  9514  		v.reset(OpARMMOVWstoreshiftRL)
  9515  		v.AuxInt = c
  9516  		v.AddArg(ptr)
  9517  		v.AddArg(idx)
  9518  		v.AddArg(val)
  9519  		v.AddArg(mem)
  9520  		return true
  9521  	}
  9522  	// match: (MOVWstoreidx (SRLconst idx [c]) ptr val mem)
  9523  	// cond:
  9524  	// result: (MOVWstoreshiftRL ptr idx [c] val mem)
  9525  	for {
  9526  		_ = v.Args[3]
  9527  		v_0 := v.Args[0]
  9528  		if v_0.Op != OpARMSRLconst {
  9529  			break
  9530  		}
  9531  		c := v_0.AuxInt
  9532  		idx := v_0.Args[0]
  9533  		ptr := v.Args[1]
  9534  		val := v.Args[2]
  9535  		mem := v.Args[3]
  9536  		v.reset(OpARMMOVWstoreshiftRL)
  9537  		v.AuxInt = c
  9538  		v.AddArg(ptr)
  9539  		v.AddArg(idx)
  9540  		v.AddArg(val)
  9541  		v.AddArg(mem)
  9542  		return true
  9543  	}
  9544  	// match: (MOVWstoreidx ptr (SRAconst idx [c]) val mem)
  9545  	// cond:
  9546  	// result: (MOVWstoreshiftRA ptr idx [c] val mem)
  9547  	for {
  9548  		_ = v.Args[3]
  9549  		ptr := v.Args[0]
  9550  		v_1 := v.Args[1]
  9551  		if v_1.Op != OpARMSRAconst {
  9552  			break
  9553  		}
  9554  		c := v_1.AuxInt
  9555  		idx := v_1.Args[0]
  9556  		val := v.Args[2]
  9557  		mem := v.Args[3]
  9558  		v.reset(OpARMMOVWstoreshiftRA)
  9559  		v.AuxInt = c
  9560  		v.AddArg(ptr)
  9561  		v.AddArg(idx)
  9562  		v.AddArg(val)
  9563  		v.AddArg(mem)
  9564  		return true
  9565  	}
  9566  	// match: (MOVWstoreidx (SRAconst idx [c]) ptr val mem)
  9567  	// cond:
  9568  	// result: (MOVWstoreshiftRA ptr idx [c] val mem)
  9569  	for {
  9570  		_ = v.Args[3]
  9571  		v_0 := v.Args[0]
  9572  		if v_0.Op != OpARMSRAconst {
  9573  			break
  9574  		}
  9575  		c := v_0.AuxInt
  9576  		idx := v_0.Args[0]
  9577  		ptr := v.Args[1]
  9578  		val := v.Args[2]
  9579  		mem := v.Args[3]
  9580  		v.reset(OpARMMOVWstoreshiftRA)
  9581  		v.AuxInt = c
  9582  		v.AddArg(ptr)
  9583  		v.AddArg(idx)
  9584  		v.AddArg(val)
  9585  		v.AddArg(mem)
  9586  		return true
  9587  	}
  9588  	return false
  9589  }
  9590  func rewriteValueARM_OpARMMOVWstoreshiftLL_0(v *Value) bool {
  9591  	// match: (MOVWstoreshiftLL ptr (MOVWconst [c]) [d] val mem)
  9592  	// cond:
  9593  	// result: (MOVWstore [int64(uint32(c)<<uint64(d))] ptr val mem)
  9594  	for {
  9595  		d := v.AuxInt
  9596  		_ = v.Args[3]
  9597  		ptr := v.Args[0]
  9598  		v_1 := v.Args[1]
  9599  		if v_1.Op != OpARMMOVWconst {
  9600  			break
  9601  		}
  9602  		c := v_1.AuxInt
  9603  		val := v.Args[2]
  9604  		mem := v.Args[3]
  9605  		v.reset(OpARMMOVWstore)
  9606  		v.AuxInt = int64(uint32(c) << uint64(d))
  9607  		v.AddArg(ptr)
  9608  		v.AddArg(val)
  9609  		v.AddArg(mem)
  9610  		return true
  9611  	}
  9612  	return false
  9613  }
  9614  func rewriteValueARM_OpARMMOVWstoreshiftRA_0(v *Value) bool {
  9615  	// match: (MOVWstoreshiftRA ptr (MOVWconst [c]) [d] val mem)
  9616  	// cond:
  9617  	// result: (MOVWstore [int64(int32(c)>>uint64(d))] ptr val mem)
  9618  	for {
  9619  		d := v.AuxInt
  9620  		_ = v.Args[3]
  9621  		ptr := v.Args[0]
  9622  		v_1 := v.Args[1]
  9623  		if v_1.Op != OpARMMOVWconst {
  9624  			break
  9625  		}
  9626  		c := v_1.AuxInt
  9627  		val := v.Args[2]
  9628  		mem := v.Args[3]
  9629  		v.reset(OpARMMOVWstore)
  9630  		v.AuxInt = int64(int32(c) >> uint64(d))
  9631  		v.AddArg(ptr)
  9632  		v.AddArg(val)
  9633  		v.AddArg(mem)
  9634  		return true
  9635  	}
  9636  	return false
  9637  }
  9638  func rewriteValueARM_OpARMMOVWstoreshiftRL_0(v *Value) bool {
  9639  	// match: (MOVWstoreshiftRL ptr (MOVWconst [c]) [d] val mem)
  9640  	// cond:
  9641  	// result: (MOVWstore [int64(uint32(c)>>uint64(d))] ptr val mem)
  9642  	for {
  9643  		d := v.AuxInt
  9644  		_ = v.Args[3]
  9645  		ptr := v.Args[0]
  9646  		v_1 := v.Args[1]
  9647  		if v_1.Op != OpARMMOVWconst {
  9648  			break
  9649  		}
  9650  		c := v_1.AuxInt
  9651  		val := v.Args[2]
  9652  		mem := v.Args[3]
  9653  		v.reset(OpARMMOVWstore)
  9654  		v.AuxInt = int64(uint32(c) >> uint64(d))
  9655  		v.AddArg(ptr)
  9656  		v.AddArg(val)
  9657  		v.AddArg(mem)
  9658  		return true
  9659  	}
  9660  	return false
  9661  }
  9662  func rewriteValueARM_OpARMMUL_0(v *Value) bool {
  9663  	// match: (MUL x (MOVWconst [c]))
  9664  	// cond: int32(c) == -1
  9665  	// result: (RSBconst [0] x)
  9666  	for {
  9667  		_ = v.Args[1]
  9668  		x := v.Args[0]
  9669  		v_1 := v.Args[1]
  9670  		if v_1.Op != OpARMMOVWconst {
  9671  			break
  9672  		}
  9673  		c := v_1.AuxInt
  9674  		if !(int32(c) == -1) {
  9675  			break
  9676  		}
  9677  		v.reset(OpARMRSBconst)
  9678  		v.AuxInt = 0
  9679  		v.AddArg(x)
  9680  		return true
  9681  	}
  9682  	// match: (MUL (MOVWconst [c]) x)
  9683  	// cond: int32(c) == -1
  9684  	// result: (RSBconst [0] x)
  9685  	for {
  9686  		_ = v.Args[1]
  9687  		v_0 := v.Args[0]
  9688  		if v_0.Op != OpARMMOVWconst {
  9689  			break
  9690  		}
  9691  		c := v_0.AuxInt
  9692  		x := v.Args[1]
  9693  		if !(int32(c) == -1) {
  9694  			break
  9695  		}
  9696  		v.reset(OpARMRSBconst)
  9697  		v.AuxInt = 0
  9698  		v.AddArg(x)
  9699  		return true
  9700  	}
  9701  	// match: (MUL _ (MOVWconst [0]))
  9702  	// cond:
  9703  	// result: (MOVWconst [0])
  9704  	for {
  9705  		_ = v.Args[1]
  9706  		v_1 := v.Args[1]
  9707  		if v_1.Op != OpARMMOVWconst {
  9708  			break
  9709  		}
  9710  		if v_1.AuxInt != 0 {
  9711  			break
  9712  		}
  9713  		v.reset(OpARMMOVWconst)
  9714  		v.AuxInt = 0
  9715  		return true
  9716  	}
  9717  	// match: (MUL (MOVWconst [0]) _)
  9718  	// cond:
  9719  	// result: (MOVWconst [0])
  9720  	for {
  9721  		_ = v.Args[1]
  9722  		v_0 := v.Args[0]
  9723  		if v_0.Op != OpARMMOVWconst {
  9724  			break
  9725  		}
  9726  		if v_0.AuxInt != 0 {
  9727  			break
  9728  		}
  9729  		v.reset(OpARMMOVWconst)
  9730  		v.AuxInt = 0
  9731  		return true
  9732  	}
  9733  	// match: (MUL x (MOVWconst [1]))
  9734  	// cond:
  9735  	// result: x
  9736  	for {
  9737  		_ = v.Args[1]
  9738  		x := v.Args[0]
  9739  		v_1 := v.Args[1]
  9740  		if v_1.Op != OpARMMOVWconst {
  9741  			break
  9742  		}
  9743  		if v_1.AuxInt != 1 {
  9744  			break
  9745  		}
  9746  		v.reset(OpCopy)
  9747  		v.Type = x.Type
  9748  		v.AddArg(x)
  9749  		return true
  9750  	}
  9751  	// match: (MUL (MOVWconst [1]) x)
  9752  	// cond:
  9753  	// result: x
  9754  	for {
  9755  		_ = v.Args[1]
  9756  		v_0 := v.Args[0]
  9757  		if v_0.Op != OpARMMOVWconst {
  9758  			break
  9759  		}
  9760  		if v_0.AuxInt != 1 {
  9761  			break
  9762  		}
  9763  		x := v.Args[1]
  9764  		v.reset(OpCopy)
  9765  		v.Type = x.Type
  9766  		v.AddArg(x)
  9767  		return true
  9768  	}
  9769  	// match: (MUL x (MOVWconst [c]))
  9770  	// cond: isPowerOfTwo(c)
  9771  	// result: (SLLconst [log2(c)] x)
  9772  	for {
  9773  		_ = v.Args[1]
  9774  		x := v.Args[0]
  9775  		v_1 := v.Args[1]
  9776  		if v_1.Op != OpARMMOVWconst {
  9777  			break
  9778  		}
  9779  		c := v_1.AuxInt
  9780  		if !(isPowerOfTwo(c)) {
  9781  			break
  9782  		}
  9783  		v.reset(OpARMSLLconst)
  9784  		v.AuxInt = log2(c)
  9785  		v.AddArg(x)
  9786  		return true
  9787  	}
  9788  	// match: (MUL (MOVWconst [c]) x)
  9789  	// cond: isPowerOfTwo(c)
  9790  	// result: (SLLconst [log2(c)] x)
  9791  	for {
  9792  		_ = v.Args[1]
  9793  		v_0 := v.Args[0]
  9794  		if v_0.Op != OpARMMOVWconst {
  9795  			break
  9796  		}
  9797  		c := v_0.AuxInt
  9798  		x := v.Args[1]
  9799  		if !(isPowerOfTwo(c)) {
  9800  			break
  9801  		}
  9802  		v.reset(OpARMSLLconst)
  9803  		v.AuxInt = log2(c)
  9804  		v.AddArg(x)
  9805  		return true
  9806  	}
  9807  	// match: (MUL x (MOVWconst [c]))
  9808  	// cond: isPowerOfTwo(c-1) && int32(c) >= 3
  9809  	// result: (ADDshiftLL x x [log2(c-1)])
  9810  	for {
  9811  		_ = v.Args[1]
  9812  		x := v.Args[0]
  9813  		v_1 := v.Args[1]
  9814  		if v_1.Op != OpARMMOVWconst {
  9815  			break
  9816  		}
  9817  		c := v_1.AuxInt
  9818  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
  9819  			break
  9820  		}
  9821  		v.reset(OpARMADDshiftLL)
  9822  		v.AuxInt = log2(c - 1)
  9823  		v.AddArg(x)
  9824  		v.AddArg(x)
  9825  		return true
  9826  	}
  9827  	// match: (MUL (MOVWconst [c]) x)
  9828  	// cond: isPowerOfTwo(c-1) && int32(c) >= 3
  9829  	// result: (ADDshiftLL x x [log2(c-1)])
  9830  	for {
  9831  		_ = v.Args[1]
  9832  		v_0 := v.Args[0]
  9833  		if v_0.Op != OpARMMOVWconst {
  9834  			break
  9835  		}
  9836  		c := v_0.AuxInt
  9837  		x := v.Args[1]
  9838  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
  9839  			break
  9840  		}
  9841  		v.reset(OpARMADDshiftLL)
  9842  		v.AuxInt = log2(c - 1)
  9843  		v.AddArg(x)
  9844  		v.AddArg(x)
  9845  		return true
  9846  	}
  9847  	return false
  9848  }
  9849  func rewriteValueARM_OpARMMUL_10(v *Value) bool {
  9850  	b := v.Block
  9851  	_ = b
  9852  	// match: (MUL x (MOVWconst [c]))
  9853  	// cond: isPowerOfTwo(c+1) && int32(c) >= 7
  9854  	// result: (RSBshiftLL x x [log2(c+1)])
  9855  	for {
  9856  		_ = v.Args[1]
  9857  		x := v.Args[0]
  9858  		v_1 := v.Args[1]
  9859  		if v_1.Op != OpARMMOVWconst {
  9860  			break
  9861  		}
  9862  		c := v_1.AuxInt
  9863  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
  9864  			break
  9865  		}
  9866  		v.reset(OpARMRSBshiftLL)
  9867  		v.AuxInt = log2(c + 1)
  9868  		v.AddArg(x)
  9869  		v.AddArg(x)
  9870  		return true
  9871  	}
  9872  	// match: (MUL (MOVWconst [c]) x)
  9873  	// cond: isPowerOfTwo(c+1) && int32(c) >= 7
  9874  	// result: (RSBshiftLL x x [log2(c+1)])
  9875  	for {
  9876  		_ = v.Args[1]
  9877  		v_0 := v.Args[0]
  9878  		if v_0.Op != OpARMMOVWconst {
  9879  			break
  9880  		}
  9881  		c := v_0.AuxInt
  9882  		x := v.Args[1]
  9883  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
  9884  			break
  9885  		}
  9886  		v.reset(OpARMRSBshiftLL)
  9887  		v.AuxInt = log2(c + 1)
  9888  		v.AddArg(x)
  9889  		v.AddArg(x)
  9890  		return true
  9891  	}
  9892  	// match: (MUL x (MOVWconst [c]))
  9893  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
  9894  	// result: (SLLconst [log2(c/3)] (ADDshiftLL <x.Type> x x [1]))
  9895  	for {
  9896  		_ = v.Args[1]
  9897  		x := v.Args[0]
  9898  		v_1 := v.Args[1]
  9899  		if v_1.Op != OpARMMOVWconst {
  9900  			break
  9901  		}
  9902  		c := v_1.AuxInt
  9903  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
  9904  			break
  9905  		}
  9906  		v.reset(OpARMSLLconst)
  9907  		v.AuxInt = log2(c / 3)
  9908  		v0 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  9909  		v0.AuxInt = 1
  9910  		v0.AddArg(x)
  9911  		v0.AddArg(x)
  9912  		v.AddArg(v0)
  9913  		return true
  9914  	}
  9915  	// match: (MUL (MOVWconst [c]) x)
  9916  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
  9917  	// result: (SLLconst [log2(c/3)] (ADDshiftLL <x.Type> x x [1]))
  9918  	for {
  9919  		_ = v.Args[1]
  9920  		v_0 := v.Args[0]
  9921  		if v_0.Op != OpARMMOVWconst {
  9922  			break
  9923  		}
  9924  		c := v_0.AuxInt
  9925  		x := v.Args[1]
  9926  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
  9927  			break
  9928  		}
  9929  		v.reset(OpARMSLLconst)
  9930  		v.AuxInt = log2(c / 3)
  9931  		v0 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  9932  		v0.AuxInt = 1
  9933  		v0.AddArg(x)
  9934  		v0.AddArg(x)
  9935  		v.AddArg(v0)
  9936  		return true
  9937  	}
  9938  	// match: (MUL x (MOVWconst [c]))
  9939  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
  9940  	// result: (SLLconst [log2(c/5)] (ADDshiftLL <x.Type> x x [2]))
  9941  	for {
  9942  		_ = v.Args[1]
  9943  		x := v.Args[0]
  9944  		v_1 := v.Args[1]
  9945  		if v_1.Op != OpARMMOVWconst {
  9946  			break
  9947  		}
  9948  		c := v_1.AuxInt
  9949  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
  9950  			break
  9951  		}
  9952  		v.reset(OpARMSLLconst)
  9953  		v.AuxInt = log2(c / 5)
  9954  		v0 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  9955  		v0.AuxInt = 2
  9956  		v0.AddArg(x)
  9957  		v0.AddArg(x)
  9958  		v.AddArg(v0)
  9959  		return true
  9960  	}
  9961  	// match: (MUL (MOVWconst [c]) x)
  9962  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
  9963  	// result: (SLLconst [log2(c/5)] (ADDshiftLL <x.Type> x x [2]))
  9964  	for {
  9965  		_ = v.Args[1]
  9966  		v_0 := v.Args[0]
  9967  		if v_0.Op != OpARMMOVWconst {
  9968  			break
  9969  		}
  9970  		c := v_0.AuxInt
  9971  		x := v.Args[1]
  9972  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
  9973  			break
  9974  		}
  9975  		v.reset(OpARMSLLconst)
  9976  		v.AuxInt = log2(c / 5)
  9977  		v0 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
  9978  		v0.AuxInt = 2
  9979  		v0.AddArg(x)
  9980  		v0.AddArg(x)
  9981  		v.AddArg(v0)
  9982  		return true
  9983  	}
  9984  	// match: (MUL x (MOVWconst [c]))
  9985  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
  9986  	// result: (SLLconst [log2(c/7)] (RSBshiftLL <x.Type> x x [3]))
  9987  	for {
  9988  		_ = v.Args[1]
  9989  		x := v.Args[0]
  9990  		v_1 := v.Args[1]
  9991  		if v_1.Op != OpARMMOVWconst {
  9992  			break
  9993  		}
  9994  		c := v_1.AuxInt
  9995  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
  9996  			break
  9997  		}
  9998  		v.reset(OpARMSLLconst)
  9999  		v.AuxInt = log2(c / 7)
 10000  		v0 := b.NewValue0(v.Pos, OpARMRSBshiftLL, x.Type)
 10001  		v0.AuxInt = 3
 10002  		v0.AddArg(x)
 10003  		v0.AddArg(x)
 10004  		v.AddArg(v0)
 10005  		return true
 10006  	}
 10007  	// match: (MUL (MOVWconst [c]) x)
 10008  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
 10009  	// result: (SLLconst [log2(c/7)] (RSBshiftLL <x.Type> x x [3]))
 10010  	for {
 10011  		_ = v.Args[1]
 10012  		v_0 := v.Args[0]
 10013  		if v_0.Op != OpARMMOVWconst {
 10014  			break
 10015  		}
 10016  		c := v_0.AuxInt
 10017  		x := v.Args[1]
 10018  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
 10019  			break
 10020  		}
 10021  		v.reset(OpARMSLLconst)
 10022  		v.AuxInt = log2(c / 7)
 10023  		v0 := b.NewValue0(v.Pos, OpARMRSBshiftLL, x.Type)
 10024  		v0.AuxInt = 3
 10025  		v0.AddArg(x)
 10026  		v0.AddArg(x)
 10027  		v.AddArg(v0)
 10028  		return true
 10029  	}
 10030  	// match: (MUL x (MOVWconst [c]))
 10031  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
 10032  	// result: (SLLconst [log2(c/9)] (ADDshiftLL <x.Type> x x [3]))
 10033  	for {
 10034  		_ = v.Args[1]
 10035  		x := v.Args[0]
 10036  		v_1 := v.Args[1]
 10037  		if v_1.Op != OpARMMOVWconst {
 10038  			break
 10039  		}
 10040  		c := v_1.AuxInt
 10041  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
 10042  			break
 10043  		}
 10044  		v.reset(OpARMSLLconst)
 10045  		v.AuxInt = log2(c / 9)
 10046  		v0 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
 10047  		v0.AuxInt = 3
 10048  		v0.AddArg(x)
 10049  		v0.AddArg(x)
 10050  		v.AddArg(v0)
 10051  		return true
 10052  	}
 10053  	// match: (MUL (MOVWconst [c]) x)
 10054  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
 10055  	// result: (SLLconst [log2(c/9)] (ADDshiftLL <x.Type> x x [3]))
 10056  	for {
 10057  		_ = v.Args[1]
 10058  		v_0 := v.Args[0]
 10059  		if v_0.Op != OpARMMOVWconst {
 10060  			break
 10061  		}
 10062  		c := v_0.AuxInt
 10063  		x := v.Args[1]
 10064  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
 10065  			break
 10066  		}
 10067  		v.reset(OpARMSLLconst)
 10068  		v.AuxInt = log2(c / 9)
 10069  		v0 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
 10070  		v0.AuxInt = 3
 10071  		v0.AddArg(x)
 10072  		v0.AddArg(x)
 10073  		v.AddArg(v0)
 10074  		return true
 10075  	}
 10076  	return false
 10077  }
 10078  func rewriteValueARM_OpARMMUL_20(v *Value) bool {
 10079  	// match: (MUL (MOVWconst [c]) (MOVWconst [d]))
 10080  	// cond:
 10081  	// result: (MOVWconst [int64(int32(c*d))])
 10082  	for {
 10083  		_ = v.Args[1]
 10084  		v_0 := v.Args[0]
 10085  		if v_0.Op != OpARMMOVWconst {
 10086  			break
 10087  		}
 10088  		c := v_0.AuxInt
 10089  		v_1 := v.Args[1]
 10090  		if v_1.Op != OpARMMOVWconst {
 10091  			break
 10092  		}
 10093  		d := v_1.AuxInt
 10094  		v.reset(OpARMMOVWconst)
 10095  		v.AuxInt = int64(int32(c * d))
 10096  		return true
 10097  	}
 10098  	// match: (MUL (MOVWconst [d]) (MOVWconst [c]))
 10099  	// cond:
 10100  	// result: (MOVWconst [int64(int32(c*d))])
 10101  	for {
 10102  		_ = v.Args[1]
 10103  		v_0 := v.Args[0]
 10104  		if v_0.Op != OpARMMOVWconst {
 10105  			break
 10106  		}
 10107  		d := v_0.AuxInt
 10108  		v_1 := v.Args[1]
 10109  		if v_1.Op != OpARMMOVWconst {
 10110  			break
 10111  		}
 10112  		c := v_1.AuxInt
 10113  		v.reset(OpARMMOVWconst)
 10114  		v.AuxInt = int64(int32(c * d))
 10115  		return true
 10116  	}
 10117  	return false
 10118  }
 10119  func rewriteValueARM_OpARMMULA_0(v *Value) bool {
 10120  	b := v.Block
 10121  	_ = b
 10122  	// match: (MULA x (MOVWconst [c]) a)
 10123  	// cond: int32(c) == -1
 10124  	// result: (SUB a x)
 10125  	for {
 10126  		_ = v.Args[2]
 10127  		x := v.Args[0]
 10128  		v_1 := v.Args[1]
 10129  		if v_1.Op != OpARMMOVWconst {
 10130  			break
 10131  		}
 10132  		c := v_1.AuxInt
 10133  		a := v.Args[2]
 10134  		if !(int32(c) == -1) {
 10135  			break
 10136  		}
 10137  		v.reset(OpARMSUB)
 10138  		v.AddArg(a)
 10139  		v.AddArg(x)
 10140  		return true
 10141  	}
 10142  	// match: (MULA _ (MOVWconst [0]) a)
 10143  	// cond:
 10144  	// result: a
 10145  	for {
 10146  		_ = v.Args[2]
 10147  		v_1 := v.Args[1]
 10148  		if v_1.Op != OpARMMOVWconst {
 10149  			break
 10150  		}
 10151  		if v_1.AuxInt != 0 {
 10152  			break
 10153  		}
 10154  		a := v.Args[2]
 10155  		v.reset(OpCopy)
 10156  		v.Type = a.Type
 10157  		v.AddArg(a)
 10158  		return true
 10159  	}
 10160  	// match: (MULA x (MOVWconst [1]) a)
 10161  	// cond:
 10162  	// result: (ADD x a)
 10163  	for {
 10164  		_ = v.Args[2]
 10165  		x := v.Args[0]
 10166  		v_1 := v.Args[1]
 10167  		if v_1.Op != OpARMMOVWconst {
 10168  			break
 10169  		}
 10170  		if v_1.AuxInt != 1 {
 10171  			break
 10172  		}
 10173  		a := v.Args[2]
 10174  		v.reset(OpARMADD)
 10175  		v.AddArg(x)
 10176  		v.AddArg(a)
 10177  		return true
 10178  	}
 10179  	// match: (MULA x (MOVWconst [c]) a)
 10180  	// cond: isPowerOfTwo(c)
 10181  	// result: (ADD (SLLconst <x.Type> [log2(c)] x) a)
 10182  	for {
 10183  		_ = v.Args[2]
 10184  		x := v.Args[0]
 10185  		v_1 := v.Args[1]
 10186  		if v_1.Op != OpARMMOVWconst {
 10187  			break
 10188  		}
 10189  		c := v_1.AuxInt
 10190  		a := v.Args[2]
 10191  		if !(isPowerOfTwo(c)) {
 10192  			break
 10193  		}
 10194  		v.reset(OpARMADD)
 10195  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 10196  		v0.AuxInt = log2(c)
 10197  		v0.AddArg(x)
 10198  		v.AddArg(v0)
 10199  		v.AddArg(a)
 10200  		return true
 10201  	}
 10202  	// match: (MULA x (MOVWconst [c]) a)
 10203  	// cond: isPowerOfTwo(c-1) && int32(c) >= 3
 10204  	// result: (ADD (ADDshiftLL <x.Type> x x [log2(c-1)]) a)
 10205  	for {
 10206  		_ = v.Args[2]
 10207  		x := v.Args[0]
 10208  		v_1 := v.Args[1]
 10209  		if v_1.Op != OpARMMOVWconst {
 10210  			break
 10211  		}
 10212  		c := v_1.AuxInt
 10213  		a := v.Args[2]
 10214  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
 10215  			break
 10216  		}
 10217  		v.reset(OpARMADD)
 10218  		v0 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
 10219  		v0.AuxInt = log2(c - 1)
 10220  		v0.AddArg(x)
 10221  		v0.AddArg(x)
 10222  		v.AddArg(v0)
 10223  		v.AddArg(a)
 10224  		return true
 10225  	}
 10226  	// match: (MULA x (MOVWconst [c]) a)
 10227  	// cond: isPowerOfTwo(c+1) && int32(c) >= 7
 10228  	// result: (ADD (RSBshiftLL <x.Type> x x [log2(c+1)]) a)
 10229  	for {
 10230  		_ = v.Args[2]
 10231  		x := v.Args[0]
 10232  		v_1 := v.Args[1]
 10233  		if v_1.Op != OpARMMOVWconst {
 10234  			break
 10235  		}
 10236  		c := v_1.AuxInt
 10237  		a := v.Args[2]
 10238  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
 10239  			break
 10240  		}
 10241  		v.reset(OpARMADD)
 10242  		v0 := b.NewValue0(v.Pos, OpARMRSBshiftLL, x.Type)
 10243  		v0.AuxInt = log2(c + 1)
 10244  		v0.AddArg(x)
 10245  		v0.AddArg(x)
 10246  		v.AddArg(v0)
 10247  		v.AddArg(a)
 10248  		return true
 10249  	}
 10250  	// match: (MULA x (MOVWconst [c]) a)
 10251  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
 10252  	// result: (ADD (SLLconst <x.Type> [log2(c/3)] (ADDshiftLL <x.Type> x x [1])) a)
 10253  	for {
 10254  		_ = v.Args[2]
 10255  		x := v.Args[0]
 10256  		v_1 := v.Args[1]
 10257  		if v_1.Op != OpARMMOVWconst {
 10258  			break
 10259  		}
 10260  		c := v_1.AuxInt
 10261  		a := v.Args[2]
 10262  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
 10263  			break
 10264  		}
 10265  		v.reset(OpARMADD)
 10266  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 10267  		v0.AuxInt = log2(c / 3)
 10268  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
 10269  		v1.AuxInt = 1
 10270  		v1.AddArg(x)
 10271  		v1.AddArg(x)
 10272  		v0.AddArg(v1)
 10273  		v.AddArg(v0)
 10274  		v.AddArg(a)
 10275  		return true
 10276  	}
 10277  	// match: (MULA x (MOVWconst [c]) a)
 10278  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
 10279  	// result: (ADD (SLLconst <x.Type> [log2(c/5)] (ADDshiftLL <x.Type> x x [2])) a)
 10280  	for {
 10281  		_ = v.Args[2]
 10282  		x := v.Args[0]
 10283  		v_1 := v.Args[1]
 10284  		if v_1.Op != OpARMMOVWconst {
 10285  			break
 10286  		}
 10287  		c := v_1.AuxInt
 10288  		a := v.Args[2]
 10289  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
 10290  			break
 10291  		}
 10292  		v.reset(OpARMADD)
 10293  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 10294  		v0.AuxInt = log2(c / 5)
 10295  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
 10296  		v1.AuxInt = 2
 10297  		v1.AddArg(x)
 10298  		v1.AddArg(x)
 10299  		v0.AddArg(v1)
 10300  		v.AddArg(v0)
 10301  		v.AddArg(a)
 10302  		return true
 10303  	}
 10304  	// match: (MULA x (MOVWconst [c]) a)
 10305  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
 10306  	// result: (ADD (SLLconst <x.Type> [log2(c/7)] (RSBshiftLL <x.Type> x x [3])) a)
 10307  	for {
 10308  		_ = v.Args[2]
 10309  		x := v.Args[0]
 10310  		v_1 := v.Args[1]
 10311  		if v_1.Op != OpARMMOVWconst {
 10312  			break
 10313  		}
 10314  		c := v_1.AuxInt
 10315  		a := v.Args[2]
 10316  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
 10317  			break
 10318  		}
 10319  		v.reset(OpARMADD)
 10320  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 10321  		v0.AuxInt = log2(c / 7)
 10322  		v1 := b.NewValue0(v.Pos, OpARMRSBshiftLL, x.Type)
 10323  		v1.AuxInt = 3
 10324  		v1.AddArg(x)
 10325  		v1.AddArg(x)
 10326  		v0.AddArg(v1)
 10327  		v.AddArg(v0)
 10328  		v.AddArg(a)
 10329  		return true
 10330  	}
 10331  	// match: (MULA x (MOVWconst [c]) a)
 10332  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
 10333  	// result: (ADD (SLLconst <x.Type> [log2(c/9)] (ADDshiftLL <x.Type> x x [3])) a)
 10334  	for {
 10335  		_ = v.Args[2]
 10336  		x := v.Args[0]
 10337  		v_1 := v.Args[1]
 10338  		if v_1.Op != OpARMMOVWconst {
 10339  			break
 10340  		}
 10341  		c := v_1.AuxInt
 10342  		a := v.Args[2]
 10343  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
 10344  			break
 10345  		}
 10346  		v.reset(OpARMADD)
 10347  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 10348  		v0.AuxInt = log2(c / 9)
 10349  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
 10350  		v1.AuxInt = 3
 10351  		v1.AddArg(x)
 10352  		v1.AddArg(x)
 10353  		v0.AddArg(v1)
 10354  		v.AddArg(v0)
 10355  		v.AddArg(a)
 10356  		return true
 10357  	}
 10358  	return false
 10359  }
 10360  func rewriteValueARM_OpARMMULA_10(v *Value) bool {
 10361  	b := v.Block
 10362  	_ = b
 10363  	// match: (MULA (MOVWconst [c]) x a)
 10364  	// cond: int32(c) == -1
 10365  	// result: (SUB a x)
 10366  	for {
 10367  		_ = v.Args[2]
 10368  		v_0 := v.Args[0]
 10369  		if v_0.Op != OpARMMOVWconst {
 10370  			break
 10371  		}
 10372  		c := v_0.AuxInt
 10373  		x := v.Args[1]
 10374  		a := v.Args[2]
 10375  		if !(int32(c) == -1) {
 10376  			break
 10377  		}
 10378  		v.reset(OpARMSUB)
 10379  		v.AddArg(a)
 10380  		v.AddArg(x)
 10381  		return true
 10382  	}
 10383  	// match: (MULA (MOVWconst [0]) _ a)
 10384  	// cond:
 10385  	// result: a
 10386  	for {
 10387  		_ = v.Args[2]
 10388  		v_0 := v.Args[0]
 10389  		if v_0.Op != OpARMMOVWconst {
 10390  			break
 10391  		}
 10392  		if v_0.AuxInt != 0 {
 10393  			break
 10394  		}
 10395  		a := v.Args[2]
 10396  		v.reset(OpCopy)
 10397  		v.Type = a.Type
 10398  		v.AddArg(a)
 10399  		return true
 10400  	}
 10401  	// match: (MULA (MOVWconst [1]) x a)
 10402  	// cond:
 10403  	// result: (ADD x a)
 10404  	for {
 10405  		_ = v.Args[2]
 10406  		v_0 := v.Args[0]
 10407  		if v_0.Op != OpARMMOVWconst {
 10408  			break
 10409  		}
 10410  		if v_0.AuxInt != 1 {
 10411  			break
 10412  		}
 10413  		x := v.Args[1]
 10414  		a := v.Args[2]
 10415  		v.reset(OpARMADD)
 10416  		v.AddArg(x)
 10417  		v.AddArg(a)
 10418  		return true
 10419  	}
 10420  	// match: (MULA (MOVWconst [c]) x a)
 10421  	// cond: isPowerOfTwo(c)
 10422  	// result: (ADD (SLLconst <x.Type> [log2(c)] x) a)
 10423  	for {
 10424  		_ = v.Args[2]
 10425  		v_0 := v.Args[0]
 10426  		if v_0.Op != OpARMMOVWconst {
 10427  			break
 10428  		}
 10429  		c := v_0.AuxInt
 10430  		x := v.Args[1]
 10431  		a := v.Args[2]
 10432  		if !(isPowerOfTwo(c)) {
 10433  			break
 10434  		}
 10435  		v.reset(OpARMADD)
 10436  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 10437  		v0.AuxInt = log2(c)
 10438  		v0.AddArg(x)
 10439  		v.AddArg(v0)
 10440  		v.AddArg(a)
 10441  		return true
 10442  	}
 10443  	// match: (MULA (MOVWconst [c]) x a)
 10444  	// cond: isPowerOfTwo(c-1) && int32(c) >= 3
 10445  	// result: (ADD (ADDshiftLL <x.Type> x x [log2(c-1)]) a)
 10446  	for {
 10447  		_ = v.Args[2]
 10448  		v_0 := v.Args[0]
 10449  		if v_0.Op != OpARMMOVWconst {
 10450  			break
 10451  		}
 10452  		c := v_0.AuxInt
 10453  		x := v.Args[1]
 10454  		a := v.Args[2]
 10455  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
 10456  			break
 10457  		}
 10458  		v.reset(OpARMADD)
 10459  		v0 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
 10460  		v0.AuxInt = log2(c - 1)
 10461  		v0.AddArg(x)
 10462  		v0.AddArg(x)
 10463  		v.AddArg(v0)
 10464  		v.AddArg(a)
 10465  		return true
 10466  	}
 10467  	// match: (MULA (MOVWconst [c]) x a)
 10468  	// cond: isPowerOfTwo(c+1) && int32(c) >= 7
 10469  	// result: (ADD (RSBshiftLL <x.Type> x x [log2(c+1)]) a)
 10470  	for {
 10471  		_ = v.Args[2]
 10472  		v_0 := v.Args[0]
 10473  		if v_0.Op != OpARMMOVWconst {
 10474  			break
 10475  		}
 10476  		c := v_0.AuxInt
 10477  		x := v.Args[1]
 10478  		a := v.Args[2]
 10479  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
 10480  			break
 10481  		}
 10482  		v.reset(OpARMADD)
 10483  		v0 := b.NewValue0(v.Pos, OpARMRSBshiftLL, x.Type)
 10484  		v0.AuxInt = log2(c + 1)
 10485  		v0.AddArg(x)
 10486  		v0.AddArg(x)
 10487  		v.AddArg(v0)
 10488  		v.AddArg(a)
 10489  		return true
 10490  	}
 10491  	// match: (MULA (MOVWconst [c]) x a)
 10492  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
 10493  	// result: (ADD (SLLconst <x.Type> [log2(c/3)] (ADDshiftLL <x.Type> x x [1])) a)
 10494  	for {
 10495  		_ = v.Args[2]
 10496  		v_0 := v.Args[0]
 10497  		if v_0.Op != OpARMMOVWconst {
 10498  			break
 10499  		}
 10500  		c := v_0.AuxInt
 10501  		x := v.Args[1]
 10502  		a := v.Args[2]
 10503  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
 10504  			break
 10505  		}
 10506  		v.reset(OpARMADD)
 10507  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 10508  		v0.AuxInt = log2(c / 3)
 10509  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
 10510  		v1.AuxInt = 1
 10511  		v1.AddArg(x)
 10512  		v1.AddArg(x)
 10513  		v0.AddArg(v1)
 10514  		v.AddArg(v0)
 10515  		v.AddArg(a)
 10516  		return true
 10517  	}
 10518  	// match: (MULA (MOVWconst [c]) x a)
 10519  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
 10520  	// result: (ADD (SLLconst <x.Type> [log2(c/5)] (ADDshiftLL <x.Type> x x [2])) a)
 10521  	for {
 10522  		_ = v.Args[2]
 10523  		v_0 := v.Args[0]
 10524  		if v_0.Op != OpARMMOVWconst {
 10525  			break
 10526  		}
 10527  		c := v_0.AuxInt
 10528  		x := v.Args[1]
 10529  		a := v.Args[2]
 10530  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
 10531  			break
 10532  		}
 10533  		v.reset(OpARMADD)
 10534  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 10535  		v0.AuxInt = log2(c / 5)
 10536  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
 10537  		v1.AuxInt = 2
 10538  		v1.AddArg(x)
 10539  		v1.AddArg(x)
 10540  		v0.AddArg(v1)
 10541  		v.AddArg(v0)
 10542  		v.AddArg(a)
 10543  		return true
 10544  	}
 10545  	// match: (MULA (MOVWconst [c]) x a)
 10546  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
 10547  	// result: (ADD (SLLconst <x.Type> [log2(c/7)] (RSBshiftLL <x.Type> x x [3])) a)
 10548  	for {
 10549  		_ = v.Args[2]
 10550  		v_0 := v.Args[0]
 10551  		if v_0.Op != OpARMMOVWconst {
 10552  			break
 10553  		}
 10554  		c := v_0.AuxInt
 10555  		x := v.Args[1]
 10556  		a := v.Args[2]
 10557  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
 10558  			break
 10559  		}
 10560  		v.reset(OpARMADD)
 10561  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 10562  		v0.AuxInt = log2(c / 7)
 10563  		v1 := b.NewValue0(v.Pos, OpARMRSBshiftLL, x.Type)
 10564  		v1.AuxInt = 3
 10565  		v1.AddArg(x)
 10566  		v1.AddArg(x)
 10567  		v0.AddArg(v1)
 10568  		v.AddArg(v0)
 10569  		v.AddArg(a)
 10570  		return true
 10571  	}
 10572  	// match: (MULA (MOVWconst [c]) x a)
 10573  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
 10574  	// result: (ADD (SLLconst <x.Type> [log2(c/9)] (ADDshiftLL <x.Type> x x [3])) a)
 10575  	for {
 10576  		_ = v.Args[2]
 10577  		v_0 := v.Args[0]
 10578  		if v_0.Op != OpARMMOVWconst {
 10579  			break
 10580  		}
 10581  		c := v_0.AuxInt
 10582  		x := v.Args[1]
 10583  		a := v.Args[2]
 10584  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
 10585  			break
 10586  		}
 10587  		v.reset(OpARMADD)
 10588  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 10589  		v0.AuxInt = log2(c / 9)
 10590  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
 10591  		v1.AuxInt = 3
 10592  		v1.AddArg(x)
 10593  		v1.AddArg(x)
 10594  		v0.AddArg(v1)
 10595  		v.AddArg(v0)
 10596  		v.AddArg(a)
 10597  		return true
 10598  	}
 10599  	return false
 10600  }
 10601  func rewriteValueARM_OpARMMULA_20(v *Value) bool {
 10602  	// match: (MULA (MOVWconst [c]) (MOVWconst [d]) a)
 10603  	// cond:
 10604  	// result: (ADDconst [int64(int32(c*d))] a)
 10605  	for {
 10606  		_ = v.Args[2]
 10607  		v_0 := v.Args[0]
 10608  		if v_0.Op != OpARMMOVWconst {
 10609  			break
 10610  		}
 10611  		c := v_0.AuxInt
 10612  		v_1 := v.Args[1]
 10613  		if v_1.Op != OpARMMOVWconst {
 10614  			break
 10615  		}
 10616  		d := v_1.AuxInt
 10617  		a := v.Args[2]
 10618  		v.reset(OpARMADDconst)
 10619  		v.AuxInt = int64(int32(c * d))
 10620  		v.AddArg(a)
 10621  		return true
 10622  	}
 10623  	return false
 10624  }
 10625  func rewriteValueARM_OpARMMULD_0(v *Value) bool {
 10626  	// match: (MULD (NEGD x) y)
 10627  	// cond: objabi.GOARM >= 6
 10628  	// result: (NMULD x y)
 10629  	for {
 10630  		_ = v.Args[1]
 10631  		v_0 := v.Args[0]
 10632  		if v_0.Op != OpARMNEGD {
 10633  			break
 10634  		}
 10635  		x := v_0.Args[0]
 10636  		y := v.Args[1]
 10637  		if !(objabi.GOARM >= 6) {
 10638  			break
 10639  		}
 10640  		v.reset(OpARMNMULD)
 10641  		v.AddArg(x)
 10642  		v.AddArg(y)
 10643  		return true
 10644  	}
 10645  	// match: (MULD y (NEGD x))
 10646  	// cond: objabi.GOARM >= 6
 10647  	// result: (NMULD x y)
 10648  	for {
 10649  		_ = v.Args[1]
 10650  		y := v.Args[0]
 10651  		v_1 := v.Args[1]
 10652  		if v_1.Op != OpARMNEGD {
 10653  			break
 10654  		}
 10655  		x := v_1.Args[0]
 10656  		if !(objabi.GOARM >= 6) {
 10657  			break
 10658  		}
 10659  		v.reset(OpARMNMULD)
 10660  		v.AddArg(x)
 10661  		v.AddArg(y)
 10662  		return true
 10663  	}
 10664  	return false
 10665  }
 10666  func rewriteValueARM_OpARMMULF_0(v *Value) bool {
 10667  	// match: (MULF (NEGF x) y)
 10668  	// cond: objabi.GOARM >= 6
 10669  	// result: (NMULF x y)
 10670  	for {
 10671  		_ = v.Args[1]
 10672  		v_0 := v.Args[0]
 10673  		if v_0.Op != OpARMNEGF {
 10674  			break
 10675  		}
 10676  		x := v_0.Args[0]
 10677  		y := v.Args[1]
 10678  		if !(objabi.GOARM >= 6) {
 10679  			break
 10680  		}
 10681  		v.reset(OpARMNMULF)
 10682  		v.AddArg(x)
 10683  		v.AddArg(y)
 10684  		return true
 10685  	}
 10686  	// match: (MULF y (NEGF x))
 10687  	// cond: objabi.GOARM >= 6
 10688  	// result: (NMULF x y)
 10689  	for {
 10690  		_ = v.Args[1]
 10691  		y := v.Args[0]
 10692  		v_1 := v.Args[1]
 10693  		if v_1.Op != OpARMNEGF {
 10694  			break
 10695  		}
 10696  		x := v_1.Args[0]
 10697  		if !(objabi.GOARM >= 6) {
 10698  			break
 10699  		}
 10700  		v.reset(OpARMNMULF)
 10701  		v.AddArg(x)
 10702  		v.AddArg(y)
 10703  		return true
 10704  	}
 10705  	return false
 10706  }
 10707  func rewriteValueARM_OpARMMULS_0(v *Value) bool {
 10708  	b := v.Block
 10709  	_ = b
 10710  	// match: (MULS x (MOVWconst [c]) a)
 10711  	// cond: int32(c) == -1
 10712  	// result: (ADD a x)
 10713  	for {
 10714  		_ = v.Args[2]
 10715  		x := v.Args[0]
 10716  		v_1 := v.Args[1]
 10717  		if v_1.Op != OpARMMOVWconst {
 10718  			break
 10719  		}
 10720  		c := v_1.AuxInt
 10721  		a := v.Args[2]
 10722  		if !(int32(c) == -1) {
 10723  			break
 10724  		}
 10725  		v.reset(OpARMADD)
 10726  		v.AddArg(a)
 10727  		v.AddArg(x)
 10728  		return true
 10729  	}
 10730  	// match: (MULS _ (MOVWconst [0]) a)
 10731  	// cond:
 10732  	// result: a
 10733  	for {
 10734  		_ = v.Args[2]
 10735  		v_1 := v.Args[1]
 10736  		if v_1.Op != OpARMMOVWconst {
 10737  			break
 10738  		}
 10739  		if v_1.AuxInt != 0 {
 10740  			break
 10741  		}
 10742  		a := v.Args[2]
 10743  		v.reset(OpCopy)
 10744  		v.Type = a.Type
 10745  		v.AddArg(a)
 10746  		return true
 10747  	}
 10748  	// match: (MULS x (MOVWconst [1]) a)
 10749  	// cond:
 10750  	// result: (RSB x a)
 10751  	for {
 10752  		_ = v.Args[2]
 10753  		x := v.Args[0]
 10754  		v_1 := v.Args[1]
 10755  		if v_1.Op != OpARMMOVWconst {
 10756  			break
 10757  		}
 10758  		if v_1.AuxInt != 1 {
 10759  			break
 10760  		}
 10761  		a := v.Args[2]
 10762  		v.reset(OpARMRSB)
 10763  		v.AddArg(x)
 10764  		v.AddArg(a)
 10765  		return true
 10766  	}
 10767  	// match: (MULS x (MOVWconst [c]) a)
 10768  	// cond: isPowerOfTwo(c)
 10769  	// result: (RSB (SLLconst <x.Type> [log2(c)] x) a)
 10770  	for {
 10771  		_ = v.Args[2]
 10772  		x := v.Args[0]
 10773  		v_1 := v.Args[1]
 10774  		if v_1.Op != OpARMMOVWconst {
 10775  			break
 10776  		}
 10777  		c := v_1.AuxInt
 10778  		a := v.Args[2]
 10779  		if !(isPowerOfTwo(c)) {
 10780  			break
 10781  		}
 10782  		v.reset(OpARMRSB)
 10783  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 10784  		v0.AuxInt = log2(c)
 10785  		v0.AddArg(x)
 10786  		v.AddArg(v0)
 10787  		v.AddArg(a)
 10788  		return true
 10789  	}
 10790  	// match: (MULS x (MOVWconst [c]) a)
 10791  	// cond: isPowerOfTwo(c-1) && int32(c) >= 3
 10792  	// result: (RSB (ADDshiftLL <x.Type> x x [log2(c-1)]) a)
 10793  	for {
 10794  		_ = v.Args[2]
 10795  		x := v.Args[0]
 10796  		v_1 := v.Args[1]
 10797  		if v_1.Op != OpARMMOVWconst {
 10798  			break
 10799  		}
 10800  		c := v_1.AuxInt
 10801  		a := v.Args[2]
 10802  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
 10803  			break
 10804  		}
 10805  		v.reset(OpARMRSB)
 10806  		v0 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
 10807  		v0.AuxInt = log2(c - 1)
 10808  		v0.AddArg(x)
 10809  		v0.AddArg(x)
 10810  		v.AddArg(v0)
 10811  		v.AddArg(a)
 10812  		return true
 10813  	}
 10814  	// match: (MULS x (MOVWconst [c]) a)
 10815  	// cond: isPowerOfTwo(c+1) && int32(c) >= 7
 10816  	// result: (RSB (RSBshiftLL <x.Type> x x [log2(c+1)]) a)
 10817  	for {
 10818  		_ = v.Args[2]
 10819  		x := v.Args[0]
 10820  		v_1 := v.Args[1]
 10821  		if v_1.Op != OpARMMOVWconst {
 10822  			break
 10823  		}
 10824  		c := v_1.AuxInt
 10825  		a := v.Args[2]
 10826  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
 10827  			break
 10828  		}
 10829  		v.reset(OpARMRSB)
 10830  		v0 := b.NewValue0(v.Pos, OpARMRSBshiftLL, x.Type)
 10831  		v0.AuxInt = log2(c + 1)
 10832  		v0.AddArg(x)
 10833  		v0.AddArg(x)
 10834  		v.AddArg(v0)
 10835  		v.AddArg(a)
 10836  		return true
 10837  	}
 10838  	// match: (MULS x (MOVWconst [c]) a)
 10839  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
 10840  	// result: (RSB (SLLconst <x.Type> [log2(c/3)] (ADDshiftLL <x.Type> x x [1])) a)
 10841  	for {
 10842  		_ = v.Args[2]
 10843  		x := v.Args[0]
 10844  		v_1 := v.Args[1]
 10845  		if v_1.Op != OpARMMOVWconst {
 10846  			break
 10847  		}
 10848  		c := v_1.AuxInt
 10849  		a := v.Args[2]
 10850  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
 10851  			break
 10852  		}
 10853  		v.reset(OpARMRSB)
 10854  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 10855  		v0.AuxInt = log2(c / 3)
 10856  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
 10857  		v1.AuxInt = 1
 10858  		v1.AddArg(x)
 10859  		v1.AddArg(x)
 10860  		v0.AddArg(v1)
 10861  		v.AddArg(v0)
 10862  		v.AddArg(a)
 10863  		return true
 10864  	}
 10865  	// match: (MULS x (MOVWconst [c]) a)
 10866  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
 10867  	// result: (RSB (SLLconst <x.Type> [log2(c/5)] (ADDshiftLL <x.Type> x x [2])) a)
 10868  	for {
 10869  		_ = v.Args[2]
 10870  		x := v.Args[0]
 10871  		v_1 := v.Args[1]
 10872  		if v_1.Op != OpARMMOVWconst {
 10873  			break
 10874  		}
 10875  		c := v_1.AuxInt
 10876  		a := v.Args[2]
 10877  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
 10878  			break
 10879  		}
 10880  		v.reset(OpARMRSB)
 10881  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 10882  		v0.AuxInt = log2(c / 5)
 10883  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
 10884  		v1.AuxInt = 2
 10885  		v1.AddArg(x)
 10886  		v1.AddArg(x)
 10887  		v0.AddArg(v1)
 10888  		v.AddArg(v0)
 10889  		v.AddArg(a)
 10890  		return true
 10891  	}
 10892  	// match: (MULS x (MOVWconst [c]) a)
 10893  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
 10894  	// result: (RSB (SLLconst <x.Type> [log2(c/7)] (RSBshiftLL <x.Type> x x [3])) a)
 10895  	for {
 10896  		_ = v.Args[2]
 10897  		x := v.Args[0]
 10898  		v_1 := v.Args[1]
 10899  		if v_1.Op != OpARMMOVWconst {
 10900  			break
 10901  		}
 10902  		c := v_1.AuxInt
 10903  		a := v.Args[2]
 10904  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
 10905  			break
 10906  		}
 10907  		v.reset(OpARMRSB)
 10908  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 10909  		v0.AuxInt = log2(c / 7)
 10910  		v1 := b.NewValue0(v.Pos, OpARMRSBshiftLL, x.Type)
 10911  		v1.AuxInt = 3
 10912  		v1.AddArg(x)
 10913  		v1.AddArg(x)
 10914  		v0.AddArg(v1)
 10915  		v.AddArg(v0)
 10916  		v.AddArg(a)
 10917  		return true
 10918  	}
 10919  	// match: (MULS x (MOVWconst [c]) a)
 10920  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
 10921  	// result: (RSB (SLLconst <x.Type> [log2(c/9)] (ADDshiftLL <x.Type> x x [3])) a)
 10922  	for {
 10923  		_ = v.Args[2]
 10924  		x := v.Args[0]
 10925  		v_1 := v.Args[1]
 10926  		if v_1.Op != OpARMMOVWconst {
 10927  			break
 10928  		}
 10929  		c := v_1.AuxInt
 10930  		a := v.Args[2]
 10931  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
 10932  			break
 10933  		}
 10934  		v.reset(OpARMRSB)
 10935  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 10936  		v0.AuxInt = log2(c / 9)
 10937  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
 10938  		v1.AuxInt = 3
 10939  		v1.AddArg(x)
 10940  		v1.AddArg(x)
 10941  		v0.AddArg(v1)
 10942  		v.AddArg(v0)
 10943  		v.AddArg(a)
 10944  		return true
 10945  	}
 10946  	return false
 10947  }
 10948  func rewriteValueARM_OpARMMULS_10(v *Value) bool {
 10949  	b := v.Block
 10950  	_ = b
 10951  	// match: (MULS (MOVWconst [c]) x a)
 10952  	// cond: int32(c) == -1
 10953  	// result: (ADD a x)
 10954  	for {
 10955  		_ = v.Args[2]
 10956  		v_0 := v.Args[0]
 10957  		if v_0.Op != OpARMMOVWconst {
 10958  			break
 10959  		}
 10960  		c := v_0.AuxInt
 10961  		x := v.Args[1]
 10962  		a := v.Args[2]
 10963  		if !(int32(c) == -1) {
 10964  			break
 10965  		}
 10966  		v.reset(OpARMADD)
 10967  		v.AddArg(a)
 10968  		v.AddArg(x)
 10969  		return true
 10970  	}
 10971  	// match: (MULS (MOVWconst [0]) _ a)
 10972  	// cond:
 10973  	// result: a
 10974  	for {
 10975  		_ = v.Args[2]
 10976  		v_0 := v.Args[0]
 10977  		if v_0.Op != OpARMMOVWconst {
 10978  			break
 10979  		}
 10980  		if v_0.AuxInt != 0 {
 10981  			break
 10982  		}
 10983  		a := v.Args[2]
 10984  		v.reset(OpCopy)
 10985  		v.Type = a.Type
 10986  		v.AddArg(a)
 10987  		return true
 10988  	}
 10989  	// match: (MULS (MOVWconst [1]) x a)
 10990  	// cond:
 10991  	// result: (RSB x a)
 10992  	for {
 10993  		_ = v.Args[2]
 10994  		v_0 := v.Args[0]
 10995  		if v_0.Op != OpARMMOVWconst {
 10996  			break
 10997  		}
 10998  		if v_0.AuxInt != 1 {
 10999  			break
 11000  		}
 11001  		x := v.Args[1]
 11002  		a := v.Args[2]
 11003  		v.reset(OpARMRSB)
 11004  		v.AddArg(x)
 11005  		v.AddArg(a)
 11006  		return true
 11007  	}
 11008  	// match: (MULS (MOVWconst [c]) x a)
 11009  	// cond: isPowerOfTwo(c)
 11010  	// result: (RSB (SLLconst <x.Type> [log2(c)] x) a)
 11011  	for {
 11012  		_ = v.Args[2]
 11013  		v_0 := v.Args[0]
 11014  		if v_0.Op != OpARMMOVWconst {
 11015  			break
 11016  		}
 11017  		c := v_0.AuxInt
 11018  		x := v.Args[1]
 11019  		a := v.Args[2]
 11020  		if !(isPowerOfTwo(c)) {
 11021  			break
 11022  		}
 11023  		v.reset(OpARMRSB)
 11024  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 11025  		v0.AuxInt = log2(c)
 11026  		v0.AddArg(x)
 11027  		v.AddArg(v0)
 11028  		v.AddArg(a)
 11029  		return true
 11030  	}
 11031  	// match: (MULS (MOVWconst [c]) x a)
 11032  	// cond: isPowerOfTwo(c-1) && int32(c) >= 3
 11033  	// result: (RSB (ADDshiftLL <x.Type> x x [log2(c-1)]) a)
 11034  	for {
 11035  		_ = v.Args[2]
 11036  		v_0 := v.Args[0]
 11037  		if v_0.Op != OpARMMOVWconst {
 11038  			break
 11039  		}
 11040  		c := v_0.AuxInt
 11041  		x := v.Args[1]
 11042  		a := v.Args[2]
 11043  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
 11044  			break
 11045  		}
 11046  		v.reset(OpARMRSB)
 11047  		v0 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
 11048  		v0.AuxInt = log2(c - 1)
 11049  		v0.AddArg(x)
 11050  		v0.AddArg(x)
 11051  		v.AddArg(v0)
 11052  		v.AddArg(a)
 11053  		return true
 11054  	}
 11055  	// match: (MULS (MOVWconst [c]) x a)
 11056  	// cond: isPowerOfTwo(c+1) && int32(c) >= 7
 11057  	// result: (RSB (RSBshiftLL <x.Type> x x [log2(c+1)]) a)
 11058  	for {
 11059  		_ = v.Args[2]
 11060  		v_0 := v.Args[0]
 11061  		if v_0.Op != OpARMMOVWconst {
 11062  			break
 11063  		}
 11064  		c := v_0.AuxInt
 11065  		x := v.Args[1]
 11066  		a := v.Args[2]
 11067  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
 11068  			break
 11069  		}
 11070  		v.reset(OpARMRSB)
 11071  		v0 := b.NewValue0(v.Pos, OpARMRSBshiftLL, x.Type)
 11072  		v0.AuxInt = log2(c + 1)
 11073  		v0.AddArg(x)
 11074  		v0.AddArg(x)
 11075  		v.AddArg(v0)
 11076  		v.AddArg(a)
 11077  		return true
 11078  	}
 11079  	// match: (MULS (MOVWconst [c]) x a)
 11080  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
 11081  	// result: (RSB (SLLconst <x.Type> [log2(c/3)] (ADDshiftLL <x.Type> x x [1])) a)
 11082  	for {
 11083  		_ = v.Args[2]
 11084  		v_0 := v.Args[0]
 11085  		if v_0.Op != OpARMMOVWconst {
 11086  			break
 11087  		}
 11088  		c := v_0.AuxInt
 11089  		x := v.Args[1]
 11090  		a := v.Args[2]
 11091  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
 11092  			break
 11093  		}
 11094  		v.reset(OpARMRSB)
 11095  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 11096  		v0.AuxInt = log2(c / 3)
 11097  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
 11098  		v1.AuxInt = 1
 11099  		v1.AddArg(x)
 11100  		v1.AddArg(x)
 11101  		v0.AddArg(v1)
 11102  		v.AddArg(v0)
 11103  		v.AddArg(a)
 11104  		return true
 11105  	}
 11106  	// match: (MULS (MOVWconst [c]) x a)
 11107  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
 11108  	// result: (RSB (SLLconst <x.Type> [log2(c/5)] (ADDshiftLL <x.Type> x x [2])) a)
 11109  	for {
 11110  		_ = v.Args[2]
 11111  		v_0 := v.Args[0]
 11112  		if v_0.Op != OpARMMOVWconst {
 11113  			break
 11114  		}
 11115  		c := v_0.AuxInt
 11116  		x := v.Args[1]
 11117  		a := v.Args[2]
 11118  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
 11119  			break
 11120  		}
 11121  		v.reset(OpARMRSB)
 11122  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 11123  		v0.AuxInt = log2(c / 5)
 11124  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
 11125  		v1.AuxInt = 2
 11126  		v1.AddArg(x)
 11127  		v1.AddArg(x)
 11128  		v0.AddArg(v1)
 11129  		v.AddArg(v0)
 11130  		v.AddArg(a)
 11131  		return true
 11132  	}
 11133  	// match: (MULS (MOVWconst [c]) x a)
 11134  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
 11135  	// result: (RSB (SLLconst <x.Type> [log2(c/7)] (RSBshiftLL <x.Type> x x [3])) a)
 11136  	for {
 11137  		_ = v.Args[2]
 11138  		v_0 := v.Args[0]
 11139  		if v_0.Op != OpARMMOVWconst {
 11140  			break
 11141  		}
 11142  		c := v_0.AuxInt
 11143  		x := v.Args[1]
 11144  		a := v.Args[2]
 11145  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
 11146  			break
 11147  		}
 11148  		v.reset(OpARMRSB)
 11149  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 11150  		v0.AuxInt = log2(c / 7)
 11151  		v1 := b.NewValue0(v.Pos, OpARMRSBshiftLL, x.Type)
 11152  		v1.AuxInt = 3
 11153  		v1.AddArg(x)
 11154  		v1.AddArg(x)
 11155  		v0.AddArg(v1)
 11156  		v.AddArg(v0)
 11157  		v.AddArg(a)
 11158  		return true
 11159  	}
 11160  	// match: (MULS (MOVWconst [c]) x a)
 11161  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
 11162  	// result: (RSB (SLLconst <x.Type> [log2(c/9)] (ADDshiftLL <x.Type> x x [3])) a)
 11163  	for {
 11164  		_ = v.Args[2]
 11165  		v_0 := v.Args[0]
 11166  		if v_0.Op != OpARMMOVWconst {
 11167  			break
 11168  		}
 11169  		c := v_0.AuxInt
 11170  		x := v.Args[1]
 11171  		a := v.Args[2]
 11172  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
 11173  			break
 11174  		}
 11175  		v.reset(OpARMRSB)
 11176  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 11177  		v0.AuxInt = log2(c / 9)
 11178  		v1 := b.NewValue0(v.Pos, OpARMADDshiftLL, x.Type)
 11179  		v1.AuxInt = 3
 11180  		v1.AddArg(x)
 11181  		v1.AddArg(x)
 11182  		v0.AddArg(v1)
 11183  		v.AddArg(v0)
 11184  		v.AddArg(a)
 11185  		return true
 11186  	}
 11187  	return false
 11188  }
 11189  func rewriteValueARM_OpARMMULS_20(v *Value) bool {
 11190  	// match: (MULS (MOVWconst [c]) (MOVWconst [d]) a)
 11191  	// cond:
 11192  	// result: (SUBconst [int64(int32(c*d))] a)
 11193  	for {
 11194  		_ = v.Args[2]
 11195  		v_0 := v.Args[0]
 11196  		if v_0.Op != OpARMMOVWconst {
 11197  			break
 11198  		}
 11199  		c := v_0.AuxInt
 11200  		v_1 := v.Args[1]
 11201  		if v_1.Op != OpARMMOVWconst {
 11202  			break
 11203  		}
 11204  		d := v_1.AuxInt
 11205  		a := v.Args[2]
 11206  		v.reset(OpARMSUBconst)
 11207  		v.AuxInt = int64(int32(c * d))
 11208  		v.AddArg(a)
 11209  		return true
 11210  	}
 11211  	return false
 11212  }
 11213  func rewriteValueARM_OpARMMVN_0(v *Value) bool {
 11214  	// match: (MVN (MOVWconst [c]))
 11215  	// cond:
 11216  	// result: (MOVWconst [^c])
 11217  	for {
 11218  		v_0 := v.Args[0]
 11219  		if v_0.Op != OpARMMOVWconst {
 11220  			break
 11221  		}
 11222  		c := v_0.AuxInt
 11223  		v.reset(OpARMMOVWconst)
 11224  		v.AuxInt = ^c
 11225  		return true
 11226  	}
 11227  	// match: (MVN (SLLconst [c] x))
 11228  	// cond:
 11229  	// result: (MVNshiftLL x [c])
 11230  	for {
 11231  		v_0 := v.Args[0]
 11232  		if v_0.Op != OpARMSLLconst {
 11233  			break
 11234  		}
 11235  		c := v_0.AuxInt
 11236  		x := v_0.Args[0]
 11237  		v.reset(OpARMMVNshiftLL)
 11238  		v.AuxInt = c
 11239  		v.AddArg(x)
 11240  		return true
 11241  	}
 11242  	// match: (MVN (SRLconst [c] x))
 11243  	// cond:
 11244  	// result: (MVNshiftRL x [c])
 11245  	for {
 11246  		v_0 := v.Args[0]
 11247  		if v_0.Op != OpARMSRLconst {
 11248  			break
 11249  		}
 11250  		c := v_0.AuxInt
 11251  		x := v_0.Args[0]
 11252  		v.reset(OpARMMVNshiftRL)
 11253  		v.AuxInt = c
 11254  		v.AddArg(x)
 11255  		return true
 11256  	}
 11257  	// match: (MVN (SRAconst [c] x))
 11258  	// cond:
 11259  	// result: (MVNshiftRA x [c])
 11260  	for {
 11261  		v_0 := v.Args[0]
 11262  		if v_0.Op != OpARMSRAconst {
 11263  			break
 11264  		}
 11265  		c := v_0.AuxInt
 11266  		x := v_0.Args[0]
 11267  		v.reset(OpARMMVNshiftRA)
 11268  		v.AuxInt = c
 11269  		v.AddArg(x)
 11270  		return true
 11271  	}
 11272  	// match: (MVN (SLL x y))
 11273  	// cond:
 11274  	// result: (MVNshiftLLreg x y)
 11275  	for {
 11276  		v_0 := v.Args[0]
 11277  		if v_0.Op != OpARMSLL {
 11278  			break
 11279  		}
 11280  		_ = v_0.Args[1]
 11281  		x := v_0.Args[0]
 11282  		y := v_0.Args[1]
 11283  		v.reset(OpARMMVNshiftLLreg)
 11284  		v.AddArg(x)
 11285  		v.AddArg(y)
 11286  		return true
 11287  	}
 11288  	// match: (MVN (SRL x y))
 11289  	// cond:
 11290  	// result: (MVNshiftRLreg x y)
 11291  	for {
 11292  		v_0 := v.Args[0]
 11293  		if v_0.Op != OpARMSRL {
 11294  			break
 11295  		}
 11296  		_ = v_0.Args[1]
 11297  		x := v_0.Args[0]
 11298  		y := v_0.Args[1]
 11299  		v.reset(OpARMMVNshiftRLreg)
 11300  		v.AddArg(x)
 11301  		v.AddArg(y)
 11302  		return true
 11303  	}
 11304  	// match: (MVN (SRA x y))
 11305  	// cond:
 11306  	// result: (MVNshiftRAreg x y)
 11307  	for {
 11308  		v_0 := v.Args[0]
 11309  		if v_0.Op != OpARMSRA {
 11310  			break
 11311  		}
 11312  		_ = v_0.Args[1]
 11313  		x := v_0.Args[0]
 11314  		y := v_0.Args[1]
 11315  		v.reset(OpARMMVNshiftRAreg)
 11316  		v.AddArg(x)
 11317  		v.AddArg(y)
 11318  		return true
 11319  	}
 11320  	return false
 11321  }
 11322  func rewriteValueARM_OpARMMVNshiftLL_0(v *Value) bool {
 11323  	// match: (MVNshiftLL (MOVWconst [c]) [d])
 11324  	// cond:
 11325  	// result: (MOVWconst [^int64(uint32(c)<<uint64(d))])
 11326  	for {
 11327  		d := v.AuxInt
 11328  		v_0 := v.Args[0]
 11329  		if v_0.Op != OpARMMOVWconst {
 11330  			break
 11331  		}
 11332  		c := v_0.AuxInt
 11333  		v.reset(OpARMMOVWconst)
 11334  		v.AuxInt = ^int64(uint32(c) << uint64(d))
 11335  		return true
 11336  	}
 11337  	return false
 11338  }
 11339  func rewriteValueARM_OpARMMVNshiftLLreg_0(v *Value) bool {
 11340  	// match: (MVNshiftLLreg x (MOVWconst [c]))
 11341  	// cond:
 11342  	// result: (MVNshiftLL x [c])
 11343  	for {
 11344  		_ = v.Args[1]
 11345  		x := v.Args[0]
 11346  		v_1 := v.Args[1]
 11347  		if v_1.Op != OpARMMOVWconst {
 11348  			break
 11349  		}
 11350  		c := v_1.AuxInt
 11351  		v.reset(OpARMMVNshiftLL)
 11352  		v.AuxInt = c
 11353  		v.AddArg(x)
 11354  		return true
 11355  	}
 11356  	return false
 11357  }
 11358  func rewriteValueARM_OpARMMVNshiftRA_0(v *Value) bool {
 11359  	// match: (MVNshiftRA (MOVWconst [c]) [d])
 11360  	// cond:
 11361  	// result: (MOVWconst [^int64(int32(c)>>uint64(d))])
 11362  	for {
 11363  		d := v.AuxInt
 11364  		v_0 := v.Args[0]
 11365  		if v_0.Op != OpARMMOVWconst {
 11366  			break
 11367  		}
 11368  		c := v_0.AuxInt
 11369  		v.reset(OpARMMOVWconst)
 11370  		v.AuxInt = ^int64(int32(c) >> uint64(d))
 11371  		return true
 11372  	}
 11373  	return false
 11374  }
 11375  func rewriteValueARM_OpARMMVNshiftRAreg_0(v *Value) bool {
 11376  	// match: (MVNshiftRAreg x (MOVWconst [c]))
 11377  	// cond:
 11378  	// result: (MVNshiftRA x [c])
 11379  	for {
 11380  		_ = v.Args[1]
 11381  		x := v.Args[0]
 11382  		v_1 := v.Args[1]
 11383  		if v_1.Op != OpARMMOVWconst {
 11384  			break
 11385  		}
 11386  		c := v_1.AuxInt
 11387  		v.reset(OpARMMVNshiftRA)
 11388  		v.AuxInt = c
 11389  		v.AddArg(x)
 11390  		return true
 11391  	}
 11392  	return false
 11393  }
 11394  func rewriteValueARM_OpARMMVNshiftRL_0(v *Value) bool {
 11395  	// match: (MVNshiftRL (MOVWconst [c]) [d])
 11396  	// cond:
 11397  	// result: (MOVWconst [^int64(uint32(c)>>uint64(d))])
 11398  	for {
 11399  		d := v.AuxInt
 11400  		v_0 := v.Args[0]
 11401  		if v_0.Op != OpARMMOVWconst {
 11402  			break
 11403  		}
 11404  		c := v_0.AuxInt
 11405  		v.reset(OpARMMOVWconst)
 11406  		v.AuxInt = ^int64(uint32(c) >> uint64(d))
 11407  		return true
 11408  	}
 11409  	return false
 11410  }
 11411  func rewriteValueARM_OpARMMVNshiftRLreg_0(v *Value) bool {
 11412  	// match: (MVNshiftRLreg x (MOVWconst [c]))
 11413  	// cond:
 11414  	// result: (MVNshiftRL x [c])
 11415  	for {
 11416  		_ = v.Args[1]
 11417  		x := v.Args[0]
 11418  		v_1 := v.Args[1]
 11419  		if v_1.Op != OpARMMOVWconst {
 11420  			break
 11421  		}
 11422  		c := v_1.AuxInt
 11423  		v.reset(OpARMMVNshiftRL)
 11424  		v.AuxInt = c
 11425  		v.AddArg(x)
 11426  		return true
 11427  	}
 11428  	return false
 11429  }
 11430  func rewriteValueARM_OpARMNEGD_0(v *Value) bool {
 11431  	// match: (NEGD (MULD x y))
 11432  	// cond: objabi.GOARM >= 6
 11433  	// result: (NMULD x y)
 11434  	for {
 11435  		v_0 := v.Args[0]
 11436  		if v_0.Op != OpARMMULD {
 11437  			break
 11438  		}
 11439  		_ = v_0.Args[1]
 11440  		x := v_0.Args[0]
 11441  		y := v_0.Args[1]
 11442  		if !(objabi.GOARM >= 6) {
 11443  			break
 11444  		}
 11445  		v.reset(OpARMNMULD)
 11446  		v.AddArg(x)
 11447  		v.AddArg(y)
 11448  		return true
 11449  	}
 11450  	return false
 11451  }
 11452  func rewriteValueARM_OpARMNEGF_0(v *Value) bool {
 11453  	// match: (NEGF (MULF x y))
 11454  	// cond: objabi.GOARM >= 6
 11455  	// result: (NMULF x y)
 11456  	for {
 11457  		v_0 := v.Args[0]
 11458  		if v_0.Op != OpARMMULF {
 11459  			break
 11460  		}
 11461  		_ = v_0.Args[1]
 11462  		x := v_0.Args[0]
 11463  		y := v_0.Args[1]
 11464  		if !(objabi.GOARM >= 6) {
 11465  			break
 11466  		}
 11467  		v.reset(OpARMNMULF)
 11468  		v.AddArg(x)
 11469  		v.AddArg(y)
 11470  		return true
 11471  	}
 11472  	return false
 11473  }
 11474  func rewriteValueARM_OpARMNMULD_0(v *Value) bool {
 11475  	// match: (NMULD (NEGD x) y)
 11476  	// cond:
 11477  	// result: (MULD x y)
 11478  	for {
 11479  		_ = v.Args[1]
 11480  		v_0 := v.Args[0]
 11481  		if v_0.Op != OpARMNEGD {
 11482  			break
 11483  		}
 11484  		x := v_0.Args[0]
 11485  		y := v.Args[1]
 11486  		v.reset(OpARMMULD)
 11487  		v.AddArg(x)
 11488  		v.AddArg(y)
 11489  		return true
 11490  	}
 11491  	// match: (NMULD y (NEGD x))
 11492  	// cond:
 11493  	// result: (MULD x y)
 11494  	for {
 11495  		_ = v.Args[1]
 11496  		y := v.Args[0]
 11497  		v_1 := v.Args[1]
 11498  		if v_1.Op != OpARMNEGD {
 11499  			break
 11500  		}
 11501  		x := v_1.Args[0]
 11502  		v.reset(OpARMMULD)
 11503  		v.AddArg(x)
 11504  		v.AddArg(y)
 11505  		return true
 11506  	}
 11507  	return false
 11508  }
 11509  func rewriteValueARM_OpARMNMULF_0(v *Value) bool {
 11510  	// match: (NMULF (NEGF x) y)
 11511  	// cond:
 11512  	// result: (MULF x y)
 11513  	for {
 11514  		_ = v.Args[1]
 11515  		v_0 := v.Args[0]
 11516  		if v_0.Op != OpARMNEGF {
 11517  			break
 11518  		}
 11519  		x := v_0.Args[0]
 11520  		y := v.Args[1]
 11521  		v.reset(OpARMMULF)
 11522  		v.AddArg(x)
 11523  		v.AddArg(y)
 11524  		return true
 11525  	}
 11526  	// match: (NMULF y (NEGF x))
 11527  	// cond:
 11528  	// result: (MULF x y)
 11529  	for {
 11530  		_ = v.Args[1]
 11531  		y := v.Args[0]
 11532  		v_1 := v.Args[1]
 11533  		if v_1.Op != OpARMNEGF {
 11534  			break
 11535  		}
 11536  		x := v_1.Args[0]
 11537  		v.reset(OpARMMULF)
 11538  		v.AddArg(x)
 11539  		v.AddArg(y)
 11540  		return true
 11541  	}
 11542  	return false
 11543  }
 11544  func rewriteValueARM_OpARMNotEqual_0(v *Value) bool {
 11545  	// match: (NotEqual (FlagEQ))
 11546  	// cond:
 11547  	// result: (MOVWconst [0])
 11548  	for {
 11549  		v_0 := v.Args[0]
 11550  		if v_0.Op != OpARMFlagEQ {
 11551  			break
 11552  		}
 11553  		v.reset(OpARMMOVWconst)
 11554  		v.AuxInt = 0
 11555  		return true
 11556  	}
 11557  	// match: (NotEqual (FlagLT_ULT))
 11558  	// cond:
 11559  	// result: (MOVWconst [1])
 11560  	for {
 11561  		v_0 := v.Args[0]
 11562  		if v_0.Op != OpARMFlagLT_ULT {
 11563  			break
 11564  		}
 11565  		v.reset(OpARMMOVWconst)
 11566  		v.AuxInt = 1
 11567  		return true
 11568  	}
 11569  	// match: (NotEqual (FlagLT_UGT))
 11570  	// cond:
 11571  	// result: (MOVWconst [1])
 11572  	for {
 11573  		v_0 := v.Args[0]
 11574  		if v_0.Op != OpARMFlagLT_UGT {
 11575  			break
 11576  		}
 11577  		v.reset(OpARMMOVWconst)
 11578  		v.AuxInt = 1
 11579  		return true
 11580  	}
 11581  	// match: (NotEqual (FlagGT_ULT))
 11582  	// cond:
 11583  	// result: (MOVWconst [1])
 11584  	for {
 11585  		v_0 := v.Args[0]
 11586  		if v_0.Op != OpARMFlagGT_ULT {
 11587  			break
 11588  		}
 11589  		v.reset(OpARMMOVWconst)
 11590  		v.AuxInt = 1
 11591  		return true
 11592  	}
 11593  	// match: (NotEqual (FlagGT_UGT))
 11594  	// cond:
 11595  	// result: (MOVWconst [1])
 11596  	for {
 11597  		v_0 := v.Args[0]
 11598  		if v_0.Op != OpARMFlagGT_UGT {
 11599  			break
 11600  		}
 11601  		v.reset(OpARMMOVWconst)
 11602  		v.AuxInt = 1
 11603  		return true
 11604  	}
 11605  	// match: (NotEqual (InvertFlags x))
 11606  	// cond:
 11607  	// result: (NotEqual x)
 11608  	for {
 11609  		v_0 := v.Args[0]
 11610  		if v_0.Op != OpARMInvertFlags {
 11611  			break
 11612  		}
 11613  		x := v_0.Args[0]
 11614  		v.reset(OpARMNotEqual)
 11615  		v.AddArg(x)
 11616  		return true
 11617  	}
 11618  	return false
 11619  }
 11620  func rewriteValueARM_OpARMOR_0(v *Value) bool {
 11621  	// match: (OR x (MOVWconst [c]))
 11622  	// cond:
 11623  	// result: (ORconst [c] x)
 11624  	for {
 11625  		_ = v.Args[1]
 11626  		x := v.Args[0]
 11627  		v_1 := v.Args[1]
 11628  		if v_1.Op != OpARMMOVWconst {
 11629  			break
 11630  		}
 11631  		c := v_1.AuxInt
 11632  		v.reset(OpARMORconst)
 11633  		v.AuxInt = c
 11634  		v.AddArg(x)
 11635  		return true
 11636  	}
 11637  	// match: (OR (MOVWconst [c]) x)
 11638  	// cond:
 11639  	// result: (ORconst [c] x)
 11640  	for {
 11641  		_ = v.Args[1]
 11642  		v_0 := v.Args[0]
 11643  		if v_0.Op != OpARMMOVWconst {
 11644  			break
 11645  		}
 11646  		c := v_0.AuxInt
 11647  		x := v.Args[1]
 11648  		v.reset(OpARMORconst)
 11649  		v.AuxInt = c
 11650  		v.AddArg(x)
 11651  		return true
 11652  	}
 11653  	// match: (OR x (SLLconst [c] y))
 11654  	// cond:
 11655  	// result: (ORshiftLL x y [c])
 11656  	for {
 11657  		_ = v.Args[1]
 11658  		x := v.Args[0]
 11659  		v_1 := v.Args[1]
 11660  		if v_1.Op != OpARMSLLconst {
 11661  			break
 11662  		}
 11663  		c := v_1.AuxInt
 11664  		y := v_1.Args[0]
 11665  		v.reset(OpARMORshiftLL)
 11666  		v.AuxInt = c
 11667  		v.AddArg(x)
 11668  		v.AddArg(y)
 11669  		return true
 11670  	}
 11671  	// match: (OR (SLLconst [c] y) x)
 11672  	// cond:
 11673  	// result: (ORshiftLL x y [c])
 11674  	for {
 11675  		_ = v.Args[1]
 11676  		v_0 := v.Args[0]
 11677  		if v_0.Op != OpARMSLLconst {
 11678  			break
 11679  		}
 11680  		c := v_0.AuxInt
 11681  		y := v_0.Args[0]
 11682  		x := v.Args[1]
 11683  		v.reset(OpARMORshiftLL)
 11684  		v.AuxInt = c
 11685  		v.AddArg(x)
 11686  		v.AddArg(y)
 11687  		return true
 11688  	}
 11689  	// match: (OR x (SRLconst [c] y))
 11690  	// cond:
 11691  	// result: (ORshiftRL x y [c])
 11692  	for {
 11693  		_ = v.Args[1]
 11694  		x := v.Args[0]
 11695  		v_1 := v.Args[1]
 11696  		if v_1.Op != OpARMSRLconst {
 11697  			break
 11698  		}
 11699  		c := v_1.AuxInt
 11700  		y := v_1.Args[0]
 11701  		v.reset(OpARMORshiftRL)
 11702  		v.AuxInt = c
 11703  		v.AddArg(x)
 11704  		v.AddArg(y)
 11705  		return true
 11706  	}
 11707  	// match: (OR (SRLconst [c] y) x)
 11708  	// cond:
 11709  	// result: (ORshiftRL x y [c])
 11710  	for {
 11711  		_ = v.Args[1]
 11712  		v_0 := v.Args[0]
 11713  		if v_0.Op != OpARMSRLconst {
 11714  			break
 11715  		}
 11716  		c := v_0.AuxInt
 11717  		y := v_0.Args[0]
 11718  		x := v.Args[1]
 11719  		v.reset(OpARMORshiftRL)
 11720  		v.AuxInt = c
 11721  		v.AddArg(x)
 11722  		v.AddArg(y)
 11723  		return true
 11724  	}
 11725  	// match: (OR x (SRAconst [c] y))
 11726  	// cond:
 11727  	// result: (ORshiftRA x y [c])
 11728  	for {
 11729  		_ = v.Args[1]
 11730  		x := v.Args[0]
 11731  		v_1 := v.Args[1]
 11732  		if v_1.Op != OpARMSRAconst {
 11733  			break
 11734  		}
 11735  		c := v_1.AuxInt
 11736  		y := v_1.Args[0]
 11737  		v.reset(OpARMORshiftRA)
 11738  		v.AuxInt = c
 11739  		v.AddArg(x)
 11740  		v.AddArg(y)
 11741  		return true
 11742  	}
 11743  	// match: (OR (SRAconst [c] y) x)
 11744  	// cond:
 11745  	// result: (ORshiftRA x y [c])
 11746  	for {
 11747  		_ = v.Args[1]
 11748  		v_0 := v.Args[0]
 11749  		if v_0.Op != OpARMSRAconst {
 11750  			break
 11751  		}
 11752  		c := v_0.AuxInt
 11753  		y := v_0.Args[0]
 11754  		x := v.Args[1]
 11755  		v.reset(OpARMORshiftRA)
 11756  		v.AuxInt = c
 11757  		v.AddArg(x)
 11758  		v.AddArg(y)
 11759  		return true
 11760  	}
 11761  	// match: (OR x (SLL y z))
 11762  	// cond:
 11763  	// result: (ORshiftLLreg x y z)
 11764  	for {
 11765  		_ = v.Args[1]
 11766  		x := v.Args[0]
 11767  		v_1 := v.Args[1]
 11768  		if v_1.Op != OpARMSLL {
 11769  			break
 11770  		}
 11771  		_ = v_1.Args[1]
 11772  		y := v_1.Args[0]
 11773  		z := v_1.Args[1]
 11774  		v.reset(OpARMORshiftLLreg)
 11775  		v.AddArg(x)
 11776  		v.AddArg(y)
 11777  		v.AddArg(z)
 11778  		return true
 11779  	}
 11780  	// match: (OR (SLL y z) x)
 11781  	// cond:
 11782  	// result: (ORshiftLLreg x y z)
 11783  	for {
 11784  		_ = v.Args[1]
 11785  		v_0 := v.Args[0]
 11786  		if v_0.Op != OpARMSLL {
 11787  			break
 11788  		}
 11789  		_ = v_0.Args[1]
 11790  		y := v_0.Args[0]
 11791  		z := v_0.Args[1]
 11792  		x := v.Args[1]
 11793  		v.reset(OpARMORshiftLLreg)
 11794  		v.AddArg(x)
 11795  		v.AddArg(y)
 11796  		v.AddArg(z)
 11797  		return true
 11798  	}
 11799  	return false
 11800  }
 11801  func rewriteValueARM_OpARMOR_10(v *Value) bool {
 11802  	// match: (OR x (SRL y z))
 11803  	// cond:
 11804  	// result: (ORshiftRLreg x y z)
 11805  	for {
 11806  		_ = v.Args[1]
 11807  		x := v.Args[0]
 11808  		v_1 := v.Args[1]
 11809  		if v_1.Op != OpARMSRL {
 11810  			break
 11811  		}
 11812  		_ = v_1.Args[1]
 11813  		y := v_1.Args[0]
 11814  		z := v_1.Args[1]
 11815  		v.reset(OpARMORshiftRLreg)
 11816  		v.AddArg(x)
 11817  		v.AddArg(y)
 11818  		v.AddArg(z)
 11819  		return true
 11820  	}
 11821  	// match: (OR (SRL y z) x)
 11822  	// cond:
 11823  	// result: (ORshiftRLreg x y z)
 11824  	for {
 11825  		_ = v.Args[1]
 11826  		v_0 := v.Args[0]
 11827  		if v_0.Op != OpARMSRL {
 11828  			break
 11829  		}
 11830  		_ = v_0.Args[1]
 11831  		y := v_0.Args[0]
 11832  		z := v_0.Args[1]
 11833  		x := v.Args[1]
 11834  		v.reset(OpARMORshiftRLreg)
 11835  		v.AddArg(x)
 11836  		v.AddArg(y)
 11837  		v.AddArg(z)
 11838  		return true
 11839  	}
 11840  	// match: (OR x (SRA y z))
 11841  	// cond:
 11842  	// result: (ORshiftRAreg x y z)
 11843  	for {
 11844  		_ = v.Args[1]
 11845  		x := v.Args[0]
 11846  		v_1 := v.Args[1]
 11847  		if v_1.Op != OpARMSRA {
 11848  			break
 11849  		}
 11850  		_ = v_1.Args[1]
 11851  		y := v_1.Args[0]
 11852  		z := v_1.Args[1]
 11853  		v.reset(OpARMORshiftRAreg)
 11854  		v.AddArg(x)
 11855  		v.AddArg(y)
 11856  		v.AddArg(z)
 11857  		return true
 11858  	}
 11859  	// match: (OR (SRA y z) x)
 11860  	// cond:
 11861  	// result: (ORshiftRAreg x y z)
 11862  	for {
 11863  		_ = v.Args[1]
 11864  		v_0 := v.Args[0]
 11865  		if v_0.Op != OpARMSRA {
 11866  			break
 11867  		}
 11868  		_ = v_0.Args[1]
 11869  		y := v_0.Args[0]
 11870  		z := v_0.Args[1]
 11871  		x := v.Args[1]
 11872  		v.reset(OpARMORshiftRAreg)
 11873  		v.AddArg(x)
 11874  		v.AddArg(y)
 11875  		v.AddArg(z)
 11876  		return true
 11877  	}
 11878  	// match: (OR x x)
 11879  	// cond:
 11880  	// result: x
 11881  	for {
 11882  		_ = v.Args[1]
 11883  		x := v.Args[0]
 11884  		if x != v.Args[1] {
 11885  			break
 11886  		}
 11887  		v.reset(OpCopy)
 11888  		v.Type = x.Type
 11889  		v.AddArg(x)
 11890  		return true
 11891  	}
 11892  	return false
 11893  }
 11894  func rewriteValueARM_OpARMORconst_0(v *Value) bool {
 11895  	// match: (ORconst [0] x)
 11896  	// cond:
 11897  	// result: x
 11898  	for {
 11899  		if v.AuxInt != 0 {
 11900  			break
 11901  		}
 11902  		x := v.Args[0]
 11903  		v.reset(OpCopy)
 11904  		v.Type = x.Type
 11905  		v.AddArg(x)
 11906  		return true
 11907  	}
 11908  	// match: (ORconst [c] _)
 11909  	// cond: int32(c)==-1
 11910  	// result: (MOVWconst [-1])
 11911  	for {
 11912  		c := v.AuxInt
 11913  		if !(int32(c) == -1) {
 11914  			break
 11915  		}
 11916  		v.reset(OpARMMOVWconst)
 11917  		v.AuxInt = -1
 11918  		return true
 11919  	}
 11920  	// match: (ORconst [c] (MOVWconst [d]))
 11921  	// cond:
 11922  	// result: (MOVWconst [c|d])
 11923  	for {
 11924  		c := v.AuxInt
 11925  		v_0 := v.Args[0]
 11926  		if v_0.Op != OpARMMOVWconst {
 11927  			break
 11928  		}
 11929  		d := v_0.AuxInt
 11930  		v.reset(OpARMMOVWconst)
 11931  		v.AuxInt = c | d
 11932  		return true
 11933  	}
 11934  	// match: (ORconst [c] (ORconst [d] x))
 11935  	// cond:
 11936  	// result: (ORconst [c|d] x)
 11937  	for {
 11938  		c := v.AuxInt
 11939  		v_0 := v.Args[0]
 11940  		if v_0.Op != OpARMORconst {
 11941  			break
 11942  		}
 11943  		d := v_0.AuxInt
 11944  		x := v_0.Args[0]
 11945  		v.reset(OpARMORconst)
 11946  		v.AuxInt = c | d
 11947  		v.AddArg(x)
 11948  		return true
 11949  	}
 11950  	return false
 11951  }
 11952  func rewriteValueARM_OpARMORshiftLL_0(v *Value) bool {
 11953  	b := v.Block
 11954  	_ = b
 11955  	// match: (ORshiftLL (MOVWconst [c]) x [d])
 11956  	// cond:
 11957  	// result: (ORconst [c] (SLLconst <x.Type> x [d]))
 11958  	for {
 11959  		d := v.AuxInt
 11960  		_ = v.Args[1]
 11961  		v_0 := v.Args[0]
 11962  		if v_0.Op != OpARMMOVWconst {
 11963  			break
 11964  		}
 11965  		c := v_0.AuxInt
 11966  		x := v.Args[1]
 11967  		v.reset(OpARMORconst)
 11968  		v.AuxInt = c
 11969  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 11970  		v0.AuxInt = d
 11971  		v0.AddArg(x)
 11972  		v.AddArg(v0)
 11973  		return true
 11974  	}
 11975  	// match: (ORshiftLL x (MOVWconst [c]) [d])
 11976  	// cond:
 11977  	// result: (ORconst x [int64(int32(uint32(c)<<uint64(d)))])
 11978  	for {
 11979  		d := v.AuxInt
 11980  		_ = v.Args[1]
 11981  		x := v.Args[0]
 11982  		v_1 := v.Args[1]
 11983  		if v_1.Op != OpARMMOVWconst {
 11984  			break
 11985  		}
 11986  		c := v_1.AuxInt
 11987  		v.reset(OpARMORconst)
 11988  		v.AuxInt = int64(int32(uint32(c) << uint64(d)))
 11989  		v.AddArg(x)
 11990  		return true
 11991  	}
 11992  	// match: (ORshiftLL [c] (SRLconst x [32-c]) x)
 11993  	// cond:
 11994  	// result: (SRRconst [32-c] x)
 11995  	for {
 11996  		c := v.AuxInt
 11997  		_ = v.Args[1]
 11998  		v_0 := v.Args[0]
 11999  		if v_0.Op != OpARMSRLconst {
 12000  			break
 12001  		}
 12002  		if v_0.AuxInt != 32-c {
 12003  			break
 12004  		}
 12005  		x := v_0.Args[0]
 12006  		if x != v.Args[1] {
 12007  			break
 12008  		}
 12009  		v.reset(OpARMSRRconst)
 12010  		v.AuxInt = 32 - c
 12011  		v.AddArg(x)
 12012  		return true
 12013  	}
 12014  	// match: (ORshiftLL x y:(SLLconst x [c]) [d])
 12015  	// cond: c==d
 12016  	// result: y
 12017  	for {
 12018  		d := v.AuxInt
 12019  		_ = v.Args[1]
 12020  		x := v.Args[0]
 12021  		y := v.Args[1]
 12022  		if y.Op != OpARMSLLconst {
 12023  			break
 12024  		}
 12025  		c := y.AuxInt
 12026  		if x != y.Args[0] {
 12027  			break
 12028  		}
 12029  		if !(c == d) {
 12030  			break
 12031  		}
 12032  		v.reset(OpCopy)
 12033  		v.Type = y.Type
 12034  		v.AddArg(y)
 12035  		return true
 12036  	}
 12037  	return false
 12038  }
 12039  func rewriteValueARM_OpARMORshiftLLreg_0(v *Value) bool {
 12040  	b := v.Block
 12041  	_ = b
 12042  	// match: (ORshiftLLreg (MOVWconst [c]) x y)
 12043  	// cond:
 12044  	// result: (ORconst [c] (SLL <x.Type> x y))
 12045  	for {
 12046  		_ = v.Args[2]
 12047  		v_0 := v.Args[0]
 12048  		if v_0.Op != OpARMMOVWconst {
 12049  			break
 12050  		}
 12051  		c := v_0.AuxInt
 12052  		x := v.Args[1]
 12053  		y := v.Args[2]
 12054  		v.reset(OpARMORconst)
 12055  		v.AuxInt = c
 12056  		v0 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
 12057  		v0.AddArg(x)
 12058  		v0.AddArg(y)
 12059  		v.AddArg(v0)
 12060  		return true
 12061  	}
 12062  	// match: (ORshiftLLreg x y (MOVWconst [c]))
 12063  	// cond:
 12064  	// result: (ORshiftLL x y [c])
 12065  	for {
 12066  		_ = v.Args[2]
 12067  		x := v.Args[0]
 12068  		y := v.Args[1]
 12069  		v_2 := v.Args[2]
 12070  		if v_2.Op != OpARMMOVWconst {
 12071  			break
 12072  		}
 12073  		c := v_2.AuxInt
 12074  		v.reset(OpARMORshiftLL)
 12075  		v.AuxInt = c
 12076  		v.AddArg(x)
 12077  		v.AddArg(y)
 12078  		return true
 12079  	}
 12080  	return false
 12081  }
 12082  func rewriteValueARM_OpARMORshiftRA_0(v *Value) bool {
 12083  	b := v.Block
 12084  	_ = b
 12085  	// match: (ORshiftRA (MOVWconst [c]) x [d])
 12086  	// cond:
 12087  	// result: (ORconst [c] (SRAconst <x.Type> x [d]))
 12088  	for {
 12089  		d := v.AuxInt
 12090  		_ = v.Args[1]
 12091  		v_0 := v.Args[0]
 12092  		if v_0.Op != OpARMMOVWconst {
 12093  			break
 12094  		}
 12095  		c := v_0.AuxInt
 12096  		x := v.Args[1]
 12097  		v.reset(OpARMORconst)
 12098  		v.AuxInt = c
 12099  		v0 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
 12100  		v0.AuxInt = d
 12101  		v0.AddArg(x)
 12102  		v.AddArg(v0)
 12103  		return true
 12104  	}
 12105  	// match: (ORshiftRA x (MOVWconst [c]) [d])
 12106  	// cond:
 12107  	// result: (ORconst x [int64(int32(c)>>uint64(d))])
 12108  	for {
 12109  		d := v.AuxInt
 12110  		_ = v.Args[1]
 12111  		x := v.Args[0]
 12112  		v_1 := v.Args[1]
 12113  		if v_1.Op != OpARMMOVWconst {
 12114  			break
 12115  		}
 12116  		c := v_1.AuxInt
 12117  		v.reset(OpARMORconst)
 12118  		v.AuxInt = int64(int32(c) >> uint64(d))
 12119  		v.AddArg(x)
 12120  		return true
 12121  	}
 12122  	// match: (ORshiftRA x y:(SRAconst x [c]) [d])
 12123  	// cond: c==d
 12124  	// result: y
 12125  	for {
 12126  		d := v.AuxInt
 12127  		_ = v.Args[1]
 12128  		x := v.Args[0]
 12129  		y := v.Args[1]
 12130  		if y.Op != OpARMSRAconst {
 12131  			break
 12132  		}
 12133  		c := y.AuxInt
 12134  		if x != y.Args[0] {
 12135  			break
 12136  		}
 12137  		if !(c == d) {
 12138  			break
 12139  		}
 12140  		v.reset(OpCopy)
 12141  		v.Type = y.Type
 12142  		v.AddArg(y)
 12143  		return true
 12144  	}
 12145  	return false
 12146  }
 12147  func rewriteValueARM_OpARMORshiftRAreg_0(v *Value) bool {
 12148  	b := v.Block
 12149  	_ = b
 12150  	// match: (ORshiftRAreg (MOVWconst [c]) x y)
 12151  	// cond:
 12152  	// result: (ORconst [c] (SRA <x.Type> x y))
 12153  	for {
 12154  		_ = v.Args[2]
 12155  		v_0 := v.Args[0]
 12156  		if v_0.Op != OpARMMOVWconst {
 12157  			break
 12158  		}
 12159  		c := v_0.AuxInt
 12160  		x := v.Args[1]
 12161  		y := v.Args[2]
 12162  		v.reset(OpARMORconst)
 12163  		v.AuxInt = c
 12164  		v0 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
 12165  		v0.AddArg(x)
 12166  		v0.AddArg(y)
 12167  		v.AddArg(v0)
 12168  		return true
 12169  	}
 12170  	// match: (ORshiftRAreg x y (MOVWconst [c]))
 12171  	// cond:
 12172  	// result: (ORshiftRA x y [c])
 12173  	for {
 12174  		_ = v.Args[2]
 12175  		x := v.Args[0]
 12176  		y := v.Args[1]
 12177  		v_2 := v.Args[2]
 12178  		if v_2.Op != OpARMMOVWconst {
 12179  			break
 12180  		}
 12181  		c := v_2.AuxInt
 12182  		v.reset(OpARMORshiftRA)
 12183  		v.AuxInt = c
 12184  		v.AddArg(x)
 12185  		v.AddArg(y)
 12186  		return true
 12187  	}
 12188  	return false
 12189  }
 12190  func rewriteValueARM_OpARMORshiftRL_0(v *Value) bool {
 12191  	b := v.Block
 12192  	_ = b
 12193  	// match: (ORshiftRL (MOVWconst [c]) x [d])
 12194  	// cond:
 12195  	// result: (ORconst [c] (SRLconst <x.Type> x [d]))
 12196  	for {
 12197  		d := v.AuxInt
 12198  		_ = v.Args[1]
 12199  		v_0 := v.Args[0]
 12200  		if v_0.Op != OpARMMOVWconst {
 12201  			break
 12202  		}
 12203  		c := v_0.AuxInt
 12204  		x := v.Args[1]
 12205  		v.reset(OpARMORconst)
 12206  		v.AuxInt = c
 12207  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
 12208  		v0.AuxInt = d
 12209  		v0.AddArg(x)
 12210  		v.AddArg(v0)
 12211  		return true
 12212  	}
 12213  	// match: (ORshiftRL x (MOVWconst [c]) [d])
 12214  	// cond:
 12215  	// result: (ORconst x [int64(int32(uint32(c)>>uint64(d)))])
 12216  	for {
 12217  		d := v.AuxInt
 12218  		_ = v.Args[1]
 12219  		x := v.Args[0]
 12220  		v_1 := v.Args[1]
 12221  		if v_1.Op != OpARMMOVWconst {
 12222  			break
 12223  		}
 12224  		c := v_1.AuxInt
 12225  		v.reset(OpARMORconst)
 12226  		v.AuxInt = int64(int32(uint32(c) >> uint64(d)))
 12227  		v.AddArg(x)
 12228  		return true
 12229  	}
 12230  	// match: (ORshiftRL [c] (SLLconst x [32-c]) x)
 12231  	// cond:
 12232  	// result: (SRRconst [ c] x)
 12233  	for {
 12234  		c := v.AuxInt
 12235  		_ = v.Args[1]
 12236  		v_0 := v.Args[0]
 12237  		if v_0.Op != OpARMSLLconst {
 12238  			break
 12239  		}
 12240  		if v_0.AuxInt != 32-c {
 12241  			break
 12242  		}
 12243  		x := v_0.Args[0]
 12244  		if x != v.Args[1] {
 12245  			break
 12246  		}
 12247  		v.reset(OpARMSRRconst)
 12248  		v.AuxInt = c
 12249  		v.AddArg(x)
 12250  		return true
 12251  	}
 12252  	// match: (ORshiftRL x y:(SRLconst x [c]) [d])
 12253  	// cond: c==d
 12254  	// result: y
 12255  	for {
 12256  		d := v.AuxInt
 12257  		_ = v.Args[1]
 12258  		x := v.Args[0]
 12259  		y := v.Args[1]
 12260  		if y.Op != OpARMSRLconst {
 12261  			break
 12262  		}
 12263  		c := y.AuxInt
 12264  		if x != y.Args[0] {
 12265  			break
 12266  		}
 12267  		if !(c == d) {
 12268  			break
 12269  		}
 12270  		v.reset(OpCopy)
 12271  		v.Type = y.Type
 12272  		v.AddArg(y)
 12273  		return true
 12274  	}
 12275  	return false
 12276  }
 12277  func rewriteValueARM_OpARMORshiftRLreg_0(v *Value) bool {
 12278  	b := v.Block
 12279  	_ = b
 12280  	// match: (ORshiftRLreg (MOVWconst [c]) x y)
 12281  	// cond:
 12282  	// result: (ORconst [c] (SRL <x.Type> x y))
 12283  	for {
 12284  		_ = v.Args[2]
 12285  		v_0 := v.Args[0]
 12286  		if v_0.Op != OpARMMOVWconst {
 12287  			break
 12288  		}
 12289  		c := v_0.AuxInt
 12290  		x := v.Args[1]
 12291  		y := v.Args[2]
 12292  		v.reset(OpARMORconst)
 12293  		v.AuxInt = c
 12294  		v0 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
 12295  		v0.AddArg(x)
 12296  		v0.AddArg(y)
 12297  		v.AddArg(v0)
 12298  		return true
 12299  	}
 12300  	// match: (ORshiftRLreg x y (MOVWconst [c]))
 12301  	// cond:
 12302  	// result: (ORshiftRL x y [c])
 12303  	for {
 12304  		_ = v.Args[2]
 12305  		x := v.Args[0]
 12306  		y := v.Args[1]
 12307  		v_2 := v.Args[2]
 12308  		if v_2.Op != OpARMMOVWconst {
 12309  			break
 12310  		}
 12311  		c := v_2.AuxInt
 12312  		v.reset(OpARMORshiftRL)
 12313  		v.AuxInt = c
 12314  		v.AddArg(x)
 12315  		v.AddArg(y)
 12316  		return true
 12317  	}
 12318  	return false
 12319  }
 12320  func rewriteValueARM_OpARMRSB_0(v *Value) bool {
 12321  	// match: (RSB (MOVWconst [c]) x)
 12322  	// cond:
 12323  	// result: (SUBconst [c] x)
 12324  	for {
 12325  		_ = v.Args[1]
 12326  		v_0 := v.Args[0]
 12327  		if v_0.Op != OpARMMOVWconst {
 12328  			break
 12329  		}
 12330  		c := v_0.AuxInt
 12331  		x := v.Args[1]
 12332  		v.reset(OpARMSUBconst)
 12333  		v.AuxInt = c
 12334  		v.AddArg(x)
 12335  		return true
 12336  	}
 12337  	// match: (RSB x (MOVWconst [c]))
 12338  	// cond:
 12339  	// result: (RSBconst [c] x)
 12340  	for {
 12341  		_ = v.Args[1]
 12342  		x := v.Args[0]
 12343  		v_1 := v.Args[1]
 12344  		if v_1.Op != OpARMMOVWconst {
 12345  			break
 12346  		}
 12347  		c := v_1.AuxInt
 12348  		v.reset(OpARMRSBconst)
 12349  		v.AuxInt = c
 12350  		v.AddArg(x)
 12351  		return true
 12352  	}
 12353  	// match: (RSB x (SLLconst [c] y))
 12354  	// cond:
 12355  	// result: (RSBshiftLL x y [c])
 12356  	for {
 12357  		_ = v.Args[1]
 12358  		x := v.Args[0]
 12359  		v_1 := v.Args[1]
 12360  		if v_1.Op != OpARMSLLconst {
 12361  			break
 12362  		}
 12363  		c := v_1.AuxInt
 12364  		y := v_1.Args[0]
 12365  		v.reset(OpARMRSBshiftLL)
 12366  		v.AuxInt = c
 12367  		v.AddArg(x)
 12368  		v.AddArg(y)
 12369  		return true
 12370  	}
 12371  	// match: (RSB (SLLconst [c] y) x)
 12372  	// cond:
 12373  	// result: (SUBshiftLL x y [c])
 12374  	for {
 12375  		_ = v.Args[1]
 12376  		v_0 := v.Args[0]
 12377  		if v_0.Op != OpARMSLLconst {
 12378  			break
 12379  		}
 12380  		c := v_0.AuxInt
 12381  		y := v_0.Args[0]
 12382  		x := v.Args[1]
 12383  		v.reset(OpARMSUBshiftLL)
 12384  		v.AuxInt = c
 12385  		v.AddArg(x)
 12386  		v.AddArg(y)
 12387  		return true
 12388  	}
 12389  	// match: (RSB x (SRLconst [c] y))
 12390  	// cond:
 12391  	// result: (RSBshiftRL x y [c])
 12392  	for {
 12393  		_ = v.Args[1]
 12394  		x := v.Args[0]
 12395  		v_1 := v.Args[1]
 12396  		if v_1.Op != OpARMSRLconst {
 12397  			break
 12398  		}
 12399  		c := v_1.AuxInt
 12400  		y := v_1.Args[0]
 12401  		v.reset(OpARMRSBshiftRL)
 12402  		v.AuxInt = c
 12403  		v.AddArg(x)
 12404  		v.AddArg(y)
 12405  		return true
 12406  	}
 12407  	// match: (RSB (SRLconst [c] y) x)
 12408  	// cond:
 12409  	// result: (SUBshiftRL x y [c])
 12410  	for {
 12411  		_ = v.Args[1]
 12412  		v_0 := v.Args[0]
 12413  		if v_0.Op != OpARMSRLconst {
 12414  			break
 12415  		}
 12416  		c := v_0.AuxInt
 12417  		y := v_0.Args[0]
 12418  		x := v.Args[1]
 12419  		v.reset(OpARMSUBshiftRL)
 12420  		v.AuxInt = c
 12421  		v.AddArg(x)
 12422  		v.AddArg(y)
 12423  		return true
 12424  	}
 12425  	// match: (RSB x (SRAconst [c] y))
 12426  	// cond:
 12427  	// result: (RSBshiftRA x y [c])
 12428  	for {
 12429  		_ = v.Args[1]
 12430  		x := v.Args[0]
 12431  		v_1 := v.Args[1]
 12432  		if v_1.Op != OpARMSRAconst {
 12433  			break
 12434  		}
 12435  		c := v_1.AuxInt
 12436  		y := v_1.Args[0]
 12437  		v.reset(OpARMRSBshiftRA)
 12438  		v.AuxInt = c
 12439  		v.AddArg(x)
 12440  		v.AddArg(y)
 12441  		return true
 12442  	}
 12443  	// match: (RSB (SRAconst [c] y) x)
 12444  	// cond:
 12445  	// result: (SUBshiftRA x y [c])
 12446  	for {
 12447  		_ = v.Args[1]
 12448  		v_0 := v.Args[0]
 12449  		if v_0.Op != OpARMSRAconst {
 12450  			break
 12451  		}
 12452  		c := v_0.AuxInt
 12453  		y := v_0.Args[0]
 12454  		x := v.Args[1]
 12455  		v.reset(OpARMSUBshiftRA)
 12456  		v.AuxInt = c
 12457  		v.AddArg(x)
 12458  		v.AddArg(y)
 12459  		return true
 12460  	}
 12461  	// match: (RSB x (SLL y z))
 12462  	// cond:
 12463  	// result: (RSBshiftLLreg x y z)
 12464  	for {
 12465  		_ = v.Args[1]
 12466  		x := v.Args[0]
 12467  		v_1 := v.Args[1]
 12468  		if v_1.Op != OpARMSLL {
 12469  			break
 12470  		}
 12471  		_ = v_1.Args[1]
 12472  		y := v_1.Args[0]
 12473  		z := v_1.Args[1]
 12474  		v.reset(OpARMRSBshiftLLreg)
 12475  		v.AddArg(x)
 12476  		v.AddArg(y)
 12477  		v.AddArg(z)
 12478  		return true
 12479  	}
 12480  	// match: (RSB (SLL y z) x)
 12481  	// cond:
 12482  	// result: (SUBshiftLLreg x y z)
 12483  	for {
 12484  		_ = v.Args[1]
 12485  		v_0 := v.Args[0]
 12486  		if v_0.Op != OpARMSLL {
 12487  			break
 12488  		}
 12489  		_ = v_0.Args[1]
 12490  		y := v_0.Args[0]
 12491  		z := v_0.Args[1]
 12492  		x := v.Args[1]
 12493  		v.reset(OpARMSUBshiftLLreg)
 12494  		v.AddArg(x)
 12495  		v.AddArg(y)
 12496  		v.AddArg(z)
 12497  		return true
 12498  	}
 12499  	return false
 12500  }
 12501  func rewriteValueARM_OpARMRSB_10(v *Value) bool {
 12502  	// match: (RSB x (SRL y z))
 12503  	// cond:
 12504  	// result: (RSBshiftRLreg x y z)
 12505  	for {
 12506  		_ = v.Args[1]
 12507  		x := v.Args[0]
 12508  		v_1 := v.Args[1]
 12509  		if v_1.Op != OpARMSRL {
 12510  			break
 12511  		}
 12512  		_ = v_1.Args[1]
 12513  		y := v_1.Args[0]
 12514  		z := v_1.Args[1]
 12515  		v.reset(OpARMRSBshiftRLreg)
 12516  		v.AddArg(x)
 12517  		v.AddArg(y)
 12518  		v.AddArg(z)
 12519  		return true
 12520  	}
 12521  	// match: (RSB (SRL y z) x)
 12522  	// cond:
 12523  	// result: (SUBshiftRLreg x y z)
 12524  	for {
 12525  		_ = v.Args[1]
 12526  		v_0 := v.Args[0]
 12527  		if v_0.Op != OpARMSRL {
 12528  			break
 12529  		}
 12530  		_ = v_0.Args[1]
 12531  		y := v_0.Args[0]
 12532  		z := v_0.Args[1]
 12533  		x := v.Args[1]
 12534  		v.reset(OpARMSUBshiftRLreg)
 12535  		v.AddArg(x)
 12536  		v.AddArg(y)
 12537  		v.AddArg(z)
 12538  		return true
 12539  	}
 12540  	// match: (RSB x (SRA y z))
 12541  	// cond:
 12542  	// result: (RSBshiftRAreg x y z)
 12543  	for {
 12544  		_ = v.Args[1]
 12545  		x := v.Args[0]
 12546  		v_1 := v.Args[1]
 12547  		if v_1.Op != OpARMSRA {
 12548  			break
 12549  		}
 12550  		_ = v_1.Args[1]
 12551  		y := v_1.Args[0]
 12552  		z := v_1.Args[1]
 12553  		v.reset(OpARMRSBshiftRAreg)
 12554  		v.AddArg(x)
 12555  		v.AddArg(y)
 12556  		v.AddArg(z)
 12557  		return true
 12558  	}
 12559  	// match: (RSB (SRA y z) x)
 12560  	// cond:
 12561  	// result: (SUBshiftRAreg x y z)
 12562  	for {
 12563  		_ = v.Args[1]
 12564  		v_0 := v.Args[0]
 12565  		if v_0.Op != OpARMSRA {
 12566  			break
 12567  		}
 12568  		_ = v_0.Args[1]
 12569  		y := v_0.Args[0]
 12570  		z := v_0.Args[1]
 12571  		x := v.Args[1]
 12572  		v.reset(OpARMSUBshiftRAreg)
 12573  		v.AddArg(x)
 12574  		v.AddArg(y)
 12575  		v.AddArg(z)
 12576  		return true
 12577  	}
 12578  	// match: (RSB x x)
 12579  	// cond:
 12580  	// result: (MOVWconst [0])
 12581  	for {
 12582  		_ = v.Args[1]
 12583  		x := v.Args[0]
 12584  		if x != v.Args[1] {
 12585  			break
 12586  		}
 12587  		v.reset(OpARMMOVWconst)
 12588  		v.AuxInt = 0
 12589  		return true
 12590  	}
 12591  	// match: (RSB (MUL x y) a)
 12592  	// cond: objabi.GOARM == 7
 12593  	// result: (MULS x y a)
 12594  	for {
 12595  		_ = v.Args[1]
 12596  		v_0 := v.Args[0]
 12597  		if v_0.Op != OpARMMUL {
 12598  			break
 12599  		}
 12600  		_ = v_0.Args[1]
 12601  		x := v_0.Args[0]
 12602  		y := v_0.Args[1]
 12603  		a := v.Args[1]
 12604  		if !(objabi.GOARM == 7) {
 12605  			break
 12606  		}
 12607  		v.reset(OpARMMULS)
 12608  		v.AddArg(x)
 12609  		v.AddArg(y)
 12610  		v.AddArg(a)
 12611  		return true
 12612  	}
 12613  	return false
 12614  }
 12615  func rewriteValueARM_OpARMRSBSshiftLL_0(v *Value) bool {
 12616  	b := v.Block
 12617  	_ = b
 12618  	// match: (RSBSshiftLL (MOVWconst [c]) x [d])
 12619  	// cond:
 12620  	// result: (SUBSconst [c] (SLLconst <x.Type> x [d]))
 12621  	for {
 12622  		d := v.AuxInt
 12623  		_ = v.Args[1]
 12624  		v_0 := v.Args[0]
 12625  		if v_0.Op != OpARMMOVWconst {
 12626  			break
 12627  		}
 12628  		c := v_0.AuxInt
 12629  		x := v.Args[1]
 12630  		v.reset(OpARMSUBSconst)
 12631  		v.AuxInt = c
 12632  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 12633  		v0.AuxInt = d
 12634  		v0.AddArg(x)
 12635  		v.AddArg(v0)
 12636  		return true
 12637  	}
 12638  	// match: (RSBSshiftLL x (MOVWconst [c]) [d])
 12639  	// cond:
 12640  	// result: (RSBSconst x [int64(int32(uint32(c)<<uint64(d)))])
 12641  	for {
 12642  		d := v.AuxInt
 12643  		_ = v.Args[1]
 12644  		x := v.Args[0]
 12645  		v_1 := v.Args[1]
 12646  		if v_1.Op != OpARMMOVWconst {
 12647  			break
 12648  		}
 12649  		c := v_1.AuxInt
 12650  		v.reset(OpARMRSBSconst)
 12651  		v.AuxInt = int64(int32(uint32(c) << uint64(d)))
 12652  		v.AddArg(x)
 12653  		return true
 12654  	}
 12655  	return false
 12656  }
 12657  func rewriteValueARM_OpARMRSBSshiftLLreg_0(v *Value) bool {
 12658  	b := v.Block
 12659  	_ = b
 12660  	// match: (RSBSshiftLLreg (MOVWconst [c]) x y)
 12661  	// cond:
 12662  	// result: (SUBSconst [c] (SLL <x.Type> x y))
 12663  	for {
 12664  		_ = v.Args[2]
 12665  		v_0 := v.Args[0]
 12666  		if v_0.Op != OpARMMOVWconst {
 12667  			break
 12668  		}
 12669  		c := v_0.AuxInt
 12670  		x := v.Args[1]
 12671  		y := v.Args[2]
 12672  		v.reset(OpARMSUBSconst)
 12673  		v.AuxInt = c
 12674  		v0 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
 12675  		v0.AddArg(x)
 12676  		v0.AddArg(y)
 12677  		v.AddArg(v0)
 12678  		return true
 12679  	}
 12680  	// match: (RSBSshiftLLreg x y (MOVWconst [c]))
 12681  	// cond:
 12682  	// result: (RSBSshiftLL x y [c])
 12683  	for {
 12684  		_ = v.Args[2]
 12685  		x := v.Args[0]
 12686  		y := v.Args[1]
 12687  		v_2 := v.Args[2]
 12688  		if v_2.Op != OpARMMOVWconst {
 12689  			break
 12690  		}
 12691  		c := v_2.AuxInt
 12692  		v.reset(OpARMRSBSshiftLL)
 12693  		v.AuxInt = c
 12694  		v.AddArg(x)
 12695  		v.AddArg(y)
 12696  		return true
 12697  	}
 12698  	return false
 12699  }
 12700  func rewriteValueARM_OpARMRSBSshiftRA_0(v *Value) bool {
 12701  	b := v.Block
 12702  	_ = b
 12703  	// match: (RSBSshiftRA (MOVWconst [c]) x [d])
 12704  	// cond:
 12705  	// result: (SUBSconst [c] (SRAconst <x.Type> x [d]))
 12706  	for {
 12707  		d := v.AuxInt
 12708  		_ = v.Args[1]
 12709  		v_0 := v.Args[0]
 12710  		if v_0.Op != OpARMMOVWconst {
 12711  			break
 12712  		}
 12713  		c := v_0.AuxInt
 12714  		x := v.Args[1]
 12715  		v.reset(OpARMSUBSconst)
 12716  		v.AuxInt = c
 12717  		v0 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
 12718  		v0.AuxInt = d
 12719  		v0.AddArg(x)
 12720  		v.AddArg(v0)
 12721  		return true
 12722  	}
 12723  	// match: (RSBSshiftRA x (MOVWconst [c]) [d])
 12724  	// cond:
 12725  	// result: (RSBSconst x [int64(int32(c)>>uint64(d))])
 12726  	for {
 12727  		d := v.AuxInt
 12728  		_ = v.Args[1]
 12729  		x := v.Args[0]
 12730  		v_1 := v.Args[1]
 12731  		if v_1.Op != OpARMMOVWconst {
 12732  			break
 12733  		}
 12734  		c := v_1.AuxInt
 12735  		v.reset(OpARMRSBSconst)
 12736  		v.AuxInt = int64(int32(c) >> uint64(d))
 12737  		v.AddArg(x)
 12738  		return true
 12739  	}
 12740  	return false
 12741  }
 12742  func rewriteValueARM_OpARMRSBSshiftRAreg_0(v *Value) bool {
 12743  	b := v.Block
 12744  	_ = b
 12745  	// match: (RSBSshiftRAreg (MOVWconst [c]) x y)
 12746  	// cond:
 12747  	// result: (SUBSconst [c] (SRA <x.Type> x y))
 12748  	for {
 12749  		_ = v.Args[2]
 12750  		v_0 := v.Args[0]
 12751  		if v_0.Op != OpARMMOVWconst {
 12752  			break
 12753  		}
 12754  		c := v_0.AuxInt
 12755  		x := v.Args[1]
 12756  		y := v.Args[2]
 12757  		v.reset(OpARMSUBSconst)
 12758  		v.AuxInt = c
 12759  		v0 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
 12760  		v0.AddArg(x)
 12761  		v0.AddArg(y)
 12762  		v.AddArg(v0)
 12763  		return true
 12764  	}
 12765  	// match: (RSBSshiftRAreg x y (MOVWconst [c]))
 12766  	// cond:
 12767  	// result: (RSBSshiftRA x y [c])
 12768  	for {
 12769  		_ = v.Args[2]
 12770  		x := v.Args[0]
 12771  		y := v.Args[1]
 12772  		v_2 := v.Args[2]
 12773  		if v_2.Op != OpARMMOVWconst {
 12774  			break
 12775  		}
 12776  		c := v_2.AuxInt
 12777  		v.reset(OpARMRSBSshiftRA)
 12778  		v.AuxInt = c
 12779  		v.AddArg(x)
 12780  		v.AddArg(y)
 12781  		return true
 12782  	}
 12783  	return false
 12784  }
 12785  func rewriteValueARM_OpARMRSBSshiftRL_0(v *Value) bool {
 12786  	b := v.Block
 12787  	_ = b
 12788  	// match: (RSBSshiftRL (MOVWconst [c]) x [d])
 12789  	// cond:
 12790  	// result: (SUBSconst [c] (SRLconst <x.Type> x [d]))
 12791  	for {
 12792  		d := v.AuxInt
 12793  		_ = v.Args[1]
 12794  		v_0 := v.Args[0]
 12795  		if v_0.Op != OpARMMOVWconst {
 12796  			break
 12797  		}
 12798  		c := v_0.AuxInt
 12799  		x := v.Args[1]
 12800  		v.reset(OpARMSUBSconst)
 12801  		v.AuxInt = c
 12802  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
 12803  		v0.AuxInt = d
 12804  		v0.AddArg(x)
 12805  		v.AddArg(v0)
 12806  		return true
 12807  	}
 12808  	// match: (RSBSshiftRL x (MOVWconst [c]) [d])
 12809  	// cond:
 12810  	// result: (RSBSconst x [int64(int32(uint32(c)>>uint64(d)))])
 12811  	for {
 12812  		d := v.AuxInt
 12813  		_ = v.Args[1]
 12814  		x := v.Args[0]
 12815  		v_1 := v.Args[1]
 12816  		if v_1.Op != OpARMMOVWconst {
 12817  			break
 12818  		}
 12819  		c := v_1.AuxInt
 12820  		v.reset(OpARMRSBSconst)
 12821  		v.AuxInt = int64(int32(uint32(c) >> uint64(d)))
 12822  		v.AddArg(x)
 12823  		return true
 12824  	}
 12825  	return false
 12826  }
 12827  func rewriteValueARM_OpARMRSBSshiftRLreg_0(v *Value) bool {
 12828  	b := v.Block
 12829  	_ = b
 12830  	// match: (RSBSshiftRLreg (MOVWconst [c]) x y)
 12831  	// cond:
 12832  	// result: (SUBSconst [c] (SRL <x.Type> x y))
 12833  	for {
 12834  		_ = v.Args[2]
 12835  		v_0 := v.Args[0]
 12836  		if v_0.Op != OpARMMOVWconst {
 12837  			break
 12838  		}
 12839  		c := v_0.AuxInt
 12840  		x := v.Args[1]
 12841  		y := v.Args[2]
 12842  		v.reset(OpARMSUBSconst)
 12843  		v.AuxInt = c
 12844  		v0 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
 12845  		v0.AddArg(x)
 12846  		v0.AddArg(y)
 12847  		v.AddArg(v0)
 12848  		return true
 12849  	}
 12850  	// match: (RSBSshiftRLreg x y (MOVWconst [c]))
 12851  	// cond:
 12852  	// result: (RSBSshiftRL x y [c])
 12853  	for {
 12854  		_ = v.Args[2]
 12855  		x := v.Args[0]
 12856  		y := v.Args[1]
 12857  		v_2 := v.Args[2]
 12858  		if v_2.Op != OpARMMOVWconst {
 12859  			break
 12860  		}
 12861  		c := v_2.AuxInt
 12862  		v.reset(OpARMRSBSshiftRL)
 12863  		v.AuxInt = c
 12864  		v.AddArg(x)
 12865  		v.AddArg(y)
 12866  		return true
 12867  	}
 12868  	return false
 12869  }
 12870  func rewriteValueARM_OpARMRSBconst_0(v *Value) bool {
 12871  	// match: (RSBconst [c] (MOVWconst [d]))
 12872  	// cond:
 12873  	// result: (MOVWconst [int64(int32(c-d))])
 12874  	for {
 12875  		c := v.AuxInt
 12876  		v_0 := v.Args[0]
 12877  		if v_0.Op != OpARMMOVWconst {
 12878  			break
 12879  		}
 12880  		d := v_0.AuxInt
 12881  		v.reset(OpARMMOVWconst)
 12882  		v.AuxInt = int64(int32(c - d))
 12883  		return true
 12884  	}
 12885  	// match: (RSBconst [c] (RSBconst [d] x))
 12886  	// cond:
 12887  	// result: (ADDconst [int64(int32(c-d))] x)
 12888  	for {
 12889  		c := v.AuxInt
 12890  		v_0 := v.Args[0]
 12891  		if v_0.Op != OpARMRSBconst {
 12892  			break
 12893  		}
 12894  		d := v_0.AuxInt
 12895  		x := v_0.Args[0]
 12896  		v.reset(OpARMADDconst)
 12897  		v.AuxInt = int64(int32(c - d))
 12898  		v.AddArg(x)
 12899  		return true
 12900  	}
 12901  	// match: (RSBconst [c] (ADDconst [d] x))
 12902  	// cond:
 12903  	// result: (RSBconst [int64(int32(c-d))] x)
 12904  	for {
 12905  		c := v.AuxInt
 12906  		v_0 := v.Args[0]
 12907  		if v_0.Op != OpARMADDconst {
 12908  			break
 12909  		}
 12910  		d := v_0.AuxInt
 12911  		x := v_0.Args[0]
 12912  		v.reset(OpARMRSBconst)
 12913  		v.AuxInt = int64(int32(c - d))
 12914  		v.AddArg(x)
 12915  		return true
 12916  	}
 12917  	// match: (RSBconst [c] (SUBconst [d] x))
 12918  	// cond:
 12919  	// result: (RSBconst [int64(int32(c+d))] x)
 12920  	for {
 12921  		c := v.AuxInt
 12922  		v_0 := v.Args[0]
 12923  		if v_0.Op != OpARMSUBconst {
 12924  			break
 12925  		}
 12926  		d := v_0.AuxInt
 12927  		x := v_0.Args[0]
 12928  		v.reset(OpARMRSBconst)
 12929  		v.AuxInt = int64(int32(c + d))
 12930  		v.AddArg(x)
 12931  		return true
 12932  	}
 12933  	return false
 12934  }
 12935  func rewriteValueARM_OpARMRSBshiftLL_0(v *Value) bool {
 12936  	b := v.Block
 12937  	_ = b
 12938  	// match: (RSBshiftLL (MOVWconst [c]) x [d])
 12939  	// cond:
 12940  	// result: (SUBconst [c] (SLLconst <x.Type> x [d]))
 12941  	for {
 12942  		d := v.AuxInt
 12943  		_ = v.Args[1]
 12944  		v_0 := v.Args[0]
 12945  		if v_0.Op != OpARMMOVWconst {
 12946  			break
 12947  		}
 12948  		c := v_0.AuxInt
 12949  		x := v.Args[1]
 12950  		v.reset(OpARMSUBconst)
 12951  		v.AuxInt = c
 12952  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 12953  		v0.AuxInt = d
 12954  		v0.AddArg(x)
 12955  		v.AddArg(v0)
 12956  		return true
 12957  	}
 12958  	// match: (RSBshiftLL x (MOVWconst [c]) [d])
 12959  	// cond:
 12960  	// result: (RSBconst x [int64(int32(uint32(c)<<uint64(d)))])
 12961  	for {
 12962  		d := v.AuxInt
 12963  		_ = v.Args[1]
 12964  		x := v.Args[0]
 12965  		v_1 := v.Args[1]
 12966  		if v_1.Op != OpARMMOVWconst {
 12967  			break
 12968  		}
 12969  		c := v_1.AuxInt
 12970  		v.reset(OpARMRSBconst)
 12971  		v.AuxInt = int64(int32(uint32(c) << uint64(d)))
 12972  		v.AddArg(x)
 12973  		return true
 12974  	}
 12975  	// match: (RSBshiftLL x (SLLconst x [c]) [d])
 12976  	// cond: c==d
 12977  	// result: (MOVWconst [0])
 12978  	for {
 12979  		d := v.AuxInt
 12980  		_ = v.Args[1]
 12981  		x := v.Args[0]
 12982  		v_1 := v.Args[1]
 12983  		if v_1.Op != OpARMSLLconst {
 12984  			break
 12985  		}
 12986  		c := v_1.AuxInt
 12987  		if x != v_1.Args[0] {
 12988  			break
 12989  		}
 12990  		if !(c == d) {
 12991  			break
 12992  		}
 12993  		v.reset(OpARMMOVWconst)
 12994  		v.AuxInt = 0
 12995  		return true
 12996  	}
 12997  	return false
 12998  }
 12999  func rewriteValueARM_OpARMRSBshiftLLreg_0(v *Value) bool {
 13000  	b := v.Block
 13001  	_ = b
 13002  	// match: (RSBshiftLLreg (MOVWconst [c]) x y)
 13003  	// cond:
 13004  	// result: (SUBconst [c] (SLL <x.Type> x y))
 13005  	for {
 13006  		_ = v.Args[2]
 13007  		v_0 := v.Args[0]
 13008  		if v_0.Op != OpARMMOVWconst {
 13009  			break
 13010  		}
 13011  		c := v_0.AuxInt
 13012  		x := v.Args[1]
 13013  		y := v.Args[2]
 13014  		v.reset(OpARMSUBconst)
 13015  		v.AuxInt = c
 13016  		v0 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
 13017  		v0.AddArg(x)
 13018  		v0.AddArg(y)
 13019  		v.AddArg(v0)
 13020  		return true
 13021  	}
 13022  	// match: (RSBshiftLLreg x y (MOVWconst [c]))
 13023  	// cond:
 13024  	// result: (RSBshiftLL x y [c])
 13025  	for {
 13026  		_ = v.Args[2]
 13027  		x := v.Args[0]
 13028  		y := v.Args[1]
 13029  		v_2 := v.Args[2]
 13030  		if v_2.Op != OpARMMOVWconst {
 13031  			break
 13032  		}
 13033  		c := v_2.AuxInt
 13034  		v.reset(OpARMRSBshiftLL)
 13035  		v.AuxInt = c
 13036  		v.AddArg(x)
 13037  		v.AddArg(y)
 13038  		return true
 13039  	}
 13040  	return false
 13041  }
 13042  func rewriteValueARM_OpARMRSBshiftRA_0(v *Value) bool {
 13043  	b := v.Block
 13044  	_ = b
 13045  	// match: (RSBshiftRA (MOVWconst [c]) x [d])
 13046  	// cond:
 13047  	// result: (SUBconst [c] (SRAconst <x.Type> x [d]))
 13048  	for {
 13049  		d := v.AuxInt
 13050  		_ = v.Args[1]
 13051  		v_0 := v.Args[0]
 13052  		if v_0.Op != OpARMMOVWconst {
 13053  			break
 13054  		}
 13055  		c := v_0.AuxInt
 13056  		x := v.Args[1]
 13057  		v.reset(OpARMSUBconst)
 13058  		v.AuxInt = c
 13059  		v0 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
 13060  		v0.AuxInt = d
 13061  		v0.AddArg(x)
 13062  		v.AddArg(v0)
 13063  		return true
 13064  	}
 13065  	// match: (RSBshiftRA x (MOVWconst [c]) [d])
 13066  	// cond:
 13067  	// result: (RSBconst x [int64(int32(c)>>uint64(d))])
 13068  	for {
 13069  		d := v.AuxInt
 13070  		_ = v.Args[1]
 13071  		x := v.Args[0]
 13072  		v_1 := v.Args[1]
 13073  		if v_1.Op != OpARMMOVWconst {
 13074  			break
 13075  		}
 13076  		c := v_1.AuxInt
 13077  		v.reset(OpARMRSBconst)
 13078  		v.AuxInt = int64(int32(c) >> uint64(d))
 13079  		v.AddArg(x)
 13080  		return true
 13081  	}
 13082  	// match: (RSBshiftRA x (SRAconst x [c]) [d])
 13083  	// cond: c==d
 13084  	// result: (MOVWconst [0])
 13085  	for {
 13086  		d := v.AuxInt
 13087  		_ = v.Args[1]
 13088  		x := v.Args[0]
 13089  		v_1 := v.Args[1]
 13090  		if v_1.Op != OpARMSRAconst {
 13091  			break
 13092  		}
 13093  		c := v_1.AuxInt
 13094  		if x != v_1.Args[0] {
 13095  			break
 13096  		}
 13097  		if !(c == d) {
 13098  			break
 13099  		}
 13100  		v.reset(OpARMMOVWconst)
 13101  		v.AuxInt = 0
 13102  		return true
 13103  	}
 13104  	return false
 13105  }
 13106  func rewriteValueARM_OpARMRSBshiftRAreg_0(v *Value) bool {
 13107  	b := v.Block
 13108  	_ = b
 13109  	// match: (RSBshiftRAreg (MOVWconst [c]) x y)
 13110  	// cond:
 13111  	// result: (SUBconst [c] (SRA <x.Type> x y))
 13112  	for {
 13113  		_ = v.Args[2]
 13114  		v_0 := v.Args[0]
 13115  		if v_0.Op != OpARMMOVWconst {
 13116  			break
 13117  		}
 13118  		c := v_0.AuxInt
 13119  		x := v.Args[1]
 13120  		y := v.Args[2]
 13121  		v.reset(OpARMSUBconst)
 13122  		v.AuxInt = c
 13123  		v0 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
 13124  		v0.AddArg(x)
 13125  		v0.AddArg(y)
 13126  		v.AddArg(v0)
 13127  		return true
 13128  	}
 13129  	// match: (RSBshiftRAreg x y (MOVWconst [c]))
 13130  	// cond:
 13131  	// result: (RSBshiftRA x y [c])
 13132  	for {
 13133  		_ = v.Args[2]
 13134  		x := v.Args[0]
 13135  		y := v.Args[1]
 13136  		v_2 := v.Args[2]
 13137  		if v_2.Op != OpARMMOVWconst {
 13138  			break
 13139  		}
 13140  		c := v_2.AuxInt
 13141  		v.reset(OpARMRSBshiftRA)
 13142  		v.AuxInt = c
 13143  		v.AddArg(x)
 13144  		v.AddArg(y)
 13145  		return true
 13146  	}
 13147  	return false
 13148  }
 13149  func rewriteValueARM_OpARMRSBshiftRL_0(v *Value) bool {
 13150  	b := v.Block
 13151  	_ = b
 13152  	// match: (RSBshiftRL (MOVWconst [c]) x [d])
 13153  	// cond:
 13154  	// result: (SUBconst [c] (SRLconst <x.Type> x [d]))
 13155  	for {
 13156  		d := v.AuxInt
 13157  		_ = v.Args[1]
 13158  		v_0 := v.Args[0]
 13159  		if v_0.Op != OpARMMOVWconst {
 13160  			break
 13161  		}
 13162  		c := v_0.AuxInt
 13163  		x := v.Args[1]
 13164  		v.reset(OpARMSUBconst)
 13165  		v.AuxInt = c
 13166  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
 13167  		v0.AuxInt = d
 13168  		v0.AddArg(x)
 13169  		v.AddArg(v0)
 13170  		return true
 13171  	}
 13172  	// match: (RSBshiftRL x (MOVWconst [c]) [d])
 13173  	// cond:
 13174  	// result: (RSBconst x [int64(int32(uint32(c)>>uint64(d)))])
 13175  	for {
 13176  		d := v.AuxInt
 13177  		_ = v.Args[1]
 13178  		x := v.Args[0]
 13179  		v_1 := v.Args[1]
 13180  		if v_1.Op != OpARMMOVWconst {
 13181  			break
 13182  		}
 13183  		c := v_1.AuxInt
 13184  		v.reset(OpARMRSBconst)
 13185  		v.AuxInt = int64(int32(uint32(c) >> uint64(d)))
 13186  		v.AddArg(x)
 13187  		return true
 13188  	}
 13189  	// match: (RSBshiftRL x (SRLconst x [c]) [d])
 13190  	// cond: c==d
 13191  	// result: (MOVWconst [0])
 13192  	for {
 13193  		d := v.AuxInt
 13194  		_ = v.Args[1]
 13195  		x := v.Args[0]
 13196  		v_1 := v.Args[1]
 13197  		if v_1.Op != OpARMSRLconst {
 13198  			break
 13199  		}
 13200  		c := v_1.AuxInt
 13201  		if x != v_1.Args[0] {
 13202  			break
 13203  		}
 13204  		if !(c == d) {
 13205  			break
 13206  		}
 13207  		v.reset(OpARMMOVWconst)
 13208  		v.AuxInt = 0
 13209  		return true
 13210  	}
 13211  	return false
 13212  }
 13213  func rewriteValueARM_OpARMRSBshiftRLreg_0(v *Value) bool {
 13214  	b := v.Block
 13215  	_ = b
 13216  	// match: (RSBshiftRLreg (MOVWconst [c]) x y)
 13217  	// cond:
 13218  	// result: (SUBconst [c] (SRL <x.Type> x y))
 13219  	for {
 13220  		_ = v.Args[2]
 13221  		v_0 := v.Args[0]
 13222  		if v_0.Op != OpARMMOVWconst {
 13223  			break
 13224  		}
 13225  		c := v_0.AuxInt
 13226  		x := v.Args[1]
 13227  		y := v.Args[2]
 13228  		v.reset(OpARMSUBconst)
 13229  		v.AuxInt = c
 13230  		v0 := b.NewValue0(v.Pos, OpARMSRL, x.Type)
 13231  		v0.AddArg(x)
 13232  		v0.AddArg(y)
 13233  		v.AddArg(v0)
 13234  		return true
 13235  	}
 13236  	// match: (RSBshiftRLreg x y (MOVWconst [c]))
 13237  	// cond:
 13238  	// result: (RSBshiftRL x y [c])
 13239  	for {
 13240  		_ = v.Args[2]
 13241  		x := v.Args[0]
 13242  		y := v.Args[1]
 13243  		v_2 := v.Args[2]
 13244  		if v_2.Op != OpARMMOVWconst {
 13245  			break
 13246  		}
 13247  		c := v_2.AuxInt
 13248  		v.reset(OpARMRSBshiftRL)
 13249  		v.AuxInt = c
 13250  		v.AddArg(x)
 13251  		v.AddArg(y)
 13252  		return true
 13253  	}
 13254  	return false
 13255  }
 13256  func rewriteValueARM_OpARMRSCconst_0(v *Value) bool {
 13257  	// match: (RSCconst [c] (ADDconst [d] x) flags)
 13258  	// cond:
 13259  	// result: (RSCconst [int64(int32(c-d))] x flags)
 13260  	for {
 13261  		c := v.AuxInt
 13262  		_ = v.Args[1]
 13263  		v_0 := v.Args[0]
 13264  		if v_0.Op != OpARMADDconst {
 13265  			break
 13266  		}
 13267  		d := v_0.AuxInt
 13268  		x := v_0.Args[0]
 13269  		flags := v.Args[1]
 13270  		v.reset(OpARMRSCconst)
 13271  		v.AuxInt = int64(int32(c - d))
 13272  		v.AddArg(x)
 13273  		v.AddArg(flags)
 13274  		return true
 13275  	}
 13276  	// match: (RSCconst [c] (SUBconst [d] x) flags)
 13277  	// cond:
 13278  	// result: (RSCconst [int64(int32(c+d))] x flags)
 13279  	for {
 13280  		c := v.AuxInt
 13281  		_ = v.Args[1]
 13282  		v_0 := v.Args[0]
 13283  		if v_0.Op != OpARMSUBconst {
 13284  			break
 13285  		}
 13286  		d := v_0.AuxInt
 13287  		x := v_0.Args[0]
 13288  		flags := v.Args[1]
 13289  		v.reset(OpARMRSCconst)
 13290  		v.AuxInt = int64(int32(c + d))
 13291  		v.AddArg(x)
 13292  		v.AddArg(flags)
 13293  		return true
 13294  	}
 13295  	return false
 13296  }
 13297  func rewriteValueARM_OpARMRSCshiftLL_0(v *Value) bool {
 13298  	b := v.Block
 13299  	_ = b
 13300  	// match: (RSCshiftLL (MOVWconst [c]) x [d] flags)
 13301  	// cond:
 13302  	// result: (SBCconst [c] (SLLconst <x.Type> x [d]) flags)
 13303  	for {
 13304  		d := v.AuxInt
 13305  		_ = v.Args[2]
 13306  		v_0 := v.Args[0]
 13307  		if v_0.Op != OpARMMOVWconst {
 13308  			break
 13309  		}
 13310  		c := v_0.AuxInt
 13311  		x := v.Args[1]
 13312  		flags := v.Args[2]
 13313  		v.reset(OpARMSBCconst)
 13314  		v.AuxInt = c
 13315  		v0 := b.NewValue0(v.Pos, OpARMSLLconst, x.Type)
 13316  		v0.AuxInt = d
 13317  		v0.AddArg(x)
 13318  		v.AddArg(v0)
 13319  		v.AddArg(flags)
 13320  		return true
 13321  	}
 13322  	// match: (RSCshiftLL x (MOVWconst [c]) [d] flags)
 13323  	// cond:
 13324  	// result: (RSCconst x [int64(int32(uint32(c)<<uint64(d)))] flags)
 13325  	for {
 13326  		d := v.AuxInt
 13327  		_ = v.Args[2]
 13328  		x := v.Args[0]
 13329  		v_1 := v.Args[1]
 13330  		if v_1.Op != OpARMMOVWconst {
 13331  			break
 13332  		}
 13333  		c := v_1.AuxInt
 13334  		flags := v.Args[2]
 13335  		v.reset(OpARMRSCconst)
 13336  		v.AuxInt = int64(int32(uint32(c) << uint64(d)))
 13337  		v.AddArg(x)
 13338  		v.AddArg(flags)
 13339  		return true
 13340  	}
 13341  	return false
 13342  }
 13343  func rewriteValueARM_OpARMRSCshiftLLreg_0(v *Value) bool {
 13344  	b := v.Block
 13345  	_ = b
 13346  	// match: (RSCshiftLLreg (MOVWconst [c]) x y flags)
 13347  	// cond:
 13348  	// result: (SBCconst [c] (SLL <x.Type> x y) flags)
 13349  	for {
 13350  		_ = v.Args[3]
 13351  		v_0 := v.Args[0]
 13352  		if v_0.Op != OpARMMOVWconst {
 13353  			break
 13354  		}
 13355  		c := v_0.AuxInt
 13356  		x := v.Args[1]
 13357  		y := v.Args[2]
 13358  		flags := v.Args[3]
 13359  		v.reset(OpARMSBCconst)
 13360  		v.AuxInt = c
 13361  		v0 := b.NewValue0(v.Pos, OpARMSLL, x.Type)
 13362  		v0.AddArg(x)
 13363  		v0.AddArg(y)
 13364  		v.AddArg(v0)
 13365  		v.AddArg(flags)
 13366  		return true
 13367  	}
 13368  	// match: (RSCshiftLLreg x y (MOVWconst [c]) flags)
 13369  	// cond:
 13370  	// result: (RSCshiftLL x y [c] flags)
 13371  	for {
 13372  		_ = v.Args[3]
 13373  		x := v.Args[0]
 13374  		y := v.Args[1]
 13375  		v_2 := v.Args[2]
 13376  		if v_2.Op != OpARMMOVWconst {
 13377  			break
 13378  		}
 13379  		c := v_2.AuxInt
 13380  		flags := v.Args[3]
 13381  		v.reset(OpARMRSCshiftLL)
 13382  		v.AuxInt = c
 13383  		v.AddArg(x)
 13384  		v.AddArg(y)
 13385  		v.AddArg(flags)
 13386  		return true
 13387  	}
 13388  	return false
 13389  }
 13390  func rewriteValueARM_OpARMRSCshiftRA_0(v *Value) bool {
 13391  	b := v.Block
 13392  	_ = b
 13393  	// match: (RSCshiftRA (MOVWconst [c]) x [d] flags)
 13394  	// cond:
 13395  	// result: (SBCconst [c] (SRAconst <x.Type> x [d]) flags)
 13396  	for {
 13397  		d := v.AuxInt
 13398  		_ = v.Args[2]
 13399  		v_0 := v.Args[0]
 13400  		if v_0.Op != OpARMMOVWconst {
 13401  			break
 13402  		}
 13403  		c := v_0.AuxInt
 13404  		x := v.Args[1]
 13405  		flags := v.Args[2]
 13406  		v.reset(OpARMSBCconst)
 13407  		v.AuxInt = c
 13408  		v0 := b.NewValue0(v.Pos, OpARMSRAconst, x.Type)
 13409  		v0.AuxInt = d
 13410  		v0.AddArg(x)
 13411  		v.AddArg(v0)
 13412  		v.AddArg(flags)
 13413  		return true
 13414  	}
 13415  	// match: (RSCshiftRA x (MOVWconst [c]) [d] flags)
 13416  	// cond:
 13417  	// result: (RSCconst x [int64(int32(c)>>uint64(d))] flags)
 13418  	for {
 13419  		d := v.AuxInt
 13420  		_ = v.Args[2]
 13421  		x := v.Args[0]
 13422  		v_1 := v.Args[1]
 13423  		if v_1.Op != OpARMMOVWconst {
 13424  			break
 13425  		}
 13426  		c := v_1.AuxInt
 13427  		flags := v.Args[2]
 13428  		v.reset(OpARMRSCconst)
 13429  		v.AuxInt = int64(int32(c) >> uint64(d))
 13430  		v.AddArg(x)
 13431  		v.AddArg(flags)
 13432  		return true
 13433  	}
 13434  	return false
 13435  }
 13436  func rewriteValueARM_OpARMRSCshiftRAreg_0(v *Value) bool {
 13437  	b := v.Block
 13438  	_ = b
 13439  	// match: (RSCshiftRAreg (MOVWconst [c]) x y flags)
 13440  	// cond:
 13441  	// result: (SBCconst [c] (SRA <x.Type> x y) flags)
 13442  	for {
 13443  		_ = v.Args[3]
 13444  		v_0 := v.Args[0]
 13445  		if v_0.Op != OpARMMOVWconst {
 13446  			break
 13447  		}
 13448  		c := v_0.AuxInt
 13449  		x := v.Args[1]
 13450  		y := v.Args[2]
 13451  		flags := v.Args[3]
 13452  		v.reset(OpARMSBCconst)
 13453  		v.AuxInt = c
 13454  		v0 := b.NewValue0(v.Pos, OpARMSRA, x.Type)
 13455  		v0.AddArg(x)
 13456  		v0.AddArg(y)
 13457  		v.AddArg(v0)
 13458  		v.AddArg(flags)
 13459  		return true
 13460  	}
 13461  	// match: (RSCshiftRAreg x y (MOVWconst [c]) flags)
 13462  	// cond:
 13463  	// result: (RSCshiftRA x y [c] flags)
 13464  	for {
 13465  		_ = v.Args[3]
 13466  		x := v.Args[0]
 13467  		y := v.Args[1]
 13468  		v_2 := v.Args[2]
 13469  		if v_2.Op != OpARMMOVWconst {
 13470  			break
 13471  		}
 13472  		c := v_2.AuxInt
 13473  		flags := v.Args[3]
 13474  		v.reset(OpARMRSCshiftRA)
 13475  		v.AuxInt = c
 13476  		v.AddArg(x)
 13477  		v.AddArg(y)
 13478  		v.AddArg(flags)
 13479  		return true
 13480  	}
 13481  	return false
 13482  }
 13483  func rewriteValueARM_OpARMRSCshiftRL_0(v *Value) bool {
 13484  	b := v.Block
 13485  	_ = b
 13486  	// match: (RSCshiftRL (MOVWconst [c]) x [d] flags)
 13487  	// cond:
 13488  	// result: (SBCconst [c] (SRLconst <x.Type> x [d]) flags)
 13489  	for {
 13490  		d := v.AuxInt
 13491  		_ = v.Args[2]
 13492  		v_0 := v.Args[0]
 13493  		if v_0.Op != OpARMMOVWconst {
 13494  			break
 13495  		}
 13496  		c := v_0.AuxInt
 13497  		x := v.Args[1]
 13498  		flags := v.Args[2]
 13499  		v.reset(OpARMSBCconst)
 13500  		v.AuxInt = c
 13501  		v0 := b.NewValue0(v.Pos, OpARMSRLconst, x.Type)
 13502  		v0.AuxInt = d
 13503  		v0.AddArg(x)
 13504  		v.AddArg(v0)
 13505  		v.AddArg(flags)
 13506  		return true
 13507  	}
 13508  	// match: (RSCshiftRL x (MOVWconst [c]) [d] flags)
 13509  	// cond:
 13510  	// result: (RSCconst x [int64(int32(uint32(c)>>uint64(d)))] flags)
 13511  	for {
 13512  		d := v.AuxInt
 13513  		_ = v.Args[2]
 13514  		x := v.Args[0]
 13515  		v_1 := v.Args[1]
 13516  		if v_1.Op != OpARMMOVWconst {
 13517  			break
 13518  		}
 13519  		c := v_1.AuxInt
 13520  		flags := v.Args[2]
 13521  		v.reset(OpARMRSCconst)
 13522  		v.AuxInt = int64(int32(uint32(c) >> uint64(d)))
 13523  		v.AddArg(x)
 13524  		v.AddArg(flags)
 13525  		return true
 13526  	}
 13527  	return false
 13528  }
 13529  func rewriteValueARM_OpARMRSCshiftRLreg_0(v *Value) bool {
 13530  	b := v.Block
 13531  	_ = b
 13532  	// match: (RSCshiftRLreg (MOVWconst [c]) x y flags)
 13533  	// cond:
 13534  	// result: (SBCconst [c] (SRL <x.Type> x y) flags)
 13535  	for {