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

     1  // Code generated from _gen/ARM64.rules using 'go generate'; DO NOT EDIT.
     2  
     3  package ssa
     4  
     5  import "cmd/compile/internal/types"
     6  
     7  func rewriteValueARM64(v *Value) bool {
     8  	switch v.Op {
     9  	case OpARM64ADCSflags:
    10  		return rewriteValueARM64_OpARM64ADCSflags(v)
    11  	case OpARM64ADD:
    12  		return rewriteValueARM64_OpARM64ADD(v)
    13  	case OpARM64ADDSflags:
    14  		return rewriteValueARM64_OpARM64ADDSflags(v)
    15  	case OpARM64ADDconst:
    16  		return rewriteValueARM64_OpARM64ADDconst(v)
    17  	case OpARM64ADDshiftLL:
    18  		return rewriteValueARM64_OpARM64ADDshiftLL(v)
    19  	case OpARM64ADDshiftRA:
    20  		return rewriteValueARM64_OpARM64ADDshiftRA(v)
    21  	case OpARM64ADDshiftRL:
    22  		return rewriteValueARM64_OpARM64ADDshiftRL(v)
    23  	case OpARM64AND:
    24  		return rewriteValueARM64_OpARM64AND(v)
    25  	case OpARM64ANDconst:
    26  		return rewriteValueARM64_OpARM64ANDconst(v)
    27  	case OpARM64ANDshiftLL:
    28  		return rewriteValueARM64_OpARM64ANDshiftLL(v)
    29  	case OpARM64ANDshiftRA:
    30  		return rewriteValueARM64_OpARM64ANDshiftRA(v)
    31  	case OpARM64ANDshiftRL:
    32  		return rewriteValueARM64_OpARM64ANDshiftRL(v)
    33  	case OpARM64ANDshiftRO:
    34  		return rewriteValueARM64_OpARM64ANDshiftRO(v)
    35  	case OpARM64BIC:
    36  		return rewriteValueARM64_OpARM64BIC(v)
    37  	case OpARM64BICshiftLL:
    38  		return rewriteValueARM64_OpARM64BICshiftLL(v)
    39  	case OpARM64BICshiftRA:
    40  		return rewriteValueARM64_OpARM64BICshiftRA(v)
    41  	case OpARM64BICshiftRL:
    42  		return rewriteValueARM64_OpARM64BICshiftRL(v)
    43  	case OpARM64BICshiftRO:
    44  		return rewriteValueARM64_OpARM64BICshiftRO(v)
    45  	case OpARM64CMN:
    46  		return rewriteValueARM64_OpARM64CMN(v)
    47  	case OpARM64CMNW:
    48  		return rewriteValueARM64_OpARM64CMNW(v)
    49  	case OpARM64CMNWconst:
    50  		return rewriteValueARM64_OpARM64CMNWconst(v)
    51  	case OpARM64CMNconst:
    52  		return rewriteValueARM64_OpARM64CMNconst(v)
    53  	case OpARM64CMNshiftLL:
    54  		return rewriteValueARM64_OpARM64CMNshiftLL(v)
    55  	case OpARM64CMNshiftRA:
    56  		return rewriteValueARM64_OpARM64CMNshiftRA(v)
    57  	case OpARM64CMNshiftRL:
    58  		return rewriteValueARM64_OpARM64CMNshiftRL(v)
    59  	case OpARM64CMP:
    60  		return rewriteValueARM64_OpARM64CMP(v)
    61  	case OpARM64CMPW:
    62  		return rewriteValueARM64_OpARM64CMPW(v)
    63  	case OpARM64CMPWconst:
    64  		return rewriteValueARM64_OpARM64CMPWconst(v)
    65  	case OpARM64CMPconst:
    66  		return rewriteValueARM64_OpARM64CMPconst(v)
    67  	case OpARM64CMPshiftLL:
    68  		return rewriteValueARM64_OpARM64CMPshiftLL(v)
    69  	case OpARM64CMPshiftRA:
    70  		return rewriteValueARM64_OpARM64CMPshiftRA(v)
    71  	case OpARM64CMPshiftRL:
    72  		return rewriteValueARM64_OpARM64CMPshiftRL(v)
    73  	case OpARM64CSEL:
    74  		return rewriteValueARM64_OpARM64CSEL(v)
    75  	case OpARM64CSEL0:
    76  		return rewriteValueARM64_OpARM64CSEL0(v)
    77  	case OpARM64CSETM:
    78  		return rewriteValueARM64_OpARM64CSETM(v)
    79  	case OpARM64CSINC:
    80  		return rewriteValueARM64_OpARM64CSINC(v)
    81  	case OpARM64CSINV:
    82  		return rewriteValueARM64_OpARM64CSINV(v)
    83  	case OpARM64CSNEG:
    84  		return rewriteValueARM64_OpARM64CSNEG(v)
    85  	case OpARM64DIV:
    86  		return rewriteValueARM64_OpARM64DIV(v)
    87  	case OpARM64DIVW:
    88  		return rewriteValueARM64_OpARM64DIVW(v)
    89  	case OpARM64EON:
    90  		return rewriteValueARM64_OpARM64EON(v)
    91  	case OpARM64EONshiftLL:
    92  		return rewriteValueARM64_OpARM64EONshiftLL(v)
    93  	case OpARM64EONshiftRA:
    94  		return rewriteValueARM64_OpARM64EONshiftRA(v)
    95  	case OpARM64EONshiftRL:
    96  		return rewriteValueARM64_OpARM64EONshiftRL(v)
    97  	case OpARM64EONshiftRO:
    98  		return rewriteValueARM64_OpARM64EONshiftRO(v)
    99  	case OpARM64Equal:
   100  		return rewriteValueARM64_OpARM64Equal(v)
   101  	case OpARM64FADDD:
   102  		return rewriteValueARM64_OpARM64FADDD(v)
   103  	case OpARM64FADDS:
   104  		return rewriteValueARM64_OpARM64FADDS(v)
   105  	case OpARM64FCMPD:
   106  		return rewriteValueARM64_OpARM64FCMPD(v)
   107  	case OpARM64FCMPS:
   108  		return rewriteValueARM64_OpARM64FCMPS(v)
   109  	case OpARM64FMOVDfpgp:
   110  		return rewriteValueARM64_OpARM64FMOVDfpgp(v)
   111  	case OpARM64FMOVDgpfp:
   112  		return rewriteValueARM64_OpARM64FMOVDgpfp(v)
   113  	case OpARM64FMOVDload:
   114  		return rewriteValueARM64_OpARM64FMOVDload(v)
   115  	case OpARM64FMOVDloadidx:
   116  		return rewriteValueARM64_OpARM64FMOVDloadidx(v)
   117  	case OpARM64FMOVDloadidx8:
   118  		return rewriteValueARM64_OpARM64FMOVDloadidx8(v)
   119  	case OpARM64FMOVDstore:
   120  		return rewriteValueARM64_OpARM64FMOVDstore(v)
   121  	case OpARM64FMOVDstoreidx:
   122  		return rewriteValueARM64_OpARM64FMOVDstoreidx(v)
   123  	case OpARM64FMOVDstoreidx8:
   124  		return rewriteValueARM64_OpARM64FMOVDstoreidx8(v)
   125  	case OpARM64FMOVSload:
   126  		return rewriteValueARM64_OpARM64FMOVSload(v)
   127  	case OpARM64FMOVSloadidx:
   128  		return rewriteValueARM64_OpARM64FMOVSloadidx(v)
   129  	case OpARM64FMOVSloadidx4:
   130  		return rewriteValueARM64_OpARM64FMOVSloadidx4(v)
   131  	case OpARM64FMOVSstore:
   132  		return rewriteValueARM64_OpARM64FMOVSstore(v)
   133  	case OpARM64FMOVSstoreidx:
   134  		return rewriteValueARM64_OpARM64FMOVSstoreidx(v)
   135  	case OpARM64FMOVSstoreidx4:
   136  		return rewriteValueARM64_OpARM64FMOVSstoreidx4(v)
   137  	case OpARM64FMULD:
   138  		return rewriteValueARM64_OpARM64FMULD(v)
   139  	case OpARM64FMULS:
   140  		return rewriteValueARM64_OpARM64FMULS(v)
   141  	case OpARM64FNEGD:
   142  		return rewriteValueARM64_OpARM64FNEGD(v)
   143  	case OpARM64FNEGS:
   144  		return rewriteValueARM64_OpARM64FNEGS(v)
   145  	case OpARM64FNMULD:
   146  		return rewriteValueARM64_OpARM64FNMULD(v)
   147  	case OpARM64FNMULS:
   148  		return rewriteValueARM64_OpARM64FNMULS(v)
   149  	case OpARM64FSUBD:
   150  		return rewriteValueARM64_OpARM64FSUBD(v)
   151  	case OpARM64FSUBS:
   152  		return rewriteValueARM64_OpARM64FSUBS(v)
   153  	case OpARM64GreaterEqual:
   154  		return rewriteValueARM64_OpARM64GreaterEqual(v)
   155  	case OpARM64GreaterEqualF:
   156  		return rewriteValueARM64_OpARM64GreaterEqualF(v)
   157  	case OpARM64GreaterEqualNoov:
   158  		return rewriteValueARM64_OpARM64GreaterEqualNoov(v)
   159  	case OpARM64GreaterEqualU:
   160  		return rewriteValueARM64_OpARM64GreaterEqualU(v)
   161  	case OpARM64GreaterThan:
   162  		return rewriteValueARM64_OpARM64GreaterThan(v)
   163  	case OpARM64GreaterThanF:
   164  		return rewriteValueARM64_OpARM64GreaterThanF(v)
   165  	case OpARM64GreaterThanU:
   166  		return rewriteValueARM64_OpARM64GreaterThanU(v)
   167  	case OpARM64LDP:
   168  		return rewriteValueARM64_OpARM64LDP(v)
   169  	case OpARM64LessEqual:
   170  		return rewriteValueARM64_OpARM64LessEqual(v)
   171  	case OpARM64LessEqualF:
   172  		return rewriteValueARM64_OpARM64LessEqualF(v)
   173  	case OpARM64LessEqualU:
   174  		return rewriteValueARM64_OpARM64LessEqualU(v)
   175  	case OpARM64LessThan:
   176  		return rewriteValueARM64_OpARM64LessThan(v)
   177  	case OpARM64LessThanF:
   178  		return rewriteValueARM64_OpARM64LessThanF(v)
   179  	case OpARM64LessThanNoov:
   180  		return rewriteValueARM64_OpARM64LessThanNoov(v)
   181  	case OpARM64LessThanU:
   182  		return rewriteValueARM64_OpARM64LessThanU(v)
   183  	case OpARM64MADD:
   184  		return rewriteValueARM64_OpARM64MADD(v)
   185  	case OpARM64MADDW:
   186  		return rewriteValueARM64_OpARM64MADDW(v)
   187  	case OpARM64MNEG:
   188  		return rewriteValueARM64_OpARM64MNEG(v)
   189  	case OpARM64MNEGW:
   190  		return rewriteValueARM64_OpARM64MNEGW(v)
   191  	case OpARM64MOD:
   192  		return rewriteValueARM64_OpARM64MOD(v)
   193  	case OpARM64MODW:
   194  		return rewriteValueARM64_OpARM64MODW(v)
   195  	case OpARM64MOVBUload:
   196  		return rewriteValueARM64_OpARM64MOVBUload(v)
   197  	case OpARM64MOVBUloadidx:
   198  		return rewriteValueARM64_OpARM64MOVBUloadidx(v)
   199  	case OpARM64MOVBUreg:
   200  		return rewriteValueARM64_OpARM64MOVBUreg(v)
   201  	case OpARM64MOVBload:
   202  		return rewriteValueARM64_OpARM64MOVBload(v)
   203  	case OpARM64MOVBloadidx:
   204  		return rewriteValueARM64_OpARM64MOVBloadidx(v)
   205  	case OpARM64MOVBreg:
   206  		return rewriteValueARM64_OpARM64MOVBreg(v)
   207  	case OpARM64MOVBstore:
   208  		return rewriteValueARM64_OpARM64MOVBstore(v)
   209  	case OpARM64MOVBstoreidx:
   210  		return rewriteValueARM64_OpARM64MOVBstoreidx(v)
   211  	case OpARM64MOVDload:
   212  		return rewriteValueARM64_OpARM64MOVDload(v)
   213  	case OpARM64MOVDloadidx:
   214  		return rewriteValueARM64_OpARM64MOVDloadidx(v)
   215  	case OpARM64MOVDloadidx8:
   216  		return rewriteValueARM64_OpARM64MOVDloadidx8(v)
   217  	case OpARM64MOVDnop:
   218  		return rewriteValueARM64_OpARM64MOVDnop(v)
   219  	case OpARM64MOVDreg:
   220  		return rewriteValueARM64_OpARM64MOVDreg(v)
   221  	case OpARM64MOVDstore:
   222  		return rewriteValueARM64_OpARM64MOVDstore(v)
   223  	case OpARM64MOVDstoreidx:
   224  		return rewriteValueARM64_OpARM64MOVDstoreidx(v)
   225  	case OpARM64MOVDstoreidx8:
   226  		return rewriteValueARM64_OpARM64MOVDstoreidx8(v)
   227  	case OpARM64MOVHUload:
   228  		return rewriteValueARM64_OpARM64MOVHUload(v)
   229  	case OpARM64MOVHUloadidx:
   230  		return rewriteValueARM64_OpARM64MOVHUloadidx(v)
   231  	case OpARM64MOVHUloadidx2:
   232  		return rewriteValueARM64_OpARM64MOVHUloadidx2(v)
   233  	case OpARM64MOVHUreg:
   234  		return rewriteValueARM64_OpARM64MOVHUreg(v)
   235  	case OpARM64MOVHload:
   236  		return rewriteValueARM64_OpARM64MOVHload(v)
   237  	case OpARM64MOVHloadidx:
   238  		return rewriteValueARM64_OpARM64MOVHloadidx(v)
   239  	case OpARM64MOVHloadidx2:
   240  		return rewriteValueARM64_OpARM64MOVHloadidx2(v)
   241  	case OpARM64MOVHreg:
   242  		return rewriteValueARM64_OpARM64MOVHreg(v)
   243  	case OpARM64MOVHstore:
   244  		return rewriteValueARM64_OpARM64MOVHstore(v)
   245  	case OpARM64MOVHstoreidx:
   246  		return rewriteValueARM64_OpARM64MOVHstoreidx(v)
   247  	case OpARM64MOVHstoreidx2:
   248  		return rewriteValueARM64_OpARM64MOVHstoreidx2(v)
   249  	case OpARM64MOVWUload:
   250  		return rewriteValueARM64_OpARM64MOVWUload(v)
   251  	case OpARM64MOVWUloadidx:
   252  		return rewriteValueARM64_OpARM64MOVWUloadidx(v)
   253  	case OpARM64MOVWUloadidx4:
   254  		return rewriteValueARM64_OpARM64MOVWUloadidx4(v)
   255  	case OpARM64MOVWUreg:
   256  		return rewriteValueARM64_OpARM64MOVWUreg(v)
   257  	case OpARM64MOVWload:
   258  		return rewriteValueARM64_OpARM64MOVWload(v)
   259  	case OpARM64MOVWloadidx:
   260  		return rewriteValueARM64_OpARM64MOVWloadidx(v)
   261  	case OpARM64MOVWloadidx4:
   262  		return rewriteValueARM64_OpARM64MOVWloadidx4(v)
   263  	case OpARM64MOVWreg:
   264  		return rewriteValueARM64_OpARM64MOVWreg(v)
   265  	case OpARM64MOVWstore:
   266  		return rewriteValueARM64_OpARM64MOVWstore(v)
   267  	case OpARM64MOVWstoreidx:
   268  		return rewriteValueARM64_OpARM64MOVWstoreidx(v)
   269  	case OpARM64MOVWstoreidx4:
   270  		return rewriteValueARM64_OpARM64MOVWstoreidx4(v)
   271  	case OpARM64MSUB:
   272  		return rewriteValueARM64_OpARM64MSUB(v)
   273  	case OpARM64MSUBW:
   274  		return rewriteValueARM64_OpARM64MSUBW(v)
   275  	case OpARM64MUL:
   276  		return rewriteValueARM64_OpARM64MUL(v)
   277  	case OpARM64MULW:
   278  		return rewriteValueARM64_OpARM64MULW(v)
   279  	case OpARM64MVN:
   280  		return rewriteValueARM64_OpARM64MVN(v)
   281  	case OpARM64MVNshiftLL:
   282  		return rewriteValueARM64_OpARM64MVNshiftLL(v)
   283  	case OpARM64MVNshiftRA:
   284  		return rewriteValueARM64_OpARM64MVNshiftRA(v)
   285  	case OpARM64MVNshiftRL:
   286  		return rewriteValueARM64_OpARM64MVNshiftRL(v)
   287  	case OpARM64MVNshiftRO:
   288  		return rewriteValueARM64_OpARM64MVNshiftRO(v)
   289  	case OpARM64NEG:
   290  		return rewriteValueARM64_OpARM64NEG(v)
   291  	case OpARM64NEGshiftLL:
   292  		return rewriteValueARM64_OpARM64NEGshiftLL(v)
   293  	case OpARM64NEGshiftRA:
   294  		return rewriteValueARM64_OpARM64NEGshiftRA(v)
   295  	case OpARM64NEGshiftRL:
   296  		return rewriteValueARM64_OpARM64NEGshiftRL(v)
   297  	case OpARM64NotEqual:
   298  		return rewriteValueARM64_OpARM64NotEqual(v)
   299  	case OpARM64OR:
   300  		return rewriteValueARM64_OpARM64OR(v)
   301  	case OpARM64ORN:
   302  		return rewriteValueARM64_OpARM64ORN(v)
   303  	case OpARM64ORNshiftLL:
   304  		return rewriteValueARM64_OpARM64ORNshiftLL(v)
   305  	case OpARM64ORNshiftRA:
   306  		return rewriteValueARM64_OpARM64ORNshiftRA(v)
   307  	case OpARM64ORNshiftRL:
   308  		return rewriteValueARM64_OpARM64ORNshiftRL(v)
   309  	case OpARM64ORNshiftRO:
   310  		return rewriteValueARM64_OpARM64ORNshiftRO(v)
   311  	case OpARM64ORconst:
   312  		return rewriteValueARM64_OpARM64ORconst(v)
   313  	case OpARM64ORshiftLL:
   314  		return rewriteValueARM64_OpARM64ORshiftLL(v)
   315  	case OpARM64ORshiftRA:
   316  		return rewriteValueARM64_OpARM64ORshiftRA(v)
   317  	case OpARM64ORshiftRL:
   318  		return rewriteValueARM64_OpARM64ORshiftRL(v)
   319  	case OpARM64ORshiftRO:
   320  		return rewriteValueARM64_OpARM64ORshiftRO(v)
   321  	case OpARM64REV:
   322  		return rewriteValueARM64_OpARM64REV(v)
   323  	case OpARM64REVW:
   324  		return rewriteValueARM64_OpARM64REVW(v)
   325  	case OpARM64ROR:
   326  		return rewriteValueARM64_OpARM64ROR(v)
   327  	case OpARM64RORW:
   328  		return rewriteValueARM64_OpARM64RORW(v)
   329  	case OpARM64SBCSflags:
   330  		return rewriteValueARM64_OpARM64SBCSflags(v)
   331  	case OpARM64SBFX:
   332  		return rewriteValueARM64_OpARM64SBFX(v)
   333  	case OpARM64SLL:
   334  		return rewriteValueARM64_OpARM64SLL(v)
   335  	case OpARM64SLLconst:
   336  		return rewriteValueARM64_OpARM64SLLconst(v)
   337  	case OpARM64SRA:
   338  		return rewriteValueARM64_OpARM64SRA(v)
   339  	case OpARM64SRAconst:
   340  		return rewriteValueARM64_OpARM64SRAconst(v)
   341  	case OpARM64SRL:
   342  		return rewriteValueARM64_OpARM64SRL(v)
   343  	case OpARM64SRLconst:
   344  		return rewriteValueARM64_OpARM64SRLconst(v)
   345  	case OpARM64STP:
   346  		return rewriteValueARM64_OpARM64STP(v)
   347  	case OpARM64SUB:
   348  		return rewriteValueARM64_OpARM64SUB(v)
   349  	case OpARM64SUBconst:
   350  		return rewriteValueARM64_OpARM64SUBconst(v)
   351  	case OpARM64SUBshiftLL:
   352  		return rewriteValueARM64_OpARM64SUBshiftLL(v)
   353  	case OpARM64SUBshiftRA:
   354  		return rewriteValueARM64_OpARM64SUBshiftRA(v)
   355  	case OpARM64SUBshiftRL:
   356  		return rewriteValueARM64_OpARM64SUBshiftRL(v)
   357  	case OpARM64TST:
   358  		return rewriteValueARM64_OpARM64TST(v)
   359  	case OpARM64TSTW:
   360  		return rewriteValueARM64_OpARM64TSTW(v)
   361  	case OpARM64TSTWconst:
   362  		return rewriteValueARM64_OpARM64TSTWconst(v)
   363  	case OpARM64TSTconst:
   364  		return rewriteValueARM64_OpARM64TSTconst(v)
   365  	case OpARM64TSTshiftLL:
   366  		return rewriteValueARM64_OpARM64TSTshiftLL(v)
   367  	case OpARM64TSTshiftRA:
   368  		return rewriteValueARM64_OpARM64TSTshiftRA(v)
   369  	case OpARM64TSTshiftRL:
   370  		return rewriteValueARM64_OpARM64TSTshiftRL(v)
   371  	case OpARM64TSTshiftRO:
   372  		return rewriteValueARM64_OpARM64TSTshiftRO(v)
   373  	case OpARM64UBFIZ:
   374  		return rewriteValueARM64_OpARM64UBFIZ(v)
   375  	case OpARM64UBFX:
   376  		return rewriteValueARM64_OpARM64UBFX(v)
   377  	case OpARM64UDIV:
   378  		return rewriteValueARM64_OpARM64UDIV(v)
   379  	case OpARM64UDIVW:
   380  		return rewriteValueARM64_OpARM64UDIVW(v)
   381  	case OpARM64UMOD:
   382  		return rewriteValueARM64_OpARM64UMOD(v)
   383  	case OpARM64UMODW:
   384  		return rewriteValueARM64_OpARM64UMODW(v)
   385  	case OpARM64XOR:
   386  		return rewriteValueARM64_OpARM64XOR(v)
   387  	case OpARM64XORconst:
   388  		return rewriteValueARM64_OpARM64XORconst(v)
   389  	case OpARM64XORshiftLL:
   390  		return rewriteValueARM64_OpARM64XORshiftLL(v)
   391  	case OpARM64XORshiftRA:
   392  		return rewriteValueARM64_OpARM64XORshiftRA(v)
   393  	case OpARM64XORshiftRL:
   394  		return rewriteValueARM64_OpARM64XORshiftRL(v)
   395  	case OpARM64XORshiftRO:
   396  		return rewriteValueARM64_OpARM64XORshiftRO(v)
   397  	case OpAbs:
   398  		v.Op = OpARM64FABSD
   399  		return true
   400  	case OpAdd16:
   401  		v.Op = OpARM64ADD
   402  		return true
   403  	case OpAdd32:
   404  		v.Op = OpARM64ADD
   405  		return true
   406  	case OpAdd32F:
   407  		v.Op = OpARM64FADDS
   408  		return true
   409  	case OpAdd64:
   410  		v.Op = OpARM64ADD
   411  		return true
   412  	case OpAdd64F:
   413  		v.Op = OpARM64FADDD
   414  		return true
   415  	case OpAdd8:
   416  		v.Op = OpARM64ADD
   417  		return true
   418  	case OpAddPtr:
   419  		v.Op = OpARM64ADD
   420  		return true
   421  	case OpAddr:
   422  		return rewriteValueARM64_OpAddr(v)
   423  	case OpAnd16:
   424  		v.Op = OpARM64AND
   425  		return true
   426  	case OpAnd32:
   427  		v.Op = OpARM64AND
   428  		return true
   429  	case OpAnd64:
   430  		v.Op = OpARM64AND
   431  		return true
   432  	case OpAnd8:
   433  		v.Op = OpARM64AND
   434  		return true
   435  	case OpAndB:
   436  		v.Op = OpARM64AND
   437  		return true
   438  	case OpAtomicAdd32:
   439  		v.Op = OpARM64LoweredAtomicAdd32
   440  		return true
   441  	case OpAtomicAdd32Variant:
   442  		v.Op = OpARM64LoweredAtomicAdd32Variant
   443  		return true
   444  	case OpAtomicAdd64:
   445  		v.Op = OpARM64LoweredAtomicAdd64
   446  		return true
   447  	case OpAtomicAdd64Variant:
   448  		v.Op = OpARM64LoweredAtomicAdd64Variant
   449  		return true
   450  	case OpAtomicAnd32value:
   451  		v.Op = OpARM64LoweredAtomicAnd32
   452  		return true
   453  	case OpAtomicAnd32valueVariant:
   454  		v.Op = OpARM64LoweredAtomicAnd32Variant
   455  		return true
   456  	case OpAtomicAnd64value:
   457  		v.Op = OpARM64LoweredAtomicAnd64
   458  		return true
   459  	case OpAtomicAnd64valueVariant:
   460  		v.Op = OpARM64LoweredAtomicAnd64Variant
   461  		return true
   462  	case OpAtomicAnd8value:
   463  		v.Op = OpARM64LoweredAtomicAnd8
   464  		return true
   465  	case OpAtomicAnd8valueVariant:
   466  		v.Op = OpARM64LoweredAtomicAnd8Variant
   467  		return true
   468  	case OpAtomicCompareAndSwap32:
   469  		v.Op = OpARM64LoweredAtomicCas32
   470  		return true
   471  	case OpAtomicCompareAndSwap32Variant:
   472  		v.Op = OpARM64LoweredAtomicCas32Variant
   473  		return true
   474  	case OpAtomicCompareAndSwap64:
   475  		v.Op = OpARM64LoweredAtomicCas64
   476  		return true
   477  	case OpAtomicCompareAndSwap64Variant:
   478  		v.Op = OpARM64LoweredAtomicCas64Variant
   479  		return true
   480  	case OpAtomicExchange32:
   481  		v.Op = OpARM64LoweredAtomicExchange32
   482  		return true
   483  	case OpAtomicExchange32Variant:
   484  		v.Op = OpARM64LoweredAtomicExchange32Variant
   485  		return true
   486  	case OpAtomicExchange64:
   487  		v.Op = OpARM64LoweredAtomicExchange64
   488  		return true
   489  	case OpAtomicExchange64Variant:
   490  		v.Op = OpARM64LoweredAtomicExchange64Variant
   491  		return true
   492  	case OpAtomicExchange8:
   493  		v.Op = OpARM64LoweredAtomicExchange8
   494  		return true
   495  	case OpAtomicExchange8Variant:
   496  		v.Op = OpARM64LoweredAtomicExchange8Variant
   497  		return true
   498  	case OpAtomicLoad32:
   499  		v.Op = OpARM64LDARW
   500  		return true
   501  	case OpAtomicLoad64:
   502  		v.Op = OpARM64LDAR
   503  		return true
   504  	case OpAtomicLoad8:
   505  		v.Op = OpARM64LDARB
   506  		return true
   507  	case OpAtomicLoadPtr:
   508  		v.Op = OpARM64LDAR
   509  		return true
   510  	case OpAtomicOr32value:
   511  		v.Op = OpARM64LoweredAtomicOr32
   512  		return true
   513  	case OpAtomicOr32valueVariant:
   514  		v.Op = OpARM64LoweredAtomicOr32Variant
   515  		return true
   516  	case OpAtomicOr64value:
   517  		v.Op = OpARM64LoweredAtomicOr64
   518  		return true
   519  	case OpAtomicOr64valueVariant:
   520  		v.Op = OpARM64LoweredAtomicOr64Variant
   521  		return true
   522  	case OpAtomicOr8value:
   523  		v.Op = OpARM64LoweredAtomicOr8
   524  		return true
   525  	case OpAtomicOr8valueVariant:
   526  		v.Op = OpARM64LoweredAtomicOr8Variant
   527  		return true
   528  	case OpAtomicStore32:
   529  		v.Op = OpARM64STLRW
   530  		return true
   531  	case OpAtomicStore64:
   532  		v.Op = OpARM64STLR
   533  		return true
   534  	case OpAtomicStore8:
   535  		v.Op = OpARM64STLRB
   536  		return true
   537  	case OpAtomicStorePtrNoWB:
   538  		v.Op = OpARM64STLR
   539  		return true
   540  	case OpAvg64u:
   541  		return rewriteValueARM64_OpAvg64u(v)
   542  	case OpBitLen16:
   543  		return rewriteValueARM64_OpBitLen16(v)
   544  	case OpBitLen32:
   545  		return rewriteValueARM64_OpBitLen32(v)
   546  	case OpBitLen64:
   547  		return rewriteValueARM64_OpBitLen64(v)
   548  	case OpBitLen8:
   549  		return rewriteValueARM64_OpBitLen8(v)
   550  	case OpBitRev16:
   551  		return rewriteValueARM64_OpBitRev16(v)
   552  	case OpBitRev32:
   553  		v.Op = OpARM64RBITW
   554  		return true
   555  	case OpBitRev64:
   556  		v.Op = OpARM64RBIT
   557  		return true
   558  	case OpBitRev8:
   559  		return rewriteValueARM64_OpBitRev8(v)
   560  	case OpBswap16:
   561  		v.Op = OpARM64REV16W
   562  		return true
   563  	case OpBswap32:
   564  		v.Op = OpARM64REVW
   565  		return true
   566  	case OpBswap64:
   567  		v.Op = OpARM64REV
   568  		return true
   569  	case OpCeil:
   570  		v.Op = OpARM64FRINTPD
   571  		return true
   572  	case OpClosureCall:
   573  		v.Op = OpARM64CALLclosure
   574  		return true
   575  	case OpCom16:
   576  		v.Op = OpARM64MVN
   577  		return true
   578  	case OpCom32:
   579  		v.Op = OpARM64MVN
   580  		return true
   581  	case OpCom64:
   582  		v.Op = OpARM64MVN
   583  		return true
   584  	case OpCom8:
   585  		v.Op = OpARM64MVN
   586  		return true
   587  	case OpCondSelect:
   588  		return rewriteValueARM64_OpCondSelect(v)
   589  	case OpConst16:
   590  		return rewriteValueARM64_OpConst16(v)
   591  	case OpConst32:
   592  		return rewriteValueARM64_OpConst32(v)
   593  	case OpConst32F:
   594  		return rewriteValueARM64_OpConst32F(v)
   595  	case OpConst64:
   596  		return rewriteValueARM64_OpConst64(v)
   597  	case OpConst64F:
   598  		return rewriteValueARM64_OpConst64F(v)
   599  	case OpConst8:
   600  		return rewriteValueARM64_OpConst8(v)
   601  	case OpConstBool:
   602  		return rewriteValueARM64_OpConstBool(v)
   603  	case OpConstNil:
   604  		return rewriteValueARM64_OpConstNil(v)
   605  	case OpCtz16:
   606  		return rewriteValueARM64_OpCtz16(v)
   607  	case OpCtz16NonZero:
   608  		v.Op = OpCtz32
   609  		return true
   610  	case OpCtz32:
   611  		return rewriteValueARM64_OpCtz32(v)
   612  	case OpCtz32NonZero:
   613  		v.Op = OpCtz32
   614  		return true
   615  	case OpCtz64:
   616  		return rewriteValueARM64_OpCtz64(v)
   617  	case OpCtz64NonZero:
   618  		v.Op = OpCtz64
   619  		return true
   620  	case OpCtz8:
   621  		return rewriteValueARM64_OpCtz8(v)
   622  	case OpCtz8NonZero:
   623  		v.Op = OpCtz32
   624  		return true
   625  	case OpCvt32Fto32:
   626  		v.Op = OpARM64FCVTZSSW
   627  		return true
   628  	case OpCvt32Fto32U:
   629  		v.Op = OpARM64FCVTZUSW
   630  		return true
   631  	case OpCvt32Fto64:
   632  		v.Op = OpARM64FCVTZSS
   633  		return true
   634  	case OpCvt32Fto64F:
   635  		v.Op = OpARM64FCVTSD
   636  		return true
   637  	case OpCvt32Fto64U:
   638  		v.Op = OpARM64FCVTZUS
   639  		return true
   640  	case OpCvt32Uto32F:
   641  		v.Op = OpARM64UCVTFWS
   642  		return true
   643  	case OpCvt32Uto64F:
   644  		v.Op = OpARM64UCVTFWD
   645  		return true
   646  	case OpCvt32to32F:
   647  		v.Op = OpARM64SCVTFWS
   648  		return true
   649  	case OpCvt32to64F:
   650  		v.Op = OpARM64SCVTFWD
   651  		return true
   652  	case OpCvt64Fto32:
   653  		v.Op = OpARM64FCVTZSDW
   654  		return true
   655  	case OpCvt64Fto32F:
   656  		v.Op = OpARM64FCVTDS
   657  		return true
   658  	case OpCvt64Fto32U:
   659  		v.Op = OpARM64FCVTZUDW
   660  		return true
   661  	case OpCvt64Fto64:
   662  		v.Op = OpARM64FCVTZSD
   663  		return true
   664  	case OpCvt64Fto64U:
   665  		v.Op = OpARM64FCVTZUD
   666  		return true
   667  	case OpCvt64Uto32F:
   668  		v.Op = OpARM64UCVTFS
   669  		return true
   670  	case OpCvt64Uto64F:
   671  		v.Op = OpARM64UCVTFD
   672  		return true
   673  	case OpCvt64to32F:
   674  		v.Op = OpARM64SCVTFS
   675  		return true
   676  	case OpCvt64to64F:
   677  		v.Op = OpARM64SCVTFD
   678  		return true
   679  	case OpCvtBoolToUint8:
   680  		v.Op = OpCopy
   681  		return true
   682  	case OpDiv16:
   683  		return rewriteValueARM64_OpDiv16(v)
   684  	case OpDiv16u:
   685  		return rewriteValueARM64_OpDiv16u(v)
   686  	case OpDiv32:
   687  		return rewriteValueARM64_OpDiv32(v)
   688  	case OpDiv32F:
   689  		v.Op = OpARM64FDIVS
   690  		return true
   691  	case OpDiv32u:
   692  		v.Op = OpARM64UDIVW
   693  		return true
   694  	case OpDiv64:
   695  		return rewriteValueARM64_OpDiv64(v)
   696  	case OpDiv64F:
   697  		v.Op = OpARM64FDIVD
   698  		return true
   699  	case OpDiv64u:
   700  		v.Op = OpARM64UDIV
   701  		return true
   702  	case OpDiv8:
   703  		return rewriteValueARM64_OpDiv8(v)
   704  	case OpDiv8u:
   705  		return rewriteValueARM64_OpDiv8u(v)
   706  	case OpEq16:
   707  		return rewriteValueARM64_OpEq16(v)
   708  	case OpEq32:
   709  		return rewriteValueARM64_OpEq32(v)
   710  	case OpEq32F:
   711  		return rewriteValueARM64_OpEq32F(v)
   712  	case OpEq64:
   713  		return rewriteValueARM64_OpEq64(v)
   714  	case OpEq64F:
   715  		return rewriteValueARM64_OpEq64F(v)
   716  	case OpEq8:
   717  		return rewriteValueARM64_OpEq8(v)
   718  	case OpEqB:
   719  		return rewriteValueARM64_OpEqB(v)
   720  	case OpEqPtr:
   721  		return rewriteValueARM64_OpEqPtr(v)
   722  	case OpFMA:
   723  		return rewriteValueARM64_OpFMA(v)
   724  	case OpFloor:
   725  		v.Op = OpARM64FRINTMD
   726  		return true
   727  	case OpGetCallerPC:
   728  		v.Op = OpARM64LoweredGetCallerPC
   729  		return true
   730  	case OpGetCallerSP:
   731  		v.Op = OpARM64LoweredGetCallerSP
   732  		return true
   733  	case OpGetClosurePtr:
   734  		v.Op = OpARM64LoweredGetClosurePtr
   735  		return true
   736  	case OpHmul32:
   737  		return rewriteValueARM64_OpHmul32(v)
   738  	case OpHmul32u:
   739  		return rewriteValueARM64_OpHmul32u(v)
   740  	case OpHmul64:
   741  		v.Op = OpARM64MULH
   742  		return true
   743  	case OpHmul64u:
   744  		v.Op = OpARM64UMULH
   745  		return true
   746  	case OpInterCall:
   747  		v.Op = OpARM64CALLinter
   748  		return true
   749  	case OpIsInBounds:
   750  		return rewriteValueARM64_OpIsInBounds(v)
   751  	case OpIsNonNil:
   752  		return rewriteValueARM64_OpIsNonNil(v)
   753  	case OpIsSliceInBounds:
   754  		return rewriteValueARM64_OpIsSliceInBounds(v)
   755  	case OpLeq16:
   756  		return rewriteValueARM64_OpLeq16(v)
   757  	case OpLeq16U:
   758  		return rewriteValueARM64_OpLeq16U(v)
   759  	case OpLeq32:
   760  		return rewriteValueARM64_OpLeq32(v)
   761  	case OpLeq32F:
   762  		return rewriteValueARM64_OpLeq32F(v)
   763  	case OpLeq32U:
   764  		return rewriteValueARM64_OpLeq32U(v)
   765  	case OpLeq64:
   766  		return rewriteValueARM64_OpLeq64(v)
   767  	case OpLeq64F:
   768  		return rewriteValueARM64_OpLeq64F(v)
   769  	case OpLeq64U:
   770  		return rewriteValueARM64_OpLeq64U(v)
   771  	case OpLeq8:
   772  		return rewriteValueARM64_OpLeq8(v)
   773  	case OpLeq8U:
   774  		return rewriteValueARM64_OpLeq8U(v)
   775  	case OpLess16:
   776  		return rewriteValueARM64_OpLess16(v)
   777  	case OpLess16U:
   778  		return rewriteValueARM64_OpLess16U(v)
   779  	case OpLess32:
   780  		return rewriteValueARM64_OpLess32(v)
   781  	case OpLess32F:
   782  		return rewriteValueARM64_OpLess32F(v)
   783  	case OpLess32U:
   784  		return rewriteValueARM64_OpLess32U(v)
   785  	case OpLess64:
   786  		return rewriteValueARM64_OpLess64(v)
   787  	case OpLess64F:
   788  		return rewriteValueARM64_OpLess64F(v)
   789  	case OpLess64U:
   790  		return rewriteValueARM64_OpLess64U(v)
   791  	case OpLess8:
   792  		return rewriteValueARM64_OpLess8(v)
   793  	case OpLess8U:
   794  		return rewriteValueARM64_OpLess8U(v)
   795  	case OpLoad:
   796  		return rewriteValueARM64_OpLoad(v)
   797  	case OpLocalAddr:
   798  		return rewriteValueARM64_OpLocalAddr(v)
   799  	case OpLsh16x16:
   800  		return rewriteValueARM64_OpLsh16x16(v)
   801  	case OpLsh16x32:
   802  		return rewriteValueARM64_OpLsh16x32(v)
   803  	case OpLsh16x64:
   804  		return rewriteValueARM64_OpLsh16x64(v)
   805  	case OpLsh16x8:
   806  		return rewriteValueARM64_OpLsh16x8(v)
   807  	case OpLsh32x16:
   808  		return rewriteValueARM64_OpLsh32x16(v)
   809  	case OpLsh32x32:
   810  		return rewriteValueARM64_OpLsh32x32(v)
   811  	case OpLsh32x64:
   812  		return rewriteValueARM64_OpLsh32x64(v)
   813  	case OpLsh32x8:
   814  		return rewriteValueARM64_OpLsh32x8(v)
   815  	case OpLsh64x16:
   816  		return rewriteValueARM64_OpLsh64x16(v)
   817  	case OpLsh64x32:
   818  		return rewriteValueARM64_OpLsh64x32(v)
   819  	case OpLsh64x64:
   820  		return rewriteValueARM64_OpLsh64x64(v)
   821  	case OpLsh64x8:
   822  		return rewriteValueARM64_OpLsh64x8(v)
   823  	case OpLsh8x16:
   824  		return rewriteValueARM64_OpLsh8x16(v)
   825  	case OpLsh8x32:
   826  		return rewriteValueARM64_OpLsh8x32(v)
   827  	case OpLsh8x64:
   828  		return rewriteValueARM64_OpLsh8x64(v)
   829  	case OpLsh8x8:
   830  		return rewriteValueARM64_OpLsh8x8(v)
   831  	case OpMax32F:
   832  		v.Op = OpARM64FMAXS
   833  		return true
   834  	case OpMax64F:
   835  		v.Op = OpARM64FMAXD
   836  		return true
   837  	case OpMin32F:
   838  		v.Op = OpARM64FMINS
   839  		return true
   840  	case OpMin64F:
   841  		v.Op = OpARM64FMIND
   842  		return true
   843  	case OpMod16:
   844  		return rewriteValueARM64_OpMod16(v)
   845  	case OpMod16u:
   846  		return rewriteValueARM64_OpMod16u(v)
   847  	case OpMod32:
   848  		return rewriteValueARM64_OpMod32(v)
   849  	case OpMod32u:
   850  		v.Op = OpARM64UMODW
   851  		return true
   852  	case OpMod64:
   853  		return rewriteValueARM64_OpMod64(v)
   854  	case OpMod64u:
   855  		v.Op = OpARM64UMOD
   856  		return true
   857  	case OpMod8:
   858  		return rewriteValueARM64_OpMod8(v)
   859  	case OpMod8u:
   860  		return rewriteValueARM64_OpMod8u(v)
   861  	case OpMove:
   862  		return rewriteValueARM64_OpMove(v)
   863  	case OpMul16:
   864  		v.Op = OpARM64MULW
   865  		return true
   866  	case OpMul32:
   867  		v.Op = OpARM64MULW
   868  		return true
   869  	case OpMul32F:
   870  		v.Op = OpARM64FMULS
   871  		return true
   872  	case OpMul64:
   873  		v.Op = OpARM64MUL
   874  		return true
   875  	case OpMul64F:
   876  		v.Op = OpARM64FMULD
   877  		return true
   878  	case OpMul8:
   879  		v.Op = OpARM64MULW
   880  		return true
   881  	case OpNeg16:
   882  		v.Op = OpARM64NEG
   883  		return true
   884  	case OpNeg32:
   885  		v.Op = OpARM64NEG
   886  		return true
   887  	case OpNeg32F:
   888  		v.Op = OpARM64FNEGS
   889  		return true
   890  	case OpNeg64:
   891  		v.Op = OpARM64NEG
   892  		return true
   893  	case OpNeg64F:
   894  		v.Op = OpARM64FNEGD
   895  		return true
   896  	case OpNeg8:
   897  		v.Op = OpARM64NEG
   898  		return true
   899  	case OpNeq16:
   900  		return rewriteValueARM64_OpNeq16(v)
   901  	case OpNeq32:
   902  		return rewriteValueARM64_OpNeq32(v)
   903  	case OpNeq32F:
   904  		return rewriteValueARM64_OpNeq32F(v)
   905  	case OpNeq64:
   906  		return rewriteValueARM64_OpNeq64(v)
   907  	case OpNeq64F:
   908  		return rewriteValueARM64_OpNeq64F(v)
   909  	case OpNeq8:
   910  		return rewriteValueARM64_OpNeq8(v)
   911  	case OpNeqB:
   912  		v.Op = OpARM64XOR
   913  		return true
   914  	case OpNeqPtr:
   915  		return rewriteValueARM64_OpNeqPtr(v)
   916  	case OpNilCheck:
   917  		v.Op = OpARM64LoweredNilCheck
   918  		return true
   919  	case OpNot:
   920  		return rewriteValueARM64_OpNot(v)
   921  	case OpOffPtr:
   922  		return rewriteValueARM64_OpOffPtr(v)
   923  	case OpOr16:
   924  		v.Op = OpARM64OR
   925  		return true
   926  	case OpOr32:
   927  		v.Op = OpARM64OR
   928  		return true
   929  	case OpOr64:
   930  		v.Op = OpARM64OR
   931  		return true
   932  	case OpOr8:
   933  		v.Op = OpARM64OR
   934  		return true
   935  	case OpOrB:
   936  		v.Op = OpARM64OR
   937  		return true
   938  	case OpPanicBounds:
   939  		return rewriteValueARM64_OpPanicBounds(v)
   940  	case OpPopCount16:
   941  		return rewriteValueARM64_OpPopCount16(v)
   942  	case OpPopCount32:
   943  		return rewriteValueARM64_OpPopCount32(v)
   944  	case OpPopCount64:
   945  		return rewriteValueARM64_OpPopCount64(v)
   946  	case OpPrefetchCache:
   947  		return rewriteValueARM64_OpPrefetchCache(v)
   948  	case OpPrefetchCacheStreamed:
   949  		return rewriteValueARM64_OpPrefetchCacheStreamed(v)
   950  	case OpPubBarrier:
   951  		return rewriteValueARM64_OpPubBarrier(v)
   952  	case OpRotateLeft16:
   953  		return rewriteValueARM64_OpRotateLeft16(v)
   954  	case OpRotateLeft32:
   955  		return rewriteValueARM64_OpRotateLeft32(v)
   956  	case OpRotateLeft64:
   957  		return rewriteValueARM64_OpRotateLeft64(v)
   958  	case OpRotateLeft8:
   959  		return rewriteValueARM64_OpRotateLeft8(v)
   960  	case OpRound:
   961  		v.Op = OpARM64FRINTAD
   962  		return true
   963  	case OpRound32F:
   964  		v.Op = OpARM64LoweredRound32F
   965  		return true
   966  	case OpRound64F:
   967  		v.Op = OpARM64LoweredRound64F
   968  		return true
   969  	case OpRoundToEven:
   970  		v.Op = OpARM64FRINTND
   971  		return true
   972  	case OpRsh16Ux16:
   973  		return rewriteValueARM64_OpRsh16Ux16(v)
   974  	case OpRsh16Ux32:
   975  		return rewriteValueARM64_OpRsh16Ux32(v)
   976  	case OpRsh16Ux64:
   977  		return rewriteValueARM64_OpRsh16Ux64(v)
   978  	case OpRsh16Ux8:
   979  		return rewriteValueARM64_OpRsh16Ux8(v)
   980  	case OpRsh16x16:
   981  		return rewriteValueARM64_OpRsh16x16(v)
   982  	case OpRsh16x32:
   983  		return rewriteValueARM64_OpRsh16x32(v)
   984  	case OpRsh16x64:
   985  		return rewriteValueARM64_OpRsh16x64(v)
   986  	case OpRsh16x8:
   987  		return rewriteValueARM64_OpRsh16x8(v)
   988  	case OpRsh32Ux16:
   989  		return rewriteValueARM64_OpRsh32Ux16(v)
   990  	case OpRsh32Ux32:
   991  		return rewriteValueARM64_OpRsh32Ux32(v)
   992  	case OpRsh32Ux64:
   993  		return rewriteValueARM64_OpRsh32Ux64(v)
   994  	case OpRsh32Ux8:
   995  		return rewriteValueARM64_OpRsh32Ux8(v)
   996  	case OpRsh32x16:
   997  		return rewriteValueARM64_OpRsh32x16(v)
   998  	case OpRsh32x32:
   999  		return rewriteValueARM64_OpRsh32x32(v)
  1000  	case OpRsh32x64:
  1001  		return rewriteValueARM64_OpRsh32x64(v)
  1002  	case OpRsh32x8:
  1003  		return rewriteValueARM64_OpRsh32x8(v)
  1004  	case OpRsh64Ux16:
  1005  		return rewriteValueARM64_OpRsh64Ux16(v)
  1006  	case OpRsh64Ux32:
  1007  		return rewriteValueARM64_OpRsh64Ux32(v)
  1008  	case OpRsh64Ux64:
  1009  		return rewriteValueARM64_OpRsh64Ux64(v)
  1010  	case OpRsh64Ux8:
  1011  		return rewriteValueARM64_OpRsh64Ux8(v)
  1012  	case OpRsh64x16:
  1013  		return rewriteValueARM64_OpRsh64x16(v)
  1014  	case OpRsh64x32:
  1015  		return rewriteValueARM64_OpRsh64x32(v)
  1016  	case OpRsh64x64:
  1017  		return rewriteValueARM64_OpRsh64x64(v)
  1018  	case OpRsh64x8:
  1019  		return rewriteValueARM64_OpRsh64x8(v)
  1020  	case OpRsh8Ux16:
  1021  		return rewriteValueARM64_OpRsh8Ux16(v)
  1022  	case OpRsh8Ux32:
  1023  		return rewriteValueARM64_OpRsh8Ux32(v)
  1024  	case OpRsh8Ux64:
  1025  		return rewriteValueARM64_OpRsh8Ux64(v)
  1026  	case OpRsh8Ux8:
  1027  		return rewriteValueARM64_OpRsh8Ux8(v)
  1028  	case OpRsh8x16:
  1029  		return rewriteValueARM64_OpRsh8x16(v)
  1030  	case OpRsh8x32:
  1031  		return rewriteValueARM64_OpRsh8x32(v)
  1032  	case OpRsh8x64:
  1033  		return rewriteValueARM64_OpRsh8x64(v)
  1034  	case OpRsh8x8:
  1035  		return rewriteValueARM64_OpRsh8x8(v)
  1036  	case OpSelect0:
  1037  		return rewriteValueARM64_OpSelect0(v)
  1038  	case OpSelect1:
  1039  		return rewriteValueARM64_OpSelect1(v)
  1040  	case OpSelectN:
  1041  		return rewriteValueARM64_OpSelectN(v)
  1042  	case OpSignExt16to32:
  1043  		v.Op = OpARM64MOVHreg
  1044  		return true
  1045  	case OpSignExt16to64:
  1046  		v.Op = OpARM64MOVHreg
  1047  		return true
  1048  	case OpSignExt32to64:
  1049  		v.Op = OpARM64MOVWreg
  1050  		return true
  1051  	case OpSignExt8to16:
  1052  		v.Op = OpARM64MOVBreg
  1053  		return true
  1054  	case OpSignExt8to32:
  1055  		v.Op = OpARM64MOVBreg
  1056  		return true
  1057  	case OpSignExt8to64:
  1058  		v.Op = OpARM64MOVBreg
  1059  		return true
  1060  	case OpSlicemask:
  1061  		return rewriteValueARM64_OpSlicemask(v)
  1062  	case OpSqrt:
  1063  		v.Op = OpARM64FSQRTD
  1064  		return true
  1065  	case OpSqrt32:
  1066  		v.Op = OpARM64FSQRTS
  1067  		return true
  1068  	case OpStaticCall:
  1069  		v.Op = OpARM64CALLstatic
  1070  		return true
  1071  	case OpStore:
  1072  		return rewriteValueARM64_OpStore(v)
  1073  	case OpSub16:
  1074  		v.Op = OpARM64SUB
  1075  		return true
  1076  	case OpSub32:
  1077  		v.Op = OpARM64SUB
  1078  		return true
  1079  	case OpSub32F:
  1080  		v.Op = OpARM64FSUBS
  1081  		return true
  1082  	case OpSub64:
  1083  		v.Op = OpARM64SUB
  1084  		return true
  1085  	case OpSub64F:
  1086  		v.Op = OpARM64FSUBD
  1087  		return true
  1088  	case OpSub8:
  1089  		v.Op = OpARM64SUB
  1090  		return true
  1091  	case OpSubPtr:
  1092  		v.Op = OpARM64SUB
  1093  		return true
  1094  	case OpTailCall:
  1095  		v.Op = OpARM64CALLtail
  1096  		return true
  1097  	case OpTrunc:
  1098  		v.Op = OpARM64FRINTZD
  1099  		return true
  1100  	case OpTrunc16to8:
  1101  		v.Op = OpCopy
  1102  		return true
  1103  	case OpTrunc32to16:
  1104  		v.Op = OpCopy
  1105  		return true
  1106  	case OpTrunc32to8:
  1107  		v.Op = OpCopy
  1108  		return true
  1109  	case OpTrunc64to16:
  1110  		v.Op = OpCopy
  1111  		return true
  1112  	case OpTrunc64to32:
  1113  		v.Op = OpCopy
  1114  		return true
  1115  	case OpTrunc64to8:
  1116  		v.Op = OpCopy
  1117  		return true
  1118  	case OpWB:
  1119  		v.Op = OpARM64LoweredWB
  1120  		return true
  1121  	case OpXor16:
  1122  		v.Op = OpARM64XOR
  1123  		return true
  1124  	case OpXor32:
  1125  		v.Op = OpARM64XOR
  1126  		return true
  1127  	case OpXor64:
  1128  		v.Op = OpARM64XOR
  1129  		return true
  1130  	case OpXor8:
  1131  		v.Op = OpARM64XOR
  1132  		return true
  1133  	case OpZero:
  1134  		return rewriteValueARM64_OpZero(v)
  1135  	case OpZeroExt16to32:
  1136  		v.Op = OpARM64MOVHUreg
  1137  		return true
  1138  	case OpZeroExt16to64:
  1139  		v.Op = OpARM64MOVHUreg
  1140  		return true
  1141  	case OpZeroExt32to64:
  1142  		v.Op = OpARM64MOVWUreg
  1143  		return true
  1144  	case OpZeroExt8to16:
  1145  		v.Op = OpARM64MOVBUreg
  1146  		return true
  1147  	case OpZeroExt8to32:
  1148  		v.Op = OpARM64MOVBUreg
  1149  		return true
  1150  	case OpZeroExt8to64:
  1151  		v.Op = OpARM64MOVBUreg
  1152  		return true
  1153  	}
  1154  	return false
  1155  }
  1156  func rewriteValueARM64_OpARM64ADCSflags(v *Value) bool {
  1157  	v_2 := v.Args[2]
  1158  	v_1 := v.Args[1]
  1159  	v_0 := v.Args[0]
  1160  	b := v.Block
  1161  	typ := &b.Func.Config.Types
  1162  	// match: (ADCSflags x y (Select1 <types.TypeFlags> (ADDSconstflags [-1] (ADCzerocarry <typ.UInt64> c))))
  1163  	// result: (ADCSflags x y c)
  1164  	for {
  1165  		x := v_0
  1166  		y := v_1
  1167  		if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
  1168  			break
  1169  		}
  1170  		v_2_0 := v_2.Args[0]
  1171  		if v_2_0.Op != OpARM64ADDSconstflags || auxIntToInt64(v_2_0.AuxInt) != -1 {
  1172  			break
  1173  		}
  1174  		v_2_0_0 := v_2_0.Args[0]
  1175  		if v_2_0_0.Op != OpARM64ADCzerocarry || v_2_0_0.Type != typ.UInt64 {
  1176  			break
  1177  		}
  1178  		c := v_2_0_0.Args[0]
  1179  		v.reset(OpARM64ADCSflags)
  1180  		v.AddArg3(x, y, c)
  1181  		return true
  1182  	}
  1183  	// match: (ADCSflags x y (Select1 <types.TypeFlags> (ADDSconstflags [-1] (MOVDconst [0]))))
  1184  	// result: (ADDSflags x y)
  1185  	for {
  1186  		x := v_0
  1187  		y := v_1
  1188  		if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
  1189  			break
  1190  		}
  1191  		v_2_0 := v_2.Args[0]
  1192  		if v_2_0.Op != OpARM64ADDSconstflags || auxIntToInt64(v_2_0.AuxInt) != -1 {
  1193  			break
  1194  		}
  1195  		v_2_0_0 := v_2_0.Args[0]
  1196  		if v_2_0_0.Op != OpARM64MOVDconst || auxIntToInt64(v_2_0_0.AuxInt) != 0 {
  1197  			break
  1198  		}
  1199  		v.reset(OpARM64ADDSflags)
  1200  		v.AddArg2(x, y)
  1201  		return true
  1202  	}
  1203  	return false
  1204  }
  1205  func rewriteValueARM64_OpARM64ADD(v *Value) bool {
  1206  	v_1 := v.Args[1]
  1207  	v_0 := v.Args[0]
  1208  	b := v.Block
  1209  	// match: (ADD x (MOVDconst <t> [c]))
  1210  	// cond: !t.IsPtr()
  1211  	// result: (ADDconst [c] x)
  1212  	for {
  1213  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1214  			x := v_0
  1215  			if v_1.Op != OpARM64MOVDconst {
  1216  				continue
  1217  			}
  1218  			t := v_1.Type
  1219  			c := auxIntToInt64(v_1.AuxInt)
  1220  			if !(!t.IsPtr()) {
  1221  				continue
  1222  			}
  1223  			v.reset(OpARM64ADDconst)
  1224  			v.AuxInt = int64ToAuxInt(c)
  1225  			v.AddArg(x)
  1226  			return true
  1227  		}
  1228  		break
  1229  	}
  1230  	// match: (ADD a l:(MUL x y))
  1231  	// cond: l.Uses==1 && clobber(l)
  1232  	// result: (MADD a x y)
  1233  	for {
  1234  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1235  			a := v_0
  1236  			l := v_1
  1237  			if l.Op != OpARM64MUL {
  1238  				continue
  1239  			}
  1240  			y := l.Args[1]
  1241  			x := l.Args[0]
  1242  			if !(l.Uses == 1 && clobber(l)) {
  1243  				continue
  1244  			}
  1245  			v.reset(OpARM64MADD)
  1246  			v.AddArg3(a, x, y)
  1247  			return true
  1248  		}
  1249  		break
  1250  	}
  1251  	// match: (ADD a l:(MNEG x y))
  1252  	// cond: l.Uses==1 && clobber(l)
  1253  	// result: (MSUB a x y)
  1254  	for {
  1255  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1256  			a := v_0
  1257  			l := v_1
  1258  			if l.Op != OpARM64MNEG {
  1259  				continue
  1260  			}
  1261  			y := l.Args[1]
  1262  			x := l.Args[0]
  1263  			if !(l.Uses == 1 && clobber(l)) {
  1264  				continue
  1265  			}
  1266  			v.reset(OpARM64MSUB)
  1267  			v.AddArg3(a, x, y)
  1268  			return true
  1269  		}
  1270  		break
  1271  	}
  1272  	// match: (ADD a l:(MULW x y))
  1273  	// cond: v.Type.Size() <= 4 && l.Uses==1 && clobber(l)
  1274  	// result: (MADDW a x y)
  1275  	for {
  1276  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1277  			a := v_0
  1278  			l := v_1
  1279  			if l.Op != OpARM64MULW {
  1280  				continue
  1281  			}
  1282  			y := l.Args[1]
  1283  			x := l.Args[0]
  1284  			if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
  1285  				continue
  1286  			}
  1287  			v.reset(OpARM64MADDW)
  1288  			v.AddArg3(a, x, y)
  1289  			return true
  1290  		}
  1291  		break
  1292  	}
  1293  	// match: (ADD a l:(MNEGW x y))
  1294  	// cond: v.Type.Size() <= 4 && l.Uses==1 && clobber(l)
  1295  	// result: (MSUBW a x y)
  1296  	for {
  1297  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1298  			a := v_0
  1299  			l := v_1
  1300  			if l.Op != OpARM64MNEGW {
  1301  				continue
  1302  			}
  1303  			y := l.Args[1]
  1304  			x := l.Args[0]
  1305  			if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
  1306  				continue
  1307  			}
  1308  			v.reset(OpARM64MSUBW)
  1309  			v.AddArg3(a, x, y)
  1310  			return true
  1311  		}
  1312  		break
  1313  	}
  1314  	// match: (ADD <t> a p:(ADDconst [c] m:(MUL _ _)))
  1315  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1316  	// result: (ADDconst [c] (ADD <v.Type> a m))
  1317  	for {
  1318  		t := v.Type
  1319  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1320  			a := v_0
  1321  			p := v_1
  1322  			if p.Op != OpARM64ADDconst {
  1323  				continue
  1324  			}
  1325  			c := auxIntToInt64(p.AuxInt)
  1326  			m := p.Args[0]
  1327  			if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1328  				continue
  1329  			}
  1330  			v.reset(OpARM64ADDconst)
  1331  			v.AuxInt = int64ToAuxInt(c)
  1332  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1333  			v0.AddArg2(a, m)
  1334  			v.AddArg(v0)
  1335  			return true
  1336  		}
  1337  		break
  1338  	}
  1339  	// match: (ADD <t> a p:(ADDconst [c] m:(MULW _ _)))
  1340  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1341  	// result: (ADDconst [c] (ADD <v.Type> a m))
  1342  	for {
  1343  		t := v.Type
  1344  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1345  			a := v_0
  1346  			p := v_1
  1347  			if p.Op != OpARM64ADDconst {
  1348  				continue
  1349  			}
  1350  			c := auxIntToInt64(p.AuxInt)
  1351  			m := p.Args[0]
  1352  			if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1353  				continue
  1354  			}
  1355  			v.reset(OpARM64ADDconst)
  1356  			v.AuxInt = int64ToAuxInt(c)
  1357  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1358  			v0.AddArg2(a, m)
  1359  			v.AddArg(v0)
  1360  			return true
  1361  		}
  1362  		break
  1363  	}
  1364  	// match: (ADD <t> a p:(ADDconst [c] m:(MNEG _ _)))
  1365  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1366  	// result: (ADDconst [c] (ADD <v.Type> a m))
  1367  	for {
  1368  		t := v.Type
  1369  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1370  			a := v_0
  1371  			p := v_1
  1372  			if p.Op != OpARM64ADDconst {
  1373  				continue
  1374  			}
  1375  			c := auxIntToInt64(p.AuxInt)
  1376  			m := p.Args[0]
  1377  			if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1378  				continue
  1379  			}
  1380  			v.reset(OpARM64ADDconst)
  1381  			v.AuxInt = int64ToAuxInt(c)
  1382  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1383  			v0.AddArg2(a, m)
  1384  			v.AddArg(v0)
  1385  			return true
  1386  		}
  1387  		break
  1388  	}
  1389  	// match: (ADD <t> a p:(ADDconst [c] m:(MNEGW _ _)))
  1390  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1391  	// result: (ADDconst [c] (ADD <v.Type> a m))
  1392  	for {
  1393  		t := v.Type
  1394  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1395  			a := v_0
  1396  			p := v_1
  1397  			if p.Op != OpARM64ADDconst {
  1398  				continue
  1399  			}
  1400  			c := auxIntToInt64(p.AuxInt)
  1401  			m := p.Args[0]
  1402  			if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1403  				continue
  1404  			}
  1405  			v.reset(OpARM64ADDconst)
  1406  			v.AuxInt = int64ToAuxInt(c)
  1407  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1408  			v0.AddArg2(a, m)
  1409  			v.AddArg(v0)
  1410  			return true
  1411  		}
  1412  		break
  1413  	}
  1414  	// match: (ADD <t> a p:(SUBconst [c] m:(MUL _ _)))
  1415  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1416  	// result: (SUBconst [c] (ADD <v.Type> a m))
  1417  	for {
  1418  		t := v.Type
  1419  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1420  			a := v_0
  1421  			p := v_1
  1422  			if p.Op != OpARM64SUBconst {
  1423  				continue
  1424  			}
  1425  			c := auxIntToInt64(p.AuxInt)
  1426  			m := p.Args[0]
  1427  			if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1428  				continue
  1429  			}
  1430  			v.reset(OpARM64SUBconst)
  1431  			v.AuxInt = int64ToAuxInt(c)
  1432  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1433  			v0.AddArg2(a, m)
  1434  			v.AddArg(v0)
  1435  			return true
  1436  		}
  1437  		break
  1438  	}
  1439  	// match: (ADD <t> a p:(SUBconst [c] m:(MULW _ _)))
  1440  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1441  	// result: (SUBconst [c] (ADD <v.Type> a m))
  1442  	for {
  1443  		t := v.Type
  1444  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1445  			a := v_0
  1446  			p := v_1
  1447  			if p.Op != OpARM64SUBconst {
  1448  				continue
  1449  			}
  1450  			c := auxIntToInt64(p.AuxInt)
  1451  			m := p.Args[0]
  1452  			if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1453  				continue
  1454  			}
  1455  			v.reset(OpARM64SUBconst)
  1456  			v.AuxInt = int64ToAuxInt(c)
  1457  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1458  			v0.AddArg2(a, m)
  1459  			v.AddArg(v0)
  1460  			return true
  1461  		}
  1462  		break
  1463  	}
  1464  	// match: (ADD <t> a p:(SUBconst [c] m:(MNEG _ _)))
  1465  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1466  	// result: (SUBconst [c] (ADD <v.Type> a m))
  1467  	for {
  1468  		t := v.Type
  1469  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1470  			a := v_0
  1471  			p := v_1
  1472  			if p.Op != OpARM64SUBconst {
  1473  				continue
  1474  			}
  1475  			c := auxIntToInt64(p.AuxInt)
  1476  			m := p.Args[0]
  1477  			if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1478  				continue
  1479  			}
  1480  			v.reset(OpARM64SUBconst)
  1481  			v.AuxInt = int64ToAuxInt(c)
  1482  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1483  			v0.AddArg2(a, m)
  1484  			v.AddArg(v0)
  1485  			return true
  1486  		}
  1487  		break
  1488  	}
  1489  	// match: (ADD <t> a p:(SUBconst [c] m:(MNEGW _ _)))
  1490  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1491  	// result: (SUBconst [c] (ADD <v.Type> a m))
  1492  	for {
  1493  		t := v.Type
  1494  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1495  			a := v_0
  1496  			p := v_1
  1497  			if p.Op != OpARM64SUBconst {
  1498  				continue
  1499  			}
  1500  			c := auxIntToInt64(p.AuxInt)
  1501  			m := p.Args[0]
  1502  			if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1503  				continue
  1504  			}
  1505  			v.reset(OpARM64SUBconst)
  1506  			v.AuxInt = int64ToAuxInt(c)
  1507  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1508  			v0.AddArg2(a, m)
  1509  			v.AddArg(v0)
  1510  			return true
  1511  		}
  1512  		break
  1513  	}
  1514  	// match: (ADD x (NEG y))
  1515  	// result: (SUB x y)
  1516  	for {
  1517  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1518  			x := v_0
  1519  			if v_1.Op != OpARM64NEG {
  1520  				continue
  1521  			}
  1522  			y := v_1.Args[0]
  1523  			v.reset(OpARM64SUB)
  1524  			v.AddArg2(x, y)
  1525  			return true
  1526  		}
  1527  		break
  1528  	}
  1529  	// match: (ADD x0 x1:(SLLconst [c] y))
  1530  	// cond: clobberIfDead(x1)
  1531  	// result: (ADDshiftLL x0 y [c])
  1532  	for {
  1533  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1534  			x0 := v_0
  1535  			x1 := v_1
  1536  			if x1.Op != OpARM64SLLconst {
  1537  				continue
  1538  			}
  1539  			c := auxIntToInt64(x1.AuxInt)
  1540  			y := x1.Args[0]
  1541  			if !(clobberIfDead(x1)) {
  1542  				continue
  1543  			}
  1544  			v.reset(OpARM64ADDshiftLL)
  1545  			v.AuxInt = int64ToAuxInt(c)
  1546  			v.AddArg2(x0, y)
  1547  			return true
  1548  		}
  1549  		break
  1550  	}
  1551  	// match: (ADD x0 x1:(SRLconst [c] y))
  1552  	// cond: clobberIfDead(x1)
  1553  	// result: (ADDshiftRL x0 y [c])
  1554  	for {
  1555  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1556  			x0 := v_0
  1557  			x1 := v_1
  1558  			if x1.Op != OpARM64SRLconst {
  1559  				continue
  1560  			}
  1561  			c := auxIntToInt64(x1.AuxInt)
  1562  			y := x1.Args[0]
  1563  			if !(clobberIfDead(x1)) {
  1564  				continue
  1565  			}
  1566  			v.reset(OpARM64ADDshiftRL)
  1567  			v.AuxInt = int64ToAuxInt(c)
  1568  			v.AddArg2(x0, y)
  1569  			return true
  1570  		}
  1571  		break
  1572  	}
  1573  	// match: (ADD x0 x1:(SRAconst [c] y))
  1574  	// cond: clobberIfDead(x1)
  1575  	// result: (ADDshiftRA x0 y [c])
  1576  	for {
  1577  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1578  			x0 := v_0
  1579  			x1 := v_1
  1580  			if x1.Op != OpARM64SRAconst {
  1581  				continue
  1582  			}
  1583  			c := auxIntToInt64(x1.AuxInt)
  1584  			y := x1.Args[0]
  1585  			if !(clobberIfDead(x1)) {
  1586  				continue
  1587  			}
  1588  			v.reset(OpARM64ADDshiftRA)
  1589  			v.AuxInt = int64ToAuxInt(c)
  1590  			v.AddArg2(x0, y)
  1591  			return true
  1592  		}
  1593  		break
  1594  	}
  1595  	return false
  1596  }
  1597  func rewriteValueARM64_OpARM64ADDSflags(v *Value) bool {
  1598  	v_1 := v.Args[1]
  1599  	v_0 := v.Args[0]
  1600  	// match: (ADDSflags x (MOVDconst [c]))
  1601  	// result: (ADDSconstflags [c] x)
  1602  	for {
  1603  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1604  			x := v_0
  1605  			if v_1.Op != OpARM64MOVDconst {
  1606  				continue
  1607  			}
  1608  			c := auxIntToInt64(v_1.AuxInt)
  1609  			v.reset(OpARM64ADDSconstflags)
  1610  			v.AuxInt = int64ToAuxInt(c)
  1611  			v.AddArg(x)
  1612  			return true
  1613  		}
  1614  		break
  1615  	}
  1616  	return false
  1617  }
  1618  func rewriteValueARM64_OpARM64ADDconst(v *Value) bool {
  1619  	v_0 := v.Args[0]
  1620  	// match: (ADDconst [off1] (MOVDaddr [off2] {sym} ptr))
  1621  	// cond: is32Bit(off1+int64(off2))
  1622  	// result: (MOVDaddr [int32(off1)+off2] {sym} ptr)
  1623  	for {
  1624  		off1 := auxIntToInt64(v.AuxInt)
  1625  		if v_0.Op != OpARM64MOVDaddr {
  1626  			break
  1627  		}
  1628  		off2 := auxIntToInt32(v_0.AuxInt)
  1629  		sym := auxToSym(v_0.Aux)
  1630  		ptr := v_0.Args[0]
  1631  		if !(is32Bit(off1 + int64(off2))) {
  1632  			break
  1633  		}
  1634  		v.reset(OpARM64MOVDaddr)
  1635  		v.AuxInt = int32ToAuxInt(int32(off1) + off2)
  1636  		v.Aux = symToAux(sym)
  1637  		v.AddArg(ptr)
  1638  		return true
  1639  	}
  1640  	// match: (ADDconst [c] y)
  1641  	// cond: c < 0
  1642  	// result: (SUBconst [-c] y)
  1643  	for {
  1644  		c := auxIntToInt64(v.AuxInt)
  1645  		y := v_0
  1646  		if !(c < 0) {
  1647  			break
  1648  		}
  1649  		v.reset(OpARM64SUBconst)
  1650  		v.AuxInt = int64ToAuxInt(-c)
  1651  		v.AddArg(y)
  1652  		return true
  1653  	}
  1654  	// match: (ADDconst [0] x)
  1655  	// result: x
  1656  	for {
  1657  		if auxIntToInt64(v.AuxInt) != 0 {
  1658  			break
  1659  		}
  1660  		x := v_0
  1661  		v.copyOf(x)
  1662  		return true
  1663  	}
  1664  	// match: (ADDconst [c] (MOVDconst [d]))
  1665  	// result: (MOVDconst [c+d])
  1666  	for {
  1667  		c := auxIntToInt64(v.AuxInt)
  1668  		if v_0.Op != OpARM64MOVDconst {
  1669  			break
  1670  		}
  1671  		d := auxIntToInt64(v_0.AuxInt)
  1672  		v.reset(OpARM64MOVDconst)
  1673  		v.AuxInt = int64ToAuxInt(c + d)
  1674  		return true
  1675  	}
  1676  	// match: (ADDconst [c] (ADDconst [d] x))
  1677  	// result: (ADDconst [c+d] x)
  1678  	for {
  1679  		c := auxIntToInt64(v.AuxInt)
  1680  		if v_0.Op != OpARM64ADDconst {
  1681  			break
  1682  		}
  1683  		d := auxIntToInt64(v_0.AuxInt)
  1684  		x := v_0.Args[0]
  1685  		v.reset(OpARM64ADDconst)
  1686  		v.AuxInt = int64ToAuxInt(c + d)
  1687  		v.AddArg(x)
  1688  		return true
  1689  	}
  1690  	// match: (ADDconst [c] (SUBconst [d] x))
  1691  	// result: (ADDconst [c-d] x)
  1692  	for {
  1693  		c := auxIntToInt64(v.AuxInt)
  1694  		if v_0.Op != OpARM64SUBconst {
  1695  			break
  1696  		}
  1697  		d := auxIntToInt64(v_0.AuxInt)
  1698  		x := v_0.Args[0]
  1699  		v.reset(OpARM64ADDconst)
  1700  		v.AuxInt = int64ToAuxInt(c - d)
  1701  		v.AddArg(x)
  1702  		return true
  1703  	}
  1704  	return false
  1705  }
  1706  func rewriteValueARM64_OpARM64ADDshiftLL(v *Value) bool {
  1707  	v_1 := v.Args[1]
  1708  	v_0 := v.Args[0]
  1709  	b := v.Block
  1710  	typ := &b.Func.Config.Types
  1711  	// match: (ADDshiftLL (MOVDconst [c]) x [d])
  1712  	// result: (ADDconst [c] (SLLconst <x.Type> x [d]))
  1713  	for {
  1714  		d := auxIntToInt64(v.AuxInt)
  1715  		if v_0.Op != OpARM64MOVDconst {
  1716  			break
  1717  		}
  1718  		c := auxIntToInt64(v_0.AuxInt)
  1719  		x := v_1
  1720  		v.reset(OpARM64ADDconst)
  1721  		v.AuxInt = int64ToAuxInt(c)
  1722  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  1723  		v0.AuxInt = int64ToAuxInt(d)
  1724  		v0.AddArg(x)
  1725  		v.AddArg(v0)
  1726  		return true
  1727  	}
  1728  	// match: (ADDshiftLL x (MOVDconst [c]) [d])
  1729  	// result: (ADDconst x [int64(uint64(c)<<uint64(d))])
  1730  	for {
  1731  		d := auxIntToInt64(v.AuxInt)
  1732  		x := v_0
  1733  		if v_1.Op != OpARM64MOVDconst {
  1734  			break
  1735  		}
  1736  		c := auxIntToInt64(v_1.AuxInt)
  1737  		v.reset(OpARM64ADDconst)
  1738  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
  1739  		v.AddArg(x)
  1740  		return true
  1741  	}
  1742  	// match: (ADDshiftLL <typ.UInt16> [8] (UBFX <typ.UInt16> [armBFAuxInt(8, 8)] x) x)
  1743  	// result: (REV16W x)
  1744  	for {
  1745  		if v.Type != typ.UInt16 || auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64UBFX || v_0.Type != typ.UInt16 || auxIntToArm64BitField(v_0.AuxInt) != armBFAuxInt(8, 8) {
  1746  			break
  1747  		}
  1748  		x := v_0.Args[0]
  1749  		if x != v_1 {
  1750  			break
  1751  		}
  1752  		v.reset(OpARM64REV16W)
  1753  		v.AddArg(x)
  1754  		return true
  1755  	}
  1756  	// match: (ADDshiftLL [8] (UBFX [armBFAuxInt(8, 24)] (ANDconst [c1] x)) (ANDconst [c2] x))
  1757  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
  1758  	// result: (REV16W x)
  1759  	for {
  1760  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64UBFX || auxIntToArm64BitField(v_0.AuxInt) != armBFAuxInt(8, 24) {
  1761  			break
  1762  		}
  1763  		v_0_0 := v_0.Args[0]
  1764  		if v_0_0.Op != OpARM64ANDconst {
  1765  			break
  1766  		}
  1767  		c1 := auxIntToInt64(v_0_0.AuxInt)
  1768  		x := v_0_0.Args[0]
  1769  		if v_1.Op != OpARM64ANDconst {
  1770  			break
  1771  		}
  1772  		c2 := auxIntToInt64(v_1.AuxInt)
  1773  		if x != v_1.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
  1774  			break
  1775  		}
  1776  		v.reset(OpARM64REV16W)
  1777  		v.AddArg(x)
  1778  		return true
  1779  	}
  1780  	// match: (ADDshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
  1781  	// cond: (uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff)
  1782  	// result: (REV16 x)
  1783  	for {
  1784  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
  1785  			break
  1786  		}
  1787  		v_0_0 := v_0.Args[0]
  1788  		if v_0_0.Op != OpARM64ANDconst {
  1789  			break
  1790  		}
  1791  		c1 := auxIntToInt64(v_0_0.AuxInt)
  1792  		x := v_0_0.Args[0]
  1793  		if v_1.Op != OpARM64ANDconst {
  1794  			break
  1795  		}
  1796  		c2 := auxIntToInt64(v_1.AuxInt)
  1797  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
  1798  			break
  1799  		}
  1800  		v.reset(OpARM64REV16)
  1801  		v.AddArg(x)
  1802  		return true
  1803  	}
  1804  	// match: (ADDshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
  1805  	// cond: (uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff)
  1806  	// result: (REV16 (ANDconst <x.Type> [0xffffffff] x))
  1807  	for {
  1808  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
  1809  			break
  1810  		}
  1811  		v_0_0 := v_0.Args[0]
  1812  		if v_0_0.Op != OpARM64ANDconst {
  1813  			break
  1814  		}
  1815  		c1 := auxIntToInt64(v_0_0.AuxInt)
  1816  		x := v_0_0.Args[0]
  1817  		if v_1.Op != OpARM64ANDconst {
  1818  			break
  1819  		}
  1820  		c2 := auxIntToInt64(v_1.AuxInt)
  1821  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
  1822  			break
  1823  		}
  1824  		v.reset(OpARM64REV16)
  1825  		v0 := b.NewValue0(v.Pos, OpARM64ANDconst, x.Type)
  1826  		v0.AuxInt = int64ToAuxInt(0xffffffff)
  1827  		v0.AddArg(x)
  1828  		v.AddArg(v0)
  1829  		return true
  1830  	}
  1831  	// match: (ADDshiftLL [c] (SRLconst x [64-c]) x2)
  1832  	// result: (EXTRconst [64-c] x2 x)
  1833  	for {
  1834  		c := auxIntToInt64(v.AuxInt)
  1835  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 64-c {
  1836  			break
  1837  		}
  1838  		x := v_0.Args[0]
  1839  		x2 := v_1
  1840  		v.reset(OpARM64EXTRconst)
  1841  		v.AuxInt = int64ToAuxInt(64 - c)
  1842  		v.AddArg2(x2, x)
  1843  		return true
  1844  	}
  1845  	// match: (ADDshiftLL <t> [c] (UBFX [bfc] x) x2)
  1846  	// cond: c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)
  1847  	// result: (EXTRWconst [32-c] x2 x)
  1848  	for {
  1849  		t := v.Type
  1850  		c := auxIntToInt64(v.AuxInt)
  1851  		if v_0.Op != OpARM64UBFX {
  1852  			break
  1853  		}
  1854  		bfc := auxIntToArm64BitField(v_0.AuxInt)
  1855  		x := v_0.Args[0]
  1856  		x2 := v_1
  1857  		if !(c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)) {
  1858  			break
  1859  		}
  1860  		v.reset(OpARM64EXTRWconst)
  1861  		v.AuxInt = int64ToAuxInt(32 - c)
  1862  		v.AddArg2(x2, x)
  1863  		return true
  1864  	}
  1865  	return false
  1866  }
  1867  func rewriteValueARM64_OpARM64ADDshiftRA(v *Value) bool {
  1868  	v_1 := v.Args[1]
  1869  	v_0 := v.Args[0]
  1870  	b := v.Block
  1871  	// match: (ADDshiftRA (MOVDconst [c]) x [d])
  1872  	// result: (ADDconst [c] (SRAconst <x.Type> x [d]))
  1873  	for {
  1874  		d := auxIntToInt64(v.AuxInt)
  1875  		if v_0.Op != OpARM64MOVDconst {
  1876  			break
  1877  		}
  1878  		c := auxIntToInt64(v_0.AuxInt)
  1879  		x := v_1
  1880  		v.reset(OpARM64ADDconst)
  1881  		v.AuxInt = int64ToAuxInt(c)
  1882  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
  1883  		v0.AuxInt = int64ToAuxInt(d)
  1884  		v0.AddArg(x)
  1885  		v.AddArg(v0)
  1886  		return true
  1887  	}
  1888  	// match: (ADDshiftRA x (MOVDconst [c]) [d])
  1889  	// result: (ADDconst x [c>>uint64(d)])
  1890  	for {
  1891  		d := auxIntToInt64(v.AuxInt)
  1892  		x := v_0
  1893  		if v_1.Op != OpARM64MOVDconst {
  1894  			break
  1895  		}
  1896  		c := auxIntToInt64(v_1.AuxInt)
  1897  		v.reset(OpARM64ADDconst)
  1898  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
  1899  		v.AddArg(x)
  1900  		return true
  1901  	}
  1902  	return false
  1903  }
  1904  func rewriteValueARM64_OpARM64ADDshiftRL(v *Value) bool {
  1905  	v_1 := v.Args[1]
  1906  	v_0 := v.Args[0]
  1907  	b := v.Block
  1908  	// match: (ADDshiftRL (MOVDconst [c]) x [d])
  1909  	// result: (ADDconst [c] (SRLconst <x.Type> x [d]))
  1910  	for {
  1911  		d := auxIntToInt64(v.AuxInt)
  1912  		if v_0.Op != OpARM64MOVDconst {
  1913  			break
  1914  		}
  1915  		c := auxIntToInt64(v_0.AuxInt)
  1916  		x := v_1
  1917  		v.reset(OpARM64ADDconst)
  1918  		v.AuxInt = int64ToAuxInt(c)
  1919  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
  1920  		v0.AuxInt = int64ToAuxInt(d)
  1921  		v0.AddArg(x)
  1922  		v.AddArg(v0)
  1923  		return true
  1924  	}
  1925  	// match: (ADDshiftRL x (MOVDconst [c]) [d])
  1926  	// result: (ADDconst x [int64(uint64(c)>>uint64(d))])
  1927  	for {
  1928  		d := auxIntToInt64(v.AuxInt)
  1929  		x := v_0
  1930  		if v_1.Op != OpARM64MOVDconst {
  1931  			break
  1932  		}
  1933  		c := auxIntToInt64(v_1.AuxInt)
  1934  		v.reset(OpARM64ADDconst)
  1935  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
  1936  		v.AddArg(x)
  1937  		return true
  1938  	}
  1939  	return false
  1940  }
  1941  func rewriteValueARM64_OpARM64AND(v *Value) bool {
  1942  	v_1 := v.Args[1]
  1943  	v_0 := v.Args[0]
  1944  	// match: (AND x (MOVDconst [c]))
  1945  	// result: (ANDconst [c] x)
  1946  	for {
  1947  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1948  			x := v_0
  1949  			if v_1.Op != OpARM64MOVDconst {
  1950  				continue
  1951  			}
  1952  			c := auxIntToInt64(v_1.AuxInt)
  1953  			v.reset(OpARM64ANDconst)
  1954  			v.AuxInt = int64ToAuxInt(c)
  1955  			v.AddArg(x)
  1956  			return true
  1957  		}
  1958  		break
  1959  	}
  1960  	// match: (AND x x)
  1961  	// result: x
  1962  	for {
  1963  		x := v_0
  1964  		if x != v_1 {
  1965  			break
  1966  		}
  1967  		v.copyOf(x)
  1968  		return true
  1969  	}
  1970  	// match: (AND x (MVN y))
  1971  	// result: (BIC x y)
  1972  	for {
  1973  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1974  			x := v_0
  1975  			if v_1.Op != OpARM64MVN {
  1976  				continue
  1977  			}
  1978  			y := v_1.Args[0]
  1979  			v.reset(OpARM64BIC)
  1980  			v.AddArg2(x, y)
  1981  			return true
  1982  		}
  1983  		break
  1984  	}
  1985  	// match: (AND x0 x1:(SLLconst [c] y))
  1986  	// cond: clobberIfDead(x1)
  1987  	// result: (ANDshiftLL x0 y [c])
  1988  	for {
  1989  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1990  			x0 := v_0
  1991  			x1 := v_1
  1992  			if x1.Op != OpARM64SLLconst {
  1993  				continue
  1994  			}
  1995  			c := auxIntToInt64(x1.AuxInt)
  1996  			y := x1.Args[0]
  1997  			if !(clobberIfDead(x1)) {
  1998  				continue
  1999  			}
  2000  			v.reset(OpARM64ANDshiftLL)
  2001  			v.AuxInt = int64ToAuxInt(c)
  2002  			v.AddArg2(x0, y)
  2003  			return true
  2004  		}
  2005  		break
  2006  	}
  2007  	// match: (AND x0 x1:(SRLconst [c] y))
  2008  	// cond: clobberIfDead(x1)
  2009  	// result: (ANDshiftRL x0 y [c])
  2010  	for {
  2011  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2012  			x0 := v_0
  2013  			x1 := v_1
  2014  			if x1.Op != OpARM64SRLconst {
  2015  				continue
  2016  			}
  2017  			c := auxIntToInt64(x1.AuxInt)
  2018  			y := x1.Args[0]
  2019  			if !(clobberIfDead(x1)) {
  2020  				continue
  2021  			}
  2022  			v.reset(OpARM64ANDshiftRL)
  2023  			v.AuxInt = int64ToAuxInt(c)
  2024  			v.AddArg2(x0, y)
  2025  			return true
  2026  		}
  2027  		break
  2028  	}
  2029  	// match: (AND x0 x1:(SRAconst [c] y))
  2030  	// cond: clobberIfDead(x1)
  2031  	// result: (ANDshiftRA x0 y [c])
  2032  	for {
  2033  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2034  			x0 := v_0
  2035  			x1 := v_1
  2036  			if x1.Op != OpARM64SRAconst {
  2037  				continue
  2038  			}
  2039  			c := auxIntToInt64(x1.AuxInt)
  2040  			y := x1.Args[0]
  2041  			if !(clobberIfDead(x1)) {
  2042  				continue
  2043  			}
  2044  			v.reset(OpARM64ANDshiftRA)
  2045  			v.AuxInt = int64ToAuxInt(c)
  2046  			v.AddArg2(x0, y)
  2047  			return true
  2048  		}
  2049  		break
  2050  	}
  2051  	// match: (AND x0 x1:(RORconst [c] y))
  2052  	// cond: clobberIfDead(x1)
  2053  	// result: (ANDshiftRO x0 y [c])
  2054  	for {
  2055  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2056  			x0 := v_0
  2057  			x1 := v_1
  2058  			if x1.Op != OpARM64RORconst {
  2059  				continue
  2060  			}
  2061  			c := auxIntToInt64(x1.AuxInt)
  2062  			y := x1.Args[0]
  2063  			if !(clobberIfDead(x1)) {
  2064  				continue
  2065  			}
  2066  			v.reset(OpARM64ANDshiftRO)
  2067  			v.AuxInt = int64ToAuxInt(c)
  2068  			v.AddArg2(x0, y)
  2069  			return true
  2070  		}
  2071  		break
  2072  	}
  2073  	return false
  2074  }
  2075  func rewriteValueARM64_OpARM64ANDconst(v *Value) bool {
  2076  	v_0 := v.Args[0]
  2077  	// match: (ANDconst [0] _)
  2078  	// result: (MOVDconst [0])
  2079  	for {
  2080  		if auxIntToInt64(v.AuxInt) != 0 {
  2081  			break
  2082  		}
  2083  		v.reset(OpARM64MOVDconst)
  2084  		v.AuxInt = int64ToAuxInt(0)
  2085  		return true
  2086  	}
  2087  	// match: (ANDconst [-1] x)
  2088  	// result: x
  2089  	for {
  2090  		if auxIntToInt64(v.AuxInt) != -1 {
  2091  			break
  2092  		}
  2093  		x := v_0
  2094  		v.copyOf(x)
  2095  		return true
  2096  	}
  2097  	// match: (ANDconst [c] (MOVDconst [d]))
  2098  	// result: (MOVDconst [c&d])
  2099  	for {
  2100  		c := auxIntToInt64(v.AuxInt)
  2101  		if v_0.Op != OpARM64MOVDconst {
  2102  			break
  2103  		}
  2104  		d := auxIntToInt64(v_0.AuxInt)
  2105  		v.reset(OpARM64MOVDconst)
  2106  		v.AuxInt = int64ToAuxInt(c & d)
  2107  		return true
  2108  	}
  2109  	// match: (ANDconst [c] (ANDconst [d] x))
  2110  	// result: (ANDconst [c&d] x)
  2111  	for {
  2112  		c := auxIntToInt64(v.AuxInt)
  2113  		if v_0.Op != OpARM64ANDconst {
  2114  			break
  2115  		}
  2116  		d := auxIntToInt64(v_0.AuxInt)
  2117  		x := v_0.Args[0]
  2118  		v.reset(OpARM64ANDconst)
  2119  		v.AuxInt = int64ToAuxInt(c & d)
  2120  		v.AddArg(x)
  2121  		return true
  2122  	}
  2123  	// match: (ANDconst [c] (MOVWUreg x))
  2124  	// result: (ANDconst [c&(1<<32-1)] x)
  2125  	for {
  2126  		c := auxIntToInt64(v.AuxInt)
  2127  		if v_0.Op != OpARM64MOVWUreg {
  2128  			break
  2129  		}
  2130  		x := v_0.Args[0]
  2131  		v.reset(OpARM64ANDconst)
  2132  		v.AuxInt = int64ToAuxInt(c & (1<<32 - 1))
  2133  		v.AddArg(x)
  2134  		return true
  2135  	}
  2136  	// match: (ANDconst [c] (MOVHUreg x))
  2137  	// result: (ANDconst [c&(1<<16-1)] x)
  2138  	for {
  2139  		c := auxIntToInt64(v.AuxInt)
  2140  		if v_0.Op != OpARM64MOVHUreg {
  2141  			break
  2142  		}
  2143  		x := v_0.Args[0]
  2144  		v.reset(OpARM64ANDconst)
  2145  		v.AuxInt = int64ToAuxInt(c & (1<<16 - 1))
  2146  		v.AddArg(x)
  2147  		return true
  2148  	}
  2149  	// match: (ANDconst [c] (MOVBUreg x))
  2150  	// result: (ANDconst [c&(1<<8-1)] x)
  2151  	for {
  2152  		c := auxIntToInt64(v.AuxInt)
  2153  		if v_0.Op != OpARM64MOVBUreg {
  2154  			break
  2155  		}
  2156  		x := v_0.Args[0]
  2157  		v.reset(OpARM64ANDconst)
  2158  		v.AuxInt = int64ToAuxInt(c & (1<<8 - 1))
  2159  		v.AddArg(x)
  2160  		return true
  2161  	}
  2162  	// match: (ANDconst [ac] (SLLconst [sc] x))
  2163  	// cond: isARM64BFMask(sc, ac, sc)
  2164  	// result: (UBFIZ [armBFAuxInt(sc, arm64BFWidth(ac, sc))] x)
  2165  	for {
  2166  		ac := auxIntToInt64(v.AuxInt)
  2167  		if v_0.Op != OpARM64SLLconst {
  2168  			break
  2169  		}
  2170  		sc := auxIntToInt64(v_0.AuxInt)
  2171  		x := v_0.Args[0]
  2172  		if !(isARM64BFMask(sc, ac, sc)) {
  2173  			break
  2174  		}
  2175  		v.reset(OpARM64UBFIZ)
  2176  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, sc)))
  2177  		v.AddArg(x)
  2178  		return true
  2179  	}
  2180  	// match: (ANDconst [ac] (SRLconst [sc] x))
  2181  	// cond: isARM64BFMask(sc, ac, 0)
  2182  	// result: (UBFX [armBFAuxInt(sc, arm64BFWidth(ac, 0))] x)
  2183  	for {
  2184  		ac := auxIntToInt64(v.AuxInt)
  2185  		if v_0.Op != OpARM64SRLconst {
  2186  			break
  2187  		}
  2188  		sc := auxIntToInt64(v_0.AuxInt)
  2189  		x := v_0.Args[0]
  2190  		if !(isARM64BFMask(sc, ac, 0)) {
  2191  			break
  2192  		}
  2193  		v.reset(OpARM64UBFX)
  2194  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, 0)))
  2195  		v.AddArg(x)
  2196  		return true
  2197  	}
  2198  	// match: (ANDconst [c] (UBFX [bfc] x))
  2199  	// cond: isARM64BFMask(0, c, 0)
  2200  	// result: (UBFX [armBFAuxInt(bfc.lsb(), min(bfc.width(), arm64BFWidth(c, 0)))] x)
  2201  	for {
  2202  		c := auxIntToInt64(v.AuxInt)
  2203  		if v_0.Op != OpARM64UBFX {
  2204  			break
  2205  		}
  2206  		bfc := auxIntToArm64BitField(v_0.AuxInt)
  2207  		x := v_0.Args[0]
  2208  		if !(isARM64BFMask(0, c, 0)) {
  2209  			break
  2210  		}
  2211  		v.reset(OpARM64UBFX)
  2212  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), arm64BFWidth(c, 0))))
  2213  		v.AddArg(x)
  2214  		return true
  2215  	}
  2216  	return false
  2217  }
  2218  func rewriteValueARM64_OpARM64ANDshiftLL(v *Value) bool {
  2219  	v_1 := v.Args[1]
  2220  	v_0 := v.Args[0]
  2221  	b := v.Block
  2222  	// match: (ANDshiftLL (MOVDconst [c]) x [d])
  2223  	// result: (ANDconst [c] (SLLconst <x.Type> x [d]))
  2224  	for {
  2225  		d := auxIntToInt64(v.AuxInt)
  2226  		if v_0.Op != OpARM64MOVDconst {
  2227  			break
  2228  		}
  2229  		c := auxIntToInt64(v_0.AuxInt)
  2230  		x := v_1
  2231  		v.reset(OpARM64ANDconst)
  2232  		v.AuxInt = int64ToAuxInt(c)
  2233  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  2234  		v0.AuxInt = int64ToAuxInt(d)
  2235  		v0.AddArg(x)
  2236  		v.AddArg(v0)
  2237  		return true
  2238  	}
  2239  	// match: (ANDshiftLL x (MOVDconst [c]) [d])
  2240  	// result: (ANDconst x [int64(uint64(c)<<uint64(d))])
  2241  	for {
  2242  		d := auxIntToInt64(v.AuxInt)
  2243  		x := v_0
  2244  		if v_1.Op != OpARM64MOVDconst {
  2245  			break
  2246  		}
  2247  		c := auxIntToInt64(v_1.AuxInt)
  2248  		v.reset(OpARM64ANDconst)
  2249  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
  2250  		v.AddArg(x)
  2251  		return true
  2252  	}
  2253  	// match: (ANDshiftLL y:(SLLconst x [c]) x [c])
  2254  	// result: y
  2255  	for {
  2256  		c := auxIntToInt64(v.AuxInt)
  2257  		y := v_0
  2258  		if y.Op != OpARM64SLLconst || auxIntToInt64(y.AuxInt) != c {
  2259  			break
  2260  		}
  2261  		x := y.Args[0]
  2262  		if x != v_1 {
  2263  			break
  2264  		}
  2265  		v.copyOf(y)
  2266  		return true
  2267  	}
  2268  	return false
  2269  }
  2270  func rewriteValueARM64_OpARM64ANDshiftRA(v *Value) bool {
  2271  	v_1 := v.Args[1]
  2272  	v_0 := v.Args[0]
  2273  	b := v.Block
  2274  	// match: (ANDshiftRA (MOVDconst [c]) x [d])
  2275  	// result: (ANDconst [c] (SRAconst <x.Type> x [d]))
  2276  	for {
  2277  		d := auxIntToInt64(v.AuxInt)
  2278  		if v_0.Op != OpARM64MOVDconst {
  2279  			break
  2280  		}
  2281  		c := auxIntToInt64(v_0.AuxInt)
  2282  		x := v_1
  2283  		v.reset(OpARM64ANDconst)
  2284  		v.AuxInt = int64ToAuxInt(c)
  2285  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
  2286  		v0.AuxInt = int64ToAuxInt(d)
  2287  		v0.AddArg(x)
  2288  		v.AddArg(v0)
  2289  		return true
  2290  	}
  2291  	// match: (ANDshiftRA x (MOVDconst [c]) [d])
  2292  	// result: (ANDconst x [c>>uint64(d)])
  2293  	for {
  2294  		d := auxIntToInt64(v.AuxInt)
  2295  		x := v_0
  2296  		if v_1.Op != OpARM64MOVDconst {
  2297  			break
  2298  		}
  2299  		c := auxIntToInt64(v_1.AuxInt)
  2300  		v.reset(OpARM64ANDconst)
  2301  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
  2302  		v.AddArg(x)
  2303  		return true
  2304  	}
  2305  	// match: (ANDshiftRA y:(SRAconst x [c]) x [c])
  2306  	// result: y
  2307  	for {
  2308  		c := auxIntToInt64(v.AuxInt)
  2309  		y := v_0
  2310  		if y.Op != OpARM64SRAconst || auxIntToInt64(y.AuxInt) != c {
  2311  			break
  2312  		}
  2313  		x := y.Args[0]
  2314  		if x != v_1 {
  2315  			break
  2316  		}
  2317  		v.copyOf(y)
  2318  		return true
  2319  	}
  2320  	return false
  2321  }
  2322  func rewriteValueARM64_OpARM64ANDshiftRL(v *Value) bool {
  2323  	v_1 := v.Args[1]
  2324  	v_0 := v.Args[0]
  2325  	b := v.Block
  2326  	// match: (ANDshiftRL (MOVDconst [c]) x [d])
  2327  	// result: (ANDconst [c] (SRLconst <x.Type> x [d]))
  2328  	for {
  2329  		d := auxIntToInt64(v.AuxInt)
  2330  		if v_0.Op != OpARM64MOVDconst {
  2331  			break
  2332  		}
  2333  		c := auxIntToInt64(v_0.AuxInt)
  2334  		x := v_1
  2335  		v.reset(OpARM64ANDconst)
  2336  		v.AuxInt = int64ToAuxInt(c)
  2337  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
  2338  		v0.AuxInt = int64ToAuxInt(d)
  2339  		v0.AddArg(x)
  2340  		v.AddArg(v0)
  2341  		return true
  2342  	}
  2343  	// match: (ANDshiftRL x (MOVDconst [c]) [d])
  2344  	// result: (ANDconst x [int64(uint64(c)>>uint64(d))])
  2345  	for {
  2346  		d := auxIntToInt64(v.AuxInt)
  2347  		x := v_0
  2348  		if v_1.Op != OpARM64MOVDconst {
  2349  			break
  2350  		}
  2351  		c := auxIntToInt64(v_1.AuxInt)
  2352  		v.reset(OpARM64ANDconst)
  2353  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
  2354  		v.AddArg(x)
  2355  		return true
  2356  	}
  2357  	// match: (ANDshiftRL y:(SRLconst x [c]) x [c])
  2358  	// result: y
  2359  	for {
  2360  		c := auxIntToInt64(v.AuxInt)
  2361  		y := v_0
  2362  		if y.Op != OpARM64SRLconst || auxIntToInt64(y.AuxInt) != c {
  2363  			break
  2364  		}
  2365  		x := y.Args[0]
  2366  		if x != v_1 {
  2367  			break
  2368  		}
  2369  		v.copyOf(y)
  2370  		return true
  2371  	}
  2372  	return false
  2373  }
  2374  func rewriteValueARM64_OpARM64ANDshiftRO(v *Value) bool {
  2375  	v_1 := v.Args[1]
  2376  	v_0 := v.Args[0]
  2377  	b := v.Block
  2378  	// match: (ANDshiftRO (MOVDconst [c]) x [d])
  2379  	// result: (ANDconst [c] (RORconst <x.Type> x [d]))
  2380  	for {
  2381  		d := auxIntToInt64(v.AuxInt)
  2382  		if v_0.Op != OpARM64MOVDconst {
  2383  			break
  2384  		}
  2385  		c := auxIntToInt64(v_0.AuxInt)
  2386  		x := v_1
  2387  		v.reset(OpARM64ANDconst)
  2388  		v.AuxInt = int64ToAuxInt(c)
  2389  		v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
  2390  		v0.AuxInt = int64ToAuxInt(d)
  2391  		v0.AddArg(x)
  2392  		v.AddArg(v0)
  2393  		return true
  2394  	}
  2395  	// match: (ANDshiftRO x (MOVDconst [c]) [d])
  2396  	// result: (ANDconst x [rotateRight64(c, d)])
  2397  	for {
  2398  		d := auxIntToInt64(v.AuxInt)
  2399  		x := v_0
  2400  		if v_1.Op != OpARM64MOVDconst {
  2401  			break
  2402  		}
  2403  		c := auxIntToInt64(v_1.AuxInt)
  2404  		v.reset(OpARM64ANDconst)
  2405  		v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
  2406  		v.AddArg(x)
  2407  		return true
  2408  	}
  2409  	// match: (ANDshiftRO y:(RORconst x [c]) x [c])
  2410  	// result: y
  2411  	for {
  2412  		c := auxIntToInt64(v.AuxInt)
  2413  		y := v_0
  2414  		if y.Op != OpARM64RORconst || auxIntToInt64(y.AuxInt) != c {
  2415  			break
  2416  		}
  2417  		x := y.Args[0]
  2418  		if x != v_1 {
  2419  			break
  2420  		}
  2421  		v.copyOf(y)
  2422  		return true
  2423  	}
  2424  	return false
  2425  }
  2426  func rewriteValueARM64_OpARM64BIC(v *Value) bool {
  2427  	v_1 := v.Args[1]
  2428  	v_0 := v.Args[0]
  2429  	// match: (BIC x (MOVDconst [c]))
  2430  	// result: (ANDconst [^c] x)
  2431  	for {
  2432  		x := v_0
  2433  		if v_1.Op != OpARM64MOVDconst {
  2434  			break
  2435  		}
  2436  		c := auxIntToInt64(v_1.AuxInt)
  2437  		v.reset(OpARM64ANDconst)
  2438  		v.AuxInt = int64ToAuxInt(^c)
  2439  		v.AddArg(x)
  2440  		return true
  2441  	}
  2442  	// match: (BIC x x)
  2443  	// result: (MOVDconst [0])
  2444  	for {
  2445  		x := v_0
  2446  		if x != v_1 {
  2447  			break
  2448  		}
  2449  		v.reset(OpARM64MOVDconst)
  2450  		v.AuxInt = int64ToAuxInt(0)
  2451  		return true
  2452  	}
  2453  	// match: (BIC x0 x1:(SLLconst [c] y))
  2454  	// cond: clobberIfDead(x1)
  2455  	// result: (BICshiftLL x0 y [c])
  2456  	for {
  2457  		x0 := v_0
  2458  		x1 := v_1
  2459  		if x1.Op != OpARM64SLLconst {
  2460  			break
  2461  		}
  2462  		c := auxIntToInt64(x1.AuxInt)
  2463  		y := x1.Args[0]
  2464  		if !(clobberIfDead(x1)) {
  2465  			break
  2466  		}
  2467  		v.reset(OpARM64BICshiftLL)
  2468  		v.AuxInt = int64ToAuxInt(c)
  2469  		v.AddArg2(x0, y)
  2470  		return true
  2471  	}
  2472  	// match: (BIC x0 x1:(SRLconst [c] y))
  2473  	// cond: clobberIfDead(x1)
  2474  	// result: (BICshiftRL x0 y [c])
  2475  	for {
  2476  		x0 := v_0
  2477  		x1 := v_1
  2478  		if x1.Op != OpARM64SRLconst {
  2479  			break
  2480  		}
  2481  		c := auxIntToInt64(x1.AuxInt)
  2482  		y := x1.Args[0]
  2483  		if !(clobberIfDead(x1)) {
  2484  			break
  2485  		}
  2486  		v.reset(OpARM64BICshiftRL)
  2487  		v.AuxInt = int64ToAuxInt(c)
  2488  		v.AddArg2(x0, y)
  2489  		return true
  2490  	}
  2491  	// match: (BIC x0 x1:(SRAconst [c] y))
  2492  	// cond: clobberIfDead(x1)
  2493  	// result: (BICshiftRA x0 y [c])
  2494  	for {
  2495  		x0 := v_0
  2496  		x1 := v_1
  2497  		if x1.Op != OpARM64SRAconst {
  2498  			break
  2499  		}
  2500  		c := auxIntToInt64(x1.AuxInt)
  2501  		y := x1.Args[0]
  2502  		if !(clobberIfDead(x1)) {
  2503  			break
  2504  		}
  2505  		v.reset(OpARM64BICshiftRA)
  2506  		v.AuxInt = int64ToAuxInt(c)
  2507  		v.AddArg2(x0, y)
  2508  		return true
  2509  	}
  2510  	// match: (BIC x0 x1:(RORconst [c] y))
  2511  	// cond: clobberIfDead(x1)
  2512  	// result: (BICshiftRO x0 y [c])
  2513  	for {
  2514  		x0 := v_0
  2515  		x1 := v_1
  2516  		if x1.Op != OpARM64RORconst {
  2517  			break
  2518  		}
  2519  		c := auxIntToInt64(x1.AuxInt)
  2520  		y := x1.Args[0]
  2521  		if !(clobberIfDead(x1)) {
  2522  			break
  2523  		}
  2524  		v.reset(OpARM64BICshiftRO)
  2525  		v.AuxInt = int64ToAuxInt(c)
  2526  		v.AddArg2(x0, y)
  2527  		return true
  2528  	}
  2529  	return false
  2530  }
  2531  func rewriteValueARM64_OpARM64BICshiftLL(v *Value) bool {
  2532  	v_1 := v.Args[1]
  2533  	v_0 := v.Args[0]
  2534  	// match: (BICshiftLL x (MOVDconst [c]) [d])
  2535  	// result: (ANDconst x [^int64(uint64(c)<<uint64(d))])
  2536  	for {
  2537  		d := auxIntToInt64(v.AuxInt)
  2538  		x := v_0
  2539  		if v_1.Op != OpARM64MOVDconst {
  2540  			break
  2541  		}
  2542  		c := auxIntToInt64(v_1.AuxInt)
  2543  		v.reset(OpARM64ANDconst)
  2544  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
  2545  		v.AddArg(x)
  2546  		return true
  2547  	}
  2548  	// match: (BICshiftLL (SLLconst x [c]) x [c])
  2549  	// result: (MOVDconst [0])
  2550  	for {
  2551  		c := auxIntToInt64(v.AuxInt)
  2552  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
  2553  			break
  2554  		}
  2555  		x := v_0.Args[0]
  2556  		if x != v_1 {
  2557  			break
  2558  		}
  2559  		v.reset(OpARM64MOVDconst)
  2560  		v.AuxInt = int64ToAuxInt(0)
  2561  		return true
  2562  	}
  2563  	return false
  2564  }
  2565  func rewriteValueARM64_OpARM64BICshiftRA(v *Value) bool {
  2566  	v_1 := v.Args[1]
  2567  	v_0 := v.Args[0]
  2568  	// match: (BICshiftRA x (MOVDconst [c]) [d])
  2569  	// result: (ANDconst x [^(c>>uint64(d))])
  2570  	for {
  2571  		d := auxIntToInt64(v.AuxInt)
  2572  		x := v_0
  2573  		if v_1.Op != OpARM64MOVDconst {
  2574  			break
  2575  		}
  2576  		c := auxIntToInt64(v_1.AuxInt)
  2577  		v.reset(OpARM64ANDconst)
  2578  		v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
  2579  		v.AddArg(x)
  2580  		return true
  2581  	}
  2582  	// match: (BICshiftRA (SRAconst x [c]) x [c])
  2583  	// result: (MOVDconst [0])
  2584  	for {
  2585  		c := auxIntToInt64(v.AuxInt)
  2586  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
  2587  			break
  2588  		}
  2589  		x := v_0.Args[0]
  2590  		if x != v_1 {
  2591  			break
  2592  		}
  2593  		v.reset(OpARM64MOVDconst)
  2594  		v.AuxInt = int64ToAuxInt(0)
  2595  		return true
  2596  	}
  2597  	return false
  2598  }
  2599  func rewriteValueARM64_OpARM64BICshiftRL(v *Value) bool {
  2600  	v_1 := v.Args[1]
  2601  	v_0 := v.Args[0]
  2602  	// match: (BICshiftRL x (MOVDconst [c]) [d])
  2603  	// result: (ANDconst x [^int64(uint64(c)>>uint64(d))])
  2604  	for {
  2605  		d := auxIntToInt64(v.AuxInt)
  2606  		x := v_0
  2607  		if v_1.Op != OpARM64MOVDconst {
  2608  			break
  2609  		}
  2610  		c := auxIntToInt64(v_1.AuxInt)
  2611  		v.reset(OpARM64ANDconst)
  2612  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
  2613  		v.AddArg(x)
  2614  		return true
  2615  	}
  2616  	// match: (BICshiftRL (SRLconst x [c]) x [c])
  2617  	// result: (MOVDconst [0])
  2618  	for {
  2619  		c := auxIntToInt64(v.AuxInt)
  2620  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
  2621  			break
  2622  		}
  2623  		x := v_0.Args[0]
  2624  		if x != v_1 {
  2625  			break
  2626  		}
  2627  		v.reset(OpARM64MOVDconst)
  2628  		v.AuxInt = int64ToAuxInt(0)
  2629  		return true
  2630  	}
  2631  	return false
  2632  }
  2633  func rewriteValueARM64_OpARM64BICshiftRO(v *Value) bool {
  2634  	v_1 := v.Args[1]
  2635  	v_0 := v.Args[0]
  2636  	// match: (BICshiftRO x (MOVDconst [c]) [d])
  2637  	// result: (ANDconst x [^rotateRight64(c, d)])
  2638  	for {
  2639  		d := auxIntToInt64(v.AuxInt)
  2640  		x := v_0
  2641  		if v_1.Op != OpARM64MOVDconst {
  2642  			break
  2643  		}
  2644  		c := auxIntToInt64(v_1.AuxInt)
  2645  		v.reset(OpARM64ANDconst)
  2646  		v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
  2647  		v.AddArg(x)
  2648  		return true
  2649  	}
  2650  	// match: (BICshiftRO (RORconst x [c]) x [c])
  2651  	// result: (MOVDconst [0])
  2652  	for {
  2653  		c := auxIntToInt64(v.AuxInt)
  2654  		if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
  2655  			break
  2656  		}
  2657  		x := v_0.Args[0]
  2658  		if x != v_1 {
  2659  			break
  2660  		}
  2661  		v.reset(OpARM64MOVDconst)
  2662  		v.AuxInt = int64ToAuxInt(0)
  2663  		return true
  2664  	}
  2665  	return false
  2666  }
  2667  func rewriteValueARM64_OpARM64CMN(v *Value) bool {
  2668  	v_1 := v.Args[1]
  2669  	v_0 := v.Args[0]
  2670  	// match: (CMN x (MOVDconst [c]))
  2671  	// result: (CMNconst [c] x)
  2672  	for {
  2673  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2674  			x := v_0
  2675  			if v_1.Op != OpARM64MOVDconst {
  2676  				continue
  2677  			}
  2678  			c := auxIntToInt64(v_1.AuxInt)
  2679  			v.reset(OpARM64CMNconst)
  2680  			v.AuxInt = int64ToAuxInt(c)
  2681  			v.AddArg(x)
  2682  			return true
  2683  		}
  2684  		break
  2685  	}
  2686  	// match: (CMN x0 x1:(SLLconst [c] y))
  2687  	// cond: clobberIfDead(x1)
  2688  	// result: (CMNshiftLL x0 y [c])
  2689  	for {
  2690  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2691  			x0 := v_0
  2692  			x1 := v_1
  2693  			if x1.Op != OpARM64SLLconst {
  2694  				continue
  2695  			}
  2696  			c := auxIntToInt64(x1.AuxInt)
  2697  			y := x1.Args[0]
  2698  			if !(clobberIfDead(x1)) {
  2699  				continue
  2700  			}
  2701  			v.reset(OpARM64CMNshiftLL)
  2702  			v.AuxInt = int64ToAuxInt(c)
  2703  			v.AddArg2(x0, y)
  2704  			return true
  2705  		}
  2706  		break
  2707  	}
  2708  	// match: (CMN x0 x1:(SRLconst [c] y))
  2709  	// cond: clobberIfDead(x1)
  2710  	// result: (CMNshiftRL x0 y [c])
  2711  	for {
  2712  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2713  			x0 := v_0
  2714  			x1 := v_1
  2715  			if x1.Op != OpARM64SRLconst {
  2716  				continue
  2717  			}
  2718  			c := auxIntToInt64(x1.AuxInt)
  2719  			y := x1.Args[0]
  2720  			if !(clobberIfDead(x1)) {
  2721  				continue
  2722  			}
  2723  			v.reset(OpARM64CMNshiftRL)
  2724  			v.AuxInt = int64ToAuxInt(c)
  2725  			v.AddArg2(x0, y)
  2726  			return true
  2727  		}
  2728  		break
  2729  	}
  2730  	// match: (CMN x0 x1:(SRAconst [c] y))
  2731  	// cond: clobberIfDead(x1)
  2732  	// result: (CMNshiftRA x0 y [c])
  2733  	for {
  2734  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2735  			x0 := v_0
  2736  			x1 := v_1
  2737  			if x1.Op != OpARM64SRAconst {
  2738  				continue
  2739  			}
  2740  			c := auxIntToInt64(x1.AuxInt)
  2741  			y := x1.Args[0]
  2742  			if !(clobberIfDead(x1)) {
  2743  				continue
  2744  			}
  2745  			v.reset(OpARM64CMNshiftRA)
  2746  			v.AuxInt = int64ToAuxInt(c)
  2747  			v.AddArg2(x0, y)
  2748  			return true
  2749  		}
  2750  		break
  2751  	}
  2752  	return false
  2753  }
  2754  func rewriteValueARM64_OpARM64CMNW(v *Value) bool {
  2755  	v_1 := v.Args[1]
  2756  	v_0 := v.Args[0]
  2757  	// match: (CMNW x (MOVDconst [c]))
  2758  	// result: (CMNWconst [int32(c)] x)
  2759  	for {
  2760  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2761  			x := v_0
  2762  			if v_1.Op != OpARM64MOVDconst {
  2763  				continue
  2764  			}
  2765  			c := auxIntToInt64(v_1.AuxInt)
  2766  			v.reset(OpARM64CMNWconst)
  2767  			v.AuxInt = int32ToAuxInt(int32(c))
  2768  			v.AddArg(x)
  2769  			return true
  2770  		}
  2771  		break
  2772  	}
  2773  	return false
  2774  }
  2775  func rewriteValueARM64_OpARM64CMNWconst(v *Value) bool {
  2776  	v_0 := v.Args[0]
  2777  	// match: (CMNWconst [c] y)
  2778  	// cond: c < 0 && c != -1<<31
  2779  	// result: (CMPWconst [-c] y)
  2780  	for {
  2781  		c := auxIntToInt32(v.AuxInt)
  2782  		y := v_0
  2783  		if !(c < 0 && c != -1<<31) {
  2784  			break
  2785  		}
  2786  		v.reset(OpARM64CMPWconst)
  2787  		v.AuxInt = int32ToAuxInt(-c)
  2788  		v.AddArg(y)
  2789  		return true
  2790  	}
  2791  	// match: (CMNWconst (MOVDconst [x]) [y])
  2792  	// result: (FlagConstant [addFlags32(int32(x),y)])
  2793  	for {
  2794  		y := auxIntToInt32(v.AuxInt)
  2795  		if v_0.Op != OpARM64MOVDconst {
  2796  			break
  2797  		}
  2798  		x := auxIntToInt64(v_0.AuxInt)
  2799  		v.reset(OpARM64FlagConstant)
  2800  		v.AuxInt = flagConstantToAuxInt(addFlags32(int32(x), y))
  2801  		return true
  2802  	}
  2803  	return false
  2804  }
  2805  func rewriteValueARM64_OpARM64CMNconst(v *Value) bool {
  2806  	v_0 := v.Args[0]
  2807  	// match: (CMNconst [c] y)
  2808  	// cond: c < 0 && c != -1<<63
  2809  	// result: (CMPconst [-c] y)
  2810  	for {
  2811  		c := auxIntToInt64(v.AuxInt)
  2812  		y := v_0
  2813  		if !(c < 0 && c != -1<<63) {
  2814  			break
  2815  		}
  2816  		v.reset(OpARM64CMPconst)
  2817  		v.AuxInt = int64ToAuxInt(-c)
  2818  		v.AddArg(y)
  2819  		return true
  2820  	}
  2821  	// match: (CMNconst (MOVDconst [x]) [y])
  2822  	// result: (FlagConstant [addFlags64(x,y)])
  2823  	for {
  2824  		y := auxIntToInt64(v.AuxInt)
  2825  		if v_0.Op != OpARM64MOVDconst {
  2826  			break
  2827  		}
  2828  		x := auxIntToInt64(v_0.AuxInt)
  2829  		v.reset(OpARM64FlagConstant)
  2830  		v.AuxInt = flagConstantToAuxInt(addFlags64(x, y))
  2831  		return true
  2832  	}
  2833  	return false
  2834  }
  2835  func rewriteValueARM64_OpARM64CMNshiftLL(v *Value) bool {
  2836  	v_1 := v.Args[1]
  2837  	v_0 := v.Args[0]
  2838  	b := v.Block
  2839  	// match: (CMNshiftLL (MOVDconst [c]) x [d])
  2840  	// result: (CMNconst [c] (SLLconst <x.Type> x [d]))
  2841  	for {
  2842  		d := auxIntToInt64(v.AuxInt)
  2843  		if v_0.Op != OpARM64MOVDconst {
  2844  			break
  2845  		}
  2846  		c := auxIntToInt64(v_0.AuxInt)
  2847  		x := v_1
  2848  		v.reset(OpARM64CMNconst)
  2849  		v.AuxInt = int64ToAuxInt(c)
  2850  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  2851  		v0.AuxInt = int64ToAuxInt(d)
  2852  		v0.AddArg(x)
  2853  		v.AddArg(v0)
  2854  		return true
  2855  	}
  2856  	// match: (CMNshiftLL x (MOVDconst [c]) [d])
  2857  	// result: (CMNconst x [int64(uint64(c)<<uint64(d))])
  2858  	for {
  2859  		d := auxIntToInt64(v.AuxInt)
  2860  		x := v_0
  2861  		if v_1.Op != OpARM64MOVDconst {
  2862  			break
  2863  		}
  2864  		c := auxIntToInt64(v_1.AuxInt)
  2865  		v.reset(OpARM64CMNconst)
  2866  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
  2867  		v.AddArg(x)
  2868  		return true
  2869  	}
  2870  	return false
  2871  }
  2872  func rewriteValueARM64_OpARM64CMNshiftRA(v *Value) bool {
  2873  	v_1 := v.Args[1]
  2874  	v_0 := v.Args[0]
  2875  	b := v.Block
  2876  	// match: (CMNshiftRA (MOVDconst [c]) x [d])
  2877  	// result: (CMNconst [c] (SRAconst <x.Type> x [d]))
  2878  	for {
  2879  		d := auxIntToInt64(v.AuxInt)
  2880  		if v_0.Op != OpARM64MOVDconst {
  2881  			break
  2882  		}
  2883  		c := auxIntToInt64(v_0.AuxInt)
  2884  		x := v_1
  2885  		v.reset(OpARM64CMNconst)
  2886  		v.AuxInt = int64ToAuxInt(c)
  2887  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
  2888  		v0.AuxInt = int64ToAuxInt(d)
  2889  		v0.AddArg(x)
  2890  		v.AddArg(v0)
  2891  		return true
  2892  	}
  2893  	// match: (CMNshiftRA x (MOVDconst [c]) [d])
  2894  	// result: (CMNconst x [c>>uint64(d)])
  2895  	for {
  2896  		d := auxIntToInt64(v.AuxInt)
  2897  		x := v_0
  2898  		if v_1.Op != OpARM64MOVDconst {
  2899  			break
  2900  		}
  2901  		c := auxIntToInt64(v_1.AuxInt)
  2902  		v.reset(OpARM64CMNconst)
  2903  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
  2904  		v.AddArg(x)
  2905  		return true
  2906  	}
  2907  	return false
  2908  }
  2909  func rewriteValueARM64_OpARM64CMNshiftRL(v *Value) bool {
  2910  	v_1 := v.Args[1]
  2911  	v_0 := v.Args[0]
  2912  	b := v.Block
  2913  	// match: (CMNshiftRL (MOVDconst [c]) x [d])
  2914  	// result: (CMNconst [c] (SRLconst <x.Type> x [d]))
  2915  	for {
  2916  		d := auxIntToInt64(v.AuxInt)
  2917  		if v_0.Op != OpARM64MOVDconst {
  2918  			break
  2919  		}
  2920  		c := auxIntToInt64(v_0.AuxInt)
  2921  		x := v_1
  2922  		v.reset(OpARM64CMNconst)
  2923  		v.AuxInt = int64ToAuxInt(c)
  2924  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
  2925  		v0.AuxInt = int64ToAuxInt(d)
  2926  		v0.AddArg(x)
  2927  		v.AddArg(v0)
  2928  		return true
  2929  	}
  2930  	// match: (CMNshiftRL x (MOVDconst [c]) [d])
  2931  	// result: (CMNconst x [int64(uint64(c)>>uint64(d))])
  2932  	for {
  2933  		d := auxIntToInt64(v.AuxInt)
  2934  		x := v_0
  2935  		if v_1.Op != OpARM64MOVDconst {
  2936  			break
  2937  		}
  2938  		c := auxIntToInt64(v_1.AuxInt)
  2939  		v.reset(OpARM64CMNconst)
  2940  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
  2941  		v.AddArg(x)
  2942  		return true
  2943  	}
  2944  	return false
  2945  }
  2946  func rewriteValueARM64_OpARM64CMP(v *Value) bool {
  2947  	v_1 := v.Args[1]
  2948  	v_0 := v.Args[0]
  2949  	b := v.Block
  2950  	// match: (CMP x (MOVDconst [c]))
  2951  	// result: (CMPconst [c] x)
  2952  	for {
  2953  		x := v_0
  2954  		if v_1.Op != OpARM64MOVDconst {
  2955  			break
  2956  		}
  2957  		c := auxIntToInt64(v_1.AuxInt)
  2958  		v.reset(OpARM64CMPconst)
  2959  		v.AuxInt = int64ToAuxInt(c)
  2960  		v.AddArg(x)
  2961  		return true
  2962  	}
  2963  	// match: (CMP (MOVDconst [c]) x)
  2964  	// result: (InvertFlags (CMPconst [c] x))
  2965  	for {
  2966  		if v_0.Op != OpARM64MOVDconst {
  2967  			break
  2968  		}
  2969  		c := auxIntToInt64(v_0.AuxInt)
  2970  		x := v_1
  2971  		v.reset(OpARM64InvertFlags)
  2972  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
  2973  		v0.AuxInt = int64ToAuxInt(c)
  2974  		v0.AddArg(x)
  2975  		v.AddArg(v0)
  2976  		return true
  2977  	}
  2978  	// match: (CMP x y)
  2979  	// cond: canonLessThan(x,y)
  2980  	// result: (InvertFlags (CMP y x))
  2981  	for {
  2982  		x := v_0
  2983  		y := v_1
  2984  		if !(canonLessThan(x, y)) {
  2985  			break
  2986  		}
  2987  		v.reset(OpARM64InvertFlags)
  2988  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
  2989  		v0.AddArg2(y, x)
  2990  		v.AddArg(v0)
  2991  		return true
  2992  	}
  2993  	// match: (CMP x0 x1:(SLLconst [c] y))
  2994  	// cond: clobberIfDead(x1)
  2995  	// result: (CMPshiftLL x0 y [c])
  2996  	for {
  2997  		x0 := v_0
  2998  		x1 := v_1
  2999  		if x1.Op != OpARM64SLLconst {
  3000  			break
  3001  		}
  3002  		c := auxIntToInt64(x1.AuxInt)
  3003  		y := x1.Args[0]
  3004  		if !(clobberIfDead(x1)) {
  3005  			break
  3006  		}
  3007  		v.reset(OpARM64CMPshiftLL)
  3008  		v.AuxInt = int64ToAuxInt(c)
  3009  		v.AddArg2(x0, y)
  3010  		return true
  3011  	}
  3012  	// match: (CMP x0:(SLLconst [c] y) x1)
  3013  	// cond: clobberIfDead(x0)
  3014  	// result: (InvertFlags (CMPshiftLL x1 y [c]))
  3015  	for {
  3016  		x0 := v_0
  3017  		if x0.Op != OpARM64SLLconst {
  3018  			break
  3019  		}
  3020  		c := auxIntToInt64(x0.AuxInt)
  3021  		y := x0.Args[0]
  3022  		x1 := v_1
  3023  		if !(clobberIfDead(x0)) {
  3024  			break
  3025  		}
  3026  		v.reset(OpARM64InvertFlags)
  3027  		v0 := b.NewValue0(v.Pos, OpARM64CMPshiftLL, types.TypeFlags)
  3028  		v0.AuxInt = int64ToAuxInt(c)
  3029  		v0.AddArg2(x1, y)
  3030  		v.AddArg(v0)
  3031  		return true
  3032  	}
  3033  	// match: (CMP x0 x1:(SRLconst [c] y))
  3034  	// cond: clobberIfDead(x1)
  3035  	// result: (CMPshiftRL x0 y [c])
  3036  	for {
  3037  		x0 := v_0
  3038  		x1 := v_1
  3039  		if x1.Op != OpARM64SRLconst {
  3040  			break
  3041  		}
  3042  		c := auxIntToInt64(x1.AuxInt)
  3043  		y := x1.Args[0]
  3044  		if !(clobberIfDead(x1)) {
  3045  			break
  3046  		}
  3047  		v.reset(OpARM64CMPshiftRL)
  3048  		v.AuxInt = int64ToAuxInt(c)
  3049  		v.AddArg2(x0, y)
  3050  		return true
  3051  	}
  3052  	// match: (CMP x0:(SRLconst [c] y) x1)
  3053  	// cond: clobberIfDead(x0)
  3054  	// result: (InvertFlags (CMPshiftRL x1 y [c]))
  3055  	for {
  3056  		x0 := v_0
  3057  		if x0.Op != OpARM64SRLconst {
  3058  			break
  3059  		}
  3060  		c := auxIntToInt64(x0.AuxInt)
  3061  		y := x0.Args[0]
  3062  		x1 := v_1
  3063  		if !(clobberIfDead(x0)) {
  3064  			break
  3065  		}
  3066  		v.reset(OpARM64InvertFlags)
  3067  		v0 := b.NewValue0(v.Pos, OpARM64CMPshiftRL, types.TypeFlags)
  3068  		v0.AuxInt = int64ToAuxInt(c)
  3069  		v0.AddArg2(x1, y)
  3070  		v.AddArg(v0)
  3071  		return true
  3072  	}
  3073  	// match: (CMP x0 x1:(SRAconst [c] y))
  3074  	// cond: clobberIfDead(x1)
  3075  	// result: (CMPshiftRA x0 y [c])
  3076  	for {
  3077  		x0 := v_0
  3078  		x1 := v_1
  3079  		if x1.Op != OpARM64SRAconst {
  3080  			break
  3081  		}
  3082  		c := auxIntToInt64(x1.AuxInt)
  3083  		y := x1.Args[0]
  3084  		if !(clobberIfDead(x1)) {
  3085  			break
  3086  		}
  3087  		v.reset(OpARM64CMPshiftRA)
  3088  		v.AuxInt = int64ToAuxInt(c)
  3089  		v.AddArg2(x0, y)
  3090  		return true
  3091  	}
  3092  	// match: (CMP x0:(SRAconst [c] y) x1)
  3093  	// cond: clobberIfDead(x0)
  3094  	// result: (InvertFlags (CMPshiftRA x1 y [c]))
  3095  	for {
  3096  		x0 := v_0
  3097  		if x0.Op != OpARM64SRAconst {
  3098  			break
  3099  		}
  3100  		c := auxIntToInt64(x0.AuxInt)
  3101  		y := x0.Args[0]
  3102  		x1 := v_1
  3103  		if !(clobberIfDead(x0)) {
  3104  			break
  3105  		}
  3106  		v.reset(OpARM64InvertFlags)
  3107  		v0 := b.NewValue0(v.Pos, OpARM64CMPshiftRA, types.TypeFlags)
  3108  		v0.AuxInt = int64ToAuxInt(c)
  3109  		v0.AddArg2(x1, y)
  3110  		v.AddArg(v0)
  3111  		return true
  3112  	}
  3113  	return false
  3114  }
  3115  func rewriteValueARM64_OpARM64CMPW(v *Value) bool {
  3116  	v_1 := v.Args[1]
  3117  	v_0 := v.Args[0]
  3118  	b := v.Block
  3119  	// match: (CMPW x (MOVDconst [c]))
  3120  	// result: (CMPWconst [int32(c)] x)
  3121  	for {
  3122  		x := v_0
  3123  		if v_1.Op != OpARM64MOVDconst {
  3124  			break
  3125  		}
  3126  		c := auxIntToInt64(v_1.AuxInt)
  3127  		v.reset(OpARM64CMPWconst)
  3128  		v.AuxInt = int32ToAuxInt(int32(c))
  3129  		v.AddArg(x)
  3130  		return true
  3131  	}
  3132  	// match: (CMPW (MOVDconst [c]) x)
  3133  	// result: (InvertFlags (CMPWconst [int32(c)] x))
  3134  	for {
  3135  		if v_0.Op != OpARM64MOVDconst {
  3136  			break
  3137  		}
  3138  		c := auxIntToInt64(v_0.AuxInt)
  3139  		x := v_1
  3140  		v.reset(OpARM64InvertFlags)
  3141  		v0 := b.NewValue0(v.Pos, OpARM64CMPWconst, types.TypeFlags)
  3142  		v0.AuxInt = int32ToAuxInt(int32(c))
  3143  		v0.AddArg(x)
  3144  		v.AddArg(v0)
  3145  		return true
  3146  	}
  3147  	// match: (CMPW x y)
  3148  	// cond: canonLessThan(x,y)
  3149  	// result: (InvertFlags (CMPW y x))
  3150  	for {
  3151  		x := v_0
  3152  		y := v_1
  3153  		if !(canonLessThan(x, y)) {
  3154  			break
  3155  		}
  3156  		v.reset(OpARM64InvertFlags)
  3157  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
  3158  		v0.AddArg2(y, x)
  3159  		v.AddArg(v0)
  3160  		return true
  3161  	}
  3162  	return false
  3163  }
  3164  func rewriteValueARM64_OpARM64CMPWconst(v *Value) bool {
  3165  	v_0 := v.Args[0]
  3166  	// match: (CMPWconst [c] y)
  3167  	// cond: c < 0 && c != -1<<31
  3168  	// result: (CMNWconst [-c] y)
  3169  	for {
  3170  		c := auxIntToInt32(v.AuxInt)
  3171  		y := v_0
  3172  		if !(c < 0 && c != -1<<31) {
  3173  			break
  3174  		}
  3175  		v.reset(OpARM64CMNWconst)
  3176  		v.AuxInt = int32ToAuxInt(-c)
  3177  		v.AddArg(y)
  3178  		return true
  3179  	}
  3180  	// match: (CMPWconst (MOVDconst [x]) [y])
  3181  	// result: (FlagConstant [subFlags32(int32(x),y)])
  3182  	for {
  3183  		y := auxIntToInt32(v.AuxInt)
  3184  		if v_0.Op != OpARM64MOVDconst {
  3185  			break
  3186  		}
  3187  		x := auxIntToInt64(v_0.AuxInt)
  3188  		v.reset(OpARM64FlagConstant)
  3189  		v.AuxInt = flagConstantToAuxInt(subFlags32(int32(x), y))
  3190  		return true
  3191  	}
  3192  	// match: (CMPWconst (MOVBUreg _) [c])
  3193  	// cond: 0xff < c
  3194  	// result: (FlagConstant [subFlags64(0,1)])
  3195  	for {
  3196  		c := auxIntToInt32(v.AuxInt)
  3197  		if v_0.Op != OpARM64MOVBUreg || !(0xff < c) {
  3198  			break
  3199  		}
  3200  		v.reset(OpARM64FlagConstant)
  3201  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3202  		return true
  3203  	}
  3204  	// match: (CMPWconst (MOVHUreg _) [c])
  3205  	// cond: 0xffff < c
  3206  	// result: (FlagConstant [subFlags64(0,1)])
  3207  	for {
  3208  		c := auxIntToInt32(v.AuxInt)
  3209  		if v_0.Op != OpARM64MOVHUreg || !(0xffff < c) {
  3210  			break
  3211  		}
  3212  		v.reset(OpARM64FlagConstant)
  3213  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3214  		return true
  3215  	}
  3216  	return false
  3217  }
  3218  func rewriteValueARM64_OpARM64CMPconst(v *Value) bool {
  3219  	v_0 := v.Args[0]
  3220  	// match: (CMPconst [c] y)
  3221  	// cond: c < 0 && c != -1<<63
  3222  	// result: (CMNconst [-c] y)
  3223  	for {
  3224  		c := auxIntToInt64(v.AuxInt)
  3225  		y := v_0
  3226  		if !(c < 0 && c != -1<<63) {
  3227  			break
  3228  		}
  3229  		v.reset(OpARM64CMNconst)
  3230  		v.AuxInt = int64ToAuxInt(-c)
  3231  		v.AddArg(y)
  3232  		return true
  3233  	}
  3234  	// match: (CMPconst (MOVDconst [x]) [y])
  3235  	// result: (FlagConstant [subFlags64(x,y)])
  3236  	for {
  3237  		y := auxIntToInt64(v.AuxInt)
  3238  		if v_0.Op != OpARM64MOVDconst {
  3239  			break
  3240  		}
  3241  		x := auxIntToInt64(v_0.AuxInt)
  3242  		v.reset(OpARM64FlagConstant)
  3243  		v.AuxInt = flagConstantToAuxInt(subFlags64(x, y))
  3244  		return true
  3245  	}
  3246  	// match: (CMPconst (MOVBUreg _) [c])
  3247  	// cond: 0xff < c
  3248  	// result: (FlagConstant [subFlags64(0,1)])
  3249  	for {
  3250  		c := auxIntToInt64(v.AuxInt)
  3251  		if v_0.Op != OpARM64MOVBUreg || !(0xff < c) {
  3252  			break
  3253  		}
  3254  		v.reset(OpARM64FlagConstant)
  3255  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3256  		return true
  3257  	}
  3258  	// match: (CMPconst (MOVHUreg _) [c])
  3259  	// cond: 0xffff < c
  3260  	// result: (FlagConstant [subFlags64(0,1)])
  3261  	for {
  3262  		c := auxIntToInt64(v.AuxInt)
  3263  		if v_0.Op != OpARM64MOVHUreg || !(0xffff < c) {
  3264  			break
  3265  		}
  3266  		v.reset(OpARM64FlagConstant)
  3267  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3268  		return true
  3269  	}
  3270  	// match: (CMPconst (MOVWUreg _) [c])
  3271  	// cond: 0xffffffff < c
  3272  	// result: (FlagConstant [subFlags64(0,1)])
  3273  	for {
  3274  		c := auxIntToInt64(v.AuxInt)
  3275  		if v_0.Op != OpARM64MOVWUreg || !(0xffffffff < c) {
  3276  			break
  3277  		}
  3278  		v.reset(OpARM64FlagConstant)
  3279  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3280  		return true
  3281  	}
  3282  	// match: (CMPconst (ANDconst _ [m]) [n])
  3283  	// cond: 0 <= m && m < n
  3284  	// result: (FlagConstant [subFlags64(0,1)])
  3285  	for {
  3286  		n := auxIntToInt64(v.AuxInt)
  3287  		if v_0.Op != OpARM64ANDconst {
  3288  			break
  3289  		}
  3290  		m := auxIntToInt64(v_0.AuxInt)
  3291  		if !(0 <= m && m < n) {
  3292  			break
  3293  		}
  3294  		v.reset(OpARM64FlagConstant)
  3295  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3296  		return true
  3297  	}
  3298  	// match: (CMPconst (SRLconst _ [c]) [n])
  3299  	// cond: 0 <= n && 0 < c && c <= 63 && (1<<uint64(64-c)) <= uint64(n)
  3300  	// result: (FlagConstant [subFlags64(0,1)])
  3301  	for {
  3302  		n := auxIntToInt64(v.AuxInt)
  3303  		if v_0.Op != OpARM64SRLconst {
  3304  			break
  3305  		}
  3306  		c := auxIntToInt64(v_0.AuxInt)
  3307  		if !(0 <= n && 0 < c && c <= 63 && (1<<uint64(64-c)) <= uint64(n)) {
  3308  			break
  3309  		}
  3310  		v.reset(OpARM64FlagConstant)
  3311  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3312  		return true
  3313  	}
  3314  	return false
  3315  }
  3316  func rewriteValueARM64_OpARM64CMPshiftLL(v *Value) bool {
  3317  	v_1 := v.Args[1]
  3318  	v_0 := v.Args[0]
  3319  	b := v.Block
  3320  	// match: (CMPshiftLL (MOVDconst [c]) x [d])
  3321  	// result: (InvertFlags (CMPconst [c] (SLLconst <x.Type> x [d])))
  3322  	for {
  3323  		d := auxIntToInt64(v.AuxInt)
  3324  		if v_0.Op != OpARM64MOVDconst {
  3325  			break
  3326  		}
  3327  		c := auxIntToInt64(v_0.AuxInt)
  3328  		x := v_1
  3329  		v.reset(OpARM64InvertFlags)
  3330  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
  3331  		v0.AuxInt = int64ToAuxInt(c)
  3332  		v1 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  3333  		v1.AuxInt = int64ToAuxInt(d)
  3334  		v1.AddArg(x)
  3335  		v0.AddArg(v1)
  3336  		v.AddArg(v0)
  3337  		return true
  3338  	}
  3339  	// match: (CMPshiftLL x (MOVDconst [c]) [d])
  3340  	// result: (CMPconst x [int64(uint64(c)<<uint64(d))])
  3341  	for {
  3342  		d := auxIntToInt64(v.AuxInt)
  3343  		x := v_0
  3344  		if v_1.Op != OpARM64MOVDconst {
  3345  			break
  3346  		}
  3347  		c := auxIntToInt64(v_1.AuxInt)
  3348  		v.reset(OpARM64CMPconst)
  3349  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
  3350  		v.AddArg(x)
  3351  		return true
  3352  	}
  3353  	return false
  3354  }
  3355  func rewriteValueARM64_OpARM64CMPshiftRA(v *Value) bool {
  3356  	v_1 := v.Args[1]
  3357  	v_0 := v.Args[0]
  3358  	b := v.Block
  3359  	// match: (CMPshiftRA (MOVDconst [c]) x [d])
  3360  	// result: (InvertFlags (CMPconst [c] (SRAconst <x.Type> x [d])))
  3361  	for {
  3362  		d := auxIntToInt64(v.AuxInt)
  3363  		if v_0.Op != OpARM64MOVDconst {
  3364  			break
  3365  		}
  3366  		c := auxIntToInt64(v_0.AuxInt)
  3367  		x := v_1
  3368  		v.reset(OpARM64InvertFlags)
  3369  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
  3370  		v0.AuxInt = int64ToAuxInt(c)
  3371  		v1 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
  3372  		v1.AuxInt = int64ToAuxInt(d)
  3373  		v1.AddArg(x)
  3374  		v0.AddArg(v1)
  3375  		v.AddArg(v0)
  3376  		return true
  3377  	}
  3378  	// match: (CMPshiftRA x (MOVDconst [c]) [d])
  3379  	// result: (CMPconst x [c>>uint64(d)])
  3380  	for {
  3381  		d := auxIntToInt64(v.AuxInt)
  3382  		x := v_0
  3383  		if v_1.Op != OpARM64MOVDconst {
  3384  			break
  3385  		}
  3386  		c := auxIntToInt64(v_1.AuxInt)
  3387  		v.reset(OpARM64CMPconst)
  3388  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
  3389  		v.AddArg(x)
  3390  		return true
  3391  	}
  3392  	return false
  3393  }
  3394  func rewriteValueARM64_OpARM64CMPshiftRL(v *Value) bool {
  3395  	v_1 := v.Args[1]
  3396  	v_0 := v.Args[0]
  3397  	b := v.Block
  3398  	// match: (CMPshiftRL (MOVDconst [c]) x [d])
  3399  	// result: (InvertFlags (CMPconst [c] (SRLconst <x.Type> x [d])))
  3400  	for {
  3401  		d := auxIntToInt64(v.AuxInt)
  3402  		if v_0.Op != OpARM64MOVDconst {
  3403  			break
  3404  		}
  3405  		c := auxIntToInt64(v_0.AuxInt)
  3406  		x := v_1
  3407  		v.reset(OpARM64InvertFlags)
  3408  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
  3409  		v0.AuxInt = int64ToAuxInt(c)
  3410  		v1 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
  3411  		v1.AuxInt = int64ToAuxInt(d)
  3412  		v1.AddArg(x)
  3413  		v0.AddArg(v1)
  3414  		v.AddArg(v0)
  3415  		return true
  3416  	}
  3417  	// match: (CMPshiftRL x (MOVDconst [c]) [d])
  3418  	// result: (CMPconst x [int64(uint64(c)>>uint64(d))])
  3419  	for {
  3420  		d := auxIntToInt64(v.AuxInt)
  3421  		x := v_0
  3422  		if v_1.Op != OpARM64MOVDconst {
  3423  			break
  3424  		}
  3425  		c := auxIntToInt64(v_1.AuxInt)
  3426  		v.reset(OpARM64CMPconst)
  3427  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
  3428  		v.AddArg(x)
  3429  		return true
  3430  	}
  3431  	return false
  3432  }
  3433  func rewriteValueARM64_OpARM64CSEL(v *Value) bool {
  3434  	v_2 := v.Args[2]
  3435  	v_1 := v.Args[1]
  3436  	v_0 := v.Args[0]
  3437  	// match: (CSEL [cc] (MOVDconst [-1]) (MOVDconst [0]) flag)
  3438  	// result: (CSETM [cc] flag)
  3439  	for {
  3440  		cc := auxIntToOp(v.AuxInt)
  3441  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != -1 || v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  3442  			break
  3443  		}
  3444  		flag := v_2
  3445  		v.reset(OpARM64CSETM)
  3446  		v.AuxInt = opToAuxInt(cc)
  3447  		v.AddArg(flag)
  3448  		return true
  3449  	}
  3450  	// match: (CSEL [cc] (MOVDconst [0]) (MOVDconst [-1]) flag)
  3451  	// result: (CSETM [arm64Negate(cc)] flag)
  3452  	for {
  3453  		cc := auxIntToOp(v.AuxInt)
  3454  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 0 || v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
  3455  			break
  3456  		}
  3457  		flag := v_2
  3458  		v.reset(OpARM64CSETM)
  3459  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  3460  		v.AddArg(flag)
  3461  		return true
  3462  	}
  3463  	// match: (CSEL [cc] x (MOVDconst [0]) flag)
  3464  	// result: (CSEL0 [cc] x flag)
  3465  	for {
  3466  		cc := auxIntToOp(v.AuxInt)
  3467  		x := v_0
  3468  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  3469  			break
  3470  		}
  3471  		flag := v_2
  3472  		v.reset(OpARM64CSEL0)
  3473  		v.AuxInt = opToAuxInt(cc)
  3474  		v.AddArg2(x, flag)
  3475  		return true
  3476  	}
  3477  	// match: (CSEL [cc] (MOVDconst [0]) y flag)
  3478  	// result: (CSEL0 [arm64Negate(cc)] y flag)
  3479  	for {
  3480  		cc := auxIntToOp(v.AuxInt)
  3481  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 0 {
  3482  			break
  3483  		}
  3484  		y := v_1
  3485  		flag := v_2
  3486  		v.reset(OpARM64CSEL0)
  3487  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  3488  		v.AddArg2(y, flag)
  3489  		return true
  3490  	}
  3491  	// match: (CSEL [cc] x (ADDconst [1] a) flag)
  3492  	// result: (CSINC [cc] x a flag)
  3493  	for {
  3494  		cc := auxIntToOp(v.AuxInt)
  3495  		x := v_0
  3496  		if v_1.Op != OpARM64ADDconst || auxIntToInt64(v_1.AuxInt) != 1 {
  3497  			break
  3498  		}
  3499  		a := v_1.Args[0]
  3500  		flag := v_2
  3501  		v.reset(OpARM64CSINC)
  3502  		v.AuxInt = opToAuxInt(cc)
  3503  		v.AddArg3(x, a, flag)
  3504  		return true
  3505  	}
  3506  	// match: (CSEL [cc] (ADDconst [1] a) x flag)
  3507  	// result: (CSINC [arm64Negate(cc)] x a flag)
  3508  	for {
  3509  		cc := auxIntToOp(v.AuxInt)
  3510  		if v_0.Op != OpARM64ADDconst || auxIntToInt64(v_0.AuxInt) != 1 {
  3511  			break
  3512  		}
  3513  		a := v_0.Args[0]
  3514  		x := v_1
  3515  		flag := v_2
  3516  		v.reset(OpARM64CSINC)
  3517  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  3518  		v.AddArg3(x, a, flag)
  3519  		return true
  3520  	}
  3521  	// match: (CSEL [cc] x (MVN a) flag)
  3522  	// result: (CSINV [cc] x a flag)
  3523  	for {
  3524  		cc := auxIntToOp(v.AuxInt)
  3525  		x := v_0
  3526  		if v_1.Op != OpARM64MVN {
  3527  			break
  3528  		}
  3529  		a := v_1.Args[0]
  3530  		flag := v_2
  3531  		v.reset(OpARM64CSINV)
  3532  		v.AuxInt = opToAuxInt(cc)
  3533  		v.AddArg3(x, a, flag)
  3534  		return true
  3535  	}
  3536  	// match: (CSEL [cc] (MVN a) x flag)
  3537  	// result: (CSINV [arm64Negate(cc)] x a flag)
  3538  	for {
  3539  		cc := auxIntToOp(v.AuxInt)
  3540  		if v_0.Op != OpARM64MVN {
  3541  			break
  3542  		}
  3543  		a := v_0.Args[0]
  3544  		x := v_1
  3545  		flag := v_2
  3546  		v.reset(OpARM64CSINV)
  3547  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  3548  		v.AddArg3(x, a, flag)
  3549  		return true
  3550  	}
  3551  	// match: (CSEL [cc] x (NEG a) flag)
  3552  	// result: (CSNEG [cc] x a flag)
  3553  	for {
  3554  		cc := auxIntToOp(v.AuxInt)
  3555  		x := v_0
  3556  		if v_1.Op != OpARM64NEG {
  3557  			break
  3558  		}
  3559  		a := v_1.Args[0]
  3560  		flag := v_2
  3561  		v.reset(OpARM64CSNEG)
  3562  		v.AuxInt = opToAuxInt(cc)
  3563  		v.AddArg3(x, a, flag)
  3564  		return true
  3565  	}
  3566  	// match: (CSEL [cc] (NEG a) x flag)
  3567  	// result: (CSNEG [arm64Negate(cc)] x a flag)
  3568  	for {
  3569  		cc := auxIntToOp(v.AuxInt)
  3570  		if v_0.Op != OpARM64NEG {
  3571  			break
  3572  		}
  3573  		a := v_0.Args[0]
  3574  		x := v_1
  3575  		flag := v_2
  3576  		v.reset(OpARM64CSNEG)
  3577  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  3578  		v.AddArg3(x, a, flag)
  3579  		return true
  3580  	}
  3581  	// match: (CSEL [cc] x y (InvertFlags cmp))
  3582  	// result: (CSEL [arm64Invert(cc)] x y cmp)
  3583  	for {
  3584  		cc := auxIntToOp(v.AuxInt)
  3585  		x := v_0
  3586  		y := v_1
  3587  		if v_2.Op != OpARM64InvertFlags {
  3588  			break
  3589  		}
  3590  		cmp := v_2.Args[0]
  3591  		v.reset(OpARM64CSEL)
  3592  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  3593  		v.AddArg3(x, y, cmp)
  3594  		return true
  3595  	}
  3596  	// match: (CSEL [cc] x _ flag)
  3597  	// cond: ccARM64Eval(cc, flag) > 0
  3598  	// result: x
  3599  	for {
  3600  		cc := auxIntToOp(v.AuxInt)
  3601  		x := v_0
  3602  		flag := v_2
  3603  		if !(ccARM64Eval(cc, flag) > 0) {
  3604  			break
  3605  		}
  3606  		v.copyOf(x)
  3607  		return true
  3608  	}
  3609  	// match: (CSEL [cc] _ y flag)
  3610  	// cond: ccARM64Eval(cc, flag) < 0
  3611  	// result: y
  3612  	for {
  3613  		cc := auxIntToOp(v.AuxInt)
  3614  		y := v_1
  3615  		flag := v_2
  3616  		if !(ccARM64Eval(cc, flag) < 0) {
  3617  			break
  3618  		}
  3619  		v.copyOf(y)
  3620  		return true
  3621  	}
  3622  	// match: (CSEL [cc] x y (CMPWconst [0] boolval))
  3623  	// cond: cc == OpARM64NotEqual && flagArg(boolval) != nil
  3624  	// result: (CSEL [boolval.Op] x y flagArg(boolval))
  3625  	for {
  3626  		cc := auxIntToOp(v.AuxInt)
  3627  		x := v_0
  3628  		y := v_1
  3629  		if v_2.Op != OpARM64CMPWconst || auxIntToInt32(v_2.AuxInt) != 0 {
  3630  			break
  3631  		}
  3632  		boolval := v_2.Args[0]
  3633  		if !(cc == OpARM64NotEqual && flagArg(boolval) != nil) {
  3634  			break
  3635  		}
  3636  		v.reset(OpARM64CSEL)
  3637  		v.AuxInt = opToAuxInt(boolval.Op)
  3638  		v.AddArg3(x, y, flagArg(boolval))
  3639  		return true
  3640  	}
  3641  	// match: (CSEL [cc] x y (CMPWconst [0] boolval))
  3642  	// cond: cc == OpARM64Equal && flagArg(boolval) != nil
  3643  	// result: (CSEL [arm64Negate(boolval.Op)] x y flagArg(boolval))
  3644  	for {
  3645  		cc := auxIntToOp(v.AuxInt)
  3646  		x := v_0
  3647  		y := v_1
  3648  		if v_2.Op != OpARM64CMPWconst || auxIntToInt32(v_2.AuxInt) != 0 {
  3649  			break
  3650  		}
  3651  		boolval := v_2.Args[0]
  3652  		if !(cc == OpARM64Equal && flagArg(boolval) != nil) {
  3653  			break
  3654  		}
  3655  		v.reset(OpARM64CSEL)
  3656  		v.AuxInt = opToAuxInt(arm64Negate(boolval.Op))
  3657  		v.AddArg3(x, y, flagArg(boolval))
  3658  		return true
  3659  	}
  3660  	return false
  3661  }
  3662  func rewriteValueARM64_OpARM64CSEL0(v *Value) bool {
  3663  	v_1 := v.Args[1]
  3664  	v_0 := v.Args[0]
  3665  	// match: (CSEL0 [cc] x (InvertFlags cmp))
  3666  	// result: (CSEL0 [arm64Invert(cc)] x cmp)
  3667  	for {
  3668  		cc := auxIntToOp(v.AuxInt)
  3669  		x := v_0
  3670  		if v_1.Op != OpARM64InvertFlags {
  3671  			break
  3672  		}
  3673  		cmp := v_1.Args[0]
  3674  		v.reset(OpARM64CSEL0)
  3675  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  3676  		v.AddArg2(x, cmp)
  3677  		return true
  3678  	}
  3679  	// match: (CSEL0 [cc] x flag)
  3680  	// cond: ccARM64Eval(cc, flag) > 0
  3681  	// result: x
  3682  	for {
  3683  		cc := auxIntToOp(v.AuxInt)
  3684  		x := v_0
  3685  		flag := v_1
  3686  		if !(ccARM64Eval(cc, flag) > 0) {
  3687  			break
  3688  		}
  3689  		v.copyOf(x)
  3690  		return true
  3691  	}
  3692  	// match: (CSEL0 [cc] _ flag)
  3693  	// cond: ccARM64Eval(cc, flag) < 0
  3694  	// result: (MOVDconst [0])
  3695  	for {
  3696  		cc := auxIntToOp(v.AuxInt)
  3697  		flag := v_1
  3698  		if !(ccARM64Eval(cc, flag) < 0) {
  3699  			break
  3700  		}
  3701  		v.reset(OpARM64MOVDconst)
  3702  		v.AuxInt = int64ToAuxInt(0)
  3703  		return true
  3704  	}
  3705  	// match: (CSEL0 [cc] x (CMPWconst [0] boolval))
  3706  	// cond: cc == OpARM64NotEqual && flagArg(boolval) != nil
  3707  	// result: (CSEL0 [boolval.Op] x flagArg(boolval))
  3708  	for {
  3709  		cc := auxIntToOp(v.AuxInt)
  3710  		x := v_0
  3711  		if v_1.Op != OpARM64CMPWconst || auxIntToInt32(v_1.AuxInt) != 0 {
  3712  			break
  3713  		}
  3714  		boolval := v_1.Args[0]
  3715  		if !(cc == OpARM64NotEqual && flagArg(boolval) != nil) {
  3716  			break
  3717  		}
  3718  		v.reset(OpARM64CSEL0)
  3719  		v.AuxInt = opToAuxInt(boolval.Op)
  3720  		v.AddArg2(x, flagArg(boolval))
  3721  		return true
  3722  	}
  3723  	// match: (CSEL0 [cc] x (CMPWconst [0] boolval))
  3724  	// cond: cc == OpARM64Equal && flagArg(boolval) != nil
  3725  	// result: (CSEL0 [arm64Negate(boolval.Op)] x flagArg(boolval))
  3726  	for {
  3727  		cc := auxIntToOp(v.AuxInt)
  3728  		x := v_0
  3729  		if v_1.Op != OpARM64CMPWconst || auxIntToInt32(v_1.AuxInt) != 0 {
  3730  			break
  3731  		}
  3732  		boolval := v_1.Args[0]
  3733  		if !(cc == OpARM64Equal && flagArg(boolval) != nil) {
  3734  			break
  3735  		}
  3736  		v.reset(OpARM64CSEL0)
  3737  		v.AuxInt = opToAuxInt(arm64Negate(boolval.Op))
  3738  		v.AddArg2(x, flagArg(boolval))
  3739  		return true
  3740  	}
  3741  	return false
  3742  }
  3743  func rewriteValueARM64_OpARM64CSETM(v *Value) bool {
  3744  	v_0 := v.Args[0]
  3745  	// match: (CSETM [cc] (InvertFlags cmp))
  3746  	// result: (CSETM [arm64Invert(cc)] cmp)
  3747  	for {
  3748  		cc := auxIntToOp(v.AuxInt)
  3749  		if v_0.Op != OpARM64InvertFlags {
  3750  			break
  3751  		}
  3752  		cmp := v_0.Args[0]
  3753  		v.reset(OpARM64CSETM)
  3754  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  3755  		v.AddArg(cmp)
  3756  		return true
  3757  	}
  3758  	// match: (CSETM [cc] flag)
  3759  	// cond: ccARM64Eval(cc, flag) > 0
  3760  	// result: (MOVDconst [-1])
  3761  	for {
  3762  		cc := auxIntToOp(v.AuxInt)
  3763  		flag := v_0
  3764  		if !(ccARM64Eval(cc, flag) > 0) {
  3765  			break
  3766  		}
  3767  		v.reset(OpARM64MOVDconst)
  3768  		v.AuxInt = int64ToAuxInt(-1)
  3769  		return true
  3770  	}
  3771  	// match: (CSETM [cc] flag)
  3772  	// cond: ccARM64Eval(cc, flag) < 0
  3773  	// result: (MOVDconst [0])
  3774  	for {
  3775  		cc := auxIntToOp(v.AuxInt)
  3776  		flag := v_0
  3777  		if !(ccARM64Eval(cc, flag) < 0) {
  3778  			break
  3779  		}
  3780  		v.reset(OpARM64MOVDconst)
  3781  		v.AuxInt = int64ToAuxInt(0)
  3782  		return true
  3783  	}
  3784  	return false
  3785  }
  3786  func rewriteValueARM64_OpARM64CSINC(v *Value) bool {
  3787  	v_2 := v.Args[2]
  3788  	v_1 := v.Args[1]
  3789  	v_0 := v.Args[0]
  3790  	// match: (CSINC [cc] x y (InvertFlags cmp))
  3791  	// result: (CSINC [arm64Invert(cc)] x y cmp)
  3792  	for {
  3793  		cc := auxIntToOp(v.AuxInt)
  3794  		x := v_0
  3795  		y := v_1
  3796  		if v_2.Op != OpARM64InvertFlags {
  3797  			break
  3798  		}
  3799  		cmp := v_2.Args[0]
  3800  		v.reset(OpARM64CSINC)
  3801  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  3802  		v.AddArg3(x, y, cmp)
  3803  		return true
  3804  	}
  3805  	// match: (CSINC [cc] x _ flag)
  3806  	// cond: ccARM64Eval(cc, flag) > 0
  3807  	// result: x
  3808  	for {
  3809  		cc := auxIntToOp(v.AuxInt)
  3810  		x := v_0
  3811  		flag := v_2
  3812  		if !(ccARM64Eval(cc, flag) > 0) {
  3813  			break
  3814  		}
  3815  		v.copyOf(x)
  3816  		return true
  3817  	}
  3818  	// match: (CSINC [cc] _ y flag)
  3819  	// cond: ccARM64Eval(cc, flag) < 0
  3820  	// result: (ADDconst [1] y)
  3821  	for {
  3822  		cc := auxIntToOp(v.AuxInt)
  3823  		y := v_1
  3824  		flag := v_2
  3825  		if !(ccARM64Eval(cc, flag) < 0) {
  3826  			break
  3827  		}
  3828  		v.reset(OpARM64ADDconst)
  3829  		v.AuxInt = int64ToAuxInt(1)
  3830  		v.AddArg(y)
  3831  		return true
  3832  	}
  3833  	return false
  3834  }
  3835  func rewriteValueARM64_OpARM64CSINV(v *Value) bool {
  3836  	v_2 := v.Args[2]
  3837  	v_1 := v.Args[1]
  3838  	v_0 := v.Args[0]
  3839  	// match: (CSINV [cc] x y (InvertFlags cmp))
  3840  	// result: (CSINV [arm64Invert(cc)] x y cmp)
  3841  	for {
  3842  		cc := auxIntToOp(v.AuxInt)
  3843  		x := v_0
  3844  		y := v_1
  3845  		if v_2.Op != OpARM64InvertFlags {
  3846  			break
  3847  		}
  3848  		cmp := v_2.Args[0]
  3849  		v.reset(OpARM64CSINV)
  3850  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  3851  		v.AddArg3(x, y, cmp)
  3852  		return true
  3853  	}
  3854  	// match: (CSINV [cc] x _ flag)
  3855  	// cond: ccARM64Eval(cc, flag) > 0
  3856  	// result: x
  3857  	for {
  3858  		cc := auxIntToOp(v.AuxInt)
  3859  		x := v_0
  3860  		flag := v_2
  3861  		if !(ccARM64Eval(cc, flag) > 0) {
  3862  			break
  3863  		}
  3864  		v.copyOf(x)
  3865  		return true
  3866  	}
  3867  	// match: (CSINV [cc] _ y flag)
  3868  	// cond: ccARM64Eval(cc, flag) < 0
  3869  	// result: (Not y)
  3870  	for {
  3871  		cc := auxIntToOp(v.AuxInt)
  3872  		y := v_1
  3873  		flag := v_2
  3874  		if !(ccARM64Eval(cc, flag) < 0) {
  3875  			break
  3876  		}
  3877  		v.reset(OpNot)
  3878  		v.AddArg(y)
  3879  		return true
  3880  	}
  3881  	return false
  3882  }
  3883  func rewriteValueARM64_OpARM64CSNEG(v *Value) bool {
  3884  	v_2 := v.Args[2]
  3885  	v_1 := v.Args[1]
  3886  	v_0 := v.Args[0]
  3887  	// match: (CSNEG [cc] x y (InvertFlags cmp))
  3888  	// result: (CSNEG [arm64Invert(cc)] x y cmp)
  3889  	for {
  3890  		cc := auxIntToOp(v.AuxInt)
  3891  		x := v_0
  3892  		y := v_1
  3893  		if v_2.Op != OpARM64InvertFlags {
  3894  			break
  3895  		}
  3896  		cmp := v_2.Args[0]
  3897  		v.reset(OpARM64CSNEG)
  3898  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  3899  		v.AddArg3(x, y, cmp)
  3900  		return true
  3901  	}
  3902  	// match: (CSNEG [cc] x _ flag)
  3903  	// cond: ccARM64Eval(cc, flag) > 0
  3904  	// result: x
  3905  	for {
  3906  		cc := auxIntToOp(v.AuxInt)
  3907  		x := v_0
  3908  		flag := v_2
  3909  		if !(ccARM64Eval(cc, flag) > 0) {
  3910  			break
  3911  		}
  3912  		v.copyOf(x)
  3913  		return true
  3914  	}
  3915  	// match: (CSNEG [cc] _ y flag)
  3916  	// cond: ccARM64Eval(cc, flag) < 0
  3917  	// result: (NEG y)
  3918  	for {
  3919  		cc := auxIntToOp(v.AuxInt)
  3920  		y := v_1
  3921  		flag := v_2
  3922  		if !(ccARM64Eval(cc, flag) < 0) {
  3923  			break
  3924  		}
  3925  		v.reset(OpARM64NEG)
  3926  		v.AddArg(y)
  3927  		return true
  3928  	}
  3929  	return false
  3930  }
  3931  func rewriteValueARM64_OpARM64DIV(v *Value) bool {
  3932  	v_1 := v.Args[1]
  3933  	v_0 := v.Args[0]
  3934  	// match: (DIV (MOVDconst [c]) (MOVDconst [d]))
  3935  	// cond: d != 0
  3936  	// result: (MOVDconst [c/d])
  3937  	for {
  3938  		if v_0.Op != OpARM64MOVDconst {
  3939  			break
  3940  		}
  3941  		c := auxIntToInt64(v_0.AuxInt)
  3942  		if v_1.Op != OpARM64MOVDconst {
  3943  			break
  3944  		}
  3945  		d := auxIntToInt64(v_1.AuxInt)
  3946  		if !(d != 0) {
  3947  			break
  3948  		}
  3949  		v.reset(OpARM64MOVDconst)
  3950  		v.AuxInt = int64ToAuxInt(c / d)
  3951  		return true
  3952  	}
  3953  	return false
  3954  }
  3955  func rewriteValueARM64_OpARM64DIVW(v *Value) bool {
  3956  	v_1 := v.Args[1]
  3957  	v_0 := v.Args[0]
  3958  	// match: (DIVW (MOVDconst [c]) (MOVDconst [d]))
  3959  	// cond: d != 0
  3960  	// result: (MOVDconst [int64(uint32(int32(c)/int32(d)))])
  3961  	for {
  3962  		if v_0.Op != OpARM64MOVDconst {
  3963  			break
  3964  		}
  3965  		c := auxIntToInt64(v_0.AuxInt)
  3966  		if v_1.Op != OpARM64MOVDconst {
  3967  			break
  3968  		}
  3969  		d := auxIntToInt64(v_1.AuxInt)
  3970  		if !(d != 0) {
  3971  			break
  3972  		}
  3973  		v.reset(OpARM64MOVDconst)
  3974  		v.AuxInt = int64ToAuxInt(int64(uint32(int32(c) / int32(d))))
  3975  		return true
  3976  	}
  3977  	return false
  3978  }
  3979  func rewriteValueARM64_OpARM64EON(v *Value) bool {
  3980  	v_1 := v.Args[1]
  3981  	v_0 := v.Args[0]
  3982  	// match: (EON x (MOVDconst [c]))
  3983  	// result: (XORconst [^c] x)
  3984  	for {
  3985  		x := v_0
  3986  		if v_1.Op != OpARM64MOVDconst {
  3987  			break
  3988  		}
  3989  		c := auxIntToInt64(v_1.AuxInt)
  3990  		v.reset(OpARM64XORconst)
  3991  		v.AuxInt = int64ToAuxInt(^c)
  3992  		v.AddArg(x)
  3993  		return true
  3994  	}
  3995  	// match: (EON x x)
  3996  	// result: (MOVDconst [-1])
  3997  	for {
  3998  		x := v_0
  3999  		if x != v_1 {
  4000  			break
  4001  		}
  4002  		v.reset(OpARM64MOVDconst)
  4003  		v.AuxInt = int64ToAuxInt(-1)
  4004  		return true
  4005  	}
  4006  	// match: (EON x0 x1:(SLLconst [c] y))
  4007  	// cond: clobberIfDead(x1)
  4008  	// result: (EONshiftLL x0 y [c])
  4009  	for {
  4010  		x0 := v_0
  4011  		x1 := v_1
  4012  		if x1.Op != OpARM64SLLconst {
  4013  			break
  4014  		}
  4015  		c := auxIntToInt64(x1.AuxInt)
  4016  		y := x1.Args[0]
  4017  		if !(clobberIfDead(x1)) {
  4018  			break
  4019  		}
  4020  		v.reset(OpARM64EONshiftLL)
  4021  		v.AuxInt = int64ToAuxInt(c)
  4022  		v.AddArg2(x0, y)
  4023  		return true
  4024  	}
  4025  	// match: (EON x0 x1:(SRLconst [c] y))
  4026  	// cond: clobberIfDead(x1)
  4027  	// result: (EONshiftRL x0 y [c])
  4028  	for {
  4029  		x0 := v_0
  4030  		x1 := v_1
  4031  		if x1.Op != OpARM64SRLconst {
  4032  			break
  4033  		}
  4034  		c := auxIntToInt64(x1.AuxInt)
  4035  		y := x1.Args[0]
  4036  		if !(clobberIfDead(x1)) {
  4037  			break
  4038  		}
  4039  		v.reset(OpARM64EONshiftRL)
  4040  		v.AuxInt = int64ToAuxInt(c)
  4041  		v.AddArg2(x0, y)
  4042  		return true
  4043  	}
  4044  	// match: (EON x0 x1:(SRAconst [c] y))
  4045  	// cond: clobberIfDead(x1)
  4046  	// result: (EONshiftRA x0 y [c])
  4047  	for {
  4048  		x0 := v_0
  4049  		x1 := v_1
  4050  		if x1.Op != OpARM64SRAconst {
  4051  			break
  4052  		}
  4053  		c := auxIntToInt64(x1.AuxInt)
  4054  		y := x1.Args[0]
  4055  		if !(clobberIfDead(x1)) {
  4056  			break
  4057  		}
  4058  		v.reset(OpARM64EONshiftRA)
  4059  		v.AuxInt = int64ToAuxInt(c)
  4060  		v.AddArg2(x0, y)
  4061  		return true
  4062  	}
  4063  	// match: (EON x0 x1:(RORconst [c] y))
  4064  	// cond: clobberIfDead(x1)
  4065  	// result: (EONshiftRO x0 y [c])
  4066  	for {
  4067  		x0 := v_0
  4068  		x1 := v_1
  4069  		if x1.Op != OpARM64RORconst {
  4070  			break
  4071  		}
  4072  		c := auxIntToInt64(x1.AuxInt)
  4073  		y := x1.Args[0]
  4074  		if !(clobberIfDead(x1)) {
  4075  			break
  4076  		}
  4077  		v.reset(OpARM64EONshiftRO)
  4078  		v.AuxInt = int64ToAuxInt(c)
  4079  		v.AddArg2(x0, y)
  4080  		return true
  4081  	}
  4082  	return false
  4083  }
  4084  func rewriteValueARM64_OpARM64EONshiftLL(v *Value) bool {
  4085  	v_1 := v.Args[1]
  4086  	v_0 := v.Args[0]
  4087  	// match: (EONshiftLL x (MOVDconst [c]) [d])
  4088  	// result: (XORconst x [^int64(uint64(c)<<uint64(d))])
  4089  	for {
  4090  		d := auxIntToInt64(v.AuxInt)
  4091  		x := v_0
  4092  		if v_1.Op != OpARM64MOVDconst {
  4093  			break
  4094  		}
  4095  		c := auxIntToInt64(v_1.AuxInt)
  4096  		v.reset(OpARM64XORconst)
  4097  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
  4098  		v.AddArg(x)
  4099  		return true
  4100  	}
  4101  	// match: (EONshiftLL (SLLconst x [c]) x [c])
  4102  	// result: (MOVDconst [-1])
  4103  	for {
  4104  		c := auxIntToInt64(v.AuxInt)
  4105  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
  4106  			break
  4107  		}
  4108  		x := v_0.Args[0]
  4109  		if x != v_1 {
  4110  			break
  4111  		}
  4112  		v.reset(OpARM64MOVDconst)
  4113  		v.AuxInt = int64ToAuxInt(-1)
  4114  		return true
  4115  	}
  4116  	return false
  4117  }
  4118  func rewriteValueARM64_OpARM64EONshiftRA(v *Value) bool {
  4119  	v_1 := v.Args[1]
  4120  	v_0 := v.Args[0]
  4121  	// match: (EONshiftRA x (MOVDconst [c]) [d])
  4122  	// result: (XORconst x [^(c>>uint64(d))])
  4123  	for {
  4124  		d := auxIntToInt64(v.AuxInt)
  4125  		x := v_0
  4126  		if v_1.Op != OpARM64MOVDconst {
  4127  			break
  4128  		}
  4129  		c := auxIntToInt64(v_1.AuxInt)
  4130  		v.reset(OpARM64XORconst)
  4131  		v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
  4132  		v.AddArg(x)
  4133  		return true
  4134  	}
  4135  	// match: (EONshiftRA (SRAconst x [c]) x [c])
  4136  	// result: (MOVDconst [-1])
  4137  	for {
  4138  		c := auxIntToInt64(v.AuxInt)
  4139  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
  4140  			break
  4141  		}
  4142  		x := v_0.Args[0]
  4143  		if x != v_1 {
  4144  			break
  4145  		}
  4146  		v.reset(OpARM64MOVDconst)
  4147  		v.AuxInt = int64ToAuxInt(-1)
  4148  		return true
  4149  	}
  4150  	return false
  4151  }
  4152  func rewriteValueARM64_OpARM64EONshiftRL(v *Value) bool {
  4153  	v_1 := v.Args[1]
  4154  	v_0 := v.Args[0]
  4155  	// match: (EONshiftRL x (MOVDconst [c]) [d])
  4156  	// result: (XORconst x [^int64(uint64(c)>>uint64(d))])
  4157  	for {
  4158  		d := auxIntToInt64(v.AuxInt)
  4159  		x := v_0
  4160  		if v_1.Op != OpARM64MOVDconst {
  4161  			break
  4162  		}
  4163  		c := auxIntToInt64(v_1.AuxInt)
  4164  		v.reset(OpARM64XORconst)
  4165  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
  4166  		v.AddArg(x)
  4167  		return true
  4168  	}
  4169  	// match: (EONshiftRL (SRLconst x [c]) x [c])
  4170  	// result: (MOVDconst [-1])
  4171  	for {
  4172  		c := auxIntToInt64(v.AuxInt)
  4173  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
  4174  			break
  4175  		}
  4176  		x := v_0.Args[0]
  4177  		if x != v_1 {
  4178  			break
  4179  		}
  4180  		v.reset(OpARM64MOVDconst)
  4181  		v.AuxInt = int64ToAuxInt(-1)
  4182  		return true
  4183  	}
  4184  	return false
  4185  }
  4186  func rewriteValueARM64_OpARM64EONshiftRO(v *Value) bool {
  4187  	v_1 := v.Args[1]
  4188  	v_0 := v.Args[0]
  4189  	// match: (EONshiftRO x (MOVDconst [c]) [d])
  4190  	// result: (XORconst x [^rotateRight64(c, d)])
  4191  	for {
  4192  		d := auxIntToInt64(v.AuxInt)
  4193  		x := v_0
  4194  		if v_1.Op != OpARM64MOVDconst {
  4195  			break
  4196  		}
  4197  		c := auxIntToInt64(v_1.AuxInt)
  4198  		v.reset(OpARM64XORconst)
  4199  		v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
  4200  		v.AddArg(x)
  4201  		return true
  4202  	}
  4203  	// match: (EONshiftRO (RORconst x [c]) x [c])
  4204  	// result: (MOVDconst [-1])
  4205  	for {
  4206  		c := auxIntToInt64(v.AuxInt)
  4207  		if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
  4208  			break
  4209  		}
  4210  		x := v_0.Args[0]
  4211  		if x != v_1 {
  4212  			break
  4213  		}
  4214  		v.reset(OpARM64MOVDconst)
  4215  		v.AuxInt = int64ToAuxInt(-1)
  4216  		return true
  4217  	}
  4218  	return false
  4219  }
  4220  func rewriteValueARM64_OpARM64Equal(v *Value) bool {
  4221  	v_0 := v.Args[0]
  4222  	b := v.Block
  4223  	// match: (Equal (CMPconst [0] z:(AND x y)))
  4224  	// cond: z.Uses == 1
  4225  	// result: (Equal (TST x y))
  4226  	for {
  4227  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  4228  			break
  4229  		}
  4230  		z := v_0.Args[0]
  4231  		if z.Op != OpARM64AND {
  4232  			break
  4233  		}
  4234  		y := z.Args[1]
  4235  		x := z.Args[0]
  4236  		if !(z.Uses == 1) {
  4237  			break
  4238  		}
  4239  		v.reset(OpARM64Equal)
  4240  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  4241  		v0.AddArg2(x, y)
  4242  		v.AddArg(v0)
  4243  		return true
  4244  	}
  4245  	// match: (Equal (CMPWconst [0] x:(ANDconst [c] y)))
  4246  	// cond: x.Uses == 1
  4247  	// result: (Equal (TSTWconst [int32(c)] y))
  4248  	for {
  4249  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  4250  			break
  4251  		}
  4252  		x := v_0.Args[0]
  4253  		if x.Op != OpARM64ANDconst {
  4254  			break
  4255  		}
  4256  		c := auxIntToInt64(x.AuxInt)
  4257  		y := x.Args[0]
  4258  		if !(x.Uses == 1) {
  4259  			break
  4260  		}
  4261  		v.reset(OpARM64Equal)
  4262  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  4263  		v0.AuxInt = int32ToAuxInt(int32(c))
  4264  		v0.AddArg(y)
  4265  		v.AddArg(v0)
  4266  		return true
  4267  	}
  4268  	// match: (Equal (CMPWconst [0] z:(AND x y)))
  4269  	// cond: z.Uses == 1
  4270  	// result: (Equal (TSTW x y))
  4271  	for {
  4272  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  4273  			break
  4274  		}
  4275  		z := v_0.Args[0]
  4276  		if z.Op != OpARM64AND {
  4277  			break
  4278  		}
  4279  		y := z.Args[1]
  4280  		x := z.Args[0]
  4281  		if !(z.Uses == 1) {
  4282  			break
  4283  		}
  4284  		v.reset(OpARM64Equal)
  4285  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  4286  		v0.AddArg2(x, y)
  4287  		v.AddArg(v0)
  4288  		return true
  4289  	}
  4290  	// match: (Equal (CMPconst [0] x:(ANDconst [c] y)))
  4291  	// cond: x.Uses == 1
  4292  	// result: (Equal (TSTconst [c] y))
  4293  	for {
  4294  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  4295  			break
  4296  		}
  4297  		x := v_0.Args[0]
  4298  		if x.Op != OpARM64ANDconst {
  4299  			break
  4300  		}
  4301  		c := auxIntToInt64(x.AuxInt)
  4302  		y := x.Args[0]
  4303  		if !(x.Uses == 1) {
  4304  			break
  4305  		}
  4306  		v.reset(OpARM64Equal)
  4307  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  4308  		v0.AuxInt = int64ToAuxInt(c)
  4309  		v0.AddArg(y)
  4310  		v.AddArg(v0)
  4311  		return true
  4312  	}
  4313  	// match: (Equal (CMP x z:(NEG y)))
  4314  	// cond: z.Uses == 1
  4315  	// result: (Equal (CMN x y))
  4316  	for {
  4317  		if v_0.Op != OpARM64CMP {
  4318  			break
  4319  		}
  4320  		_ = v_0.Args[1]
  4321  		x := v_0.Args[0]
  4322  		z := v_0.Args[1]
  4323  		if z.Op != OpARM64NEG {
  4324  			break
  4325  		}
  4326  		y := z.Args[0]
  4327  		if !(z.Uses == 1) {
  4328  			break
  4329  		}
  4330  		v.reset(OpARM64Equal)
  4331  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  4332  		v0.AddArg2(x, y)
  4333  		v.AddArg(v0)
  4334  		return true
  4335  	}
  4336  	// match: (Equal (CMPW x z:(NEG y)))
  4337  	// cond: z.Uses == 1
  4338  	// result: (Equal (CMNW x y))
  4339  	for {
  4340  		if v_0.Op != OpARM64CMPW {
  4341  			break
  4342  		}
  4343  		_ = v_0.Args[1]
  4344  		x := v_0.Args[0]
  4345  		z := v_0.Args[1]
  4346  		if z.Op != OpARM64NEG {
  4347  			break
  4348  		}
  4349  		y := z.Args[0]
  4350  		if !(z.Uses == 1) {
  4351  			break
  4352  		}
  4353  		v.reset(OpARM64Equal)
  4354  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  4355  		v0.AddArg2(x, y)
  4356  		v.AddArg(v0)
  4357  		return true
  4358  	}
  4359  	// match: (Equal (CMPconst [0] x:(ADDconst [c] y)))
  4360  	// cond: x.Uses == 1
  4361  	// result: (Equal (CMNconst [c] y))
  4362  	for {
  4363  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  4364  			break
  4365  		}
  4366  		x := v_0.Args[0]
  4367  		if x.Op != OpARM64ADDconst {
  4368  			break
  4369  		}
  4370  		c := auxIntToInt64(x.AuxInt)
  4371  		y := x.Args[0]
  4372  		if !(x.Uses == 1) {
  4373  			break
  4374  		}
  4375  		v.reset(OpARM64Equal)
  4376  		v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
  4377  		v0.AuxInt = int64ToAuxInt(c)
  4378  		v0.AddArg(y)
  4379  		v.AddArg(v0)
  4380  		return true
  4381  	}
  4382  	// match: (Equal (CMPWconst [0] x:(ADDconst [c] y)))
  4383  	// cond: x.Uses == 1
  4384  	// result: (Equal (CMNWconst [int32(c)] y))
  4385  	for {
  4386  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  4387  			break
  4388  		}
  4389  		x := v_0.Args[0]
  4390  		if x.Op != OpARM64ADDconst {
  4391  			break
  4392  		}
  4393  		c := auxIntToInt64(x.AuxInt)
  4394  		y := x.Args[0]
  4395  		if !(x.Uses == 1) {
  4396  			break
  4397  		}
  4398  		v.reset(OpARM64Equal)
  4399  		v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
  4400  		v0.AuxInt = int32ToAuxInt(int32(c))
  4401  		v0.AddArg(y)
  4402  		v.AddArg(v0)
  4403  		return true
  4404  	}
  4405  	// match: (Equal (CMPconst [0] z:(ADD x y)))
  4406  	// cond: z.Uses == 1
  4407  	// result: (Equal (CMN x y))
  4408  	for {
  4409  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  4410  			break
  4411  		}
  4412  		z := v_0.Args[0]
  4413  		if z.Op != OpARM64ADD {
  4414  			break
  4415  		}
  4416  		y := z.Args[1]
  4417  		x := z.Args[0]
  4418  		if !(z.Uses == 1) {
  4419  			break
  4420  		}
  4421  		v.reset(OpARM64Equal)
  4422  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  4423  		v0.AddArg2(x, y)
  4424  		v.AddArg(v0)
  4425  		return true
  4426  	}
  4427  	// match: (Equal (CMPWconst [0] z:(ADD x y)))
  4428  	// cond: z.Uses == 1
  4429  	// result: (Equal (CMNW x y))
  4430  	for {
  4431  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  4432  			break
  4433  		}
  4434  		z := v_0.Args[0]
  4435  		if z.Op != OpARM64ADD {
  4436  			break
  4437  		}
  4438  		y := z.Args[1]
  4439  		x := z.Args[0]
  4440  		if !(z.Uses == 1) {
  4441  			break
  4442  		}
  4443  		v.reset(OpARM64Equal)
  4444  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  4445  		v0.AddArg2(x, y)
  4446  		v.AddArg(v0)
  4447  		return true
  4448  	}
  4449  	// match: (Equal (CMPconst [0] z:(MADD a x y)))
  4450  	// cond: z.Uses == 1
  4451  	// result: (Equal (CMN a (MUL <x.Type> x y)))
  4452  	for {
  4453  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  4454  			break
  4455  		}
  4456  		z := v_0.Args[0]
  4457  		if z.Op != OpARM64MADD {
  4458  			break
  4459  		}
  4460  		y := z.Args[2]
  4461  		a := z.Args[0]
  4462  		x := z.Args[1]
  4463  		if !(z.Uses == 1) {
  4464  			break
  4465  		}
  4466  		v.reset(OpARM64Equal)
  4467  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  4468  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  4469  		v1.AddArg2(x, y)
  4470  		v0.AddArg2(a, v1)
  4471  		v.AddArg(v0)
  4472  		return true
  4473  	}
  4474  	// match: (Equal (CMPconst [0] z:(MSUB a x y)))
  4475  	// cond: z.Uses == 1
  4476  	// result: (Equal (CMP a (MUL <x.Type> x y)))
  4477  	for {
  4478  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  4479  			break
  4480  		}
  4481  		z := v_0.Args[0]
  4482  		if z.Op != OpARM64MSUB {
  4483  			break
  4484  		}
  4485  		y := z.Args[2]
  4486  		a := z.Args[0]
  4487  		x := z.Args[1]
  4488  		if !(z.Uses == 1) {
  4489  			break
  4490  		}
  4491  		v.reset(OpARM64Equal)
  4492  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
  4493  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  4494  		v1.AddArg2(x, y)
  4495  		v0.AddArg2(a, v1)
  4496  		v.AddArg(v0)
  4497  		return true
  4498  	}
  4499  	// match: (Equal (CMPWconst [0] z:(MADDW a x y)))
  4500  	// cond: z.Uses == 1
  4501  	// result: (Equal (CMNW a (MULW <x.Type> x y)))
  4502  	for {
  4503  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  4504  			break
  4505  		}
  4506  		z := v_0.Args[0]
  4507  		if z.Op != OpARM64MADDW {
  4508  			break
  4509  		}
  4510  		y := z.Args[2]
  4511  		a := z.Args[0]
  4512  		x := z.Args[1]
  4513  		if !(z.Uses == 1) {
  4514  			break
  4515  		}
  4516  		v.reset(OpARM64Equal)
  4517  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  4518  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  4519  		v1.AddArg2(x, y)
  4520  		v0.AddArg2(a, v1)
  4521  		v.AddArg(v0)
  4522  		return true
  4523  	}
  4524  	// match: (Equal (CMPWconst [0] z:(MSUBW a x y)))
  4525  	// cond: z.Uses == 1
  4526  	// result: (Equal (CMPW a (MULW <x.Type> x y)))
  4527  	for {
  4528  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  4529  			break
  4530  		}
  4531  		z := v_0.Args[0]
  4532  		if z.Op != OpARM64MSUBW {
  4533  			break
  4534  		}
  4535  		y := z.Args[2]
  4536  		a := z.Args[0]
  4537  		x := z.Args[1]
  4538  		if !(z.Uses == 1) {
  4539  			break
  4540  		}
  4541  		v.reset(OpARM64Equal)
  4542  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
  4543  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  4544  		v1.AddArg2(x, y)
  4545  		v0.AddArg2(a, v1)
  4546  		v.AddArg(v0)
  4547  		return true
  4548  	}
  4549  	// match: (Equal (FlagConstant [fc]))
  4550  	// result: (MOVDconst [b2i(fc.eq())])
  4551  	for {
  4552  		if v_0.Op != OpARM64FlagConstant {
  4553  			break
  4554  		}
  4555  		fc := auxIntToFlagConstant(v_0.AuxInt)
  4556  		v.reset(OpARM64MOVDconst)
  4557  		v.AuxInt = int64ToAuxInt(b2i(fc.eq()))
  4558  		return true
  4559  	}
  4560  	// match: (Equal (InvertFlags x))
  4561  	// result: (Equal x)
  4562  	for {
  4563  		if v_0.Op != OpARM64InvertFlags {
  4564  			break
  4565  		}
  4566  		x := v_0.Args[0]
  4567  		v.reset(OpARM64Equal)
  4568  		v.AddArg(x)
  4569  		return true
  4570  	}
  4571  	return false
  4572  }
  4573  func rewriteValueARM64_OpARM64FADDD(v *Value) bool {
  4574  	v_1 := v.Args[1]
  4575  	v_0 := v.Args[0]
  4576  	// match: (FADDD a (FMULD x y))
  4577  	// cond: a.Block.Func.useFMA(v)
  4578  	// result: (FMADDD a x y)
  4579  	for {
  4580  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4581  			a := v_0
  4582  			if v_1.Op != OpARM64FMULD {
  4583  				continue
  4584  			}
  4585  			y := v_1.Args[1]
  4586  			x := v_1.Args[0]
  4587  			if !(a.Block.Func.useFMA(v)) {
  4588  				continue
  4589  			}
  4590  			v.reset(OpARM64FMADDD)
  4591  			v.AddArg3(a, x, y)
  4592  			return true
  4593  		}
  4594  		break
  4595  	}
  4596  	// match: (FADDD a (FNMULD x y))
  4597  	// cond: a.Block.Func.useFMA(v)
  4598  	// result: (FMSUBD a x y)
  4599  	for {
  4600  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4601  			a := v_0
  4602  			if v_1.Op != OpARM64FNMULD {
  4603  				continue
  4604  			}
  4605  			y := v_1.Args[1]
  4606  			x := v_1.Args[0]
  4607  			if !(a.Block.Func.useFMA(v)) {
  4608  				continue
  4609  			}
  4610  			v.reset(OpARM64FMSUBD)
  4611  			v.AddArg3(a, x, y)
  4612  			return true
  4613  		}
  4614  		break
  4615  	}
  4616  	return false
  4617  }
  4618  func rewriteValueARM64_OpARM64FADDS(v *Value) bool {
  4619  	v_1 := v.Args[1]
  4620  	v_0 := v.Args[0]
  4621  	// match: (FADDS a (FMULS x y))
  4622  	// cond: a.Block.Func.useFMA(v)
  4623  	// result: (FMADDS a x y)
  4624  	for {
  4625  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4626  			a := v_0
  4627  			if v_1.Op != OpARM64FMULS {
  4628  				continue
  4629  			}
  4630  			y := v_1.Args[1]
  4631  			x := v_1.Args[0]
  4632  			if !(a.Block.Func.useFMA(v)) {
  4633  				continue
  4634  			}
  4635  			v.reset(OpARM64FMADDS)
  4636  			v.AddArg3(a, x, y)
  4637  			return true
  4638  		}
  4639  		break
  4640  	}
  4641  	// match: (FADDS a (FNMULS x y))
  4642  	// cond: a.Block.Func.useFMA(v)
  4643  	// result: (FMSUBS a x y)
  4644  	for {
  4645  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4646  			a := v_0
  4647  			if v_1.Op != OpARM64FNMULS {
  4648  				continue
  4649  			}
  4650  			y := v_1.Args[1]
  4651  			x := v_1.Args[0]
  4652  			if !(a.Block.Func.useFMA(v)) {
  4653  				continue
  4654  			}
  4655  			v.reset(OpARM64FMSUBS)
  4656  			v.AddArg3(a, x, y)
  4657  			return true
  4658  		}
  4659  		break
  4660  	}
  4661  	return false
  4662  }
  4663  func rewriteValueARM64_OpARM64FCMPD(v *Value) bool {
  4664  	v_1 := v.Args[1]
  4665  	v_0 := v.Args[0]
  4666  	b := v.Block
  4667  	// match: (FCMPD x (FMOVDconst [0]))
  4668  	// result: (FCMPD0 x)
  4669  	for {
  4670  		x := v_0
  4671  		if v_1.Op != OpARM64FMOVDconst || auxIntToFloat64(v_1.AuxInt) != 0 {
  4672  			break
  4673  		}
  4674  		v.reset(OpARM64FCMPD0)
  4675  		v.AddArg(x)
  4676  		return true
  4677  	}
  4678  	// match: (FCMPD (FMOVDconst [0]) x)
  4679  	// result: (InvertFlags (FCMPD0 x))
  4680  	for {
  4681  		if v_0.Op != OpARM64FMOVDconst || auxIntToFloat64(v_0.AuxInt) != 0 {
  4682  			break
  4683  		}
  4684  		x := v_1
  4685  		v.reset(OpARM64InvertFlags)
  4686  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD0, types.TypeFlags)
  4687  		v0.AddArg(x)
  4688  		v.AddArg(v0)
  4689  		return true
  4690  	}
  4691  	return false
  4692  }
  4693  func rewriteValueARM64_OpARM64FCMPS(v *Value) bool {
  4694  	v_1 := v.Args[1]
  4695  	v_0 := v.Args[0]
  4696  	b := v.Block
  4697  	// match: (FCMPS x (FMOVSconst [0]))
  4698  	// result: (FCMPS0 x)
  4699  	for {
  4700  		x := v_0
  4701  		if v_1.Op != OpARM64FMOVSconst || auxIntToFloat64(v_1.AuxInt) != 0 {
  4702  			break
  4703  		}
  4704  		v.reset(OpARM64FCMPS0)
  4705  		v.AddArg(x)
  4706  		return true
  4707  	}
  4708  	// match: (FCMPS (FMOVSconst [0]) x)
  4709  	// result: (InvertFlags (FCMPS0 x))
  4710  	for {
  4711  		if v_0.Op != OpARM64FMOVSconst || auxIntToFloat64(v_0.AuxInt) != 0 {
  4712  			break
  4713  		}
  4714  		x := v_1
  4715  		v.reset(OpARM64InvertFlags)
  4716  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS0, types.TypeFlags)
  4717  		v0.AddArg(x)
  4718  		v.AddArg(v0)
  4719  		return true
  4720  	}
  4721  	return false
  4722  }
  4723  func rewriteValueARM64_OpARM64FMOVDfpgp(v *Value) bool {
  4724  	v_0 := v.Args[0]
  4725  	b := v.Block
  4726  	// match: (FMOVDfpgp <t> (Arg [off] {sym}))
  4727  	// result: @b.Func.Entry (Arg <t> [off] {sym})
  4728  	for {
  4729  		t := v.Type
  4730  		if v_0.Op != OpArg {
  4731  			break
  4732  		}
  4733  		off := auxIntToInt32(v_0.AuxInt)
  4734  		sym := auxToSym(v_0.Aux)
  4735  		b = b.Func.Entry
  4736  		v0 := b.NewValue0(v.Pos, OpArg, t)
  4737  		v.copyOf(v0)
  4738  		v0.AuxInt = int32ToAuxInt(off)
  4739  		v0.Aux = symToAux(sym)
  4740  		return true
  4741  	}
  4742  	return false
  4743  }
  4744  func rewriteValueARM64_OpARM64FMOVDgpfp(v *Value) bool {
  4745  	v_0 := v.Args[0]
  4746  	b := v.Block
  4747  	// match: (FMOVDgpfp <t> (Arg [off] {sym}))
  4748  	// result: @b.Func.Entry (Arg <t> [off] {sym})
  4749  	for {
  4750  		t := v.Type
  4751  		if v_0.Op != OpArg {
  4752  			break
  4753  		}
  4754  		off := auxIntToInt32(v_0.AuxInt)
  4755  		sym := auxToSym(v_0.Aux)
  4756  		b = b.Func.Entry
  4757  		v0 := b.NewValue0(v.Pos, OpArg, t)
  4758  		v.copyOf(v0)
  4759  		v0.AuxInt = int32ToAuxInt(off)
  4760  		v0.Aux = symToAux(sym)
  4761  		return true
  4762  	}
  4763  	return false
  4764  }
  4765  func rewriteValueARM64_OpARM64FMOVDload(v *Value) bool {
  4766  	v_1 := v.Args[1]
  4767  	v_0 := v.Args[0]
  4768  	b := v.Block
  4769  	config := b.Func.Config
  4770  	// match: (FMOVDload [off] {sym} ptr (MOVDstore [off] {sym} ptr val _))
  4771  	// result: (FMOVDgpfp val)
  4772  	for {
  4773  		off := auxIntToInt32(v.AuxInt)
  4774  		sym := auxToSym(v.Aux)
  4775  		ptr := v_0
  4776  		if v_1.Op != OpARM64MOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  4777  			break
  4778  		}
  4779  		val := v_1.Args[1]
  4780  		if ptr != v_1.Args[0] {
  4781  			break
  4782  		}
  4783  		v.reset(OpARM64FMOVDgpfp)
  4784  		v.AddArg(val)
  4785  		return true
  4786  	}
  4787  	// match: (FMOVDload [off1] {sym} (ADDconst [off2] ptr) mem)
  4788  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  4789  	// result: (FMOVDload [off1+int32(off2)] {sym} ptr mem)
  4790  	for {
  4791  		off1 := auxIntToInt32(v.AuxInt)
  4792  		sym := auxToSym(v.Aux)
  4793  		if v_0.Op != OpARM64ADDconst {
  4794  			break
  4795  		}
  4796  		off2 := auxIntToInt64(v_0.AuxInt)
  4797  		ptr := v_0.Args[0]
  4798  		mem := v_1
  4799  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  4800  			break
  4801  		}
  4802  		v.reset(OpARM64FMOVDload)
  4803  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  4804  		v.Aux = symToAux(sym)
  4805  		v.AddArg2(ptr, mem)
  4806  		return true
  4807  	}
  4808  	// match: (FMOVDload [off] {sym} (ADD ptr idx) mem)
  4809  	// cond: off == 0 && sym == nil
  4810  	// result: (FMOVDloadidx ptr idx mem)
  4811  	for {
  4812  		off := auxIntToInt32(v.AuxInt)
  4813  		sym := auxToSym(v.Aux)
  4814  		if v_0.Op != OpARM64ADD {
  4815  			break
  4816  		}
  4817  		idx := v_0.Args[1]
  4818  		ptr := v_0.Args[0]
  4819  		mem := v_1
  4820  		if !(off == 0 && sym == nil) {
  4821  			break
  4822  		}
  4823  		v.reset(OpARM64FMOVDloadidx)
  4824  		v.AddArg3(ptr, idx, mem)
  4825  		return true
  4826  	}
  4827  	// match: (FMOVDload [off] {sym} (ADDshiftLL [3] ptr idx) mem)
  4828  	// cond: off == 0 && sym == nil
  4829  	// result: (FMOVDloadidx8 ptr idx mem)
  4830  	for {
  4831  		off := auxIntToInt32(v.AuxInt)
  4832  		sym := auxToSym(v.Aux)
  4833  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
  4834  			break
  4835  		}
  4836  		idx := v_0.Args[1]
  4837  		ptr := v_0.Args[0]
  4838  		mem := v_1
  4839  		if !(off == 0 && sym == nil) {
  4840  			break
  4841  		}
  4842  		v.reset(OpARM64FMOVDloadidx8)
  4843  		v.AddArg3(ptr, idx, mem)
  4844  		return true
  4845  	}
  4846  	// match: (FMOVDload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  4847  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  4848  	// result: (FMOVDload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  4849  	for {
  4850  		off1 := auxIntToInt32(v.AuxInt)
  4851  		sym1 := auxToSym(v.Aux)
  4852  		if v_0.Op != OpARM64MOVDaddr {
  4853  			break
  4854  		}
  4855  		off2 := auxIntToInt32(v_0.AuxInt)
  4856  		sym2 := auxToSym(v_0.Aux)
  4857  		ptr := v_0.Args[0]
  4858  		mem := v_1
  4859  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  4860  			break
  4861  		}
  4862  		v.reset(OpARM64FMOVDload)
  4863  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4864  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4865  		v.AddArg2(ptr, mem)
  4866  		return true
  4867  	}
  4868  	return false
  4869  }
  4870  func rewriteValueARM64_OpARM64FMOVDloadidx(v *Value) bool {
  4871  	v_2 := v.Args[2]
  4872  	v_1 := v.Args[1]
  4873  	v_0 := v.Args[0]
  4874  	// match: (FMOVDloadidx ptr (MOVDconst [c]) mem)
  4875  	// cond: is32Bit(c)
  4876  	// result: (FMOVDload [int32(c)] ptr mem)
  4877  	for {
  4878  		ptr := v_0
  4879  		if v_1.Op != OpARM64MOVDconst {
  4880  			break
  4881  		}
  4882  		c := auxIntToInt64(v_1.AuxInt)
  4883  		mem := v_2
  4884  		if !(is32Bit(c)) {
  4885  			break
  4886  		}
  4887  		v.reset(OpARM64FMOVDload)
  4888  		v.AuxInt = int32ToAuxInt(int32(c))
  4889  		v.AddArg2(ptr, mem)
  4890  		return true
  4891  	}
  4892  	// match: (FMOVDloadidx (MOVDconst [c]) ptr mem)
  4893  	// cond: is32Bit(c)
  4894  	// result: (FMOVDload [int32(c)] ptr mem)
  4895  	for {
  4896  		if v_0.Op != OpARM64MOVDconst {
  4897  			break
  4898  		}
  4899  		c := auxIntToInt64(v_0.AuxInt)
  4900  		ptr := v_1
  4901  		mem := v_2
  4902  		if !(is32Bit(c)) {
  4903  			break
  4904  		}
  4905  		v.reset(OpARM64FMOVDload)
  4906  		v.AuxInt = int32ToAuxInt(int32(c))
  4907  		v.AddArg2(ptr, mem)
  4908  		return true
  4909  	}
  4910  	// match: (FMOVDloadidx ptr (SLLconst [3] idx) mem)
  4911  	// result: (FMOVDloadidx8 ptr idx mem)
  4912  	for {
  4913  		ptr := v_0
  4914  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
  4915  			break
  4916  		}
  4917  		idx := v_1.Args[0]
  4918  		mem := v_2
  4919  		v.reset(OpARM64FMOVDloadidx8)
  4920  		v.AddArg3(ptr, idx, mem)
  4921  		return true
  4922  	}
  4923  	// match: (FMOVDloadidx (SLLconst [3] idx) ptr mem)
  4924  	// result: (FMOVDloadidx8 ptr idx mem)
  4925  	for {
  4926  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
  4927  			break
  4928  		}
  4929  		idx := v_0.Args[0]
  4930  		ptr := v_1
  4931  		mem := v_2
  4932  		v.reset(OpARM64FMOVDloadidx8)
  4933  		v.AddArg3(ptr, idx, mem)
  4934  		return true
  4935  	}
  4936  	return false
  4937  }
  4938  func rewriteValueARM64_OpARM64FMOVDloadidx8(v *Value) bool {
  4939  	v_2 := v.Args[2]
  4940  	v_1 := v.Args[1]
  4941  	v_0 := v.Args[0]
  4942  	// match: (FMOVDloadidx8 ptr (MOVDconst [c]) mem)
  4943  	// cond: is32Bit(c<<3)
  4944  	// result: (FMOVDload ptr [int32(c)<<3] mem)
  4945  	for {
  4946  		ptr := v_0
  4947  		if v_1.Op != OpARM64MOVDconst {
  4948  			break
  4949  		}
  4950  		c := auxIntToInt64(v_1.AuxInt)
  4951  		mem := v_2
  4952  		if !(is32Bit(c << 3)) {
  4953  			break
  4954  		}
  4955  		v.reset(OpARM64FMOVDload)
  4956  		v.AuxInt = int32ToAuxInt(int32(c) << 3)
  4957  		v.AddArg2(ptr, mem)
  4958  		return true
  4959  	}
  4960  	return false
  4961  }
  4962  func rewriteValueARM64_OpARM64FMOVDstore(v *Value) bool {
  4963  	v_2 := v.Args[2]
  4964  	v_1 := v.Args[1]
  4965  	v_0 := v.Args[0]
  4966  	b := v.Block
  4967  	config := b.Func.Config
  4968  	// match: (FMOVDstore [off] {sym} ptr (FMOVDgpfp val) mem)
  4969  	// result: (MOVDstore [off] {sym} ptr val mem)
  4970  	for {
  4971  		off := auxIntToInt32(v.AuxInt)
  4972  		sym := auxToSym(v.Aux)
  4973  		ptr := v_0
  4974  		if v_1.Op != OpARM64FMOVDgpfp {
  4975  			break
  4976  		}
  4977  		val := v_1.Args[0]
  4978  		mem := v_2
  4979  		v.reset(OpARM64MOVDstore)
  4980  		v.AuxInt = int32ToAuxInt(off)
  4981  		v.Aux = symToAux(sym)
  4982  		v.AddArg3(ptr, val, mem)
  4983  		return true
  4984  	}
  4985  	// match: (FMOVDstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  4986  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  4987  	// result: (FMOVDstore [off1+int32(off2)] {sym} ptr val mem)
  4988  	for {
  4989  		off1 := auxIntToInt32(v.AuxInt)
  4990  		sym := auxToSym(v.Aux)
  4991  		if v_0.Op != OpARM64ADDconst {
  4992  			break
  4993  		}
  4994  		off2 := auxIntToInt64(v_0.AuxInt)
  4995  		ptr := v_0.Args[0]
  4996  		val := v_1
  4997  		mem := v_2
  4998  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  4999  			break
  5000  		}
  5001  		v.reset(OpARM64FMOVDstore)
  5002  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  5003  		v.Aux = symToAux(sym)
  5004  		v.AddArg3(ptr, val, mem)
  5005  		return true
  5006  	}
  5007  	// match: (FMOVDstore [off] {sym} (ADD ptr idx) val mem)
  5008  	// cond: off == 0 && sym == nil
  5009  	// result: (FMOVDstoreidx ptr idx val mem)
  5010  	for {
  5011  		off := auxIntToInt32(v.AuxInt)
  5012  		sym := auxToSym(v.Aux)
  5013  		if v_0.Op != OpARM64ADD {
  5014  			break
  5015  		}
  5016  		idx := v_0.Args[1]
  5017  		ptr := v_0.Args[0]
  5018  		val := v_1
  5019  		mem := v_2
  5020  		if !(off == 0 && sym == nil) {
  5021  			break
  5022  		}
  5023  		v.reset(OpARM64FMOVDstoreidx)
  5024  		v.AddArg4(ptr, idx, val, mem)
  5025  		return true
  5026  	}
  5027  	// match: (FMOVDstore [off] {sym} (ADDshiftLL [3] ptr idx) val mem)
  5028  	// cond: off == 0 && sym == nil
  5029  	// result: (FMOVDstoreidx8 ptr idx val mem)
  5030  	for {
  5031  		off := auxIntToInt32(v.AuxInt)
  5032  		sym := auxToSym(v.Aux)
  5033  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
  5034  			break
  5035  		}
  5036  		idx := v_0.Args[1]
  5037  		ptr := v_0.Args[0]
  5038  		val := v_1
  5039  		mem := v_2
  5040  		if !(off == 0 && sym == nil) {
  5041  			break
  5042  		}
  5043  		v.reset(OpARM64FMOVDstoreidx8)
  5044  		v.AddArg4(ptr, idx, val, mem)
  5045  		return true
  5046  	}
  5047  	// match: (FMOVDstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
  5048  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5049  	// result: (FMOVDstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  5050  	for {
  5051  		off1 := auxIntToInt32(v.AuxInt)
  5052  		sym1 := auxToSym(v.Aux)
  5053  		if v_0.Op != OpARM64MOVDaddr {
  5054  			break
  5055  		}
  5056  		off2 := auxIntToInt32(v_0.AuxInt)
  5057  		sym2 := auxToSym(v_0.Aux)
  5058  		ptr := v_0.Args[0]
  5059  		val := v_1
  5060  		mem := v_2
  5061  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5062  			break
  5063  		}
  5064  		v.reset(OpARM64FMOVDstore)
  5065  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5066  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5067  		v.AddArg3(ptr, val, mem)
  5068  		return true
  5069  	}
  5070  	return false
  5071  }
  5072  func rewriteValueARM64_OpARM64FMOVDstoreidx(v *Value) bool {
  5073  	v_3 := v.Args[3]
  5074  	v_2 := v.Args[2]
  5075  	v_1 := v.Args[1]
  5076  	v_0 := v.Args[0]
  5077  	// match: (FMOVDstoreidx ptr (MOVDconst [c]) val mem)
  5078  	// cond: is32Bit(c)
  5079  	// result: (FMOVDstore [int32(c)] ptr val mem)
  5080  	for {
  5081  		ptr := v_0
  5082  		if v_1.Op != OpARM64MOVDconst {
  5083  			break
  5084  		}
  5085  		c := auxIntToInt64(v_1.AuxInt)
  5086  		val := v_2
  5087  		mem := v_3
  5088  		if !(is32Bit(c)) {
  5089  			break
  5090  		}
  5091  		v.reset(OpARM64FMOVDstore)
  5092  		v.AuxInt = int32ToAuxInt(int32(c))
  5093  		v.AddArg3(ptr, val, mem)
  5094  		return true
  5095  	}
  5096  	// match: (FMOVDstoreidx (MOVDconst [c]) idx val mem)
  5097  	// cond: is32Bit(c)
  5098  	// result: (FMOVDstore [int32(c)] idx val mem)
  5099  	for {
  5100  		if v_0.Op != OpARM64MOVDconst {
  5101  			break
  5102  		}
  5103  		c := auxIntToInt64(v_0.AuxInt)
  5104  		idx := v_1
  5105  		val := v_2
  5106  		mem := v_3
  5107  		if !(is32Bit(c)) {
  5108  			break
  5109  		}
  5110  		v.reset(OpARM64FMOVDstore)
  5111  		v.AuxInt = int32ToAuxInt(int32(c))
  5112  		v.AddArg3(idx, val, mem)
  5113  		return true
  5114  	}
  5115  	// match: (FMOVDstoreidx ptr (SLLconst [3] idx) val mem)
  5116  	// result: (FMOVDstoreidx8 ptr idx val mem)
  5117  	for {
  5118  		ptr := v_0
  5119  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
  5120  			break
  5121  		}
  5122  		idx := v_1.Args[0]
  5123  		val := v_2
  5124  		mem := v_3
  5125  		v.reset(OpARM64FMOVDstoreidx8)
  5126  		v.AddArg4(ptr, idx, val, mem)
  5127  		return true
  5128  	}
  5129  	// match: (FMOVDstoreidx (SLLconst [3] idx) ptr val mem)
  5130  	// result: (FMOVDstoreidx8 ptr idx val mem)
  5131  	for {
  5132  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
  5133  			break
  5134  		}
  5135  		idx := v_0.Args[0]
  5136  		ptr := v_1
  5137  		val := v_2
  5138  		mem := v_3
  5139  		v.reset(OpARM64FMOVDstoreidx8)
  5140  		v.AddArg4(ptr, idx, val, mem)
  5141  		return true
  5142  	}
  5143  	return false
  5144  }
  5145  func rewriteValueARM64_OpARM64FMOVDstoreidx8(v *Value) bool {
  5146  	v_3 := v.Args[3]
  5147  	v_2 := v.Args[2]
  5148  	v_1 := v.Args[1]
  5149  	v_0 := v.Args[0]
  5150  	// match: (FMOVDstoreidx8 ptr (MOVDconst [c]) val mem)
  5151  	// cond: is32Bit(c<<3)
  5152  	// result: (FMOVDstore [int32(c)<<3] ptr val mem)
  5153  	for {
  5154  		ptr := v_0
  5155  		if v_1.Op != OpARM64MOVDconst {
  5156  			break
  5157  		}
  5158  		c := auxIntToInt64(v_1.AuxInt)
  5159  		val := v_2
  5160  		mem := v_3
  5161  		if !(is32Bit(c << 3)) {
  5162  			break
  5163  		}
  5164  		v.reset(OpARM64FMOVDstore)
  5165  		v.AuxInt = int32ToAuxInt(int32(c) << 3)
  5166  		v.AddArg3(ptr, val, mem)
  5167  		return true
  5168  	}
  5169  	return false
  5170  }
  5171  func rewriteValueARM64_OpARM64FMOVSload(v *Value) bool {
  5172  	v_1 := v.Args[1]
  5173  	v_0 := v.Args[0]
  5174  	b := v.Block
  5175  	config := b.Func.Config
  5176  	// match: (FMOVSload [off] {sym} ptr (MOVWstore [off] {sym} ptr val _))
  5177  	// result: (FMOVSgpfp val)
  5178  	for {
  5179  		off := auxIntToInt32(v.AuxInt)
  5180  		sym := auxToSym(v.Aux)
  5181  		ptr := v_0
  5182  		if v_1.Op != OpARM64MOVWstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  5183  			break
  5184  		}
  5185  		val := v_1.Args[1]
  5186  		if ptr != v_1.Args[0] {
  5187  			break
  5188  		}
  5189  		v.reset(OpARM64FMOVSgpfp)
  5190  		v.AddArg(val)
  5191  		return true
  5192  	}
  5193  	// match: (FMOVSload [off1] {sym} (ADDconst [off2] ptr) mem)
  5194  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5195  	// result: (FMOVSload [off1+int32(off2)] {sym} ptr mem)
  5196  	for {
  5197  		off1 := auxIntToInt32(v.AuxInt)
  5198  		sym := auxToSym(v.Aux)
  5199  		if v_0.Op != OpARM64ADDconst {
  5200  			break
  5201  		}
  5202  		off2 := auxIntToInt64(v_0.AuxInt)
  5203  		ptr := v_0.Args[0]
  5204  		mem := v_1
  5205  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5206  			break
  5207  		}
  5208  		v.reset(OpARM64FMOVSload)
  5209  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  5210  		v.Aux = symToAux(sym)
  5211  		v.AddArg2(ptr, mem)
  5212  		return true
  5213  	}
  5214  	// match: (FMOVSload [off] {sym} (ADD ptr idx) mem)
  5215  	// cond: off == 0 && sym == nil
  5216  	// result: (FMOVSloadidx ptr idx mem)
  5217  	for {
  5218  		off := auxIntToInt32(v.AuxInt)
  5219  		sym := auxToSym(v.Aux)
  5220  		if v_0.Op != OpARM64ADD {
  5221  			break
  5222  		}
  5223  		idx := v_0.Args[1]
  5224  		ptr := v_0.Args[0]
  5225  		mem := v_1
  5226  		if !(off == 0 && sym == nil) {
  5227  			break
  5228  		}
  5229  		v.reset(OpARM64FMOVSloadidx)
  5230  		v.AddArg3(ptr, idx, mem)
  5231  		return true
  5232  	}
  5233  	// match: (FMOVSload [off] {sym} (ADDshiftLL [2] ptr idx) mem)
  5234  	// cond: off == 0 && sym == nil
  5235  	// result: (FMOVSloadidx4 ptr idx mem)
  5236  	for {
  5237  		off := auxIntToInt32(v.AuxInt)
  5238  		sym := auxToSym(v.Aux)
  5239  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
  5240  			break
  5241  		}
  5242  		idx := v_0.Args[1]
  5243  		ptr := v_0.Args[0]
  5244  		mem := v_1
  5245  		if !(off == 0 && sym == nil) {
  5246  			break
  5247  		}
  5248  		v.reset(OpARM64FMOVSloadidx4)
  5249  		v.AddArg3(ptr, idx, mem)
  5250  		return true
  5251  	}
  5252  	// match: (FMOVSload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  5253  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5254  	// result: (FMOVSload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  5255  	for {
  5256  		off1 := auxIntToInt32(v.AuxInt)
  5257  		sym1 := auxToSym(v.Aux)
  5258  		if v_0.Op != OpARM64MOVDaddr {
  5259  			break
  5260  		}
  5261  		off2 := auxIntToInt32(v_0.AuxInt)
  5262  		sym2 := auxToSym(v_0.Aux)
  5263  		ptr := v_0.Args[0]
  5264  		mem := v_1
  5265  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5266  			break
  5267  		}
  5268  		v.reset(OpARM64FMOVSload)
  5269  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5270  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5271  		v.AddArg2(ptr, mem)
  5272  		return true
  5273  	}
  5274  	return false
  5275  }
  5276  func rewriteValueARM64_OpARM64FMOVSloadidx(v *Value) bool {
  5277  	v_2 := v.Args[2]
  5278  	v_1 := v.Args[1]
  5279  	v_0 := v.Args[0]
  5280  	// match: (FMOVSloadidx ptr (MOVDconst [c]) mem)
  5281  	// cond: is32Bit(c)
  5282  	// result: (FMOVSload [int32(c)] ptr mem)
  5283  	for {
  5284  		ptr := v_0
  5285  		if v_1.Op != OpARM64MOVDconst {
  5286  			break
  5287  		}
  5288  		c := auxIntToInt64(v_1.AuxInt)
  5289  		mem := v_2
  5290  		if !(is32Bit(c)) {
  5291  			break
  5292  		}
  5293  		v.reset(OpARM64FMOVSload)
  5294  		v.AuxInt = int32ToAuxInt(int32(c))
  5295  		v.AddArg2(ptr, mem)
  5296  		return true
  5297  	}
  5298  	// match: (FMOVSloadidx (MOVDconst [c]) ptr mem)
  5299  	// cond: is32Bit(c)
  5300  	// result: (FMOVSload [int32(c)] ptr mem)
  5301  	for {
  5302  		if v_0.Op != OpARM64MOVDconst {
  5303  			break
  5304  		}
  5305  		c := auxIntToInt64(v_0.AuxInt)
  5306  		ptr := v_1
  5307  		mem := v_2
  5308  		if !(is32Bit(c)) {
  5309  			break
  5310  		}
  5311  		v.reset(OpARM64FMOVSload)
  5312  		v.AuxInt = int32ToAuxInt(int32(c))
  5313  		v.AddArg2(ptr, mem)
  5314  		return true
  5315  	}
  5316  	// match: (FMOVSloadidx ptr (SLLconst [2] idx) mem)
  5317  	// result: (FMOVSloadidx4 ptr idx mem)
  5318  	for {
  5319  		ptr := v_0
  5320  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
  5321  			break
  5322  		}
  5323  		idx := v_1.Args[0]
  5324  		mem := v_2
  5325  		v.reset(OpARM64FMOVSloadidx4)
  5326  		v.AddArg3(ptr, idx, mem)
  5327  		return true
  5328  	}
  5329  	// match: (FMOVSloadidx (SLLconst [2] idx) ptr mem)
  5330  	// result: (FMOVSloadidx4 ptr idx mem)
  5331  	for {
  5332  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
  5333  			break
  5334  		}
  5335  		idx := v_0.Args[0]
  5336  		ptr := v_1
  5337  		mem := v_2
  5338  		v.reset(OpARM64FMOVSloadidx4)
  5339  		v.AddArg3(ptr, idx, mem)
  5340  		return true
  5341  	}
  5342  	return false
  5343  }
  5344  func rewriteValueARM64_OpARM64FMOVSloadidx4(v *Value) bool {
  5345  	v_2 := v.Args[2]
  5346  	v_1 := v.Args[1]
  5347  	v_0 := v.Args[0]
  5348  	// match: (FMOVSloadidx4 ptr (MOVDconst [c]) mem)
  5349  	// cond: is32Bit(c<<2)
  5350  	// result: (FMOVSload ptr [int32(c)<<2] mem)
  5351  	for {
  5352  		ptr := v_0
  5353  		if v_1.Op != OpARM64MOVDconst {
  5354  			break
  5355  		}
  5356  		c := auxIntToInt64(v_1.AuxInt)
  5357  		mem := v_2
  5358  		if !(is32Bit(c << 2)) {
  5359  			break
  5360  		}
  5361  		v.reset(OpARM64FMOVSload)
  5362  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
  5363  		v.AddArg2(ptr, mem)
  5364  		return true
  5365  	}
  5366  	return false
  5367  }
  5368  func rewriteValueARM64_OpARM64FMOVSstore(v *Value) bool {
  5369  	v_2 := v.Args[2]
  5370  	v_1 := v.Args[1]
  5371  	v_0 := v.Args[0]
  5372  	b := v.Block
  5373  	config := b.Func.Config
  5374  	// match: (FMOVSstore [off] {sym} ptr (FMOVSgpfp val) mem)
  5375  	// result: (MOVWstore [off] {sym} ptr val mem)
  5376  	for {
  5377  		off := auxIntToInt32(v.AuxInt)
  5378  		sym := auxToSym(v.Aux)
  5379  		ptr := v_0
  5380  		if v_1.Op != OpARM64FMOVSgpfp {
  5381  			break
  5382  		}
  5383  		val := v_1.Args[0]
  5384  		mem := v_2
  5385  		v.reset(OpARM64MOVWstore)
  5386  		v.AuxInt = int32ToAuxInt(off)
  5387  		v.Aux = symToAux(sym)
  5388  		v.AddArg3(ptr, val, mem)
  5389  		return true
  5390  	}
  5391  	// match: (FMOVSstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  5392  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5393  	// result: (FMOVSstore [off1+int32(off2)] {sym} ptr val mem)
  5394  	for {
  5395  		off1 := auxIntToInt32(v.AuxInt)
  5396  		sym := auxToSym(v.Aux)
  5397  		if v_0.Op != OpARM64ADDconst {
  5398  			break
  5399  		}
  5400  		off2 := auxIntToInt64(v_0.AuxInt)
  5401  		ptr := v_0.Args[0]
  5402  		val := v_1
  5403  		mem := v_2
  5404  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5405  			break
  5406  		}
  5407  		v.reset(OpARM64FMOVSstore)
  5408  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  5409  		v.Aux = symToAux(sym)
  5410  		v.AddArg3(ptr, val, mem)
  5411  		return true
  5412  	}
  5413  	// match: (FMOVSstore [off] {sym} (ADD ptr idx) val mem)
  5414  	// cond: off == 0 && sym == nil
  5415  	// result: (FMOVSstoreidx ptr idx val mem)
  5416  	for {
  5417  		off := auxIntToInt32(v.AuxInt)
  5418  		sym := auxToSym(v.Aux)
  5419  		if v_0.Op != OpARM64ADD {
  5420  			break
  5421  		}
  5422  		idx := v_0.Args[1]
  5423  		ptr := v_0.Args[0]
  5424  		val := v_1
  5425  		mem := v_2
  5426  		if !(off == 0 && sym == nil) {
  5427  			break
  5428  		}
  5429  		v.reset(OpARM64FMOVSstoreidx)
  5430  		v.AddArg4(ptr, idx, val, mem)
  5431  		return true
  5432  	}
  5433  	// match: (FMOVSstore [off] {sym} (ADDshiftLL [2] ptr idx) val mem)
  5434  	// cond: off == 0 && sym == nil
  5435  	// result: (FMOVSstoreidx4 ptr idx val mem)
  5436  	for {
  5437  		off := auxIntToInt32(v.AuxInt)
  5438  		sym := auxToSym(v.Aux)
  5439  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
  5440  			break
  5441  		}
  5442  		idx := v_0.Args[1]
  5443  		ptr := v_0.Args[0]
  5444  		val := v_1
  5445  		mem := v_2
  5446  		if !(off == 0 && sym == nil) {
  5447  			break
  5448  		}
  5449  		v.reset(OpARM64FMOVSstoreidx4)
  5450  		v.AddArg4(ptr, idx, val, mem)
  5451  		return true
  5452  	}
  5453  	// match: (FMOVSstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
  5454  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5455  	// result: (FMOVSstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  5456  	for {
  5457  		off1 := auxIntToInt32(v.AuxInt)
  5458  		sym1 := auxToSym(v.Aux)
  5459  		if v_0.Op != OpARM64MOVDaddr {
  5460  			break
  5461  		}
  5462  		off2 := auxIntToInt32(v_0.AuxInt)
  5463  		sym2 := auxToSym(v_0.Aux)
  5464  		ptr := v_0.Args[0]
  5465  		val := v_1
  5466  		mem := v_2
  5467  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5468  			break
  5469  		}
  5470  		v.reset(OpARM64FMOVSstore)
  5471  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5472  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5473  		v.AddArg3(ptr, val, mem)
  5474  		return true
  5475  	}
  5476  	return false
  5477  }
  5478  func rewriteValueARM64_OpARM64FMOVSstoreidx(v *Value) bool {
  5479  	v_3 := v.Args[3]
  5480  	v_2 := v.Args[2]
  5481  	v_1 := v.Args[1]
  5482  	v_0 := v.Args[0]
  5483  	// match: (FMOVSstoreidx ptr (MOVDconst [c]) val mem)
  5484  	// cond: is32Bit(c)
  5485  	// result: (FMOVSstore [int32(c)] ptr val mem)
  5486  	for {
  5487  		ptr := v_0
  5488  		if v_1.Op != OpARM64MOVDconst {
  5489  			break
  5490  		}
  5491  		c := auxIntToInt64(v_1.AuxInt)
  5492  		val := v_2
  5493  		mem := v_3
  5494  		if !(is32Bit(c)) {
  5495  			break
  5496  		}
  5497  		v.reset(OpARM64FMOVSstore)
  5498  		v.AuxInt = int32ToAuxInt(int32(c))
  5499  		v.AddArg3(ptr, val, mem)
  5500  		return true
  5501  	}
  5502  	// match: (FMOVSstoreidx (MOVDconst [c]) idx val mem)
  5503  	// cond: is32Bit(c)
  5504  	// result: (FMOVSstore [int32(c)] idx val mem)
  5505  	for {
  5506  		if v_0.Op != OpARM64MOVDconst {
  5507  			break
  5508  		}
  5509  		c := auxIntToInt64(v_0.AuxInt)
  5510  		idx := v_1
  5511  		val := v_2
  5512  		mem := v_3
  5513  		if !(is32Bit(c)) {
  5514  			break
  5515  		}
  5516  		v.reset(OpARM64FMOVSstore)
  5517  		v.AuxInt = int32ToAuxInt(int32(c))
  5518  		v.AddArg3(idx, val, mem)
  5519  		return true
  5520  	}
  5521  	// match: (FMOVSstoreidx ptr (SLLconst [2] idx) val mem)
  5522  	// result: (FMOVSstoreidx4 ptr idx val mem)
  5523  	for {
  5524  		ptr := v_0
  5525  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
  5526  			break
  5527  		}
  5528  		idx := v_1.Args[0]
  5529  		val := v_2
  5530  		mem := v_3
  5531  		v.reset(OpARM64FMOVSstoreidx4)
  5532  		v.AddArg4(ptr, idx, val, mem)
  5533  		return true
  5534  	}
  5535  	// match: (FMOVSstoreidx (SLLconst [2] idx) ptr val mem)
  5536  	// result: (FMOVSstoreidx4 ptr idx val mem)
  5537  	for {
  5538  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
  5539  			break
  5540  		}
  5541  		idx := v_0.Args[0]
  5542  		ptr := v_1
  5543  		val := v_2
  5544  		mem := v_3
  5545  		v.reset(OpARM64FMOVSstoreidx4)
  5546  		v.AddArg4(ptr, idx, val, mem)
  5547  		return true
  5548  	}
  5549  	return false
  5550  }
  5551  func rewriteValueARM64_OpARM64FMOVSstoreidx4(v *Value) bool {
  5552  	v_3 := v.Args[3]
  5553  	v_2 := v.Args[2]
  5554  	v_1 := v.Args[1]
  5555  	v_0 := v.Args[0]
  5556  	// match: (FMOVSstoreidx4 ptr (MOVDconst [c]) val mem)
  5557  	// cond: is32Bit(c<<2)
  5558  	// result: (FMOVSstore [int32(c)<<2] ptr val mem)
  5559  	for {
  5560  		ptr := v_0
  5561  		if v_1.Op != OpARM64MOVDconst {
  5562  			break
  5563  		}
  5564  		c := auxIntToInt64(v_1.AuxInt)
  5565  		val := v_2
  5566  		mem := v_3
  5567  		if !(is32Bit(c << 2)) {
  5568  			break
  5569  		}
  5570  		v.reset(OpARM64FMOVSstore)
  5571  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
  5572  		v.AddArg3(ptr, val, mem)
  5573  		return true
  5574  	}
  5575  	return false
  5576  }
  5577  func rewriteValueARM64_OpARM64FMULD(v *Value) bool {
  5578  	v_1 := v.Args[1]
  5579  	v_0 := v.Args[0]
  5580  	// match: (FMULD (FNEGD x) y)
  5581  	// result: (FNMULD x y)
  5582  	for {
  5583  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5584  			if v_0.Op != OpARM64FNEGD {
  5585  				continue
  5586  			}
  5587  			x := v_0.Args[0]
  5588  			y := v_1
  5589  			v.reset(OpARM64FNMULD)
  5590  			v.AddArg2(x, y)
  5591  			return true
  5592  		}
  5593  		break
  5594  	}
  5595  	return false
  5596  }
  5597  func rewriteValueARM64_OpARM64FMULS(v *Value) bool {
  5598  	v_1 := v.Args[1]
  5599  	v_0 := v.Args[0]
  5600  	// match: (FMULS (FNEGS x) y)
  5601  	// result: (FNMULS x y)
  5602  	for {
  5603  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5604  			if v_0.Op != OpARM64FNEGS {
  5605  				continue
  5606  			}
  5607  			x := v_0.Args[0]
  5608  			y := v_1
  5609  			v.reset(OpARM64FNMULS)
  5610  			v.AddArg2(x, y)
  5611  			return true
  5612  		}
  5613  		break
  5614  	}
  5615  	return false
  5616  }
  5617  func rewriteValueARM64_OpARM64FNEGD(v *Value) bool {
  5618  	v_0 := v.Args[0]
  5619  	// match: (FNEGD (FMULD x y))
  5620  	// result: (FNMULD x y)
  5621  	for {
  5622  		if v_0.Op != OpARM64FMULD {
  5623  			break
  5624  		}
  5625  		y := v_0.Args[1]
  5626  		x := v_0.Args[0]
  5627  		v.reset(OpARM64FNMULD)
  5628  		v.AddArg2(x, y)
  5629  		return true
  5630  	}
  5631  	// match: (FNEGD (FNMULD x y))
  5632  	// result: (FMULD x y)
  5633  	for {
  5634  		if v_0.Op != OpARM64FNMULD {
  5635  			break
  5636  		}
  5637  		y := v_0.Args[1]
  5638  		x := v_0.Args[0]
  5639  		v.reset(OpARM64FMULD)
  5640  		v.AddArg2(x, y)
  5641  		return true
  5642  	}
  5643  	return false
  5644  }
  5645  func rewriteValueARM64_OpARM64FNEGS(v *Value) bool {
  5646  	v_0 := v.Args[0]
  5647  	// match: (FNEGS (FMULS x y))
  5648  	// result: (FNMULS x y)
  5649  	for {
  5650  		if v_0.Op != OpARM64FMULS {
  5651  			break
  5652  		}
  5653  		y := v_0.Args[1]
  5654  		x := v_0.Args[0]
  5655  		v.reset(OpARM64FNMULS)
  5656  		v.AddArg2(x, y)
  5657  		return true
  5658  	}
  5659  	// match: (FNEGS (FNMULS x y))
  5660  	// result: (FMULS x y)
  5661  	for {
  5662  		if v_0.Op != OpARM64FNMULS {
  5663  			break
  5664  		}
  5665  		y := v_0.Args[1]
  5666  		x := v_0.Args[0]
  5667  		v.reset(OpARM64FMULS)
  5668  		v.AddArg2(x, y)
  5669  		return true
  5670  	}
  5671  	return false
  5672  }
  5673  func rewriteValueARM64_OpARM64FNMULD(v *Value) bool {
  5674  	v_1 := v.Args[1]
  5675  	v_0 := v.Args[0]
  5676  	// match: (FNMULD (FNEGD x) y)
  5677  	// result: (FMULD x y)
  5678  	for {
  5679  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5680  			if v_0.Op != OpARM64FNEGD {
  5681  				continue
  5682  			}
  5683  			x := v_0.Args[0]
  5684  			y := v_1
  5685  			v.reset(OpARM64FMULD)
  5686  			v.AddArg2(x, y)
  5687  			return true
  5688  		}
  5689  		break
  5690  	}
  5691  	return false
  5692  }
  5693  func rewriteValueARM64_OpARM64FNMULS(v *Value) bool {
  5694  	v_1 := v.Args[1]
  5695  	v_0 := v.Args[0]
  5696  	// match: (FNMULS (FNEGS x) y)
  5697  	// result: (FMULS x y)
  5698  	for {
  5699  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5700  			if v_0.Op != OpARM64FNEGS {
  5701  				continue
  5702  			}
  5703  			x := v_0.Args[0]
  5704  			y := v_1
  5705  			v.reset(OpARM64FMULS)
  5706  			v.AddArg2(x, y)
  5707  			return true
  5708  		}
  5709  		break
  5710  	}
  5711  	return false
  5712  }
  5713  func rewriteValueARM64_OpARM64FSUBD(v *Value) bool {
  5714  	v_1 := v.Args[1]
  5715  	v_0 := v.Args[0]
  5716  	// match: (FSUBD a (FMULD x y))
  5717  	// cond: a.Block.Func.useFMA(v)
  5718  	// result: (FMSUBD a x y)
  5719  	for {
  5720  		a := v_0
  5721  		if v_1.Op != OpARM64FMULD {
  5722  			break
  5723  		}
  5724  		y := v_1.Args[1]
  5725  		x := v_1.Args[0]
  5726  		if !(a.Block.Func.useFMA(v)) {
  5727  			break
  5728  		}
  5729  		v.reset(OpARM64FMSUBD)
  5730  		v.AddArg3(a, x, y)
  5731  		return true
  5732  	}
  5733  	// match: (FSUBD (FMULD x y) a)
  5734  	// cond: a.Block.Func.useFMA(v)
  5735  	// result: (FNMSUBD a x y)
  5736  	for {
  5737  		if v_0.Op != OpARM64FMULD {
  5738  			break
  5739  		}
  5740  		y := v_0.Args[1]
  5741  		x := v_0.Args[0]
  5742  		a := v_1
  5743  		if !(a.Block.Func.useFMA(v)) {
  5744  			break
  5745  		}
  5746  		v.reset(OpARM64FNMSUBD)
  5747  		v.AddArg3(a, x, y)
  5748  		return true
  5749  	}
  5750  	// match: (FSUBD a (FNMULD x y))
  5751  	// cond: a.Block.Func.useFMA(v)
  5752  	// result: (FMADDD a x y)
  5753  	for {
  5754  		a := v_0
  5755  		if v_1.Op != OpARM64FNMULD {
  5756  			break
  5757  		}
  5758  		y := v_1.Args[1]
  5759  		x := v_1.Args[0]
  5760  		if !(a.Block.Func.useFMA(v)) {
  5761  			break
  5762  		}
  5763  		v.reset(OpARM64FMADDD)
  5764  		v.AddArg3(a, x, y)
  5765  		return true
  5766  	}
  5767  	// match: (FSUBD (FNMULD x y) a)
  5768  	// cond: a.Block.Func.useFMA(v)
  5769  	// result: (FNMADDD a x y)
  5770  	for {
  5771  		if v_0.Op != OpARM64FNMULD {
  5772  			break
  5773  		}
  5774  		y := v_0.Args[1]
  5775  		x := v_0.Args[0]
  5776  		a := v_1
  5777  		if !(a.Block.Func.useFMA(v)) {
  5778  			break
  5779  		}
  5780  		v.reset(OpARM64FNMADDD)
  5781  		v.AddArg3(a, x, y)
  5782  		return true
  5783  	}
  5784  	return false
  5785  }
  5786  func rewriteValueARM64_OpARM64FSUBS(v *Value) bool {
  5787  	v_1 := v.Args[1]
  5788  	v_0 := v.Args[0]
  5789  	// match: (FSUBS a (FMULS x y))
  5790  	// cond: a.Block.Func.useFMA(v)
  5791  	// result: (FMSUBS a x y)
  5792  	for {
  5793  		a := v_0
  5794  		if v_1.Op != OpARM64FMULS {
  5795  			break
  5796  		}
  5797  		y := v_1.Args[1]
  5798  		x := v_1.Args[0]
  5799  		if !(a.Block.Func.useFMA(v)) {
  5800  			break
  5801  		}
  5802  		v.reset(OpARM64FMSUBS)
  5803  		v.AddArg3(a, x, y)
  5804  		return true
  5805  	}
  5806  	// match: (FSUBS (FMULS x y) a)
  5807  	// cond: a.Block.Func.useFMA(v)
  5808  	// result: (FNMSUBS a x y)
  5809  	for {
  5810  		if v_0.Op != OpARM64FMULS {
  5811  			break
  5812  		}
  5813  		y := v_0.Args[1]
  5814  		x := v_0.Args[0]
  5815  		a := v_1
  5816  		if !(a.Block.Func.useFMA(v)) {
  5817  			break
  5818  		}
  5819  		v.reset(OpARM64FNMSUBS)
  5820  		v.AddArg3(a, x, y)
  5821  		return true
  5822  	}
  5823  	// match: (FSUBS a (FNMULS x y))
  5824  	// cond: a.Block.Func.useFMA(v)
  5825  	// result: (FMADDS a x y)
  5826  	for {
  5827  		a := v_0
  5828  		if v_1.Op != OpARM64FNMULS {
  5829  			break
  5830  		}
  5831  		y := v_1.Args[1]
  5832  		x := v_1.Args[0]
  5833  		if !(a.Block.Func.useFMA(v)) {
  5834  			break
  5835  		}
  5836  		v.reset(OpARM64FMADDS)
  5837  		v.AddArg3(a, x, y)
  5838  		return true
  5839  	}
  5840  	// match: (FSUBS (FNMULS x y) a)
  5841  	// cond: a.Block.Func.useFMA(v)
  5842  	// result: (FNMADDS a x y)
  5843  	for {
  5844  		if v_0.Op != OpARM64FNMULS {
  5845  			break
  5846  		}
  5847  		y := v_0.Args[1]
  5848  		x := v_0.Args[0]
  5849  		a := v_1
  5850  		if !(a.Block.Func.useFMA(v)) {
  5851  			break
  5852  		}
  5853  		v.reset(OpARM64FNMADDS)
  5854  		v.AddArg3(a, x, y)
  5855  		return true
  5856  	}
  5857  	return false
  5858  }
  5859  func rewriteValueARM64_OpARM64GreaterEqual(v *Value) bool {
  5860  	v_0 := v.Args[0]
  5861  	b := v.Block
  5862  	// match: (GreaterEqual (CMPconst [0] z:(AND x y)))
  5863  	// cond: z.Uses == 1
  5864  	// result: (GreaterEqual (TST x y))
  5865  	for {
  5866  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  5867  			break
  5868  		}
  5869  		z := v_0.Args[0]
  5870  		if z.Op != OpARM64AND {
  5871  			break
  5872  		}
  5873  		y := z.Args[1]
  5874  		x := z.Args[0]
  5875  		if !(z.Uses == 1) {
  5876  			break
  5877  		}
  5878  		v.reset(OpARM64GreaterEqual)
  5879  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  5880  		v0.AddArg2(x, y)
  5881  		v.AddArg(v0)
  5882  		return true
  5883  	}
  5884  	// match: (GreaterEqual (CMPWconst [0] x:(ANDconst [c] y)))
  5885  	// cond: x.Uses == 1
  5886  	// result: (GreaterEqual (TSTWconst [int32(c)] y))
  5887  	for {
  5888  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  5889  			break
  5890  		}
  5891  		x := v_0.Args[0]
  5892  		if x.Op != OpARM64ANDconst {
  5893  			break
  5894  		}
  5895  		c := auxIntToInt64(x.AuxInt)
  5896  		y := x.Args[0]
  5897  		if !(x.Uses == 1) {
  5898  			break
  5899  		}
  5900  		v.reset(OpARM64GreaterEqual)
  5901  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  5902  		v0.AuxInt = int32ToAuxInt(int32(c))
  5903  		v0.AddArg(y)
  5904  		v.AddArg(v0)
  5905  		return true
  5906  	}
  5907  	// match: (GreaterEqual (CMPWconst [0] z:(AND x y)))
  5908  	// cond: z.Uses == 1
  5909  	// result: (GreaterEqual (TSTW x y))
  5910  	for {
  5911  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  5912  			break
  5913  		}
  5914  		z := v_0.Args[0]
  5915  		if z.Op != OpARM64AND {
  5916  			break
  5917  		}
  5918  		y := z.Args[1]
  5919  		x := z.Args[0]
  5920  		if !(z.Uses == 1) {
  5921  			break
  5922  		}
  5923  		v.reset(OpARM64GreaterEqual)
  5924  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  5925  		v0.AddArg2(x, y)
  5926  		v.AddArg(v0)
  5927  		return true
  5928  	}
  5929  	// match: (GreaterEqual (CMPconst [0] x:(ANDconst [c] y)))
  5930  	// cond: x.Uses == 1
  5931  	// result: (GreaterEqual (TSTconst [c] y))
  5932  	for {
  5933  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  5934  			break
  5935  		}
  5936  		x := v_0.Args[0]
  5937  		if x.Op != OpARM64ANDconst {
  5938  			break
  5939  		}
  5940  		c := auxIntToInt64(x.AuxInt)
  5941  		y := x.Args[0]
  5942  		if !(x.Uses == 1) {
  5943  			break
  5944  		}
  5945  		v.reset(OpARM64GreaterEqual)
  5946  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  5947  		v0.AuxInt = int64ToAuxInt(c)
  5948  		v0.AddArg(y)
  5949  		v.AddArg(v0)
  5950  		return true
  5951  	}
  5952  	// match: (GreaterEqual (CMPconst [0] x:(ADDconst [c] y)))
  5953  	// cond: x.Uses == 1
  5954  	// result: (GreaterEqualNoov (CMNconst [c] y))
  5955  	for {
  5956  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  5957  			break
  5958  		}
  5959  		x := v_0.Args[0]
  5960  		if x.Op != OpARM64ADDconst {
  5961  			break
  5962  		}
  5963  		c := auxIntToInt64(x.AuxInt)
  5964  		y := x.Args[0]
  5965  		if !(x.Uses == 1) {
  5966  			break
  5967  		}
  5968  		v.reset(OpARM64GreaterEqualNoov)
  5969  		v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
  5970  		v0.AuxInt = int64ToAuxInt(c)
  5971  		v0.AddArg(y)
  5972  		v.AddArg(v0)
  5973  		return true
  5974  	}
  5975  	// match: (GreaterEqual (CMPWconst [0] x:(ADDconst [c] y)))
  5976  	// cond: x.Uses == 1
  5977  	// result: (GreaterEqualNoov (CMNWconst [int32(c)] y))
  5978  	for {
  5979  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  5980  			break
  5981  		}
  5982  		x := v_0.Args[0]
  5983  		if x.Op != OpARM64ADDconst {
  5984  			break
  5985  		}
  5986  		c := auxIntToInt64(x.AuxInt)
  5987  		y := x.Args[0]
  5988  		if !(x.Uses == 1) {
  5989  			break
  5990  		}
  5991  		v.reset(OpARM64GreaterEqualNoov)
  5992  		v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
  5993  		v0.AuxInt = int32ToAuxInt(int32(c))
  5994  		v0.AddArg(y)
  5995  		v.AddArg(v0)
  5996  		return true
  5997  	}
  5998  	// match: (GreaterEqual (CMPconst [0] z:(ADD x y)))
  5999  	// cond: z.Uses == 1
  6000  	// result: (GreaterEqualNoov (CMN x y))
  6001  	for {
  6002  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6003  			break
  6004  		}
  6005  		z := v_0.Args[0]
  6006  		if z.Op != OpARM64ADD {
  6007  			break
  6008  		}
  6009  		y := z.Args[1]
  6010  		x := z.Args[0]
  6011  		if !(z.Uses == 1) {
  6012  			break
  6013  		}
  6014  		v.reset(OpARM64GreaterEqualNoov)
  6015  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  6016  		v0.AddArg2(x, y)
  6017  		v.AddArg(v0)
  6018  		return true
  6019  	}
  6020  	// match: (GreaterEqual (CMPWconst [0] z:(ADD x y)))
  6021  	// cond: z.Uses == 1
  6022  	// result: (GreaterEqualNoov (CMNW x y))
  6023  	for {
  6024  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6025  			break
  6026  		}
  6027  		z := v_0.Args[0]
  6028  		if z.Op != OpARM64ADD {
  6029  			break
  6030  		}
  6031  		y := z.Args[1]
  6032  		x := z.Args[0]
  6033  		if !(z.Uses == 1) {
  6034  			break
  6035  		}
  6036  		v.reset(OpARM64GreaterEqualNoov)
  6037  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  6038  		v0.AddArg2(x, y)
  6039  		v.AddArg(v0)
  6040  		return true
  6041  	}
  6042  	// match: (GreaterEqual (CMPconst [0] z:(MADD a x y)))
  6043  	// cond: z.Uses == 1
  6044  	// result: (GreaterEqualNoov (CMN a (MUL <x.Type> x y)))
  6045  	for {
  6046  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6047  			break
  6048  		}
  6049  		z := v_0.Args[0]
  6050  		if z.Op != OpARM64MADD {
  6051  			break
  6052  		}
  6053  		y := z.Args[2]
  6054  		a := z.Args[0]
  6055  		x := z.Args[1]
  6056  		if !(z.Uses == 1) {
  6057  			break
  6058  		}
  6059  		v.reset(OpARM64GreaterEqualNoov)
  6060  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  6061  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  6062  		v1.AddArg2(x, y)
  6063  		v0.AddArg2(a, v1)
  6064  		v.AddArg(v0)
  6065  		return true
  6066  	}
  6067  	// match: (GreaterEqual (CMPconst [0] z:(MSUB a x y)))
  6068  	// cond: z.Uses == 1
  6069  	// result: (GreaterEqualNoov (CMP a (MUL <x.Type> x y)))
  6070  	for {
  6071  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6072  			break
  6073  		}
  6074  		z := v_0.Args[0]
  6075  		if z.Op != OpARM64MSUB {
  6076  			break
  6077  		}
  6078  		y := z.Args[2]
  6079  		a := z.Args[0]
  6080  		x := z.Args[1]
  6081  		if !(z.Uses == 1) {
  6082  			break
  6083  		}
  6084  		v.reset(OpARM64GreaterEqualNoov)
  6085  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
  6086  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  6087  		v1.AddArg2(x, y)
  6088  		v0.AddArg2(a, v1)
  6089  		v.AddArg(v0)
  6090  		return true
  6091  	}
  6092  	// match: (GreaterEqual (CMPWconst [0] z:(MADDW a x y)))
  6093  	// cond: z.Uses == 1
  6094  	// result: (GreaterEqualNoov (CMNW a (MULW <x.Type> x y)))
  6095  	for {
  6096  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6097  			break
  6098  		}
  6099  		z := v_0.Args[0]
  6100  		if z.Op != OpARM64MADDW {
  6101  			break
  6102  		}
  6103  		y := z.Args[2]
  6104  		a := z.Args[0]
  6105  		x := z.Args[1]
  6106  		if !(z.Uses == 1) {
  6107  			break
  6108  		}
  6109  		v.reset(OpARM64GreaterEqualNoov)
  6110  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  6111  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  6112  		v1.AddArg2(x, y)
  6113  		v0.AddArg2(a, v1)
  6114  		v.AddArg(v0)
  6115  		return true
  6116  	}
  6117  	// match: (GreaterEqual (CMPWconst [0] z:(MSUBW a x y)))
  6118  	// cond: z.Uses == 1
  6119  	// result: (GreaterEqualNoov (CMPW a (MULW <x.Type> x y)))
  6120  	for {
  6121  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6122  			break
  6123  		}
  6124  		z := v_0.Args[0]
  6125  		if z.Op != OpARM64MSUBW {
  6126  			break
  6127  		}
  6128  		y := z.Args[2]
  6129  		a := z.Args[0]
  6130  		x := z.Args[1]
  6131  		if !(z.Uses == 1) {
  6132  			break
  6133  		}
  6134  		v.reset(OpARM64GreaterEqualNoov)
  6135  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
  6136  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  6137  		v1.AddArg2(x, y)
  6138  		v0.AddArg2(a, v1)
  6139  		v.AddArg(v0)
  6140  		return true
  6141  	}
  6142  	// match: (GreaterEqual (FlagConstant [fc]))
  6143  	// result: (MOVDconst [b2i(fc.ge())])
  6144  	for {
  6145  		if v_0.Op != OpARM64FlagConstant {
  6146  			break
  6147  		}
  6148  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6149  		v.reset(OpARM64MOVDconst)
  6150  		v.AuxInt = int64ToAuxInt(b2i(fc.ge()))
  6151  		return true
  6152  	}
  6153  	// match: (GreaterEqual (InvertFlags x))
  6154  	// result: (LessEqual x)
  6155  	for {
  6156  		if v_0.Op != OpARM64InvertFlags {
  6157  			break
  6158  		}
  6159  		x := v_0.Args[0]
  6160  		v.reset(OpARM64LessEqual)
  6161  		v.AddArg(x)
  6162  		return true
  6163  	}
  6164  	return false
  6165  }
  6166  func rewriteValueARM64_OpARM64GreaterEqualF(v *Value) bool {
  6167  	v_0 := v.Args[0]
  6168  	// match: (GreaterEqualF (InvertFlags x))
  6169  	// result: (LessEqualF x)
  6170  	for {
  6171  		if v_0.Op != OpARM64InvertFlags {
  6172  			break
  6173  		}
  6174  		x := v_0.Args[0]
  6175  		v.reset(OpARM64LessEqualF)
  6176  		v.AddArg(x)
  6177  		return true
  6178  	}
  6179  	return false
  6180  }
  6181  func rewriteValueARM64_OpARM64GreaterEqualNoov(v *Value) bool {
  6182  	v_0 := v.Args[0]
  6183  	b := v.Block
  6184  	typ := &b.Func.Config.Types
  6185  	// match: (GreaterEqualNoov (FlagConstant [fc]))
  6186  	// result: (MOVDconst [b2i(fc.geNoov())])
  6187  	for {
  6188  		if v_0.Op != OpARM64FlagConstant {
  6189  			break
  6190  		}
  6191  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6192  		v.reset(OpARM64MOVDconst)
  6193  		v.AuxInt = int64ToAuxInt(b2i(fc.geNoov()))
  6194  		return true
  6195  	}
  6196  	// match: (GreaterEqualNoov (InvertFlags x))
  6197  	// result: (CSINC [OpARM64NotEqual] (LessThanNoov <typ.Bool> x) (MOVDconst [0]) x)
  6198  	for {
  6199  		if v_0.Op != OpARM64InvertFlags {
  6200  			break
  6201  		}
  6202  		x := v_0.Args[0]
  6203  		v.reset(OpARM64CSINC)
  6204  		v.AuxInt = opToAuxInt(OpARM64NotEqual)
  6205  		v0 := b.NewValue0(v.Pos, OpARM64LessThanNoov, typ.Bool)
  6206  		v0.AddArg(x)
  6207  		v1 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
  6208  		v1.AuxInt = int64ToAuxInt(0)
  6209  		v.AddArg3(v0, v1, x)
  6210  		return true
  6211  	}
  6212  	return false
  6213  }
  6214  func rewriteValueARM64_OpARM64GreaterEqualU(v *Value) bool {
  6215  	v_0 := v.Args[0]
  6216  	// match: (GreaterEqualU (FlagConstant [fc]))
  6217  	// result: (MOVDconst [b2i(fc.uge())])
  6218  	for {
  6219  		if v_0.Op != OpARM64FlagConstant {
  6220  			break
  6221  		}
  6222  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6223  		v.reset(OpARM64MOVDconst)
  6224  		v.AuxInt = int64ToAuxInt(b2i(fc.uge()))
  6225  		return true
  6226  	}
  6227  	// match: (GreaterEqualU (InvertFlags x))
  6228  	// result: (LessEqualU x)
  6229  	for {
  6230  		if v_0.Op != OpARM64InvertFlags {
  6231  			break
  6232  		}
  6233  		x := v_0.Args[0]
  6234  		v.reset(OpARM64LessEqualU)
  6235  		v.AddArg(x)
  6236  		return true
  6237  	}
  6238  	return false
  6239  }
  6240  func rewriteValueARM64_OpARM64GreaterThan(v *Value) bool {
  6241  	v_0 := v.Args[0]
  6242  	b := v.Block
  6243  	// match: (GreaterThan (CMPconst [0] z:(AND x y)))
  6244  	// cond: z.Uses == 1
  6245  	// result: (GreaterThan (TST x y))
  6246  	for {
  6247  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6248  			break
  6249  		}
  6250  		z := v_0.Args[0]
  6251  		if z.Op != OpARM64AND {
  6252  			break
  6253  		}
  6254  		y := z.Args[1]
  6255  		x := z.Args[0]
  6256  		if !(z.Uses == 1) {
  6257  			break
  6258  		}
  6259  		v.reset(OpARM64GreaterThan)
  6260  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  6261  		v0.AddArg2(x, y)
  6262  		v.AddArg(v0)
  6263  		return true
  6264  	}
  6265  	// match: (GreaterThan (CMPWconst [0] x:(ANDconst [c] y)))
  6266  	// cond: x.Uses == 1
  6267  	// result: (GreaterThan (TSTWconst [int32(c)] y))
  6268  	for {
  6269  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6270  			break
  6271  		}
  6272  		x := v_0.Args[0]
  6273  		if x.Op != OpARM64ANDconst {
  6274  			break
  6275  		}
  6276  		c := auxIntToInt64(x.AuxInt)
  6277  		y := x.Args[0]
  6278  		if !(x.Uses == 1) {
  6279  			break
  6280  		}
  6281  		v.reset(OpARM64GreaterThan)
  6282  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  6283  		v0.AuxInt = int32ToAuxInt(int32(c))
  6284  		v0.AddArg(y)
  6285  		v.AddArg(v0)
  6286  		return true
  6287  	}
  6288  	// match: (GreaterThan (CMPWconst [0] z:(AND x y)))
  6289  	// cond: z.Uses == 1
  6290  	// result: (GreaterThan (TSTW x y))
  6291  	for {
  6292  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6293  			break
  6294  		}
  6295  		z := v_0.Args[0]
  6296  		if z.Op != OpARM64AND {
  6297  			break
  6298  		}
  6299  		y := z.Args[1]
  6300  		x := z.Args[0]
  6301  		if !(z.Uses == 1) {
  6302  			break
  6303  		}
  6304  		v.reset(OpARM64GreaterThan)
  6305  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  6306  		v0.AddArg2(x, y)
  6307  		v.AddArg(v0)
  6308  		return true
  6309  	}
  6310  	// match: (GreaterThan (CMPconst [0] x:(ANDconst [c] y)))
  6311  	// cond: x.Uses == 1
  6312  	// result: (GreaterThan (TSTconst [c] y))
  6313  	for {
  6314  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6315  			break
  6316  		}
  6317  		x := v_0.Args[0]
  6318  		if x.Op != OpARM64ANDconst {
  6319  			break
  6320  		}
  6321  		c := auxIntToInt64(x.AuxInt)
  6322  		y := x.Args[0]
  6323  		if !(x.Uses == 1) {
  6324  			break
  6325  		}
  6326  		v.reset(OpARM64GreaterThan)
  6327  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  6328  		v0.AuxInt = int64ToAuxInt(c)
  6329  		v0.AddArg(y)
  6330  		v.AddArg(v0)
  6331  		return true
  6332  	}
  6333  	// match: (GreaterThan (FlagConstant [fc]))
  6334  	// result: (MOVDconst [b2i(fc.gt())])
  6335  	for {
  6336  		if v_0.Op != OpARM64FlagConstant {
  6337  			break
  6338  		}
  6339  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6340  		v.reset(OpARM64MOVDconst)
  6341  		v.AuxInt = int64ToAuxInt(b2i(fc.gt()))
  6342  		return true
  6343  	}
  6344  	// match: (GreaterThan (InvertFlags x))
  6345  	// result: (LessThan x)
  6346  	for {
  6347  		if v_0.Op != OpARM64InvertFlags {
  6348  			break
  6349  		}
  6350  		x := v_0.Args[0]
  6351  		v.reset(OpARM64LessThan)
  6352  		v.AddArg(x)
  6353  		return true
  6354  	}
  6355  	return false
  6356  }
  6357  func rewriteValueARM64_OpARM64GreaterThanF(v *Value) bool {
  6358  	v_0 := v.Args[0]
  6359  	// match: (GreaterThanF (InvertFlags x))
  6360  	// result: (LessThanF x)
  6361  	for {
  6362  		if v_0.Op != OpARM64InvertFlags {
  6363  			break
  6364  		}
  6365  		x := v_0.Args[0]
  6366  		v.reset(OpARM64LessThanF)
  6367  		v.AddArg(x)
  6368  		return true
  6369  	}
  6370  	return false
  6371  }
  6372  func rewriteValueARM64_OpARM64GreaterThanU(v *Value) bool {
  6373  	v_0 := v.Args[0]
  6374  	// match: (GreaterThanU (FlagConstant [fc]))
  6375  	// result: (MOVDconst [b2i(fc.ugt())])
  6376  	for {
  6377  		if v_0.Op != OpARM64FlagConstant {
  6378  			break
  6379  		}
  6380  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6381  		v.reset(OpARM64MOVDconst)
  6382  		v.AuxInt = int64ToAuxInt(b2i(fc.ugt()))
  6383  		return true
  6384  	}
  6385  	// match: (GreaterThanU (InvertFlags x))
  6386  	// result: (LessThanU x)
  6387  	for {
  6388  		if v_0.Op != OpARM64InvertFlags {
  6389  			break
  6390  		}
  6391  		x := v_0.Args[0]
  6392  		v.reset(OpARM64LessThanU)
  6393  		v.AddArg(x)
  6394  		return true
  6395  	}
  6396  	return false
  6397  }
  6398  func rewriteValueARM64_OpARM64LDP(v *Value) bool {
  6399  	v_1 := v.Args[1]
  6400  	v_0 := v.Args[0]
  6401  	b := v.Block
  6402  	config := b.Func.Config
  6403  	// match: (LDP [off1] {sym} (ADDconst [off2] ptr) mem)
  6404  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6405  	// result: (LDP [off1+int32(off2)] {sym} ptr mem)
  6406  	for {
  6407  		off1 := auxIntToInt32(v.AuxInt)
  6408  		sym := auxToSym(v.Aux)
  6409  		if v_0.Op != OpARM64ADDconst {
  6410  			break
  6411  		}
  6412  		off2 := auxIntToInt64(v_0.AuxInt)
  6413  		ptr := v_0.Args[0]
  6414  		mem := v_1
  6415  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6416  			break
  6417  		}
  6418  		v.reset(OpARM64LDP)
  6419  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  6420  		v.Aux = symToAux(sym)
  6421  		v.AddArg2(ptr, mem)
  6422  		return true
  6423  	}
  6424  	// match: (LDP [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  6425  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6426  	// result: (LDP [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  6427  	for {
  6428  		off1 := auxIntToInt32(v.AuxInt)
  6429  		sym1 := auxToSym(v.Aux)
  6430  		if v_0.Op != OpARM64MOVDaddr {
  6431  			break
  6432  		}
  6433  		off2 := auxIntToInt32(v_0.AuxInt)
  6434  		sym2 := auxToSym(v_0.Aux)
  6435  		ptr := v_0.Args[0]
  6436  		mem := v_1
  6437  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6438  			break
  6439  		}
  6440  		v.reset(OpARM64LDP)
  6441  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6442  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6443  		v.AddArg2(ptr, mem)
  6444  		return true
  6445  	}
  6446  	return false
  6447  }
  6448  func rewriteValueARM64_OpARM64LessEqual(v *Value) bool {
  6449  	v_0 := v.Args[0]
  6450  	b := v.Block
  6451  	// match: (LessEqual (CMPconst [0] z:(AND x y)))
  6452  	// cond: z.Uses == 1
  6453  	// result: (LessEqual (TST x y))
  6454  	for {
  6455  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6456  			break
  6457  		}
  6458  		z := v_0.Args[0]
  6459  		if z.Op != OpARM64AND {
  6460  			break
  6461  		}
  6462  		y := z.Args[1]
  6463  		x := z.Args[0]
  6464  		if !(z.Uses == 1) {
  6465  			break
  6466  		}
  6467  		v.reset(OpARM64LessEqual)
  6468  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  6469  		v0.AddArg2(x, y)
  6470  		v.AddArg(v0)
  6471  		return true
  6472  	}
  6473  	// match: (LessEqual (CMPWconst [0] x:(ANDconst [c] y)))
  6474  	// cond: x.Uses == 1
  6475  	// result: (LessEqual (TSTWconst [int32(c)] y))
  6476  	for {
  6477  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6478  			break
  6479  		}
  6480  		x := v_0.Args[0]
  6481  		if x.Op != OpARM64ANDconst {
  6482  			break
  6483  		}
  6484  		c := auxIntToInt64(x.AuxInt)
  6485  		y := x.Args[0]
  6486  		if !(x.Uses == 1) {
  6487  			break
  6488  		}
  6489  		v.reset(OpARM64LessEqual)
  6490  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  6491  		v0.AuxInt = int32ToAuxInt(int32(c))
  6492  		v0.AddArg(y)
  6493  		v.AddArg(v0)
  6494  		return true
  6495  	}
  6496  	// match: (LessEqual (CMPWconst [0] z:(AND x y)))
  6497  	// cond: z.Uses == 1
  6498  	// result: (LessEqual (TSTW x y))
  6499  	for {
  6500  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6501  			break
  6502  		}
  6503  		z := v_0.Args[0]
  6504  		if z.Op != OpARM64AND {
  6505  			break
  6506  		}
  6507  		y := z.Args[1]
  6508  		x := z.Args[0]
  6509  		if !(z.Uses == 1) {
  6510  			break
  6511  		}
  6512  		v.reset(OpARM64LessEqual)
  6513  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  6514  		v0.AddArg2(x, y)
  6515  		v.AddArg(v0)
  6516  		return true
  6517  	}
  6518  	// match: (LessEqual (CMPconst [0] x:(ANDconst [c] y)))
  6519  	// cond: x.Uses == 1
  6520  	// result: (LessEqual (TSTconst [c] y))
  6521  	for {
  6522  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6523  			break
  6524  		}
  6525  		x := v_0.Args[0]
  6526  		if x.Op != OpARM64ANDconst {
  6527  			break
  6528  		}
  6529  		c := auxIntToInt64(x.AuxInt)
  6530  		y := x.Args[0]
  6531  		if !(x.Uses == 1) {
  6532  			break
  6533  		}
  6534  		v.reset(OpARM64LessEqual)
  6535  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  6536  		v0.AuxInt = int64ToAuxInt(c)
  6537  		v0.AddArg(y)
  6538  		v.AddArg(v0)
  6539  		return true
  6540  	}
  6541  	// match: (LessEqual (FlagConstant [fc]))
  6542  	// result: (MOVDconst [b2i(fc.le())])
  6543  	for {
  6544  		if v_0.Op != OpARM64FlagConstant {
  6545  			break
  6546  		}
  6547  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6548  		v.reset(OpARM64MOVDconst)
  6549  		v.AuxInt = int64ToAuxInt(b2i(fc.le()))
  6550  		return true
  6551  	}
  6552  	// match: (LessEqual (InvertFlags x))
  6553  	// result: (GreaterEqual x)
  6554  	for {
  6555  		if v_0.Op != OpARM64InvertFlags {
  6556  			break
  6557  		}
  6558  		x := v_0.Args[0]
  6559  		v.reset(OpARM64GreaterEqual)
  6560  		v.AddArg(x)
  6561  		return true
  6562  	}
  6563  	return false
  6564  }
  6565  func rewriteValueARM64_OpARM64LessEqualF(v *Value) bool {
  6566  	v_0 := v.Args[0]
  6567  	// match: (LessEqualF (InvertFlags x))
  6568  	// result: (GreaterEqualF x)
  6569  	for {
  6570  		if v_0.Op != OpARM64InvertFlags {
  6571  			break
  6572  		}
  6573  		x := v_0.Args[0]
  6574  		v.reset(OpARM64GreaterEqualF)
  6575  		v.AddArg(x)
  6576  		return true
  6577  	}
  6578  	return false
  6579  }
  6580  func rewriteValueARM64_OpARM64LessEqualU(v *Value) bool {
  6581  	v_0 := v.Args[0]
  6582  	// match: (LessEqualU (FlagConstant [fc]))
  6583  	// result: (MOVDconst [b2i(fc.ule())])
  6584  	for {
  6585  		if v_0.Op != OpARM64FlagConstant {
  6586  			break
  6587  		}
  6588  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6589  		v.reset(OpARM64MOVDconst)
  6590  		v.AuxInt = int64ToAuxInt(b2i(fc.ule()))
  6591  		return true
  6592  	}
  6593  	// match: (LessEqualU (InvertFlags x))
  6594  	// result: (GreaterEqualU x)
  6595  	for {
  6596  		if v_0.Op != OpARM64InvertFlags {
  6597  			break
  6598  		}
  6599  		x := v_0.Args[0]
  6600  		v.reset(OpARM64GreaterEqualU)
  6601  		v.AddArg(x)
  6602  		return true
  6603  	}
  6604  	return false
  6605  }
  6606  func rewriteValueARM64_OpARM64LessThan(v *Value) bool {
  6607  	v_0 := v.Args[0]
  6608  	b := v.Block
  6609  	// match: (LessThan (CMPconst [0] z:(AND x y)))
  6610  	// cond: z.Uses == 1
  6611  	// result: (LessThan (TST x y))
  6612  	for {
  6613  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6614  			break
  6615  		}
  6616  		z := v_0.Args[0]
  6617  		if z.Op != OpARM64AND {
  6618  			break
  6619  		}
  6620  		y := z.Args[1]
  6621  		x := z.Args[0]
  6622  		if !(z.Uses == 1) {
  6623  			break
  6624  		}
  6625  		v.reset(OpARM64LessThan)
  6626  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  6627  		v0.AddArg2(x, y)
  6628  		v.AddArg(v0)
  6629  		return true
  6630  	}
  6631  	// match: (LessThan (CMPWconst [0] x:(ANDconst [c] y)))
  6632  	// cond: x.Uses == 1
  6633  	// result: (LessThan (TSTWconst [int32(c)] y))
  6634  	for {
  6635  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6636  			break
  6637  		}
  6638  		x := v_0.Args[0]
  6639  		if x.Op != OpARM64ANDconst {
  6640  			break
  6641  		}
  6642  		c := auxIntToInt64(x.AuxInt)
  6643  		y := x.Args[0]
  6644  		if !(x.Uses == 1) {
  6645  			break
  6646  		}
  6647  		v.reset(OpARM64LessThan)
  6648  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  6649  		v0.AuxInt = int32ToAuxInt(int32(c))
  6650  		v0.AddArg(y)
  6651  		v.AddArg(v0)
  6652  		return true
  6653  	}
  6654  	// match: (LessThan (CMPWconst [0] z:(AND x y)))
  6655  	// cond: z.Uses == 1
  6656  	// result: (LessThan (TSTW x y))
  6657  	for {
  6658  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6659  			break
  6660  		}
  6661  		z := v_0.Args[0]
  6662  		if z.Op != OpARM64AND {
  6663  			break
  6664  		}
  6665  		y := z.Args[1]
  6666  		x := z.Args[0]
  6667  		if !(z.Uses == 1) {
  6668  			break
  6669  		}
  6670  		v.reset(OpARM64LessThan)
  6671  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  6672  		v0.AddArg2(x, y)
  6673  		v.AddArg(v0)
  6674  		return true
  6675  	}
  6676  	// match: (LessThan (CMPconst [0] x:(ANDconst [c] y)))
  6677  	// cond: x.Uses == 1
  6678  	// result: (LessThan (TSTconst [c] y))
  6679  	for {
  6680  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6681  			break
  6682  		}
  6683  		x := v_0.Args[0]
  6684  		if x.Op != OpARM64ANDconst {
  6685  			break
  6686  		}
  6687  		c := auxIntToInt64(x.AuxInt)
  6688  		y := x.Args[0]
  6689  		if !(x.Uses == 1) {
  6690  			break
  6691  		}
  6692  		v.reset(OpARM64LessThan)
  6693  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  6694  		v0.AuxInt = int64ToAuxInt(c)
  6695  		v0.AddArg(y)
  6696  		v.AddArg(v0)
  6697  		return true
  6698  	}
  6699  	// match: (LessThan (CMPconst [0] x:(ADDconst [c] y)))
  6700  	// cond: x.Uses == 1
  6701  	// result: (LessThanNoov (CMNconst [c] y))
  6702  	for {
  6703  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6704  			break
  6705  		}
  6706  		x := v_0.Args[0]
  6707  		if x.Op != OpARM64ADDconst {
  6708  			break
  6709  		}
  6710  		c := auxIntToInt64(x.AuxInt)
  6711  		y := x.Args[0]
  6712  		if !(x.Uses == 1) {
  6713  			break
  6714  		}
  6715  		v.reset(OpARM64LessThanNoov)
  6716  		v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
  6717  		v0.AuxInt = int64ToAuxInt(c)
  6718  		v0.AddArg(y)
  6719  		v.AddArg(v0)
  6720  		return true
  6721  	}
  6722  	// match: (LessThan (CMPWconst [0] x:(ADDconst [c] y)))
  6723  	// cond: x.Uses == 1
  6724  	// result: (LessThanNoov (CMNWconst [int32(c)] y))
  6725  	for {
  6726  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6727  			break
  6728  		}
  6729  		x := v_0.Args[0]
  6730  		if x.Op != OpARM64ADDconst {
  6731  			break
  6732  		}
  6733  		c := auxIntToInt64(x.AuxInt)
  6734  		y := x.Args[0]
  6735  		if !(x.Uses == 1) {
  6736  			break
  6737  		}
  6738  		v.reset(OpARM64LessThanNoov)
  6739  		v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
  6740  		v0.AuxInt = int32ToAuxInt(int32(c))
  6741  		v0.AddArg(y)
  6742  		v.AddArg(v0)
  6743  		return true
  6744  	}
  6745  	// match: (LessThan (CMPconst [0] z:(ADD x y)))
  6746  	// cond: z.Uses == 1
  6747  	// result: (LessThanNoov (CMN x y))
  6748  	for {
  6749  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6750  			break
  6751  		}
  6752  		z := v_0.Args[0]
  6753  		if z.Op != OpARM64ADD {
  6754  			break
  6755  		}
  6756  		y := z.Args[1]
  6757  		x := z.Args[0]
  6758  		if !(z.Uses == 1) {
  6759  			break
  6760  		}
  6761  		v.reset(OpARM64LessThanNoov)
  6762  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  6763  		v0.AddArg2(x, y)
  6764  		v.AddArg(v0)
  6765  		return true
  6766  	}
  6767  	// match: (LessThan (CMPWconst [0] z:(ADD x y)))
  6768  	// cond: z.Uses == 1
  6769  	// result: (LessThanNoov (CMNW x y))
  6770  	for {
  6771  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6772  			break
  6773  		}
  6774  		z := v_0.Args[0]
  6775  		if z.Op != OpARM64ADD {
  6776  			break
  6777  		}
  6778  		y := z.Args[1]
  6779  		x := z.Args[0]
  6780  		if !(z.Uses == 1) {
  6781  			break
  6782  		}
  6783  		v.reset(OpARM64LessThanNoov)
  6784  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  6785  		v0.AddArg2(x, y)
  6786  		v.AddArg(v0)
  6787  		return true
  6788  	}
  6789  	// match: (LessThan (CMPconst [0] z:(MADD a x y)))
  6790  	// cond: z.Uses == 1
  6791  	// result: (LessThanNoov (CMN a (MUL <x.Type> x y)))
  6792  	for {
  6793  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6794  			break
  6795  		}
  6796  		z := v_0.Args[0]
  6797  		if z.Op != OpARM64MADD {
  6798  			break
  6799  		}
  6800  		y := z.Args[2]
  6801  		a := z.Args[0]
  6802  		x := z.Args[1]
  6803  		if !(z.Uses == 1) {
  6804  			break
  6805  		}
  6806  		v.reset(OpARM64LessThanNoov)
  6807  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  6808  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  6809  		v1.AddArg2(x, y)
  6810  		v0.AddArg2(a, v1)
  6811  		v.AddArg(v0)
  6812  		return true
  6813  	}
  6814  	// match: (LessThan (CMPconst [0] z:(MSUB a x y)))
  6815  	// cond: z.Uses == 1
  6816  	// result: (LessThanNoov (CMP a (MUL <x.Type> x y)))
  6817  	for {
  6818  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6819  			break
  6820  		}
  6821  		z := v_0.Args[0]
  6822  		if z.Op != OpARM64MSUB {
  6823  			break
  6824  		}
  6825  		y := z.Args[2]
  6826  		a := z.Args[0]
  6827  		x := z.Args[1]
  6828  		if !(z.Uses == 1) {
  6829  			break
  6830  		}
  6831  		v.reset(OpARM64LessThanNoov)
  6832  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
  6833  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  6834  		v1.AddArg2(x, y)
  6835  		v0.AddArg2(a, v1)
  6836  		v.AddArg(v0)
  6837  		return true
  6838  	}
  6839  	// match: (LessThan (CMPWconst [0] z:(MADDW a x y)))
  6840  	// cond: z.Uses == 1
  6841  	// result: (LessThanNoov (CMNW a (MULW <x.Type> x y)))
  6842  	for {
  6843  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6844  			break
  6845  		}
  6846  		z := v_0.Args[0]
  6847  		if z.Op != OpARM64MADDW {
  6848  			break
  6849  		}
  6850  		y := z.Args[2]
  6851  		a := z.Args[0]
  6852  		x := z.Args[1]
  6853  		if !(z.Uses == 1) {
  6854  			break
  6855  		}
  6856  		v.reset(OpARM64LessThanNoov)
  6857  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  6858  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  6859  		v1.AddArg2(x, y)
  6860  		v0.AddArg2(a, v1)
  6861  		v.AddArg(v0)
  6862  		return true
  6863  	}
  6864  	// match: (LessThan (CMPWconst [0] z:(MSUBW a x y)))
  6865  	// cond: z.Uses == 1
  6866  	// result: (LessThanNoov (CMPW a (MULW <x.Type> x y)))
  6867  	for {
  6868  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6869  			break
  6870  		}
  6871  		z := v_0.Args[0]
  6872  		if z.Op != OpARM64MSUBW {
  6873  			break
  6874  		}
  6875  		y := z.Args[2]
  6876  		a := z.Args[0]
  6877  		x := z.Args[1]
  6878  		if !(z.Uses == 1) {
  6879  			break
  6880  		}
  6881  		v.reset(OpARM64LessThanNoov)
  6882  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
  6883  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  6884  		v1.AddArg2(x, y)
  6885  		v0.AddArg2(a, v1)
  6886  		v.AddArg(v0)
  6887  		return true
  6888  	}
  6889  	// match: (LessThan (FlagConstant [fc]))
  6890  	// result: (MOVDconst [b2i(fc.lt())])
  6891  	for {
  6892  		if v_0.Op != OpARM64FlagConstant {
  6893  			break
  6894  		}
  6895  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6896  		v.reset(OpARM64MOVDconst)
  6897  		v.AuxInt = int64ToAuxInt(b2i(fc.lt()))
  6898  		return true
  6899  	}
  6900  	// match: (LessThan (InvertFlags x))
  6901  	// result: (GreaterThan x)
  6902  	for {
  6903  		if v_0.Op != OpARM64InvertFlags {
  6904  			break
  6905  		}
  6906  		x := v_0.Args[0]
  6907  		v.reset(OpARM64GreaterThan)
  6908  		v.AddArg(x)
  6909  		return true
  6910  	}
  6911  	return false
  6912  }
  6913  func rewriteValueARM64_OpARM64LessThanF(v *Value) bool {
  6914  	v_0 := v.Args[0]
  6915  	// match: (LessThanF (InvertFlags x))
  6916  	// result: (GreaterThanF x)
  6917  	for {
  6918  		if v_0.Op != OpARM64InvertFlags {
  6919  			break
  6920  		}
  6921  		x := v_0.Args[0]
  6922  		v.reset(OpARM64GreaterThanF)
  6923  		v.AddArg(x)
  6924  		return true
  6925  	}
  6926  	return false
  6927  }
  6928  func rewriteValueARM64_OpARM64LessThanNoov(v *Value) bool {
  6929  	v_0 := v.Args[0]
  6930  	b := v.Block
  6931  	typ := &b.Func.Config.Types
  6932  	// match: (LessThanNoov (FlagConstant [fc]))
  6933  	// result: (MOVDconst [b2i(fc.ltNoov())])
  6934  	for {
  6935  		if v_0.Op != OpARM64FlagConstant {
  6936  			break
  6937  		}
  6938  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6939  		v.reset(OpARM64MOVDconst)
  6940  		v.AuxInt = int64ToAuxInt(b2i(fc.ltNoov()))
  6941  		return true
  6942  	}
  6943  	// match: (LessThanNoov (InvertFlags x))
  6944  	// result: (CSEL0 [OpARM64NotEqual] (GreaterEqualNoov <typ.Bool> x) x)
  6945  	for {
  6946  		if v_0.Op != OpARM64InvertFlags {
  6947  			break
  6948  		}
  6949  		x := v_0.Args[0]
  6950  		v.reset(OpARM64CSEL0)
  6951  		v.AuxInt = opToAuxInt(OpARM64NotEqual)
  6952  		v0 := b.NewValue0(v.Pos, OpARM64GreaterEqualNoov, typ.Bool)
  6953  		v0.AddArg(x)
  6954  		v.AddArg2(v0, x)
  6955  		return true
  6956  	}
  6957  	return false
  6958  }
  6959  func rewriteValueARM64_OpARM64LessThanU(v *Value) bool {
  6960  	v_0 := v.Args[0]
  6961  	// match: (LessThanU (FlagConstant [fc]))
  6962  	// result: (MOVDconst [b2i(fc.ult())])
  6963  	for {
  6964  		if v_0.Op != OpARM64FlagConstant {
  6965  			break
  6966  		}
  6967  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6968  		v.reset(OpARM64MOVDconst)
  6969  		v.AuxInt = int64ToAuxInt(b2i(fc.ult()))
  6970  		return true
  6971  	}
  6972  	// match: (LessThanU (InvertFlags x))
  6973  	// result: (GreaterThanU x)
  6974  	for {
  6975  		if v_0.Op != OpARM64InvertFlags {
  6976  			break
  6977  		}
  6978  		x := v_0.Args[0]
  6979  		v.reset(OpARM64GreaterThanU)
  6980  		v.AddArg(x)
  6981  		return true
  6982  	}
  6983  	return false
  6984  }
  6985  func rewriteValueARM64_OpARM64MADD(v *Value) bool {
  6986  	v_2 := v.Args[2]
  6987  	v_1 := v.Args[1]
  6988  	v_0 := v.Args[0]
  6989  	b := v.Block
  6990  	// match: (MADD a x (MOVDconst [-1]))
  6991  	// result: (SUB a x)
  6992  	for {
  6993  		a := v_0
  6994  		x := v_1
  6995  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != -1 {
  6996  			break
  6997  		}
  6998  		v.reset(OpARM64SUB)
  6999  		v.AddArg2(a, x)
  7000  		return true
  7001  	}
  7002  	// match: (MADD a _ (MOVDconst [0]))
  7003  	// result: a
  7004  	for {
  7005  		a := v_0
  7006  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 0 {
  7007  			break
  7008  		}
  7009  		v.copyOf(a)
  7010  		return true
  7011  	}
  7012  	// match: (MADD a x (MOVDconst [1]))
  7013  	// result: (ADD a x)
  7014  	for {
  7015  		a := v_0
  7016  		x := v_1
  7017  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 1 {
  7018  			break
  7019  		}
  7020  		v.reset(OpARM64ADD)
  7021  		v.AddArg2(a, x)
  7022  		return true
  7023  	}
  7024  	// match: (MADD a x (MOVDconst [c]))
  7025  	// cond: isPowerOfTwo(c)
  7026  	// result: (ADDshiftLL a x [log64(c)])
  7027  	for {
  7028  		a := v_0
  7029  		x := v_1
  7030  		if v_2.Op != OpARM64MOVDconst {
  7031  			break
  7032  		}
  7033  		c := auxIntToInt64(v_2.AuxInt)
  7034  		if !(isPowerOfTwo(c)) {
  7035  			break
  7036  		}
  7037  		v.reset(OpARM64ADDshiftLL)
  7038  		v.AuxInt = int64ToAuxInt(log64(c))
  7039  		v.AddArg2(a, x)
  7040  		return true
  7041  	}
  7042  	// match: (MADD a x (MOVDconst [c]))
  7043  	// cond: isPowerOfTwo(c-1) && c>=3
  7044  	// result: (ADD a (ADDshiftLL <x.Type> x x [log64(c-1)]))
  7045  	for {
  7046  		a := v_0
  7047  		x := v_1
  7048  		if v_2.Op != OpARM64MOVDconst {
  7049  			break
  7050  		}
  7051  		c := auxIntToInt64(v_2.AuxInt)
  7052  		if !(isPowerOfTwo(c-1) && c >= 3) {
  7053  			break
  7054  		}
  7055  		v.reset(OpARM64ADD)
  7056  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7057  		v0.AuxInt = int64ToAuxInt(log64(c - 1))
  7058  		v0.AddArg2(x, x)
  7059  		v.AddArg2(a, v0)
  7060  		return true
  7061  	}
  7062  	// match: (MADD a x (MOVDconst [c]))
  7063  	// cond: isPowerOfTwo(c+1) && c>=7
  7064  	// result: (SUB a (SUBshiftLL <x.Type> x x [log64(c+1)]))
  7065  	for {
  7066  		a := v_0
  7067  		x := v_1
  7068  		if v_2.Op != OpARM64MOVDconst {
  7069  			break
  7070  		}
  7071  		c := auxIntToInt64(v_2.AuxInt)
  7072  		if !(isPowerOfTwo(c+1) && c >= 7) {
  7073  			break
  7074  		}
  7075  		v.reset(OpARM64SUB)
  7076  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7077  		v0.AuxInt = int64ToAuxInt(log64(c + 1))
  7078  		v0.AddArg2(x, x)
  7079  		v.AddArg2(a, v0)
  7080  		return true
  7081  	}
  7082  	// match: (MADD a x (MOVDconst [c]))
  7083  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
  7084  	// result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
  7085  	for {
  7086  		a := v_0
  7087  		x := v_1
  7088  		if v_2.Op != OpARM64MOVDconst {
  7089  			break
  7090  		}
  7091  		c := auxIntToInt64(v_2.AuxInt)
  7092  		if !(c%3 == 0 && isPowerOfTwo(c/3)) {
  7093  			break
  7094  		}
  7095  		v.reset(OpARM64SUBshiftLL)
  7096  		v.AuxInt = int64ToAuxInt(log64(c / 3))
  7097  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7098  		v0.AuxInt = int64ToAuxInt(2)
  7099  		v0.AddArg2(x, x)
  7100  		v.AddArg2(a, v0)
  7101  		return true
  7102  	}
  7103  	// match: (MADD a x (MOVDconst [c]))
  7104  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
  7105  	// result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
  7106  	for {
  7107  		a := v_0
  7108  		x := v_1
  7109  		if v_2.Op != OpARM64MOVDconst {
  7110  			break
  7111  		}
  7112  		c := auxIntToInt64(v_2.AuxInt)
  7113  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
  7114  			break
  7115  		}
  7116  		v.reset(OpARM64ADDshiftLL)
  7117  		v.AuxInt = int64ToAuxInt(log64(c / 5))
  7118  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7119  		v0.AuxInt = int64ToAuxInt(2)
  7120  		v0.AddArg2(x, x)
  7121  		v.AddArg2(a, v0)
  7122  		return true
  7123  	}
  7124  	// match: (MADD a x (MOVDconst [c]))
  7125  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
  7126  	// result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
  7127  	for {
  7128  		a := v_0
  7129  		x := v_1
  7130  		if v_2.Op != OpARM64MOVDconst {
  7131  			break
  7132  		}
  7133  		c := auxIntToInt64(v_2.AuxInt)
  7134  		if !(c%7 == 0 && isPowerOfTwo(c/7)) {
  7135  			break
  7136  		}
  7137  		v.reset(OpARM64SUBshiftLL)
  7138  		v.AuxInt = int64ToAuxInt(log64(c / 7))
  7139  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7140  		v0.AuxInt = int64ToAuxInt(3)
  7141  		v0.AddArg2(x, x)
  7142  		v.AddArg2(a, v0)
  7143  		return true
  7144  	}
  7145  	// match: (MADD a x (MOVDconst [c]))
  7146  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
  7147  	// result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
  7148  	for {
  7149  		a := v_0
  7150  		x := v_1
  7151  		if v_2.Op != OpARM64MOVDconst {
  7152  			break
  7153  		}
  7154  		c := auxIntToInt64(v_2.AuxInt)
  7155  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
  7156  			break
  7157  		}
  7158  		v.reset(OpARM64ADDshiftLL)
  7159  		v.AuxInt = int64ToAuxInt(log64(c / 9))
  7160  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7161  		v0.AuxInt = int64ToAuxInt(3)
  7162  		v0.AddArg2(x, x)
  7163  		v.AddArg2(a, v0)
  7164  		return true
  7165  	}
  7166  	// match: (MADD a (MOVDconst [-1]) x)
  7167  	// result: (SUB a x)
  7168  	for {
  7169  		a := v_0
  7170  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
  7171  			break
  7172  		}
  7173  		x := v_2
  7174  		v.reset(OpARM64SUB)
  7175  		v.AddArg2(a, x)
  7176  		return true
  7177  	}
  7178  	// match: (MADD a (MOVDconst [0]) _)
  7179  	// result: a
  7180  	for {
  7181  		a := v_0
  7182  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  7183  			break
  7184  		}
  7185  		v.copyOf(a)
  7186  		return true
  7187  	}
  7188  	// match: (MADD a (MOVDconst [1]) x)
  7189  	// result: (ADD a x)
  7190  	for {
  7191  		a := v_0
  7192  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
  7193  			break
  7194  		}
  7195  		x := v_2
  7196  		v.reset(OpARM64ADD)
  7197  		v.AddArg2(a, x)
  7198  		return true
  7199  	}
  7200  	// match: (MADD a (MOVDconst [c]) x)
  7201  	// cond: isPowerOfTwo(c)
  7202  	// result: (ADDshiftLL a x [log64(c)])
  7203  	for {
  7204  		a := v_0
  7205  		if v_1.Op != OpARM64MOVDconst {
  7206  			break
  7207  		}
  7208  		c := auxIntToInt64(v_1.AuxInt)
  7209  		x := v_2
  7210  		if !(isPowerOfTwo(c)) {
  7211  			break
  7212  		}
  7213  		v.reset(OpARM64ADDshiftLL)
  7214  		v.AuxInt = int64ToAuxInt(log64(c))
  7215  		v.AddArg2(a, x)
  7216  		return true
  7217  	}
  7218  	// match: (MADD a (MOVDconst [c]) x)
  7219  	// cond: isPowerOfTwo(c-1) && c>=3
  7220  	// result: (ADD a (ADDshiftLL <x.Type> x x [log64(c-1)]))
  7221  	for {
  7222  		a := v_0
  7223  		if v_1.Op != OpARM64MOVDconst {
  7224  			break
  7225  		}
  7226  		c := auxIntToInt64(v_1.AuxInt)
  7227  		x := v_2
  7228  		if !(isPowerOfTwo(c-1) && c >= 3) {
  7229  			break
  7230  		}
  7231  		v.reset(OpARM64ADD)
  7232  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7233  		v0.AuxInt = int64ToAuxInt(log64(c - 1))
  7234  		v0.AddArg2(x, x)
  7235  		v.AddArg2(a, v0)
  7236  		return true
  7237  	}
  7238  	// match: (MADD a (MOVDconst [c]) x)
  7239  	// cond: isPowerOfTwo(c+1) && c>=7
  7240  	// result: (SUB a (SUBshiftLL <x.Type> x x [log64(c+1)]))
  7241  	for {
  7242  		a := v_0
  7243  		if v_1.Op != OpARM64MOVDconst {
  7244  			break
  7245  		}
  7246  		c := auxIntToInt64(v_1.AuxInt)
  7247  		x := v_2
  7248  		if !(isPowerOfTwo(c+1) && c >= 7) {
  7249  			break
  7250  		}
  7251  		v.reset(OpARM64SUB)
  7252  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7253  		v0.AuxInt = int64ToAuxInt(log64(c + 1))
  7254  		v0.AddArg2(x, x)
  7255  		v.AddArg2(a, v0)
  7256  		return true
  7257  	}
  7258  	// match: (MADD a (MOVDconst [c]) x)
  7259  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
  7260  	// result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
  7261  	for {
  7262  		a := v_0
  7263  		if v_1.Op != OpARM64MOVDconst {
  7264  			break
  7265  		}
  7266  		c := auxIntToInt64(v_1.AuxInt)
  7267  		x := v_2
  7268  		if !(c%3 == 0 && isPowerOfTwo(c/3)) {
  7269  			break
  7270  		}
  7271  		v.reset(OpARM64SUBshiftLL)
  7272  		v.AuxInt = int64ToAuxInt(log64(c / 3))
  7273  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7274  		v0.AuxInt = int64ToAuxInt(2)
  7275  		v0.AddArg2(x, x)
  7276  		v.AddArg2(a, v0)
  7277  		return true
  7278  	}
  7279  	// match: (MADD a (MOVDconst [c]) x)
  7280  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
  7281  	// result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
  7282  	for {
  7283  		a := v_0
  7284  		if v_1.Op != OpARM64MOVDconst {
  7285  			break
  7286  		}
  7287  		c := auxIntToInt64(v_1.AuxInt)
  7288  		x := v_2
  7289  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
  7290  			break
  7291  		}
  7292  		v.reset(OpARM64ADDshiftLL)
  7293  		v.AuxInt = int64ToAuxInt(log64(c / 5))
  7294  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7295  		v0.AuxInt = int64ToAuxInt(2)
  7296  		v0.AddArg2(x, x)
  7297  		v.AddArg2(a, v0)
  7298  		return true
  7299  	}
  7300  	// match: (MADD a (MOVDconst [c]) x)
  7301  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
  7302  	// result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
  7303  	for {
  7304  		a := v_0
  7305  		if v_1.Op != OpARM64MOVDconst {
  7306  			break
  7307  		}
  7308  		c := auxIntToInt64(v_1.AuxInt)
  7309  		x := v_2
  7310  		if !(c%7 == 0 && isPowerOfTwo(c/7)) {
  7311  			break
  7312  		}
  7313  		v.reset(OpARM64SUBshiftLL)
  7314  		v.AuxInt = int64ToAuxInt(log64(c / 7))
  7315  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7316  		v0.AuxInt = int64ToAuxInt(3)
  7317  		v0.AddArg2(x, x)
  7318  		v.AddArg2(a, v0)
  7319  		return true
  7320  	}
  7321  	// match: (MADD a (MOVDconst [c]) x)
  7322  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
  7323  	// result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
  7324  	for {
  7325  		a := v_0
  7326  		if v_1.Op != OpARM64MOVDconst {
  7327  			break
  7328  		}
  7329  		c := auxIntToInt64(v_1.AuxInt)
  7330  		x := v_2
  7331  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
  7332  			break
  7333  		}
  7334  		v.reset(OpARM64ADDshiftLL)
  7335  		v.AuxInt = int64ToAuxInt(log64(c / 9))
  7336  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7337  		v0.AuxInt = int64ToAuxInt(3)
  7338  		v0.AddArg2(x, x)
  7339  		v.AddArg2(a, v0)
  7340  		return true
  7341  	}
  7342  	// match: (MADD (MOVDconst [c]) x y)
  7343  	// result: (ADDconst [c] (MUL <x.Type> x y))
  7344  	for {
  7345  		if v_0.Op != OpARM64MOVDconst {
  7346  			break
  7347  		}
  7348  		c := auxIntToInt64(v_0.AuxInt)
  7349  		x := v_1
  7350  		y := v_2
  7351  		v.reset(OpARM64ADDconst)
  7352  		v.AuxInt = int64ToAuxInt(c)
  7353  		v0 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  7354  		v0.AddArg2(x, y)
  7355  		v.AddArg(v0)
  7356  		return true
  7357  	}
  7358  	// match: (MADD a (MOVDconst [c]) (MOVDconst [d]))
  7359  	// result: (ADDconst [c*d] a)
  7360  	for {
  7361  		a := v_0
  7362  		if v_1.Op != OpARM64MOVDconst {
  7363  			break
  7364  		}
  7365  		c := auxIntToInt64(v_1.AuxInt)
  7366  		if v_2.Op != OpARM64MOVDconst {
  7367  			break
  7368  		}
  7369  		d := auxIntToInt64(v_2.AuxInt)
  7370  		v.reset(OpARM64ADDconst)
  7371  		v.AuxInt = int64ToAuxInt(c * d)
  7372  		v.AddArg(a)
  7373  		return true
  7374  	}
  7375  	return false
  7376  }
  7377  func rewriteValueARM64_OpARM64MADDW(v *Value) bool {
  7378  	v_2 := v.Args[2]
  7379  	v_1 := v.Args[1]
  7380  	v_0 := v.Args[0]
  7381  	b := v.Block
  7382  	// match: (MADDW a x (MOVDconst [c]))
  7383  	// cond: int32(c)==-1
  7384  	// result: (MOVWUreg (SUB <a.Type> a x))
  7385  	for {
  7386  		a := v_0
  7387  		x := v_1
  7388  		if v_2.Op != OpARM64MOVDconst {
  7389  			break
  7390  		}
  7391  		c := auxIntToInt64(v_2.AuxInt)
  7392  		if !(int32(c) == -1) {
  7393  			break
  7394  		}
  7395  		v.reset(OpARM64MOVWUreg)
  7396  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
  7397  		v0.AddArg2(a, x)
  7398  		v.AddArg(v0)
  7399  		return true
  7400  	}
  7401  	// match: (MADDW a _ (MOVDconst [c]))
  7402  	// cond: int32(c)==0
  7403  	// result: (MOVWUreg a)
  7404  	for {
  7405  		a := v_0
  7406  		if v_2.Op != OpARM64MOVDconst {
  7407  			break
  7408  		}
  7409  		c := auxIntToInt64(v_2.AuxInt)
  7410  		if !(int32(c) == 0) {
  7411  			break
  7412  		}
  7413  		v.reset(OpARM64MOVWUreg)
  7414  		v.AddArg(a)
  7415  		return true
  7416  	}
  7417  	// match: (MADDW a x (MOVDconst [c]))
  7418  	// cond: int32(c)==1
  7419  	// result: (MOVWUreg (ADD <a.Type> a x))
  7420  	for {
  7421  		a := v_0
  7422  		x := v_1
  7423  		if v_2.Op != OpARM64MOVDconst {
  7424  			break
  7425  		}
  7426  		c := auxIntToInt64(v_2.AuxInt)
  7427  		if !(int32(c) == 1) {
  7428  			break
  7429  		}
  7430  		v.reset(OpARM64MOVWUreg)
  7431  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
  7432  		v0.AddArg2(a, x)
  7433  		v.AddArg(v0)
  7434  		return true
  7435  	}
  7436  	// match: (MADDW a x (MOVDconst [c]))
  7437  	// cond: isPowerOfTwo(c)
  7438  	// result: (MOVWUreg (ADDshiftLL <a.Type> a x [log64(c)]))
  7439  	for {
  7440  		a := v_0
  7441  		x := v_1
  7442  		if v_2.Op != OpARM64MOVDconst {
  7443  			break
  7444  		}
  7445  		c := auxIntToInt64(v_2.AuxInt)
  7446  		if !(isPowerOfTwo(c)) {
  7447  			break
  7448  		}
  7449  		v.reset(OpARM64MOVWUreg)
  7450  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  7451  		v0.AuxInt = int64ToAuxInt(log64(c))
  7452  		v0.AddArg2(a, x)
  7453  		v.AddArg(v0)
  7454  		return true
  7455  	}
  7456  	// match: (MADDW a x (MOVDconst [c]))
  7457  	// cond: isPowerOfTwo(c-1) && int32(c)>=3
  7458  	// result: (MOVWUreg (ADD <a.Type> a (ADDshiftLL <x.Type> x x [log64(c-1)])))
  7459  	for {
  7460  		a := v_0
  7461  		x := v_1
  7462  		if v_2.Op != OpARM64MOVDconst {
  7463  			break
  7464  		}
  7465  		c := auxIntToInt64(v_2.AuxInt)
  7466  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
  7467  			break
  7468  		}
  7469  		v.reset(OpARM64MOVWUreg)
  7470  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
  7471  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7472  		v1.AuxInt = int64ToAuxInt(log64(c - 1))
  7473  		v1.AddArg2(x, x)
  7474  		v0.AddArg2(a, v1)
  7475  		v.AddArg(v0)
  7476  		return true
  7477  	}
  7478  	// match: (MADDW a x (MOVDconst [c]))
  7479  	// cond: isPowerOfTwo(c+1) && int32(c)>=7
  7480  	// result: (MOVWUreg (SUB <a.Type> a (SUBshiftLL <x.Type> x x [log64(c+1)])))
  7481  	for {
  7482  		a := v_0
  7483  		x := v_1
  7484  		if v_2.Op != OpARM64MOVDconst {
  7485  			break
  7486  		}
  7487  		c := auxIntToInt64(v_2.AuxInt)
  7488  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
  7489  			break
  7490  		}
  7491  		v.reset(OpARM64MOVWUreg)
  7492  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
  7493  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7494  		v1.AuxInt = int64ToAuxInt(log64(c + 1))
  7495  		v1.AddArg2(x, x)
  7496  		v0.AddArg2(a, v1)
  7497  		v.AddArg(v0)
  7498  		return true
  7499  	}
  7500  	// match: (MADDW a x (MOVDconst [c]))
  7501  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
  7502  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)]))
  7503  	for {
  7504  		a := v_0
  7505  		x := v_1
  7506  		if v_2.Op != OpARM64MOVDconst {
  7507  			break
  7508  		}
  7509  		c := auxIntToInt64(v_2.AuxInt)
  7510  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
  7511  			break
  7512  		}
  7513  		v.reset(OpARM64MOVWUreg)
  7514  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
  7515  		v0.AuxInt = int64ToAuxInt(log64(c / 3))
  7516  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7517  		v1.AuxInt = int64ToAuxInt(2)
  7518  		v1.AddArg2(x, x)
  7519  		v0.AddArg2(a, v1)
  7520  		v.AddArg(v0)
  7521  		return true
  7522  	}
  7523  	// match: (MADDW a x (MOVDconst [c]))
  7524  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
  7525  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)]))
  7526  	for {
  7527  		a := v_0
  7528  		x := v_1
  7529  		if v_2.Op != OpARM64MOVDconst {
  7530  			break
  7531  		}
  7532  		c := auxIntToInt64(v_2.AuxInt)
  7533  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
  7534  			break
  7535  		}
  7536  		v.reset(OpARM64MOVWUreg)
  7537  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  7538  		v0.AuxInt = int64ToAuxInt(log64(c / 5))
  7539  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7540  		v1.AuxInt = int64ToAuxInt(2)
  7541  		v1.AddArg2(x, x)
  7542  		v0.AddArg2(a, v1)
  7543  		v.AddArg(v0)
  7544  		return true
  7545  	}
  7546  	// match: (MADDW a x (MOVDconst [c]))
  7547  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
  7548  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)]))
  7549  	for {
  7550  		a := v_0
  7551  		x := v_1
  7552  		if v_2.Op != OpARM64MOVDconst {
  7553  			break
  7554  		}
  7555  		c := auxIntToInt64(v_2.AuxInt)
  7556  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
  7557  			break
  7558  		}
  7559  		v.reset(OpARM64MOVWUreg)
  7560  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
  7561  		v0.AuxInt = int64ToAuxInt(log64(c / 7))
  7562  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7563  		v1.AuxInt = int64ToAuxInt(3)
  7564  		v1.AddArg2(x, x)
  7565  		v0.AddArg2(a, v1)
  7566  		v.AddArg(v0)
  7567  		return true
  7568  	}
  7569  	// match: (MADDW a x (MOVDconst [c]))
  7570  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
  7571  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)]))
  7572  	for {
  7573  		a := v_0
  7574  		x := v_1
  7575  		if v_2.Op != OpARM64MOVDconst {
  7576  			break
  7577  		}
  7578  		c := auxIntToInt64(v_2.AuxInt)
  7579  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
  7580  			break
  7581  		}
  7582  		v.reset(OpARM64MOVWUreg)
  7583  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  7584  		v0.AuxInt = int64ToAuxInt(log64(c / 9))
  7585  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7586  		v1.AuxInt = int64ToAuxInt(3)
  7587  		v1.AddArg2(x, x)
  7588  		v0.AddArg2(a, v1)
  7589  		v.AddArg(v0)
  7590  		return true
  7591  	}
  7592  	// match: (MADDW a (MOVDconst [c]) x)
  7593  	// cond: int32(c)==-1
  7594  	// result: (MOVWUreg (SUB <a.Type> a x))
  7595  	for {
  7596  		a := v_0
  7597  		if v_1.Op != OpARM64MOVDconst {
  7598  			break
  7599  		}
  7600  		c := auxIntToInt64(v_1.AuxInt)
  7601  		x := v_2
  7602  		if !(int32(c) == -1) {
  7603  			break
  7604  		}
  7605  		v.reset(OpARM64MOVWUreg)
  7606  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
  7607  		v0.AddArg2(a, x)
  7608  		v.AddArg(v0)
  7609  		return true
  7610  	}
  7611  	// match: (MADDW a (MOVDconst [c]) _)
  7612  	// cond: int32(c)==0
  7613  	// result: (MOVWUreg a)
  7614  	for {
  7615  		a := v_0
  7616  		if v_1.Op != OpARM64MOVDconst {
  7617  			break
  7618  		}
  7619  		c := auxIntToInt64(v_1.AuxInt)
  7620  		if !(int32(c) == 0) {
  7621  			break
  7622  		}
  7623  		v.reset(OpARM64MOVWUreg)
  7624  		v.AddArg(a)
  7625  		return true
  7626  	}
  7627  	// match: (MADDW a (MOVDconst [c]) x)
  7628  	// cond: int32(c)==1
  7629  	// result: (MOVWUreg (ADD <a.Type> a x))
  7630  	for {
  7631  		a := v_0
  7632  		if v_1.Op != OpARM64MOVDconst {
  7633  			break
  7634  		}
  7635  		c := auxIntToInt64(v_1.AuxInt)
  7636  		x := v_2
  7637  		if !(int32(c) == 1) {
  7638  			break
  7639  		}
  7640  		v.reset(OpARM64MOVWUreg)
  7641  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
  7642  		v0.AddArg2(a, x)
  7643  		v.AddArg(v0)
  7644  		return true
  7645  	}
  7646  	// match: (MADDW a (MOVDconst [c]) x)
  7647  	// cond: isPowerOfTwo(c)
  7648  	// result: (MOVWUreg (ADDshiftLL <a.Type> a x [log64(c)]))
  7649  	for {
  7650  		a := v_0
  7651  		if v_1.Op != OpARM64MOVDconst {
  7652  			break
  7653  		}
  7654  		c := auxIntToInt64(v_1.AuxInt)
  7655  		x := v_2
  7656  		if !(isPowerOfTwo(c)) {
  7657  			break
  7658  		}
  7659  		v.reset(OpARM64MOVWUreg)
  7660  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  7661  		v0.AuxInt = int64ToAuxInt(log64(c))
  7662  		v0.AddArg2(a, x)
  7663  		v.AddArg(v0)
  7664  		return true
  7665  	}
  7666  	// match: (MADDW a (MOVDconst [c]) x)
  7667  	// cond: isPowerOfTwo(c-1) && int32(c)>=3
  7668  	// result: (MOVWUreg (ADD <a.Type> a (ADDshiftLL <x.Type> x x [log64(c-1)])))
  7669  	for {
  7670  		a := v_0
  7671  		if v_1.Op != OpARM64MOVDconst {
  7672  			break
  7673  		}
  7674  		c := auxIntToInt64(v_1.AuxInt)
  7675  		x := v_2
  7676  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
  7677  			break
  7678  		}
  7679  		v.reset(OpARM64MOVWUreg)
  7680  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
  7681  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7682  		v1.AuxInt = int64ToAuxInt(log64(c - 1))
  7683  		v1.AddArg2(x, x)
  7684  		v0.AddArg2(a, v1)
  7685  		v.AddArg(v0)
  7686  		return true
  7687  	}
  7688  	// match: (MADDW a (MOVDconst [c]) x)
  7689  	// cond: isPowerOfTwo(c+1) && int32(c)>=7
  7690  	// result: (MOVWUreg (SUB <a.Type> a (SUBshiftLL <x.Type> x x [log64(c+1)])))
  7691  	for {
  7692  		a := v_0
  7693  		if v_1.Op != OpARM64MOVDconst {
  7694  			break
  7695  		}
  7696  		c := auxIntToInt64(v_1.AuxInt)
  7697  		x := v_2
  7698  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
  7699  			break
  7700  		}
  7701  		v.reset(OpARM64MOVWUreg)
  7702  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
  7703  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7704  		v1.AuxInt = int64ToAuxInt(log64(c + 1))
  7705  		v1.AddArg2(x, x)
  7706  		v0.AddArg2(a, v1)
  7707  		v.AddArg(v0)
  7708  		return true
  7709  	}
  7710  	// match: (MADDW a (MOVDconst [c]) x)
  7711  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
  7712  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)]))
  7713  	for {
  7714  		a := v_0
  7715  		if v_1.Op != OpARM64MOVDconst {
  7716  			break
  7717  		}
  7718  		c := auxIntToInt64(v_1.AuxInt)
  7719  		x := v_2
  7720  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
  7721  			break
  7722  		}
  7723  		v.reset(OpARM64MOVWUreg)
  7724  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
  7725  		v0.AuxInt = int64ToAuxInt(log64(c / 3))
  7726  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7727  		v1.AuxInt = int64ToAuxInt(2)
  7728  		v1.AddArg2(x, x)
  7729  		v0.AddArg2(a, v1)
  7730  		v.AddArg(v0)
  7731  		return true
  7732  	}
  7733  	// match: (MADDW a (MOVDconst [c]) x)
  7734  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
  7735  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)]))
  7736  	for {
  7737  		a := v_0
  7738  		if v_1.Op != OpARM64MOVDconst {
  7739  			break
  7740  		}
  7741  		c := auxIntToInt64(v_1.AuxInt)
  7742  		x := v_2
  7743  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
  7744  			break
  7745  		}
  7746  		v.reset(OpARM64MOVWUreg)
  7747  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  7748  		v0.AuxInt = int64ToAuxInt(log64(c / 5))
  7749  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7750  		v1.AuxInt = int64ToAuxInt(2)
  7751  		v1.AddArg2(x, x)
  7752  		v0.AddArg2(a, v1)
  7753  		v.AddArg(v0)
  7754  		return true
  7755  	}
  7756  	// match: (MADDW a (MOVDconst [c]) x)
  7757  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
  7758  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)]))
  7759  	for {
  7760  		a := v_0
  7761  		if v_1.Op != OpARM64MOVDconst {
  7762  			break
  7763  		}
  7764  		c := auxIntToInt64(v_1.AuxInt)
  7765  		x := v_2
  7766  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
  7767  			break
  7768  		}
  7769  		v.reset(OpARM64MOVWUreg)
  7770  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
  7771  		v0.AuxInt = int64ToAuxInt(log64(c / 7))
  7772  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7773  		v1.AuxInt = int64ToAuxInt(3)
  7774  		v1.AddArg2(x, x)
  7775  		v0.AddArg2(a, v1)
  7776  		v.AddArg(v0)
  7777  		return true
  7778  	}
  7779  	// match: (MADDW a (MOVDconst [c]) x)
  7780  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
  7781  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)]))
  7782  	for {
  7783  		a := v_0
  7784  		if v_1.Op != OpARM64MOVDconst {
  7785  			break
  7786  		}
  7787  		c := auxIntToInt64(v_1.AuxInt)
  7788  		x := v_2
  7789  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
  7790  			break
  7791  		}
  7792  		v.reset(OpARM64MOVWUreg)
  7793  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  7794  		v0.AuxInt = int64ToAuxInt(log64(c / 9))
  7795  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7796  		v1.AuxInt = int64ToAuxInt(3)
  7797  		v1.AddArg2(x, x)
  7798  		v0.AddArg2(a, v1)
  7799  		v.AddArg(v0)
  7800  		return true
  7801  	}
  7802  	// match: (MADDW (MOVDconst [c]) x y)
  7803  	// result: (MOVWUreg (ADDconst <x.Type> [c] (MULW <x.Type> x y)))
  7804  	for {
  7805  		if v_0.Op != OpARM64MOVDconst {
  7806  			break
  7807  		}
  7808  		c := auxIntToInt64(v_0.AuxInt)
  7809  		x := v_1
  7810  		y := v_2
  7811  		v.reset(OpARM64MOVWUreg)
  7812  		v0 := b.NewValue0(v.Pos, OpARM64ADDconst, x.Type)
  7813  		v0.AuxInt = int64ToAuxInt(c)
  7814  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  7815  		v1.AddArg2(x, y)
  7816  		v0.AddArg(v1)
  7817  		v.AddArg(v0)
  7818  		return true
  7819  	}
  7820  	// match: (MADDW a (MOVDconst [c]) (MOVDconst [d]))
  7821  	// result: (MOVWUreg (ADDconst <a.Type> [c*d] a))
  7822  	for {
  7823  		a := v_0
  7824  		if v_1.Op != OpARM64MOVDconst {
  7825  			break
  7826  		}
  7827  		c := auxIntToInt64(v_1.AuxInt)
  7828  		if v_2.Op != OpARM64MOVDconst {
  7829  			break
  7830  		}
  7831  		d := auxIntToInt64(v_2.AuxInt)
  7832  		v.reset(OpARM64MOVWUreg)
  7833  		v0 := b.NewValue0(v.Pos, OpARM64ADDconst, a.Type)
  7834  		v0.AuxInt = int64ToAuxInt(c * d)
  7835  		v0.AddArg(a)
  7836  		v.AddArg(v0)
  7837  		return true
  7838  	}
  7839  	return false
  7840  }
  7841  func rewriteValueARM64_OpARM64MNEG(v *Value) bool {
  7842  	v_1 := v.Args[1]
  7843  	v_0 := v.Args[0]
  7844  	b := v.Block
  7845  	// match: (MNEG x (MOVDconst [-1]))
  7846  	// result: x
  7847  	for {
  7848  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7849  			x := v_0
  7850  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
  7851  				continue
  7852  			}
  7853  			v.copyOf(x)
  7854  			return true
  7855  		}
  7856  		break
  7857  	}
  7858  	// match: (MNEG _ (MOVDconst [0]))
  7859  	// result: (MOVDconst [0])
  7860  	for {
  7861  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7862  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  7863  				continue
  7864  			}
  7865  			v.reset(OpARM64MOVDconst)
  7866  			v.AuxInt = int64ToAuxInt(0)
  7867  			return true
  7868  		}
  7869  		break
  7870  	}
  7871  	// match: (MNEG x (MOVDconst [1]))
  7872  	// result: (NEG x)
  7873  	for {
  7874  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7875  			x := v_0
  7876  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
  7877  				continue
  7878  			}
  7879  			v.reset(OpARM64NEG)
  7880  			v.AddArg(x)
  7881  			return true
  7882  		}
  7883  		break
  7884  	}
  7885  	// match: (MNEG x (MOVDconst [c]))
  7886  	// cond: isPowerOfTwo(c)
  7887  	// result: (NEG (SLLconst <x.Type> [log64(c)] x))
  7888  	for {
  7889  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7890  			x := v_0
  7891  			if v_1.Op != OpARM64MOVDconst {
  7892  				continue
  7893  			}
  7894  			c := auxIntToInt64(v_1.AuxInt)
  7895  			if !(isPowerOfTwo(c)) {
  7896  				continue
  7897  			}
  7898  			v.reset(OpARM64NEG)
  7899  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  7900  			v0.AuxInt = int64ToAuxInt(log64(c))
  7901  			v0.AddArg(x)
  7902  			v.AddArg(v0)
  7903  			return true
  7904  		}
  7905  		break
  7906  	}
  7907  	// match: (MNEG x (MOVDconst [c]))
  7908  	// cond: isPowerOfTwo(c-1) && c >= 3
  7909  	// result: (NEG (ADDshiftLL <x.Type> x x [log64(c-1)]))
  7910  	for {
  7911  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7912  			x := v_0
  7913  			if v_1.Op != OpARM64MOVDconst {
  7914  				continue
  7915  			}
  7916  			c := auxIntToInt64(v_1.AuxInt)
  7917  			if !(isPowerOfTwo(c-1) && c >= 3) {
  7918  				continue
  7919  			}
  7920  			v.reset(OpARM64NEG)
  7921  			v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7922  			v0.AuxInt = int64ToAuxInt(log64(c - 1))
  7923  			v0.AddArg2(x, x)
  7924  			v.AddArg(v0)
  7925  			return true
  7926  		}
  7927  		break
  7928  	}
  7929  	// match: (MNEG x (MOVDconst [c]))
  7930  	// cond: isPowerOfTwo(c+1) && c >= 7
  7931  	// result: (NEG (ADDshiftLL <x.Type> (NEG <x.Type> x) x [log64(c+1)]))
  7932  	for {
  7933  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7934  			x := v_0
  7935  			if v_1.Op != OpARM64MOVDconst {
  7936  				continue
  7937  			}
  7938  			c := auxIntToInt64(v_1.AuxInt)
  7939  			if !(isPowerOfTwo(c+1) && c >= 7) {
  7940  				continue
  7941  			}
  7942  			v.reset(OpARM64NEG)
  7943  			v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7944  			v0.AuxInt = int64ToAuxInt(log64(c + 1))
  7945  			v1 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  7946  			v1.AddArg(x)
  7947  			v0.AddArg2(v1, x)
  7948  			v.AddArg(v0)
  7949  			return true
  7950  		}
  7951  		break
  7952  	}
  7953  	// match: (MNEG x (MOVDconst [c]))
  7954  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
  7955  	// result: (SLLconst <x.Type> [log64(c/3)] (SUBshiftLL <x.Type> x x [2]))
  7956  	for {
  7957  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7958  			x := v_0
  7959  			if v_1.Op != OpARM64MOVDconst {
  7960  				continue
  7961  			}
  7962  			c := auxIntToInt64(v_1.AuxInt)
  7963  			if !(c%3 == 0 && isPowerOfTwo(c/3)) {
  7964  				continue
  7965  			}
  7966  			v.reset(OpARM64SLLconst)
  7967  			v.Type = x.Type
  7968  			v.AuxInt = int64ToAuxInt(log64(c / 3))
  7969  			v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7970  			v0.AuxInt = int64ToAuxInt(2)
  7971  			v0.AddArg2(x, x)
  7972  			v.AddArg(v0)
  7973  			return true
  7974  		}
  7975  		break
  7976  	}
  7977  	// match: (MNEG x (MOVDconst [c]))
  7978  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
  7979  	// result: (NEG (SLLconst <x.Type> [log64(c/5)] (ADDshiftLL <x.Type> x x [2])))
  7980  	for {
  7981  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7982  			x := v_0
  7983  			if v_1.Op != OpARM64MOVDconst {
  7984  				continue
  7985  			}
  7986  			c := auxIntToInt64(v_1.AuxInt)
  7987  			if !(c%5 == 0 && isPowerOfTwo(c/5)) {
  7988  				continue
  7989  			}
  7990  			v.reset(OpARM64NEG)
  7991  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  7992  			v0.AuxInt = int64ToAuxInt(log64(c / 5))
  7993  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7994  			v1.AuxInt = int64ToAuxInt(2)
  7995  			v1.AddArg2(x, x)
  7996  			v0.AddArg(v1)
  7997  			v.AddArg(v0)
  7998  			return true
  7999  		}
  8000  		break
  8001  	}
  8002  	// match: (MNEG x (MOVDconst [c]))
  8003  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
  8004  	// result: (SLLconst <x.Type> [log64(c/7)] (SUBshiftLL <x.Type> x x [3]))
  8005  	for {
  8006  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8007  			x := v_0
  8008  			if v_1.Op != OpARM64MOVDconst {
  8009  				continue
  8010  			}
  8011  			c := auxIntToInt64(v_1.AuxInt)
  8012  			if !(c%7 == 0 && isPowerOfTwo(c/7)) {
  8013  				continue
  8014  			}
  8015  			v.reset(OpARM64SLLconst)
  8016  			v.Type = x.Type
  8017  			v.AuxInt = int64ToAuxInt(log64(c / 7))
  8018  			v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8019  			v0.AuxInt = int64ToAuxInt(3)
  8020  			v0.AddArg2(x, x)
  8021  			v.AddArg(v0)
  8022  			return true
  8023  		}
  8024  		break
  8025  	}
  8026  	// match: (MNEG x (MOVDconst [c]))
  8027  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
  8028  	// result: (NEG (SLLconst <x.Type> [log64(c/9)] (ADDshiftLL <x.Type> x x [3])))
  8029  	for {
  8030  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8031  			x := v_0
  8032  			if v_1.Op != OpARM64MOVDconst {
  8033  				continue
  8034  			}
  8035  			c := auxIntToInt64(v_1.AuxInt)
  8036  			if !(c%9 == 0 && isPowerOfTwo(c/9)) {
  8037  				continue
  8038  			}
  8039  			v.reset(OpARM64NEG)
  8040  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  8041  			v0.AuxInt = int64ToAuxInt(log64(c / 9))
  8042  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8043  			v1.AuxInt = int64ToAuxInt(3)
  8044  			v1.AddArg2(x, x)
  8045  			v0.AddArg(v1)
  8046  			v.AddArg(v0)
  8047  			return true
  8048  		}
  8049  		break
  8050  	}
  8051  	// match: (MNEG (MOVDconst [c]) (MOVDconst [d]))
  8052  	// result: (MOVDconst [-c*d])
  8053  	for {
  8054  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8055  			if v_0.Op != OpARM64MOVDconst {
  8056  				continue
  8057  			}
  8058  			c := auxIntToInt64(v_0.AuxInt)
  8059  			if v_1.Op != OpARM64MOVDconst {
  8060  				continue
  8061  			}
  8062  			d := auxIntToInt64(v_1.AuxInt)
  8063  			v.reset(OpARM64MOVDconst)
  8064  			v.AuxInt = int64ToAuxInt(-c * d)
  8065  			return true
  8066  		}
  8067  		break
  8068  	}
  8069  	return false
  8070  }
  8071  func rewriteValueARM64_OpARM64MNEGW(v *Value) bool {
  8072  	v_1 := v.Args[1]
  8073  	v_0 := v.Args[0]
  8074  	b := v.Block
  8075  	// match: (MNEGW x (MOVDconst [c]))
  8076  	// cond: int32(c)==-1
  8077  	// result: (MOVWUreg x)
  8078  	for {
  8079  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8080  			x := v_0
  8081  			if v_1.Op != OpARM64MOVDconst {
  8082  				continue
  8083  			}
  8084  			c := auxIntToInt64(v_1.AuxInt)
  8085  			if !(int32(c) == -1) {
  8086  				continue
  8087  			}
  8088  			v.reset(OpARM64MOVWUreg)
  8089  			v.AddArg(x)
  8090  			return true
  8091  		}
  8092  		break
  8093  	}
  8094  	// match: (MNEGW _ (MOVDconst [c]))
  8095  	// cond: int32(c)==0
  8096  	// result: (MOVDconst [0])
  8097  	for {
  8098  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8099  			if v_1.Op != OpARM64MOVDconst {
  8100  				continue
  8101  			}
  8102  			c := auxIntToInt64(v_1.AuxInt)
  8103  			if !(int32(c) == 0) {
  8104  				continue
  8105  			}
  8106  			v.reset(OpARM64MOVDconst)
  8107  			v.AuxInt = int64ToAuxInt(0)
  8108  			return true
  8109  		}
  8110  		break
  8111  	}
  8112  	// match: (MNEGW x (MOVDconst [c]))
  8113  	// cond: int32(c)==1
  8114  	// result: (MOVWUreg (NEG <x.Type> x))
  8115  	for {
  8116  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8117  			x := v_0
  8118  			if v_1.Op != OpARM64MOVDconst {
  8119  				continue
  8120  			}
  8121  			c := auxIntToInt64(v_1.AuxInt)
  8122  			if !(int32(c) == 1) {
  8123  				continue
  8124  			}
  8125  			v.reset(OpARM64MOVWUreg)
  8126  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  8127  			v0.AddArg(x)
  8128  			v.AddArg(v0)
  8129  			return true
  8130  		}
  8131  		break
  8132  	}
  8133  	// match: (MNEGW x (MOVDconst [c]))
  8134  	// cond: isPowerOfTwo(c)
  8135  	// result: (NEG (SLLconst <x.Type> [log64(c)] x))
  8136  	for {
  8137  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8138  			x := v_0
  8139  			if v_1.Op != OpARM64MOVDconst {
  8140  				continue
  8141  			}
  8142  			c := auxIntToInt64(v_1.AuxInt)
  8143  			if !(isPowerOfTwo(c)) {
  8144  				continue
  8145  			}
  8146  			v.reset(OpARM64NEG)
  8147  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  8148  			v0.AuxInt = int64ToAuxInt(log64(c))
  8149  			v0.AddArg(x)
  8150  			v.AddArg(v0)
  8151  			return true
  8152  		}
  8153  		break
  8154  	}
  8155  	// match: (MNEGW x (MOVDconst [c]))
  8156  	// cond: isPowerOfTwo(c-1) && int32(c) >= 3
  8157  	// result: (MOVWUreg (NEG <x.Type> (ADDshiftLL <x.Type> x x [log64(c-1)])))
  8158  	for {
  8159  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8160  			x := v_0
  8161  			if v_1.Op != OpARM64MOVDconst {
  8162  				continue
  8163  			}
  8164  			c := auxIntToInt64(v_1.AuxInt)
  8165  			if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
  8166  				continue
  8167  			}
  8168  			v.reset(OpARM64MOVWUreg)
  8169  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  8170  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8171  			v1.AuxInt = int64ToAuxInt(log64(c - 1))
  8172  			v1.AddArg2(x, x)
  8173  			v0.AddArg(v1)
  8174  			v.AddArg(v0)
  8175  			return true
  8176  		}
  8177  		break
  8178  	}
  8179  	// match: (MNEGW x (MOVDconst [c]))
  8180  	// cond: isPowerOfTwo(c+1) && int32(c) >= 7
  8181  	// result: (MOVWUreg (NEG <x.Type> (ADDshiftLL <x.Type> (NEG <x.Type> x) x [log64(c+1)])))
  8182  	for {
  8183  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8184  			x := v_0
  8185  			if v_1.Op != OpARM64MOVDconst {
  8186  				continue
  8187  			}
  8188  			c := auxIntToInt64(v_1.AuxInt)
  8189  			if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
  8190  				continue
  8191  			}
  8192  			v.reset(OpARM64MOVWUreg)
  8193  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  8194  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8195  			v1.AuxInt = int64ToAuxInt(log64(c + 1))
  8196  			v2 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  8197  			v2.AddArg(x)
  8198  			v1.AddArg2(v2, x)
  8199  			v0.AddArg(v1)
  8200  			v.AddArg(v0)
  8201  			return true
  8202  		}
  8203  		break
  8204  	}
  8205  	// match: (MNEGW x (MOVDconst [c]))
  8206  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
  8207  	// result: (MOVWUreg (SLLconst <x.Type> [log64(c/3)] (SUBshiftLL <x.Type> x x [2])))
  8208  	for {
  8209  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8210  			x := v_0
  8211  			if v_1.Op != OpARM64MOVDconst {
  8212  				continue
  8213  			}
  8214  			c := auxIntToInt64(v_1.AuxInt)
  8215  			if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
  8216  				continue
  8217  			}
  8218  			v.reset(OpARM64MOVWUreg)
  8219  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  8220  			v0.AuxInt = int64ToAuxInt(log64(c / 3))
  8221  			v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8222  			v1.AuxInt = int64ToAuxInt(2)
  8223  			v1.AddArg2(x, x)
  8224  			v0.AddArg(v1)
  8225  			v.AddArg(v0)
  8226  			return true
  8227  		}
  8228  		break
  8229  	}
  8230  	// match: (MNEGW x (MOVDconst [c]))
  8231  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
  8232  	// result: (MOVWUreg (NEG <x.Type> (SLLconst <x.Type> [log64(c/5)] (ADDshiftLL <x.Type> x x [2]))))
  8233  	for {
  8234  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8235  			x := v_0
  8236  			if v_1.Op != OpARM64MOVDconst {
  8237  				continue
  8238  			}
  8239  			c := auxIntToInt64(v_1.AuxInt)
  8240  			if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
  8241  				continue
  8242  			}
  8243  			v.reset(OpARM64MOVWUreg)
  8244  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  8245  			v1 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  8246  			v1.AuxInt = int64ToAuxInt(log64(c / 5))
  8247  			v2 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8248  			v2.AuxInt = int64ToAuxInt(2)
  8249  			v2.AddArg2(x, x)
  8250  			v1.AddArg(v2)
  8251  			v0.AddArg(v1)
  8252  			v.AddArg(v0)
  8253  			return true
  8254  		}
  8255  		break
  8256  	}
  8257  	// match: (MNEGW x (MOVDconst [c]))
  8258  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
  8259  	// result: (MOVWUreg (SLLconst <x.Type> [log64(c/7)] (SUBshiftLL <x.Type> x x [3])))
  8260  	for {
  8261  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8262  			x := v_0
  8263  			if v_1.Op != OpARM64MOVDconst {
  8264  				continue
  8265  			}
  8266  			c := auxIntToInt64(v_1.AuxInt)
  8267  			if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
  8268  				continue
  8269  			}
  8270  			v.reset(OpARM64MOVWUreg)
  8271  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  8272  			v0.AuxInt = int64ToAuxInt(log64(c / 7))
  8273  			v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8274  			v1.AuxInt = int64ToAuxInt(3)
  8275  			v1.AddArg2(x, x)
  8276  			v0.AddArg(v1)
  8277  			v.AddArg(v0)
  8278  			return true
  8279  		}
  8280  		break
  8281  	}
  8282  	// match: (MNEGW x (MOVDconst [c]))
  8283  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
  8284  	// result: (MOVWUreg (NEG <x.Type> (SLLconst <x.Type> [log64(c/9)] (ADDshiftLL <x.Type> x x [3]))))
  8285  	for {
  8286  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8287  			x := v_0
  8288  			if v_1.Op != OpARM64MOVDconst {
  8289  				continue
  8290  			}
  8291  			c := auxIntToInt64(v_1.AuxInt)
  8292  			if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
  8293  				continue
  8294  			}
  8295  			v.reset(OpARM64MOVWUreg)
  8296  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  8297  			v1 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  8298  			v1.AuxInt = int64ToAuxInt(log64(c / 9))
  8299  			v2 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8300  			v2.AuxInt = int64ToAuxInt(3)
  8301  			v2.AddArg2(x, x)
  8302  			v1.AddArg(v2)
  8303  			v0.AddArg(v1)
  8304  			v.AddArg(v0)
  8305  			return true
  8306  		}
  8307  		break
  8308  	}
  8309  	// match: (MNEGW (MOVDconst [c]) (MOVDconst [d]))
  8310  	// result: (MOVDconst [int64(uint32(-c*d))])
  8311  	for {
  8312  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8313  			if v_0.Op != OpARM64MOVDconst {
  8314  				continue
  8315  			}
  8316  			c := auxIntToInt64(v_0.AuxInt)
  8317  			if v_1.Op != OpARM64MOVDconst {
  8318  				continue
  8319  			}
  8320  			d := auxIntToInt64(v_1.AuxInt)
  8321  			v.reset(OpARM64MOVDconst)
  8322  			v.AuxInt = int64ToAuxInt(int64(uint32(-c * d)))
  8323  			return true
  8324  		}
  8325  		break
  8326  	}
  8327  	return false
  8328  }
  8329  func rewriteValueARM64_OpARM64MOD(v *Value) bool {
  8330  	v_1 := v.Args[1]
  8331  	v_0 := v.Args[0]
  8332  	// match: (MOD (MOVDconst [c]) (MOVDconst [d]))
  8333  	// cond: d != 0
  8334  	// result: (MOVDconst [c%d])
  8335  	for {
  8336  		if v_0.Op != OpARM64MOVDconst {
  8337  			break
  8338  		}
  8339  		c := auxIntToInt64(v_0.AuxInt)
  8340  		if v_1.Op != OpARM64MOVDconst {
  8341  			break
  8342  		}
  8343  		d := auxIntToInt64(v_1.AuxInt)
  8344  		if !(d != 0) {
  8345  			break
  8346  		}
  8347  		v.reset(OpARM64MOVDconst)
  8348  		v.AuxInt = int64ToAuxInt(c % d)
  8349  		return true
  8350  	}
  8351  	return false
  8352  }
  8353  func rewriteValueARM64_OpARM64MODW(v *Value) bool {
  8354  	v_1 := v.Args[1]
  8355  	v_0 := v.Args[0]
  8356  	// match: (MODW (MOVDconst [c]) (MOVDconst [d]))
  8357  	// cond: d != 0
  8358  	// result: (MOVDconst [int64(uint32(int32(c)%int32(d)))])
  8359  	for {
  8360  		if v_0.Op != OpARM64MOVDconst {
  8361  			break
  8362  		}
  8363  		c := auxIntToInt64(v_0.AuxInt)
  8364  		if v_1.Op != OpARM64MOVDconst {
  8365  			break
  8366  		}
  8367  		d := auxIntToInt64(v_1.AuxInt)
  8368  		if !(d != 0) {
  8369  			break
  8370  		}
  8371  		v.reset(OpARM64MOVDconst)
  8372  		v.AuxInt = int64ToAuxInt(int64(uint32(int32(c) % int32(d))))
  8373  		return true
  8374  	}
  8375  	return false
  8376  }
  8377  func rewriteValueARM64_OpARM64MOVBUload(v *Value) bool {
  8378  	v_1 := v.Args[1]
  8379  	v_0 := v.Args[0]
  8380  	b := v.Block
  8381  	config := b.Func.Config
  8382  	// match: (MOVBUload [off1] {sym} (ADDconst [off2] ptr) mem)
  8383  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  8384  	// result: (MOVBUload [off1+int32(off2)] {sym} ptr mem)
  8385  	for {
  8386  		off1 := auxIntToInt32(v.AuxInt)
  8387  		sym := auxToSym(v.Aux)
  8388  		if v_0.Op != OpARM64ADDconst {
  8389  			break
  8390  		}
  8391  		off2 := auxIntToInt64(v_0.AuxInt)
  8392  		ptr := v_0.Args[0]
  8393  		mem := v_1
  8394  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  8395  			break
  8396  		}
  8397  		v.reset(OpARM64MOVBUload)
  8398  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  8399  		v.Aux = symToAux(sym)
  8400  		v.AddArg2(ptr, mem)
  8401  		return true
  8402  	}
  8403  	// match: (MOVBUload [off] {sym} (ADD ptr idx) mem)
  8404  	// cond: off == 0 && sym == nil
  8405  	// result: (MOVBUloadidx ptr idx mem)
  8406  	for {
  8407  		off := auxIntToInt32(v.AuxInt)
  8408  		sym := auxToSym(v.Aux)
  8409  		if v_0.Op != OpARM64ADD {
  8410  			break
  8411  		}
  8412  		idx := v_0.Args[1]
  8413  		ptr := v_0.Args[0]
  8414  		mem := v_1
  8415  		if !(off == 0 && sym == nil) {
  8416  			break
  8417  		}
  8418  		v.reset(OpARM64MOVBUloadidx)
  8419  		v.AddArg3(ptr, idx, mem)
  8420  		return true
  8421  	}
  8422  	// match: (MOVBUload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  8423  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  8424  	// result: (MOVBUload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  8425  	for {
  8426  		off1 := auxIntToInt32(v.AuxInt)
  8427  		sym1 := auxToSym(v.Aux)
  8428  		if v_0.Op != OpARM64MOVDaddr {
  8429  			break
  8430  		}
  8431  		off2 := auxIntToInt32(v_0.AuxInt)
  8432  		sym2 := auxToSym(v_0.Aux)
  8433  		ptr := v_0.Args[0]
  8434  		mem := v_1
  8435  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  8436  			break
  8437  		}
  8438  		v.reset(OpARM64MOVBUload)
  8439  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8440  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8441  		v.AddArg2(ptr, mem)
  8442  		return true
  8443  	}
  8444  	// match: (MOVBUload [off] {sym} (SB) _)
  8445  	// cond: symIsRO(sym)
  8446  	// result: (MOVDconst [int64(read8(sym, int64(off)))])
  8447  	for {
  8448  		off := auxIntToInt32(v.AuxInt)
  8449  		sym := auxToSym(v.Aux)
  8450  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  8451  			break
  8452  		}
  8453  		v.reset(OpARM64MOVDconst)
  8454  		v.AuxInt = int64ToAuxInt(int64(read8(sym, int64(off))))
  8455  		return true
  8456  	}
  8457  	return false
  8458  }
  8459  func rewriteValueARM64_OpARM64MOVBUloadidx(v *Value) bool {
  8460  	v_2 := v.Args[2]
  8461  	v_1 := v.Args[1]
  8462  	v_0 := v.Args[0]
  8463  	// match: (MOVBUloadidx ptr (MOVDconst [c]) mem)
  8464  	// cond: is32Bit(c)
  8465  	// result: (MOVBUload [int32(c)] ptr mem)
  8466  	for {
  8467  		ptr := v_0
  8468  		if v_1.Op != OpARM64MOVDconst {
  8469  			break
  8470  		}
  8471  		c := auxIntToInt64(v_1.AuxInt)
  8472  		mem := v_2
  8473  		if !(is32Bit(c)) {
  8474  			break
  8475  		}
  8476  		v.reset(OpARM64MOVBUload)
  8477  		v.AuxInt = int32ToAuxInt(int32(c))
  8478  		v.AddArg2(ptr, mem)
  8479  		return true
  8480  	}
  8481  	// match: (MOVBUloadidx (MOVDconst [c]) ptr mem)
  8482  	// cond: is32Bit(c)
  8483  	// result: (MOVBUload [int32(c)] ptr mem)
  8484  	for {
  8485  		if v_0.Op != OpARM64MOVDconst {
  8486  			break
  8487  		}
  8488  		c := auxIntToInt64(v_0.AuxInt)
  8489  		ptr := v_1
  8490  		mem := v_2
  8491  		if !(is32Bit(c)) {
  8492  			break
  8493  		}
  8494  		v.reset(OpARM64MOVBUload)
  8495  		v.AuxInt = int32ToAuxInt(int32(c))
  8496  		v.AddArg2(ptr, mem)
  8497  		return true
  8498  	}
  8499  	return false
  8500  }
  8501  func rewriteValueARM64_OpARM64MOVBUreg(v *Value) bool {
  8502  	v_0 := v.Args[0]
  8503  	// match: (MOVBUreg (ANDconst [c] x))
  8504  	// result: (ANDconst [c&(1<<8-1)] x)
  8505  	for {
  8506  		if v_0.Op != OpARM64ANDconst {
  8507  			break
  8508  		}
  8509  		c := auxIntToInt64(v_0.AuxInt)
  8510  		x := v_0.Args[0]
  8511  		v.reset(OpARM64ANDconst)
  8512  		v.AuxInt = int64ToAuxInt(c & (1<<8 - 1))
  8513  		v.AddArg(x)
  8514  		return true
  8515  	}
  8516  	// match: (MOVBUreg (MOVDconst [c]))
  8517  	// result: (MOVDconst [int64(uint8(c))])
  8518  	for {
  8519  		if v_0.Op != OpARM64MOVDconst {
  8520  			break
  8521  		}
  8522  		c := auxIntToInt64(v_0.AuxInt)
  8523  		v.reset(OpARM64MOVDconst)
  8524  		v.AuxInt = int64ToAuxInt(int64(uint8(c)))
  8525  		return true
  8526  	}
  8527  	// match: (MOVBUreg x)
  8528  	// cond: v.Type.Size() <= 1
  8529  	// result: x
  8530  	for {
  8531  		x := v_0
  8532  		if !(v.Type.Size() <= 1) {
  8533  			break
  8534  		}
  8535  		v.copyOf(x)
  8536  		return true
  8537  	}
  8538  	// match: (MOVBUreg (SLLconst [lc] x))
  8539  	// cond: lc >= 8
  8540  	// result: (MOVDconst [0])
  8541  	for {
  8542  		if v_0.Op != OpARM64SLLconst {
  8543  			break
  8544  		}
  8545  		lc := auxIntToInt64(v_0.AuxInt)
  8546  		if !(lc >= 8) {
  8547  			break
  8548  		}
  8549  		v.reset(OpARM64MOVDconst)
  8550  		v.AuxInt = int64ToAuxInt(0)
  8551  		return true
  8552  	}
  8553  	// match: (MOVBUreg (SLLconst [lc] x))
  8554  	// cond: lc < 8
  8555  	// result: (UBFIZ [armBFAuxInt(lc, 8-lc)] x)
  8556  	for {
  8557  		if v_0.Op != OpARM64SLLconst {
  8558  			break
  8559  		}
  8560  		lc := auxIntToInt64(v_0.AuxInt)
  8561  		x := v_0.Args[0]
  8562  		if !(lc < 8) {
  8563  			break
  8564  		}
  8565  		v.reset(OpARM64UBFIZ)
  8566  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 8-lc))
  8567  		v.AddArg(x)
  8568  		return true
  8569  	}
  8570  	// match: (MOVBUreg (SRLconst [rc] x))
  8571  	// cond: rc < 8
  8572  	// result: (UBFX [armBFAuxInt(rc, 8)] x)
  8573  	for {
  8574  		if v_0.Op != OpARM64SRLconst {
  8575  			break
  8576  		}
  8577  		rc := auxIntToInt64(v_0.AuxInt)
  8578  		x := v_0.Args[0]
  8579  		if !(rc < 8) {
  8580  			break
  8581  		}
  8582  		v.reset(OpARM64UBFX)
  8583  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 8))
  8584  		v.AddArg(x)
  8585  		return true
  8586  	}
  8587  	// match: (MOVBUreg (UBFX [bfc] x))
  8588  	// cond: bfc.width() <= 8
  8589  	// result: (UBFX [bfc] x)
  8590  	for {
  8591  		if v_0.Op != OpARM64UBFX {
  8592  			break
  8593  		}
  8594  		bfc := auxIntToArm64BitField(v_0.AuxInt)
  8595  		x := v_0.Args[0]
  8596  		if !(bfc.width() <= 8) {
  8597  			break
  8598  		}
  8599  		v.reset(OpARM64UBFX)
  8600  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
  8601  		v.AddArg(x)
  8602  		return true
  8603  	}
  8604  	return false
  8605  }
  8606  func rewriteValueARM64_OpARM64MOVBload(v *Value) bool {
  8607  	v_1 := v.Args[1]
  8608  	v_0 := v.Args[0]
  8609  	b := v.Block
  8610  	config := b.Func.Config
  8611  	// match: (MOVBload [off1] {sym} (ADDconst [off2] ptr) mem)
  8612  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  8613  	// result: (MOVBload [off1+int32(off2)] {sym} ptr mem)
  8614  	for {
  8615  		off1 := auxIntToInt32(v.AuxInt)
  8616  		sym := auxToSym(v.Aux)
  8617  		if v_0.Op != OpARM64ADDconst {
  8618  			break
  8619  		}
  8620  		off2 := auxIntToInt64(v_0.AuxInt)
  8621  		ptr := v_0.Args[0]
  8622  		mem := v_1
  8623  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  8624  			break
  8625  		}
  8626  		v.reset(OpARM64MOVBload)
  8627  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  8628  		v.Aux = symToAux(sym)
  8629  		v.AddArg2(ptr, mem)
  8630  		return true
  8631  	}
  8632  	// match: (MOVBload [off] {sym} (ADD ptr idx) mem)
  8633  	// cond: off == 0 && sym == nil
  8634  	// result: (MOVBloadidx ptr idx mem)
  8635  	for {
  8636  		off := auxIntToInt32(v.AuxInt)
  8637  		sym := auxToSym(v.Aux)
  8638  		if v_0.Op != OpARM64ADD {
  8639  			break
  8640  		}
  8641  		idx := v_0.Args[1]
  8642  		ptr := v_0.Args[0]
  8643  		mem := v_1
  8644  		if !(off == 0 && sym == nil) {
  8645  			break
  8646  		}
  8647  		v.reset(OpARM64MOVBloadidx)
  8648  		v.AddArg3(ptr, idx, mem)
  8649  		return true
  8650  	}
  8651  	// match: (MOVBload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  8652  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  8653  	// result: (MOVBload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  8654  	for {
  8655  		off1 := auxIntToInt32(v.AuxInt)
  8656  		sym1 := auxToSym(v.Aux)
  8657  		if v_0.Op != OpARM64MOVDaddr {
  8658  			break
  8659  		}
  8660  		off2 := auxIntToInt32(v_0.AuxInt)
  8661  		sym2 := auxToSym(v_0.Aux)
  8662  		ptr := v_0.Args[0]
  8663  		mem := v_1
  8664  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  8665  			break
  8666  		}
  8667  		v.reset(OpARM64MOVBload)
  8668  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8669  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8670  		v.AddArg2(ptr, mem)
  8671  		return true
  8672  	}
  8673  	// match: (MOVBload [off] {sym} (SB) _)
  8674  	// cond: symIsRO(sym)
  8675  	// result: (MOVDconst [int64(int8(read8(sym, int64(off))))])
  8676  	for {
  8677  		off := auxIntToInt32(v.AuxInt)
  8678  		sym := auxToSym(v.Aux)
  8679  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  8680  			break
  8681  		}
  8682  		v.reset(OpARM64MOVDconst)
  8683  		v.AuxInt = int64ToAuxInt(int64(int8(read8(sym, int64(off)))))
  8684  		return true
  8685  	}
  8686  	return false
  8687  }
  8688  func rewriteValueARM64_OpARM64MOVBloadidx(v *Value) bool {
  8689  	v_2 := v.Args[2]
  8690  	v_1 := v.Args[1]
  8691  	v_0 := v.Args[0]
  8692  	// match: (MOVBloadidx ptr (MOVDconst [c]) mem)
  8693  	// cond: is32Bit(c)
  8694  	// result: (MOVBload [int32(c)] ptr mem)
  8695  	for {
  8696  		ptr := v_0
  8697  		if v_1.Op != OpARM64MOVDconst {
  8698  			break
  8699  		}
  8700  		c := auxIntToInt64(v_1.AuxInt)
  8701  		mem := v_2
  8702  		if !(is32Bit(c)) {
  8703  			break
  8704  		}
  8705  		v.reset(OpARM64MOVBload)
  8706  		v.AuxInt = int32ToAuxInt(int32(c))
  8707  		v.AddArg2(ptr, mem)
  8708  		return true
  8709  	}
  8710  	// match: (MOVBloadidx (MOVDconst [c]) ptr mem)
  8711  	// cond: is32Bit(c)
  8712  	// result: (MOVBload [int32(c)] ptr mem)
  8713  	for {
  8714  		if v_0.Op != OpARM64MOVDconst {
  8715  			break
  8716  		}
  8717  		c := auxIntToInt64(v_0.AuxInt)
  8718  		ptr := v_1
  8719  		mem := v_2
  8720  		if !(is32Bit(c)) {
  8721  			break
  8722  		}
  8723  		v.reset(OpARM64MOVBload)
  8724  		v.AuxInt = int32ToAuxInt(int32(c))
  8725  		v.AddArg2(ptr, mem)
  8726  		return true
  8727  	}
  8728  	return false
  8729  }
  8730  func rewriteValueARM64_OpARM64MOVBreg(v *Value) bool {
  8731  	v_0 := v.Args[0]
  8732  	// match: (MOVBreg (MOVDconst [c]))
  8733  	// result: (MOVDconst [int64(int8(c))])
  8734  	for {
  8735  		if v_0.Op != OpARM64MOVDconst {
  8736  			break
  8737  		}
  8738  		c := auxIntToInt64(v_0.AuxInt)
  8739  		v.reset(OpARM64MOVDconst)
  8740  		v.AuxInt = int64ToAuxInt(int64(int8(c)))
  8741  		return true
  8742  	}
  8743  	// match: (MOVBreg x)
  8744  	// cond: v.Type.Size() <= 1
  8745  	// result: x
  8746  	for {
  8747  		x := v_0
  8748  		if !(v.Type.Size() <= 1) {
  8749  			break
  8750  		}
  8751  		v.copyOf(x)
  8752  		return true
  8753  	}
  8754  	// match: (MOVBreg <t> (ANDconst x [c]))
  8755  	// cond: uint64(c) & uint64(0xffffffffffffff80) == 0
  8756  	// result: (ANDconst <t> x [c])
  8757  	for {
  8758  		t := v.Type
  8759  		if v_0.Op != OpARM64ANDconst {
  8760  			break
  8761  		}
  8762  		c := auxIntToInt64(v_0.AuxInt)
  8763  		x := v_0.Args[0]
  8764  		if !(uint64(c)&uint64(0xffffffffffffff80) == 0) {
  8765  			break
  8766  		}
  8767  		v.reset(OpARM64ANDconst)
  8768  		v.Type = t
  8769  		v.AuxInt = int64ToAuxInt(c)
  8770  		v.AddArg(x)
  8771  		return true
  8772  	}
  8773  	// match: (MOVBreg (SLLconst [lc] x))
  8774  	// cond: lc < 8
  8775  	// result: (SBFIZ [armBFAuxInt(lc, 8-lc)] x)
  8776  	for {
  8777  		if v_0.Op != OpARM64SLLconst {
  8778  			break
  8779  		}
  8780  		lc := auxIntToInt64(v_0.AuxInt)
  8781  		x := v_0.Args[0]
  8782  		if !(lc < 8) {
  8783  			break
  8784  		}
  8785  		v.reset(OpARM64SBFIZ)
  8786  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 8-lc))
  8787  		v.AddArg(x)
  8788  		return true
  8789  	}
  8790  	// match: (MOVBreg (SBFX [bfc] x))
  8791  	// cond: bfc.width() <= 8
  8792  	// result: (SBFX [bfc] x)
  8793  	for {
  8794  		if v_0.Op != OpARM64SBFX {
  8795  			break
  8796  		}
  8797  		bfc := auxIntToArm64BitField(v_0.AuxInt)
  8798  		x := v_0.Args[0]
  8799  		if !(bfc.width() <= 8) {
  8800  			break
  8801  		}
  8802  		v.reset(OpARM64SBFX)
  8803  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
  8804  		v.AddArg(x)
  8805  		return true
  8806  	}
  8807  	return false
  8808  }
  8809  func rewriteValueARM64_OpARM64MOVBstore(v *Value) bool {
  8810  	v_2 := v.Args[2]
  8811  	v_1 := v.Args[1]
  8812  	v_0 := v.Args[0]
  8813  	b := v.Block
  8814  	config := b.Func.Config
  8815  	// match: (MOVBstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  8816  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  8817  	// result: (MOVBstore [off1+int32(off2)] {sym} ptr val mem)
  8818  	for {
  8819  		off1 := auxIntToInt32(v.AuxInt)
  8820  		sym := auxToSym(v.Aux)
  8821  		if v_0.Op != OpARM64ADDconst {
  8822  			break
  8823  		}
  8824  		off2 := auxIntToInt64(v_0.AuxInt)
  8825  		ptr := v_0.Args[0]
  8826  		val := v_1
  8827  		mem := v_2
  8828  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  8829  			break
  8830  		}
  8831  		v.reset(OpARM64MOVBstore)
  8832  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  8833  		v.Aux = symToAux(sym)
  8834  		v.AddArg3(ptr, val, mem)
  8835  		return true
  8836  	}
  8837  	// match: (MOVBstore [off] {sym} (ADD ptr idx) val mem)
  8838  	// cond: off == 0 && sym == nil
  8839  	// result: (MOVBstoreidx ptr idx val mem)
  8840  	for {
  8841  		off := auxIntToInt32(v.AuxInt)
  8842  		sym := auxToSym(v.Aux)
  8843  		if v_0.Op != OpARM64ADD {
  8844  			break
  8845  		}
  8846  		idx := v_0.Args[1]
  8847  		ptr := v_0.Args[0]
  8848  		val := v_1
  8849  		mem := v_2
  8850  		if !(off == 0 && sym == nil) {
  8851  			break
  8852  		}
  8853  		v.reset(OpARM64MOVBstoreidx)
  8854  		v.AddArg4(ptr, idx, val, mem)
  8855  		return true
  8856  	}
  8857  	// match: (MOVBstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
  8858  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  8859  	// result: (MOVBstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  8860  	for {
  8861  		off1 := auxIntToInt32(v.AuxInt)
  8862  		sym1 := auxToSym(v.Aux)
  8863  		if v_0.Op != OpARM64MOVDaddr {
  8864  			break
  8865  		}
  8866  		off2 := auxIntToInt32(v_0.AuxInt)
  8867  		sym2 := auxToSym(v_0.Aux)
  8868  		ptr := v_0.Args[0]
  8869  		val := v_1
  8870  		mem := v_2
  8871  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  8872  			break
  8873  		}
  8874  		v.reset(OpARM64MOVBstore)
  8875  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8876  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8877  		v.AddArg3(ptr, val, mem)
  8878  		return true
  8879  	}
  8880  	// match: (MOVBstore [off] {sym} ptr (MOVBreg x) mem)
  8881  	// result: (MOVBstore [off] {sym} ptr x mem)
  8882  	for {
  8883  		off := auxIntToInt32(v.AuxInt)
  8884  		sym := auxToSym(v.Aux)
  8885  		ptr := v_0
  8886  		if v_1.Op != OpARM64MOVBreg {
  8887  			break
  8888  		}
  8889  		x := v_1.Args[0]
  8890  		mem := v_2
  8891  		v.reset(OpARM64MOVBstore)
  8892  		v.AuxInt = int32ToAuxInt(off)
  8893  		v.Aux = symToAux(sym)
  8894  		v.AddArg3(ptr, x, mem)
  8895  		return true
  8896  	}
  8897  	// match: (MOVBstore [off] {sym} ptr (MOVBUreg x) mem)
  8898  	// result: (MOVBstore [off] {sym} ptr x mem)
  8899  	for {
  8900  		off := auxIntToInt32(v.AuxInt)
  8901  		sym := auxToSym(v.Aux)
  8902  		ptr := v_0
  8903  		if v_1.Op != OpARM64MOVBUreg {
  8904  			break
  8905  		}
  8906  		x := v_1.Args[0]
  8907  		mem := v_2
  8908  		v.reset(OpARM64MOVBstore)
  8909  		v.AuxInt = int32ToAuxInt(off)
  8910  		v.Aux = symToAux(sym)
  8911  		v.AddArg3(ptr, x, mem)
  8912  		return true
  8913  	}
  8914  	// match: (MOVBstore [off] {sym} ptr (MOVHreg x) mem)
  8915  	// result: (MOVBstore [off] {sym} ptr x mem)
  8916  	for {
  8917  		off := auxIntToInt32(v.AuxInt)
  8918  		sym := auxToSym(v.Aux)
  8919  		ptr := v_0
  8920  		if v_1.Op != OpARM64MOVHreg {
  8921  			break
  8922  		}
  8923  		x := v_1.Args[0]
  8924  		mem := v_2
  8925  		v.reset(OpARM64MOVBstore)
  8926  		v.AuxInt = int32ToAuxInt(off)
  8927  		v.Aux = symToAux(sym)
  8928  		v.AddArg3(ptr, x, mem)
  8929  		return true
  8930  	}
  8931  	// match: (MOVBstore [off] {sym} ptr (MOVHUreg x) mem)
  8932  	// result: (MOVBstore [off] {sym} ptr x mem)
  8933  	for {
  8934  		off := auxIntToInt32(v.AuxInt)
  8935  		sym := auxToSym(v.Aux)
  8936  		ptr := v_0
  8937  		if v_1.Op != OpARM64MOVHUreg {
  8938  			break
  8939  		}
  8940  		x := v_1.Args[0]
  8941  		mem := v_2
  8942  		v.reset(OpARM64MOVBstore)
  8943  		v.AuxInt = int32ToAuxInt(off)
  8944  		v.Aux = symToAux(sym)
  8945  		v.AddArg3(ptr, x, mem)
  8946  		return true
  8947  	}
  8948  	// match: (MOVBstore [off] {sym} ptr (MOVWreg x) mem)
  8949  	// result: (MOVBstore [off] {sym} ptr x mem)
  8950  	for {
  8951  		off := auxIntToInt32(v.AuxInt)
  8952  		sym := auxToSym(v.Aux)
  8953  		ptr := v_0
  8954  		if v_1.Op != OpARM64MOVWreg {
  8955  			break
  8956  		}
  8957  		x := v_1.Args[0]
  8958  		mem := v_2
  8959  		v.reset(OpARM64MOVBstore)
  8960  		v.AuxInt = int32ToAuxInt(off)
  8961  		v.Aux = symToAux(sym)
  8962  		v.AddArg3(ptr, x, mem)
  8963  		return true
  8964  	}
  8965  	// match: (MOVBstore [off] {sym} ptr (MOVWUreg x) mem)
  8966  	// result: (MOVBstore [off] {sym} ptr x mem)
  8967  	for {
  8968  		off := auxIntToInt32(v.AuxInt)
  8969  		sym := auxToSym(v.Aux)
  8970  		ptr := v_0
  8971  		if v_1.Op != OpARM64MOVWUreg {
  8972  			break
  8973  		}
  8974  		x := v_1.Args[0]
  8975  		mem := v_2
  8976  		v.reset(OpARM64MOVBstore)
  8977  		v.AuxInt = int32ToAuxInt(off)
  8978  		v.Aux = symToAux(sym)
  8979  		v.AddArg3(ptr, x, mem)
  8980  		return true
  8981  	}
  8982  	return false
  8983  }
  8984  func rewriteValueARM64_OpARM64MOVBstoreidx(v *Value) bool {
  8985  	v_3 := v.Args[3]
  8986  	v_2 := v.Args[2]
  8987  	v_1 := v.Args[1]
  8988  	v_0 := v.Args[0]
  8989  	// match: (MOVBstoreidx ptr (MOVDconst [c]) val mem)
  8990  	// cond: is32Bit(c)
  8991  	// result: (MOVBstore [int32(c)] ptr val mem)
  8992  	for {
  8993  		ptr := v_0
  8994  		if v_1.Op != OpARM64MOVDconst {
  8995  			break
  8996  		}
  8997  		c := auxIntToInt64(v_1.AuxInt)
  8998  		val := v_2
  8999  		mem := v_3
  9000  		if !(is32Bit(c)) {
  9001  			break
  9002  		}
  9003  		v.reset(OpARM64MOVBstore)
  9004  		v.AuxInt = int32ToAuxInt(int32(c))
  9005  		v.AddArg3(ptr, val, mem)
  9006  		return true
  9007  	}
  9008  	// match: (MOVBstoreidx (MOVDconst [c]) idx val mem)
  9009  	// cond: is32Bit(c)
  9010  	// result: (MOVBstore [int32(c)] idx val mem)
  9011  	for {
  9012  		if v_0.Op != OpARM64MOVDconst {
  9013  			break
  9014  		}
  9015  		c := auxIntToInt64(v_0.AuxInt)
  9016  		idx := v_1
  9017  		val := v_2
  9018  		mem := v_3
  9019  		if !(is32Bit(c)) {
  9020  			break
  9021  		}
  9022  		v.reset(OpARM64MOVBstore)
  9023  		v.AuxInt = int32ToAuxInt(int32(c))
  9024  		v.AddArg3(idx, val, mem)
  9025  		return true
  9026  	}
  9027  	// match: (MOVBstoreidx ptr idx (MOVBreg x) mem)
  9028  	// result: (MOVBstoreidx ptr idx x mem)
  9029  	for {
  9030  		ptr := v_0
  9031  		idx := v_1
  9032  		if v_2.Op != OpARM64MOVBreg {
  9033  			break
  9034  		}
  9035  		x := v_2.Args[0]
  9036  		mem := v_3
  9037  		v.reset(OpARM64MOVBstoreidx)
  9038  		v.AddArg4(ptr, idx, x, mem)
  9039  		return true
  9040  	}
  9041  	// match: (MOVBstoreidx ptr idx (MOVBUreg x) mem)
  9042  	// result: (MOVBstoreidx ptr idx x mem)
  9043  	for {
  9044  		ptr := v_0
  9045  		idx := v_1
  9046  		if v_2.Op != OpARM64MOVBUreg {
  9047  			break
  9048  		}
  9049  		x := v_2.Args[0]
  9050  		mem := v_3
  9051  		v.reset(OpARM64MOVBstoreidx)
  9052  		v.AddArg4(ptr, idx, x, mem)
  9053  		return true
  9054  	}
  9055  	// match: (MOVBstoreidx ptr idx (MOVHreg x) mem)
  9056  	// result: (MOVBstoreidx ptr idx x mem)
  9057  	for {
  9058  		ptr := v_0
  9059  		idx := v_1
  9060  		if v_2.Op != OpARM64MOVHreg {
  9061  			break
  9062  		}
  9063  		x := v_2.Args[0]
  9064  		mem := v_3
  9065  		v.reset(OpARM64MOVBstoreidx)
  9066  		v.AddArg4(ptr, idx, x, mem)
  9067  		return true
  9068  	}
  9069  	// match: (MOVBstoreidx ptr idx (MOVHUreg x) mem)
  9070  	// result: (MOVBstoreidx ptr idx x mem)
  9071  	for {
  9072  		ptr := v_0
  9073  		idx := v_1
  9074  		if v_2.Op != OpARM64MOVHUreg {
  9075  			break
  9076  		}
  9077  		x := v_2.Args[0]
  9078  		mem := v_3
  9079  		v.reset(OpARM64MOVBstoreidx)
  9080  		v.AddArg4(ptr, idx, x, mem)
  9081  		return true
  9082  	}
  9083  	// match: (MOVBstoreidx ptr idx (MOVWreg x) mem)
  9084  	// result: (MOVBstoreidx ptr idx x mem)
  9085  	for {
  9086  		ptr := v_0
  9087  		idx := v_1
  9088  		if v_2.Op != OpARM64MOVWreg {
  9089  			break
  9090  		}
  9091  		x := v_2.Args[0]
  9092  		mem := v_3
  9093  		v.reset(OpARM64MOVBstoreidx)
  9094  		v.AddArg4(ptr, idx, x, mem)
  9095  		return true
  9096  	}
  9097  	// match: (MOVBstoreidx ptr idx (MOVWUreg x) mem)
  9098  	// result: (MOVBstoreidx ptr idx x mem)
  9099  	for {
  9100  		ptr := v_0
  9101  		idx := v_1
  9102  		if v_2.Op != OpARM64MOVWUreg {
  9103  			break
  9104  		}
  9105  		x := v_2.Args[0]
  9106  		mem := v_3
  9107  		v.reset(OpARM64MOVBstoreidx)
  9108  		v.AddArg4(ptr, idx, x, mem)
  9109  		return true
  9110  	}
  9111  	return false
  9112  }
  9113  func rewriteValueARM64_OpARM64MOVDload(v *Value) bool {
  9114  	v_1 := v.Args[1]
  9115  	v_0 := v.Args[0]
  9116  	b := v.Block
  9117  	config := b.Func.Config
  9118  	// match: (MOVDload [off] {sym} ptr (FMOVDstore [off] {sym} ptr val _))
  9119  	// result: (FMOVDfpgp val)
  9120  	for {
  9121  		off := auxIntToInt32(v.AuxInt)
  9122  		sym := auxToSym(v.Aux)
  9123  		ptr := v_0
  9124  		if v_1.Op != OpARM64FMOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  9125  			break
  9126  		}
  9127  		val := v_1.Args[1]
  9128  		if ptr != v_1.Args[0] {
  9129  			break
  9130  		}
  9131  		v.reset(OpARM64FMOVDfpgp)
  9132  		v.AddArg(val)
  9133  		return true
  9134  	}
  9135  	// match: (MOVDload [off1] {sym} (ADDconst [off2] ptr) mem)
  9136  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9137  	// result: (MOVDload [off1+int32(off2)] {sym} ptr mem)
  9138  	for {
  9139  		off1 := auxIntToInt32(v.AuxInt)
  9140  		sym := auxToSym(v.Aux)
  9141  		if v_0.Op != OpARM64ADDconst {
  9142  			break
  9143  		}
  9144  		off2 := auxIntToInt64(v_0.AuxInt)
  9145  		ptr := v_0.Args[0]
  9146  		mem := v_1
  9147  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9148  			break
  9149  		}
  9150  		v.reset(OpARM64MOVDload)
  9151  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  9152  		v.Aux = symToAux(sym)
  9153  		v.AddArg2(ptr, mem)
  9154  		return true
  9155  	}
  9156  	// match: (MOVDload [off] {sym} (ADD ptr idx) mem)
  9157  	// cond: off == 0 && sym == nil
  9158  	// result: (MOVDloadidx ptr idx mem)
  9159  	for {
  9160  		off := auxIntToInt32(v.AuxInt)
  9161  		sym := auxToSym(v.Aux)
  9162  		if v_0.Op != OpARM64ADD {
  9163  			break
  9164  		}
  9165  		idx := v_0.Args[1]
  9166  		ptr := v_0.Args[0]
  9167  		mem := v_1
  9168  		if !(off == 0 && sym == nil) {
  9169  			break
  9170  		}
  9171  		v.reset(OpARM64MOVDloadidx)
  9172  		v.AddArg3(ptr, idx, mem)
  9173  		return true
  9174  	}
  9175  	// match: (MOVDload [off] {sym} (ADDshiftLL [3] ptr idx) mem)
  9176  	// cond: off == 0 && sym == nil
  9177  	// result: (MOVDloadidx8 ptr idx mem)
  9178  	for {
  9179  		off := auxIntToInt32(v.AuxInt)
  9180  		sym := auxToSym(v.Aux)
  9181  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
  9182  			break
  9183  		}
  9184  		idx := v_0.Args[1]
  9185  		ptr := v_0.Args[0]
  9186  		mem := v_1
  9187  		if !(off == 0 && sym == nil) {
  9188  			break
  9189  		}
  9190  		v.reset(OpARM64MOVDloadidx8)
  9191  		v.AddArg3(ptr, idx, mem)
  9192  		return true
  9193  	}
  9194  	// match: (MOVDload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  9195  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9196  	// result: (MOVDload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  9197  	for {
  9198  		off1 := auxIntToInt32(v.AuxInt)
  9199  		sym1 := auxToSym(v.Aux)
  9200  		if v_0.Op != OpARM64MOVDaddr {
  9201  			break
  9202  		}
  9203  		off2 := auxIntToInt32(v_0.AuxInt)
  9204  		sym2 := auxToSym(v_0.Aux)
  9205  		ptr := v_0.Args[0]
  9206  		mem := v_1
  9207  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9208  			break
  9209  		}
  9210  		v.reset(OpARM64MOVDload)
  9211  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9212  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9213  		v.AddArg2(ptr, mem)
  9214  		return true
  9215  	}
  9216  	// match: (MOVDload [off] {sym} (SB) _)
  9217  	// cond: symIsRO(sym)
  9218  	// result: (MOVDconst [int64(read64(sym, int64(off), config.ctxt.Arch.ByteOrder))])
  9219  	for {
  9220  		off := auxIntToInt32(v.AuxInt)
  9221  		sym := auxToSym(v.Aux)
  9222  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  9223  			break
  9224  		}
  9225  		v.reset(OpARM64MOVDconst)
  9226  		v.AuxInt = int64ToAuxInt(int64(read64(sym, int64(off), config.ctxt.Arch.ByteOrder)))
  9227  		return true
  9228  	}
  9229  	return false
  9230  }
  9231  func rewriteValueARM64_OpARM64MOVDloadidx(v *Value) bool {
  9232  	v_2 := v.Args[2]
  9233  	v_1 := v.Args[1]
  9234  	v_0 := v.Args[0]
  9235  	// match: (MOVDloadidx ptr (MOVDconst [c]) mem)
  9236  	// cond: is32Bit(c)
  9237  	// result: (MOVDload [int32(c)] ptr mem)
  9238  	for {
  9239  		ptr := v_0
  9240  		if v_1.Op != OpARM64MOVDconst {
  9241  			break
  9242  		}
  9243  		c := auxIntToInt64(v_1.AuxInt)
  9244  		mem := v_2
  9245  		if !(is32Bit(c)) {
  9246  			break
  9247  		}
  9248  		v.reset(OpARM64MOVDload)
  9249  		v.AuxInt = int32ToAuxInt(int32(c))
  9250  		v.AddArg2(ptr, mem)
  9251  		return true
  9252  	}
  9253  	// match: (MOVDloadidx (MOVDconst [c]) ptr mem)
  9254  	// cond: is32Bit(c)
  9255  	// result: (MOVDload [int32(c)] ptr mem)
  9256  	for {
  9257  		if v_0.Op != OpARM64MOVDconst {
  9258  			break
  9259  		}
  9260  		c := auxIntToInt64(v_0.AuxInt)
  9261  		ptr := v_1
  9262  		mem := v_2
  9263  		if !(is32Bit(c)) {
  9264  			break
  9265  		}
  9266  		v.reset(OpARM64MOVDload)
  9267  		v.AuxInt = int32ToAuxInt(int32(c))
  9268  		v.AddArg2(ptr, mem)
  9269  		return true
  9270  	}
  9271  	// match: (MOVDloadidx ptr (SLLconst [3] idx) mem)
  9272  	// result: (MOVDloadidx8 ptr idx mem)
  9273  	for {
  9274  		ptr := v_0
  9275  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
  9276  			break
  9277  		}
  9278  		idx := v_1.Args[0]
  9279  		mem := v_2
  9280  		v.reset(OpARM64MOVDloadidx8)
  9281  		v.AddArg3(ptr, idx, mem)
  9282  		return true
  9283  	}
  9284  	// match: (MOVDloadidx (SLLconst [3] idx) ptr mem)
  9285  	// result: (MOVDloadidx8 ptr idx mem)
  9286  	for {
  9287  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
  9288  			break
  9289  		}
  9290  		idx := v_0.Args[0]
  9291  		ptr := v_1
  9292  		mem := v_2
  9293  		v.reset(OpARM64MOVDloadidx8)
  9294  		v.AddArg3(ptr, idx, mem)
  9295  		return true
  9296  	}
  9297  	return false
  9298  }
  9299  func rewriteValueARM64_OpARM64MOVDloadidx8(v *Value) bool {
  9300  	v_2 := v.Args[2]
  9301  	v_1 := v.Args[1]
  9302  	v_0 := v.Args[0]
  9303  	// match: (MOVDloadidx8 ptr (MOVDconst [c]) mem)
  9304  	// cond: is32Bit(c<<3)
  9305  	// result: (MOVDload [int32(c)<<3] ptr mem)
  9306  	for {
  9307  		ptr := v_0
  9308  		if v_1.Op != OpARM64MOVDconst {
  9309  			break
  9310  		}
  9311  		c := auxIntToInt64(v_1.AuxInt)
  9312  		mem := v_2
  9313  		if !(is32Bit(c << 3)) {
  9314  			break
  9315  		}
  9316  		v.reset(OpARM64MOVDload)
  9317  		v.AuxInt = int32ToAuxInt(int32(c) << 3)
  9318  		v.AddArg2(ptr, mem)
  9319  		return true
  9320  	}
  9321  	return false
  9322  }
  9323  func rewriteValueARM64_OpARM64MOVDnop(v *Value) bool {
  9324  	v_0 := v.Args[0]
  9325  	// match: (MOVDnop (MOVDconst [c]))
  9326  	// result: (MOVDconst [c])
  9327  	for {
  9328  		if v_0.Op != OpARM64MOVDconst {
  9329  			break
  9330  		}
  9331  		c := auxIntToInt64(v_0.AuxInt)
  9332  		v.reset(OpARM64MOVDconst)
  9333  		v.AuxInt = int64ToAuxInt(c)
  9334  		return true
  9335  	}
  9336  	return false
  9337  }
  9338  func rewriteValueARM64_OpARM64MOVDreg(v *Value) bool {
  9339  	v_0 := v.Args[0]
  9340  	// match: (MOVDreg x)
  9341  	// cond: x.Uses == 1
  9342  	// result: (MOVDnop x)
  9343  	for {
  9344  		x := v_0
  9345  		if !(x.Uses == 1) {
  9346  			break
  9347  		}
  9348  		v.reset(OpARM64MOVDnop)
  9349  		v.AddArg(x)
  9350  		return true
  9351  	}
  9352  	// match: (MOVDreg (MOVDconst [c]))
  9353  	// result: (MOVDconst [c])
  9354  	for {
  9355  		if v_0.Op != OpARM64MOVDconst {
  9356  			break
  9357  		}
  9358  		c := auxIntToInt64(v_0.AuxInt)
  9359  		v.reset(OpARM64MOVDconst)
  9360  		v.AuxInt = int64ToAuxInt(c)
  9361  		return true
  9362  	}
  9363  	return false
  9364  }
  9365  func rewriteValueARM64_OpARM64MOVDstore(v *Value) bool {
  9366  	v_2 := v.Args[2]
  9367  	v_1 := v.Args[1]
  9368  	v_0 := v.Args[0]
  9369  	b := v.Block
  9370  	config := b.Func.Config
  9371  	// match: (MOVDstore [off] {sym} ptr (FMOVDfpgp val) mem)
  9372  	// result: (FMOVDstore [off] {sym} ptr val mem)
  9373  	for {
  9374  		off := auxIntToInt32(v.AuxInt)
  9375  		sym := auxToSym(v.Aux)
  9376  		ptr := v_0
  9377  		if v_1.Op != OpARM64FMOVDfpgp {
  9378  			break
  9379  		}
  9380  		val := v_1.Args[0]
  9381  		mem := v_2
  9382  		v.reset(OpARM64FMOVDstore)
  9383  		v.AuxInt = int32ToAuxInt(off)
  9384  		v.Aux = symToAux(sym)
  9385  		v.AddArg3(ptr, val, mem)
  9386  		return true
  9387  	}
  9388  	// match: (MOVDstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  9389  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9390  	// result: (MOVDstore [off1+int32(off2)] {sym} ptr val mem)
  9391  	for {
  9392  		off1 := auxIntToInt32(v.AuxInt)
  9393  		sym := auxToSym(v.Aux)
  9394  		if v_0.Op != OpARM64ADDconst {
  9395  			break
  9396  		}
  9397  		off2 := auxIntToInt64(v_0.AuxInt)
  9398  		ptr := v_0.Args[0]
  9399  		val := v_1
  9400  		mem := v_2
  9401  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9402  			break
  9403  		}
  9404  		v.reset(OpARM64MOVDstore)
  9405  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  9406  		v.Aux = symToAux(sym)
  9407  		v.AddArg3(ptr, val, mem)
  9408  		return true
  9409  	}
  9410  	// match: (MOVDstore [off] {sym} (ADD ptr idx) val mem)
  9411  	// cond: off == 0 && sym == nil
  9412  	// result: (MOVDstoreidx ptr idx val mem)
  9413  	for {
  9414  		off := auxIntToInt32(v.AuxInt)
  9415  		sym := auxToSym(v.Aux)
  9416  		if v_0.Op != OpARM64ADD {
  9417  			break
  9418  		}
  9419  		idx := v_0.Args[1]
  9420  		ptr := v_0.Args[0]
  9421  		val := v_1
  9422  		mem := v_2
  9423  		if !(off == 0 && sym == nil) {
  9424  			break
  9425  		}
  9426  		v.reset(OpARM64MOVDstoreidx)
  9427  		v.AddArg4(ptr, idx, val, mem)
  9428  		return true
  9429  	}
  9430  	// match: (MOVDstore [off] {sym} (ADDshiftLL [3] ptr idx) val mem)
  9431  	// cond: off == 0 && sym == nil
  9432  	// result: (MOVDstoreidx8 ptr idx val mem)
  9433  	for {
  9434  		off := auxIntToInt32(v.AuxInt)
  9435  		sym := auxToSym(v.Aux)
  9436  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
  9437  			break
  9438  		}
  9439  		idx := v_0.Args[1]
  9440  		ptr := v_0.Args[0]
  9441  		val := v_1
  9442  		mem := v_2
  9443  		if !(off == 0 && sym == nil) {
  9444  			break
  9445  		}
  9446  		v.reset(OpARM64MOVDstoreidx8)
  9447  		v.AddArg4(ptr, idx, val, mem)
  9448  		return true
  9449  	}
  9450  	// match: (MOVDstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
  9451  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9452  	// result: (MOVDstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  9453  	for {
  9454  		off1 := auxIntToInt32(v.AuxInt)
  9455  		sym1 := auxToSym(v.Aux)
  9456  		if v_0.Op != OpARM64MOVDaddr {
  9457  			break
  9458  		}
  9459  		off2 := auxIntToInt32(v_0.AuxInt)
  9460  		sym2 := auxToSym(v_0.Aux)
  9461  		ptr := v_0.Args[0]
  9462  		val := v_1
  9463  		mem := v_2
  9464  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9465  			break
  9466  		}
  9467  		v.reset(OpARM64MOVDstore)
  9468  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9469  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9470  		v.AddArg3(ptr, val, mem)
  9471  		return true
  9472  	}
  9473  	return false
  9474  }
  9475  func rewriteValueARM64_OpARM64MOVDstoreidx(v *Value) bool {
  9476  	v_3 := v.Args[3]
  9477  	v_2 := v.Args[2]
  9478  	v_1 := v.Args[1]
  9479  	v_0 := v.Args[0]
  9480  	// match: (MOVDstoreidx ptr (MOVDconst [c]) val mem)
  9481  	// cond: is32Bit(c)
  9482  	// result: (MOVDstore [int32(c)] ptr val mem)
  9483  	for {
  9484  		ptr := v_0
  9485  		if v_1.Op != OpARM64MOVDconst {
  9486  			break
  9487  		}
  9488  		c := auxIntToInt64(v_1.AuxInt)
  9489  		val := v_2
  9490  		mem := v_3
  9491  		if !(is32Bit(c)) {
  9492  			break
  9493  		}
  9494  		v.reset(OpARM64MOVDstore)
  9495  		v.AuxInt = int32ToAuxInt(int32(c))
  9496  		v.AddArg3(ptr, val, mem)
  9497  		return true
  9498  	}
  9499  	// match: (MOVDstoreidx (MOVDconst [c]) idx val mem)
  9500  	// cond: is32Bit(c)
  9501  	// result: (MOVDstore [int32(c)] idx val mem)
  9502  	for {
  9503  		if v_0.Op != OpARM64MOVDconst {
  9504  			break
  9505  		}
  9506  		c := auxIntToInt64(v_0.AuxInt)
  9507  		idx := v_1
  9508  		val := v_2
  9509  		mem := v_3
  9510  		if !(is32Bit(c)) {
  9511  			break
  9512  		}
  9513  		v.reset(OpARM64MOVDstore)
  9514  		v.AuxInt = int32ToAuxInt(int32(c))
  9515  		v.AddArg3(idx, val, mem)
  9516  		return true
  9517  	}
  9518  	// match: (MOVDstoreidx ptr (SLLconst [3] idx) val mem)
  9519  	// result: (MOVDstoreidx8 ptr idx val mem)
  9520  	for {
  9521  		ptr := v_0
  9522  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
  9523  			break
  9524  		}
  9525  		idx := v_1.Args[0]
  9526  		val := v_2
  9527  		mem := v_3
  9528  		v.reset(OpARM64MOVDstoreidx8)
  9529  		v.AddArg4(ptr, idx, val, mem)
  9530  		return true
  9531  	}
  9532  	// match: (MOVDstoreidx (SLLconst [3] idx) ptr val mem)
  9533  	// result: (MOVDstoreidx8 ptr idx val mem)
  9534  	for {
  9535  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
  9536  			break
  9537  		}
  9538  		idx := v_0.Args[0]
  9539  		ptr := v_1
  9540  		val := v_2
  9541  		mem := v_3
  9542  		v.reset(OpARM64MOVDstoreidx8)
  9543  		v.AddArg4(ptr, idx, val, mem)
  9544  		return true
  9545  	}
  9546  	return false
  9547  }
  9548  func rewriteValueARM64_OpARM64MOVDstoreidx8(v *Value) bool {
  9549  	v_3 := v.Args[3]
  9550  	v_2 := v.Args[2]
  9551  	v_1 := v.Args[1]
  9552  	v_0 := v.Args[0]
  9553  	// match: (MOVDstoreidx8 ptr (MOVDconst [c]) val mem)
  9554  	// cond: is32Bit(c<<3)
  9555  	// result: (MOVDstore [int32(c)<<3] ptr val mem)
  9556  	for {
  9557  		ptr := v_0
  9558  		if v_1.Op != OpARM64MOVDconst {
  9559  			break
  9560  		}
  9561  		c := auxIntToInt64(v_1.AuxInt)
  9562  		val := v_2
  9563  		mem := v_3
  9564  		if !(is32Bit(c << 3)) {
  9565  			break
  9566  		}
  9567  		v.reset(OpARM64MOVDstore)
  9568  		v.AuxInt = int32ToAuxInt(int32(c) << 3)
  9569  		v.AddArg3(ptr, val, mem)
  9570  		return true
  9571  	}
  9572  	return false
  9573  }
  9574  func rewriteValueARM64_OpARM64MOVHUload(v *Value) bool {
  9575  	v_1 := v.Args[1]
  9576  	v_0 := v.Args[0]
  9577  	b := v.Block
  9578  	config := b.Func.Config
  9579  	// match: (MOVHUload [off1] {sym} (ADDconst [off2] ptr) mem)
  9580  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9581  	// result: (MOVHUload [off1+int32(off2)] {sym} ptr mem)
  9582  	for {
  9583  		off1 := auxIntToInt32(v.AuxInt)
  9584  		sym := auxToSym(v.Aux)
  9585  		if v_0.Op != OpARM64ADDconst {
  9586  			break
  9587  		}
  9588  		off2 := auxIntToInt64(v_0.AuxInt)
  9589  		ptr := v_0.Args[0]
  9590  		mem := v_1
  9591  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9592  			break
  9593  		}
  9594  		v.reset(OpARM64MOVHUload)
  9595  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  9596  		v.Aux = symToAux(sym)
  9597  		v.AddArg2(ptr, mem)
  9598  		return true
  9599  	}
  9600  	// match: (MOVHUload [off] {sym} (ADD ptr idx) mem)
  9601  	// cond: off == 0 && sym == nil
  9602  	// result: (MOVHUloadidx ptr idx mem)
  9603  	for {
  9604  		off := auxIntToInt32(v.AuxInt)
  9605  		sym := auxToSym(v.Aux)
  9606  		if v_0.Op != OpARM64ADD {
  9607  			break
  9608  		}
  9609  		idx := v_0.Args[1]
  9610  		ptr := v_0.Args[0]
  9611  		mem := v_1
  9612  		if !(off == 0 && sym == nil) {
  9613  			break
  9614  		}
  9615  		v.reset(OpARM64MOVHUloadidx)
  9616  		v.AddArg3(ptr, idx, mem)
  9617  		return true
  9618  	}
  9619  	// match: (MOVHUload [off] {sym} (ADDshiftLL [1] ptr idx) mem)
  9620  	// cond: off == 0 && sym == nil
  9621  	// result: (MOVHUloadidx2 ptr idx mem)
  9622  	for {
  9623  		off := auxIntToInt32(v.AuxInt)
  9624  		sym := auxToSym(v.Aux)
  9625  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 1 {
  9626  			break
  9627  		}
  9628  		idx := v_0.Args[1]
  9629  		ptr := v_0.Args[0]
  9630  		mem := v_1
  9631  		if !(off == 0 && sym == nil) {
  9632  			break
  9633  		}
  9634  		v.reset(OpARM64MOVHUloadidx2)
  9635  		v.AddArg3(ptr, idx, mem)
  9636  		return true
  9637  	}
  9638  	// match: (MOVHUload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  9639  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9640  	// result: (MOVHUload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  9641  	for {
  9642  		off1 := auxIntToInt32(v.AuxInt)
  9643  		sym1 := auxToSym(v.Aux)
  9644  		if v_0.Op != OpARM64MOVDaddr {
  9645  			break
  9646  		}
  9647  		off2 := auxIntToInt32(v_0.AuxInt)
  9648  		sym2 := auxToSym(v_0.Aux)
  9649  		ptr := v_0.Args[0]
  9650  		mem := v_1
  9651  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9652  			break
  9653  		}
  9654  		v.reset(OpARM64MOVHUload)
  9655  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9656  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9657  		v.AddArg2(ptr, mem)
  9658  		return true
  9659  	}
  9660  	// match: (MOVHUload [off] {sym} (SB) _)
  9661  	// cond: symIsRO(sym)
  9662  	// result: (MOVDconst [int64(read16(sym, int64(off), config.ctxt.Arch.ByteOrder))])
  9663  	for {
  9664  		off := auxIntToInt32(v.AuxInt)
  9665  		sym := auxToSym(v.Aux)
  9666  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  9667  			break
  9668  		}
  9669  		v.reset(OpARM64MOVDconst)
  9670  		v.AuxInt = int64ToAuxInt(int64(read16(sym, int64(off), config.ctxt.Arch.ByteOrder)))
  9671  		return true
  9672  	}
  9673  	return false
  9674  }
  9675  func rewriteValueARM64_OpARM64MOVHUloadidx(v *Value) bool {
  9676  	v_2 := v.Args[2]
  9677  	v_1 := v.Args[1]
  9678  	v_0 := v.Args[0]
  9679  	// match: (MOVHUloadidx ptr (MOVDconst [c]) mem)
  9680  	// cond: is32Bit(c)
  9681  	// result: (MOVHUload [int32(c)] ptr mem)
  9682  	for {
  9683  		ptr := v_0
  9684  		if v_1.Op != OpARM64MOVDconst {
  9685  			break
  9686  		}
  9687  		c := auxIntToInt64(v_1.AuxInt)
  9688  		mem := v_2
  9689  		if !(is32Bit(c)) {
  9690  			break
  9691  		}
  9692  		v.reset(OpARM64MOVHUload)
  9693  		v.AuxInt = int32ToAuxInt(int32(c))
  9694  		v.AddArg2(ptr, mem)
  9695  		return true
  9696  	}
  9697  	// match: (MOVHUloadidx (MOVDconst [c]) ptr mem)
  9698  	// cond: is32Bit(c)
  9699  	// result: (MOVHUload [int32(c)] ptr mem)
  9700  	for {
  9701  		if v_0.Op != OpARM64MOVDconst {
  9702  			break
  9703  		}
  9704  		c := auxIntToInt64(v_0.AuxInt)
  9705  		ptr := v_1
  9706  		mem := v_2
  9707  		if !(is32Bit(c)) {
  9708  			break
  9709  		}
  9710  		v.reset(OpARM64MOVHUload)
  9711  		v.AuxInt = int32ToAuxInt(int32(c))
  9712  		v.AddArg2(ptr, mem)
  9713  		return true
  9714  	}
  9715  	// match: (MOVHUloadidx ptr (SLLconst [1] idx) mem)
  9716  	// result: (MOVHUloadidx2 ptr idx mem)
  9717  	for {
  9718  		ptr := v_0
  9719  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 1 {
  9720  			break
  9721  		}
  9722  		idx := v_1.Args[0]
  9723  		mem := v_2
  9724  		v.reset(OpARM64MOVHUloadidx2)
  9725  		v.AddArg3(ptr, idx, mem)
  9726  		return true
  9727  	}
  9728  	// match: (MOVHUloadidx ptr (ADD idx idx) mem)
  9729  	// result: (MOVHUloadidx2 ptr idx mem)
  9730  	for {
  9731  		ptr := v_0
  9732  		if v_1.Op != OpARM64ADD {
  9733  			break
  9734  		}
  9735  		idx := v_1.Args[1]
  9736  		if idx != v_1.Args[0] {
  9737  			break
  9738  		}
  9739  		mem := v_2
  9740  		v.reset(OpARM64MOVHUloadidx2)
  9741  		v.AddArg3(ptr, idx, mem)
  9742  		return true
  9743  	}
  9744  	// match: (MOVHUloadidx (ADD idx idx) ptr mem)
  9745  	// result: (MOVHUloadidx2 ptr idx mem)
  9746  	for {
  9747  		if v_0.Op != OpARM64ADD {
  9748  			break
  9749  		}
  9750  		idx := v_0.Args[1]
  9751  		if idx != v_0.Args[0] {
  9752  			break
  9753  		}
  9754  		ptr := v_1
  9755  		mem := v_2
  9756  		v.reset(OpARM64MOVHUloadidx2)
  9757  		v.AddArg3(ptr, idx, mem)
  9758  		return true
  9759  	}
  9760  	return false
  9761  }
  9762  func rewriteValueARM64_OpARM64MOVHUloadidx2(v *Value) bool {
  9763  	v_2 := v.Args[2]
  9764  	v_1 := v.Args[1]
  9765  	v_0 := v.Args[0]
  9766  	// match: (MOVHUloadidx2 ptr (MOVDconst [c]) mem)
  9767  	// cond: is32Bit(c<<1)
  9768  	// result: (MOVHUload [int32(c)<<1] ptr mem)
  9769  	for {
  9770  		ptr := v_0
  9771  		if v_1.Op != OpARM64MOVDconst {
  9772  			break
  9773  		}
  9774  		c := auxIntToInt64(v_1.AuxInt)
  9775  		mem := v_2
  9776  		if !(is32Bit(c << 1)) {
  9777  			break
  9778  		}
  9779  		v.reset(OpARM64MOVHUload)
  9780  		v.AuxInt = int32ToAuxInt(int32(c) << 1)
  9781  		v.AddArg2(ptr, mem)
  9782  		return true
  9783  	}
  9784  	return false
  9785  }
  9786  func rewriteValueARM64_OpARM64MOVHUreg(v *Value) bool {
  9787  	v_0 := v.Args[0]
  9788  	// match: (MOVHUreg (ANDconst [c] x))
  9789  	// result: (ANDconst [c&(1<<16-1)] x)
  9790  	for {
  9791  		if v_0.Op != OpARM64ANDconst {
  9792  			break
  9793  		}
  9794  		c := auxIntToInt64(v_0.AuxInt)
  9795  		x := v_0.Args[0]
  9796  		v.reset(OpARM64ANDconst)
  9797  		v.AuxInt = int64ToAuxInt(c & (1<<16 - 1))
  9798  		v.AddArg(x)
  9799  		return true
  9800  	}
  9801  	// match: (MOVHUreg (MOVDconst [c]))
  9802  	// result: (MOVDconst [int64(uint16(c))])
  9803  	for {
  9804  		if v_0.Op != OpARM64MOVDconst {
  9805  			break
  9806  		}
  9807  		c := auxIntToInt64(v_0.AuxInt)
  9808  		v.reset(OpARM64MOVDconst)
  9809  		v.AuxInt = int64ToAuxInt(int64(uint16(c)))
  9810  		return true
  9811  	}
  9812  	// match: (MOVHUreg x)
  9813  	// cond: v.Type.Size() <= 2
  9814  	// result: x
  9815  	for {
  9816  		x := v_0
  9817  		if !(v.Type.Size() <= 2) {
  9818  			break
  9819  		}
  9820  		v.copyOf(x)
  9821  		return true
  9822  	}
  9823  	// match: (MOVHUreg (SLLconst [lc] x))
  9824  	// cond: lc >= 16
  9825  	// result: (MOVDconst [0])
  9826  	for {
  9827  		if v_0.Op != OpARM64SLLconst {
  9828  			break
  9829  		}
  9830  		lc := auxIntToInt64(v_0.AuxInt)
  9831  		if !(lc >= 16) {
  9832  			break
  9833  		}
  9834  		v.reset(OpARM64MOVDconst)
  9835  		v.AuxInt = int64ToAuxInt(0)
  9836  		return true
  9837  	}
  9838  	// match: (MOVHUreg (SLLconst [lc] x))
  9839  	// cond: lc < 16
  9840  	// result: (UBFIZ [armBFAuxInt(lc, 16-lc)] x)
  9841  	for {
  9842  		if v_0.Op != OpARM64SLLconst {
  9843  			break
  9844  		}
  9845  		lc := auxIntToInt64(v_0.AuxInt)
  9846  		x := v_0.Args[0]
  9847  		if !(lc < 16) {
  9848  			break
  9849  		}
  9850  		v.reset(OpARM64UBFIZ)
  9851  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 16-lc))
  9852  		v.AddArg(x)
  9853  		return true
  9854  	}
  9855  	// match: (MOVHUreg (SRLconst [rc] x))
  9856  	// cond: rc < 16
  9857  	// result: (UBFX [armBFAuxInt(rc, 16)] x)
  9858  	for {
  9859  		if v_0.Op != OpARM64SRLconst {
  9860  			break
  9861  		}
  9862  		rc := auxIntToInt64(v_0.AuxInt)
  9863  		x := v_0.Args[0]
  9864  		if !(rc < 16) {
  9865  			break
  9866  		}
  9867  		v.reset(OpARM64UBFX)
  9868  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 16))
  9869  		v.AddArg(x)
  9870  		return true
  9871  	}
  9872  	// match: (MOVHUreg (UBFX [bfc] x))
  9873  	// cond: bfc.width() <= 16
  9874  	// result: (UBFX [bfc] x)
  9875  	for {
  9876  		if v_0.Op != OpARM64UBFX {
  9877  			break
  9878  		}
  9879  		bfc := auxIntToArm64BitField(v_0.AuxInt)
  9880  		x := v_0.Args[0]
  9881  		if !(bfc.width() <= 16) {
  9882  			break
  9883  		}
  9884  		v.reset(OpARM64UBFX)
  9885  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
  9886  		v.AddArg(x)
  9887  		return true
  9888  	}
  9889  	return false
  9890  }
  9891  func rewriteValueARM64_OpARM64MOVHload(v *Value) bool {
  9892  	v_1 := v.Args[1]
  9893  	v_0 := v.Args[0]
  9894  	b := v.Block
  9895  	config := b.Func.Config
  9896  	// match: (MOVHload [off1] {sym} (ADDconst [off2] ptr) mem)
  9897  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9898  	// result: (MOVHload [off1+int32(off2)] {sym} ptr mem)
  9899  	for {
  9900  		off1 := auxIntToInt32(v.AuxInt)
  9901  		sym := auxToSym(v.Aux)
  9902  		if v_0.Op != OpARM64ADDconst {
  9903  			break
  9904  		}
  9905  		off2 := auxIntToInt64(v_0.AuxInt)
  9906  		ptr := v_0.Args[0]
  9907  		mem := v_1
  9908  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9909  			break
  9910  		}
  9911  		v.reset(OpARM64MOVHload)
  9912  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  9913  		v.Aux = symToAux(sym)
  9914  		v.AddArg2(ptr, mem)
  9915  		return true
  9916  	}
  9917  	// match: (MOVHload [off] {sym} (ADD ptr idx) mem)
  9918  	// cond: off == 0 && sym == nil
  9919  	// result: (MOVHloadidx ptr idx mem)
  9920  	for {
  9921  		off := auxIntToInt32(v.AuxInt)
  9922  		sym := auxToSym(v.Aux)
  9923  		if v_0.Op != OpARM64ADD {
  9924  			break
  9925  		}
  9926  		idx := v_0.Args[1]
  9927  		ptr := v_0.Args[0]
  9928  		mem := v_1
  9929  		if !(off == 0 && sym == nil) {
  9930  			break
  9931  		}
  9932  		v.reset(OpARM64MOVHloadidx)
  9933  		v.AddArg3(ptr, idx, mem)
  9934  		return true
  9935  	}
  9936  	// match: (MOVHload [off] {sym} (ADDshiftLL [1] ptr idx) mem)
  9937  	// cond: off == 0 && sym == nil
  9938  	// result: (MOVHloadidx2 ptr idx mem)
  9939  	for {
  9940  		off := auxIntToInt32(v.AuxInt)
  9941  		sym := auxToSym(v.Aux)
  9942  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 1 {
  9943  			break
  9944  		}
  9945  		idx := v_0.Args[1]
  9946  		ptr := v_0.Args[0]
  9947  		mem := v_1
  9948  		if !(off == 0 && sym == nil) {
  9949  			break
  9950  		}
  9951  		v.reset(OpARM64MOVHloadidx2)
  9952  		v.AddArg3(ptr, idx, mem)
  9953  		return true
  9954  	}
  9955  	// match: (MOVHload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  9956  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9957  	// result: (MOVHload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  9958  	for {
  9959  		off1 := auxIntToInt32(v.AuxInt)
  9960  		sym1 := auxToSym(v.Aux)
  9961  		if v_0.Op != OpARM64MOVDaddr {
  9962  			break
  9963  		}
  9964  		off2 := auxIntToInt32(v_0.AuxInt)
  9965  		sym2 := auxToSym(v_0.Aux)
  9966  		ptr := v_0.Args[0]
  9967  		mem := v_1
  9968  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9969  			break
  9970  		}
  9971  		v.reset(OpARM64MOVHload)
  9972  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9973  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9974  		v.AddArg2(ptr, mem)
  9975  		return true
  9976  	}
  9977  	// match: (MOVHload [off] {sym} (SB) _)
  9978  	// cond: symIsRO(sym)
  9979  	// result: (MOVDconst [int64(int16(read16(sym, int64(off), config.ctxt.Arch.ByteOrder)))])
  9980  	for {
  9981  		off := auxIntToInt32(v.AuxInt)
  9982  		sym := auxToSym(v.Aux)
  9983  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  9984  			break
  9985  		}
  9986  		v.reset(OpARM64MOVDconst)
  9987  		v.AuxInt = int64ToAuxInt(int64(int16(read16(sym, int64(off), config.ctxt.Arch.ByteOrder))))
  9988  		return true
  9989  	}
  9990  	return false
  9991  }
  9992  func rewriteValueARM64_OpARM64MOVHloadidx(v *Value) bool {
  9993  	v_2 := v.Args[2]
  9994  	v_1 := v.Args[1]
  9995  	v_0 := v.Args[0]
  9996  	// match: (MOVHloadidx ptr (MOVDconst [c]) mem)
  9997  	// cond: is32Bit(c)
  9998  	// result: (MOVHload [int32(c)] ptr mem)
  9999  	for {
 10000  		ptr := v_0
 10001  		if v_1.Op != OpARM64MOVDconst {
 10002  			break
 10003  		}
 10004  		c := auxIntToInt64(v_1.AuxInt)
 10005  		mem := v_2
 10006  		if !(is32Bit(c)) {
 10007  			break
 10008  		}
 10009  		v.reset(OpARM64MOVHload)
 10010  		v.AuxInt = int32ToAuxInt(int32(c))
 10011  		v.AddArg2(ptr, mem)
 10012  		return true
 10013  	}
 10014  	// match: (MOVHloadidx (MOVDconst [c]) ptr mem)
 10015  	// cond: is32Bit(c)
 10016  	// result: (MOVHload [int32(c)] ptr mem)
 10017  	for {
 10018  		if v_0.Op != OpARM64MOVDconst {
 10019  			break
 10020  		}
 10021  		c := auxIntToInt64(v_0.AuxInt)
 10022  		ptr := v_1
 10023  		mem := v_2
 10024  		if !(is32Bit(c)) {
 10025  			break
 10026  		}
 10027  		v.reset(OpARM64MOVHload)
 10028  		v.AuxInt = int32ToAuxInt(int32(c))
 10029  		v.AddArg2(ptr, mem)
 10030  		return true
 10031  	}
 10032  	// match: (MOVHloadidx ptr (SLLconst [1] idx) mem)
 10033  	// result: (MOVHloadidx2 ptr idx mem)
 10034  	for {
 10035  		ptr := v_0
 10036  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 1 {
 10037  			break
 10038  		}
 10039  		idx := v_1.Args[0]
 10040  		mem := v_2
 10041  		v.reset(OpARM64MOVHloadidx2)
 10042  		v.AddArg3(ptr, idx, mem)
 10043  		return true
 10044  	}
 10045  	// match: (MOVHloadidx ptr (ADD idx idx) mem)
 10046  	// result: (MOVHloadidx2 ptr idx mem)
 10047  	for {
 10048  		ptr := v_0
 10049  		if v_1.Op != OpARM64ADD {
 10050  			break
 10051  		}
 10052  		idx := v_1.Args[1]
 10053  		if idx != v_1.Args[0] {
 10054  			break
 10055  		}
 10056  		mem := v_2
 10057  		v.reset(OpARM64MOVHloadidx2)
 10058  		v.AddArg3(ptr, idx, mem)
 10059  		return true
 10060  	}
 10061  	// match: (MOVHloadidx (ADD idx idx) ptr mem)
 10062  	// result: (MOVHloadidx2 ptr idx mem)
 10063  	for {
 10064  		if v_0.Op != OpARM64ADD {
 10065  			break
 10066  		}
 10067  		idx := v_0.Args[1]
 10068  		if idx != v_0.Args[0] {
 10069  			break
 10070  		}
 10071  		ptr := v_1
 10072  		mem := v_2
 10073  		v.reset(OpARM64MOVHloadidx2)
 10074  		v.AddArg3(ptr, idx, mem)
 10075  		return true
 10076  	}
 10077  	return false
 10078  }
 10079  func rewriteValueARM64_OpARM64MOVHloadidx2(v *Value) bool {
 10080  	v_2 := v.Args[2]
 10081  	v_1 := v.Args[1]
 10082  	v_0 := v.Args[0]
 10083  	// match: (MOVHloadidx2 ptr (MOVDconst [c]) mem)
 10084  	// cond: is32Bit(c<<1)
 10085  	// result: (MOVHload [int32(c)<<1] ptr mem)
 10086  	for {
 10087  		ptr := v_0
 10088  		if v_1.Op != OpARM64MOVDconst {
 10089  			break
 10090  		}
 10091  		c := auxIntToInt64(v_1.AuxInt)
 10092  		mem := v_2
 10093  		if !(is32Bit(c << 1)) {
 10094  			break
 10095  		}
 10096  		v.reset(OpARM64MOVHload)
 10097  		v.AuxInt = int32ToAuxInt(int32(c) << 1)
 10098  		v.AddArg2(ptr, mem)
 10099  		return true
 10100  	}
 10101  	return false
 10102  }
 10103  func rewriteValueARM64_OpARM64MOVHreg(v *Value) bool {
 10104  	v_0 := v.Args[0]
 10105  	// match: (MOVHreg (MOVDconst [c]))
 10106  	// result: (MOVDconst [int64(int16(c))])
 10107  	for {
 10108  		if v_0.Op != OpARM64MOVDconst {
 10109  			break
 10110  		}
 10111  		c := auxIntToInt64(v_0.AuxInt)
 10112  		v.reset(OpARM64MOVDconst)
 10113  		v.AuxInt = int64ToAuxInt(int64(int16(c)))
 10114  		return true
 10115  	}
 10116  	// match: (MOVHreg x)
 10117  	// cond: v.Type.Size() <= 2
 10118  	// result: x
 10119  	for {
 10120  		x := v_0
 10121  		if !(v.Type.Size() <= 2) {
 10122  			break
 10123  		}
 10124  		v.copyOf(x)
 10125  		return true
 10126  	}
 10127  	// match: (MOVHreg <t> (ANDconst x [c]))
 10128  	// cond: uint64(c) & uint64(0xffffffffffff8000) == 0
 10129  	// result: (ANDconst <t> x [c])
 10130  	for {
 10131  		t := v.Type
 10132  		if v_0.Op != OpARM64ANDconst {
 10133  			break
 10134  		}
 10135  		c := auxIntToInt64(v_0.AuxInt)
 10136  		x := v_0.Args[0]
 10137  		if !(uint64(c)&uint64(0xffffffffffff8000) == 0) {
 10138  			break
 10139  		}
 10140  		v.reset(OpARM64ANDconst)
 10141  		v.Type = t
 10142  		v.AuxInt = int64ToAuxInt(c)
 10143  		v.AddArg(x)
 10144  		return true
 10145  	}
 10146  	// match: (MOVHreg (SLLconst [lc] x))
 10147  	// cond: lc < 16
 10148  	// result: (SBFIZ [armBFAuxInt(lc, 16-lc)] x)
 10149  	for {
 10150  		if v_0.Op != OpARM64SLLconst {
 10151  			break
 10152  		}
 10153  		lc := auxIntToInt64(v_0.AuxInt)
 10154  		x := v_0.Args[0]
 10155  		if !(lc < 16) {
 10156  			break
 10157  		}
 10158  		v.reset(OpARM64SBFIZ)
 10159  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 16-lc))
 10160  		v.AddArg(x)
 10161  		return true
 10162  	}
 10163  	// match: (MOVHreg (SBFX [bfc] x))
 10164  	// cond: bfc.width() <= 16
 10165  	// result: (SBFX [bfc] x)
 10166  	for {
 10167  		if v_0.Op != OpARM64SBFX {
 10168  			break
 10169  		}
 10170  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 10171  		x := v_0.Args[0]
 10172  		if !(bfc.width() <= 16) {
 10173  			break
 10174  		}
 10175  		v.reset(OpARM64SBFX)
 10176  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 10177  		v.AddArg(x)
 10178  		return true
 10179  	}
 10180  	return false
 10181  }
 10182  func rewriteValueARM64_OpARM64MOVHstore(v *Value) bool {
 10183  	v_2 := v.Args[2]
 10184  	v_1 := v.Args[1]
 10185  	v_0 := v.Args[0]
 10186  	b := v.Block
 10187  	config := b.Func.Config
 10188  	// match: (MOVHstore [off1] {sym} (ADDconst [off2] ptr) val mem)
 10189  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10190  	// result: (MOVHstore [off1+int32(off2)] {sym} ptr val mem)
 10191  	for {
 10192  		off1 := auxIntToInt32(v.AuxInt)
 10193  		sym := auxToSym(v.Aux)
 10194  		if v_0.Op != OpARM64ADDconst {
 10195  			break
 10196  		}
 10197  		off2 := auxIntToInt64(v_0.AuxInt)
 10198  		ptr := v_0.Args[0]
 10199  		val := v_1
 10200  		mem := v_2
 10201  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10202  			break
 10203  		}
 10204  		v.reset(OpARM64MOVHstore)
 10205  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 10206  		v.Aux = symToAux(sym)
 10207  		v.AddArg3(ptr, val, mem)
 10208  		return true
 10209  	}
 10210  	// match: (MOVHstore [off] {sym} (ADD ptr idx) val mem)
 10211  	// cond: off == 0 && sym == nil
 10212  	// result: (MOVHstoreidx ptr idx val mem)
 10213  	for {
 10214  		off := auxIntToInt32(v.AuxInt)
 10215  		sym := auxToSym(v.Aux)
 10216  		if v_0.Op != OpARM64ADD {
 10217  			break
 10218  		}
 10219  		idx := v_0.Args[1]
 10220  		ptr := v_0.Args[0]
 10221  		val := v_1
 10222  		mem := v_2
 10223  		if !(off == 0 && sym == nil) {
 10224  			break
 10225  		}
 10226  		v.reset(OpARM64MOVHstoreidx)
 10227  		v.AddArg4(ptr, idx, val, mem)
 10228  		return true
 10229  	}
 10230  	// match: (MOVHstore [off] {sym} (ADDshiftLL [1] ptr idx) val mem)
 10231  	// cond: off == 0 && sym == nil
 10232  	// result: (MOVHstoreidx2 ptr idx val mem)
 10233  	for {
 10234  		off := auxIntToInt32(v.AuxInt)
 10235  		sym := auxToSym(v.Aux)
 10236  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 1 {
 10237  			break
 10238  		}
 10239  		idx := v_0.Args[1]
 10240  		ptr := v_0.Args[0]
 10241  		val := v_1
 10242  		mem := v_2
 10243  		if !(off == 0 && sym == nil) {
 10244  			break
 10245  		}
 10246  		v.reset(OpARM64MOVHstoreidx2)
 10247  		v.AddArg4(ptr, idx, val, mem)
 10248  		return true
 10249  	}
 10250  	// match: (MOVHstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
 10251  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10252  	// result: (MOVHstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
 10253  	for {
 10254  		off1 := auxIntToInt32(v.AuxInt)
 10255  		sym1 := auxToSym(v.Aux)
 10256  		if v_0.Op != OpARM64MOVDaddr {
 10257  			break
 10258  		}
 10259  		off2 := auxIntToInt32(v_0.AuxInt)
 10260  		sym2 := auxToSym(v_0.Aux)
 10261  		ptr := v_0.Args[0]
 10262  		val := v_1
 10263  		mem := v_2
 10264  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10265  			break
 10266  		}
 10267  		v.reset(OpARM64MOVHstore)
 10268  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10269  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10270  		v.AddArg3(ptr, val, mem)
 10271  		return true
 10272  	}
 10273  	// match: (MOVHstore [off] {sym} ptr (MOVHreg x) mem)
 10274  	// result: (MOVHstore [off] {sym} ptr x mem)
 10275  	for {
 10276  		off := auxIntToInt32(v.AuxInt)
 10277  		sym := auxToSym(v.Aux)
 10278  		ptr := v_0
 10279  		if v_1.Op != OpARM64MOVHreg {
 10280  			break
 10281  		}
 10282  		x := v_1.Args[0]
 10283  		mem := v_2
 10284  		v.reset(OpARM64MOVHstore)
 10285  		v.AuxInt = int32ToAuxInt(off)
 10286  		v.Aux = symToAux(sym)
 10287  		v.AddArg3(ptr, x, mem)
 10288  		return true
 10289  	}
 10290  	// match: (MOVHstore [off] {sym} ptr (MOVHUreg x) mem)
 10291  	// result: (MOVHstore [off] {sym} ptr x mem)
 10292  	for {
 10293  		off := auxIntToInt32(v.AuxInt)
 10294  		sym := auxToSym(v.Aux)
 10295  		ptr := v_0
 10296  		if v_1.Op != OpARM64MOVHUreg {
 10297  			break
 10298  		}
 10299  		x := v_1.Args[0]
 10300  		mem := v_2
 10301  		v.reset(OpARM64MOVHstore)
 10302  		v.AuxInt = int32ToAuxInt(off)
 10303  		v.Aux = symToAux(sym)
 10304  		v.AddArg3(ptr, x, mem)
 10305  		return true
 10306  	}
 10307  	// match: (MOVHstore [off] {sym} ptr (MOVWreg x) mem)
 10308  	// result: (MOVHstore [off] {sym} ptr x mem)
 10309  	for {
 10310  		off := auxIntToInt32(v.AuxInt)
 10311  		sym := auxToSym(v.Aux)
 10312  		ptr := v_0
 10313  		if v_1.Op != OpARM64MOVWreg {
 10314  			break
 10315  		}
 10316  		x := v_1.Args[0]
 10317  		mem := v_2
 10318  		v.reset(OpARM64MOVHstore)
 10319  		v.AuxInt = int32ToAuxInt(off)
 10320  		v.Aux = symToAux(sym)
 10321  		v.AddArg3(ptr, x, mem)
 10322  		return true
 10323  	}
 10324  	// match: (MOVHstore [off] {sym} ptr (MOVWUreg x) mem)
 10325  	// result: (MOVHstore [off] {sym} ptr x mem)
 10326  	for {
 10327  		off := auxIntToInt32(v.AuxInt)
 10328  		sym := auxToSym(v.Aux)
 10329  		ptr := v_0
 10330  		if v_1.Op != OpARM64MOVWUreg {
 10331  			break
 10332  		}
 10333  		x := v_1.Args[0]
 10334  		mem := v_2
 10335  		v.reset(OpARM64MOVHstore)
 10336  		v.AuxInt = int32ToAuxInt(off)
 10337  		v.Aux = symToAux(sym)
 10338  		v.AddArg3(ptr, x, mem)
 10339  		return true
 10340  	}
 10341  	return false
 10342  }
 10343  func rewriteValueARM64_OpARM64MOVHstoreidx(v *Value) bool {
 10344  	v_3 := v.Args[3]
 10345  	v_2 := v.Args[2]
 10346  	v_1 := v.Args[1]
 10347  	v_0 := v.Args[0]
 10348  	// match: (MOVHstoreidx ptr (MOVDconst [c]) val mem)
 10349  	// cond: is32Bit(c)
 10350  	// result: (MOVHstore [int32(c)] ptr val mem)
 10351  	for {
 10352  		ptr := v_0
 10353  		if v_1.Op != OpARM64MOVDconst {
 10354  			break
 10355  		}
 10356  		c := auxIntToInt64(v_1.AuxInt)
 10357  		val := v_2
 10358  		mem := v_3
 10359  		if !(is32Bit(c)) {
 10360  			break
 10361  		}
 10362  		v.reset(OpARM64MOVHstore)
 10363  		v.AuxInt = int32ToAuxInt(int32(c))
 10364  		v.AddArg3(ptr, val, mem)
 10365  		return true
 10366  	}
 10367  	// match: (MOVHstoreidx (MOVDconst [c]) idx val mem)
 10368  	// cond: is32Bit(c)
 10369  	// result: (MOVHstore [int32(c)] idx val mem)
 10370  	for {
 10371  		if v_0.Op != OpARM64MOVDconst {
 10372  			break
 10373  		}
 10374  		c := auxIntToInt64(v_0.AuxInt)
 10375  		idx := v_1
 10376  		val := v_2
 10377  		mem := v_3
 10378  		if !(is32Bit(c)) {
 10379  			break
 10380  		}
 10381  		v.reset(OpARM64MOVHstore)
 10382  		v.AuxInt = int32ToAuxInt(int32(c))
 10383  		v.AddArg3(idx, val, mem)
 10384  		return true
 10385  	}
 10386  	// match: (MOVHstoreidx ptr (SLLconst [1] idx) val mem)
 10387  	// result: (MOVHstoreidx2 ptr idx val mem)
 10388  	for {
 10389  		ptr := v_0
 10390  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 1 {
 10391  			break
 10392  		}
 10393  		idx := v_1.Args[0]
 10394  		val := v_2
 10395  		mem := v_3
 10396  		v.reset(OpARM64MOVHstoreidx2)
 10397  		v.AddArg4(ptr, idx, val, mem)
 10398  		return true
 10399  	}
 10400  	// match: (MOVHstoreidx ptr (ADD idx idx) val mem)
 10401  	// result: (MOVHstoreidx2 ptr idx val mem)
 10402  	for {
 10403  		ptr := v_0
 10404  		if v_1.Op != OpARM64ADD {
 10405  			break
 10406  		}
 10407  		idx := v_1.Args[1]
 10408  		if idx != v_1.Args[0] {
 10409  			break
 10410  		}
 10411  		val := v_2
 10412  		mem := v_3
 10413  		v.reset(OpARM64MOVHstoreidx2)
 10414  		v.AddArg4(ptr, idx, val, mem)
 10415  		return true
 10416  	}
 10417  	// match: (MOVHstoreidx (SLLconst [1] idx) ptr val mem)
 10418  	// result: (MOVHstoreidx2 ptr idx val mem)
 10419  	for {
 10420  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 1 {
 10421  			break
 10422  		}
 10423  		idx := v_0.Args[0]
 10424  		ptr := v_1
 10425  		val := v_2
 10426  		mem := v_3
 10427  		v.reset(OpARM64MOVHstoreidx2)
 10428  		v.AddArg4(ptr, idx, val, mem)
 10429  		return true
 10430  	}
 10431  	// match: (MOVHstoreidx (ADD idx idx) ptr val mem)
 10432  	// result: (MOVHstoreidx2 ptr idx val mem)
 10433  	for {
 10434  		if v_0.Op != OpARM64ADD {
 10435  			break
 10436  		}
 10437  		idx := v_0.Args[1]
 10438  		if idx != v_0.Args[0] {
 10439  			break
 10440  		}
 10441  		ptr := v_1
 10442  		val := v_2
 10443  		mem := v_3
 10444  		v.reset(OpARM64MOVHstoreidx2)
 10445  		v.AddArg4(ptr, idx, val, mem)
 10446  		return true
 10447  	}
 10448  	// match: (MOVHstoreidx ptr idx (MOVHreg x) mem)
 10449  	// result: (MOVHstoreidx ptr idx x mem)
 10450  	for {
 10451  		ptr := v_0
 10452  		idx := v_1
 10453  		if v_2.Op != OpARM64MOVHreg {
 10454  			break
 10455  		}
 10456  		x := v_2.Args[0]
 10457  		mem := v_3
 10458  		v.reset(OpARM64MOVHstoreidx)
 10459  		v.AddArg4(ptr, idx, x, mem)
 10460  		return true
 10461  	}
 10462  	// match: (MOVHstoreidx ptr idx (MOVHUreg x) mem)
 10463  	// result: (MOVHstoreidx ptr idx x mem)
 10464  	for {
 10465  		ptr := v_0
 10466  		idx := v_1
 10467  		if v_2.Op != OpARM64MOVHUreg {
 10468  			break
 10469  		}
 10470  		x := v_2.Args[0]
 10471  		mem := v_3
 10472  		v.reset(OpARM64MOVHstoreidx)
 10473  		v.AddArg4(ptr, idx, x, mem)
 10474  		return true
 10475  	}
 10476  	// match: (MOVHstoreidx ptr idx (MOVWreg x) mem)
 10477  	// result: (MOVHstoreidx ptr idx x mem)
 10478  	for {
 10479  		ptr := v_0
 10480  		idx := v_1
 10481  		if v_2.Op != OpARM64MOVWreg {
 10482  			break
 10483  		}
 10484  		x := v_2.Args[0]
 10485  		mem := v_3
 10486  		v.reset(OpARM64MOVHstoreidx)
 10487  		v.AddArg4(ptr, idx, x, mem)
 10488  		return true
 10489  	}
 10490  	// match: (MOVHstoreidx ptr idx (MOVWUreg x) mem)
 10491  	// result: (MOVHstoreidx ptr idx x mem)
 10492  	for {
 10493  		ptr := v_0
 10494  		idx := v_1
 10495  		if v_2.Op != OpARM64MOVWUreg {
 10496  			break
 10497  		}
 10498  		x := v_2.Args[0]
 10499  		mem := v_3
 10500  		v.reset(OpARM64MOVHstoreidx)
 10501  		v.AddArg4(ptr, idx, x, mem)
 10502  		return true
 10503  	}
 10504  	return false
 10505  }
 10506  func rewriteValueARM64_OpARM64MOVHstoreidx2(v *Value) bool {
 10507  	v_3 := v.Args[3]
 10508  	v_2 := v.Args[2]
 10509  	v_1 := v.Args[1]
 10510  	v_0 := v.Args[0]
 10511  	// match: (MOVHstoreidx2 ptr (MOVDconst [c]) val mem)
 10512  	// cond: is32Bit(c<<1)
 10513  	// result: (MOVHstore [int32(c)<<1] ptr val mem)
 10514  	for {
 10515  		ptr := v_0
 10516  		if v_1.Op != OpARM64MOVDconst {
 10517  			break
 10518  		}
 10519  		c := auxIntToInt64(v_1.AuxInt)
 10520  		val := v_2
 10521  		mem := v_3
 10522  		if !(is32Bit(c << 1)) {
 10523  			break
 10524  		}
 10525  		v.reset(OpARM64MOVHstore)
 10526  		v.AuxInt = int32ToAuxInt(int32(c) << 1)
 10527  		v.AddArg3(ptr, val, mem)
 10528  		return true
 10529  	}
 10530  	// match: (MOVHstoreidx2 ptr idx (MOVHreg x) mem)
 10531  	// result: (MOVHstoreidx2 ptr idx x mem)
 10532  	for {
 10533  		ptr := v_0
 10534  		idx := v_1
 10535  		if v_2.Op != OpARM64MOVHreg {
 10536  			break
 10537  		}
 10538  		x := v_2.Args[0]
 10539  		mem := v_3
 10540  		v.reset(OpARM64MOVHstoreidx2)
 10541  		v.AddArg4(ptr, idx, x, mem)
 10542  		return true
 10543  	}
 10544  	// match: (MOVHstoreidx2 ptr idx (MOVHUreg x) mem)
 10545  	// result: (MOVHstoreidx2 ptr idx x mem)
 10546  	for {
 10547  		ptr := v_0
 10548  		idx := v_1
 10549  		if v_2.Op != OpARM64MOVHUreg {
 10550  			break
 10551  		}
 10552  		x := v_2.Args[0]
 10553  		mem := v_3
 10554  		v.reset(OpARM64MOVHstoreidx2)
 10555  		v.AddArg4(ptr, idx, x, mem)
 10556  		return true
 10557  	}
 10558  	// match: (MOVHstoreidx2 ptr idx (MOVWreg x) mem)
 10559  	// result: (MOVHstoreidx2 ptr idx x mem)
 10560  	for {
 10561  		ptr := v_0
 10562  		idx := v_1
 10563  		if v_2.Op != OpARM64MOVWreg {
 10564  			break
 10565  		}
 10566  		x := v_2.Args[0]
 10567  		mem := v_3
 10568  		v.reset(OpARM64MOVHstoreidx2)
 10569  		v.AddArg4(ptr, idx, x, mem)
 10570  		return true
 10571  	}
 10572  	// match: (MOVHstoreidx2 ptr idx (MOVWUreg x) mem)
 10573  	// result: (MOVHstoreidx2 ptr idx x mem)
 10574  	for {
 10575  		ptr := v_0
 10576  		idx := v_1
 10577  		if v_2.Op != OpARM64MOVWUreg {
 10578  			break
 10579  		}
 10580  		x := v_2.Args[0]
 10581  		mem := v_3
 10582  		v.reset(OpARM64MOVHstoreidx2)
 10583  		v.AddArg4(ptr, idx, x, mem)
 10584  		return true
 10585  	}
 10586  	return false
 10587  }
 10588  func rewriteValueARM64_OpARM64MOVWUload(v *Value) bool {
 10589  	v_1 := v.Args[1]
 10590  	v_0 := v.Args[0]
 10591  	b := v.Block
 10592  	config := b.Func.Config
 10593  	// match: (MOVWUload [off] {sym} ptr (FMOVSstore [off] {sym} ptr val _))
 10594  	// result: (FMOVSfpgp val)
 10595  	for {
 10596  		off := auxIntToInt32(v.AuxInt)
 10597  		sym := auxToSym(v.Aux)
 10598  		ptr := v_0
 10599  		if v_1.Op != OpARM64FMOVSstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
 10600  			break
 10601  		}
 10602  		val := v_1.Args[1]
 10603  		if ptr != v_1.Args[0] {
 10604  			break
 10605  		}
 10606  		v.reset(OpARM64FMOVSfpgp)
 10607  		v.AddArg(val)
 10608  		return true
 10609  	}
 10610  	// match: (MOVWUload [off1] {sym} (ADDconst [off2] ptr) mem)
 10611  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10612  	// result: (MOVWUload [off1+int32(off2)] {sym} ptr mem)
 10613  	for {
 10614  		off1 := auxIntToInt32(v.AuxInt)
 10615  		sym := auxToSym(v.Aux)
 10616  		if v_0.Op != OpARM64ADDconst {
 10617  			break
 10618  		}
 10619  		off2 := auxIntToInt64(v_0.AuxInt)
 10620  		ptr := v_0.Args[0]
 10621  		mem := v_1
 10622  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10623  			break
 10624  		}
 10625  		v.reset(OpARM64MOVWUload)
 10626  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 10627  		v.Aux = symToAux(sym)
 10628  		v.AddArg2(ptr, mem)
 10629  		return true
 10630  	}
 10631  	// match: (MOVWUload [off] {sym} (ADD ptr idx) mem)
 10632  	// cond: off == 0 && sym == nil
 10633  	// result: (MOVWUloadidx ptr idx mem)
 10634  	for {
 10635  		off := auxIntToInt32(v.AuxInt)
 10636  		sym := auxToSym(v.Aux)
 10637  		if v_0.Op != OpARM64ADD {
 10638  			break
 10639  		}
 10640  		idx := v_0.Args[1]
 10641  		ptr := v_0.Args[0]
 10642  		mem := v_1
 10643  		if !(off == 0 && sym == nil) {
 10644  			break
 10645  		}
 10646  		v.reset(OpARM64MOVWUloadidx)
 10647  		v.AddArg3(ptr, idx, mem)
 10648  		return true
 10649  	}
 10650  	// match: (MOVWUload [off] {sym} (ADDshiftLL [2] ptr idx) mem)
 10651  	// cond: off == 0 && sym == nil
 10652  	// result: (MOVWUloadidx4 ptr idx mem)
 10653  	for {
 10654  		off := auxIntToInt32(v.AuxInt)
 10655  		sym := auxToSym(v.Aux)
 10656  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
 10657  			break
 10658  		}
 10659  		idx := v_0.Args[1]
 10660  		ptr := v_0.Args[0]
 10661  		mem := v_1
 10662  		if !(off == 0 && sym == nil) {
 10663  			break
 10664  		}
 10665  		v.reset(OpARM64MOVWUloadidx4)
 10666  		v.AddArg3(ptr, idx, mem)
 10667  		return true
 10668  	}
 10669  	// match: (MOVWUload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 10670  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10671  	// result: (MOVWUload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 10672  	for {
 10673  		off1 := auxIntToInt32(v.AuxInt)
 10674  		sym1 := auxToSym(v.Aux)
 10675  		if v_0.Op != OpARM64MOVDaddr {
 10676  			break
 10677  		}
 10678  		off2 := auxIntToInt32(v_0.AuxInt)
 10679  		sym2 := auxToSym(v_0.Aux)
 10680  		ptr := v_0.Args[0]
 10681  		mem := v_1
 10682  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10683  			break
 10684  		}
 10685  		v.reset(OpARM64MOVWUload)
 10686  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10687  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10688  		v.AddArg2(ptr, mem)
 10689  		return true
 10690  	}
 10691  	// match: (MOVWUload [off] {sym} (SB) _)
 10692  	// cond: symIsRO(sym)
 10693  	// result: (MOVDconst [int64(read32(sym, int64(off), config.ctxt.Arch.ByteOrder))])
 10694  	for {
 10695  		off := auxIntToInt32(v.AuxInt)
 10696  		sym := auxToSym(v.Aux)
 10697  		if v_0.Op != OpSB || !(symIsRO(sym)) {
 10698  			break
 10699  		}
 10700  		v.reset(OpARM64MOVDconst)
 10701  		v.AuxInt = int64ToAuxInt(int64(read32(sym, int64(off), config.ctxt.Arch.ByteOrder)))
 10702  		return true
 10703  	}
 10704  	return false
 10705  }
 10706  func rewriteValueARM64_OpARM64MOVWUloadidx(v *Value) bool {
 10707  	v_2 := v.Args[2]
 10708  	v_1 := v.Args[1]
 10709  	v_0 := v.Args[0]
 10710  	// match: (MOVWUloadidx ptr (MOVDconst [c]) mem)
 10711  	// cond: is32Bit(c)
 10712  	// result: (MOVWUload [int32(c)] ptr mem)
 10713  	for {
 10714  		ptr := v_0
 10715  		if v_1.Op != OpARM64MOVDconst {
 10716  			break
 10717  		}
 10718  		c := auxIntToInt64(v_1.AuxInt)
 10719  		mem := v_2
 10720  		if !(is32Bit(c)) {
 10721  			break
 10722  		}
 10723  		v.reset(OpARM64MOVWUload)
 10724  		v.AuxInt = int32ToAuxInt(int32(c))
 10725  		v.AddArg2(ptr, mem)
 10726  		return true
 10727  	}
 10728  	// match: (MOVWUloadidx (MOVDconst [c]) ptr mem)
 10729  	// cond: is32Bit(c)
 10730  	// result: (MOVWUload [int32(c)] ptr mem)
 10731  	for {
 10732  		if v_0.Op != OpARM64MOVDconst {
 10733  			break
 10734  		}
 10735  		c := auxIntToInt64(v_0.AuxInt)
 10736  		ptr := v_1
 10737  		mem := v_2
 10738  		if !(is32Bit(c)) {
 10739  			break
 10740  		}
 10741  		v.reset(OpARM64MOVWUload)
 10742  		v.AuxInt = int32ToAuxInt(int32(c))
 10743  		v.AddArg2(ptr, mem)
 10744  		return true
 10745  	}
 10746  	// match: (MOVWUloadidx ptr (SLLconst [2] idx) mem)
 10747  	// result: (MOVWUloadidx4 ptr idx mem)
 10748  	for {
 10749  		ptr := v_0
 10750  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
 10751  			break
 10752  		}
 10753  		idx := v_1.Args[0]
 10754  		mem := v_2
 10755  		v.reset(OpARM64MOVWUloadidx4)
 10756  		v.AddArg3(ptr, idx, mem)
 10757  		return true
 10758  	}
 10759  	// match: (MOVWUloadidx (SLLconst [2] idx) ptr mem)
 10760  	// result: (MOVWUloadidx4 ptr idx mem)
 10761  	for {
 10762  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
 10763  			break
 10764  		}
 10765  		idx := v_0.Args[0]
 10766  		ptr := v_1
 10767  		mem := v_2
 10768  		v.reset(OpARM64MOVWUloadidx4)
 10769  		v.AddArg3(ptr, idx, mem)
 10770  		return true
 10771  	}
 10772  	return false
 10773  }
 10774  func rewriteValueARM64_OpARM64MOVWUloadidx4(v *Value) bool {
 10775  	v_2 := v.Args[2]
 10776  	v_1 := v.Args[1]
 10777  	v_0 := v.Args[0]
 10778  	// match: (MOVWUloadidx4 ptr (MOVDconst [c]) mem)
 10779  	// cond: is32Bit(c<<2)
 10780  	// result: (MOVWUload [int32(c)<<2] ptr mem)
 10781  	for {
 10782  		ptr := v_0
 10783  		if v_1.Op != OpARM64MOVDconst {
 10784  			break
 10785  		}
 10786  		c := auxIntToInt64(v_1.AuxInt)
 10787  		mem := v_2
 10788  		if !(is32Bit(c << 2)) {
 10789  			break
 10790  		}
 10791  		v.reset(OpARM64MOVWUload)
 10792  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
 10793  		v.AddArg2(ptr, mem)
 10794  		return true
 10795  	}
 10796  	return false
 10797  }
 10798  func rewriteValueARM64_OpARM64MOVWUreg(v *Value) bool {
 10799  	v_0 := v.Args[0]
 10800  	// match: (MOVWUreg (ANDconst [c] x))
 10801  	// result: (ANDconst [c&(1<<32-1)] x)
 10802  	for {
 10803  		if v_0.Op != OpARM64ANDconst {
 10804  			break
 10805  		}
 10806  		c := auxIntToInt64(v_0.AuxInt)
 10807  		x := v_0.Args[0]
 10808  		v.reset(OpARM64ANDconst)
 10809  		v.AuxInt = int64ToAuxInt(c & (1<<32 - 1))
 10810  		v.AddArg(x)
 10811  		return true
 10812  	}
 10813  	// match: (MOVWUreg (MOVDconst [c]))
 10814  	// result: (MOVDconst [int64(uint32(c))])
 10815  	for {
 10816  		if v_0.Op != OpARM64MOVDconst {
 10817  			break
 10818  		}
 10819  		c := auxIntToInt64(v_0.AuxInt)
 10820  		v.reset(OpARM64MOVDconst)
 10821  		v.AuxInt = int64ToAuxInt(int64(uint32(c)))
 10822  		return true
 10823  	}
 10824  	// match: (MOVWUreg x)
 10825  	// cond: v.Type.Size() <= 4
 10826  	// result: x
 10827  	for {
 10828  		x := v_0
 10829  		if !(v.Type.Size() <= 4) {
 10830  			break
 10831  		}
 10832  		v.copyOf(x)
 10833  		return true
 10834  	}
 10835  	// match: (MOVWUreg (SLLconst [lc] x))
 10836  	// cond: lc >= 32
 10837  	// result: (MOVDconst [0])
 10838  	for {
 10839  		if v_0.Op != OpARM64SLLconst {
 10840  			break
 10841  		}
 10842  		lc := auxIntToInt64(v_0.AuxInt)
 10843  		if !(lc >= 32) {
 10844  			break
 10845  		}
 10846  		v.reset(OpARM64MOVDconst)
 10847  		v.AuxInt = int64ToAuxInt(0)
 10848  		return true
 10849  	}
 10850  	// match: (MOVWUreg (SLLconst [lc] x))
 10851  	// cond: lc < 32
 10852  	// result: (UBFIZ [armBFAuxInt(lc, 32-lc)] x)
 10853  	for {
 10854  		if v_0.Op != OpARM64SLLconst {
 10855  			break
 10856  		}
 10857  		lc := auxIntToInt64(v_0.AuxInt)
 10858  		x := v_0.Args[0]
 10859  		if !(lc < 32) {
 10860  			break
 10861  		}
 10862  		v.reset(OpARM64UBFIZ)
 10863  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 32-lc))
 10864  		v.AddArg(x)
 10865  		return true
 10866  	}
 10867  	// match: (MOVWUreg (SRLconst [rc] x))
 10868  	// cond: rc < 32
 10869  	// result: (UBFX [armBFAuxInt(rc, 32)] x)
 10870  	for {
 10871  		if v_0.Op != OpARM64SRLconst {
 10872  			break
 10873  		}
 10874  		rc := auxIntToInt64(v_0.AuxInt)
 10875  		x := v_0.Args[0]
 10876  		if !(rc < 32) {
 10877  			break
 10878  		}
 10879  		v.reset(OpARM64UBFX)
 10880  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 32))
 10881  		v.AddArg(x)
 10882  		return true
 10883  	}
 10884  	// match: (MOVWUreg (UBFX [bfc] x))
 10885  	// cond: bfc.width() <= 32
 10886  	// result: (UBFX [bfc] x)
 10887  	for {
 10888  		if v_0.Op != OpARM64UBFX {
 10889  			break
 10890  		}
 10891  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 10892  		x := v_0.Args[0]
 10893  		if !(bfc.width() <= 32) {
 10894  			break
 10895  		}
 10896  		v.reset(OpARM64UBFX)
 10897  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 10898  		v.AddArg(x)
 10899  		return true
 10900  	}
 10901  	return false
 10902  }
 10903  func rewriteValueARM64_OpARM64MOVWload(v *Value) bool {
 10904  	v_1 := v.Args[1]
 10905  	v_0 := v.Args[0]
 10906  	b := v.Block
 10907  	config := b.Func.Config
 10908  	// match: (MOVWload [off1] {sym} (ADDconst [off2] ptr) mem)
 10909  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10910  	// result: (MOVWload [off1+int32(off2)] {sym} ptr mem)
 10911  	for {
 10912  		off1 := auxIntToInt32(v.AuxInt)
 10913  		sym := auxToSym(v.Aux)
 10914  		if v_0.Op != OpARM64ADDconst {
 10915  			break
 10916  		}
 10917  		off2 := auxIntToInt64(v_0.AuxInt)
 10918  		ptr := v_0.Args[0]
 10919  		mem := v_1
 10920  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10921  			break
 10922  		}
 10923  		v.reset(OpARM64MOVWload)
 10924  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 10925  		v.Aux = symToAux(sym)
 10926  		v.AddArg2(ptr, mem)
 10927  		return true
 10928  	}
 10929  	// match: (MOVWload [off] {sym} (ADD ptr idx) mem)
 10930  	// cond: off == 0 && sym == nil
 10931  	// result: (MOVWloadidx ptr idx mem)
 10932  	for {
 10933  		off := auxIntToInt32(v.AuxInt)
 10934  		sym := auxToSym(v.Aux)
 10935  		if v_0.Op != OpARM64ADD {
 10936  			break
 10937  		}
 10938  		idx := v_0.Args[1]
 10939  		ptr := v_0.Args[0]
 10940  		mem := v_1
 10941  		if !(off == 0 && sym == nil) {
 10942  			break
 10943  		}
 10944  		v.reset(OpARM64MOVWloadidx)
 10945  		v.AddArg3(ptr, idx, mem)
 10946  		return true
 10947  	}
 10948  	// match: (MOVWload [off] {sym} (ADDshiftLL [2] ptr idx) mem)
 10949  	// cond: off == 0 && sym == nil
 10950  	// result: (MOVWloadidx4 ptr idx mem)
 10951  	for {
 10952  		off := auxIntToInt32(v.AuxInt)
 10953  		sym := auxToSym(v.Aux)
 10954  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
 10955  			break
 10956  		}
 10957  		idx := v_0.Args[1]
 10958  		ptr := v_0.Args[0]
 10959  		mem := v_1
 10960  		if !(off == 0 && sym == nil) {
 10961  			break
 10962  		}
 10963  		v.reset(OpARM64MOVWloadidx4)
 10964  		v.AddArg3(ptr, idx, mem)
 10965  		return true
 10966  	}
 10967  	// match: (MOVWload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 10968  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10969  	// result: (MOVWload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 10970  	for {
 10971  		off1 := auxIntToInt32(v.AuxInt)
 10972  		sym1 := auxToSym(v.Aux)
 10973  		if v_0.Op != OpARM64MOVDaddr {
 10974  			break
 10975  		}
 10976  		off2 := auxIntToInt32(v_0.AuxInt)
 10977  		sym2 := auxToSym(v_0.Aux)
 10978  		ptr := v_0.Args[0]
 10979  		mem := v_1
 10980  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10981  			break
 10982  		}
 10983  		v.reset(OpARM64MOVWload)
 10984  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10985  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10986  		v.AddArg2(ptr, mem)
 10987  		return true
 10988  	}
 10989  	// match: (MOVWload [off] {sym} (SB) _)
 10990  	// cond: symIsRO(sym)
 10991  	// result: (MOVDconst [int64(int32(read32(sym, int64(off), config.ctxt.Arch.ByteOrder)))])
 10992  	for {
 10993  		off := auxIntToInt32(v.AuxInt)
 10994  		sym := auxToSym(v.Aux)
 10995  		if v_0.Op != OpSB || !(symIsRO(sym)) {
 10996  			break
 10997  		}
 10998  		v.reset(OpARM64MOVDconst)
 10999  		v.AuxInt = int64ToAuxInt(int64(int32(read32(sym, int64(off), config.ctxt.Arch.ByteOrder))))
 11000  		return true
 11001  	}
 11002  	return false
 11003  }
 11004  func rewriteValueARM64_OpARM64MOVWloadidx(v *Value) bool {
 11005  	v_2 := v.Args[2]
 11006  	v_1 := v.Args[1]
 11007  	v_0 := v.Args[0]
 11008  	// match: (MOVWloadidx ptr (MOVDconst [c]) mem)
 11009  	// cond: is32Bit(c)
 11010  	// result: (MOVWload [int32(c)] ptr mem)
 11011  	for {
 11012  		ptr := v_0
 11013  		if v_1.Op != OpARM64MOVDconst {
 11014  			break
 11015  		}
 11016  		c := auxIntToInt64(v_1.AuxInt)
 11017  		mem := v_2
 11018  		if !(is32Bit(c)) {
 11019  			break
 11020  		}
 11021  		v.reset(OpARM64MOVWload)
 11022  		v.AuxInt = int32ToAuxInt(int32(c))
 11023  		v.AddArg2(ptr, mem)
 11024  		return true
 11025  	}
 11026  	// match: (MOVWloadidx (MOVDconst [c]) ptr mem)
 11027  	// cond: is32Bit(c)
 11028  	// result: (MOVWload [int32(c)] ptr mem)
 11029  	for {
 11030  		if v_0.Op != OpARM64MOVDconst {
 11031  			break
 11032  		}
 11033  		c := auxIntToInt64(v_0.AuxInt)
 11034  		ptr := v_1
 11035  		mem := v_2
 11036  		if !(is32Bit(c)) {
 11037  			break
 11038  		}
 11039  		v.reset(OpARM64MOVWload)
 11040  		v.AuxInt = int32ToAuxInt(int32(c))
 11041  		v.AddArg2(ptr, mem)
 11042  		return true
 11043  	}
 11044  	// match: (MOVWloadidx ptr (SLLconst [2] idx) mem)
 11045  	// result: (MOVWloadidx4 ptr idx mem)
 11046  	for {
 11047  		ptr := v_0
 11048  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
 11049  			break
 11050  		}
 11051  		idx := v_1.Args[0]
 11052  		mem := v_2
 11053  		v.reset(OpARM64MOVWloadidx4)
 11054  		v.AddArg3(ptr, idx, mem)
 11055  		return true
 11056  	}
 11057  	// match: (MOVWloadidx (SLLconst [2] idx) ptr mem)
 11058  	// result: (MOVWloadidx4 ptr idx mem)
 11059  	for {
 11060  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
 11061  			break
 11062  		}
 11063  		idx := v_0.Args[0]
 11064  		ptr := v_1
 11065  		mem := v_2
 11066  		v.reset(OpARM64MOVWloadidx4)
 11067  		v.AddArg3(ptr, idx, mem)
 11068  		return true
 11069  	}
 11070  	return false
 11071  }
 11072  func rewriteValueARM64_OpARM64MOVWloadidx4(v *Value) bool {
 11073  	v_2 := v.Args[2]
 11074  	v_1 := v.Args[1]
 11075  	v_0 := v.Args[0]
 11076  	// match: (MOVWloadidx4 ptr (MOVDconst [c]) mem)
 11077  	// cond: is32Bit(c<<2)
 11078  	// result: (MOVWload [int32(c)<<2] ptr mem)
 11079  	for {
 11080  		ptr := v_0
 11081  		if v_1.Op != OpARM64MOVDconst {
 11082  			break
 11083  		}
 11084  		c := auxIntToInt64(v_1.AuxInt)
 11085  		mem := v_2
 11086  		if !(is32Bit(c << 2)) {
 11087  			break
 11088  		}
 11089  		v.reset(OpARM64MOVWload)
 11090  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
 11091  		v.AddArg2(ptr, mem)
 11092  		return true
 11093  	}
 11094  	return false
 11095  }
 11096  func rewriteValueARM64_OpARM64MOVWreg(v *Value) bool {
 11097  	v_0 := v.Args[0]
 11098  	// match: (MOVWreg (MOVDconst [c]))
 11099  	// result: (MOVDconst [int64(int32(c))])
 11100  	for {
 11101  		if v_0.Op != OpARM64MOVDconst {
 11102  			break
 11103  		}
 11104  		c := auxIntToInt64(v_0.AuxInt)
 11105  		v.reset(OpARM64MOVDconst)
 11106  		v.AuxInt = int64ToAuxInt(int64(int32(c)))
 11107  		return true
 11108  	}
 11109  	// match: (MOVWreg x)
 11110  	// cond: v.Type.Size() <= 4
 11111  	// result: x
 11112  	for {
 11113  		x := v_0
 11114  		if !(v.Type.Size() <= 4) {
 11115  			break
 11116  		}
 11117  		v.copyOf(x)
 11118  		return true
 11119  	}
 11120  	// match: (MOVWreg <t> (ANDconst x [c]))
 11121  	// cond: uint64(c) & uint64(0xffffffff80000000) == 0
 11122  	// result: (ANDconst <t> x [c])
 11123  	for {
 11124  		t := v.Type
 11125  		if v_0.Op != OpARM64ANDconst {
 11126  			break
 11127  		}
 11128  		c := auxIntToInt64(v_0.AuxInt)
 11129  		x := v_0.Args[0]
 11130  		if !(uint64(c)&uint64(0xffffffff80000000) == 0) {
 11131  			break
 11132  		}
 11133  		v.reset(OpARM64ANDconst)
 11134  		v.Type = t
 11135  		v.AuxInt = int64ToAuxInt(c)
 11136  		v.AddArg(x)
 11137  		return true
 11138  	}
 11139  	// match: (MOVWreg (SLLconst [lc] x))
 11140  	// cond: lc < 32
 11141  	// result: (SBFIZ [armBFAuxInt(lc, 32-lc)] x)
 11142  	for {
 11143  		if v_0.Op != OpARM64SLLconst {
 11144  			break
 11145  		}
 11146  		lc := auxIntToInt64(v_0.AuxInt)
 11147  		x := v_0.Args[0]
 11148  		if !(lc < 32) {
 11149  			break
 11150  		}
 11151  		v.reset(OpARM64SBFIZ)
 11152  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 32-lc))
 11153  		v.AddArg(x)
 11154  		return true
 11155  	}
 11156  	// match: (MOVWreg (SBFX [bfc] x))
 11157  	// cond: bfc.width() <= 32
 11158  	// result: (SBFX [bfc] x)
 11159  	for {
 11160  		if v_0.Op != OpARM64SBFX {
 11161  			break
 11162  		}
 11163  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 11164  		x := v_0.Args[0]
 11165  		if !(bfc.width() <= 32) {
 11166  			break
 11167  		}
 11168  		v.reset(OpARM64SBFX)
 11169  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 11170  		v.AddArg(x)
 11171  		return true
 11172  	}
 11173  	return false
 11174  }
 11175  func rewriteValueARM64_OpARM64MOVWstore(v *Value) bool {
 11176  	v_2 := v.Args[2]
 11177  	v_1 := v.Args[1]
 11178  	v_0 := v.Args[0]
 11179  	b := v.Block
 11180  	config := b.Func.Config
 11181  	// match: (MOVWstore [off] {sym} ptr (FMOVSfpgp val) mem)
 11182  	// result: (FMOVSstore [off] {sym} ptr val mem)
 11183  	for {
 11184  		off := auxIntToInt32(v.AuxInt)
 11185  		sym := auxToSym(v.Aux)
 11186  		ptr := v_0
 11187  		if v_1.Op != OpARM64FMOVSfpgp {
 11188  			break
 11189  		}
 11190  		val := v_1.Args[0]
 11191  		mem := v_2
 11192  		v.reset(OpARM64FMOVSstore)
 11193  		v.AuxInt = int32ToAuxInt(off)
 11194  		v.Aux = symToAux(sym)
 11195  		v.AddArg3(ptr, val, mem)
 11196  		return true
 11197  	}
 11198  	// match: (MOVWstore [off1] {sym} (ADDconst [off2] ptr) val mem)
 11199  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11200  	// result: (MOVWstore [off1+int32(off2)] {sym} ptr val mem)
 11201  	for {
 11202  		off1 := auxIntToInt32(v.AuxInt)
 11203  		sym := auxToSym(v.Aux)
 11204  		if v_0.Op != OpARM64ADDconst {
 11205  			break
 11206  		}
 11207  		off2 := auxIntToInt64(v_0.AuxInt)
 11208  		ptr := v_0.Args[0]
 11209  		val := v_1
 11210  		mem := v_2
 11211  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11212  			break
 11213  		}
 11214  		v.reset(OpARM64MOVWstore)
 11215  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 11216  		v.Aux = symToAux(sym)
 11217  		v.AddArg3(ptr, val, mem)
 11218  		return true
 11219  	}
 11220  	// match: (MOVWstore [off] {sym} (ADD ptr idx) val mem)
 11221  	// cond: off == 0 && sym == nil
 11222  	// result: (MOVWstoreidx ptr idx val mem)
 11223  	for {
 11224  		off := auxIntToInt32(v.AuxInt)
 11225  		sym := auxToSym(v.Aux)
 11226  		if v_0.Op != OpARM64ADD {
 11227  			break
 11228  		}
 11229  		idx := v_0.Args[1]
 11230  		ptr := v_0.Args[0]
 11231  		val := v_1
 11232  		mem := v_2
 11233  		if !(off == 0 && sym == nil) {
 11234  			break
 11235  		}
 11236  		v.reset(OpARM64MOVWstoreidx)
 11237  		v.AddArg4(ptr, idx, val, mem)
 11238  		return true
 11239  	}
 11240  	// match: (MOVWstore [off] {sym} (ADDshiftLL [2] ptr idx) val mem)
 11241  	// cond: off == 0 && sym == nil
 11242  	// result: (MOVWstoreidx4 ptr idx val mem)
 11243  	for {
 11244  		off := auxIntToInt32(v.AuxInt)
 11245  		sym := auxToSym(v.Aux)
 11246  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
 11247  			break
 11248  		}
 11249  		idx := v_0.Args[1]
 11250  		ptr := v_0.Args[0]
 11251  		val := v_1
 11252  		mem := v_2
 11253  		if !(off == 0 && sym == nil) {
 11254  			break
 11255  		}
 11256  		v.reset(OpARM64MOVWstoreidx4)
 11257  		v.AddArg4(ptr, idx, val, mem)
 11258  		return true
 11259  	}
 11260  	// match: (MOVWstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
 11261  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11262  	// result: (MOVWstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
 11263  	for {
 11264  		off1 := auxIntToInt32(v.AuxInt)
 11265  		sym1 := auxToSym(v.Aux)
 11266  		if v_0.Op != OpARM64MOVDaddr {
 11267  			break
 11268  		}
 11269  		off2 := auxIntToInt32(v_0.AuxInt)
 11270  		sym2 := auxToSym(v_0.Aux)
 11271  		ptr := v_0.Args[0]
 11272  		val := v_1
 11273  		mem := v_2
 11274  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11275  			break
 11276  		}
 11277  		v.reset(OpARM64MOVWstore)
 11278  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11279  		v.Aux = symToAux(mergeSym(sym1, sym2))
 11280  		v.AddArg3(ptr, val, mem)
 11281  		return true
 11282  	}
 11283  	// match: (MOVWstore [off] {sym} ptr (MOVWreg x) mem)
 11284  	// result: (MOVWstore [off] {sym} ptr x mem)
 11285  	for {
 11286  		off := auxIntToInt32(v.AuxInt)
 11287  		sym := auxToSym(v.Aux)
 11288  		ptr := v_0
 11289  		if v_1.Op != OpARM64MOVWreg {
 11290  			break
 11291  		}
 11292  		x := v_1.Args[0]
 11293  		mem := v_2
 11294  		v.reset(OpARM64MOVWstore)
 11295  		v.AuxInt = int32ToAuxInt(off)
 11296  		v.Aux = symToAux(sym)
 11297  		v.AddArg3(ptr, x, mem)
 11298  		return true
 11299  	}
 11300  	// match: (MOVWstore [off] {sym} ptr (MOVWUreg x) mem)
 11301  	// result: (MOVWstore [off] {sym} ptr x mem)
 11302  	for {
 11303  		off := auxIntToInt32(v.AuxInt)
 11304  		sym := auxToSym(v.Aux)
 11305  		ptr := v_0
 11306  		if v_1.Op != OpARM64MOVWUreg {
 11307  			break
 11308  		}
 11309  		x := v_1.Args[0]
 11310  		mem := v_2
 11311  		v.reset(OpARM64MOVWstore)
 11312  		v.AuxInt = int32ToAuxInt(off)
 11313  		v.Aux = symToAux(sym)
 11314  		v.AddArg3(ptr, x, mem)
 11315  		return true
 11316  	}
 11317  	return false
 11318  }
 11319  func rewriteValueARM64_OpARM64MOVWstoreidx(v *Value) bool {
 11320  	v_3 := v.Args[3]
 11321  	v_2 := v.Args[2]
 11322  	v_1 := v.Args[1]
 11323  	v_0 := v.Args[0]
 11324  	// match: (MOVWstoreidx ptr (MOVDconst [c]) val mem)
 11325  	// cond: is32Bit(c)
 11326  	// result: (MOVWstore [int32(c)] ptr val mem)
 11327  	for {
 11328  		ptr := v_0
 11329  		if v_1.Op != OpARM64MOVDconst {
 11330  			break
 11331  		}
 11332  		c := auxIntToInt64(v_1.AuxInt)
 11333  		val := v_2
 11334  		mem := v_3
 11335  		if !(is32Bit(c)) {
 11336  			break
 11337  		}
 11338  		v.reset(OpARM64MOVWstore)
 11339  		v.AuxInt = int32ToAuxInt(int32(c))
 11340  		v.AddArg3(ptr, val, mem)
 11341  		return true
 11342  	}
 11343  	// match: (MOVWstoreidx (MOVDconst [c]) idx val mem)
 11344  	// cond: is32Bit(c)
 11345  	// result: (MOVWstore [int32(c)] idx val mem)
 11346  	for {
 11347  		if v_0.Op != OpARM64MOVDconst {
 11348  			break
 11349  		}
 11350  		c := auxIntToInt64(v_0.AuxInt)
 11351  		idx := v_1
 11352  		val := v_2
 11353  		mem := v_3
 11354  		if !(is32Bit(c)) {
 11355  			break
 11356  		}
 11357  		v.reset(OpARM64MOVWstore)
 11358  		v.AuxInt = int32ToAuxInt(int32(c))
 11359  		v.AddArg3(idx, val, mem)
 11360  		return true
 11361  	}
 11362  	// match: (MOVWstoreidx ptr (SLLconst [2] idx) val mem)
 11363  	// result: (MOVWstoreidx4 ptr idx val mem)
 11364  	for {
 11365  		ptr := v_0
 11366  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
 11367  			break
 11368  		}
 11369  		idx := v_1.Args[0]
 11370  		val := v_2
 11371  		mem := v_3
 11372  		v.reset(OpARM64MOVWstoreidx4)
 11373  		v.AddArg4(ptr, idx, val, mem)
 11374  		return true
 11375  	}
 11376  	// match: (MOVWstoreidx (SLLconst [2] idx) ptr val mem)
 11377  	// result: (MOVWstoreidx4 ptr idx val mem)
 11378  	for {
 11379  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
 11380  			break
 11381  		}
 11382  		idx := v_0.Args[0]
 11383  		ptr := v_1
 11384  		val := v_2
 11385  		mem := v_3
 11386  		v.reset(OpARM64MOVWstoreidx4)
 11387  		v.AddArg4(ptr, idx, val, mem)
 11388  		return true
 11389  	}
 11390  	// match: (MOVWstoreidx ptr idx (MOVWreg x) mem)
 11391  	// result: (MOVWstoreidx ptr idx x mem)
 11392  	for {
 11393  		ptr := v_0
 11394  		idx := v_1
 11395  		if v_2.Op != OpARM64MOVWreg {
 11396  			break
 11397  		}
 11398  		x := v_2.Args[0]
 11399  		mem := v_3
 11400  		v.reset(OpARM64MOVWstoreidx)
 11401  		v.AddArg4(ptr, idx, x, mem)
 11402  		return true
 11403  	}
 11404  	// match: (MOVWstoreidx ptr idx (MOVWUreg x) mem)
 11405  	// result: (MOVWstoreidx ptr idx x mem)
 11406  	for {
 11407  		ptr := v_0
 11408  		idx := v_1
 11409  		if v_2.Op != OpARM64MOVWUreg {
 11410  			break
 11411  		}
 11412  		x := v_2.Args[0]
 11413  		mem := v_3
 11414  		v.reset(OpARM64MOVWstoreidx)
 11415  		v.AddArg4(ptr, idx, x, mem)
 11416  		return true
 11417  	}
 11418  	return false
 11419  }
 11420  func rewriteValueARM64_OpARM64MOVWstoreidx4(v *Value) bool {
 11421  	v_3 := v.Args[3]
 11422  	v_2 := v.Args[2]
 11423  	v_1 := v.Args[1]
 11424  	v_0 := v.Args[0]
 11425  	// match: (MOVWstoreidx4 ptr (MOVDconst [c]) val mem)
 11426  	// cond: is32Bit(c<<2)
 11427  	// result: (MOVWstore [int32(c)<<2] ptr val mem)
 11428  	for {
 11429  		ptr := v_0
 11430  		if v_1.Op != OpARM64MOVDconst {
 11431  			break
 11432  		}
 11433  		c := auxIntToInt64(v_1.AuxInt)
 11434  		val := v_2
 11435  		mem := v_3
 11436  		if !(is32Bit(c << 2)) {
 11437  			break
 11438  		}
 11439  		v.reset(OpARM64MOVWstore)
 11440  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
 11441  		v.AddArg3(ptr, val, mem)
 11442  		return true
 11443  	}
 11444  	// match: (MOVWstoreidx4 ptr idx (MOVWreg x) mem)
 11445  	// result: (MOVWstoreidx4 ptr idx x mem)
 11446  	for {
 11447  		ptr := v_0
 11448  		idx := v_1
 11449  		if v_2.Op != OpARM64MOVWreg {
 11450  			break
 11451  		}
 11452  		x := v_2.Args[0]
 11453  		mem := v_3
 11454  		v.reset(OpARM64MOVWstoreidx4)
 11455  		v.AddArg4(ptr, idx, x, mem)
 11456  		return true
 11457  	}
 11458  	// match: (MOVWstoreidx4 ptr idx (MOVWUreg x) mem)
 11459  	// result: (MOVWstoreidx4 ptr idx x mem)
 11460  	for {
 11461  		ptr := v_0
 11462  		idx := v_1
 11463  		if v_2.Op != OpARM64MOVWUreg {
 11464  			break
 11465  		}
 11466  		x := v_2.Args[0]
 11467  		mem := v_3
 11468  		v.reset(OpARM64MOVWstoreidx4)
 11469  		v.AddArg4(ptr, idx, x, mem)
 11470  		return true
 11471  	}
 11472  	return false
 11473  }
 11474  func rewriteValueARM64_OpARM64MSUB(v *Value) bool {
 11475  	v_2 := v.Args[2]
 11476  	v_1 := v.Args[1]
 11477  	v_0 := v.Args[0]
 11478  	b := v.Block
 11479  	// match: (MSUB a x (MOVDconst [-1]))
 11480  	// result: (ADD a x)
 11481  	for {
 11482  		a := v_0
 11483  		x := v_1
 11484  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != -1 {
 11485  			break
 11486  		}
 11487  		v.reset(OpARM64ADD)
 11488  		v.AddArg2(a, x)
 11489  		return true
 11490  	}
 11491  	// match: (MSUB a _ (MOVDconst [0]))
 11492  	// result: a
 11493  	for {
 11494  		a := v_0
 11495  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 0 {
 11496  			break
 11497  		}
 11498  		v.copyOf(a)
 11499  		return true
 11500  	}
 11501  	// match: (MSUB a x (MOVDconst [1]))
 11502  	// result: (SUB a x)
 11503  	for {
 11504  		a := v_0
 11505  		x := v_1
 11506  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 1 {
 11507  			break
 11508  		}
 11509  		v.reset(OpARM64SUB)
 11510  		v.AddArg2(a, x)
 11511  		return true
 11512  	}
 11513  	// match: (MSUB a x (MOVDconst [c]))
 11514  	// cond: isPowerOfTwo(c)
 11515  	// result: (SUBshiftLL a x [log64(c)])
 11516  	for {
 11517  		a := v_0
 11518  		x := v_1
 11519  		if v_2.Op != OpARM64MOVDconst {
 11520  			break
 11521  		}
 11522  		c := auxIntToInt64(v_2.AuxInt)
 11523  		if !(isPowerOfTwo(c)) {
 11524  			break
 11525  		}
 11526  		v.reset(OpARM64SUBshiftLL)
 11527  		v.AuxInt = int64ToAuxInt(log64(c))
 11528  		v.AddArg2(a, x)
 11529  		return true
 11530  	}
 11531  	// match: (MSUB a x (MOVDconst [c]))
 11532  	// cond: isPowerOfTwo(c-1) && c>=3
 11533  	// result: (SUB a (ADDshiftLL <x.Type> x x [log64(c-1)]))
 11534  	for {
 11535  		a := v_0
 11536  		x := v_1
 11537  		if v_2.Op != OpARM64MOVDconst {
 11538  			break
 11539  		}
 11540  		c := auxIntToInt64(v_2.AuxInt)
 11541  		if !(isPowerOfTwo(c-1) && c >= 3) {
 11542  			break
 11543  		}
 11544  		v.reset(OpARM64SUB)
 11545  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 11546  		v0.AuxInt = int64ToAuxInt(log64(c - 1))
 11547  		v0.AddArg2(x, x)
 11548  		v.AddArg2(a, v0)
 11549  		return true
 11550  	}
 11551  	// match: (MSUB a x (MOVDconst [c]))
 11552  	// cond: isPowerOfTwo(c+1) && c>=7
 11553  	// result: (ADD a (SUBshiftLL <x.Type> x x [log64(c+1)]))
 11554  	for {
 11555  		a := v_0
 11556  		x := v_1
 11557  		if v_2.Op != OpARM64MOVDconst {
 11558  			break
 11559  		}
 11560  		c := auxIntToInt64(v_2.AuxInt)
 11561  		if !(isPowerOfTwo(c+1) && c >= 7) {
 11562  			break
 11563  		}
 11564  		v.reset(OpARM64ADD)
 11565  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 11566  		v0.AuxInt = int64ToAuxInt(log64(c + 1))
 11567  		v0.AddArg2(x, x)
 11568  		v.AddArg2(a, v0)
 11569  		return true
 11570  	}
 11571  	// match: (MSUB a x (MOVDconst [c]))
 11572  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
 11573  	// result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
 11574  	for {
 11575  		a := v_0
 11576  		x := v_1
 11577  		if v_2.Op != OpARM64MOVDconst {
 11578  			break
 11579  		}
 11580  		c := auxIntToInt64(v_2.AuxInt)
 11581  		if !(c%3 == 0 && isPowerOfTwo(c/3)) {
 11582  			break
 11583  		}
 11584  		v.reset(OpARM64ADDshiftLL)
 11585  		v.AuxInt = int64ToAuxInt(log64(c / 3))
 11586  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 11587  		v0.AuxInt = int64ToAuxInt(2)
 11588  		v0.AddArg2(x, x)
 11589  		v.AddArg2(a, v0)
 11590  		return true
 11591  	}
 11592  	// match: (MSUB a x (MOVDconst [c]))
 11593  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
 11594  	// result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
 11595  	for {
 11596  		a := v_0
 11597  		x := v_1
 11598  		if v_2.Op != OpARM64MOVDconst {
 11599  			break
 11600  		}
 11601  		c := auxIntToInt64(v_2.AuxInt)
 11602  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
 11603  			break
 11604  		}
 11605  		v.reset(OpARM64SUBshiftLL)
 11606  		v.AuxInt = int64ToAuxInt(log64(c / 5))
 11607  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 11608  		v0.AuxInt = int64ToAuxInt(2)
 11609  		v0.AddArg2(x, x)
 11610  		v.AddArg2(a, v0)
 11611  		return true
 11612  	}
 11613  	// match: (MSUB a x (MOVDconst [c]))
 11614  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
 11615  	// result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
 11616  	for {
 11617  		a := v_0
 11618  		x := v_1
 11619  		if v_2.Op != OpARM64MOVDconst {
 11620  			break
 11621  		}
 11622  		c := auxIntToInt64(v_2.AuxInt)
 11623  		if !(c%7 == 0 && isPowerOfTwo(c/7)) {
 11624  			break
 11625  		}
 11626  		v.reset(OpARM64ADDshiftLL)
 11627  		v.AuxInt = int64ToAuxInt(log64(c / 7))
 11628  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 11629  		v0.AuxInt = int64ToAuxInt(3)
 11630  		v0.AddArg2(x, x)
 11631  		v.AddArg2(a, v0)
 11632  		return true
 11633  	}
 11634  	// match: (MSUB a x (MOVDconst [c]))
 11635  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
 11636  	// result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
 11637  	for {
 11638  		a := v_0
 11639  		x := v_1
 11640  		if v_2.Op != OpARM64MOVDconst {
 11641  			break
 11642  		}
 11643  		c := auxIntToInt64(v_2.AuxInt)
 11644  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
 11645  			break
 11646  		}
 11647  		v.reset(OpARM64SUBshiftLL)
 11648  		v.AuxInt = int64ToAuxInt(log64(c / 9))
 11649  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 11650  		v0.AuxInt = int64ToAuxInt(3)
 11651  		v0.AddArg2(x, x)
 11652  		v.AddArg2(a, v0)
 11653  		return true
 11654  	}
 11655  	// match: (MSUB a (MOVDconst [-1]) x)
 11656  	// result: (ADD a x)
 11657  	for {
 11658  		a := v_0
 11659  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
 11660  			break
 11661  		}
 11662  		x := v_2
 11663  		v.reset(OpARM64ADD)
 11664  		v.AddArg2(a, x)
 11665  		return true
 11666  	}
 11667  	// match: (MSUB a (MOVDconst [0]) _)
 11668  	// result: a
 11669  	for {
 11670  		a := v_0
 11671  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
 11672  			break
 11673  		}
 11674  		v.copyOf(a)
 11675  		return true
 11676  	}
 11677  	// match: (MSUB a (MOVDconst [1]) x)
 11678  	// result: (SUB a x)
 11679  	for {
 11680  		a := v_0
 11681  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 11682  			break
 11683  		}
 11684  		x := v_2
 11685  		v.reset(OpARM64SUB)
 11686  		v.AddArg2(a, x)
 11687  		return true
 11688  	}
 11689  	// match: (MSUB a (MOVDconst [c]) x)
 11690  	// cond: isPowerOfTwo(c)
 11691  	// result: (SUBshiftLL a x [log64(c)])
 11692  	for {
 11693  		a := v_0
 11694  		if v_1.Op != OpARM64MOVDconst {
 11695  			break
 11696  		}
 11697  		c := auxIntToInt64(v_1.AuxInt)
 11698  		x := v_2
 11699  		if !(isPowerOfTwo(c)) {
 11700  			break
 11701  		}
 11702  		v.reset(OpARM64SUBshiftLL)
 11703  		v.AuxInt = int64ToAuxInt(log64(c))
 11704  		v.AddArg2(a, x)
 11705  		return true
 11706  	}
 11707  	// match: (MSUB a (MOVDconst [c]) x)
 11708  	// cond: isPowerOfTwo(c-1) && c>=3
 11709  	// result: (SUB a (ADDshiftLL <x.Type> x x [log64(c-1)]))
 11710  	for {
 11711  		a := v_0
 11712  		if v_1.Op != OpARM64MOVDconst {
 11713  			break
 11714  		}
 11715  		c := auxIntToInt64(v_1.AuxInt)
 11716  		x := v_2
 11717  		if !(isPowerOfTwo(c-1) && c >= 3) {
 11718  			break
 11719  		}
 11720  		v.reset(OpARM64SUB)
 11721  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 11722  		v0.AuxInt = int64ToAuxInt(log64(c - 1))
 11723  		v0.AddArg2(x, x)
 11724  		v.AddArg2(a, v0)
 11725  		return true
 11726  	}
 11727  	// match: (MSUB a (MOVDconst [c]) x)
 11728  	// cond: isPowerOfTwo(c+1) && c>=7
 11729  	// result: (ADD a (SUBshiftLL <x.Type> x x [log64(c+1)]))
 11730  	for {
 11731  		a := v_0
 11732  		if v_1.Op != OpARM64MOVDconst {
 11733  			break
 11734  		}
 11735  		c := auxIntToInt64(v_1.AuxInt)
 11736  		x := v_2
 11737  		if !(isPowerOfTwo(c+1) && c >= 7) {
 11738  			break
 11739  		}
 11740  		v.reset(OpARM64ADD)
 11741  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 11742  		v0.AuxInt = int64ToAuxInt(log64(c + 1))
 11743  		v0.AddArg2(x, x)
 11744  		v.AddArg2(a, v0)
 11745  		return true
 11746  	}
 11747  	// match: (MSUB a (MOVDconst [c]) x)
 11748  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
 11749  	// result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
 11750  	for {
 11751  		a := v_0
 11752  		if v_1.Op != OpARM64MOVDconst {
 11753  			break
 11754  		}
 11755  		c := auxIntToInt64(v_1.AuxInt)
 11756  		x := v_2
 11757  		if !(c%3 == 0 && isPowerOfTwo(c/3)) {
 11758  			break
 11759  		}
 11760  		v.reset(OpARM64ADDshiftLL)
 11761  		v.AuxInt = int64ToAuxInt(log64(c / 3))
 11762  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 11763  		v0.AuxInt = int64ToAuxInt(2)
 11764  		v0.AddArg2(x, x)
 11765  		v.AddArg2(a, v0)
 11766  		return true
 11767  	}
 11768  	// match: (MSUB a (MOVDconst [c]) x)
 11769  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
 11770  	// result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
 11771  	for {
 11772  		a := v_0
 11773  		if v_1.Op != OpARM64MOVDconst {
 11774  			break
 11775  		}
 11776  		c := auxIntToInt64(v_1.AuxInt)
 11777  		x := v_2
 11778  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
 11779  			break
 11780  		}
 11781  		v.reset(OpARM64SUBshiftLL)
 11782  		v.AuxInt = int64ToAuxInt(log64(c / 5))
 11783  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 11784  		v0.AuxInt = int64ToAuxInt(2)
 11785  		v0.AddArg2(x, x)
 11786  		v.AddArg2(a, v0)
 11787  		return true
 11788  	}
 11789  	// match: (MSUB a (MOVDconst [c]) x)
 11790  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
 11791  	// result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
 11792  	for {
 11793  		a := v_0
 11794  		if v_1.Op != OpARM64MOVDconst {
 11795  			break
 11796  		}
 11797  		c := auxIntToInt64(v_1.AuxInt)
 11798  		x := v_2
 11799  		if !(c%7 == 0 && isPowerOfTwo(c/7)) {
 11800  			break
 11801  		}
 11802  		v.reset(OpARM64ADDshiftLL)
 11803  		v.AuxInt = int64ToAuxInt(log64(c / 7))
 11804  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 11805  		v0.AuxInt = int64ToAuxInt(3)
 11806  		v0.AddArg2(x, x)
 11807  		v.AddArg2(a, v0)
 11808  		return true
 11809  	}
 11810  	// match: (MSUB a (MOVDconst [c]) x)
 11811  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
 11812  	// result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
 11813  	for {
 11814  		a := v_0
 11815  		if v_1.Op != OpARM64MOVDconst {
 11816  			break
 11817  		}
 11818  		c := auxIntToInt64(v_1.AuxInt)
 11819  		x := v_2
 11820  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
 11821  			break
 11822  		}
 11823  		v.reset(OpARM64SUBshiftLL)
 11824  		v.AuxInt = int64ToAuxInt(log64(c / 9))
 11825  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 11826  		v0.AuxInt = int64ToAuxInt(3)
 11827  		v0.AddArg2(x, x)
 11828  		v.AddArg2(a, v0)
 11829  		return true
 11830  	}
 11831  	// match: (MSUB (MOVDconst [c]) x y)
 11832  	// result: (ADDconst [c] (MNEG <x.Type> x y))
 11833  	for {
 11834  		if v_0.Op != OpARM64MOVDconst {
 11835  			break
 11836  		}
 11837  		c := auxIntToInt64(v_0.AuxInt)
 11838  		x := v_1
 11839  		y := v_2
 11840  		v.reset(OpARM64ADDconst)
 11841  		v.AuxInt = int64ToAuxInt(c)
 11842  		v0 := b.NewValue0(v.Pos, OpARM64MNEG, x.Type)
 11843  		v0.AddArg2(x, y)
 11844  		v.AddArg(v0)
 11845  		return true
 11846  	}
 11847  	// match: (MSUB a (MOVDconst [c]) (MOVDconst [d]))
 11848  	// result: (SUBconst [c*d] a)
 11849  	for {
 11850  		a := v_0
 11851  		if v_1.Op != OpARM64MOVDconst {
 11852  			break
 11853  		}
 11854  		c := auxIntToInt64(v_1.AuxInt)
 11855  		if v_2.Op != OpARM64MOVDconst {
 11856  			break
 11857  		}
 11858  		d := auxIntToInt64(v_2.AuxInt)
 11859  		v.reset(OpARM64SUBconst)
 11860  		v.AuxInt = int64ToAuxInt(c * d)
 11861  		v.AddArg(a)
 11862  		return true
 11863  	}
 11864  	return false
 11865  }
 11866  func rewriteValueARM64_OpARM64MSUBW(v *Value) bool {
 11867  	v_2 := v.Args[2]
 11868  	v_1 := v.Args[1]
 11869  	v_0 := v.Args[0]
 11870  	b := v.Block
 11871  	// match: (MSUBW a x (MOVDconst [c]))
 11872  	// cond: int32(c)==-1
 11873  	// result: (MOVWUreg (ADD <a.Type> a x))
 11874  	for {
 11875  		a := v_0
 11876  		x := v_1
 11877  		if v_2.Op != OpARM64MOVDconst {
 11878  			break
 11879  		}
 11880  		c := auxIntToInt64(v_2.AuxInt)
 11881  		if !(int32(c) == -1) {
 11882  			break
 11883  		}
 11884  		v.reset(OpARM64MOVWUreg)
 11885  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
 11886  		v0.AddArg2(a, x)
 11887  		v.AddArg(v0)
 11888  		return true
 11889  	}
 11890  	// match: (MSUBW a _ (MOVDconst [c]))
 11891  	// cond: int32(c)==0
 11892  	// result: (MOVWUreg a)
 11893  	for {
 11894  		a := v_0
 11895  		if v_2.Op != OpARM64MOVDconst {
 11896  			break
 11897  		}
 11898  		c := auxIntToInt64(v_2.AuxInt)
 11899  		if !(int32(c) == 0) {
 11900  			break
 11901  		}
 11902  		v.reset(OpARM64MOVWUreg)
 11903  		v.AddArg(a)
 11904  		return true
 11905  	}
 11906  	// match: (MSUBW a x (MOVDconst [c]))
 11907  	// cond: int32(c)==1
 11908  	// result: (MOVWUreg (SUB <a.Type> a x))
 11909  	for {
 11910  		a := v_0
 11911  		x := v_1
 11912  		if v_2.Op != OpARM64MOVDconst {
 11913  			break
 11914  		}
 11915  		c := auxIntToInt64(v_2.AuxInt)
 11916  		if !(int32(c) == 1) {
 11917  			break
 11918  		}
 11919  		v.reset(OpARM64MOVWUreg)
 11920  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
 11921  		v0.AddArg2(a, x)
 11922  		v.AddArg(v0)
 11923  		return true
 11924  	}
 11925  	// match: (MSUBW a x (MOVDconst [c]))
 11926  	// cond: isPowerOfTwo(c)
 11927  	// result: (MOVWUreg (SUBshiftLL <a.Type> a x [log64(c)]))
 11928  	for {
 11929  		a := v_0
 11930  		x := v_1
 11931  		if v_2.Op != OpARM64MOVDconst {
 11932  			break
 11933  		}
 11934  		c := auxIntToInt64(v_2.AuxInt)
 11935  		if !(isPowerOfTwo(c)) {
 11936  			break
 11937  		}
 11938  		v.reset(OpARM64MOVWUreg)
 11939  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 11940  		v0.AuxInt = int64ToAuxInt(log64(c))
 11941  		v0.AddArg2(a, x)
 11942  		v.AddArg(v0)
 11943  		return true
 11944  	}
 11945  	// match: (MSUBW a x (MOVDconst [c]))
 11946  	// cond: isPowerOfTwo(c-1) && int32(c)>=3
 11947  	// result: (MOVWUreg (SUB <a.Type> a (ADDshiftLL <x.Type> x x [log64(c-1)])))
 11948  	for {
 11949  		a := v_0
 11950  		x := v_1
 11951  		if v_2.Op != OpARM64MOVDconst {
 11952  			break
 11953  		}
 11954  		c := auxIntToInt64(v_2.AuxInt)
 11955  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
 11956  			break
 11957  		}
 11958  		v.reset(OpARM64MOVWUreg)
 11959  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
 11960  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 11961  		v1.AuxInt = int64ToAuxInt(log64(c - 1))
 11962  		v1.AddArg2(x, x)
 11963  		v0.AddArg2(a, v1)
 11964  		v.AddArg(v0)
 11965  		return true
 11966  	}
 11967  	// match: (MSUBW a x (MOVDconst [c]))
 11968  	// cond: isPowerOfTwo(c+1) && int32(c)>=7
 11969  	// result: (MOVWUreg (ADD <a.Type> a (SUBshiftLL <x.Type> x x [log64(c+1)])))
 11970  	for {
 11971  		a := v_0
 11972  		x := v_1
 11973  		if v_2.Op != OpARM64MOVDconst {
 11974  			break
 11975  		}
 11976  		c := auxIntToInt64(v_2.AuxInt)
 11977  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
 11978  			break
 11979  		}
 11980  		v.reset(OpARM64MOVWUreg)
 11981  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
 11982  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 11983  		v1.AuxInt = int64ToAuxInt(log64(c + 1))
 11984  		v1.AddArg2(x, x)
 11985  		v0.AddArg2(a, v1)
 11986  		v.AddArg(v0)
 11987  		return true
 11988  	}
 11989  	// match: (MSUBW a x (MOVDconst [c]))
 11990  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
 11991  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)]))
 11992  	for {
 11993  		a := v_0
 11994  		x := v_1
 11995  		if v_2.Op != OpARM64MOVDconst {
 11996  			break
 11997  		}
 11998  		c := auxIntToInt64(v_2.AuxInt)
 11999  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
 12000  			break
 12001  		}
 12002  		v.reset(OpARM64MOVWUreg)
 12003  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
 12004  		v0.AuxInt = int64ToAuxInt(log64(c / 3))
 12005  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 12006  		v1.AuxInt = int64ToAuxInt(2)
 12007  		v1.AddArg2(x, x)
 12008  		v0.AddArg2(a, v1)
 12009  		v.AddArg(v0)
 12010  		return true
 12011  	}
 12012  	// match: (MSUBW a x (MOVDconst [c]))
 12013  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
 12014  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)]))
 12015  	for {
 12016  		a := v_0
 12017  		x := v_1
 12018  		if v_2.Op != OpARM64MOVDconst {
 12019  			break
 12020  		}
 12021  		c := auxIntToInt64(v_2.AuxInt)
 12022  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
 12023  			break
 12024  		}
 12025  		v.reset(OpARM64MOVWUreg)
 12026  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 12027  		v0.AuxInt = int64ToAuxInt(log64(c / 5))
 12028  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12029  		v1.AuxInt = int64ToAuxInt(2)
 12030  		v1.AddArg2(x, x)
 12031  		v0.AddArg2(a, v1)
 12032  		v.AddArg(v0)
 12033  		return true
 12034  	}
 12035  	// match: (MSUBW a x (MOVDconst [c]))
 12036  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
 12037  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)]))
 12038  	for {
 12039  		a := v_0
 12040  		x := v_1
 12041  		if v_2.Op != OpARM64MOVDconst {
 12042  			break
 12043  		}
 12044  		c := auxIntToInt64(v_2.AuxInt)
 12045  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
 12046  			break
 12047  		}
 12048  		v.reset(OpARM64MOVWUreg)
 12049  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
 12050  		v0.AuxInt = int64ToAuxInt(log64(c / 7))
 12051  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 12052  		v1.AuxInt = int64ToAuxInt(3)
 12053  		v1.AddArg2(x, x)
 12054  		v0.AddArg2(a, v1)
 12055  		v.AddArg(v0)
 12056  		return true
 12057  	}
 12058  	// match: (MSUBW a x (MOVDconst [c]))
 12059  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
 12060  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)]))
 12061  	for {
 12062  		a := v_0
 12063  		x := v_1
 12064  		if v_2.Op != OpARM64MOVDconst {
 12065  			break
 12066  		}
 12067  		c := auxIntToInt64(v_2.AuxInt)
 12068  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
 12069  			break
 12070  		}
 12071  		v.reset(OpARM64MOVWUreg)
 12072  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 12073  		v0.AuxInt = int64ToAuxInt(log64(c / 9))
 12074  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12075  		v1.AuxInt = int64ToAuxInt(3)
 12076  		v1.AddArg2(x, x)
 12077  		v0.AddArg2(a, v1)
 12078  		v.AddArg(v0)
 12079  		return true
 12080  	}
 12081  	// match: (MSUBW a (MOVDconst [c]) x)
 12082  	// cond: int32(c)==-1
 12083  	// result: (MOVWUreg (ADD <a.Type> a x))
 12084  	for {
 12085  		a := v_0
 12086  		if v_1.Op != OpARM64MOVDconst {
 12087  			break
 12088  		}
 12089  		c := auxIntToInt64(v_1.AuxInt)
 12090  		x := v_2
 12091  		if !(int32(c) == -1) {
 12092  			break
 12093  		}
 12094  		v.reset(OpARM64MOVWUreg)
 12095  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
 12096  		v0.AddArg2(a, x)
 12097  		v.AddArg(v0)
 12098  		return true
 12099  	}
 12100  	// match: (MSUBW a (MOVDconst [c]) _)
 12101  	// cond: int32(c)==0
 12102  	// result: (MOVWUreg a)
 12103  	for {
 12104  		a := v_0
 12105  		if v_1.Op != OpARM64MOVDconst {
 12106  			break
 12107  		}
 12108  		c := auxIntToInt64(v_1.AuxInt)
 12109  		if !(int32(c) == 0) {
 12110  			break
 12111  		}
 12112  		v.reset(OpARM64MOVWUreg)
 12113  		v.AddArg(a)
 12114  		return true
 12115  	}
 12116  	// match: (MSUBW a (MOVDconst [c]) x)
 12117  	// cond: int32(c)==1
 12118  	// result: (MOVWUreg (SUB <a.Type> a x))
 12119  	for {
 12120  		a := v_0
 12121  		if v_1.Op != OpARM64MOVDconst {
 12122  			break
 12123  		}
 12124  		c := auxIntToInt64(v_1.AuxInt)
 12125  		x := v_2
 12126  		if !(int32(c) == 1) {
 12127  			break
 12128  		}
 12129  		v.reset(OpARM64MOVWUreg)
 12130  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
 12131  		v0.AddArg2(a, x)
 12132  		v.AddArg(v0)
 12133  		return true
 12134  	}
 12135  	// match: (MSUBW a (MOVDconst [c]) x)
 12136  	// cond: isPowerOfTwo(c)
 12137  	// result: (MOVWUreg (SUBshiftLL <a.Type> a x [log64(c)]))
 12138  	for {
 12139  		a := v_0
 12140  		if v_1.Op != OpARM64MOVDconst {
 12141  			break
 12142  		}
 12143  		c := auxIntToInt64(v_1.AuxInt)
 12144  		x := v_2
 12145  		if !(isPowerOfTwo(c)) {
 12146  			break
 12147  		}
 12148  		v.reset(OpARM64MOVWUreg)
 12149  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 12150  		v0.AuxInt = int64ToAuxInt(log64(c))
 12151  		v0.AddArg2(a, x)
 12152  		v.AddArg(v0)
 12153  		return true
 12154  	}
 12155  	// match: (MSUBW a (MOVDconst [c]) x)
 12156  	// cond: isPowerOfTwo(c-1) && int32(c)>=3
 12157  	// result: (MOVWUreg (SUB <a.Type> a (ADDshiftLL <x.Type> x x [log64(c-1)])))
 12158  	for {
 12159  		a := v_0
 12160  		if v_1.Op != OpARM64MOVDconst {
 12161  			break
 12162  		}
 12163  		c := auxIntToInt64(v_1.AuxInt)
 12164  		x := v_2
 12165  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
 12166  			break
 12167  		}
 12168  		v.reset(OpARM64MOVWUreg)
 12169  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
 12170  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12171  		v1.AuxInt = int64ToAuxInt(log64(c - 1))
 12172  		v1.AddArg2(x, x)
 12173  		v0.AddArg2(a, v1)
 12174  		v.AddArg(v0)
 12175  		return true
 12176  	}
 12177  	// match: (MSUBW a (MOVDconst [c]) x)
 12178  	// cond: isPowerOfTwo(c+1) && int32(c)>=7
 12179  	// result: (MOVWUreg (ADD <a.Type> a (SUBshiftLL <x.Type> x x [log64(c+1)])))
 12180  	for {
 12181  		a := v_0
 12182  		if v_1.Op != OpARM64MOVDconst {
 12183  			break
 12184  		}
 12185  		c := auxIntToInt64(v_1.AuxInt)
 12186  		x := v_2
 12187  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
 12188  			break
 12189  		}
 12190  		v.reset(OpARM64MOVWUreg)
 12191  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
 12192  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 12193  		v1.AuxInt = int64ToAuxInt(log64(c + 1))
 12194  		v1.AddArg2(x, x)
 12195  		v0.AddArg2(a, v1)
 12196  		v.AddArg(v0)
 12197  		return true
 12198  	}
 12199  	// match: (MSUBW a (MOVDconst [c]) x)
 12200  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
 12201  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)]))
 12202  	for {
 12203  		a := v_0
 12204  		if v_1.Op != OpARM64MOVDconst {
 12205  			break
 12206  		}
 12207  		c := auxIntToInt64(v_1.AuxInt)
 12208  		x := v_2
 12209  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
 12210  			break
 12211  		}
 12212  		v.reset(OpARM64MOVWUreg)
 12213  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
 12214  		v0.AuxInt = int64ToAuxInt(log64(c / 3))
 12215  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 12216  		v1.AuxInt = int64ToAuxInt(2)
 12217  		v1.AddArg2(x, x)
 12218  		v0.AddArg2(a, v1)
 12219  		v.AddArg(v0)
 12220  		return true
 12221  	}
 12222  	// match: (MSUBW a (MOVDconst [c]) x)
 12223  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
 12224  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)]))
 12225  	for {
 12226  		a := v_0
 12227  		if v_1.Op != OpARM64MOVDconst {
 12228  			break
 12229  		}
 12230  		c := auxIntToInt64(v_1.AuxInt)
 12231  		x := v_2
 12232  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
 12233  			break
 12234  		}
 12235  		v.reset(OpARM64MOVWUreg)
 12236  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 12237  		v0.AuxInt = int64ToAuxInt(log64(c / 5))
 12238  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12239  		v1.AuxInt = int64ToAuxInt(2)
 12240  		v1.AddArg2(x, x)
 12241  		v0.AddArg2(a, v1)
 12242  		v.AddArg(v0)
 12243  		return true
 12244  	}
 12245  	// match: (MSUBW a (MOVDconst [c]) x)
 12246  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
 12247  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)]))
 12248  	for {
 12249  		a := v_0
 12250  		if v_1.Op != OpARM64MOVDconst {
 12251  			break
 12252  		}
 12253  		c := auxIntToInt64(v_1.AuxInt)
 12254  		x := v_2
 12255  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
 12256  			break
 12257  		}
 12258  		v.reset(OpARM64MOVWUreg)
 12259  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
 12260  		v0.AuxInt = int64ToAuxInt(log64(c / 7))
 12261  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 12262  		v1.AuxInt = int64ToAuxInt(3)
 12263  		v1.AddArg2(x, x)
 12264  		v0.AddArg2(a, v1)
 12265  		v.AddArg(v0)
 12266  		return true
 12267  	}
 12268  	// match: (MSUBW a (MOVDconst [c]) x)
 12269  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
 12270  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)]))
 12271  	for {
 12272  		a := v_0
 12273  		if v_1.Op != OpARM64MOVDconst {
 12274  			break
 12275  		}
 12276  		c := auxIntToInt64(v_1.AuxInt)
 12277  		x := v_2
 12278  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
 12279  			break
 12280  		}
 12281  		v.reset(OpARM64MOVWUreg)
 12282  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 12283  		v0.AuxInt = int64ToAuxInt(log64(c / 9))
 12284  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12285  		v1.AuxInt = int64ToAuxInt(3)
 12286  		v1.AddArg2(x, x)
 12287  		v0.AddArg2(a, v1)
 12288  		v.AddArg(v0)
 12289  		return true
 12290  	}
 12291  	// match: (MSUBW (MOVDconst [c]) x y)
 12292  	// result: (MOVWUreg (ADDconst <x.Type> [c] (MNEGW <x.Type> x y)))
 12293  	for {
 12294  		if v_0.Op != OpARM64MOVDconst {
 12295  			break
 12296  		}
 12297  		c := auxIntToInt64(v_0.AuxInt)
 12298  		x := v_1
 12299  		y := v_2
 12300  		v.reset(OpARM64MOVWUreg)
 12301  		v0 := b.NewValue0(v.Pos, OpARM64ADDconst, x.Type)
 12302  		v0.AuxInt = int64ToAuxInt(c)
 12303  		v1 := b.NewValue0(v.Pos, OpARM64MNEGW, x.Type)
 12304  		v1.AddArg2(x, y)
 12305  		v0.AddArg(v1)
 12306  		v.AddArg(v0)
 12307  		return true
 12308  	}
 12309  	// match: (MSUBW a (MOVDconst [c]) (MOVDconst [d]))
 12310  	// result: (MOVWUreg (SUBconst <a.Type> [c*d] a))
 12311  	for {
 12312  		a := v_0
 12313  		if v_1.Op != OpARM64MOVDconst {
 12314  			break
 12315  		}
 12316  		c := auxIntToInt64(v_1.AuxInt)
 12317  		if v_2.Op != OpARM64MOVDconst {
 12318  			break
 12319  		}
 12320  		d := auxIntToInt64(v_2.AuxInt)
 12321  		v.reset(OpARM64MOVWUreg)
 12322  		v0 := b.NewValue0(v.Pos, OpARM64SUBconst, a.Type)
 12323  		v0.AuxInt = int64ToAuxInt(c * d)
 12324  		v0.AddArg(a)
 12325  		v.AddArg(v0)
 12326  		return true
 12327  	}
 12328  	return false
 12329  }
 12330  func rewriteValueARM64_OpARM64MUL(v *Value) bool {
 12331  	v_1 := v.Args[1]
 12332  	v_0 := v.Args[0]
 12333  	b := v.Block
 12334  	// match: (MUL (NEG x) y)
 12335  	// result: (MNEG x y)
 12336  	for {
 12337  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12338  			if v_0.Op != OpARM64NEG {
 12339  				continue
 12340  			}
 12341  			x := v_0.Args[0]
 12342  			y := v_1
 12343  			v.reset(OpARM64MNEG)
 12344  			v.AddArg2(x, y)
 12345  			return true
 12346  		}
 12347  		break
 12348  	}
 12349  	// match: (MUL x (MOVDconst [-1]))
 12350  	// result: (NEG x)
 12351  	for {
 12352  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12353  			x := v_0
 12354  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
 12355  				continue
 12356  			}
 12357  			v.reset(OpARM64NEG)
 12358  			v.AddArg(x)
 12359  			return true
 12360  		}
 12361  		break
 12362  	}
 12363  	// match: (MUL _ (MOVDconst [0]))
 12364  	// result: (MOVDconst [0])
 12365  	for {
 12366  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12367  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
 12368  				continue
 12369  			}
 12370  			v.reset(OpARM64MOVDconst)
 12371  			v.AuxInt = int64ToAuxInt(0)
 12372  			return true
 12373  		}
 12374  		break
 12375  	}
 12376  	// match: (MUL x (MOVDconst [1]))
 12377  	// result: x
 12378  	for {
 12379  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12380  			x := v_0
 12381  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 12382  				continue
 12383  			}
 12384  			v.copyOf(x)
 12385  			return true
 12386  		}
 12387  		break
 12388  	}
 12389  	// match: (MUL x (MOVDconst [c]))
 12390  	// cond: isPowerOfTwo(c)
 12391  	// result: (SLLconst [log64(c)] x)
 12392  	for {
 12393  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12394  			x := v_0
 12395  			if v_1.Op != OpARM64MOVDconst {
 12396  				continue
 12397  			}
 12398  			c := auxIntToInt64(v_1.AuxInt)
 12399  			if !(isPowerOfTwo(c)) {
 12400  				continue
 12401  			}
 12402  			v.reset(OpARM64SLLconst)
 12403  			v.AuxInt = int64ToAuxInt(log64(c))
 12404  			v.AddArg(x)
 12405  			return true
 12406  		}
 12407  		break
 12408  	}
 12409  	// match: (MUL x (MOVDconst [c]))
 12410  	// cond: isPowerOfTwo(c-1) && c >= 3
 12411  	// result: (ADDshiftLL x x [log64(c-1)])
 12412  	for {
 12413  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12414  			x := v_0
 12415  			if v_1.Op != OpARM64MOVDconst {
 12416  				continue
 12417  			}
 12418  			c := auxIntToInt64(v_1.AuxInt)
 12419  			if !(isPowerOfTwo(c-1) && c >= 3) {
 12420  				continue
 12421  			}
 12422  			v.reset(OpARM64ADDshiftLL)
 12423  			v.AuxInt = int64ToAuxInt(log64(c - 1))
 12424  			v.AddArg2(x, x)
 12425  			return true
 12426  		}
 12427  		break
 12428  	}
 12429  	// match: (MUL x (MOVDconst [c]))
 12430  	// cond: isPowerOfTwo(c+1) && c >= 7
 12431  	// result: (ADDshiftLL (NEG <x.Type> x) x [log64(c+1)])
 12432  	for {
 12433  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12434  			x := v_0
 12435  			if v_1.Op != OpARM64MOVDconst {
 12436  				continue
 12437  			}
 12438  			c := auxIntToInt64(v_1.AuxInt)
 12439  			if !(isPowerOfTwo(c+1) && c >= 7) {
 12440  				continue
 12441  			}
 12442  			v.reset(OpARM64ADDshiftLL)
 12443  			v.AuxInt = int64ToAuxInt(log64(c + 1))
 12444  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
 12445  			v0.AddArg(x)
 12446  			v.AddArg2(v0, x)
 12447  			return true
 12448  		}
 12449  		break
 12450  	}
 12451  	// match: (MUL x (MOVDconst [c]))
 12452  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
 12453  	// result: (SLLconst [log64(c/3)] (ADDshiftLL <x.Type> x x [1]))
 12454  	for {
 12455  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12456  			x := v_0
 12457  			if v_1.Op != OpARM64MOVDconst {
 12458  				continue
 12459  			}
 12460  			c := auxIntToInt64(v_1.AuxInt)
 12461  			if !(c%3 == 0 && isPowerOfTwo(c/3)) {
 12462  				continue
 12463  			}
 12464  			v.reset(OpARM64SLLconst)
 12465  			v.AuxInt = int64ToAuxInt(log64(c / 3))
 12466  			v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12467  			v0.AuxInt = int64ToAuxInt(1)
 12468  			v0.AddArg2(x, x)
 12469  			v.AddArg(v0)
 12470  			return true
 12471  		}
 12472  		break
 12473  	}
 12474  	// match: (MUL x (MOVDconst [c]))
 12475  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
 12476  	// result: (SLLconst [log64(c/5)] (ADDshiftLL <x.Type> x x [2]))
 12477  	for {
 12478  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12479  			x := v_0
 12480  			if v_1.Op != OpARM64MOVDconst {
 12481  				continue
 12482  			}
 12483  			c := auxIntToInt64(v_1.AuxInt)
 12484  			if !(c%5 == 0 && isPowerOfTwo(c/5)) {
 12485  				continue
 12486  			}
 12487  			v.reset(OpARM64SLLconst)
 12488  			v.AuxInt = int64ToAuxInt(log64(c / 5))
 12489  			v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12490  			v0.AuxInt = int64ToAuxInt(2)
 12491  			v0.AddArg2(x, x)
 12492  			v.AddArg(v0)
 12493  			return true
 12494  		}
 12495  		break
 12496  	}
 12497  	// match: (MUL x (MOVDconst [c]))
 12498  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
 12499  	// result: (SLLconst [log64(c/7)] (ADDshiftLL <x.Type> (NEG <x.Type> x) x [3]))
 12500  	for {
 12501  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12502  			x := v_0
 12503  			if v_1.Op != OpARM64MOVDconst {
 12504  				continue
 12505  			}
 12506  			c := auxIntToInt64(v_1.AuxInt)
 12507  			if !(c%7 == 0 && isPowerOfTwo(c/7)) {
 12508  				continue
 12509  			}
 12510  			v.reset(OpARM64SLLconst)
 12511  			v.AuxInt = int64ToAuxInt(log64(c / 7))
 12512  			v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12513  			v0.AuxInt = int64ToAuxInt(3)
 12514  			v1 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
 12515  			v1.AddArg(x)
 12516  			v0.AddArg2(v1, x)
 12517  			v.AddArg(v0)
 12518  			return true
 12519  		}
 12520  		break
 12521  	}
 12522  	// match: (MUL x (MOVDconst [c]))
 12523  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
 12524  	// result: (SLLconst [log64(c/9)] (ADDshiftLL <x.Type> x x [3]))
 12525  	for {
 12526  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12527  			x := v_0
 12528  			if v_1.Op != OpARM64MOVDconst {
 12529  				continue
 12530  			}
 12531  			c := auxIntToInt64(v_1.AuxInt)
 12532  			if !(c%9 == 0 && isPowerOfTwo(c/9)) {
 12533  				continue
 12534  			}
 12535  			v.reset(OpARM64SLLconst)
 12536  			v.AuxInt = int64ToAuxInt(log64(c / 9))
 12537  			v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12538  			v0.AuxInt = int64ToAuxInt(3)
 12539  			v0.AddArg2(x, x)
 12540  			v.AddArg(v0)
 12541  			return true
 12542  		}
 12543  		break
 12544  	}
 12545  	// match: (MUL (MOVDconst [c]) (MOVDconst [d]))
 12546  	// result: (MOVDconst [c*d])
 12547  	for {
 12548  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12549  			if v_0.Op != OpARM64MOVDconst {
 12550  				continue
 12551  			}
 12552  			c := auxIntToInt64(v_0.AuxInt)
 12553  			if v_1.Op != OpARM64MOVDconst {
 12554  				continue
 12555  			}
 12556  			d := auxIntToInt64(v_1.AuxInt)
 12557  			v.reset(OpARM64MOVDconst)
 12558  			v.AuxInt = int64ToAuxInt(c * d)
 12559  			return true
 12560  		}
 12561  		break
 12562  	}
 12563  	return false
 12564  }
 12565  func rewriteValueARM64_OpARM64MULW(v *Value) bool {
 12566  	v_1 := v.Args[1]
 12567  	v_0 := v.Args[0]
 12568  	b := v.Block
 12569  	// match: (MULW (NEG x) y)
 12570  	// result: (MNEGW x y)
 12571  	for {
 12572  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12573  			if v_0.Op != OpARM64NEG {
 12574  				continue
 12575  			}
 12576  			x := v_0.Args[0]
 12577  			y := v_1
 12578  			v.reset(OpARM64MNEGW)
 12579  			v.AddArg2(x, y)
 12580  			return true
 12581  		}
 12582  		break
 12583  	}
 12584  	// match: (MULW x (MOVDconst [c]))
 12585  	// cond: int32(c)==-1
 12586  	// result: (MOVWUreg (NEG <x.Type> x))
 12587  	for {
 12588  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12589  			x := v_0
 12590  			if v_1.Op != OpARM64MOVDconst {
 12591  				continue
 12592  			}
 12593  			c := auxIntToInt64(v_1.AuxInt)
 12594  			if !(int32(c) == -1) {
 12595  				continue
 12596  			}
 12597  			v.reset(OpARM64MOVWUreg)
 12598  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
 12599  			v0.AddArg(x)
 12600  			v.AddArg(v0)
 12601  			return true
 12602  		}
 12603  		break
 12604  	}
 12605  	// match: (MULW _ (MOVDconst [c]))
 12606  	// cond: int32(c)==0
 12607  	// result: (MOVDconst [0])
 12608  	for {
 12609  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12610  			if v_1.Op != OpARM64MOVDconst {
 12611  				continue
 12612  			}
 12613  			c := auxIntToInt64(v_1.AuxInt)
 12614  			if !(int32(c) == 0) {
 12615  				continue
 12616  			}
 12617  			v.reset(OpARM64MOVDconst)
 12618  			v.AuxInt = int64ToAuxInt(0)
 12619  			return true
 12620  		}
 12621  		break
 12622  	}
 12623  	// match: (MULW x (MOVDconst [c]))
 12624  	// cond: int32(c)==1
 12625  	// result: (MOVWUreg x)
 12626  	for {
 12627  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12628  			x := v_0
 12629  			if v_1.Op != OpARM64MOVDconst {
 12630  				continue
 12631  			}
 12632  			c := auxIntToInt64(v_1.AuxInt)
 12633  			if !(int32(c) == 1) {
 12634  				continue
 12635  			}
 12636  			v.reset(OpARM64MOVWUreg)
 12637  			v.AddArg(x)
 12638  			return true
 12639  		}
 12640  		break
 12641  	}
 12642  	// match: (MULW x (MOVDconst [c]))
 12643  	// cond: isPowerOfTwo(c)
 12644  	// result: (MOVWUreg (SLLconst <x.Type> [log64(c)] x))
 12645  	for {
 12646  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12647  			x := v_0
 12648  			if v_1.Op != OpARM64MOVDconst {
 12649  				continue
 12650  			}
 12651  			c := auxIntToInt64(v_1.AuxInt)
 12652  			if !(isPowerOfTwo(c)) {
 12653  				continue
 12654  			}
 12655  			v.reset(OpARM64MOVWUreg)
 12656  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 12657  			v0.AuxInt = int64ToAuxInt(log64(c))
 12658  			v0.AddArg(x)
 12659  			v.AddArg(v0)
 12660  			return true
 12661  		}
 12662  		break
 12663  	}
 12664  	// match: (MULW x (MOVDconst [c]))
 12665  	// cond: isPowerOfTwo(c-1) && int32(c) >= 3
 12666  	// result: (MOVWUreg (ADDshiftLL <x.Type> x x [log64(c-1)]))
 12667  	for {
 12668  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12669  			x := v_0
 12670  			if v_1.Op != OpARM64MOVDconst {
 12671  				continue
 12672  			}
 12673  			c := auxIntToInt64(v_1.AuxInt)
 12674  			if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
 12675  				continue
 12676  			}
 12677  			v.reset(OpARM64MOVWUreg)
 12678  			v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12679  			v0.AuxInt = int64ToAuxInt(log64(c - 1))
 12680  			v0.AddArg2(x, x)
 12681  			v.AddArg(v0)
 12682  			return true
 12683  		}
 12684  		break
 12685  	}
 12686  	// match: (MULW x (MOVDconst [c]))
 12687  	// cond: isPowerOfTwo(c+1) && int32(c) >= 7
 12688  	// result: (MOVWUreg (ADDshiftLL <x.Type> (NEG <x.Type> x) x [log64(c+1)]))
 12689  	for {
 12690  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12691  			x := v_0
 12692  			if v_1.Op != OpARM64MOVDconst {
 12693  				continue
 12694  			}
 12695  			c := auxIntToInt64(v_1.AuxInt)
 12696  			if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
 12697  				continue
 12698  			}
 12699  			v.reset(OpARM64MOVWUreg)
 12700  			v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12701  			v0.AuxInt = int64ToAuxInt(log64(c + 1))
 12702  			v1 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
 12703  			v1.AddArg(x)
 12704  			v0.AddArg2(v1, x)
 12705  			v.AddArg(v0)
 12706  			return true
 12707  		}
 12708  		break
 12709  	}
 12710  	// match: (MULW x (MOVDconst [c]))
 12711  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
 12712  	// result: (MOVWUreg (SLLconst <x.Type> [log64(c/3)] (ADDshiftLL <x.Type> x x [1])))
 12713  	for {
 12714  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12715  			x := v_0
 12716  			if v_1.Op != OpARM64MOVDconst {
 12717  				continue
 12718  			}
 12719  			c := auxIntToInt64(v_1.AuxInt)
 12720  			if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
 12721  				continue
 12722  			}
 12723  			v.reset(OpARM64MOVWUreg)
 12724  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 12725  			v0.AuxInt = int64ToAuxInt(log64(c / 3))
 12726  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12727  			v1.AuxInt = int64ToAuxInt(1)
 12728  			v1.AddArg2(x, x)
 12729  			v0.AddArg(v1)
 12730  			v.AddArg(v0)
 12731  			return true
 12732  		}
 12733  		break
 12734  	}
 12735  	// match: (MULW x (MOVDconst [c]))
 12736  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
 12737  	// result: (MOVWUreg (SLLconst <x.Type> [log64(c/5)] (ADDshiftLL <x.Type> x x [2])))
 12738  	for {
 12739  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12740  			x := v_0
 12741  			if v_1.Op != OpARM64MOVDconst {
 12742  				continue
 12743  			}
 12744  			c := auxIntToInt64(v_1.AuxInt)
 12745  			if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
 12746  				continue
 12747  			}
 12748  			v.reset(OpARM64MOVWUreg)
 12749  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 12750  			v0.AuxInt = int64ToAuxInt(log64(c / 5))
 12751  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12752  			v1.AuxInt = int64ToAuxInt(2)
 12753  			v1.AddArg2(x, x)
 12754  			v0.AddArg(v1)
 12755  			v.AddArg(v0)
 12756  			return true
 12757  		}
 12758  		break
 12759  	}
 12760  	// match: (MULW x (MOVDconst [c]))
 12761  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
 12762  	// result: (MOVWUreg (SLLconst <x.Type> [log64(c/7)] (ADDshiftLL <x.Type> (NEG <x.Type> x) x [3])))
 12763  	for {
 12764  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12765  			x := v_0
 12766  			if v_1.Op != OpARM64MOVDconst {
 12767  				continue
 12768  			}
 12769  			c := auxIntToInt64(v_1.AuxInt)
 12770  			if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
 12771  				continue
 12772  			}
 12773  			v.reset(OpARM64MOVWUreg)
 12774  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 12775  			v0.AuxInt = int64ToAuxInt(log64(c / 7))
 12776  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12777  			v1.AuxInt = int64ToAuxInt(3)
 12778  			v2 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
 12779  			v2.AddArg(x)
 12780  			v1.AddArg2(v2, x)
 12781  			v0.AddArg(v1)
 12782  			v.AddArg(v0)
 12783  			return true
 12784  		}
 12785  		break
 12786  	}
 12787  	// match: (MULW x (MOVDconst [c]))
 12788  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
 12789  	// result: (MOVWUreg (SLLconst <x.Type> [log64(c/9)] (ADDshiftLL <x.Type> x x [3])))
 12790  	for {
 12791  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12792  			x := v_0
 12793  			if v_1.Op != OpARM64MOVDconst {
 12794  				continue
 12795  			}
 12796  			c := auxIntToInt64(v_1.AuxInt)
 12797  			if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
 12798  				continue
 12799  			}
 12800  			v.reset(OpARM64MOVWUreg)
 12801  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 12802  			v0.AuxInt = int64ToAuxInt(log64(c / 9))
 12803  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12804  			v1.AuxInt = int64ToAuxInt(3)
 12805  			v1.AddArg2(x, x)
 12806  			v0.AddArg(v1)
 12807  			v.AddArg(v0)
 12808  			return true
 12809  		}
 12810  		break
 12811  	}
 12812  	// match: (MULW (MOVDconst [c]) (MOVDconst [d]))
 12813  	// result: (MOVDconst [int64(uint32(c*d))])
 12814  	for {
 12815  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12816  			if v_0.Op != OpARM64MOVDconst {
 12817  				continue
 12818  			}
 12819  			c := auxIntToInt64(v_0.AuxInt)
 12820  			if v_1.Op != OpARM64MOVDconst {
 12821  				continue
 12822  			}
 12823  			d := auxIntToInt64(v_1.AuxInt)
 12824  			v.reset(OpARM64MOVDconst)
 12825  			v.AuxInt = int64ToAuxInt(int64(uint32(c * d)))
 12826  			return true
 12827  		}
 12828  		break
 12829  	}
 12830  	return false
 12831  }
 12832  func rewriteValueARM64_OpARM64MVN(v *Value) bool {
 12833  	v_0 := v.Args[0]
 12834  	// match: (MVN (XOR x y))
 12835  	// result: (EON x y)
 12836  	for {
 12837  		if v_0.Op != OpARM64XOR {
 12838  			break
 12839  		}
 12840  		y := v_0.Args[1]
 12841  		x := v_0.Args[0]
 12842  		v.reset(OpARM64EON)
 12843  		v.AddArg2(x, y)
 12844  		return true
 12845  	}
 12846  	// match: (MVN (MOVDconst [c]))
 12847  	// result: (MOVDconst [^c])
 12848  	for {
 12849  		if v_0.Op != OpARM64MOVDconst {
 12850  			break
 12851  		}
 12852  		c := auxIntToInt64(v_0.AuxInt)
 12853  		v.reset(OpARM64MOVDconst)
 12854  		v.AuxInt = int64ToAuxInt(^c)
 12855  		return true
 12856  	}
 12857  	// match: (MVN x:(SLLconst [c] y))
 12858  	// cond: clobberIfDead(x)
 12859  	// result: (MVNshiftLL [c] y)
 12860  	for {
 12861  		x := v_0
 12862  		if x.Op != OpARM64SLLconst {
 12863  			break
 12864  		}
 12865  		c := auxIntToInt64(x.AuxInt)
 12866  		y := x.Args[0]
 12867  		if !(clobberIfDead(x)) {
 12868  			break
 12869  		}
 12870  		v.reset(OpARM64MVNshiftLL)
 12871  		v.AuxInt = int64ToAuxInt(c)
 12872  		v.AddArg(y)
 12873  		return true
 12874  	}
 12875  	// match: (MVN x:(SRLconst [c] y))
 12876  	// cond: clobberIfDead(x)
 12877  	// result: (MVNshiftRL [c] y)
 12878  	for {
 12879  		x := v_0
 12880  		if x.Op != OpARM64SRLconst {
 12881  			break
 12882  		}
 12883  		c := auxIntToInt64(x.AuxInt)
 12884  		y := x.Args[0]
 12885  		if !(clobberIfDead(x)) {
 12886  			break
 12887  		}
 12888  		v.reset(OpARM64MVNshiftRL)
 12889  		v.AuxInt = int64ToAuxInt(c)
 12890  		v.AddArg(y)
 12891  		return true
 12892  	}
 12893  	// match: (MVN x:(SRAconst [c] y))
 12894  	// cond: clobberIfDead(x)
 12895  	// result: (MVNshiftRA [c] y)
 12896  	for {
 12897  		x := v_0
 12898  		if x.Op != OpARM64SRAconst {
 12899  			break
 12900  		}
 12901  		c := auxIntToInt64(x.AuxInt)
 12902  		y := x.Args[0]
 12903  		if !(clobberIfDead(x)) {
 12904  			break
 12905  		}
 12906  		v.reset(OpARM64MVNshiftRA)
 12907  		v.AuxInt = int64ToAuxInt(c)
 12908  		v.AddArg(y)
 12909  		return true
 12910  	}
 12911  	// match: (MVN x:(RORconst [c] y))
 12912  	// cond: clobberIfDead(x)
 12913  	// result: (MVNshiftRO [c] y)
 12914  	for {
 12915  		x := v_0
 12916  		if x.Op != OpARM64RORconst {
 12917  			break
 12918  		}
 12919  		c := auxIntToInt64(x.AuxInt)
 12920  		y := x.Args[0]
 12921  		if !(clobberIfDead(x)) {
 12922  			break
 12923  		}
 12924  		v.reset(OpARM64MVNshiftRO)
 12925  		v.AuxInt = int64ToAuxInt(c)
 12926  		v.AddArg(y)
 12927  		return true
 12928  	}
 12929  	return false
 12930  }
 12931  func rewriteValueARM64_OpARM64MVNshiftLL(v *Value) bool {
 12932  	v_0 := v.Args[0]
 12933  	// match: (MVNshiftLL (MOVDconst [c]) [d])
 12934  	// result: (MOVDconst [^int64(uint64(c)<<uint64(d))])
 12935  	for {
 12936  		d := auxIntToInt64(v.AuxInt)
 12937  		if v_0.Op != OpARM64MOVDconst {
 12938  			break
 12939  		}
 12940  		c := auxIntToInt64(v_0.AuxInt)
 12941  		v.reset(OpARM64MOVDconst)
 12942  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
 12943  		return true
 12944  	}
 12945  	return false
 12946  }
 12947  func rewriteValueARM64_OpARM64MVNshiftRA(v *Value) bool {
 12948  	v_0 := v.Args[0]
 12949  	// match: (MVNshiftRA (MOVDconst [c]) [d])
 12950  	// result: (MOVDconst [^(c>>uint64(d))])
 12951  	for {
 12952  		d := auxIntToInt64(v.AuxInt)
 12953  		if v_0.Op != OpARM64MOVDconst {
 12954  			break
 12955  		}
 12956  		c := auxIntToInt64(v_0.AuxInt)
 12957  		v.reset(OpARM64MOVDconst)
 12958  		v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
 12959  		return true
 12960  	}
 12961  	return false
 12962  }
 12963  func rewriteValueARM64_OpARM64MVNshiftRL(v *Value) bool {
 12964  	v_0 := v.Args[0]
 12965  	// match: (MVNshiftRL (MOVDconst [c]) [d])
 12966  	// result: (MOVDconst [^int64(uint64(c)>>uint64(d))])
 12967  	for {
 12968  		d := auxIntToInt64(v.AuxInt)
 12969  		if v_0.Op != OpARM64MOVDconst {
 12970  			break
 12971  		}
 12972  		c := auxIntToInt64(v_0.AuxInt)
 12973  		v.reset(OpARM64MOVDconst)
 12974  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
 12975  		return true
 12976  	}
 12977  	return false
 12978  }
 12979  func rewriteValueARM64_OpARM64MVNshiftRO(v *Value) bool {
 12980  	v_0 := v.Args[0]
 12981  	// match: (MVNshiftRO (MOVDconst [c]) [d])
 12982  	// result: (MOVDconst [^rotateRight64(c, d)])
 12983  	for {
 12984  		d := auxIntToInt64(v.AuxInt)
 12985  		if v_0.Op != OpARM64MOVDconst {
 12986  			break
 12987  		}
 12988  		c := auxIntToInt64(v_0.AuxInt)
 12989  		v.reset(OpARM64MOVDconst)
 12990  		v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
 12991  		return true
 12992  	}
 12993  	return false
 12994  }
 12995  func rewriteValueARM64_OpARM64NEG(v *Value) bool {
 12996  	v_0 := v.Args[0]
 12997  	// match: (NEG (MUL x y))
 12998  	// result: (MNEG x y)
 12999  	for {
 13000  		if v_0.Op != OpARM64MUL {
 13001  			break
 13002  		}
 13003  		y := v_0.Args[1]
 13004  		x := v_0.Args[0]
 13005  		v.reset(OpARM64MNEG)
 13006  		v.AddArg2(x, y)
 13007  		return true
 13008  	}
 13009  	// match: (NEG (MULW x y))
 13010  	// cond: v.Type.Size() <= 4
 13011  	// result: (MNEGW x y)
 13012  	for {
 13013  		if v_0.Op != OpARM64MULW {
 13014  			break
 13015  		}
 13016  		y := v_0.Args[1]
 13017  		x := v_0.Args[0]
 13018  		if !(v.Type.Size() <= 4) {
 13019  			break
 13020  		}
 13021  		v.reset(OpARM64MNEGW)
 13022  		v.AddArg2(x, y)
 13023  		return true
 13024  	}
 13025  	// match: (NEG (NEG x))
 13026  	// result: x
 13027  	for {
 13028  		if v_0.Op != OpARM64NEG {
 13029  			break
 13030  		}
 13031  		x := v_0.Args[0]
 13032  		v.copyOf(x)
 13033  		return true
 13034  	}
 13035  	// match: (NEG (MOVDconst [c]))
 13036  	// result: (MOVDconst [-c])
 13037  	for {
 13038  		if v_0.Op != OpARM64MOVDconst {
 13039  			break
 13040  		}
 13041  		c := auxIntToInt64(v_0.AuxInt)
 13042  		v.reset(OpARM64MOVDconst)
 13043  		v.AuxInt = int64ToAuxInt(-c)
 13044  		return true
 13045  	}
 13046  	// match: (NEG x:(SLLconst [c] y))
 13047  	// cond: clobberIfDead(x)
 13048  	// result: (NEGshiftLL [c] y)
 13049  	for {
 13050  		x := v_0
 13051  		if x.Op != OpARM64SLLconst {
 13052  			break
 13053  		}
 13054  		c := auxIntToInt64(x.AuxInt)
 13055  		y := x.Args[0]
 13056  		if !(clobberIfDead(x)) {
 13057  			break
 13058  		}
 13059  		v.reset(OpARM64NEGshiftLL)
 13060  		v.AuxInt = int64ToAuxInt(c)
 13061  		v.AddArg(y)
 13062  		return true
 13063  	}
 13064  	// match: (NEG x:(SRLconst [c] y))
 13065  	// cond: clobberIfDead(x)
 13066  	// result: (NEGshiftRL [c] y)
 13067  	for {
 13068  		x := v_0
 13069  		if x.Op != OpARM64SRLconst {
 13070  			break
 13071  		}
 13072  		c := auxIntToInt64(x.AuxInt)
 13073  		y := x.Args[0]
 13074  		if !(clobberIfDead(x)) {
 13075  			break
 13076  		}
 13077  		v.reset(OpARM64NEGshiftRL)
 13078  		v.AuxInt = int64ToAuxInt(c)
 13079  		v.AddArg(y)
 13080  		return true
 13081  	}
 13082  	// match: (NEG x:(SRAconst [c] y))
 13083  	// cond: clobberIfDead(x)
 13084  	// result: (NEGshiftRA [c] y)
 13085  	for {
 13086  		x := v_0
 13087  		if x.Op != OpARM64SRAconst {
 13088  			break
 13089  		}
 13090  		c := auxIntToInt64(x.AuxInt)
 13091  		y := x.Args[0]
 13092  		if !(clobberIfDead(x)) {
 13093  			break
 13094  		}
 13095  		v.reset(OpARM64NEGshiftRA)
 13096  		v.AuxInt = int64ToAuxInt(c)
 13097  		v.AddArg(y)
 13098  		return true
 13099  	}
 13100  	return false
 13101  }
 13102  func rewriteValueARM64_OpARM64NEGshiftLL(v *Value) bool {
 13103  	v_0 := v.Args[0]
 13104  	// match: (NEGshiftLL (MOVDconst [c]) [d])
 13105  	// result: (MOVDconst [-int64(uint64(c)<<uint64(d))])
 13106  	for {
 13107  		d := auxIntToInt64(v.AuxInt)
 13108  		if v_0.Op != OpARM64MOVDconst {
 13109  			break
 13110  		}
 13111  		c := auxIntToInt64(v_0.AuxInt)
 13112  		v.reset(OpARM64MOVDconst)
 13113  		v.AuxInt = int64ToAuxInt(-int64(uint64(c) << uint64(d)))
 13114  		return true
 13115  	}
 13116  	return false
 13117  }
 13118  func rewriteValueARM64_OpARM64NEGshiftRA(v *Value) bool {
 13119  	v_0 := v.Args[0]
 13120  	// match: (NEGshiftRA (MOVDconst [c]) [d])
 13121  	// result: (MOVDconst [-(c>>uint64(d))])
 13122  	for {
 13123  		d := auxIntToInt64(v.AuxInt)
 13124  		if v_0.Op != OpARM64MOVDconst {
 13125  			break
 13126  		}
 13127  		c := auxIntToInt64(v_0.AuxInt)
 13128  		v.reset(OpARM64MOVDconst)
 13129  		v.AuxInt = int64ToAuxInt(-(c >> uint64(d)))
 13130  		return true
 13131  	}
 13132  	return false
 13133  }
 13134  func rewriteValueARM64_OpARM64NEGshiftRL(v *Value) bool {
 13135  	v_0 := v.Args[0]
 13136  	// match: (NEGshiftRL (MOVDconst [c]) [d])
 13137  	// result: (MOVDconst [-int64(uint64(c)>>uint64(d))])
 13138  	for {
 13139  		d := auxIntToInt64(v.AuxInt)
 13140  		if v_0.Op != OpARM64MOVDconst {
 13141  			break
 13142  		}
 13143  		c := auxIntToInt64(v_0.AuxInt)
 13144  		v.reset(OpARM64MOVDconst)
 13145  		v.AuxInt = int64ToAuxInt(-int64(uint64(c) >> uint64(d)))
 13146  		return true
 13147  	}
 13148  	return false
 13149  }
 13150  func rewriteValueARM64_OpARM64NotEqual(v *Value) bool {
 13151  	v_0 := v.Args[0]
 13152  	b := v.Block
 13153  	// match: (NotEqual (CMPconst [0] z:(AND x y)))
 13154  	// cond: z.Uses == 1
 13155  	// result: (NotEqual (TST x y))
 13156  	for {
 13157  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 13158  			break
 13159  		}
 13160  		z := v_0.Args[0]
 13161  		if z.Op != OpARM64AND {
 13162  			break
 13163  		}
 13164  		y := z.Args[1]
 13165  		x := z.Args[0]
 13166  		if !(z.Uses == 1) {
 13167  			break
 13168  		}
 13169  		v.reset(OpARM64NotEqual)
 13170  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
 13171  		v0.AddArg2(x, y)
 13172  		v.AddArg(v0)
 13173  		return true
 13174  	}
 13175  	// match: (NotEqual (CMPWconst [0] x:(ANDconst [c] y)))
 13176  	// cond: x.Uses == 1
 13177  	// result: (NotEqual (TSTWconst [int32(c)] y))
 13178  	for {
 13179  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 13180  			break
 13181  		}
 13182  		x := v_0.Args[0]
 13183  		if x.Op != OpARM64ANDconst {
 13184  			break
 13185  		}
 13186  		c := auxIntToInt64(x.AuxInt)
 13187  		y := x.Args[0]
 13188  		if !(x.Uses == 1) {
 13189  			break
 13190  		}
 13191  		v.reset(OpARM64NotEqual)
 13192  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
 13193  		v0.AuxInt = int32ToAuxInt(int32(c))
 13194  		v0.AddArg(y)
 13195  		v.AddArg(v0)
 13196  		return true
 13197  	}
 13198  	// match: (NotEqual (CMPWconst [0] z:(AND x y)))
 13199  	// cond: z.Uses == 1
 13200  	// result: (NotEqual (TSTW x y))
 13201  	for {
 13202  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 13203  			break
 13204  		}
 13205  		z := v_0.Args[0]
 13206  		if z.Op != OpARM64AND {
 13207  			break
 13208  		}
 13209  		y := z.Args[1]
 13210  		x := z.Args[0]
 13211  		if !(z.Uses == 1) {
 13212  			break
 13213  		}
 13214  		v.reset(OpARM64NotEqual)
 13215  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
 13216  		v0.AddArg2(x, y)
 13217  		v.AddArg(v0)
 13218  		return true
 13219  	}
 13220  	// match: (NotEqual (CMPconst [0] x:(ANDconst [c] y)))
 13221  	// cond: x.Uses == 1
 13222  	// result: (NotEqual (TSTconst [c] y))
 13223  	for {
 13224  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 13225  			break
 13226  		}
 13227  		x := v_0.Args[0]
 13228  		if x.Op != OpARM64ANDconst {
 13229  			break
 13230  		}
 13231  		c := auxIntToInt64(x.AuxInt)
 13232  		y := x.Args[0]
 13233  		if !(x.Uses == 1) {
 13234  			break
 13235  		}
 13236  		v.reset(OpARM64NotEqual)
 13237  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
 13238  		v0.AuxInt = int64ToAuxInt(c)
 13239  		v0.AddArg(y)
 13240  		v.AddArg(v0)
 13241  		return true
 13242  	}
 13243  	// match: (NotEqual (CMP x z:(NEG y)))
 13244  	// cond: z.Uses == 1
 13245  	// result: (NotEqual (CMN x y))
 13246  	for {
 13247  		if v_0.Op != OpARM64CMP {
 13248  			break
 13249  		}
 13250  		_ = v_0.Args[1]
 13251  		x := v_0.Args[0]
 13252  		z := v_0.Args[1]
 13253  		if z.Op != OpARM64NEG {
 13254  			break
 13255  		}
 13256  		y := z.Args[0]
 13257  		if !(z.Uses == 1) {
 13258  			break
 13259  		}
 13260  		v.reset(OpARM64NotEqual)
 13261  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
 13262  		v0.AddArg2(x, y)
 13263  		v.AddArg(v0)
 13264  		return true
 13265  	}
 13266  	// match: (NotEqual (CMPW x z:(NEG y)))
 13267  	// cond: z.Uses == 1
 13268  	// result: (NotEqual (CMNW x y))
 13269  	for {
 13270  		if v_0.Op != OpARM64CMPW {
 13271  			break
 13272  		}
 13273  		_ = v_0.Args[1]
 13274  		x := v_0.Args[0]
 13275  		z := v_0.Args[1]
 13276  		if z.Op != OpARM64NEG {
 13277  			break
 13278  		}
 13279  		y := z.Args[0]
 13280  		if !(z.Uses == 1) {
 13281  			break
 13282  		}
 13283  		v.reset(OpARM64NotEqual)
 13284  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
 13285  		v0.AddArg2(x, y)
 13286  		v.AddArg(v0)
 13287  		return true
 13288  	}
 13289  	// match: (NotEqual (CMPconst [0] x:(ADDconst [c] y)))
 13290  	// cond: x.Uses == 1
 13291  	// result: (NotEqual (CMNconst [c] y))
 13292  	for {
 13293  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 13294  			break
 13295  		}
 13296  		x := v_0.Args[0]
 13297  		if x.Op != OpARM64ADDconst {
 13298  			break
 13299  		}
 13300  		c := auxIntToInt64(x.AuxInt)
 13301  		y := x.Args[0]
 13302  		if !(x.Uses == 1) {
 13303  			break
 13304  		}
 13305  		v.reset(OpARM64NotEqual)
 13306  		v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
 13307  		v0.AuxInt = int64ToAuxInt(c)
 13308  		v0.AddArg(y)
 13309  		v.AddArg(v0)
 13310  		return true
 13311  	}
 13312  	// match: (NotEqual (CMPWconst [0] x:(ADDconst [c] y)))
 13313  	// cond: x.Uses == 1
 13314  	// result: (NotEqual (CMNWconst [int32(c)] y))
 13315  	for {
 13316  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 13317  			break
 13318  		}
 13319  		x := v_0.Args[0]
 13320  		if x.Op != OpARM64ADDconst {
 13321  			break
 13322  		}
 13323  		c := auxIntToInt64(x.AuxInt)
 13324  		y := x.Args[0]
 13325  		if !(x.Uses == 1) {
 13326  			break
 13327  		}
 13328  		v.reset(OpARM64NotEqual)
 13329  		v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
 13330  		v0.AuxInt = int32ToAuxInt(int32(c))
 13331  		v0.AddArg(y)
 13332  		v.AddArg(v0)
 13333  		return true
 13334  	}
 13335  	// match: (NotEqual (CMPconst [0] z:(ADD x y)))
 13336  	// cond: z.Uses == 1
 13337  	// result: (NotEqual (CMN x y))
 13338  	for {
 13339  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 13340  			break
 13341  		}
 13342  		z := v_0.Args[0]
 13343  		if z.Op != OpARM64ADD {
 13344  			break
 13345  		}
 13346  		y := z.Args[1]
 13347  		x := z.Args[0]
 13348  		if !(z.Uses == 1) {
 13349  			break
 13350  		}
 13351  		v.reset(OpARM64NotEqual)
 13352  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
 13353  		v0.AddArg2(x, y)
 13354  		v.AddArg(v0)
 13355  		return true
 13356  	}
 13357  	// match: (NotEqual (CMPWconst [0] z:(ADD x y)))
 13358  	// cond: z.Uses == 1
 13359  	// result: (NotEqual (CMNW x y))
 13360  	for {
 13361  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 13362  			break
 13363  		}
 13364  		z := v_0.Args[0]
 13365  		if z.Op != OpARM64ADD {
 13366  			break
 13367  		}
 13368  		y := z.Args[1]
 13369  		x := z.Args[0]
 13370  		if !(z.Uses == 1) {
 13371  			break
 13372  		}
 13373  		v.reset(OpARM64NotEqual)
 13374  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
 13375  		v0.AddArg2(x, y)
 13376  		v.AddArg(v0)
 13377  		return true
 13378  	}
 13379  	// match: (NotEqual (CMPconst [0] z:(MADD a x y)))
 13380  	// cond: z.Uses == 1
 13381  	// result: (NotEqual (CMN a (MUL <x.Type> x y)))
 13382  	for {
 13383  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 13384  			break
 13385  		}
 13386  		z := v_0.Args[0]
 13387  		if z.Op != OpARM64MADD {
 13388  			break
 13389  		}
 13390  		y := z.Args[2]
 13391  		a := z.Args[0]
 13392  		x := z.Args[1]
 13393  		if !(z.Uses == 1) {
 13394  			break
 13395  		}
 13396  		v.reset(OpARM64NotEqual)
 13397  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
 13398  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
 13399  		v1.AddArg2(x, y)
 13400  		v0.AddArg2(a, v1)
 13401  		v.AddArg(v0)
 13402  		return true
 13403  	}
 13404  	// match: (NotEqual (CMPconst [0] z:(MSUB a x y)))
 13405  	// cond: z.Uses == 1
 13406  	// result: (NotEqual (CMP a (MUL <x.Type> x y)))
 13407  	for {
 13408  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 13409  			break
 13410  		}
 13411  		z := v_0.Args[0]
 13412  		if z.Op != OpARM64MSUB {
 13413  			break
 13414  		}
 13415  		y := z.Args[2]
 13416  		a := z.Args[0]
 13417  		x := z.Args[1]
 13418  		if !(z.Uses == 1) {
 13419  			break
 13420  		}
 13421  		v.reset(OpARM64NotEqual)
 13422  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 13423  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
 13424  		v1.AddArg2(x, y)
 13425  		v0.AddArg2(a, v1)
 13426  		v.AddArg(v0)
 13427  		return true
 13428  	}
 13429  	// match: (NotEqual (CMPWconst [0] z:(MADDW a x y)))
 13430  	// cond: z.Uses == 1
 13431  	// result: (NotEqual (CMNW a (MULW <x.Type> x y)))
 13432  	for {
 13433  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 13434  			break
 13435  		}
 13436  		z := v_0.Args[0]
 13437  		if z.Op != OpARM64MADDW {
 13438  			break
 13439  		}
 13440  		y := z.Args[2]
 13441  		a := z.Args[0]
 13442  		x := z.Args[1]
 13443  		if !(z.Uses == 1) {
 13444  			break
 13445  		}
 13446  		v.reset(OpARM64NotEqual)
 13447  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
 13448  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
 13449  		v1.AddArg2(x, y)
 13450  		v0.AddArg2(a, v1)
 13451  		v.AddArg(v0)
 13452  		return true
 13453  	}
 13454  	// match: (NotEqual (CMPWconst [0] z:(MSUBW a x y)))
 13455  	// cond: z.Uses == 1
 13456  	// result: (NotEqual (CMPW a (MULW <x.Type> x y)))
 13457  	for {
 13458  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 13459  			break
 13460  		}
 13461  		z := v_0.Args[0]
 13462  		if z.Op != OpARM64MSUBW {
 13463  			break
 13464  		}
 13465  		y := z.Args[2]
 13466  		a := z.Args[0]
 13467  		x := z.Args[1]
 13468  		if !(z.Uses == 1) {
 13469  			break
 13470  		}
 13471  		v.reset(OpARM64NotEqual)
 13472  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 13473  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
 13474  		v1.AddArg2(x, y)
 13475  		v0.AddArg2(a, v1)
 13476  		v.AddArg(v0)
 13477  		return true
 13478  	}
 13479  	// match: (NotEqual (FlagConstant [fc]))
 13480  	// result: (MOVDconst [b2i(fc.ne())])
 13481  	for {
 13482  		if v_0.Op != OpARM64FlagConstant {
 13483  			break
 13484  		}
 13485  		fc := auxIntToFlagConstant(v_0.AuxInt)
 13486  		v.reset(OpARM64MOVDconst)
 13487  		v.AuxInt = int64ToAuxInt(b2i(fc.ne()))
 13488  		return true
 13489  	}
 13490  	// match: (NotEqual (InvertFlags x))
 13491  	// result: (NotEqual x)
 13492  	for {
 13493  		if v_0.Op != OpARM64InvertFlags {
 13494  			break
 13495  		}
 13496  		x := v_0.Args[0]
 13497  		v.reset(OpARM64NotEqual)
 13498  		v.AddArg(x)
 13499  		return true
 13500  	}
 13501  	return false
 13502  }
 13503  func rewriteValueARM64_OpARM64OR(v *Value) bool {
 13504  	v_1 := v.Args[1]
 13505  	v_0 := v.Args[0]
 13506  	// match: (OR x (MOVDconst [c]))
 13507  	// result: (ORconst [c] x)
 13508  	for {
 13509  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13510  			x := v_0
 13511  			if v_1.Op != OpARM64MOVDconst {
 13512  				continue
 13513  			}
 13514  			c := auxIntToInt64(v_1.AuxInt)
 13515  			v.reset(OpARM64ORconst)
 13516  			v.AuxInt = int64ToAuxInt(c)
 13517  			v.AddArg(x)
 13518  			return true
 13519  		}
 13520  		break
 13521  	}
 13522  	// match: (OR x x)
 13523  	// result: x
 13524  	for {
 13525  		x := v_0
 13526  		if x != v_1 {
 13527  			break
 13528  		}
 13529  		v.copyOf(x)
 13530  		return true
 13531  	}
 13532  	// match: (OR x (MVN y))
 13533  	// result: (ORN x y)
 13534  	for {
 13535  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13536  			x := v_0
 13537  			if v_1.Op != OpARM64MVN {
 13538  				continue
 13539  			}
 13540  			y := v_1.Args[0]
 13541  			v.reset(OpARM64ORN)
 13542  			v.AddArg2(x, y)
 13543  			return true
 13544  		}
 13545  		break
 13546  	}
 13547  	// match: (OR x0 x1:(SLLconst [c] y))
 13548  	// cond: clobberIfDead(x1)
 13549  	// result: (ORshiftLL x0 y [c])
 13550  	for {
 13551  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13552  			x0 := v_0
 13553  			x1 := v_1
 13554  			if x1.Op != OpARM64SLLconst {
 13555  				continue
 13556  			}
 13557  			c := auxIntToInt64(x1.AuxInt)
 13558  			y := x1.Args[0]
 13559  			if !(clobberIfDead(x1)) {
 13560  				continue
 13561  			}
 13562  			v.reset(OpARM64ORshiftLL)
 13563  			v.AuxInt = int64ToAuxInt(c)
 13564  			v.AddArg2(x0, y)
 13565  			return true
 13566  		}
 13567  		break
 13568  	}
 13569  	// match: (OR x0 x1:(SRLconst [c] y))
 13570  	// cond: clobberIfDead(x1)
 13571  	// result: (ORshiftRL x0 y [c])
 13572  	for {
 13573  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13574  			x0 := v_0
 13575  			x1 := v_1
 13576  			if x1.Op != OpARM64SRLconst {
 13577  				continue
 13578  			}
 13579  			c := auxIntToInt64(x1.AuxInt)
 13580  			y := x1.Args[0]
 13581  			if !(clobberIfDead(x1)) {
 13582  				continue
 13583  			}
 13584  			v.reset(OpARM64ORshiftRL)
 13585  			v.AuxInt = int64ToAuxInt(c)
 13586  			v.AddArg2(x0, y)
 13587  			return true
 13588  		}
 13589  		break
 13590  	}
 13591  	// match: (OR x0 x1:(SRAconst [c] y))
 13592  	// cond: clobberIfDead(x1)
 13593  	// result: (ORshiftRA x0 y [c])
 13594  	for {
 13595  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13596  			x0 := v_0
 13597  			x1 := v_1
 13598  			if x1.Op != OpARM64SRAconst {
 13599  				continue
 13600  			}
 13601  			c := auxIntToInt64(x1.AuxInt)
 13602  			y := x1.Args[0]
 13603  			if !(clobberIfDead(x1)) {
 13604  				continue
 13605  			}
 13606  			v.reset(OpARM64ORshiftRA)
 13607  			v.AuxInt = int64ToAuxInt(c)
 13608  			v.AddArg2(x0, y)
 13609  			return true
 13610  		}
 13611  		break
 13612  	}
 13613  	// match: (OR x0 x1:(RORconst [c] y))
 13614  	// cond: clobberIfDead(x1)
 13615  	// result: (ORshiftRO x0 y [c])
 13616  	for {
 13617  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13618  			x0 := v_0
 13619  			x1 := v_1
 13620  			if x1.Op != OpARM64RORconst {
 13621  				continue
 13622  			}
 13623  			c := auxIntToInt64(x1.AuxInt)
 13624  			y := x1.Args[0]
 13625  			if !(clobberIfDead(x1)) {
 13626  				continue
 13627  			}
 13628  			v.reset(OpARM64ORshiftRO)
 13629  			v.AuxInt = int64ToAuxInt(c)
 13630  			v.AddArg2(x0, y)
 13631  			return true
 13632  		}
 13633  		break
 13634  	}
 13635  	// match: (OR (UBFIZ [bfc] x) (ANDconst [ac] y))
 13636  	// cond: ac == ^((1<<uint(bfc.width())-1) << uint(bfc.lsb()))
 13637  	// result: (BFI [bfc] y x)
 13638  	for {
 13639  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13640  			if v_0.Op != OpARM64UBFIZ {
 13641  				continue
 13642  			}
 13643  			bfc := auxIntToArm64BitField(v_0.AuxInt)
 13644  			x := v_0.Args[0]
 13645  			if v_1.Op != OpARM64ANDconst {
 13646  				continue
 13647  			}
 13648  			ac := auxIntToInt64(v_1.AuxInt)
 13649  			y := v_1.Args[0]
 13650  			if !(ac == ^((1<<uint(bfc.width()) - 1) << uint(bfc.lsb()))) {
 13651  				continue
 13652  			}
 13653  			v.reset(OpARM64BFI)
 13654  			v.AuxInt = arm64BitFieldToAuxInt(bfc)
 13655  			v.AddArg2(y, x)
 13656  			return true
 13657  		}
 13658  		break
 13659  	}
 13660  	// match: (OR (UBFX [bfc] x) (ANDconst [ac] y))
 13661  	// cond: ac == ^(1<<uint(bfc.width())-1)
 13662  	// result: (BFXIL [bfc] y x)
 13663  	for {
 13664  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13665  			if v_0.Op != OpARM64UBFX {
 13666  				continue
 13667  			}
 13668  			bfc := auxIntToArm64BitField(v_0.AuxInt)
 13669  			x := v_0.Args[0]
 13670  			if v_1.Op != OpARM64ANDconst {
 13671  				continue
 13672  			}
 13673  			ac := auxIntToInt64(v_1.AuxInt)
 13674  			y := v_1.Args[0]
 13675  			if !(ac == ^(1<<uint(bfc.width()) - 1)) {
 13676  				continue
 13677  			}
 13678  			v.reset(OpARM64BFXIL)
 13679  			v.AuxInt = arm64BitFieldToAuxInt(bfc)
 13680  			v.AddArg2(y, x)
 13681  			return true
 13682  		}
 13683  		break
 13684  	}
 13685  	return false
 13686  }
 13687  func rewriteValueARM64_OpARM64ORN(v *Value) bool {
 13688  	v_1 := v.Args[1]
 13689  	v_0 := v.Args[0]
 13690  	// match: (ORN x (MOVDconst [c]))
 13691  	// result: (ORconst [^c] x)
 13692  	for {
 13693  		x := v_0
 13694  		if v_1.Op != OpARM64MOVDconst {
 13695  			break
 13696  		}
 13697  		c := auxIntToInt64(v_1.AuxInt)
 13698  		v.reset(OpARM64ORconst)
 13699  		v.AuxInt = int64ToAuxInt(^c)
 13700  		v.AddArg(x)
 13701  		return true
 13702  	}
 13703  	// match: (ORN x x)
 13704  	// result: (MOVDconst [-1])
 13705  	for {
 13706  		x := v_0
 13707  		if x != v_1 {
 13708  			break
 13709  		}
 13710  		v.reset(OpARM64MOVDconst)
 13711  		v.AuxInt = int64ToAuxInt(-1)
 13712  		return true
 13713  	}
 13714  	// match: (ORN x0 x1:(SLLconst [c] y))
 13715  	// cond: clobberIfDead(x1)
 13716  	// result: (ORNshiftLL x0 y [c])
 13717  	for {
 13718  		x0 := v_0
 13719  		x1 := v_1
 13720  		if x1.Op != OpARM64SLLconst {
 13721  			break
 13722  		}
 13723  		c := auxIntToInt64(x1.AuxInt)
 13724  		y := x1.Args[0]
 13725  		if !(clobberIfDead(x1)) {
 13726  			break
 13727  		}
 13728  		v.reset(OpARM64ORNshiftLL)
 13729  		v.AuxInt = int64ToAuxInt(c)
 13730  		v.AddArg2(x0, y)
 13731  		return true
 13732  	}
 13733  	// match: (ORN x0 x1:(SRLconst [c] y))
 13734  	// cond: clobberIfDead(x1)
 13735  	// result: (ORNshiftRL x0 y [c])
 13736  	for {
 13737  		x0 := v_0
 13738  		x1 := v_1
 13739  		if x1.Op != OpARM64SRLconst {
 13740  			break
 13741  		}
 13742  		c := auxIntToInt64(x1.AuxInt)
 13743  		y := x1.Args[0]
 13744  		if !(clobberIfDead(x1)) {
 13745  			break
 13746  		}
 13747  		v.reset(OpARM64ORNshiftRL)
 13748  		v.AuxInt = int64ToAuxInt(c)
 13749  		v.AddArg2(x0, y)
 13750  		return true
 13751  	}
 13752  	// match: (ORN x0 x1:(SRAconst [c] y))
 13753  	// cond: clobberIfDead(x1)
 13754  	// result: (ORNshiftRA x0 y [c])
 13755  	for {
 13756  		x0 := v_0
 13757  		x1 := v_1
 13758  		if x1.Op != OpARM64SRAconst {
 13759  			break
 13760  		}
 13761  		c := auxIntToInt64(x1.AuxInt)
 13762  		y := x1.Args[0]
 13763  		if !(clobberIfDead(x1)) {
 13764  			break
 13765  		}
 13766  		v.reset(OpARM64ORNshiftRA)
 13767  		v.AuxInt = int64ToAuxInt(c)
 13768  		v.AddArg2(x0, y)
 13769  		return true
 13770  	}
 13771  	// match: (ORN x0 x1:(RORconst [c] y))
 13772  	// cond: clobberIfDead(x1)
 13773  	// result: (ORNshiftRO x0 y [c])
 13774  	for {
 13775  		x0 := v_0
 13776  		x1 := v_1
 13777  		if x1.Op != OpARM64RORconst {
 13778  			break
 13779  		}
 13780  		c := auxIntToInt64(x1.AuxInt)
 13781  		y := x1.Args[0]
 13782  		if !(clobberIfDead(x1)) {
 13783  			break
 13784  		}
 13785  		v.reset(OpARM64ORNshiftRO)
 13786  		v.AuxInt = int64ToAuxInt(c)
 13787  		v.AddArg2(x0, y)
 13788  		return true
 13789  	}
 13790  	return false
 13791  }
 13792  func rewriteValueARM64_OpARM64ORNshiftLL(v *Value) bool {
 13793  	v_1 := v.Args[1]
 13794  	v_0 := v.Args[0]
 13795  	// match: (ORNshiftLL x (MOVDconst [c]) [d])
 13796  	// result: (ORconst x [^int64(uint64(c)<<uint64(d))])
 13797  	for {
 13798  		d := auxIntToInt64(v.AuxInt)
 13799  		x := v_0
 13800  		if v_1.Op != OpARM64MOVDconst {
 13801  			break
 13802  		}
 13803  		c := auxIntToInt64(v_1.AuxInt)
 13804  		v.reset(OpARM64ORconst)
 13805  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
 13806  		v.AddArg(x)
 13807  		return true
 13808  	}
 13809  	// match: (ORNshiftLL (SLLconst x [c]) x [c])
 13810  	// result: (MOVDconst [-1])
 13811  	for {
 13812  		c := auxIntToInt64(v.AuxInt)
 13813  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
 13814  			break
 13815  		}
 13816  		x := v_0.Args[0]
 13817  		if x != v_1 {
 13818  			break
 13819  		}
 13820  		v.reset(OpARM64MOVDconst)
 13821  		v.AuxInt = int64ToAuxInt(-1)
 13822  		return true
 13823  	}
 13824  	return false
 13825  }
 13826  func rewriteValueARM64_OpARM64ORNshiftRA(v *Value) bool {
 13827  	v_1 := v.Args[1]
 13828  	v_0 := v.Args[0]
 13829  	// match: (ORNshiftRA x (MOVDconst [c]) [d])
 13830  	// result: (ORconst x [^(c>>uint64(d))])
 13831  	for {
 13832  		d := auxIntToInt64(v.AuxInt)
 13833  		x := v_0
 13834  		if v_1.Op != OpARM64MOVDconst {
 13835  			break
 13836  		}
 13837  		c := auxIntToInt64(v_1.AuxInt)
 13838  		v.reset(OpARM64ORconst)
 13839  		v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
 13840  		v.AddArg(x)
 13841  		return true
 13842  	}
 13843  	// match: (ORNshiftRA (SRAconst x [c]) x [c])
 13844  	// result: (MOVDconst [-1])
 13845  	for {
 13846  		c := auxIntToInt64(v.AuxInt)
 13847  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
 13848  			break
 13849  		}
 13850  		x := v_0.Args[0]
 13851  		if x != v_1 {
 13852  			break
 13853  		}
 13854  		v.reset(OpARM64MOVDconst)
 13855  		v.AuxInt = int64ToAuxInt(-1)
 13856  		return true
 13857  	}
 13858  	return false
 13859  }
 13860  func rewriteValueARM64_OpARM64ORNshiftRL(v *Value) bool {
 13861  	v_1 := v.Args[1]
 13862  	v_0 := v.Args[0]
 13863  	// match: (ORNshiftRL x (MOVDconst [c]) [d])
 13864  	// result: (ORconst x [^int64(uint64(c)>>uint64(d))])
 13865  	for {
 13866  		d := auxIntToInt64(v.AuxInt)
 13867  		x := v_0
 13868  		if v_1.Op != OpARM64MOVDconst {
 13869  			break
 13870  		}
 13871  		c := auxIntToInt64(v_1.AuxInt)
 13872  		v.reset(OpARM64ORconst)
 13873  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
 13874  		v.AddArg(x)
 13875  		return true
 13876  	}
 13877  	// match: (ORNshiftRL (SRLconst x [c]) x [c])
 13878  	// result: (MOVDconst [-1])
 13879  	for {
 13880  		c := auxIntToInt64(v.AuxInt)
 13881  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
 13882  			break
 13883  		}
 13884  		x := v_0.Args[0]
 13885  		if x != v_1 {
 13886  			break
 13887  		}
 13888  		v.reset(OpARM64MOVDconst)
 13889  		v.AuxInt = int64ToAuxInt(-1)
 13890  		return true
 13891  	}
 13892  	return false
 13893  }
 13894  func rewriteValueARM64_OpARM64ORNshiftRO(v *Value) bool {
 13895  	v_1 := v.Args[1]
 13896  	v_0 := v.Args[0]
 13897  	// match: (ORNshiftRO x (MOVDconst [c]) [d])
 13898  	// result: (ORconst x [^rotateRight64(c, d)])
 13899  	for {
 13900  		d := auxIntToInt64(v.AuxInt)
 13901  		x := v_0
 13902  		if v_1.Op != OpARM64MOVDconst {
 13903  			break
 13904  		}
 13905  		c := auxIntToInt64(v_1.AuxInt)
 13906  		v.reset(OpARM64ORconst)
 13907  		v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
 13908  		v.AddArg(x)
 13909  		return true
 13910  	}
 13911  	// match: (ORNshiftRO (RORconst x [c]) x [c])
 13912  	// result: (MOVDconst [-1])
 13913  	for {
 13914  		c := auxIntToInt64(v.AuxInt)
 13915  		if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
 13916  			break
 13917  		}
 13918  		x := v_0.Args[0]
 13919  		if x != v_1 {
 13920  			break
 13921  		}
 13922  		v.reset(OpARM64MOVDconst)
 13923  		v.AuxInt = int64ToAuxInt(-1)
 13924  		return true
 13925  	}
 13926  	return false
 13927  }
 13928  func rewriteValueARM64_OpARM64ORconst(v *Value) bool {
 13929  	v_0 := v.Args[0]
 13930  	// match: (ORconst [0] x)
 13931  	// result: x
 13932  	for {
 13933  		if auxIntToInt64(v.AuxInt) != 0 {
 13934  			break
 13935  		}
 13936  		x := v_0
 13937  		v.copyOf(x)
 13938  		return true
 13939  	}
 13940  	// match: (ORconst [-1] _)
 13941  	// result: (MOVDconst [-1])
 13942  	for {
 13943  		if auxIntToInt64(v.AuxInt) != -1 {
 13944  			break
 13945  		}
 13946  		v.reset(OpARM64MOVDconst)
 13947  		v.AuxInt = int64ToAuxInt(-1)
 13948  		return true
 13949  	}
 13950  	// match: (ORconst [c] (MOVDconst [d]))
 13951  	// result: (MOVDconst [c|d])
 13952  	for {
 13953  		c := auxIntToInt64(v.AuxInt)
 13954  		if v_0.Op != OpARM64MOVDconst {
 13955  			break
 13956  		}
 13957  		d := auxIntToInt64(v_0.AuxInt)
 13958  		v.reset(OpARM64MOVDconst)
 13959  		v.AuxInt = int64ToAuxInt(c | d)
 13960  		return true
 13961  	}
 13962  	// match: (ORconst [c] (ORconst [d] x))
 13963  	// result: (ORconst [c|d] x)
 13964  	for {
 13965  		c := auxIntToInt64(v.AuxInt)
 13966  		if v_0.Op != OpARM64ORconst {
 13967  			break
 13968  		}
 13969  		d := auxIntToInt64(v_0.AuxInt)
 13970  		x := v_0.Args[0]
 13971  		v.reset(OpARM64ORconst)
 13972  		v.AuxInt = int64ToAuxInt(c | d)
 13973  		v.AddArg(x)
 13974  		return true
 13975  	}
 13976  	// match: (ORconst [c1] (ANDconst [c2] x))
 13977  	// cond: c2|c1 == ^0
 13978  	// result: (ORconst [c1] x)
 13979  	for {
 13980  		c1 := auxIntToInt64(v.AuxInt)
 13981  		if v_0.Op != OpARM64ANDconst {
 13982  			break
 13983  		}
 13984  		c2 := auxIntToInt64(v_0.AuxInt)
 13985  		x := v_0.Args[0]
 13986  		if !(c2|c1 == ^0) {
 13987  			break
 13988  		}
 13989  		v.reset(OpARM64ORconst)
 13990  		v.AuxInt = int64ToAuxInt(c1)
 13991  		v.AddArg(x)
 13992  		return true
 13993  	}
 13994  	return false
 13995  }
 13996  func rewriteValueARM64_OpARM64ORshiftLL(v *Value) bool {
 13997  	v_1 := v.Args[1]
 13998  	v_0 := v.Args[0]
 13999  	b := v.Block
 14000  	typ := &b.Func.Config.Types
 14001  	// match: (ORshiftLL (MOVDconst [c]) x [d])
 14002  	// result: (ORconst [c] (SLLconst <x.Type> x [d]))
 14003  	for {
 14004  		d := auxIntToInt64(v.AuxInt)
 14005  		if v_0.Op != OpARM64MOVDconst {
 14006  			break
 14007  		}
 14008  		c := auxIntToInt64(v_0.AuxInt)
 14009  		x := v_1
 14010  		v.reset(OpARM64ORconst)
 14011  		v.AuxInt = int64ToAuxInt(c)
 14012  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 14013  		v0.AuxInt = int64ToAuxInt(d)
 14014  		v0.AddArg(x)
 14015  		v.AddArg(v0)
 14016  		return true
 14017  	}
 14018  	// match: (ORshiftLL x (MOVDconst [c]) [d])
 14019  	// result: (ORconst x [int64(uint64(c)<<uint64(d))])
 14020  	for {
 14021  		d := auxIntToInt64(v.AuxInt)
 14022  		x := v_0
 14023  		if v_1.Op != OpARM64MOVDconst {
 14024  			break
 14025  		}
 14026  		c := auxIntToInt64(v_1.AuxInt)
 14027  		v.reset(OpARM64ORconst)
 14028  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
 14029  		v.AddArg(x)
 14030  		return true
 14031  	}
 14032  	// match: (ORshiftLL y:(SLLconst x [c]) x [c])
 14033  	// result: y
 14034  	for {
 14035  		c := auxIntToInt64(v.AuxInt)
 14036  		y := v_0
 14037  		if y.Op != OpARM64SLLconst || auxIntToInt64(y.AuxInt) != c {
 14038  			break
 14039  		}
 14040  		x := y.Args[0]
 14041  		if x != v_1 {
 14042  			break
 14043  		}
 14044  		v.copyOf(y)
 14045  		return true
 14046  	}
 14047  	// match: (ORshiftLL <typ.UInt16> [8] (UBFX <typ.UInt16> [armBFAuxInt(8, 8)] x) x)
 14048  	// result: (REV16W x)
 14049  	for {
 14050  		if v.Type != typ.UInt16 || auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64UBFX || v_0.Type != typ.UInt16 || auxIntToArm64BitField(v_0.AuxInt) != armBFAuxInt(8, 8) {
 14051  			break
 14052  		}
 14053  		x := v_0.Args[0]
 14054  		if x != v_1 {
 14055  			break
 14056  		}
 14057  		v.reset(OpARM64REV16W)
 14058  		v.AddArg(x)
 14059  		return true
 14060  	}
 14061  	// match: (ORshiftLL [8] (UBFX [armBFAuxInt(8, 24)] (ANDconst [c1] x)) (ANDconst [c2] x))
 14062  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
 14063  	// result: (REV16W x)
 14064  	for {
 14065  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64UBFX || auxIntToArm64BitField(v_0.AuxInt) != armBFAuxInt(8, 24) {
 14066  			break
 14067  		}
 14068  		v_0_0 := v_0.Args[0]
 14069  		if v_0_0.Op != OpARM64ANDconst {
 14070  			break
 14071  		}
 14072  		c1 := auxIntToInt64(v_0_0.AuxInt)
 14073  		x := v_0_0.Args[0]
 14074  		if v_1.Op != OpARM64ANDconst {
 14075  			break
 14076  		}
 14077  		c2 := auxIntToInt64(v_1.AuxInt)
 14078  		if x != v_1.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
 14079  			break
 14080  		}
 14081  		v.reset(OpARM64REV16W)
 14082  		v.AddArg(x)
 14083  		return true
 14084  	}
 14085  	// match: (ORshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
 14086  	// cond: (uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff)
 14087  	// result: (REV16 x)
 14088  	for {
 14089  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
 14090  			break
 14091  		}
 14092  		v_0_0 := v_0.Args[0]
 14093  		if v_0_0.Op != OpARM64ANDconst {
 14094  			break
 14095  		}
 14096  		c1 := auxIntToInt64(v_0_0.AuxInt)
 14097  		x := v_0_0.Args[0]
 14098  		if v_1.Op != OpARM64ANDconst {
 14099  			break
 14100  		}
 14101  		c2 := auxIntToInt64(v_1.AuxInt)
 14102  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
 14103  			break
 14104  		}
 14105  		v.reset(OpARM64REV16)
 14106  		v.AddArg(x)
 14107  		return true
 14108  	}
 14109  	// match: (ORshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
 14110  	// cond: (uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff)
 14111  	// result: (REV16 (ANDconst <x.Type> [0xffffffff] x))
 14112  	for {
 14113  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
 14114  			break
 14115  		}
 14116  		v_0_0 := v_0.Args[0]
 14117  		if v_0_0.Op != OpARM64ANDconst {
 14118  			break
 14119  		}
 14120  		c1 := auxIntToInt64(v_0_0.AuxInt)
 14121  		x := v_0_0.Args[0]
 14122  		if v_1.Op != OpARM64ANDconst {
 14123  			break
 14124  		}
 14125  		c2 := auxIntToInt64(v_1.AuxInt)
 14126  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
 14127  			break
 14128  		}
 14129  		v.reset(OpARM64REV16)
 14130  		v0 := b.NewValue0(v.Pos, OpARM64ANDconst, x.Type)
 14131  		v0.AuxInt = int64ToAuxInt(0xffffffff)
 14132  		v0.AddArg(x)
 14133  		v.AddArg(v0)
 14134  		return true
 14135  	}
 14136  	// match: ( ORshiftLL [c] (SRLconst x [64-c]) x2)
 14137  	// result: (EXTRconst [64-c] x2 x)
 14138  	for {
 14139  		c := auxIntToInt64(v.AuxInt)
 14140  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 64-c {
 14141  			break
 14142  		}
 14143  		x := v_0.Args[0]
 14144  		x2 := v_1
 14145  		v.reset(OpARM64EXTRconst)
 14146  		v.AuxInt = int64ToAuxInt(64 - c)
 14147  		v.AddArg2(x2, x)
 14148  		return true
 14149  	}
 14150  	// match: ( ORshiftLL <t> [c] (UBFX [bfc] x) x2)
 14151  	// cond: c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)
 14152  	// result: (EXTRWconst [32-c] x2 x)
 14153  	for {
 14154  		t := v.Type
 14155  		c := auxIntToInt64(v.AuxInt)
 14156  		if v_0.Op != OpARM64UBFX {
 14157  			break
 14158  		}
 14159  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 14160  		x := v_0.Args[0]
 14161  		x2 := v_1
 14162  		if !(c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)) {
 14163  			break
 14164  		}
 14165  		v.reset(OpARM64EXTRWconst)
 14166  		v.AuxInt = int64ToAuxInt(32 - c)
 14167  		v.AddArg2(x2, x)
 14168  		return true
 14169  	}
 14170  	// match: (ORshiftLL [s] (ANDconst [xc] x) (ANDconst [yc] y))
 14171  	// cond: xc == ^(yc << s) && yc & (yc+1) == 0 && yc > 0 && s+log64(yc+1) <= 64
 14172  	// result: (BFI [armBFAuxInt(s, log64(yc+1))] x y)
 14173  	for {
 14174  		s := auxIntToInt64(v.AuxInt)
 14175  		if v_0.Op != OpARM64ANDconst {
 14176  			break
 14177  		}
 14178  		xc := auxIntToInt64(v_0.AuxInt)
 14179  		x := v_0.Args[0]
 14180  		if v_1.Op != OpARM64ANDconst {
 14181  			break
 14182  		}
 14183  		yc := auxIntToInt64(v_1.AuxInt)
 14184  		y := v_1.Args[0]
 14185  		if !(xc == ^(yc<<s) && yc&(yc+1) == 0 && yc > 0 && s+log64(yc+1) <= 64) {
 14186  			break
 14187  		}
 14188  		v.reset(OpARM64BFI)
 14189  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(s, log64(yc+1)))
 14190  		v.AddArg2(x, y)
 14191  		return true
 14192  	}
 14193  	// match: (ORshiftLL [sc] (UBFX [bfc] x) (SRLconst [sc] y))
 14194  	// cond: sc == bfc.width()
 14195  	// result: (BFXIL [bfc] y x)
 14196  	for {
 14197  		sc := auxIntToInt64(v.AuxInt)
 14198  		if v_0.Op != OpARM64UBFX {
 14199  			break
 14200  		}
 14201  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 14202  		x := v_0.Args[0]
 14203  		if v_1.Op != OpARM64SRLconst || auxIntToInt64(v_1.AuxInt) != sc {
 14204  			break
 14205  		}
 14206  		y := v_1.Args[0]
 14207  		if !(sc == bfc.width()) {
 14208  			break
 14209  		}
 14210  		v.reset(OpARM64BFXIL)
 14211  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 14212  		v.AddArg2(y, x)
 14213  		return true
 14214  	}
 14215  	return false
 14216  }
 14217  func rewriteValueARM64_OpARM64ORshiftRA(v *Value) bool {
 14218  	v_1 := v.Args[1]
 14219  	v_0 := v.Args[0]
 14220  	b := v.Block
 14221  	// match: (ORshiftRA (MOVDconst [c]) x [d])
 14222  	// result: (ORconst [c] (SRAconst <x.Type> x [d]))
 14223  	for {
 14224  		d := auxIntToInt64(v.AuxInt)
 14225  		if v_0.Op != OpARM64MOVDconst {
 14226  			break
 14227  		}
 14228  		c := auxIntToInt64(v_0.AuxInt)
 14229  		x := v_1
 14230  		v.reset(OpARM64ORconst)
 14231  		v.AuxInt = int64ToAuxInt(c)
 14232  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
 14233  		v0.AuxInt = int64ToAuxInt(d)
 14234  		v0.AddArg(x)
 14235  		v.AddArg(v0)
 14236  		return true
 14237  	}
 14238  	// match: (ORshiftRA x (MOVDconst [c]) [d])
 14239  	// result: (ORconst x [c>>uint64(d)])
 14240  	for {
 14241  		d := auxIntToInt64(v.AuxInt)
 14242  		x := v_0
 14243  		if v_1.Op != OpARM64MOVDconst {
 14244  			break
 14245  		}
 14246  		c := auxIntToInt64(v_1.AuxInt)
 14247  		v.reset(OpARM64ORconst)
 14248  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
 14249  		v.AddArg(x)
 14250  		return true
 14251  	}
 14252  	// match: (ORshiftRA y:(SRAconst x [c]) x [c])
 14253  	// result: y
 14254  	for {
 14255  		c := auxIntToInt64(v.AuxInt)
 14256  		y := v_0
 14257  		if y.Op != OpARM64SRAconst || auxIntToInt64(y.AuxInt) != c {
 14258  			break
 14259  		}
 14260  		x := y.Args[0]
 14261  		if x != v_1 {
 14262  			break
 14263  		}
 14264  		v.copyOf(y)
 14265  		return true
 14266  	}
 14267  	return false
 14268  }
 14269  func rewriteValueARM64_OpARM64ORshiftRL(v *Value) bool {
 14270  	v_1 := v.Args[1]
 14271  	v_0 := v.Args[0]
 14272  	b := v.Block
 14273  	// match: (ORshiftRL (MOVDconst [c]) x [d])
 14274  	// result: (ORconst [c] (SRLconst <x.Type> x [d]))
 14275  	for {
 14276  		d := auxIntToInt64(v.AuxInt)
 14277  		if v_0.Op != OpARM64MOVDconst {
 14278  			break
 14279  		}
 14280  		c := auxIntToInt64(v_0.AuxInt)
 14281  		x := v_1
 14282  		v.reset(OpARM64ORconst)
 14283  		v.AuxInt = int64ToAuxInt(c)
 14284  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
 14285  		v0.AuxInt = int64ToAuxInt(d)
 14286  		v0.AddArg(x)
 14287  		v.AddArg(v0)
 14288  		return true
 14289  	}
 14290  	// match: (ORshiftRL x (MOVDconst [c]) [d])
 14291  	// result: (ORconst x [int64(uint64(c)>>uint64(d))])
 14292  	for {
 14293  		d := auxIntToInt64(v.AuxInt)
 14294  		x := v_0
 14295  		if v_1.Op != OpARM64MOVDconst {
 14296  			break
 14297  		}
 14298  		c := auxIntToInt64(v_1.AuxInt)
 14299  		v.reset(OpARM64ORconst)
 14300  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
 14301  		v.AddArg(x)
 14302  		return true
 14303  	}
 14304  	// match: (ORshiftRL y:(SRLconst x [c]) x [c])
 14305  	// result: y
 14306  	for {
 14307  		c := auxIntToInt64(v.AuxInt)
 14308  		y := v_0
 14309  		if y.Op != OpARM64SRLconst || auxIntToInt64(y.AuxInt) != c {
 14310  			break
 14311  		}
 14312  		x := y.Args[0]
 14313  		if x != v_1 {
 14314  			break
 14315  		}
 14316  		v.copyOf(y)
 14317  		return true
 14318  	}
 14319  	// match: (ORshiftRL [rc] (ANDconst [ac] x) (SLLconst [lc] y))
 14320  	// cond: lc > rc && ac == ^((1<<uint(64-lc)-1) << uint64(lc-rc))
 14321  	// result: (BFI [armBFAuxInt(lc-rc, 64-lc)] x y)
 14322  	for {
 14323  		rc := auxIntToInt64(v.AuxInt)
 14324  		if v_0.Op != OpARM64ANDconst {
 14325  			break
 14326  		}
 14327  		ac := auxIntToInt64(v_0.AuxInt)
 14328  		x := v_0.Args[0]
 14329  		if v_1.Op != OpARM64SLLconst {
 14330  			break
 14331  		}
 14332  		lc := auxIntToInt64(v_1.AuxInt)
 14333  		y := v_1.Args[0]
 14334  		if !(lc > rc && ac == ^((1<<uint(64-lc)-1)<<uint64(lc-rc))) {
 14335  			break
 14336  		}
 14337  		v.reset(OpARM64BFI)
 14338  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc-rc, 64-lc))
 14339  		v.AddArg2(x, y)
 14340  		return true
 14341  	}
 14342  	// match: (ORshiftRL [rc] (ANDconst [ac] y) (SLLconst [lc] x))
 14343  	// cond: lc < rc && ac == ^((1<<uint(64-rc)-1))
 14344  	// result: (BFXIL [armBFAuxInt(rc-lc, 64-rc)] y x)
 14345  	for {
 14346  		rc := auxIntToInt64(v.AuxInt)
 14347  		if v_0.Op != OpARM64ANDconst {
 14348  			break
 14349  		}
 14350  		ac := auxIntToInt64(v_0.AuxInt)
 14351  		y := v_0.Args[0]
 14352  		if v_1.Op != OpARM64SLLconst {
 14353  			break
 14354  		}
 14355  		lc := auxIntToInt64(v_1.AuxInt)
 14356  		x := v_1.Args[0]
 14357  		if !(lc < rc && ac == ^(1<<uint(64-rc)-1)) {
 14358  			break
 14359  		}
 14360  		v.reset(OpARM64BFXIL)
 14361  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc-lc, 64-rc))
 14362  		v.AddArg2(y, x)
 14363  		return true
 14364  	}
 14365  	return false
 14366  }
 14367  func rewriteValueARM64_OpARM64ORshiftRO(v *Value) bool {
 14368  	v_1 := v.Args[1]
 14369  	v_0 := v.Args[0]
 14370  	b := v.Block
 14371  	// match: (ORshiftRO (MOVDconst [c]) x [d])
 14372  	// result: (ORconst [c] (RORconst <x.Type> x [d]))
 14373  	for {
 14374  		d := auxIntToInt64(v.AuxInt)
 14375  		if v_0.Op != OpARM64MOVDconst {
 14376  			break
 14377  		}
 14378  		c := auxIntToInt64(v_0.AuxInt)
 14379  		x := v_1
 14380  		v.reset(OpARM64ORconst)
 14381  		v.AuxInt = int64ToAuxInt(c)
 14382  		v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
 14383  		v0.AuxInt = int64ToAuxInt(d)
 14384  		v0.AddArg(x)
 14385  		v.AddArg(v0)
 14386  		return true
 14387  	}
 14388  	// match: (ORshiftRO x (MOVDconst [c]) [d])
 14389  	// result: (ORconst x [rotateRight64(c, d)])
 14390  	for {
 14391  		d := auxIntToInt64(v.AuxInt)
 14392  		x := v_0
 14393  		if v_1.Op != OpARM64MOVDconst {
 14394  			break
 14395  		}
 14396  		c := auxIntToInt64(v_1.AuxInt)
 14397  		v.reset(OpARM64ORconst)
 14398  		v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
 14399  		v.AddArg(x)
 14400  		return true
 14401  	}
 14402  	// match: (ORshiftRO y:(RORconst x [c]) x [c])
 14403  	// result: y
 14404  	for {
 14405  		c := auxIntToInt64(v.AuxInt)
 14406  		y := v_0
 14407  		if y.Op != OpARM64RORconst || auxIntToInt64(y.AuxInt) != c {
 14408  			break
 14409  		}
 14410  		x := y.Args[0]
 14411  		if x != v_1 {
 14412  			break
 14413  		}
 14414  		v.copyOf(y)
 14415  		return true
 14416  	}
 14417  	return false
 14418  }
 14419  func rewriteValueARM64_OpARM64REV(v *Value) bool {
 14420  	v_0 := v.Args[0]
 14421  	// match: (REV (REV p))
 14422  	// result: p
 14423  	for {
 14424  		if v_0.Op != OpARM64REV {
 14425  			break
 14426  		}
 14427  		p := v_0.Args[0]
 14428  		v.copyOf(p)
 14429  		return true
 14430  	}
 14431  	return false
 14432  }
 14433  func rewriteValueARM64_OpARM64REVW(v *Value) bool {
 14434  	v_0 := v.Args[0]
 14435  	// match: (REVW (REVW p))
 14436  	// result: p
 14437  	for {
 14438  		if v_0.Op != OpARM64REVW {
 14439  			break
 14440  		}
 14441  		p := v_0.Args[0]
 14442  		v.copyOf(p)
 14443  		return true
 14444  	}
 14445  	return false
 14446  }
 14447  func rewriteValueARM64_OpARM64ROR(v *Value) bool {
 14448  	v_1 := v.Args[1]
 14449  	v_0 := v.Args[0]
 14450  	// match: (ROR x (MOVDconst [c]))
 14451  	// result: (RORconst x [c&63])
 14452  	for {
 14453  		x := v_0
 14454  		if v_1.Op != OpARM64MOVDconst {
 14455  			break
 14456  		}
 14457  		c := auxIntToInt64(v_1.AuxInt)
 14458  		v.reset(OpARM64RORconst)
 14459  		v.AuxInt = int64ToAuxInt(c & 63)
 14460  		v.AddArg(x)
 14461  		return true
 14462  	}
 14463  	return false
 14464  }
 14465  func rewriteValueARM64_OpARM64RORW(v *Value) bool {
 14466  	v_1 := v.Args[1]
 14467  	v_0 := v.Args[0]
 14468  	// match: (RORW x (MOVDconst [c]))
 14469  	// result: (RORWconst x [c&31])
 14470  	for {
 14471  		x := v_0
 14472  		if v_1.Op != OpARM64MOVDconst {
 14473  			break
 14474  		}
 14475  		c := auxIntToInt64(v_1.AuxInt)
 14476  		v.reset(OpARM64RORWconst)
 14477  		v.AuxInt = int64ToAuxInt(c & 31)
 14478  		v.AddArg(x)
 14479  		return true
 14480  	}
 14481  	return false
 14482  }
 14483  func rewriteValueARM64_OpARM64SBCSflags(v *Value) bool {
 14484  	v_2 := v.Args[2]
 14485  	v_1 := v.Args[1]
 14486  	v_0 := v.Args[0]
 14487  	b := v.Block
 14488  	typ := &b.Func.Config.Types
 14489  	// match: (SBCSflags x y (Select1 <types.TypeFlags> (NEGSflags (NEG <typ.UInt64> (NGCzerocarry <typ.UInt64> bo)))))
 14490  	// result: (SBCSflags x y bo)
 14491  	for {
 14492  		x := v_0
 14493  		y := v_1
 14494  		if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
 14495  			break
 14496  		}
 14497  		v_2_0 := v_2.Args[0]
 14498  		if v_2_0.Op != OpARM64NEGSflags {
 14499  			break
 14500  		}
 14501  		v_2_0_0 := v_2_0.Args[0]
 14502  		if v_2_0_0.Op != OpARM64NEG || v_2_0_0.Type != typ.UInt64 {
 14503  			break
 14504  		}
 14505  		v_2_0_0_0 := v_2_0_0.Args[0]
 14506  		if v_2_0_0_0.Op != OpARM64NGCzerocarry || v_2_0_0_0.Type != typ.UInt64 {
 14507  			break
 14508  		}
 14509  		bo := v_2_0_0_0.Args[0]
 14510  		v.reset(OpARM64SBCSflags)
 14511  		v.AddArg3(x, y, bo)
 14512  		return true
 14513  	}
 14514  	// match: (SBCSflags x y (Select1 <types.TypeFlags> (NEGSflags (MOVDconst [0]))))
 14515  	// result: (SUBSflags x y)
 14516  	for {
 14517  		x := v_0
 14518  		y := v_1
 14519  		if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
 14520  			break
 14521  		}
 14522  		v_2_0 := v_2.Args[0]
 14523  		if v_2_0.Op != OpARM64NEGSflags {
 14524  			break
 14525  		}
 14526  		v_2_0_0 := v_2_0.Args[0]
 14527  		if v_2_0_0.Op != OpARM64MOVDconst || auxIntToInt64(v_2_0_0.AuxInt) != 0 {
 14528  			break
 14529  		}
 14530  		v.reset(OpARM64SUBSflags)
 14531  		v.AddArg2(x, y)
 14532  		return true
 14533  	}
 14534  	return false
 14535  }
 14536  func rewriteValueARM64_OpARM64SBFX(v *Value) bool {
 14537  	v_0 := v.Args[0]
 14538  	// match: (SBFX [bfc] s:(SLLconst [sc] x))
 14539  	// cond: s.Uses == 1 && sc <= bfc.lsb()
 14540  	// result: (SBFX [armBFAuxInt(bfc.lsb() - sc, bfc.width())] x)
 14541  	for {
 14542  		bfc := auxIntToArm64BitField(v.AuxInt)
 14543  		s := v_0
 14544  		if s.Op != OpARM64SLLconst {
 14545  			break
 14546  		}
 14547  		sc := auxIntToInt64(s.AuxInt)
 14548  		x := s.Args[0]
 14549  		if !(s.Uses == 1 && sc <= bfc.lsb()) {
 14550  			break
 14551  		}
 14552  		v.reset(OpARM64SBFX)
 14553  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
 14554  		v.AddArg(x)
 14555  		return true
 14556  	}
 14557  	// match: (SBFX [bfc] s:(SLLconst [sc] x))
 14558  	// cond: s.Uses == 1 && sc > bfc.lsb()
 14559  	// result: (SBFIZ [armBFAuxInt(sc - bfc.lsb(), bfc.width() - (sc-bfc.lsb()))] x)
 14560  	for {
 14561  		bfc := auxIntToArm64BitField(v.AuxInt)
 14562  		s := v_0
 14563  		if s.Op != OpARM64SLLconst {
 14564  			break
 14565  		}
 14566  		sc := auxIntToInt64(s.AuxInt)
 14567  		x := s.Args[0]
 14568  		if !(s.Uses == 1 && sc > bfc.lsb()) {
 14569  			break
 14570  		}
 14571  		v.reset(OpARM64SBFIZ)
 14572  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.width()-(sc-bfc.lsb())))
 14573  		v.AddArg(x)
 14574  		return true
 14575  	}
 14576  	return false
 14577  }
 14578  func rewriteValueARM64_OpARM64SLL(v *Value) bool {
 14579  	v_1 := v.Args[1]
 14580  	v_0 := v.Args[0]
 14581  	// match: (SLL x (MOVDconst [c]))
 14582  	// result: (SLLconst x [c&63])
 14583  	for {
 14584  		x := v_0
 14585  		if v_1.Op != OpARM64MOVDconst {
 14586  			break
 14587  		}
 14588  		c := auxIntToInt64(v_1.AuxInt)
 14589  		v.reset(OpARM64SLLconst)
 14590  		v.AuxInt = int64ToAuxInt(c & 63)
 14591  		v.AddArg(x)
 14592  		return true
 14593  	}
 14594  	// match: (SLL x (ANDconst [63] y))
 14595  	// result: (SLL x y)
 14596  	for {
 14597  		x := v_0
 14598  		if v_1.Op != OpARM64ANDconst || auxIntToInt64(v_1.AuxInt) != 63 {
 14599  			break
 14600  		}
 14601  		y := v_1.Args[0]
 14602  		v.reset(OpARM64SLL)
 14603  		v.AddArg2(x, y)
 14604  		return true
 14605  	}
 14606  	return false
 14607  }
 14608  func rewriteValueARM64_OpARM64SLLconst(v *Value) bool {
 14609  	v_0 := v.Args[0]
 14610  	// match: (SLLconst [c] (MOVDconst [d]))
 14611  	// result: (MOVDconst [d<<uint64(c)])
 14612  	for {
 14613  		c := auxIntToInt64(v.AuxInt)
 14614  		if v_0.Op != OpARM64MOVDconst {
 14615  			break
 14616  		}
 14617  		d := auxIntToInt64(v_0.AuxInt)
 14618  		v.reset(OpARM64MOVDconst)
 14619  		v.AuxInt = int64ToAuxInt(d << uint64(c))
 14620  		return true
 14621  	}
 14622  	// match: (SLLconst [c] (SRLconst [c] x))
 14623  	// cond: 0 < c && c < 64
 14624  	// result: (ANDconst [^(1<<uint(c)-1)] x)
 14625  	for {
 14626  		c := auxIntToInt64(v.AuxInt)
 14627  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
 14628  			break
 14629  		}
 14630  		x := v_0.Args[0]
 14631  		if !(0 < c && c < 64) {
 14632  			break
 14633  		}
 14634  		v.reset(OpARM64ANDconst)
 14635  		v.AuxInt = int64ToAuxInt(^(1<<uint(c) - 1))
 14636  		v.AddArg(x)
 14637  		return true
 14638  	}
 14639  	// match: (SLLconst [lc] (MOVWreg x))
 14640  	// result: (SBFIZ [armBFAuxInt(lc, min(32, 64-lc))] x)
 14641  	for {
 14642  		lc := auxIntToInt64(v.AuxInt)
 14643  		if v_0.Op != OpARM64MOVWreg {
 14644  			break
 14645  		}
 14646  		x := v_0.Args[0]
 14647  		v.reset(OpARM64SBFIZ)
 14648  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(32, 64-lc)))
 14649  		v.AddArg(x)
 14650  		return true
 14651  	}
 14652  	// match: (SLLconst [lc] (MOVHreg x))
 14653  	// result: (SBFIZ [armBFAuxInt(lc, min(16, 64-lc))] x)
 14654  	for {
 14655  		lc := auxIntToInt64(v.AuxInt)
 14656  		if v_0.Op != OpARM64MOVHreg {
 14657  			break
 14658  		}
 14659  		x := v_0.Args[0]
 14660  		v.reset(OpARM64SBFIZ)
 14661  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(16, 64-lc)))
 14662  		v.AddArg(x)
 14663  		return true
 14664  	}
 14665  	// match: (SLLconst [lc] (MOVBreg x))
 14666  	// result: (SBFIZ [armBFAuxInt(lc, min(8, 64-lc))] x)
 14667  	for {
 14668  		lc := auxIntToInt64(v.AuxInt)
 14669  		if v_0.Op != OpARM64MOVBreg {
 14670  			break
 14671  		}
 14672  		x := v_0.Args[0]
 14673  		v.reset(OpARM64SBFIZ)
 14674  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(8, 64-lc)))
 14675  		v.AddArg(x)
 14676  		return true
 14677  	}
 14678  	// match: (SLLconst [lc] (MOVWUreg x))
 14679  	// result: (UBFIZ [armBFAuxInt(lc, min(32, 64-lc))] x)
 14680  	for {
 14681  		lc := auxIntToInt64(v.AuxInt)
 14682  		if v_0.Op != OpARM64MOVWUreg {
 14683  			break
 14684  		}
 14685  		x := v_0.Args[0]
 14686  		v.reset(OpARM64UBFIZ)
 14687  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(32, 64-lc)))
 14688  		v.AddArg(x)
 14689  		return true
 14690  	}
 14691  	// match: (SLLconst [lc] (MOVHUreg x))
 14692  	// result: (UBFIZ [armBFAuxInt(lc, min(16, 64-lc))] x)
 14693  	for {
 14694  		lc := auxIntToInt64(v.AuxInt)
 14695  		if v_0.Op != OpARM64MOVHUreg {
 14696  			break
 14697  		}
 14698  		x := v_0.Args[0]
 14699  		v.reset(OpARM64UBFIZ)
 14700  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(16, 64-lc)))
 14701  		v.AddArg(x)
 14702  		return true
 14703  	}
 14704  	// match: (SLLconst [lc] (MOVBUreg x))
 14705  	// result: (UBFIZ [armBFAuxInt(lc, min(8, 64-lc))] x)
 14706  	for {
 14707  		lc := auxIntToInt64(v.AuxInt)
 14708  		if v_0.Op != OpARM64MOVBUreg {
 14709  			break
 14710  		}
 14711  		x := v_0.Args[0]
 14712  		v.reset(OpARM64UBFIZ)
 14713  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(8, 64-lc)))
 14714  		v.AddArg(x)
 14715  		return true
 14716  	}
 14717  	// match: (SLLconst [sc] (ANDconst [ac] x))
 14718  	// cond: isARM64BFMask(sc, ac, 0)
 14719  	// result: (UBFIZ [armBFAuxInt(sc, arm64BFWidth(ac, 0))] x)
 14720  	for {
 14721  		sc := auxIntToInt64(v.AuxInt)
 14722  		if v_0.Op != OpARM64ANDconst {
 14723  			break
 14724  		}
 14725  		ac := auxIntToInt64(v_0.AuxInt)
 14726  		x := v_0.Args[0]
 14727  		if !(isARM64BFMask(sc, ac, 0)) {
 14728  			break
 14729  		}
 14730  		v.reset(OpARM64UBFIZ)
 14731  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, 0)))
 14732  		v.AddArg(x)
 14733  		return true
 14734  	}
 14735  	// match: (SLLconst [sc] (UBFIZ [bfc] x))
 14736  	// cond: sc+bfc.width()+bfc.lsb() < 64
 14737  	// result: (UBFIZ [armBFAuxInt(bfc.lsb()+sc, bfc.width())] x)
 14738  	for {
 14739  		sc := auxIntToInt64(v.AuxInt)
 14740  		if v_0.Op != OpARM64UBFIZ {
 14741  			break
 14742  		}
 14743  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 14744  		x := v_0.Args[0]
 14745  		if !(sc+bfc.width()+bfc.lsb() < 64) {
 14746  			break
 14747  		}
 14748  		v.reset(OpARM64UBFIZ)
 14749  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()))
 14750  		v.AddArg(x)
 14751  		return true
 14752  	}
 14753  	return false
 14754  }
 14755  func rewriteValueARM64_OpARM64SRA(v *Value) bool {
 14756  	v_1 := v.Args[1]
 14757  	v_0 := v.Args[0]
 14758  	// match: (SRA x (MOVDconst [c]))
 14759  	// result: (SRAconst x [c&63])
 14760  	for {
 14761  		x := v_0
 14762  		if v_1.Op != OpARM64MOVDconst {
 14763  			break
 14764  		}
 14765  		c := auxIntToInt64(v_1.AuxInt)
 14766  		v.reset(OpARM64SRAconst)
 14767  		v.AuxInt = int64ToAuxInt(c & 63)
 14768  		v.AddArg(x)
 14769  		return true
 14770  	}
 14771  	// match: (SRA x (ANDconst [63] y))
 14772  	// result: (SRA x y)
 14773  	for {
 14774  		x := v_0
 14775  		if v_1.Op != OpARM64ANDconst || auxIntToInt64(v_1.AuxInt) != 63 {
 14776  			break
 14777  		}
 14778  		y := v_1.Args[0]
 14779  		v.reset(OpARM64SRA)
 14780  		v.AddArg2(x, y)
 14781  		return true
 14782  	}
 14783  	return false
 14784  }
 14785  func rewriteValueARM64_OpARM64SRAconst(v *Value) bool {
 14786  	v_0 := v.Args[0]
 14787  	// match: (SRAconst [c] (MOVDconst [d]))
 14788  	// result: (MOVDconst [d>>uint64(c)])
 14789  	for {
 14790  		c := auxIntToInt64(v.AuxInt)
 14791  		if v_0.Op != OpARM64MOVDconst {
 14792  			break
 14793  		}
 14794  		d := auxIntToInt64(v_0.AuxInt)
 14795  		v.reset(OpARM64MOVDconst)
 14796  		v.AuxInt = int64ToAuxInt(d >> uint64(c))
 14797  		return true
 14798  	}
 14799  	// match: (SRAconst [rc] (SLLconst [lc] x))
 14800  	// cond: lc > rc
 14801  	// result: (SBFIZ [armBFAuxInt(lc-rc, 64-lc)] x)
 14802  	for {
 14803  		rc := auxIntToInt64(v.AuxInt)
 14804  		if v_0.Op != OpARM64SLLconst {
 14805  			break
 14806  		}
 14807  		lc := auxIntToInt64(v_0.AuxInt)
 14808  		x := v_0.Args[0]
 14809  		if !(lc > rc) {
 14810  			break
 14811  		}
 14812  		v.reset(OpARM64SBFIZ)
 14813  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc-rc, 64-lc))
 14814  		v.AddArg(x)
 14815  		return true
 14816  	}
 14817  	// match: (SRAconst [rc] (SLLconst [lc] x))
 14818  	// cond: lc <= rc
 14819  	// result: (SBFX [armBFAuxInt(rc-lc, 64-rc)] x)
 14820  	for {
 14821  		rc := auxIntToInt64(v.AuxInt)
 14822  		if v_0.Op != OpARM64SLLconst {
 14823  			break
 14824  		}
 14825  		lc := auxIntToInt64(v_0.AuxInt)
 14826  		x := v_0.Args[0]
 14827  		if !(lc <= rc) {
 14828  			break
 14829  		}
 14830  		v.reset(OpARM64SBFX)
 14831  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc-lc, 64-rc))
 14832  		v.AddArg(x)
 14833  		return true
 14834  	}
 14835  	// match: (SRAconst [rc] (MOVWreg x))
 14836  	// cond: rc < 32
 14837  	// result: (SBFX [armBFAuxInt(rc, 32-rc)] x)
 14838  	for {
 14839  		rc := auxIntToInt64(v.AuxInt)
 14840  		if v_0.Op != OpARM64MOVWreg {
 14841  			break
 14842  		}
 14843  		x := v_0.Args[0]
 14844  		if !(rc < 32) {
 14845  			break
 14846  		}
 14847  		v.reset(OpARM64SBFX)
 14848  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 32-rc))
 14849  		v.AddArg(x)
 14850  		return true
 14851  	}
 14852  	// match: (SRAconst [rc] (MOVHreg x))
 14853  	// cond: rc < 16
 14854  	// result: (SBFX [armBFAuxInt(rc, 16-rc)] x)
 14855  	for {
 14856  		rc := auxIntToInt64(v.AuxInt)
 14857  		if v_0.Op != OpARM64MOVHreg {
 14858  			break
 14859  		}
 14860  		x := v_0.Args[0]
 14861  		if !(rc < 16) {
 14862  			break
 14863  		}
 14864  		v.reset(OpARM64SBFX)
 14865  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 16-rc))
 14866  		v.AddArg(x)
 14867  		return true
 14868  	}
 14869  	// match: (SRAconst [rc] (MOVBreg x))
 14870  	// cond: rc < 8
 14871  	// result: (SBFX [armBFAuxInt(rc, 8-rc)] x)
 14872  	for {
 14873  		rc := auxIntToInt64(v.AuxInt)
 14874  		if v_0.Op != OpARM64MOVBreg {
 14875  			break
 14876  		}
 14877  		x := v_0.Args[0]
 14878  		if !(rc < 8) {
 14879  			break
 14880  		}
 14881  		v.reset(OpARM64SBFX)
 14882  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 8-rc))
 14883  		v.AddArg(x)
 14884  		return true
 14885  	}
 14886  	// match: (SRAconst [sc] (SBFIZ [bfc] x))
 14887  	// cond: sc < bfc.lsb()
 14888  	// result: (SBFIZ [armBFAuxInt(bfc.lsb()-sc, bfc.width())] x)
 14889  	for {
 14890  		sc := auxIntToInt64(v.AuxInt)
 14891  		if v_0.Op != OpARM64SBFIZ {
 14892  			break
 14893  		}
 14894  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 14895  		x := v_0.Args[0]
 14896  		if !(sc < bfc.lsb()) {
 14897  			break
 14898  		}
 14899  		v.reset(OpARM64SBFIZ)
 14900  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
 14901  		v.AddArg(x)
 14902  		return true
 14903  	}
 14904  	// match: (SRAconst [sc] (SBFIZ [bfc] x))
 14905  	// cond: sc >= bfc.lsb() && sc < bfc.lsb()+bfc.width()
 14906  	// result: (SBFX [armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc)] x)
 14907  	for {
 14908  		sc := auxIntToInt64(v.AuxInt)
 14909  		if v_0.Op != OpARM64SBFIZ {
 14910  			break
 14911  		}
 14912  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 14913  		x := v_0.Args[0]
 14914  		if !(sc >= bfc.lsb() && sc < bfc.lsb()+bfc.width()) {
 14915  			break
 14916  		}
 14917  		v.reset(OpARM64SBFX)
 14918  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc))
 14919  		v.AddArg(x)
 14920  		return true
 14921  	}
 14922  	return false
 14923  }
 14924  func rewriteValueARM64_OpARM64SRL(v *Value) bool {
 14925  	v_1 := v.Args[1]
 14926  	v_0 := v.Args[0]
 14927  	// match: (SRL x (MOVDconst [c]))
 14928  	// result: (SRLconst x [c&63])
 14929  	for {
 14930  		x := v_0
 14931  		if v_1.Op != OpARM64MOVDconst {
 14932  			break
 14933  		}
 14934  		c := auxIntToInt64(v_1.AuxInt)
 14935  		v.reset(OpARM64SRLconst)
 14936  		v.AuxInt = int64ToAuxInt(c & 63)
 14937  		v.AddArg(x)
 14938  		return true
 14939  	}
 14940  	// match: (SRL x (ANDconst [63] y))
 14941  	// result: (SRL x y)
 14942  	for {
 14943  		x := v_0
 14944  		if v_1.Op != OpARM64ANDconst || auxIntToInt64(v_1.AuxInt) != 63 {
 14945  			break
 14946  		}
 14947  		y := v_1.Args[0]
 14948  		v.reset(OpARM64SRL)
 14949  		v.AddArg2(x, y)
 14950  		return true
 14951  	}
 14952  	return false
 14953  }
 14954  func rewriteValueARM64_OpARM64SRLconst(v *Value) bool {
 14955  	v_0 := v.Args[0]
 14956  	// match: (SRLconst [c] (MOVDconst [d]))
 14957  	// result: (MOVDconst [int64(uint64(d)>>uint64(c))])
 14958  	for {
 14959  		c := auxIntToInt64(v.AuxInt)
 14960  		if v_0.Op != OpARM64MOVDconst {
 14961  			break
 14962  		}
 14963  		d := auxIntToInt64(v_0.AuxInt)
 14964  		v.reset(OpARM64MOVDconst)
 14965  		v.AuxInt = int64ToAuxInt(int64(uint64(d) >> uint64(c)))
 14966  		return true
 14967  	}
 14968  	// match: (SRLconst [c] (SLLconst [c] x))
 14969  	// cond: 0 < c && c < 64
 14970  	// result: (ANDconst [1<<uint(64-c)-1] x)
 14971  	for {
 14972  		c := auxIntToInt64(v.AuxInt)
 14973  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
 14974  			break
 14975  		}
 14976  		x := v_0.Args[0]
 14977  		if !(0 < c && c < 64) {
 14978  			break
 14979  		}
 14980  		v.reset(OpARM64ANDconst)
 14981  		v.AuxInt = int64ToAuxInt(1<<uint(64-c) - 1)
 14982  		v.AddArg(x)
 14983  		return true
 14984  	}
 14985  	// match: (SRLconst [rc] (MOVWUreg x))
 14986  	// cond: rc >= 32
 14987  	// result: (MOVDconst [0])
 14988  	for {
 14989  		rc := auxIntToInt64(v.AuxInt)
 14990  		if v_0.Op != OpARM64MOVWUreg {
 14991  			break
 14992  		}
 14993  		if !(rc >= 32) {
 14994  			break
 14995  		}
 14996  		v.reset(OpARM64MOVDconst)
 14997  		v.AuxInt = int64ToAuxInt(0)
 14998  		return true
 14999  	}
 15000  	// match: (SRLconst [rc] (MOVHUreg x))
 15001  	// cond: rc >= 16
 15002  	// result: (MOVDconst [0])
 15003  	for {
 15004  		rc := auxIntToInt64(v.AuxInt)
 15005  		if v_0.Op != OpARM64MOVHUreg {
 15006  			break
 15007  		}
 15008  		if !(rc >= 16) {
 15009  			break
 15010  		}
 15011  		v.reset(OpARM64MOVDconst)
 15012  		v.AuxInt = int64ToAuxInt(0)
 15013  		return true
 15014  	}
 15015  	// match: (SRLconst [rc] (MOVBUreg x))
 15016  	// cond: rc >= 8
 15017  	// result: (MOVDconst [0])
 15018  	for {
 15019  		rc := auxIntToInt64(v.AuxInt)
 15020  		if v_0.Op != OpARM64MOVBUreg {
 15021  			break
 15022  		}
 15023  		if !(rc >= 8) {
 15024  			break
 15025  		}
 15026  		v.reset(OpARM64MOVDconst)
 15027  		v.AuxInt = int64ToAuxInt(0)
 15028  		return true
 15029  	}
 15030  	// match: (SRLconst [rc] (SLLconst [lc] x))
 15031  	// cond: lc > rc
 15032  	// result: (UBFIZ [armBFAuxInt(lc-rc, 64-lc)] x)
 15033  	for {
 15034  		rc := auxIntToInt64(v.AuxInt)
 15035  		if v_0.Op != OpARM64SLLconst {
 15036  			break
 15037  		}
 15038  		lc := auxIntToInt64(v_0.AuxInt)
 15039  		x := v_0.Args[0]
 15040  		if !(lc > rc) {
 15041  			break
 15042  		}
 15043  		v.reset(OpARM64UBFIZ)
 15044  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc-rc, 64-lc))
 15045  		v.AddArg(x)
 15046  		return true
 15047  	}
 15048  	// match: (SRLconst [rc] (SLLconst [lc] x))
 15049  	// cond: lc < rc
 15050  	// result: (UBFX [armBFAuxInt(rc-lc, 64-rc)] x)
 15051  	for {
 15052  		rc := auxIntToInt64(v.AuxInt)
 15053  		if v_0.Op != OpARM64SLLconst {
 15054  			break
 15055  		}
 15056  		lc := auxIntToInt64(v_0.AuxInt)
 15057  		x := v_0.Args[0]
 15058  		if !(lc < rc) {
 15059  			break
 15060  		}
 15061  		v.reset(OpARM64UBFX)
 15062  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc-lc, 64-rc))
 15063  		v.AddArg(x)
 15064  		return true
 15065  	}
 15066  	// match: (SRLconst [rc] (MOVWUreg x))
 15067  	// cond: rc < 32
 15068  	// result: (UBFX [armBFAuxInt(rc, 32-rc)] x)
 15069  	for {
 15070  		rc := auxIntToInt64(v.AuxInt)
 15071  		if v_0.Op != OpARM64MOVWUreg {
 15072  			break
 15073  		}
 15074  		x := v_0.Args[0]
 15075  		if !(rc < 32) {
 15076  			break
 15077  		}
 15078  		v.reset(OpARM64UBFX)
 15079  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 32-rc))
 15080  		v.AddArg(x)
 15081  		return true
 15082  	}
 15083  	// match: (SRLconst [rc] (MOVHUreg x))
 15084  	// cond: rc < 16
 15085  	// result: (UBFX [armBFAuxInt(rc, 16-rc)] x)
 15086  	for {
 15087  		rc := auxIntToInt64(v.AuxInt)
 15088  		if v_0.Op != OpARM64MOVHUreg {
 15089  			break
 15090  		}
 15091  		x := v_0.Args[0]
 15092  		if !(rc < 16) {
 15093  			break
 15094  		}
 15095  		v.reset(OpARM64UBFX)
 15096  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 16-rc))
 15097  		v.AddArg(x)
 15098  		return true
 15099  	}
 15100  	// match: (SRLconst [rc] (MOVBUreg x))
 15101  	// cond: rc < 8
 15102  	// result: (UBFX [armBFAuxInt(rc, 8-rc)] x)
 15103  	for {
 15104  		rc := auxIntToInt64(v.AuxInt)
 15105  		if v_0.Op != OpARM64MOVBUreg {
 15106  			break
 15107  		}
 15108  		x := v_0.Args[0]
 15109  		if !(rc < 8) {
 15110  			break
 15111  		}
 15112  		v.reset(OpARM64UBFX)
 15113  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 8-rc))
 15114  		v.AddArg(x)
 15115  		return true
 15116  	}
 15117  	// match: (SRLconst [sc] (ANDconst [ac] x))
 15118  	// cond: isARM64BFMask(sc, ac, sc)
 15119  	// result: (UBFX [armBFAuxInt(sc, arm64BFWidth(ac, sc))] x)
 15120  	for {
 15121  		sc := auxIntToInt64(v.AuxInt)
 15122  		if v_0.Op != OpARM64ANDconst {
 15123  			break
 15124  		}
 15125  		ac := auxIntToInt64(v_0.AuxInt)
 15126  		x := v_0.Args[0]
 15127  		if !(isARM64BFMask(sc, ac, sc)) {
 15128  			break
 15129  		}
 15130  		v.reset(OpARM64UBFX)
 15131  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, sc)))
 15132  		v.AddArg(x)
 15133  		return true
 15134  	}
 15135  	// match: (SRLconst [sc] (UBFX [bfc] x))
 15136  	// cond: sc < bfc.width()
 15137  	// result: (UBFX [armBFAuxInt(bfc.lsb()+sc, bfc.width()-sc)] x)
 15138  	for {
 15139  		sc := auxIntToInt64(v.AuxInt)
 15140  		if v_0.Op != OpARM64UBFX {
 15141  			break
 15142  		}
 15143  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 15144  		x := v_0.Args[0]
 15145  		if !(sc < bfc.width()) {
 15146  			break
 15147  		}
 15148  		v.reset(OpARM64UBFX)
 15149  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()-sc))
 15150  		v.AddArg(x)
 15151  		return true
 15152  	}
 15153  	// match: (SRLconst [sc] (UBFIZ [bfc] x))
 15154  	// cond: sc == bfc.lsb()
 15155  	// result: (ANDconst [1<<uint(bfc.width())-1] x)
 15156  	for {
 15157  		sc := auxIntToInt64(v.AuxInt)
 15158  		if v_0.Op != OpARM64UBFIZ {
 15159  			break
 15160  		}
 15161  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 15162  		x := v_0.Args[0]
 15163  		if !(sc == bfc.lsb()) {
 15164  			break
 15165  		}
 15166  		v.reset(OpARM64ANDconst)
 15167  		v.AuxInt = int64ToAuxInt(1<<uint(bfc.width()) - 1)
 15168  		v.AddArg(x)
 15169  		return true
 15170  	}
 15171  	// match: (SRLconst [sc] (UBFIZ [bfc] x))
 15172  	// cond: sc < bfc.lsb()
 15173  	// result: (UBFIZ [armBFAuxInt(bfc.lsb()-sc, bfc.width())] x)
 15174  	for {
 15175  		sc := auxIntToInt64(v.AuxInt)
 15176  		if v_0.Op != OpARM64UBFIZ {
 15177  			break
 15178  		}
 15179  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 15180  		x := v_0.Args[0]
 15181  		if !(sc < bfc.lsb()) {
 15182  			break
 15183  		}
 15184  		v.reset(OpARM64UBFIZ)
 15185  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
 15186  		v.AddArg(x)
 15187  		return true
 15188  	}
 15189  	// match: (SRLconst [sc] (UBFIZ [bfc] x))
 15190  	// cond: sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()
 15191  	// result: (UBFX [armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc)] x)
 15192  	for {
 15193  		sc := auxIntToInt64(v.AuxInt)
 15194  		if v_0.Op != OpARM64UBFIZ {
 15195  			break
 15196  		}
 15197  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 15198  		x := v_0.Args[0]
 15199  		if !(sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()) {
 15200  			break
 15201  		}
 15202  		v.reset(OpARM64UBFX)
 15203  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc))
 15204  		v.AddArg(x)
 15205  		return true
 15206  	}
 15207  	return false
 15208  }
 15209  func rewriteValueARM64_OpARM64STP(v *Value) bool {
 15210  	v_3 := v.Args[3]
 15211  	v_2 := v.Args[2]
 15212  	v_1 := v.Args[1]
 15213  	v_0 := v.Args[0]
 15214  	b := v.Block
 15215  	config := b.Func.Config
 15216  	// match: (STP [off1] {sym} (ADDconst [off2] ptr) val1 val2 mem)
 15217  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 15218  	// result: (STP [off1+int32(off2)] {sym} ptr val1 val2 mem)
 15219  	for {
 15220  		off1 := auxIntToInt32(v.AuxInt)
 15221  		sym := auxToSym(v.Aux)
 15222  		if v_0.Op != OpARM64ADDconst {
 15223  			break
 15224  		}
 15225  		off2 := auxIntToInt64(v_0.AuxInt)
 15226  		ptr := v_0.Args[0]
 15227  		val1 := v_1
 15228  		val2 := v_2
 15229  		mem := v_3
 15230  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 15231  			break
 15232  		}
 15233  		v.reset(OpARM64STP)
 15234  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 15235  		v.Aux = symToAux(sym)
 15236  		v.AddArg4(ptr, val1, val2, mem)
 15237  		return true
 15238  	}
 15239  	// match: (STP [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val1 val2 mem)
 15240  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 15241  	// result: (STP [off1+off2] {mergeSym(sym1,sym2)} ptr val1 val2 mem)
 15242  	for {
 15243  		off1 := auxIntToInt32(v.AuxInt)
 15244  		sym1 := auxToSym(v.Aux)
 15245  		if v_0.Op != OpARM64MOVDaddr {
 15246  			break
 15247  		}
 15248  		off2 := auxIntToInt32(v_0.AuxInt)
 15249  		sym2 := auxToSym(v_0.Aux)
 15250  		ptr := v_0.Args[0]
 15251  		val1 := v_1
 15252  		val2 := v_2
 15253  		mem := v_3
 15254  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 15255  			break
 15256  		}
 15257  		v.reset(OpARM64STP)
 15258  		v.AuxInt = int32ToAuxInt(off1 + off2)
 15259  		v.Aux = symToAux(mergeSym(sym1, sym2))
 15260  		v.AddArg4(ptr, val1, val2, mem)
 15261  		return true
 15262  	}
 15263  	return false
 15264  }
 15265  func rewriteValueARM64_OpARM64SUB(v *Value) bool {
 15266  	v_1 := v.Args[1]
 15267  	v_0 := v.Args[0]
 15268  	b := v.Block
 15269  	// match: (SUB x (MOVDconst [c]))
 15270  	// result: (SUBconst [c] x)
 15271  	for {
 15272  		x := v_0
 15273  		if v_1.Op != OpARM64MOVDconst {
 15274  			break
 15275  		}
 15276  		c := auxIntToInt64(v_1.AuxInt)
 15277  		v.reset(OpARM64SUBconst)
 15278  		v.AuxInt = int64ToAuxInt(c)
 15279  		v.AddArg(x)
 15280  		return true
 15281  	}
 15282  	// match: (SUB a l:(MUL x y))
 15283  	// cond: l.Uses==1 && clobber(l)
 15284  	// result: (MSUB a x y)
 15285  	for {
 15286  		a := v_0
 15287  		l := v_1
 15288  		if l.Op != OpARM64MUL {
 15289  			break
 15290  		}
 15291  		y := l.Args[1]
 15292  		x := l.Args[0]
 15293  		if !(l.Uses == 1 && clobber(l)) {
 15294  			break
 15295  		}
 15296  		v.reset(OpARM64MSUB)
 15297  		v.AddArg3(a, x, y)
 15298  		return true
 15299  	}
 15300  	// match: (SUB a l:(MNEG x y))
 15301  	// cond: l.Uses==1 && clobber(l)
 15302  	// result: (MADD a x y)
 15303  	for {
 15304  		a := v_0
 15305  		l := v_1
 15306  		if l.Op != OpARM64MNEG {
 15307  			break
 15308  		}
 15309  		y := l.Args[1]
 15310  		x := l.Args[0]
 15311  		if !(l.Uses == 1 && clobber(l)) {
 15312  			break
 15313  		}
 15314  		v.reset(OpARM64MADD)
 15315  		v.AddArg3(a, x, y)
 15316  		return true
 15317  	}
 15318  	// match: (SUB a l:(MULW x y))
 15319  	// cond: v.Type.Size() <= 4 && l.Uses==1 && clobber(l)
 15320  	// result: (MSUBW a x y)
 15321  	for {
 15322  		a := v_0
 15323  		l := v_1
 15324  		if l.Op != OpARM64MULW {
 15325  			break
 15326  		}
 15327  		y := l.Args[1]
 15328  		x := l.Args[0]
 15329  		if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
 15330  			break
 15331  		}
 15332  		v.reset(OpARM64MSUBW)
 15333  		v.AddArg3(a, x, y)
 15334  		return true
 15335  	}
 15336  	// match: (SUB a l:(MNEGW x y))
 15337  	// cond: v.Type.Size() <= 4 && l.Uses==1 && clobber(l)
 15338  	// result: (MADDW a x y)
 15339  	for {
 15340  		a := v_0
 15341  		l := v_1
 15342  		if l.Op != OpARM64MNEGW {
 15343  			break
 15344  		}
 15345  		y := l.Args[1]
 15346  		x := l.Args[0]
 15347  		if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
 15348  			break
 15349  		}
 15350  		v.reset(OpARM64MADDW)
 15351  		v.AddArg3(a, x, y)
 15352  		return true
 15353  	}
 15354  	// match: (SUB <t> a p:(ADDconst [c] m:(MUL _ _)))
 15355  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 15356  	// result: (SUBconst [c] (SUB <v.Type> a m))
 15357  	for {
 15358  		t := v.Type
 15359  		a := v_0
 15360  		p := v_1
 15361  		if p.Op != OpARM64ADDconst {
 15362  			break
 15363  		}
 15364  		c := auxIntToInt64(p.AuxInt)
 15365  		m := p.Args[0]
 15366  		if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 15367  			break
 15368  		}
 15369  		v.reset(OpARM64SUBconst)
 15370  		v.AuxInt = int64ToAuxInt(c)
 15371  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 15372  		v0.AddArg2(a, m)
 15373  		v.AddArg(v0)
 15374  		return true
 15375  	}
 15376  	// match: (SUB <t> a p:(ADDconst [c] m:(MULW _ _)))
 15377  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 15378  	// result: (SUBconst [c] (SUB <v.Type> a m))
 15379  	for {
 15380  		t := v.Type
 15381  		a := v_0
 15382  		p := v_1
 15383  		if p.Op != OpARM64ADDconst {
 15384  			break
 15385  		}
 15386  		c := auxIntToInt64(p.AuxInt)
 15387  		m := p.Args[0]
 15388  		if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 15389  			break
 15390  		}
 15391  		v.reset(OpARM64SUBconst)
 15392  		v.AuxInt = int64ToAuxInt(c)
 15393  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 15394  		v0.AddArg2(a, m)
 15395  		v.AddArg(v0)
 15396  		return true
 15397  	}
 15398  	// match: (SUB <t> a p:(ADDconst [c] m:(MNEG _ _)))
 15399  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 15400  	// result: (SUBconst [c] (SUB <v.Type> a m))
 15401  	for {
 15402  		t := v.Type
 15403  		a := v_0
 15404  		p := v_1
 15405  		if p.Op != OpARM64ADDconst {
 15406  			break
 15407  		}
 15408  		c := auxIntToInt64(p.AuxInt)
 15409  		m := p.Args[0]
 15410  		if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 15411  			break
 15412  		}
 15413  		v.reset(OpARM64SUBconst)
 15414  		v.AuxInt = int64ToAuxInt(c)
 15415  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 15416  		v0.AddArg2(a, m)
 15417  		v.AddArg(v0)
 15418  		return true
 15419  	}
 15420  	// match: (SUB <t> a p:(ADDconst [c] m:(MNEGW _ _)))
 15421  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 15422  	// result: (SUBconst [c] (SUB <v.Type> a m))
 15423  	for {
 15424  		t := v.Type
 15425  		a := v_0
 15426  		p := v_1
 15427  		if p.Op != OpARM64ADDconst {
 15428  			break
 15429  		}
 15430  		c := auxIntToInt64(p.AuxInt)
 15431  		m := p.Args[0]
 15432  		if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 15433  			break
 15434  		}
 15435  		v.reset(OpARM64SUBconst)
 15436  		v.AuxInt = int64ToAuxInt(c)
 15437  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 15438  		v0.AddArg2(a, m)
 15439  		v.AddArg(v0)
 15440  		return true
 15441  	}
 15442  	// match: (SUB <t> a p:(SUBconst [c] m:(MUL _ _)))
 15443  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 15444  	// result: (ADDconst [c] (SUB <v.Type> a m))
 15445  	for {
 15446  		t := v.Type
 15447  		a := v_0
 15448  		p := v_1
 15449  		if p.Op != OpARM64SUBconst {
 15450  			break
 15451  		}
 15452  		c := auxIntToInt64(p.AuxInt)
 15453  		m := p.Args[0]
 15454  		if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 15455  			break
 15456  		}
 15457  		v.reset(OpARM64ADDconst)
 15458  		v.AuxInt = int64ToAuxInt(c)
 15459  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 15460  		v0.AddArg2(a, m)
 15461  		v.AddArg(v0)
 15462  		return true
 15463  	}
 15464  	// match: (SUB <t> a p:(SUBconst [c] m:(MULW _ _)))
 15465  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 15466  	// result: (ADDconst [c] (SUB <v.Type> a m))
 15467  	for {
 15468  		t := v.Type
 15469  		a := v_0
 15470  		p := v_1
 15471  		if p.Op != OpARM64SUBconst {
 15472  			break
 15473  		}
 15474  		c := auxIntToInt64(p.AuxInt)
 15475  		m := p.Args[0]
 15476  		if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 15477  			break
 15478  		}
 15479  		v.reset(OpARM64ADDconst)
 15480  		v.AuxInt = int64ToAuxInt(c)
 15481  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 15482  		v0.AddArg2(a, m)
 15483  		v.AddArg(v0)
 15484  		return true
 15485  	}
 15486  	// match: (SUB <t> a p:(SUBconst [c] m:(MNEG _ _)))
 15487  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 15488  	// result: (ADDconst [c] (SUB <v.Type> a m))
 15489  	for {
 15490  		t := v.Type
 15491  		a := v_0
 15492  		p := v_1
 15493  		if p.Op != OpARM64SUBconst {
 15494  			break
 15495  		}
 15496  		c := auxIntToInt64(p.AuxInt)
 15497  		m := p.Args[0]
 15498  		if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 15499  			break
 15500  		}
 15501  		v.reset(OpARM64ADDconst)
 15502  		v.AuxInt = int64ToAuxInt(c)
 15503  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 15504  		v0.AddArg2(a, m)
 15505  		v.AddArg(v0)
 15506  		return true
 15507  	}
 15508  	// match: (SUB <t> a p:(SUBconst [c] m:(MNEGW _ _)))
 15509  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 15510  	// result: (ADDconst [c] (SUB <v.Type> a m))
 15511  	for {
 15512  		t := v.Type
 15513  		a := v_0
 15514  		p := v_1
 15515  		if p.Op != OpARM64SUBconst {
 15516  			break
 15517  		}
 15518  		c := auxIntToInt64(p.AuxInt)
 15519  		m := p.Args[0]
 15520  		if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 15521  			break
 15522  		}
 15523  		v.reset(OpARM64ADDconst)
 15524  		v.AuxInt = int64ToAuxInt(c)
 15525  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 15526  		v0.AddArg2(a, m)
 15527  		v.AddArg(v0)
 15528  		return true
 15529  	}
 15530  	// match: (SUB x x)
 15531  	// result: (MOVDconst [0])
 15532  	for {
 15533  		x := v_0
 15534  		if x != v_1 {
 15535  			break
 15536  		}
 15537  		v.reset(OpARM64MOVDconst)
 15538  		v.AuxInt = int64ToAuxInt(0)
 15539  		return true
 15540  	}
 15541  	// match: (SUB x (SUB y z))
 15542  	// result: (SUB (ADD <v.Type> x z) y)
 15543  	for {
 15544  		x := v_0
 15545  		if v_1.Op != OpARM64SUB {
 15546  			break
 15547  		}
 15548  		z := v_1.Args[1]
 15549  		y := v_1.Args[0]
 15550  		v.reset(OpARM64SUB)
 15551  		v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
 15552  		v0.AddArg2(x, z)
 15553  		v.AddArg2(v0, y)
 15554  		return true
 15555  	}
 15556  	// match: (SUB (SUB x y) z)
 15557  	// result: (SUB x (ADD <y.Type> y z))
 15558  	for {
 15559  		if v_0.Op != OpARM64SUB {
 15560  			break
 15561  		}
 15562  		y := v_0.Args[1]
 15563  		x := v_0.Args[0]
 15564  		z := v_1
 15565  		v.reset(OpARM64SUB)
 15566  		v0 := b.NewValue0(v.Pos, OpARM64ADD, y.Type)
 15567  		v0.AddArg2(y, z)
 15568  		v.AddArg2(x, v0)
 15569  		return true
 15570  	}
 15571  	// match: (SUB x0 x1:(SLLconst [c] y))
 15572  	// cond: clobberIfDead(x1)
 15573  	// result: (SUBshiftLL x0 y [c])
 15574  	for {
 15575  		x0 := v_0
 15576  		x1 := v_1
 15577  		if x1.Op != OpARM64SLLconst {
 15578  			break
 15579  		}
 15580  		c := auxIntToInt64(x1.AuxInt)
 15581  		y := x1.Args[0]
 15582  		if !(clobberIfDead(x1)) {
 15583  			break
 15584  		}
 15585  		v.reset(OpARM64SUBshiftLL)
 15586  		v.AuxInt = int64ToAuxInt(c)
 15587  		v.AddArg2(x0, y)
 15588  		return true
 15589  	}
 15590  	// match: (SUB x0 x1:(SRLconst [c] y))
 15591  	// cond: clobberIfDead(x1)
 15592  	// result: (SUBshiftRL x0 y [c])
 15593  	for {
 15594  		x0 := v_0
 15595  		x1 := v_1
 15596  		if x1.Op != OpARM64SRLconst {
 15597  			break
 15598  		}
 15599  		c := auxIntToInt64(x1.AuxInt)
 15600  		y := x1.Args[0]
 15601  		if !(clobberIfDead(x1)) {
 15602  			break
 15603  		}
 15604  		v.reset(OpARM64SUBshiftRL)
 15605  		v.AuxInt = int64ToAuxInt(c)
 15606  		v.AddArg2(x0, y)
 15607  		return true
 15608  	}
 15609  	// match: (SUB x0 x1:(SRAconst [c] y))
 15610  	// cond: clobberIfDead(x1)
 15611  	// result: (SUBshiftRA x0 y [c])
 15612  	for {
 15613  		x0 := v_0
 15614  		x1 := v_1
 15615  		if x1.Op != OpARM64SRAconst {
 15616  			break
 15617  		}
 15618  		c := auxIntToInt64(x1.AuxInt)
 15619  		y := x1.Args[0]
 15620  		if !(clobberIfDead(x1)) {
 15621  			break
 15622  		}
 15623  		v.reset(OpARM64SUBshiftRA)
 15624  		v.AuxInt = int64ToAuxInt(c)
 15625  		v.AddArg2(x0, y)
 15626  		return true
 15627  	}
 15628  	return false
 15629  }
 15630  func rewriteValueARM64_OpARM64SUBconst(v *Value) bool {
 15631  	v_0 := v.Args[0]
 15632  	// match: (SUBconst [0] x)
 15633  	// result: x
 15634  	for {
 15635  		if auxIntToInt64(v.AuxInt) != 0 {
 15636  			break
 15637  		}
 15638  		x := v_0
 15639  		v.copyOf(x)
 15640  		return true
 15641  	}
 15642  	// match: (SUBconst [c] (MOVDconst [d]))
 15643  	// result: (MOVDconst [d-c])
 15644  	for {
 15645  		c := auxIntToInt64(v.AuxInt)
 15646  		if v_0.Op != OpARM64MOVDconst {
 15647  			break
 15648  		}
 15649  		d := auxIntToInt64(v_0.AuxInt)
 15650  		v.reset(OpARM64MOVDconst)
 15651  		v.AuxInt = int64ToAuxInt(d - c)
 15652  		return true
 15653  	}
 15654  	// match: (SUBconst [c] (SUBconst [d] x))
 15655  	// result: (ADDconst [-c-d] x)
 15656  	for {
 15657  		c := auxIntToInt64(v.AuxInt)
 15658  		if v_0.Op != OpARM64SUBconst {
 15659  			break
 15660  		}
 15661  		d := auxIntToInt64(v_0.AuxInt)
 15662  		x := v_0.Args[0]
 15663  		v.reset(OpARM64ADDconst)
 15664  		v.AuxInt = int64ToAuxInt(-c - d)
 15665  		v.AddArg(x)
 15666  		return true
 15667  	}
 15668  	// match: (SUBconst [c] (ADDconst [d] x))
 15669  	// result: (ADDconst [-c+d] x)
 15670  	for {
 15671  		c := auxIntToInt64(v.AuxInt)
 15672  		if v_0.Op != OpARM64ADDconst {
 15673  			break
 15674  		}
 15675  		d := auxIntToInt64(v_0.AuxInt)
 15676  		x := v_0.Args[0]
 15677  		v.reset(OpARM64ADDconst)
 15678  		v.AuxInt = int64ToAuxInt(-c + d)
 15679  		v.AddArg(x)
 15680  		return true
 15681  	}
 15682  	return false
 15683  }
 15684  func rewriteValueARM64_OpARM64SUBshiftLL(v *Value) bool {
 15685  	v_1 := v.Args[1]
 15686  	v_0 := v.Args[0]
 15687  	// match: (SUBshiftLL x (MOVDconst [c]) [d])
 15688  	// result: (SUBconst x [int64(uint64(c)<<uint64(d))])
 15689  	for {
 15690  		d := auxIntToInt64(v.AuxInt)
 15691  		x := v_0
 15692  		if v_1.Op != OpARM64MOVDconst {
 15693  			break
 15694  		}
 15695  		c := auxIntToInt64(v_1.AuxInt)
 15696  		v.reset(OpARM64SUBconst)
 15697  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
 15698  		v.AddArg(x)
 15699  		return true
 15700  	}
 15701  	// match: (SUBshiftLL (SLLconst x [c]) x [c])
 15702  	// result: (MOVDconst [0])
 15703  	for {
 15704  		c := auxIntToInt64(v.AuxInt)
 15705  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
 15706  			break
 15707  		}
 15708  		x := v_0.Args[0]
 15709  		if x != v_1 {
 15710  			break
 15711  		}
 15712  		v.reset(OpARM64MOVDconst)
 15713  		v.AuxInt = int64ToAuxInt(0)
 15714  		return true
 15715  	}
 15716  	return false
 15717  }
 15718  func rewriteValueARM64_OpARM64SUBshiftRA(v *Value) bool {
 15719  	v_1 := v.Args[1]
 15720  	v_0 := v.Args[0]
 15721  	// match: (SUBshiftRA x (MOVDconst [c]) [d])
 15722  	// result: (SUBconst x [c>>uint64(d)])
 15723  	for {
 15724  		d := auxIntToInt64(v.AuxInt)
 15725  		x := v_0
 15726  		if v_1.Op != OpARM64MOVDconst {
 15727  			break
 15728  		}
 15729  		c := auxIntToInt64(v_1.AuxInt)
 15730  		v.reset(OpARM64SUBconst)
 15731  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
 15732  		v.AddArg(x)
 15733  		return true
 15734  	}
 15735  	// match: (SUBshiftRA (SRAconst x [c]) x [c])
 15736  	// result: (MOVDconst [0])
 15737  	for {
 15738  		c := auxIntToInt64(v.AuxInt)
 15739  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
 15740  			break
 15741  		}
 15742  		x := v_0.Args[0]
 15743  		if x != v_1 {
 15744  			break
 15745  		}
 15746  		v.reset(OpARM64MOVDconst)
 15747  		v.AuxInt = int64ToAuxInt(0)
 15748  		return true
 15749  	}
 15750  	return false
 15751  }
 15752  func rewriteValueARM64_OpARM64SUBshiftRL(v *Value) bool {
 15753  	v_1 := v.Args[1]
 15754  	v_0 := v.Args[0]
 15755  	// match: (SUBshiftRL x (MOVDconst [c]) [d])
 15756  	// result: (SUBconst x [int64(uint64(c)>>uint64(d))])
 15757  	for {
 15758  		d := auxIntToInt64(v.AuxInt)
 15759  		x := v_0
 15760  		if v_1.Op != OpARM64MOVDconst {
 15761  			break
 15762  		}
 15763  		c := auxIntToInt64(v_1.AuxInt)
 15764  		v.reset(OpARM64SUBconst)
 15765  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
 15766  		v.AddArg(x)
 15767  		return true
 15768  	}
 15769  	// match: (SUBshiftRL (SRLconst x [c]) x [c])
 15770  	// result: (MOVDconst [0])
 15771  	for {
 15772  		c := auxIntToInt64(v.AuxInt)
 15773  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
 15774  			break
 15775  		}
 15776  		x := v_0.Args[0]
 15777  		if x != v_1 {
 15778  			break
 15779  		}
 15780  		v.reset(OpARM64MOVDconst)
 15781  		v.AuxInt = int64ToAuxInt(0)
 15782  		return true
 15783  	}
 15784  	return false
 15785  }
 15786  func rewriteValueARM64_OpARM64TST(v *Value) bool {
 15787  	v_1 := v.Args[1]
 15788  	v_0 := v.Args[0]
 15789  	// match: (TST x (MOVDconst [c]))
 15790  	// result: (TSTconst [c] x)
 15791  	for {
 15792  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 15793  			x := v_0
 15794  			if v_1.Op != OpARM64MOVDconst {
 15795  				continue
 15796  			}
 15797  			c := auxIntToInt64(v_1.AuxInt)
 15798  			v.reset(OpARM64TSTconst)
 15799  			v.AuxInt = int64ToAuxInt(c)
 15800  			v.AddArg(x)
 15801  			return true
 15802  		}
 15803  		break
 15804  	}
 15805  	// match: (TST x0 x1:(SLLconst [c] y))
 15806  	// cond: clobberIfDead(x1)
 15807  	// result: (TSTshiftLL x0 y [c])
 15808  	for {
 15809  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 15810  			x0 := v_0
 15811  			x1 := v_1
 15812  			if x1.Op != OpARM64SLLconst {
 15813  				continue
 15814  			}
 15815  			c := auxIntToInt64(x1.AuxInt)
 15816  			y := x1.Args[0]
 15817  			if !(clobberIfDead(x1)) {
 15818  				continue
 15819  			}
 15820  			v.reset(OpARM64TSTshiftLL)
 15821  			v.AuxInt = int64ToAuxInt(c)
 15822  			v.AddArg2(x0, y)
 15823  			return true
 15824  		}
 15825  		break
 15826  	}
 15827  	// match: (TST x0 x1:(SRLconst [c] y))
 15828  	// cond: clobberIfDead(x1)
 15829  	// result: (TSTshiftRL x0 y [c])
 15830  	for {
 15831  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 15832  			x0 := v_0
 15833  			x1 := v_1
 15834  			if x1.Op != OpARM64SRLconst {
 15835  				continue
 15836  			}
 15837  			c := auxIntToInt64(x1.AuxInt)
 15838  			y := x1.Args[0]
 15839  			if !(clobberIfDead(x1)) {
 15840  				continue
 15841  			}
 15842  			v.reset(OpARM64TSTshiftRL)
 15843  			v.AuxInt = int64ToAuxInt(c)
 15844  			v.AddArg2(x0, y)
 15845  			return true
 15846  		}
 15847  		break
 15848  	}
 15849  	// match: (TST x0 x1:(SRAconst [c] y))
 15850  	// cond: clobberIfDead(x1)
 15851  	// result: (TSTshiftRA x0 y [c])
 15852  	for {
 15853  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 15854  			x0 := v_0
 15855  			x1 := v_1
 15856  			if x1.Op != OpARM64SRAconst {
 15857  				continue
 15858  			}
 15859  			c := auxIntToInt64(x1.AuxInt)
 15860  			y := x1.Args[0]
 15861  			if !(clobberIfDead(x1)) {
 15862  				continue
 15863  			}
 15864  			v.reset(OpARM64TSTshiftRA)
 15865  			v.AuxInt = int64ToAuxInt(c)
 15866  			v.AddArg2(x0, y)
 15867  			return true
 15868  		}
 15869  		break
 15870  	}
 15871  	// match: (TST x0 x1:(RORconst [c] y))
 15872  	// cond: clobberIfDead(x1)
 15873  	// result: (TSTshiftRO x0 y [c])
 15874  	for {
 15875  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 15876  			x0 := v_0
 15877  			x1 := v_1
 15878  			if x1.Op != OpARM64RORconst {
 15879  				continue
 15880  			}
 15881  			c := auxIntToInt64(x1.AuxInt)
 15882  			y := x1.Args[0]
 15883  			if !(clobberIfDead(x1)) {
 15884  				continue
 15885  			}
 15886  			v.reset(OpARM64TSTshiftRO)
 15887  			v.AuxInt = int64ToAuxInt(c)
 15888  			v.AddArg2(x0, y)
 15889  			return true
 15890  		}
 15891  		break
 15892  	}
 15893  	return false
 15894  }
 15895  func rewriteValueARM64_OpARM64TSTW(v *Value) bool {
 15896  	v_1 := v.Args[1]
 15897  	v_0 := v.Args[0]
 15898  	// match: (TSTW x (MOVDconst [c]))
 15899  	// result: (TSTWconst [int32(c)] x)
 15900  	for {
 15901  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 15902  			x := v_0
 15903  			if v_1.Op != OpARM64MOVDconst {
 15904  				continue
 15905  			}
 15906  			c := auxIntToInt64(v_1.AuxInt)
 15907  			v.reset(OpARM64TSTWconst)
 15908  			v.AuxInt = int32ToAuxInt(int32(c))
 15909  			v.AddArg(x)
 15910  			return true
 15911  		}
 15912  		break
 15913  	}
 15914  	return false
 15915  }
 15916  func rewriteValueARM64_OpARM64TSTWconst(v *Value) bool {
 15917  	v_0 := v.Args[0]
 15918  	// match: (TSTWconst (MOVDconst [x]) [y])
 15919  	// result: (FlagConstant [logicFlags32(int32(x)&y)])
 15920  	for {
 15921  		y := auxIntToInt32(v.AuxInt)
 15922  		if v_0.Op != OpARM64MOVDconst {
 15923  			break
 15924  		}
 15925  		x := auxIntToInt64(v_0.AuxInt)
 15926  		v.reset(OpARM64FlagConstant)
 15927  		v.AuxInt = flagConstantToAuxInt(logicFlags32(int32(x) & y))
 15928  		return true
 15929  	}
 15930  	return false
 15931  }
 15932  func rewriteValueARM64_OpARM64TSTconst(v *Value) bool {
 15933  	v_0 := v.Args[0]
 15934  	// match: (TSTconst (MOVDconst [x]) [y])
 15935  	// result: (FlagConstant [logicFlags64(x&y)])
 15936  	for {
 15937  		y := auxIntToInt64(v.AuxInt)
 15938  		if v_0.Op != OpARM64MOVDconst {
 15939  			break
 15940  		}
 15941  		x := auxIntToInt64(v_0.AuxInt)
 15942  		v.reset(OpARM64FlagConstant)
 15943  		v.AuxInt = flagConstantToAuxInt(logicFlags64(x & y))
 15944  		return true
 15945  	}
 15946  	return false
 15947  }
 15948  func rewriteValueARM64_OpARM64TSTshiftLL(v *Value) bool {
 15949  	v_1 := v.Args[1]
 15950  	v_0 := v.Args[0]
 15951  	b := v.Block
 15952  	// match: (TSTshiftLL (MOVDconst [c]) x [d])
 15953  	// result: (TSTconst [c] (SLLconst <x.Type> x [d]))
 15954  	for {
 15955  		d := auxIntToInt64(v.AuxInt)
 15956  		if v_0.Op != OpARM64MOVDconst {
 15957  			break
 15958  		}
 15959  		c := auxIntToInt64(v_0.AuxInt)
 15960  		x := v_1
 15961  		v.reset(OpARM64TSTconst)
 15962  		v.AuxInt = int64ToAuxInt(c)
 15963  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 15964  		v0.AuxInt = int64ToAuxInt(d)
 15965  		v0.AddArg(x)
 15966  		v.AddArg(v0)
 15967  		return true
 15968  	}
 15969  	// match: (TSTshiftLL x (MOVDconst [c]) [d])
 15970  	// result: (TSTconst x [int64(uint64(c)<<uint64(d))])
 15971  	for {
 15972  		d := auxIntToInt64(v.AuxInt)
 15973  		x := v_0
 15974  		if v_1.Op != OpARM64MOVDconst {
 15975  			break
 15976  		}
 15977  		c := auxIntToInt64(v_1.AuxInt)
 15978  		v.reset(OpARM64TSTconst)
 15979  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
 15980  		v.AddArg(x)
 15981  		return true
 15982  	}
 15983  	return false
 15984  }
 15985  func rewriteValueARM64_OpARM64TSTshiftRA(v *Value) bool {
 15986  	v_1 := v.Args[1]
 15987  	v_0 := v.Args[0]
 15988  	b := v.Block
 15989  	// match: (TSTshiftRA (MOVDconst [c]) x [d])
 15990  	// result: (TSTconst [c] (SRAconst <x.Type> x [d]))
 15991  	for {
 15992  		d := auxIntToInt64(v.AuxInt)
 15993  		if v_0.Op != OpARM64MOVDconst {
 15994  			break
 15995  		}
 15996  		c := auxIntToInt64(v_0.AuxInt)
 15997  		x := v_1
 15998  		v.reset(OpARM64TSTconst)
 15999  		v.AuxInt = int64ToAuxInt(c)
 16000  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
 16001  		v0.AuxInt = int64ToAuxInt(d)
 16002  		v0.AddArg(x)
 16003  		v.AddArg(v0)
 16004  		return true
 16005  	}
 16006  	// match: (TSTshiftRA x (MOVDconst [c]) [d])
 16007  	// result: (TSTconst x [c>>uint64(d)])
 16008  	for {
 16009  		d := auxIntToInt64(v.AuxInt)
 16010  		x := v_0
 16011  		if v_1.Op != OpARM64MOVDconst {
 16012  			break
 16013  		}
 16014  		c := auxIntToInt64(v_1.AuxInt)
 16015  		v.reset(OpARM64TSTconst)
 16016  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
 16017  		v.AddArg(x)
 16018  		return true
 16019  	}
 16020  	return false
 16021  }
 16022  func rewriteValueARM64_OpARM64TSTshiftRL(v *Value) bool {
 16023  	v_1 := v.Args[1]
 16024  	v_0 := v.Args[0]
 16025  	b := v.Block
 16026  	// match: (TSTshiftRL (MOVDconst [c]) x [d])
 16027  	// result: (TSTconst [c] (SRLconst <x.Type> x [d]))
 16028  	for {
 16029  		d := auxIntToInt64(v.AuxInt)
 16030  		if v_0.Op != OpARM64MOVDconst {
 16031  			break
 16032  		}
 16033  		c := auxIntToInt64(v_0.AuxInt)
 16034  		x := v_1
 16035  		v.reset(OpARM64TSTconst)
 16036  		v.AuxInt = int64ToAuxInt(c)
 16037  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
 16038  		v0.AuxInt = int64ToAuxInt(d)
 16039  		v0.AddArg(x)
 16040  		v.AddArg(v0)
 16041  		return true
 16042  	}
 16043  	// match: (TSTshiftRL x (MOVDconst [c]) [d])
 16044  	// result: (TSTconst x [int64(uint64(c)>>uint64(d))])
 16045  	for {
 16046  		d := auxIntToInt64(v.AuxInt)
 16047  		x := v_0
 16048  		if v_1.Op != OpARM64MOVDconst {
 16049  			break
 16050  		}
 16051  		c := auxIntToInt64(v_1.AuxInt)
 16052  		v.reset(OpARM64TSTconst)
 16053  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
 16054  		v.AddArg(x)
 16055  		return true
 16056  	}
 16057  	return false
 16058  }
 16059  func rewriteValueARM64_OpARM64TSTshiftRO(v *Value) bool {
 16060  	v_1 := v.Args[1]
 16061  	v_0 := v.Args[0]
 16062  	b := v.Block
 16063  	// match: (TSTshiftRO (MOVDconst [c]) x [d])
 16064  	// result: (TSTconst [c] (RORconst <x.Type> x [d]))
 16065  	for {
 16066  		d := auxIntToInt64(v.AuxInt)
 16067  		if v_0.Op != OpARM64MOVDconst {
 16068  			break
 16069  		}
 16070  		c := auxIntToInt64(v_0.AuxInt)
 16071  		x := v_1
 16072  		v.reset(OpARM64TSTconst)
 16073  		v.AuxInt = int64ToAuxInt(c)
 16074  		v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
 16075  		v0.AuxInt = int64ToAuxInt(d)
 16076  		v0.AddArg(x)
 16077  		v.AddArg(v0)
 16078  		return true
 16079  	}
 16080  	// match: (TSTshiftRO x (MOVDconst [c]) [d])
 16081  	// result: (TSTconst x [rotateRight64(c, d)])
 16082  	for {
 16083  		d := auxIntToInt64(v.AuxInt)
 16084  		x := v_0
 16085  		if v_1.Op != OpARM64MOVDconst {
 16086  			break
 16087  		}
 16088  		c := auxIntToInt64(v_1.AuxInt)
 16089  		v.reset(OpARM64TSTconst)
 16090  		v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
 16091  		v.AddArg(x)
 16092  		return true
 16093  	}
 16094  	return false
 16095  }
 16096  func rewriteValueARM64_OpARM64UBFIZ(v *Value) bool {
 16097  	v_0 := v.Args[0]
 16098  	// match: (UBFIZ [bfc] (SLLconst [sc] x))
 16099  	// cond: sc < bfc.width()
 16100  	// result: (UBFIZ [armBFAuxInt(bfc.lsb()+sc, bfc.width()-sc)] x)
 16101  	for {
 16102  		bfc := auxIntToArm64BitField(v.AuxInt)
 16103  		if v_0.Op != OpARM64SLLconst {
 16104  			break
 16105  		}
 16106  		sc := auxIntToInt64(v_0.AuxInt)
 16107  		x := v_0.Args[0]
 16108  		if !(sc < bfc.width()) {
 16109  			break
 16110  		}
 16111  		v.reset(OpARM64UBFIZ)
 16112  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()-sc))
 16113  		v.AddArg(x)
 16114  		return true
 16115  	}
 16116  	return false
 16117  }
 16118  func rewriteValueARM64_OpARM64UBFX(v *Value) bool {
 16119  	v_0 := v.Args[0]
 16120  	// match: (UBFX [bfc] (ANDconst [c] x))
 16121  	// cond: isARM64BFMask(0, c, 0) && bfc.lsb() + bfc.width() <= arm64BFWidth(c, 0)
 16122  	// result: (UBFX [bfc] x)
 16123  	for {
 16124  		bfc := auxIntToArm64BitField(v.AuxInt)
 16125  		if v_0.Op != OpARM64ANDconst {
 16126  			break
 16127  		}
 16128  		c := auxIntToInt64(v_0.AuxInt)
 16129  		x := v_0.Args[0]
 16130  		if !(isARM64BFMask(0, c, 0) && bfc.lsb()+bfc.width() <= arm64BFWidth(c, 0)) {
 16131  			break
 16132  		}
 16133  		v.reset(OpARM64UBFX)
 16134  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 16135  		v.AddArg(x)
 16136  		return true
 16137  	}
 16138  	// match: (UBFX [bfc] e:(MOVWUreg x))
 16139  	// cond: e.Uses == 1 && bfc.lsb() < 32
 16140  	// result: (UBFX [armBFAuxInt(bfc.lsb(), min(bfc.width(), 32-bfc.lsb()))] x)
 16141  	for {
 16142  		bfc := auxIntToArm64BitField(v.AuxInt)
 16143  		e := v_0
 16144  		if e.Op != OpARM64MOVWUreg {
 16145  			break
 16146  		}
 16147  		x := e.Args[0]
 16148  		if !(e.Uses == 1 && bfc.lsb() < 32) {
 16149  			break
 16150  		}
 16151  		v.reset(OpARM64UBFX)
 16152  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), 32-bfc.lsb())))
 16153  		v.AddArg(x)
 16154  		return true
 16155  	}
 16156  	// match: (UBFX [bfc] e:(MOVHUreg x))
 16157  	// cond: e.Uses == 1 && bfc.lsb() < 16
 16158  	// result: (UBFX [armBFAuxInt(bfc.lsb(), min(bfc.width(), 16-bfc.lsb()))] x)
 16159  	for {
 16160  		bfc := auxIntToArm64BitField(v.AuxInt)
 16161  		e := v_0
 16162  		if e.Op != OpARM64MOVHUreg {
 16163  			break
 16164  		}
 16165  		x := e.Args[0]
 16166  		if !(e.Uses == 1 && bfc.lsb() < 16) {
 16167  			break
 16168  		}
 16169  		v.reset(OpARM64UBFX)
 16170  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), 16-bfc.lsb())))
 16171  		v.AddArg(x)
 16172  		return true
 16173  	}
 16174  	// match: (UBFX [bfc] e:(MOVBUreg x))
 16175  	// cond: e.Uses == 1 && bfc.lsb() < 8
 16176  	// result: (UBFX [armBFAuxInt(bfc.lsb(), min(bfc.width(), 8-bfc.lsb()))] x)
 16177  	for {
 16178  		bfc := auxIntToArm64BitField(v.AuxInt)
 16179  		e := v_0
 16180  		if e.Op != OpARM64MOVBUreg {
 16181  			break
 16182  		}
 16183  		x := e.Args[0]
 16184  		if !(e.Uses == 1 && bfc.lsb() < 8) {
 16185  			break
 16186  		}
 16187  		v.reset(OpARM64UBFX)
 16188  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), 8-bfc.lsb())))
 16189  		v.AddArg(x)
 16190  		return true
 16191  	}
 16192  	// match: (UBFX [bfc] (SRLconst [sc] x))
 16193  	// cond: sc+bfc.width()+bfc.lsb() < 64
 16194  	// result: (UBFX [armBFAuxInt(bfc.lsb()+sc, bfc.width())] x)
 16195  	for {
 16196  		bfc := auxIntToArm64BitField(v.AuxInt)
 16197  		if v_0.Op != OpARM64SRLconst {
 16198  			break
 16199  		}
 16200  		sc := auxIntToInt64(v_0.AuxInt)
 16201  		x := v_0.Args[0]
 16202  		if !(sc+bfc.width()+bfc.lsb() < 64) {
 16203  			break
 16204  		}
 16205  		v.reset(OpARM64UBFX)
 16206  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()))
 16207  		v.AddArg(x)
 16208  		return true
 16209  	}
 16210  	// match: (UBFX [bfc] (SLLconst [sc] x))
 16211  	// cond: sc == bfc.lsb()
 16212  	// result: (ANDconst [1<<uint(bfc.width())-1] x)
 16213  	for {
 16214  		bfc := auxIntToArm64BitField(v.AuxInt)
 16215  		if v_0.Op != OpARM64SLLconst {
 16216  			break
 16217  		}
 16218  		sc := auxIntToInt64(v_0.AuxInt)
 16219  		x := v_0.Args[0]
 16220  		if !(sc == bfc.lsb()) {
 16221  			break
 16222  		}
 16223  		v.reset(OpARM64ANDconst)
 16224  		v.AuxInt = int64ToAuxInt(1<<uint(bfc.width()) - 1)
 16225  		v.AddArg(x)
 16226  		return true
 16227  	}
 16228  	// match: (UBFX [bfc] (SLLconst [sc] x))
 16229  	// cond: sc < bfc.lsb()
 16230  	// result: (UBFX [armBFAuxInt(bfc.lsb()-sc, bfc.width())] x)
 16231  	for {
 16232  		bfc := auxIntToArm64BitField(v.AuxInt)
 16233  		if v_0.Op != OpARM64SLLconst {
 16234  			break
 16235  		}
 16236  		sc := auxIntToInt64(v_0.AuxInt)
 16237  		x := v_0.Args[0]
 16238  		if !(sc < bfc.lsb()) {
 16239  			break
 16240  		}
 16241  		v.reset(OpARM64UBFX)
 16242  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
 16243  		v.AddArg(x)
 16244  		return true
 16245  	}
 16246  	// match: (UBFX [bfc] (SLLconst [sc] x))
 16247  	// cond: sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()
 16248  	// result: (UBFIZ [armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc)] x)
 16249  	for {
 16250  		bfc := auxIntToArm64BitField(v.AuxInt)
 16251  		if v_0.Op != OpARM64SLLconst {
 16252  			break
 16253  		}
 16254  		sc := auxIntToInt64(v_0.AuxInt)
 16255  		x := v_0.Args[0]
 16256  		if !(sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()) {
 16257  			break
 16258  		}
 16259  		v.reset(OpARM64UBFIZ)
 16260  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc))
 16261  		v.AddArg(x)
 16262  		return true
 16263  	}
 16264  	return false
 16265  }
 16266  func rewriteValueARM64_OpARM64UDIV(v *Value) bool {
 16267  	v_1 := v.Args[1]
 16268  	v_0 := v.Args[0]
 16269  	// match: (UDIV x (MOVDconst [1]))
 16270  	// result: x
 16271  	for {
 16272  		x := v_0
 16273  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 16274  			break
 16275  		}
 16276  		v.copyOf(x)
 16277  		return true
 16278  	}
 16279  	// match: (UDIV x (MOVDconst [c]))
 16280  	// cond: isPowerOfTwo(c)
 16281  	// result: (SRLconst [log64(c)] x)
 16282  	for {
 16283  		x := v_0
 16284  		if v_1.Op != OpARM64MOVDconst {
 16285  			break
 16286  		}
 16287  		c := auxIntToInt64(v_1.AuxInt)
 16288  		if !(isPowerOfTwo(c)) {
 16289  			break
 16290  		}
 16291  		v.reset(OpARM64SRLconst)
 16292  		v.AuxInt = int64ToAuxInt(log64(c))
 16293  		v.AddArg(x)
 16294  		return true
 16295  	}
 16296  	// match: (UDIV (MOVDconst [c]) (MOVDconst [d]))
 16297  	// cond: d != 0
 16298  	// result: (MOVDconst [int64(uint64(c)/uint64(d))])
 16299  	for {
 16300  		if v_0.Op != OpARM64MOVDconst {
 16301  			break
 16302  		}
 16303  		c := auxIntToInt64(v_0.AuxInt)
 16304  		if v_1.Op != OpARM64MOVDconst {
 16305  			break
 16306  		}
 16307  		d := auxIntToInt64(v_1.AuxInt)
 16308  		if !(d != 0) {
 16309  			break
 16310  		}
 16311  		v.reset(OpARM64MOVDconst)
 16312  		v.AuxInt = int64ToAuxInt(int64(uint64(c) / uint64(d)))
 16313  		return true
 16314  	}
 16315  	return false
 16316  }
 16317  func rewriteValueARM64_OpARM64UDIVW(v *Value) bool {
 16318  	v_1 := v.Args[1]
 16319  	v_0 := v.Args[0]
 16320  	b := v.Block
 16321  	// match: (UDIVW x (MOVDconst [c]))
 16322  	// cond: uint32(c)==1
 16323  	// result: (MOVWUreg x)
 16324  	for {
 16325  		x := v_0
 16326  		if v_1.Op != OpARM64MOVDconst {
 16327  			break
 16328  		}
 16329  		c := auxIntToInt64(v_1.AuxInt)
 16330  		if !(uint32(c) == 1) {
 16331  			break
 16332  		}
 16333  		v.reset(OpARM64MOVWUreg)
 16334  		v.AddArg(x)
 16335  		return true
 16336  	}
 16337  	// match: (UDIVW x (MOVDconst [c]))
 16338  	// cond: isPowerOfTwo(c) && is32Bit(c)
 16339  	// result: (SRLconst [log64(c)] (MOVWUreg <v.Type> x))
 16340  	for {
 16341  		x := v_0
 16342  		if v_1.Op != OpARM64MOVDconst {
 16343  			break
 16344  		}
 16345  		c := auxIntToInt64(v_1.AuxInt)
 16346  		if !(isPowerOfTwo(c) && is32Bit(c)) {
 16347  			break
 16348  		}
 16349  		v.reset(OpARM64SRLconst)
 16350  		v.AuxInt = int64ToAuxInt(log64(c))
 16351  		v0 := b.NewValue0(v.Pos, OpARM64MOVWUreg, v.Type)
 16352  		v0.AddArg(x)
 16353  		v.AddArg(v0)
 16354  		return true
 16355  	}
 16356  	// match: (UDIVW (MOVDconst [c]) (MOVDconst [d]))
 16357  	// cond: d != 0
 16358  	// result: (MOVDconst [int64(uint32(c)/uint32(d))])
 16359  	for {
 16360  		if v_0.Op != OpARM64MOVDconst {
 16361  			break
 16362  		}
 16363  		c := auxIntToInt64(v_0.AuxInt)
 16364  		if v_1.Op != OpARM64MOVDconst {
 16365  			break
 16366  		}
 16367  		d := auxIntToInt64(v_1.AuxInt)
 16368  		if !(d != 0) {
 16369  			break
 16370  		}
 16371  		v.reset(OpARM64MOVDconst)
 16372  		v.AuxInt = int64ToAuxInt(int64(uint32(c) / uint32(d)))
 16373  		return true
 16374  	}
 16375  	return false
 16376  }
 16377  func rewriteValueARM64_OpARM64UMOD(v *Value) bool {
 16378  	v_1 := v.Args[1]
 16379  	v_0 := v.Args[0]
 16380  	b := v.Block
 16381  	typ := &b.Func.Config.Types
 16382  	// match: (UMOD <typ.UInt64> x y)
 16383  	// result: (MSUB <typ.UInt64> x y (UDIV <typ.UInt64> x y))
 16384  	for {
 16385  		if v.Type != typ.UInt64 {
 16386  			break
 16387  		}
 16388  		x := v_0
 16389  		y := v_1
 16390  		v.reset(OpARM64MSUB)
 16391  		v.Type = typ.UInt64
 16392  		v0 := b.NewValue0(v.Pos, OpARM64UDIV, typ.UInt64)
 16393  		v0.AddArg2(x, y)
 16394  		v.AddArg3(x, y, v0)
 16395  		return true
 16396  	}
 16397  	// match: (UMOD _ (MOVDconst [1]))
 16398  	// result: (MOVDconst [0])
 16399  	for {
 16400  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 16401  			break
 16402  		}
 16403  		v.reset(OpARM64MOVDconst)
 16404  		v.AuxInt = int64ToAuxInt(0)
 16405  		return true
 16406  	}
 16407  	// match: (UMOD x (MOVDconst [c]))
 16408  	// cond: isPowerOfTwo(c)
 16409  	// result: (ANDconst [c-1] x)
 16410  	for {
 16411  		x := v_0
 16412  		if v_1.Op != OpARM64MOVDconst {
 16413  			break
 16414  		}
 16415  		c := auxIntToInt64(v_1.AuxInt)
 16416  		if !(isPowerOfTwo(c)) {
 16417  			break
 16418  		}
 16419  		v.reset(OpARM64ANDconst)
 16420  		v.AuxInt = int64ToAuxInt(c - 1)
 16421  		v.AddArg(x)
 16422  		return true
 16423  	}
 16424  	// match: (UMOD (MOVDconst [c]) (MOVDconst [d]))
 16425  	// cond: d != 0
 16426  	// result: (MOVDconst [int64(uint64(c)%uint64(d))])
 16427  	for {
 16428  		if v_0.Op != OpARM64MOVDconst {
 16429  			break
 16430  		}
 16431  		c := auxIntToInt64(v_0.AuxInt)
 16432  		if v_1.Op != OpARM64MOVDconst {
 16433  			break
 16434  		}
 16435  		d := auxIntToInt64(v_1.AuxInt)
 16436  		if !(d != 0) {
 16437  			break
 16438  		}
 16439  		v.reset(OpARM64MOVDconst)
 16440  		v.AuxInt = int64ToAuxInt(int64(uint64(c) % uint64(d)))
 16441  		return true
 16442  	}
 16443  	return false
 16444  }
 16445  func rewriteValueARM64_OpARM64UMODW(v *Value) bool {
 16446  	v_1 := v.Args[1]
 16447  	v_0 := v.Args[0]
 16448  	b := v.Block
 16449  	typ := &b.Func.Config.Types
 16450  	// match: (UMODW <typ.UInt32> x y)
 16451  	// result: (MSUBW <typ.UInt32> x y (UDIVW <typ.UInt32> x y))
 16452  	for {
 16453  		if v.Type != typ.UInt32 {
 16454  			break
 16455  		}
 16456  		x := v_0
 16457  		y := v_1
 16458  		v.reset(OpARM64MSUBW)
 16459  		v.Type = typ.UInt32
 16460  		v0 := b.NewValue0(v.Pos, OpARM64UDIVW, typ.UInt32)
 16461  		v0.AddArg2(x, y)
 16462  		v.AddArg3(x, y, v0)
 16463  		return true
 16464  	}
 16465  	// match: (UMODW _ (MOVDconst [c]))
 16466  	// cond: uint32(c)==1
 16467  	// result: (MOVDconst [0])
 16468  	for {
 16469  		if v_1.Op != OpARM64MOVDconst {
 16470  			break
 16471  		}
 16472  		c := auxIntToInt64(v_1.AuxInt)
 16473  		if !(uint32(c) == 1) {
 16474  			break
 16475  		}
 16476  		v.reset(OpARM64MOVDconst)
 16477  		v.AuxInt = int64ToAuxInt(0)
 16478  		return true
 16479  	}
 16480  	// match: (UMODW x (MOVDconst [c]))
 16481  	// cond: isPowerOfTwo(c) && is32Bit(c)
 16482  	// result: (ANDconst [c-1] x)
 16483  	for {
 16484  		x := v_0
 16485  		if v_1.Op != OpARM64MOVDconst {
 16486  			break
 16487  		}
 16488  		c := auxIntToInt64(v_1.AuxInt)
 16489  		if !(isPowerOfTwo(c) && is32Bit(c)) {
 16490  			break
 16491  		}
 16492  		v.reset(OpARM64ANDconst)
 16493  		v.AuxInt = int64ToAuxInt(c - 1)
 16494  		v.AddArg(x)
 16495  		return true
 16496  	}
 16497  	// match: (UMODW (MOVDconst [c]) (MOVDconst [d]))
 16498  	// cond: d != 0
 16499  	// result: (MOVDconst [int64(uint32(c)%uint32(d))])
 16500  	for {
 16501  		if v_0.Op != OpARM64MOVDconst {
 16502  			break
 16503  		}
 16504  		c := auxIntToInt64(v_0.AuxInt)
 16505  		if v_1.Op != OpARM64MOVDconst {
 16506  			break
 16507  		}
 16508  		d := auxIntToInt64(v_1.AuxInt)
 16509  		if !(d != 0) {
 16510  			break
 16511  		}
 16512  		v.reset(OpARM64MOVDconst)
 16513  		v.AuxInt = int64ToAuxInt(int64(uint32(c) % uint32(d)))
 16514  		return true
 16515  	}
 16516  	return false
 16517  }
 16518  func rewriteValueARM64_OpARM64XOR(v *Value) bool {
 16519  	v_1 := v.Args[1]
 16520  	v_0 := v.Args[0]
 16521  	// match: (XOR x (MOVDconst [c]))
 16522  	// result: (XORconst [c] x)
 16523  	for {
 16524  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 16525  			x := v_0
 16526  			if v_1.Op != OpARM64MOVDconst {
 16527  				continue
 16528  			}
 16529  			c := auxIntToInt64(v_1.AuxInt)
 16530  			v.reset(OpARM64XORconst)
 16531  			v.AuxInt = int64ToAuxInt(c)
 16532  			v.AddArg(x)
 16533  			return true
 16534  		}
 16535  		break
 16536  	}
 16537  	// match: (XOR x x)
 16538  	// result: (MOVDconst [0])
 16539  	for {
 16540  		x := v_0
 16541  		if x != v_1 {
 16542  			break
 16543  		}
 16544  		v.reset(OpARM64MOVDconst)
 16545  		v.AuxInt = int64ToAuxInt(0)
 16546  		return true
 16547  	}
 16548  	// match: (XOR x (MVN y))
 16549  	// result: (EON x y)
 16550  	for {
 16551  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 16552  			x := v_0
 16553  			if v_1.Op != OpARM64MVN {
 16554  				continue
 16555  			}
 16556  			y := v_1.Args[0]
 16557  			v.reset(OpARM64EON)
 16558  			v.AddArg2(x, y)
 16559  			return true
 16560  		}
 16561  		break
 16562  	}
 16563  	// match: (XOR x0 x1:(SLLconst [c] y))
 16564  	// cond: clobberIfDead(x1)
 16565  	// result: (XORshiftLL x0 y [c])
 16566  	for {
 16567  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 16568  			x0 := v_0
 16569  			x1 := v_1
 16570  			if x1.Op != OpARM64SLLconst {
 16571  				continue
 16572  			}
 16573  			c := auxIntToInt64(x1.AuxInt)
 16574  			y := x1.Args[0]
 16575  			if !(clobberIfDead(x1)) {
 16576  				continue
 16577  			}
 16578  			v.reset(OpARM64XORshiftLL)
 16579  			v.AuxInt = int64ToAuxInt(c)
 16580  			v.AddArg2(x0, y)
 16581  			return true
 16582  		}
 16583  		break
 16584  	}
 16585  	// match: (XOR x0 x1:(SRLconst [c] y))
 16586  	// cond: clobberIfDead(x1)
 16587  	// result: (XORshiftRL x0 y [c])
 16588  	for {
 16589  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 16590  			x0 := v_0
 16591  			x1 := v_1
 16592  			if x1.Op != OpARM64SRLconst {
 16593  				continue
 16594  			}
 16595  			c := auxIntToInt64(x1.AuxInt)
 16596  			y := x1.Args[0]
 16597  			if !(clobberIfDead(x1)) {
 16598  				continue
 16599  			}
 16600  			v.reset(OpARM64XORshiftRL)
 16601  			v.AuxInt = int64ToAuxInt(c)
 16602  			v.AddArg2(x0, y)
 16603  			return true
 16604  		}
 16605  		break
 16606  	}
 16607  	// match: (XOR x0 x1:(SRAconst [c] y))
 16608  	// cond: clobberIfDead(x1)
 16609  	// result: (XORshiftRA x0 y [c])
 16610  	for {
 16611  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 16612  			x0 := v_0
 16613  			x1 := v_1
 16614  			if x1.Op != OpARM64SRAconst {
 16615  				continue
 16616  			}
 16617  			c := auxIntToInt64(x1.AuxInt)
 16618  			y := x1.Args[0]
 16619  			if !(clobberIfDead(x1)) {
 16620  				continue
 16621  			}
 16622  			v.reset(OpARM64XORshiftRA)
 16623  			v.AuxInt = int64ToAuxInt(c)
 16624  			v.AddArg2(x0, y)
 16625  			return true
 16626  		}
 16627  		break
 16628  	}
 16629  	// match: (XOR x0 x1:(RORconst [c] y))
 16630  	// cond: clobberIfDead(x1)
 16631  	// result: (XORshiftRO x0 y [c])
 16632  	for {
 16633  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 16634  			x0 := v_0
 16635  			x1 := v_1
 16636  			if x1.Op != OpARM64RORconst {
 16637  				continue
 16638  			}
 16639  			c := auxIntToInt64(x1.AuxInt)
 16640  			y := x1.Args[0]
 16641  			if !(clobberIfDead(x1)) {
 16642  				continue
 16643  			}
 16644  			v.reset(OpARM64XORshiftRO)
 16645  			v.AuxInt = int64ToAuxInt(c)
 16646  			v.AddArg2(x0, y)
 16647  			return true
 16648  		}
 16649  		break
 16650  	}
 16651  	return false
 16652  }
 16653  func rewriteValueARM64_OpARM64XORconst(v *Value) bool {
 16654  	v_0 := v.Args[0]
 16655  	// match: (XORconst [0] x)
 16656  	// result: x
 16657  	for {
 16658  		if auxIntToInt64(v.AuxInt) != 0 {
 16659  			break
 16660  		}
 16661  		x := v_0
 16662  		v.copyOf(x)
 16663  		return true
 16664  	}
 16665  	// match: (XORconst [-1] x)
 16666  	// result: (MVN x)
 16667  	for {
 16668  		if auxIntToInt64(v.AuxInt) != -1 {
 16669  			break
 16670  		}
 16671  		x := v_0
 16672  		v.reset(OpARM64MVN)
 16673  		v.AddArg(x)
 16674  		return true
 16675  	}
 16676  	// match: (XORconst [c] (MOVDconst [d]))
 16677  	// result: (MOVDconst [c^d])
 16678  	for {
 16679  		c := auxIntToInt64(v.AuxInt)
 16680  		if v_0.Op != OpARM64MOVDconst {
 16681  			break
 16682  		}
 16683  		d := auxIntToInt64(v_0.AuxInt)
 16684  		v.reset(OpARM64MOVDconst)
 16685  		v.AuxInt = int64ToAuxInt(c ^ d)
 16686  		return true
 16687  	}
 16688  	// match: (XORconst [c] (XORconst [d] x))
 16689  	// result: (XORconst [c^d] x)
 16690  	for {
 16691  		c := auxIntToInt64(v.AuxInt)
 16692  		if v_0.Op != OpARM64XORconst {
 16693  			break
 16694  		}
 16695  		d := auxIntToInt64(v_0.AuxInt)
 16696  		x := v_0.Args[0]
 16697  		v.reset(OpARM64XORconst)
 16698  		v.AuxInt = int64ToAuxInt(c ^ d)
 16699  		v.AddArg(x)
 16700  		return true
 16701  	}
 16702  	return false
 16703  }
 16704  func rewriteValueARM64_OpARM64XORshiftLL(v *Value) bool {
 16705  	v_1 := v.Args[1]
 16706  	v_0 := v.Args[0]
 16707  	b := v.Block
 16708  	typ := &b.Func.Config.Types
 16709  	// match: (XORshiftLL (MOVDconst [c]) x [d])
 16710  	// result: (XORconst [c] (SLLconst <x.Type> x [d]))
 16711  	for {
 16712  		d := auxIntToInt64(v.AuxInt)
 16713  		if v_0.Op != OpARM64MOVDconst {
 16714  			break
 16715  		}
 16716  		c := auxIntToInt64(v_0.AuxInt)
 16717  		x := v_1
 16718  		v.reset(OpARM64XORconst)
 16719  		v.AuxInt = int64ToAuxInt(c)
 16720  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 16721  		v0.AuxInt = int64ToAuxInt(d)
 16722  		v0.AddArg(x)
 16723  		v.AddArg(v0)
 16724  		return true
 16725  	}
 16726  	// match: (XORshiftLL x (MOVDconst [c]) [d])
 16727  	// result: (XORconst x [int64(uint64(c)<<uint64(d))])
 16728  	for {
 16729  		d := auxIntToInt64(v.AuxInt)
 16730  		x := v_0
 16731  		if v_1.Op != OpARM64MOVDconst {
 16732  			break
 16733  		}
 16734  		c := auxIntToInt64(v_1.AuxInt)
 16735  		v.reset(OpARM64XORconst)
 16736  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
 16737  		v.AddArg(x)
 16738  		return true
 16739  	}
 16740  	// match: (XORshiftLL (SLLconst x [c]) x [c])
 16741  	// result: (MOVDconst [0])
 16742  	for {
 16743  		c := auxIntToInt64(v.AuxInt)
 16744  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
 16745  			break
 16746  		}
 16747  		x := v_0.Args[0]
 16748  		if x != v_1 {
 16749  			break
 16750  		}
 16751  		v.reset(OpARM64MOVDconst)
 16752  		v.AuxInt = int64ToAuxInt(0)
 16753  		return true
 16754  	}
 16755  	// match: (XORshiftLL <typ.UInt16> [8] (UBFX <typ.UInt16> [armBFAuxInt(8, 8)] x) x)
 16756  	// result: (REV16W x)
 16757  	for {
 16758  		if v.Type != typ.UInt16 || auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64UBFX || v_0.Type != typ.UInt16 || auxIntToArm64BitField(v_0.AuxInt) != armBFAuxInt(8, 8) {
 16759  			break
 16760  		}
 16761  		x := v_0.Args[0]
 16762  		if x != v_1 {
 16763  			break
 16764  		}
 16765  		v.reset(OpARM64REV16W)
 16766  		v.AddArg(x)
 16767  		return true
 16768  	}
 16769  	// match: (XORshiftLL [8] (UBFX [armBFAuxInt(8, 24)] (ANDconst [c1] x)) (ANDconst [c2] x))
 16770  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
 16771  	// result: (REV16W x)
 16772  	for {
 16773  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64UBFX || auxIntToArm64BitField(v_0.AuxInt) != armBFAuxInt(8, 24) {
 16774  			break
 16775  		}
 16776  		v_0_0 := v_0.Args[0]
 16777  		if v_0_0.Op != OpARM64ANDconst {
 16778  			break
 16779  		}
 16780  		c1 := auxIntToInt64(v_0_0.AuxInt)
 16781  		x := v_0_0.Args[0]
 16782  		if v_1.Op != OpARM64ANDconst {
 16783  			break
 16784  		}
 16785  		c2 := auxIntToInt64(v_1.AuxInt)
 16786  		if x != v_1.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
 16787  			break
 16788  		}
 16789  		v.reset(OpARM64REV16W)
 16790  		v.AddArg(x)
 16791  		return true
 16792  	}
 16793  	// match: (XORshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
 16794  	// cond: (uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff)
 16795  	// result: (REV16 x)
 16796  	for {
 16797  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
 16798  			break
 16799  		}
 16800  		v_0_0 := v_0.Args[0]
 16801  		if v_0_0.Op != OpARM64ANDconst {
 16802  			break
 16803  		}
 16804  		c1 := auxIntToInt64(v_0_0.AuxInt)
 16805  		x := v_0_0.Args[0]
 16806  		if v_1.Op != OpARM64ANDconst {
 16807  			break
 16808  		}
 16809  		c2 := auxIntToInt64(v_1.AuxInt)
 16810  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
 16811  			break
 16812  		}
 16813  		v.reset(OpARM64REV16)
 16814  		v.AddArg(x)
 16815  		return true
 16816  	}
 16817  	// match: (XORshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
 16818  	// cond: (uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff)
 16819  	// result: (REV16 (ANDconst <x.Type> [0xffffffff] x))
 16820  	for {
 16821  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
 16822  			break
 16823  		}
 16824  		v_0_0 := v_0.Args[0]
 16825  		if v_0_0.Op != OpARM64ANDconst {
 16826  			break
 16827  		}
 16828  		c1 := auxIntToInt64(v_0_0.AuxInt)
 16829  		x := v_0_0.Args[0]
 16830  		if v_1.Op != OpARM64ANDconst {
 16831  			break
 16832  		}
 16833  		c2 := auxIntToInt64(v_1.AuxInt)
 16834  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
 16835  			break
 16836  		}
 16837  		v.reset(OpARM64REV16)
 16838  		v0 := b.NewValue0(v.Pos, OpARM64ANDconst, x.Type)
 16839  		v0.AuxInt = int64ToAuxInt(0xffffffff)
 16840  		v0.AddArg(x)
 16841  		v.AddArg(v0)
 16842  		return true
 16843  	}
 16844  	// match: (XORshiftLL [c] (SRLconst x [64-c]) x2)
 16845  	// result: (EXTRconst [64-c] x2 x)
 16846  	for {
 16847  		c := auxIntToInt64(v.AuxInt)
 16848  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 64-c {
 16849  			break
 16850  		}
 16851  		x := v_0.Args[0]
 16852  		x2 := v_1
 16853  		v.reset(OpARM64EXTRconst)
 16854  		v.AuxInt = int64ToAuxInt(64 - c)
 16855  		v.AddArg2(x2, x)
 16856  		return true
 16857  	}
 16858  	// match: (XORshiftLL <t> [c] (UBFX [bfc] x) x2)
 16859  	// cond: c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)
 16860  	// result: (EXTRWconst [32-c] x2 x)
 16861  	for {
 16862  		t := v.Type
 16863  		c := auxIntToInt64(v.AuxInt)
 16864  		if v_0.Op != OpARM64UBFX {
 16865  			break
 16866  		}
 16867  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 16868  		x := v_0.Args[0]
 16869  		x2 := v_1
 16870  		if !(c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)) {
 16871  			break
 16872  		}
 16873  		v.reset(OpARM64EXTRWconst)
 16874  		v.AuxInt = int64ToAuxInt(32 - c)
 16875  		v.AddArg2(x2, x)
 16876  		return true
 16877  	}
 16878  	return false
 16879  }
 16880  func rewriteValueARM64_OpARM64XORshiftRA(v *Value) bool {
 16881  	v_1 := v.Args[1]
 16882  	v_0 := v.Args[0]
 16883  	b := v.Block
 16884  	// match: (XORshiftRA (MOVDconst [c]) x [d])
 16885  	// result: (XORconst [c] (SRAconst <x.Type> x [d]))
 16886  	for {
 16887  		d := auxIntToInt64(v.AuxInt)
 16888  		if v_0.Op != OpARM64MOVDconst {
 16889  			break
 16890  		}
 16891  		c := auxIntToInt64(v_0.AuxInt)
 16892  		x := v_1
 16893  		v.reset(OpARM64XORconst)
 16894  		v.AuxInt = int64ToAuxInt(c)
 16895  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
 16896  		v0.AuxInt = int64ToAuxInt(d)
 16897  		v0.AddArg(x)
 16898  		v.AddArg(v0)
 16899  		return true
 16900  	}
 16901  	// match: (XORshiftRA x (MOVDconst [c]) [d])
 16902  	// result: (XORconst x [c>>uint64(d)])
 16903  	for {
 16904  		d := auxIntToInt64(v.AuxInt)
 16905  		x := v_0
 16906  		if v_1.Op != OpARM64MOVDconst {
 16907  			break
 16908  		}
 16909  		c := auxIntToInt64(v_1.AuxInt)
 16910  		v.reset(OpARM64XORconst)
 16911  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
 16912  		v.AddArg(x)
 16913  		return true
 16914  	}
 16915  	// match: (XORshiftRA (SRAconst x [c]) x [c])
 16916  	// result: (MOVDconst [0])
 16917  	for {
 16918  		c := auxIntToInt64(v.AuxInt)
 16919  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
 16920  			break
 16921  		}
 16922  		x := v_0.Args[0]
 16923  		if x != v_1 {
 16924  			break
 16925  		}
 16926  		v.reset(OpARM64MOVDconst)
 16927  		v.AuxInt = int64ToAuxInt(0)
 16928  		return true
 16929  	}
 16930  	return false
 16931  }
 16932  func rewriteValueARM64_OpARM64XORshiftRL(v *Value) bool {
 16933  	v_1 := v.Args[1]
 16934  	v_0 := v.Args[0]
 16935  	b := v.Block
 16936  	// match: (XORshiftRL (MOVDconst [c]) x [d])
 16937  	// result: (XORconst [c] (SRLconst <x.Type> x [d]))
 16938  	for {
 16939  		d := auxIntToInt64(v.AuxInt)
 16940  		if v_0.Op != OpARM64MOVDconst {
 16941  			break
 16942  		}
 16943  		c := auxIntToInt64(v_0.AuxInt)
 16944  		x := v_1
 16945  		v.reset(OpARM64XORconst)
 16946  		v.AuxInt = int64ToAuxInt(c)
 16947  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
 16948  		v0.AuxInt = int64ToAuxInt(d)
 16949  		v0.AddArg(x)
 16950  		v.AddArg(v0)
 16951  		return true
 16952  	}
 16953  	// match: (XORshiftRL x (MOVDconst [c]) [d])
 16954  	// result: (XORconst x [int64(uint64(c)>>uint64(d))])
 16955  	for {
 16956  		d := auxIntToInt64(v.AuxInt)
 16957  		x := v_0
 16958  		if v_1.Op != OpARM64MOVDconst {
 16959  			break
 16960  		}
 16961  		c := auxIntToInt64(v_1.AuxInt)
 16962  		v.reset(OpARM64XORconst)
 16963  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
 16964  		v.AddArg(x)
 16965  		return true
 16966  	}
 16967  	// match: (XORshiftRL (SRLconst x [c]) x [c])
 16968  	// result: (MOVDconst [0])
 16969  	for {
 16970  		c := auxIntToInt64(v.AuxInt)
 16971  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
 16972  			break
 16973  		}
 16974  		x := v_0.Args[0]
 16975  		if x != v_1 {
 16976  			break
 16977  		}
 16978  		v.reset(OpARM64MOVDconst)
 16979  		v.AuxInt = int64ToAuxInt(0)
 16980  		return true
 16981  	}
 16982  	return false
 16983  }
 16984  func rewriteValueARM64_OpARM64XORshiftRO(v *Value) bool {
 16985  	v_1 := v.Args[1]
 16986  	v_0 := v.Args[0]
 16987  	b := v.Block
 16988  	// match: (XORshiftRO (MOVDconst [c]) x [d])
 16989  	// result: (XORconst [c] (RORconst <x.Type> x [d]))
 16990  	for {
 16991  		d := auxIntToInt64(v.AuxInt)
 16992  		if v_0.Op != OpARM64MOVDconst {
 16993  			break
 16994  		}
 16995  		c := auxIntToInt64(v_0.AuxInt)
 16996  		x := v_1
 16997  		v.reset(OpARM64XORconst)
 16998  		v.AuxInt = int64ToAuxInt(c)
 16999  		v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
 17000  		v0.AuxInt = int64ToAuxInt(d)
 17001  		v0.AddArg(x)
 17002  		v.AddArg(v0)
 17003  		return true
 17004  	}
 17005  	// match: (XORshiftRO x (MOVDconst [c]) [d])
 17006  	// result: (XORconst x [rotateRight64(c, d)])
 17007  	for {
 17008  		d := auxIntToInt64(v.AuxInt)
 17009  		x := v_0
 17010  		if v_1.Op != OpARM64MOVDconst {
 17011  			break
 17012  		}
 17013  		c := auxIntToInt64(v_1.AuxInt)
 17014  		v.reset(OpARM64XORconst)
 17015  		v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
 17016  		v.AddArg(x)
 17017  		return true
 17018  	}
 17019  	// match: (XORshiftRO (RORconst x [c]) x [c])
 17020  	// result: (MOVDconst [0])
 17021  	for {
 17022  		c := auxIntToInt64(v.AuxInt)
 17023  		if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
 17024  			break
 17025  		}
 17026  		x := v_0.Args[0]
 17027  		if x != v_1 {
 17028  			break
 17029  		}
 17030  		v.reset(OpARM64MOVDconst)
 17031  		v.AuxInt = int64ToAuxInt(0)
 17032  		return true
 17033  	}
 17034  	return false
 17035  }
 17036  func rewriteValueARM64_OpAddr(v *Value) bool {
 17037  	v_0 := v.Args[0]
 17038  	// match: (Addr {sym} base)
 17039  	// result: (MOVDaddr {sym} base)
 17040  	for {
 17041  		sym := auxToSym(v.Aux)
 17042  		base := v_0
 17043  		v.reset(OpARM64MOVDaddr)
 17044  		v.Aux = symToAux(sym)
 17045  		v.AddArg(base)
 17046  		return true
 17047  	}
 17048  }
 17049  func rewriteValueARM64_OpAvg64u(v *Value) bool {
 17050  	v_1 := v.Args[1]
 17051  	v_0 := v.Args[0]
 17052  	b := v.Block
 17053  	// match: (Avg64u <t> x y)
 17054  	// result: (ADD (SRLconst <t> (SUB <t> x y) [1]) y)
 17055  	for {
 17056  		t := v.Type
 17057  		x := v_0
 17058  		y := v_1
 17059  		v.reset(OpARM64ADD)
 17060  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, t)
 17061  		v0.AuxInt = int64ToAuxInt(1)
 17062  		v1 := b.NewValue0(v.Pos, OpARM64SUB, t)
 17063  		v1.AddArg2(x, y)
 17064  		v0.AddArg(v1)
 17065  		v.AddArg2(v0, y)
 17066  		return true
 17067  	}
 17068  }
 17069  func rewriteValueARM64_OpBitLen16(v *Value) bool {
 17070  	v_0 := v.Args[0]
 17071  	b := v.Block
 17072  	typ := &b.Func.Config.Types
 17073  	// match: (BitLen16 x)
 17074  	// result: (BitLen64 (ZeroExt16to64 x))
 17075  	for {
 17076  		x := v_0
 17077  		v.reset(OpBitLen64)
 17078  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 17079  		v0.AddArg(x)
 17080  		v.AddArg(v0)
 17081  		return true
 17082  	}
 17083  }
 17084  func rewriteValueARM64_OpBitLen32(v *Value) bool {
 17085  	v_0 := v.Args[0]
 17086  	b := v.Block
 17087  	typ := &b.Func.Config.Types
 17088  	// match: (BitLen32 x)
 17089  	// result: (SUB (MOVDconst [32]) (CLZW <typ.Int> x))
 17090  	for {
 17091  		x := v_0
 17092  		v.reset(OpARM64SUB)
 17093  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 17094  		v0.AuxInt = int64ToAuxInt(32)
 17095  		v1 := b.NewValue0(v.Pos, OpARM64CLZW, typ.Int)
 17096  		v1.AddArg(x)
 17097  		v.AddArg2(v0, v1)
 17098  		return true
 17099  	}
 17100  }
 17101  func rewriteValueARM64_OpBitLen64(v *Value) bool {
 17102  	v_0 := v.Args[0]
 17103  	b := v.Block
 17104  	typ := &b.Func.Config.Types
 17105  	// match: (BitLen64 x)
 17106  	// result: (SUB (MOVDconst [64]) (CLZ <typ.Int> x))
 17107  	for {
 17108  		x := v_0
 17109  		v.reset(OpARM64SUB)
 17110  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 17111  		v0.AuxInt = int64ToAuxInt(64)
 17112  		v1 := b.NewValue0(v.Pos, OpARM64CLZ, typ.Int)
 17113  		v1.AddArg(x)
 17114  		v.AddArg2(v0, v1)
 17115  		return true
 17116  	}
 17117  }
 17118  func rewriteValueARM64_OpBitLen8(v *Value) bool {
 17119  	v_0 := v.Args[0]
 17120  	b := v.Block
 17121  	typ := &b.Func.Config.Types
 17122  	// match: (BitLen8 x)
 17123  	// result: (BitLen64 (ZeroExt8to64 x))
 17124  	for {
 17125  		x := v_0
 17126  		v.reset(OpBitLen64)
 17127  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 17128  		v0.AddArg(x)
 17129  		v.AddArg(v0)
 17130  		return true
 17131  	}
 17132  }
 17133  func rewriteValueARM64_OpBitRev16(v *Value) bool {
 17134  	v_0 := v.Args[0]
 17135  	b := v.Block
 17136  	typ := &b.Func.Config.Types
 17137  	// match: (BitRev16 x)
 17138  	// result: (SRLconst [48] (RBIT <typ.UInt64> x))
 17139  	for {
 17140  		x := v_0
 17141  		v.reset(OpARM64SRLconst)
 17142  		v.AuxInt = int64ToAuxInt(48)
 17143  		v0 := b.NewValue0(v.Pos, OpARM64RBIT, typ.UInt64)
 17144  		v0.AddArg(x)
 17145  		v.AddArg(v0)
 17146  		return true
 17147  	}
 17148  }
 17149  func rewriteValueARM64_OpBitRev8(v *Value) bool {
 17150  	v_0 := v.Args[0]
 17151  	b := v.Block
 17152  	typ := &b.Func.Config.Types
 17153  	// match: (BitRev8 x)
 17154  	// result: (SRLconst [56] (RBIT <typ.UInt64> x))
 17155  	for {
 17156  		x := v_0
 17157  		v.reset(OpARM64SRLconst)
 17158  		v.AuxInt = int64ToAuxInt(56)
 17159  		v0 := b.NewValue0(v.Pos, OpARM64RBIT, typ.UInt64)
 17160  		v0.AddArg(x)
 17161  		v.AddArg(v0)
 17162  		return true
 17163  	}
 17164  }
 17165  func rewriteValueARM64_OpCondSelect(v *Value) bool {
 17166  	v_2 := v.Args[2]
 17167  	v_1 := v.Args[1]
 17168  	v_0 := v.Args[0]
 17169  	b := v.Block
 17170  	// match: (CondSelect x y boolval)
 17171  	// cond: flagArg(boolval) != nil
 17172  	// result: (CSEL [boolval.Op] x y flagArg(boolval))
 17173  	for {
 17174  		x := v_0
 17175  		y := v_1
 17176  		boolval := v_2
 17177  		if !(flagArg(boolval) != nil) {
 17178  			break
 17179  		}
 17180  		v.reset(OpARM64CSEL)
 17181  		v.AuxInt = opToAuxInt(boolval.Op)
 17182  		v.AddArg3(x, y, flagArg(boolval))
 17183  		return true
 17184  	}
 17185  	// match: (CondSelect x y boolval)
 17186  	// cond: flagArg(boolval) == nil
 17187  	// result: (CSEL [OpARM64NotEqual] x y (TSTWconst [1] boolval))
 17188  	for {
 17189  		x := v_0
 17190  		y := v_1
 17191  		boolval := v_2
 17192  		if !(flagArg(boolval) == nil) {
 17193  			break
 17194  		}
 17195  		v.reset(OpARM64CSEL)
 17196  		v.AuxInt = opToAuxInt(OpARM64NotEqual)
 17197  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
 17198  		v0.AuxInt = int32ToAuxInt(1)
 17199  		v0.AddArg(boolval)
 17200  		v.AddArg3(x, y, v0)
 17201  		return true
 17202  	}
 17203  	return false
 17204  }
 17205  func rewriteValueARM64_OpConst16(v *Value) bool {
 17206  	// match: (Const16 [val])
 17207  	// result: (MOVDconst [int64(val)])
 17208  	for {
 17209  		val := auxIntToInt16(v.AuxInt)
 17210  		v.reset(OpARM64MOVDconst)
 17211  		v.AuxInt = int64ToAuxInt(int64(val))
 17212  		return true
 17213  	}
 17214  }
 17215  func rewriteValueARM64_OpConst32(v *Value) bool {
 17216  	// match: (Const32 [val])
 17217  	// result: (MOVDconst [int64(val)])
 17218  	for {
 17219  		val := auxIntToInt32(v.AuxInt)
 17220  		v.reset(OpARM64MOVDconst)
 17221  		v.AuxInt = int64ToAuxInt(int64(val))
 17222  		return true
 17223  	}
 17224  }
 17225  func rewriteValueARM64_OpConst32F(v *Value) bool {
 17226  	// match: (Const32F [val])
 17227  	// result: (FMOVSconst [float64(val)])
 17228  	for {
 17229  		val := auxIntToFloat32(v.AuxInt)
 17230  		v.reset(OpARM64FMOVSconst)
 17231  		v.AuxInt = float64ToAuxInt(float64(val))
 17232  		return true
 17233  	}
 17234  }
 17235  func rewriteValueARM64_OpConst64(v *Value) bool {
 17236  	// match: (Const64 [val])
 17237  	// result: (MOVDconst [int64(val)])
 17238  	for {
 17239  		val := auxIntToInt64(v.AuxInt)
 17240  		v.reset(OpARM64MOVDconst)
 17241  		v.AuxInt = int64ToAuxInt(int64(val))
 17242  		return true
 17243  	}
 17244  }
 17245  func rewriteValueARM64_OpConst64F(v *Value) bool {
 17246  	// match: (Const64F [val])
 17247  	// result: (FMOVDconst [float64(val)])
 17248  	for {
 17249  		val := auxIntToFloat64(v.AuxInt)
 17250  		v.reset(OpARM64FMOVDconst)
 17251  		v.AuxInt = float64ToAuxInt(float64(val))
 17252  		return true
 17253  	}
 17254  }
 17255  func rewriteValueARM64_OpConst8(v *Value) bool {
 17256  	// match: (Const8 [val])
 17257  	// result: (MOVDconst [int64(val)])
 17258  	for {
 17259  		val := auxIntToInt8(v.AuxInt)
 17260  		v.reset(OpARM64MOVDconst)
 17261  		v.AuxInt = int64ToAuxInt(int64(val))
 17262  		return true
 17263  	}
 17264  }
 17265  func rewriteValueARM64_OpConstBool(v *Value) bool {
 17266  	// match: (ConstBool [t])
 17267  	// result: (MOVDconst [b2i(t)])
 17268  	for {
 17269  		t := auxIntToBool(v.AuxInt)
 17270  		v.reset(OpARM64MOVDconst)
 17271  		v.AuxInt = int64ToAuxInt(b2i(t))
 17272  		return true
 17273  	}
 17274  }
 17275  func rewriteValueARM64_OpConstNil(v *Value) bool {
 17276  	// match: (ConstNil)
 17277  	// result: (MOVDconst [0])
 17278  	for {
 17279  		v.reset(OpARM64MOVDconst)
 17280  		v.AuxInt = int64ToAuxInt(0)
 17281  		return true
 17282  	}
 17283  }
 17284  func rewriteValueARM64_OpCtz16(v *Value) bool {
 17285  	v_0 := v.Args[0]
 17286  	b := v.Block
 17287  	typ := &b.Func.Config.Types
 17288  	// match: (Ctz16 <t> x)
 17289  	// result: (CLZW <t> (RBITW <typ.UInt32> (ORconst <typ.UInt32> [0x10000] x)))
 17290  	for {
 17291  		t := v.Type
 17292  		x := v_0
 17293  		v.reset(OpARM64CLZW)
 17294  		v.Type = t
 17295  		v0 := b.NewValue0(v.Pos, OpARM64RBITW, typ.UInt32)
 17296  		v1 := b.NewValue0(v.Pos, OpARM64ORconst, typ.UInt32)
 17297  		v1.AuxInt = int64ToAuxInt(0x10000)
 17298  		v1.AddArg(x)
 17299  		v0.AddArg(v1)
 17300  		v.AddArg(v0)
 17301  		return true
 17302  	}
 17303  }
 17304  func rewriteValueARM64_OpCtz32(v *Value) bool {
 17305  	v_0 := v.Args[0]
 17306  	b := v.Block
 17307  	// match: (Ctz32 <t> x)
 17308  	// result: (CLZW (RBITW <t> x))
 17309  	for {
 17310  		t := v.Type
 17311  		x := v_0
 17312  		v.reset(OpARM64CLZW)
 17313  		v0 := b.NewValue0(v.Pos, OpARM64RBITW, t)
 17314  		v0.AddArg(x)
 17315  		v.AddArg(v0)
 17316  		return true
 17317  	}
 17318  }
 17319  func rewriteValueARM64_OpCtz64(v *Value) bool {
 17320  	v_0 := v.Args[0]
 17321  	b := v.Block
 17322  	// match: (Ctz64 <t> x)
 17323  	// result: (CLZ (RBIT <t> x))
 17324  	for {
 17325  		t := v.Type
 17326  		x := v_0
 17327  		v.reset(OpARM64CLZ)
 17328  		v0 := b.NewValue0(v.Pos, OpARM64RBIT, t)
 17329  		v0.AddArg(x)
 17330  		v.AddArg(v0)
 17331  		return true
 17332  	}
 17333  }
 17334  func rewriteValueARM64_OpCtz8(v *Value) bool {
 17335  	v_0 := v.Args[0]
 17336  	b := v.Block
 17337  	typ := &b.Func.Config.Types
 17338  	// match: (Ctz8 <t> x)
 17339  	// result: (CLZW <t> (RBITW <typ.UInt32> (ORconst <typ.UInt32> [0x100] x)))
 17340  	for {
 17341  		t := v.Type
 17342  		x := v_0
 17343  		v.reset(OpARM64CLZW)
 17344  		v.Type = t
 17345  		v0 := b.NewValue0(v.Pos, OpARM64RBITW, typ.UInt32)
 17346  		v1 := b.NewValue0(v.Pos, OpARM64ORconst, typ.UInt32)
 17347  		v1.AuxInt = int64ToAuxInt(0x100)
 17348  		v1.AddArg(x)
 17349  		v0.AddArg(v1)
 17350  		v.AddArg(v0)
 17351  		return true
 17352  	}
 17353  }
 17354  func rewriteValueARM64_OpDiv16(v *Value) bool {
 17355  	v_1 := v.Args[1]
 17356  	v_0 := v.Args[0]
 17357  	b := v.Block
 17358  	typ := &b.Func.Config.Types
 17359  	// match: (Div16 [false] x y)
 17360  	// result: (DIVW (SignExt16to32 x) (SignExt16to32 y))
 17361  	for {
 17362  		if auxIntToBool(v.AuxInt) != false {
 17363  			break
 17364  		}
 17365  		x := v_0
 17366  		y := v_1
 17367  		v.reset(OpARM64DIVW)
 17368  		v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 17369  		v0.AddArg(x)
 17370  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 17371  		v1.AddArg(y)
 17372  		v.AddArg2(v0, v1)
 17373  		return true
 17374  	}
 17375  	return false
 17376  }
 17377  func rewriteValueARM64_OpDiv16u(v *Value) bool {
 17378  	v_1 := v.Args[1]
 17379  	v_0 := v.Args[0]
 17380  	b := v.Block
 17381  	typ := &b.Func.Config.Types
 17382  	// match: (Div16u x y)
 17383  	// result: (UDIVW (ZeroExt16to32 x) (ZeroExt16to32 y))
 17384  	for {
 17385  		x := v_0
 17386  		y := v_1
 17387  		v.reset(OpARM64UDIVW)
 17388  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 17389  		v0.AddArg(x)
 17390  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 17391  		v1.AddArg(y)
 17392  		v.AddArg2(v0, v1)
 17393  		return true
 17394  	}
 17395  }
 17396  func rewriteValueARM64_OpDiv32(v *Value) bool {
 17397  	v_1 := v.Args[1]
 17398  	v_0 := v.Args[0]
 17399  	// match: (Div32 [false] x y)
 17400  	// result: (DIVW x y)
 17401  	for {
 17402  		if auxIntToBool(v.AuxInt) != false {
 17403  			break
 17404  		}
 17405  		x := v_0
 17406  		y := v_1
 17407  		v.reset(OpARM64DIVW)
 17408  		v.AddArg2(x, y)
 17409  		return true
 17410  	}
 17411  	return false
 17412  }
 17413  func rewriteValueARM64_OpDiv64(v *Value) bool {
 17414  	v_1 := v.Args[1]
 17415  	v_0 := v.Args[0]
 17416  	// match: (Div64 [false] x y)
 17417  	// result: (DIV x y)
 17418  	for {
 17419  		if auxIntToBool(v.AuxInt) != false {
 17420  			break
 17421  		}
 17422  		x := v_0
 17423  		y := v_1
 17424  		v.reset(OpARM64DIV)
 17425  		v.AddArg2(x, y)
 17426  		return true
 17427  	}
 17428  	return false
 17429  }
 17430  func rewriteValueARM64_OpDiv8(v *Value) bool {
 17431  	v_1 := v.Args[1]
 17432  	v_0 := v.Args[0]
 17433  	b := v.Block
 17434  	typ := &b.Func.Config.Types
 17435  	// match: (Div8 x y)
 17436  	// result: (DIVW (SignExt8to32 x) (SignExt8to32 y))
 17437  	for {
 17438  		x := v_0
 17439  		y := v_1
 17440  		v.reset(OpARM64DIVW)
 17441  		v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 17442  		v0.AddArg(x)
 17443  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 17444  		v1.AddArg(y)
 17445  		v.AddArg2(v0, v1)
 17446  		return true
 17447  	}
 17448  }
 17449  func rewriteValueARM64_OpDiv8u(v *Value) bool {
 17450  	v_1 := v.Args[1]
 17451  	v_0 := v.Args[0]
 17452  	b := v.Block
 17453  	typ := &b.Func.Config.Types
 17454  	// match: (Div8u x y)
 17455  	// result: (UDIVW (ZeroExt8to32 x) (ZeroExt8to32 y))
 17456  	for {
 17457  		x := v_0
 17458  		y := v_1
 17459  		v.reset(OpARM64UDIVW)
 17460  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 17461  		v0.AddArg(x)
 17462  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 17463  		v1.AddArg(y)
 17464  		v.AddArg2(v0, v1)
 17465  		return true
 17466  	}
 17467  }
 17468  func rewriteValueARM64_OpEq16(v *Value) bool {
 17469  	v_1 := v.Args[1]
 17470  	v_0 := v.Args[0]
 17471  	b := v.Block
 17472  	typ := &b.Func.Config.Types
 17473  	// match: (Eq16 x y)
 17474  	// result: (Equal (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
 17475  	for {
 17476  		x := v_0
 17477  		y := v_1
 17478  		v.reset(OpARM64Equal)
 17479  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17480  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 17481  		v1.AddArg(x)
 17482  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 17483  		v2.AddArg(y)
 17484  		v0.AddArg2(v1, v2)
 17485  		v.AddArg(v0)
 17486  		return true
 17487  	}
 17488  }
 17489  func rewriteValueARM64_OpEq32(v *Value) bool {
 17490  	v_1 := v.Args[1]
 17491  	v_0 := v.Args[0]
 17492  	b := v.Block
 17493  	// match: (Eq32 x y)
 17494  	// result: (Equal (CMPW x y))
 17495  	for {
 17496  		x := v_0
 17497  		y := v_1
 17498  		v.reset(OpARM64Equal)
 17499  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17500  		v0.AddArg2(x, y)
 17501  		v.AddArg(v0)
 17502  		return true
 17503  	}
 17504  }
 17505  func rewriteValueARM64_OpEq32F(v *Value) bool {
 17506  	v_1 := v.Args[1]
 17507  	v_0 := v.Args[0]
 17508  	b := v.Block
 17509  	// match: (Eq32F x y)
 17510  	// result: (Equal (FCMPS x y))
 17511  	for {
 17512  		x := v_0
 17513  		y := v_1
 17514  		v.reset(OpARM64Equal)
 17515  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
 17516  		v0.AddArg2(x, y)
 17517  		v.AddArg(v0)
 17518  		return true
 17519  	}
 17520  }
 17521  func rewriteValueARM64_OpEq64(v *Value) bool {
 17522  	v_1 := v.Args[1]
 17523  	v_0 := v.Args[0]
 17524  	b := v.Block
 17525  	// match: (Eq64 x y)
 17526  	// result: (Equal (CMP x y))
 17527  	for {
 17528  		x := v_0
 17529  		y := v_1
 17530  		v.reset(OpARM64Equal)
 17531  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 17532  		v0.AddArg2(x, y)
 17533  		v.AddArg(v0)
 17534  		return true
 17535  	}
 17536  }
 17537  func rewriteValueARM64_OpEq64F(v *Value) bool {
 17538  	v_1 := v.Args[1]
 17539  	v_0 := v.Args[0]
 17540  	b := v.Block
 17541  	// match: (Eq64F x y)
 17542  	// result: (Equal (FCMPD x y))
 17543  	for {
 17544  		x := v_0
 17545  		y := v_1
 17546  		v.reset(OpARM64Equal)
 17547  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
 17548  		v0.AddArg2(x, y)
 17549  		v.AddArg(v0)
 17550  		return true
 17551  	}
 17552  }
 17553  func rewriteValueARM64_OpEq8(v *Value) bool {
 17554  	v_1 := v.Args[1]
 17555  	v_0 := v.Args[0]
 17556  	b := v.Block
 17557  	typ := &b.Func.Config.Types
 17558  	// match: (Eq8 x y)
 17559  	// result: (Equal (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
 17560  	for {
 17561  		x := v_0
 17562  		y := v_1
 17563  		v.reset(OpARM64Equal)
 17564  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17565  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 17566  		v1.AddArg(x)
 17567  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 17568  		v2.AddArg(y)
 17569  		v0.AddArg2(v1, v2)
 17570  		v.AddArg(v0)
 17571  		return true
 17572  	}
 17573  }
 17574  func rewriteValueARM64_OpEqB(v *Value) bool {
 17575  	v_1 := v.Args[1]
 17576  	v_0 := v.Args[0]
 17577  	b := v.Block
 17578  	typ := &b.Func.Config.Types
 17579  	// match: (EqB x y)
 17580  	// result: (XOR (MOVDconst [1]) (XOR <typ.Bool> x y))
 17581  	for {
 17582  		x := v_0
 17583  		y := v_1
 17584  		v.reset(OpARM64XOR)
 17585  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 17586  		v0.AuxInt = int64ToAuxInt(1)
 17587  		v1 := b.NewValue0(v.Pos, OpARM64XOR, typ.Bool)
 17588  		v1.AddArg2(x, y)
 17589  		v.AddArg2(v0, v1)
 17590  		return true
 17591  	}
 17592  }
 17593  func rewriteValueARM64_OpEqPtr(v *Value) bool {
 17594  	v_1 := v.Args[1]
 17595  	v_0 := v.Args[0]
 17596  	b := v.Block
 17597  	// match: (EqPtr x y)
 17598  	// result: (Equal (CMP x y))
 17599  	for {
 17600  		x := v_0
 17601  		y := v_1
 17602  		v.reset(OpARM64Equal)
 17603  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 17604  		v0.AddArg2(x, y)
 17605  		v.AddArg(v0)
 17606  		return true
 17607  	}
 17608  }
 17609  func rewriteValueARM64_OpFMA(v *Value) bool {
 17610  	v_2 := v.Args[2]
 17611  	v_1 := v.Args[1]
 17612  	v_0 := v.Args[0]
 17613  	// match: (FMA x y z)
 17614  	// result: (FMADDD z x y)
 17615  	for {
 17616  		x := v_0
 17617  		y := v_1
 17618  		z := v_2
 17619  		v.reset(OpARM64FMADDD)
 17620  		v.AddArg3(z, x, y)
 17621  		return true
 17622  	}
 17623  }
 17624  func rewriteValueARM64_OpHmul32(v *Value) bool {
 17625  	v_1 := v.Args[1]
 17626  	v_0 := v.Args[0]
 17627  	b := v.Block
 17628  	typ := &b.Func.Config.Types
 17629  	// match: (Hmul32 x y)
 17630  	// result: (SRAconst (MULL <typ.Int64> x y) [32])
 17631  	for {
 17632  		x := v_0
 17633  		y := v_1
 17634  		v.reset(OpARM64SRAconst)
 17635  		v.AuxInt = int64ToAuxInt(32)
 17636  		v0 := b.NewValue0(v.Pos, OpARM64MULL, typ.Int64)
 17637  		v0.AddArg2(x, y)
 17638  		v.AddArg(v0)
 17639  		return true
 17640  	}
 17641  }
 17642  func rewriteValueARM64_OpHmul32u(v *Value) bool {
 17643  	v_1 := v.Args[1]
 17644  	v_0 := v.Args[0]
 17645  	b := v.Block
 17646  	typ := &b.Func.Config.Types
 17647  	// match: (Hmul32u x y)
 17648  	// result: (SRAconst (UMULL <typ.UInt64> x y) [32])
 17649  	for {
 17650  		x := v_0
 17651  		y := v_1
 17652  		v.reset(OpARM64SRAconst)
 17653  		v.AuxInt = int64ToAuxInt(32)
 17654  		v0 := b.NewValue0(v.Pos, OpARM64UMULL, typ.UInt64)
 17655  		v0.AddArg2(x, y)
 17656  		v.AddArg(v0)
 17657  		return true
 17658  	}
 17659  }
 17660  func rewriteValueARM64_OpIsInBounds(v *Value) bool {
 17661  	v_1 := v.Args[1]
 17662  	v_0 := v.Args[0]
 17663  	b := v.Block
 17664  	// match: (IsInBounds idx len)
 17665  	// result: (LessThanU (CMP idx len))
 17666  	for {
 17667  		idx := v_0
 17668  		len := v_1
 17669  		v.reset(OpARM64LessThanU)
 17670  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 17671  		v0.AddArg2(idx, len)
 17672  		v.AddArg(v0)
 17673  		return true
 17674  	}
 17675  }
 17676  func rewriteValueARM64_OpIsNonNil(v *Value) bool {
 17677  	v_0 := v.Args[0]
 17678  	b := v.Block
 17679  	// match: (IsNonNil ptr)
 17680  	// result: (NotEqual (CMPconst [0] ptr))
 17681  	for {
 17682  		ptr := v_0
 17683  		v.reset(OpARM64NotEqual)
 17684  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 17685  		v0.AuxInt = int64ToAuxInt(0)
 17686  		v0.AddArg(ptr)
 17687  		v.AddArg(v0)
 17688  		return true
 17689  	}
 17690  }
 17691  func rewriteValueARM64_OpIsSliceInBounds(v *Value) bool {
 17692  	v_1 := v.Args[1]
 17693  	v_0 := v.Args[0]
 17694  	b := v.Block
 17695  	// match: (IsSliceInBounds idx len)
 17696  	// result: (LessEqualU (CMP idx len))
 17697  	for {
 17698  		idx := v_0
 17699  		len := v_1
 17700  		v.reset(OpARM64LessEqualU)
 17701  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 17702  		v0.AddArg2(idx, len)
 17703  		v.AddArg(v0)
 17704  		return true
 17705  	}
 17706  }
 17707  func rewriteValueARM64_OpLeq16(v *Value) bool {
 17708  	v_1 := v.Args[1]
 17709  	v_0 := v.Args[0]
 17710  	b := v.Block
 17711  	typ := &b.Func.Config.Types
 17712  	// match: (Leq16 x y)
 17713  	// result: (LessEqual (CMPW (SignExt16to32 x) (SignExt16to32 y)))
 17714  	for {
 17715  		x := v_0
 17716  		y := v_1
 17717  		v.reset(OpARM64LessEqual)
 17718  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17719  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 17720  		v1.AddArg(x)
 17721  		v2 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 17722  		v2.AddArg(y)
 17723  		v0.AddArg2(v1, v2)
 17724  		v.AddArg(v0)
 17725  		return true
 17726  	}
 17727  }
 17728  func rewriteValueARM64_OpLeq16U(v *Value) bool {
 17729  	v_1 := v.Args[1]
 17730  	v_0 := v.Args[0]
 17731  	b := v.Block
 17732  	typ := &b.Func.Config.Types
 17733  	// match: (Leq16U x zero:(MOVDconst [0]))
 17734  	// result: (Eq16 x zero)
 17735  	for {
 17736  		x := v_0
 17737  		zero := v_1
 17738  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 17739  			break
 17740  		}
 17741  		v.reset(OpEq16)
 17742  		v.AddArg2(x, zero)
 17743  		return true
 17744  	}
 17745  	// match: (Leq16U (MOVDconst [1]) x)
 17746  	// result: (Neq16 (MOVDconst [0]) x)
 17747  	for {
 17748  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
 17749  			break
 17750  		}
 17751  		x := v_1
 17752  		v.reset(OpNeq16)
 17753  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 17754  		v0.AuxInt = int64ToAuxInt(0)
 17755  		v.AddArg2(v0, x)
 17756  		return true
 17757  	}
 17758  	// match: (Leq16U x y)
 17759  	// result: (LessEqualU (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
 17760  	for {
 17761  		x := v_0
 17762  		y := v_1
 17763  		v.reset(OpARM64LessEqualU)
 17764  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17765  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 17766  		v1.AddArg(x)
 17767  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 17768  		v2.AddArg(y)
 17769  		v0.AddArg2(v1, v2)
 17770  		v.AddArg(v0)
 17771  		return true
 17772  	}
 17773  }
 17774  func rewriteValueARM64_OpLeq32(v *Value) bool {
 17775  	v_1 := v.Args[1]
 17776  	v_0 := v.Args[0]
 17777  	b := v.Block
 17778  	// match: (Leq32 x y)
 17779  	// result: (LessEqual (CMPW x y))
 17780  	for {
 17781  		x := v_0
 17782  		y := v_1
 17783  		v.reset(OpARM64LessEqual)
 17784  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17785  		v0.AddArg2(x, y)
 17786  		v.AddArg(v0)
 17787  		return true
 17788  	}
 17789  }
 17790  func rewriteValueARM64_OpLeq32F(v *Value) bool {
 17791  	v_1 := v.Args[1]
 17792  	v_0 := v.Args[0]
 17793  	b := v.Block
 17794  	// match: (Leq32F x y)
 17795  	// result: (LessEqualF (FCMPS x y))
 17796  	for {
 17797  		x := v_0
 17798  		y := v_1
 17799  		v.reset(OpARM64LessEqualF)
 17800  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
 17801  		v0.AddArg2(x, y)
 17802  		v.AddArg(v0)
 17803  		return true
 17804  	}
 17805  }
 17806  func rewriteValueARM64_OpLeq32U(v *Value) bool {
 17807  	v_1 := v.Args[1]
 17808  	v_0 := v.Args[0]
 17809  	b := v.Block
 17810  	typ := &b.Func.Config.Types
 17811  	// match: (Leq32U x zero:(MOVDconst [0]))
 17812  	// result: (Eq32 x zero)
 17813  	for {
 17814  		x := v_0
 17815  		zero := v_1
 17816  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 17817  			break
 17818  		}
 17819  		v.reset(OpEq32)
 17820  		v.AddArg2(x, zero)
 17821  		return true
 17822  	}
 17823  	// match: (Leq32U (MOVDconst [1]) x)
 17824  	// result: (Neq32 (MOVDconst [0]) x)
 17825  	for {
 17826  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
 17827  			break
 17828  		}
 17829  		x := v_1
 17830  		v.reset(OpNeq32)
 17831  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 17832  		v0.AuxInt = int64ToAuxInt(0)
 17833  		v.AddArg2(v0, x)
 17834  		return true
 17835  	}
 17836  	// match: (Leq32U x y)
 17837  	// result: (LessEqualU (CMPW x y))
 17838  	for {
 17839  		x := v_0
 17840  		y := v_1
 17841  		v.reset(OpARM64LessEqualU)
 17842  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17843  		v0.AddArg2(x, y)
 17844  		v.AddArg(v0)
 17845  		return true
 17846  	}
 17847  }
 17848  func rewriteValueARM64_OpLeq64(v *Value) bool {
 17849  	v_1 := v.Args[1]
 17850  	v_0 := v.Args[0]
 17851  	b := v.Block
 17852  	// match: (Leq64 x y)
 17853  	// result: (LessEqual (CMP x y))
 17854  	for {
 17855  		x := v_0
 17856  		y := v_1
 17857  		v.reset(OpARM64LessEqual)
 17858  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 17859  		v0.AddArg2(x, y)
 17860  		v.AddArg(v0)
 17861  		return true
 17862  	}
 17863  }
 17864  func rewriteValueARM64_OpLeq64F(v *Value) bool {
 17865  	v_1 := v.Args[1]
 17866  	v_0 := v.Args[0]
 17867  	b := v.Block
 17868  	// match: (Leq64F x y)
 17869  	// result: (LessEqualF (FCMPD x y))
 17870  	for {
 17871  		x := v_0
 17872  		y := v_1
 17873  		v.reset(OpARM64LessEqualF)
 17874  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
 17875  		v0.AddArg2(x, y)
 17876  		v.AddArg(v0)
 17877  		return true
 17878  	}
 17879  }
 17880  func rewriteValueARM64_OpLeq64U(v *Value) bool {
 17881  	v_1 := v.Args[1]
 17882  	v_0 := v.Args[0]
 17883  	b := v.Block
 17884  	typ := &b.Func.Config.Types
 17885  	// match: (Leq64U x zero:(MOVDconst [0]))
 17886  	// result: (Eq64 x zero)
 17887  	for {
 17888  		x := v_0
 17889  		zero := v_1
 17890  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 17891  			break
 17892  		}
 17893  		v.reset(OpEq64)
 17894  		v.AddArg2(x, zero)
 17895  		return true
 17896  	}
 17897  	// match: (Leq64U (MOVDconst [1]) x)
 17898  	// result: (Neq64 (MOVDconst [0]) x)
 17899  	for {
 17900  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
 17901  			break
 17902  		}
 17903  		x := v_1
 17904  		v.reset(OpNeq64)
 17905  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 17906  		v0.AuxInt = int64ToAuxInt(0)
 17907  		v.AddArg2(v0, x)
 17908  		return true
 17909  	}
 17910  	// match: (Leq64U x y)
 17911  	// result: (LessEqualU (CMP x y))
 17912  	for {
 17913  		x := v_0
 17914  		y := v_1
 17915  		v.reset(OpARM64LessEqualU)
 17916  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 17917  		v0.AddArg2(x, y)
 17918  		v.AddArg(v0)
 17919  		return true
 17920  	}
 17921  }
 17922  func rewriteValueARM64_OpLeq8(v *Value) bool {
 17923  	v_1 := v.Args[1]
 17924  	v_0 := v.Args[0]
 17925  	b := v.Block
 17926  	typ := &b.Func.Config.Types
 17927  	// match: (Leq8 x y)
 17928  	// result: (LessEqual (CMPW (SignExt8to32 x) (SignExt8to32 y)))
 17929  	for {
 17930  		x := v_0
 17931  		y := v_1
 17932  		v.reset(OpARM64LessEqual)
 17933  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17934  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 17935  		v1.AddArg(x)
 17936  		v2 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 17937  		v2.AddArg(y)
 17938  		v0.AddArg2(v1, v2)
 17939  		v.AddArg(v0)
 17940  		return true
 17941  	}
 17942  }
 17943  func rewriteValueARM64_OpLeq8U(v *Value) bool {
 17944  	v_1 := v.Args[1]
 17945  	v_0 := v.Args[0]
 17946  	b := v.Block
 17947  	typ := &b.Func.Config.Types
 17948  	// match: (Leq8U x zero:(MOVDconst [0]))
 17949  	// result: (Eq8 x zero)
 17950  	for {
 17951  		x := v_0
 17952  		zero := v_1
 17953  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 17954  			break
 17955  		}
 17956  		v.reset(OpEq8)
 17957  		v.AddArg2(x, zero)
 17958  		return true
 17959  	}
 17960  	// match: (Leq8U (MOVDconst [1]) x)
 17961  	// result: (Neq8 (MOVDconst [0]) x)
 17962  	for {
 17963  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
 17964  			break
 17965  		}
 17966  		x := v_1
 17967  		v.reset(OpNeq8)
 17968  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 17969  		v0.AuxInt = int64ToAuxInt(0)
 17970  		v.AddArg2(v0, x)
 17971  		return true
 17972  	}
 17973  	// match: (Leq8U x y)
 17974  	// result: (LessEqualU (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
 17975  	for {
 17976  		x := v_0
 17977  		y := v_1
 17978  		v.reset(OpARM64LessEqualU)
 17979  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17980  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 17981  		v1.AddArg(x)
 17982  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 17983  		v2.AddArg(y)
 17984  		v0.AddArg2(v1, v2)
 17985  		v.AddArg(v0)
 17986  		return true
 17987  	}
 17988  }
 17989  func rewriteValueARM64_OpLess16(v *Value) bool {
 17990  	v_1 := v.Args[1]
 17991  	v_0 := v.Args[0]
 17992  	b := v.Block
 17993  	typ := &b.Func.Config.Types
 17994  	// match: (Less16 x y)
 17995  	// result: (LessThan (CMPW (SignExt16to32 x) (SignExt16to32 y)))
 17996  	for {
 17997  		x := v_0
 17998  		y := v_1
 17999  		v.reset(OpARM64LessThan)
 18000  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 18001  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 18002  		v1.AddArg(x)
 18003  		v2 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 18004  		v2.AddArg(y)
 18005  		v0.AddArg2(v1, v2)
 18006  		v.AddArg(v0)
 18007  		return true
 18008  	}
 18009  }
 18010  func rewriteValueARM64_OpLess16U(v *Value) bool {
 18011  	v_1 := v.Args[1]
 18012  	v_0 := v.Args[0]
 18013  	b := v.Block
 18014  	typ := &b.Func.Config.Types
 18015  	// match: (Less16U zero:(MOVDconst [0]) x)
 18016  	// result: (Neq16 zero x)
 18017  	for {
 18018  		zero := v_0
 18019  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 18020  			break
 18021  		}
 18022  		x := v_1
 18023  		v.reset(OpNeq16)
 18024  		v.AddArg2(zero, x)
 18025  		return true
 18026  	}
 18027  	// match: (Less16U x (MOVDconst [1]))
 18028  	// result: (Eq16 x (MOVDconst [0]))
 18029  	for {
 18030  		x := v_0
 18031  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 18032  			break
 18033  		}
 18034  		v.reset(OpEq16)
 18035  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 18036  		v0.AuxInt = int64ToAuxInt(0)
 18037  		v.AddArg2(x, v0)
 18038  		return true
 18039  	}
 18040  	// match: (Less16U x y)
 18041  	// result: (LessThanU (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
 18042  	for {
 18043  		x := v_0
 18044  		y := v_1
 18045  		v.reset(OpARM64LessThanU)
 18046  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 18047  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 18048  		v1.AddArg(x)
 18049  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 18050  		v2.AddArg(y)
 18051  		v0.AddArg2(v1, v2)
 18052  		v.AddArg(v0)
 18053  		return true
 18054  	}
 18055  }
 18056  func rewriteValueARM64_OpLess32(v *Value) bool {
 18057  	v_1 := v.Args[1]
 18058  	v_0 := v.Args[0]
 18059  	b := v.Block
 18060  	// match: (Less32 x y)
 18061  	// result: (LessThan (CMPW x y))
 18062  	for {
 18063  		x := v_0
 18064  		y := v_1
 18065  		v.reset(OpARM64LessThan)
 18066  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 18067  		v0.AddArg2(x, y)
 18068  		v.AddArg(v0)
 18069  		return true
 18070  	}
 18071  }
 18072  func rewriteValueARM64_OpLess32F(v *Value) bool {
 18073  	v_1 := v.Args[1]
 18074  	v_0 := v.Args[0]
 18075  	b := v.Block
 18076  	// match: (Less32F x y)
 18077  	// result: (LessThanF (FCMPS x y))
 18078  	for {
 18079  		x := v_0
 18080  		y := v_1
 18081  		v.reset(OpARM64LessThanF)
 18082  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
 18083  		v0.AddArg2(x, y)
 18084  		v.AddArg(v0)
 18085  		return true
 18086  	}
 18087  }
 18088  func rewriteValueARM64_OpLess32U(v *Value) bool {
 18089  	v_1 := v.Args[1]
 18090  	v_0 := v.Args[0]
 18091  	b := v.Block
 18092  	typ := &b.Func.Config.Types
 18093  	// match: (Less32U zero:(MOVDconst [0]) x)
 18094  	// result: (Neq32 zero x)
 18095  	for {
 18096  		zero := v_0
 18097  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 18098  			break
 18099  		}
 18100  		x := v_1
 18101  		v.reset(OpNeq32)
 18102  		v.AddArg2(zero, x)
 18103  		return true
 18104  	}
 18105  	// match: (Less32U x (MOVDconst [1]))
 18106  	// result: (Eq32 x (MOVDconst [0]))
 18107  	for {
 18108  		x := v_0
 18109  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 18110  			break
 18111  		}
 18112  		v.reset(OpEq32)
 18113  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 18114  		v0.AuxInt = int64ToAuxInt(0)
 18115  		v.AddArg2(x, v0)
 18116  		return true
 18117  	}
 18118  	// match: (Less32U x y)
 18119  	// result: (LessThanU (CMPW x y))
 18120  	for {
 18121  		x := v_0
 18122  		y := v_1
 18123  		v.reset(OpARM64LessThanU)
 18124  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 18125  		v0.AddArg2(x, y)
 18126  		v.AddArg(v0)
 18127  		return true
 18128  	}
 18129  }
 18130  func rewriteValueARM64_OpLess64(v *Value) bool {
 18131  	v_1 := v.Args[1]
 18132  	v_0 := v.Args[0]
 18133  	b := v.Block
 18134  	// match: (Less64 x y)
 18135  	// result: (LessThan (CMP x y))
 18136  	for {
 18137  		x := v_0
 18138  		y := v_1
 18139  		v.reset(OpARM64LessThan)
 18140  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 18141  		v0.AddArg2(x, y)
 18142  		v.AddArg(v0)
 18143  		return true
 18144  	}
 18145  }
 18146  func rewriteValueARM64_OpLess64F(v *Value) bool {
 18147  	v_1 := v.Args[1]
 18148  	v_0 := v.Args[0]
 18149  	b := v.Block
 18150  	// match: (Less64F x y)
 18151  	// result: (LessThanF (FCMPD x y))
 18152  	for {
 18153  		x := v_0
 18154  		y := v_1
 18155  		v.reset(OpARM64LessThanF)
 18156  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
 18157  		v0.AddArg2(x, y)
 18158  		v.AddArg(v0)
 18159  		return true
 18160  	}
 18161  }
 18162  func rewriteValueARM64_OpLess64U(v *Value) bool {
 18163  	v_1 := v.Args[1]
 18164  	v_0 := v.Args[0]
 18165  	b := v.Block
 18166  	typ := &b.Func.Config.Types
 18167  	// match: (Less64U zero:(MOVDconst [0]) x)
 18168  	// result: (Neq64 zero x)
 18169  	for {
 18170  		zero := v_0
 18171  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 18172  			break
 18173  		}
 18174  		x := v_1
 18175  		v.reset(OpNeq64)
 18176  		v.AddArg2(zero, x)
 18177  		return true
 18178  	}
 18179  	// match: (Less64U x (MOVDconst [1]))
 18180  	// result: (Eq64 x (MOVDconst [0]))
 18181  	for {
 18182  		x := v_0
 18183  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 18184  			break
 18185  		}
 18186  		v.reset(OpEq64)
 18187  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 18188  		v0.AuxInt = int64ToAuxInt(0)
 18189  		v.AddArg2(x, v0)
 18190  		return true
 18191  	}
 18192  	// match: (Less64U x y)
 18193  	// result: (LessThanU (CMP x y))
 18194  	for {
 18195  		x := v_0
 18196  		y := v_1
 18197  		v.reset(OpARM64LessThanU)
 18198  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 18199  		v0.AddArg2(x, y)
 18200  		v.AddArg(v0)
 18201  		return true
 18202  	}
 18203  }
 18204  func rewriteValueARM64_OpLess8(v *Value) bool {
 18205  	v_1 := v.Args[1]
 18206  	v_0 := v.Args[0]
 18207  	b := v.Block
 18208  	typ := &b.Func.Config.Types
 18209  	// match: (Less8 x y)
 18210  	// result: (LessThan (CMPW (SignExt8to32 x) (SignExt8to32 y)))
 18211  	for {
 18212  		x := v_0
 18213  		y := v_1
 18214  		v.reset(OpARM64LessThan)
 18215  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 18216  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 18217  		v1.AddArg(x)
 18218  		v2 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 18219  		v2.AddArg(y)
 18220  		v0.AddArg2(v1, v2)
 18221  		v.AddArg(v0)
 18222  		return true
 18223  	}
 18224  }
 18225  func rewriteValueARM64_OpLess8U(v *Value) bool {
 18226  	v_1 := v.Args[1]
 18227  	v_0 := v.Args[0]
 18228  	b := v.Block
 18229  	typ := &b.Func.Config.Types
 18230  	// match: (Less8U zero:(MOVDconst [0]) x)
 18231  	// result: (Neq8 zero x)
 18232  	for {
 18233  		zero := v_0
 18234  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 18235  			break
 18236  		}
 18237  		x := v_1
 18238  		v.reset(OpNeq8)
 18239  		v.AddArg2(zero, x)
 18240  		return true
 18241  	}
 18242  	// match: (Less8U x (MOVDconst [1]))
 18243  	// result: (Eq8 x (MOVDconst [0]))
 18244  	for {
 18245  		x := v_0
 18246  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 18247  			break
 18248  		}
 18249  		v.reset(OpEq8)
 18250  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 18251  		v0.AuxInt = int64ToAuxInt(0)
 18252  		v.AddArg2(x, v0)
 18253  		return true
 18254  	}
 18255  	// match: (Less8U x y)
 18256  	// result: (LessThanU (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
 18257  	for {
 18258  		x := v_0
 18259  		y := v_1
 18260  		v.reset(OpARM64LessThanU)
 18261  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 18262  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 18263  		v1.AddArg(x)
 18264  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 18265  		v2.AddArg(y)
 18266  		v0.AddArg2(v1, v2)
 18267  		v.AddArg(v0)
 18268  		return true
 18269  	}
 18270  }
 18271  func rewriteValueARM64_OpLoad(v *Value) bool {
 18272  	v_1 := v.Args[1]
 18273  	v_0 := v.Args[0]
 18274  	// match: (Load <t> ptr mem)
 18275  	// cond: t.IsBoolean()
 18276  	// result: (MOVBUload ptr mem)
 18277  	for {
 18278  		t := v.Type
 18279  		ptr := v_0
 18280  		mem := v_1
 18281  		if !(t.IsBoolean()) {
 18282  			break
 18283  		}
 18284  		v.reset(OpARM64MOVBUload)
 18285  		v.AddArg2(ptr, mem)
 18286  		return true
 18287  	}
 18288  	// match: (Load <t> ptr mem)
 18289  	// cond: (is8BitInt(t) && t.IsSigned())
 18290  	// result: (MOVBload ptr mem)
 18291  	for {
 18292  		t := v.Type
 18293  		ptr := v_0
 18294  		mem := v_1
 18295  		if !(is8BitInt(t) && t.IsSigned()) {
 18296  			break
 18297  		}
 18298  		v.reset(OpARM64MOVBload)
 18299  		v.AddArg2(ptr, mem)
 18300  		return true
 18301  	}
 18302  	// match: (Load <t> ptr mem)
 18303  	// cond: (is8BitInt(t) && !t.IsSigned())
 18304  	// result: (MOVBUload ptr mem)
 18305  	for {
 18306  		t := v.Type
 18307  		ptr := v_0
 18308  		mem := v_1
 18309  		if !(is8BitInt(t) && !t.IsSigned()) {
 18310  			break
 18311  		}
 18312  		v.reset(OpARM64MOVBUload)
 18313  		v.AddArg2(ptr, mem)
 18314  		return true
 18315  	}
 18316  	// match: (Load <t> ptr mem)
 18317  	// cond: (is16BitInt(t) && t.IsSigned())
 18318  	// result: (MOVHload ptr mem)
 18319  	for {
 18320  		t := v.Type
 18321  		ptr := v_0
 18322  		mem := v_1
 18323  		if !(is16BitInt(t) && t.IsSigned()) {
 18324  			break
 18325  		}
 18326  		v.reset(OpARM64MOVHload)
 18327  		v.AddArg2(ptr, mem)
 18328  		return true
 18329  	}
 18330  	// match: (Load <t> ptr mem)
 18331  	// cond: (is16BitInt(t) && !t.IsSigned())
 18332  	// result: (MOVHUload ptr mem)
 18333  	for {
 18334  		t := v.Type
 18335  		ptr := v_0
 18336  		mem := v_1
 18337  		if !(is16BitInt(t) && !t.IsSigned()) {
 18338  			break
 18339  		}
 18340  		v.reset(OpARM64MOVHUload)
 18341  		v.AddArg2(ptr, mem)
 18342  		return true
 18343  	}
 18344  	// match: (Load <t> ptr mem)
 18345  	// cond: (is32BitInt(t) && t.IsSigned())
 18346  	// result: (MOVWload ptr mem)
 18347  	for {
 18348  		t := v.Type
 18349  		ptr := v_0
 18350  		mem := v_1
 18351  		if !(is32BitInt(t) && t.IsSigned()) {
 18352  			break
 18353  		}
 18354  		v.reset(OpARM64MOVWload)
 18355  		v.AddArg2(ptr, mem)
 18356  		return true
 18357  	}
 18358  	// match: (Load <t> ptr mem)
 18359  	// cond: (is32BitInt(t) && !t.IsSigned())
 18360  	// result: (MOVWUload ptr mem)
 18361  	for {
 18362  		t := v.Type
 18363  		ptr := v_0
 18364  		mem := v_1
 18365  		if !(is32BitInt(t) && !t.IsSigned()) {
 18366  			break
 18367  		}
 18368  		v.reset(OpARM64MOVWUload)
 18369  		v.AddArg2(ptr, mem)
 18370  		return true
 18371  	}
 18372  	// match: (Load <t> ptr mem)
 18373  	// cond: (is64BitInt(t) || isPtr(t))
 18374  	// result: (MOVDload ptr mem)
 18375  	for {
 18376  		t := v.Type
 18377  		ptr := v_0
 18378  		mem := v_1
 18379  		if !(is64BitInt(t) || isPtr(t)) {
 18380  			break
 18381  		}
 18382  		v.reset(OpARM64MOVDload)
 18383  		v.AddArg2(ptr, mem)
 18384  		return true
 18385  	}
 18386  	// match: (Load <t> ptr mem)
 18387  	// cond: is32BitFloat(t)
 18388  	// result: (FMOVSload ptr mem)
 18389  	for {
 18390  		t := v.Type
 18391  		ptr := v_0
 18392  		mem := v_1
 18393  		if !(is32BitFloat(t)) {
 18394  			break
 18395  		}
 18396  		v.reset(OpARM64FMOVSload)
 18397  		v.AddArg2(ptr, mem)
 18398  		return true
 18399  	}
 18400  	// match: (Load <t> ptr mem)
 18401  	// cond: is64BitFloat(t)
 18402  	// result: (FMOVDload ptr mem)
 18403  	for {
 18404  		t := v.Type
 18405  		ptr := v_0
 18406  		mem := v_1
 18407  		if !(is64BitFloat(t)) {
 18408  			break
 18409  		}
 18410  		v.reset(OpARM64FMOVDload)
 18411  		v.AddArg2(ptr, mem)
 18412  		return true
 18413  	}
 18414  	return false
 18415  }
 18416  func rewriteValueARM64_OpLocalAddr(v *Value) bool {
 18417  	v_1 := v.Args[1]
 18418  	v_0 := v.Args[0]
 18419  	b := v.Block
 18420  	typ := &b.Func.Config.Types
 18421  	// match: (LocalAddr <t> {sym} base mem)
 18422  	// cond: t.Elem().HasPointers()
 18423  	// result: (MOVDaddr {sym} (SPanchored base mem))
 18424  	for {
 18425  		t := v.Type
 18426  		sym := auxToSym(v.Aux)
 18427  		base := v_0
 18428  		mem := v_1
 18429  		if !(t.Elem().HasPointers()) {
 18430  			break
 18431  		}
 18432  		v.reset(OpARM64MOVDaddr)
 18433  		v.Aux = symToAux(sym)
 18434  		v0 := b.NewValue0(v.Pos, OpSPanchored, typ.Uintptr)
 18435  		v0.AddArg2(base, mem)
 18436  		v.AddArg(v0)
 18437  		return true
 18438  	}
 18439  	// match: (LocalAddr <t> {sym} base _)
 18440  	// cond: !t.Elem().HasPointers()
 18441  	// result: (MOVDaddr {sym} base)
 18442  	for {
 18443  		t := v.Type
 18444  		sym := auxToSym(v.Aux)
 18445  		base := v_0
 18446  		if !(!t.Elem().HasPointers()) {
 18447  			break
 18448  		}
 18449  		v.reset(OpARM64MOVDaddr)
 18450  		v.Aux = symToAux(sym)
 18451  		v.AddArg(base)
 18452  		return true
 18453  	}
 18454  	return false
 18455  }
 18456  func rewriteValueARM64_OpLsh16x16(v *Value) bool {
 18457  	v_1 := v.Args[1]
 18458  	v_0 := v.Args[0]
 18459  	b := v.Block
 18460  	typ := &b.Func.Config.Types
 18461  	// match: (Lsh16x16 <t> x y)
 18462  	// cond: shiftIsBounded(v)
 18463  	// result: (SLL <t> x y)
 18464  	for {
 18465  		t := v.Type
 18466  		x := v_0
 18467  		y := v_1
 18468  		if !(shiftIsBounded(v)) {
 18469  			break
 18470  		}
 18471  		v.reset(OpARM64SLL)
 18472  		v.Type = t
 18473  		v.AddArg2(x, y)
 18474  		return true
 18475  	}
 18476  	// match: (Lsh16x16 <t> x y)
 18477  	// cond: !shiftIsBounded(v)
 18478  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 18479  	for {
 18480  		t := v.Type
 18481  		x := v_0
 18482  		y := v_1
 18483  		if !(!shiftIsBounded(v)) {
 18484  			break
 18485  		}
 18486  		v.reset(OpARM64CSEL)
 18487  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18488  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18489  		v0.AddArg2(x, y)
 18490  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18491  		v1.AuxInt = int64ToAuxInt(0)
 18492  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18493  		v2.AuxInt = int64ToAuxInt(64)
 18494  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 18495  		v3.AddArg(y)
 18496  		v2.AddArg(v3)
 18497  		v.AddArg3(v0, v1, v2)
 18498  		return true
 18499  	}
 18500  	return false
 18501  }
 18502  func rewriteValueARM64_OpLsh16x32(v *Value) bool {
 18503  	v_1 := v.Args[1]
 18504  	v_0 := v.Args[0]
 18505  	b := v.Block
 18506  	typ := &b.Func.Config.Types
 18507  	// match: (Lsh16x32 <t> x y)
 18508  	// cond: shiftIsBounded(v)
 18509  	// result: (SLL <t> x y)
 18510  	for {
 18511  		t := v.Type
 18512  		x := v_0
 18513  		y := v_1
 18514  		if !(shiftIsBounded(v)) {
 18515  			break
 18516  		}
 18517  		v.reset(OpARM64SLL)
 18518  		v.Type = t
 18519  		v.AddArg2(x, y)
 18520  		return true
 18521  	}
 18522  	// match: (Lsh16x32 <t> x y)
 18523  	// cond: !shiftIsBounded(v)
 18524  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 18525  	for {
 18526  		t := v.Type
 18527  		x := v_0
 18528  		y := v_1
 18529  		if !(!shiftIsBounded(v)) {
 18530  			break
 18531  		}
 18532  		v.reset(OpARM64CSEL)
 18533  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18534  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18535  		v0.AddArg2(x, y)
 18536  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18537  		v1.AuxInt = int64ToAuxInt(0)
 18538  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18539  		v2.AuxInt = int64ToAuxInt(64)
 18540  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 18541  		v3.AddArg(y)
 18542  		v2.AddArg(v3)
 18543  		v.AddArg3(v0, v1, v2)
 18544  		return true
 18545  	}
 18546  	return false
 18547  }
 18548  func rewriteValueARM64_OpLsh16x64(v *Value) bool {
 18549  	v_1 := v.Args[1]
 18550  	v_0 := v.Args[0]
 18551  	b := v.Block
 18552  	// match: (Lsh16x64 <t> x y)
 18553  	// cond: shiftIsBounded(v)
 18554  	// result: (SLL <t> x y)
 18555  	for {
 18556  		t := v.Type
 18557  		x := v_0
 18558  		y := v_1
 18559  		if !(shiftIsBounded(v)) {
 18560  			break
 18561  		}
 18562  		v.reset(OpARM64SLL)
 18563  		v.Type = t
 18564  		v.AddArg2(x, y)
 18565  		return true
 18566  	}
 18567  	// match: (Lsh16x64 <t> x y)
 18568  	// cond: !shiftIsBounded(v)
 18569  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] y))
 18570  	for {
 18571  		t := v.Type
 18572  		x := v_0
 18573  		y := v_1
 18574  		if !(!shiftIsBounded(v)) {
 18575  			break
 18576  		}
 18577  		v.reset(OpARM64CSEL)
 18578  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18579  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18580  		v0.AddArg2(x, y)
 18581  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18582  		v1.AuxInt = int64ToAuxInt(0)
 18583  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18584  		v2.AuxInt = int64ToAuxInt(64)
 18585  		v2.AddArg(y)
 18586  		v.AddArg3(v0, v1, v2)
 18587  		return true
 18588  	}
 18589  	return false
 18590  }
 18591  func rewriteValueARM64_OpLsh16x8(v *Value) bool {
 18592  	v_1 := v.Args[1]
 18593  	v_0 := v.Args[0]
 18594  	b := v.Block
 18595  	typ := &b.Func.Config.Types
 18596  	// match: (Lsh16x8 <t> x y)
 18597  	// cond: shiftIsBounded(v)
 18598  	// result: (SLL <t> x y)
 18599  	for {
 18600  		t := v.Type
 18601  		x := v_0
 18602  		y := v_1
 18603  		if !(shiftIsBounded(v)) {
 18604  			break
 18605  		}
 18606  		v.reset(OpARM64SLL)
 18607  		v.Type = t
 18608  		v.AddArg2(x, y)
 18609  		return true
 18610  	}
 18611  	// match: (Lsh16x8 <t> x y)
 18612  	// cond: !shiftIsBounded(v)
 18613  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 18614  	for {
 18615  		t := v.Type
 18616  		x := v_0
 18617  		y := v_1
 18618  		if !(!shiftIsBounded(v)) {
 18619  			break
 18620  		}
 18621  		v.reset(OpARM64CSEL)
 18622  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18623  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18624  		v0.AddArg2(x, y)
 18625  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18626  		v1.AuxInt = int64ToAuxInt(0)
 18627  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18628  		v2.AuxInt = int64ToAuxInt(64)
 18629  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 18630  		v3.AddArg(y)
 18631  		v2.AddArg(v3)
 18632  		v.AddArg3(v0, v1, v2)
 18633  		return true
 18634  	}
 18635  	return false
 18636  }
 18637  func rewriteValueARM64_OpLsh32x16(v *Value) bool {
 18638  	v_1 := v.Args[1]
 18639  	v_0 := v.Args[0]
 18640  	b := v.Block
 18641  	typ := &b.Func.Config.Types
 18642  	// match: (Lsh32x16 <t> x y)
 18643  	// cond: shiftIsBounded(v)
 18644  	// result: (SLL <t> x y)
 18645  	for {
 18646  		t := v.Type
 18647  		x := v_0
 18648  		y := v_1
 18649  		if !(shiftIsBounded(v)) {
 18650  			break
 18651  		}
 18652  		v.reset(OpARM64SLL)
 18653  		v.Type = t
 18654  		v.AddArg2(x, y)
 18655  		return true
 18656  	}
 18657  	// match: (Lsh32x16 <t> x y)
 18658  	// cond: !shiftIsBounded(v)
 18659  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 18660  	for {
 18661  		t := v.Type
 18662  		x := v_0
 18663  		y := v_1
 18664  		if !(!shiftIsBounded(v)) {
 18665  			break
 18666  		}
 18667  		v.reset(OpARM64CSEL)
 18668  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18669  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18670  		v0.AddArg2(x, y)
 18671  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18672  		v1.AuxInt = int64ToAuxInt(0)
 18673  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18674  		v2.AuxInt = int64ToAuxInt(64)
 18675  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 18676  		v3.AddArg(y)
 18677  		v2.AddArg(v3)
 18678  		v.AddArg3(v0, v1, v2)
 18679  		return true
 18680  	}
 18681  	return false
 18682  }
 18683  func rewriteValueARM64_OpLsh32x32(v *Value) bool {
 18684  	v_1 := v.Args[1]
 18685  	v_0 := v.Args[0]
 18686  	b := v.Block
 18687  	typ := &b.Func.Config.Types
 18688  	// match: (Lsh32x32 <t> x y)
 18689  	// cond: shiftIsBounded(v)
 18690  	// result: (SLL <t> x y)
 18691  	for {
 18692  		t := v.Type
 18693  		x := v_0
 18694  		y := v_1
 18695  		if !(shiftIsBounded(v)) {
 18696  			break
 18697  		}
 18698  		v.reset(OpARM64SLL)
 18699  		v.Type = t
 18700  		v.AddArg2(x, y)
 18701  		return true
 18702  	}
 18703  	// match: (Lsh32x32 <t> x y)
 18704  	// cond: !shiftIsBounded(v)
 18705  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 18706  	for {
 18707  		t := v.Type
 18708  		x := v_0
 18709  		y := v_1
 18710  		if !(!shiftIsBounded(v)) {
 18711  			break
 18712  		}
 18713  		v.reset(OpARM64CSEL)
 18714  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18715  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18716  		v0.AddArg2(x, y)
 18717  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18718  		v1.AuxInt = int64ToAuxInt(0)
 18719  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18720  		v2.AuxInt = int64ToAuxInt(64)
 18721  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 18722  		v3.AddArg(y)
 18723  		v2.AddArg(v3)
 18724  		v.AddArg3(v0, v1, v2)
 18725  		return true
 18726  	}
 18727  	return false
 18728  }
 18729  func rewriteValueARM64_OpLsh32x64(v *Value) bool {
 18730  	v_1 := v.Args[1]
 18731  	v_0 := v.Args[0]
 18732  	b := v.Block
 18733  	// match: (Lsh32x64 <t> x y)
 18734  	// cond: shiftIsBounded(v)
 18735  	// result: (SLL <t> x y)
 18736  	for {
 18737  		t := v.Type
 18738  		x := v_0
 18739  		y := v_1
 18740  		if !(shiftIsBounded(v)) {
 18741  			break
 18742  		}
 18743  		v.reset(OpARM64SLL)
 18744  		v.Type = t
 18745  		v.AddArg2(x, y)
 18746  		return true
 18747  	}
 18748  	// match: (Lsh32x64 <t> x y)
 18749  	// cond: !shiftIsBounded(v)
 18750  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] y))
 18751  	for {
 18752  		t := v.Type
 18753  		x := v_0
 18754  		y := v_1
 18755  		if !(!shiftIsBounded(v)) {
 18756  			break
 18757  		}
 18758  		v.reset(OpARM64CSEL)
 18759  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18760  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18761  		v0.AddArg2(x, y)
 18762  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18763  		v1.AuxInt = int64ToAuxInt(0)
 18764  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18765  		v2.AuxInt = int64ToAuxInt(64)
 18766  		v2.AddArg(y)
 18767  		v.AddArg3(v0, v1, v2)
 18768  		return true
 18769  	}
 18770  	return false
 18771  }
 18772  func rewriteValueARM64_OpLsh32x8(v *Value) bool {
 18773  	v_1 := v.Args[1]
 18774  	v_0 := v.Args[0]
 18775  	b := v.Block
 18776  	typ := &b.Func.Config.Types
 18777  	// match: (Lsh32x8 <t> x y)
 18778  	// cond: shiftIsBounded(v)
 18779  	// result: (SLL <t> x y)
 18780  	for {
 18781  		t := v.Type
 18782  		x := v_0
 18783  		y := v_1
 18784  		if !(shiftIsBounded(v)) {
 18785  			break
 18786  		}
 18787  		v.reset(OpARM64SLL)
 18788  		v.Type = t
 18789  		v.AddArg2(x, y)
 18790  		return true
 18791  	}
 18792  	// match: (Lsh32x8 <t> x y)
 18793  	// cond: !shiftIsBounded(v)
 18794  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 18795  	for {
 18796  		t := v.Type
 18797  		x := v_0
 18798  		y := v_1
 18799  		if !(!shiftIsBounded(v)) {
 18800  			break
 18801  		}
 18802  		v.reset(OpARM64CSEL)
 18803  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18804  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18805  		v0.AddArg2(x, y)
 18806  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18807  		v1.AuxInt = int64ToAuxInt(0)
 18808  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18809  		v2.AuxInt = int64ToAuxInt(64)
 18810  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 18811  		v3.AddArg(y)
 18812  		v2.AddArg(v3)
 18813  		v.AddArg3(v0, v1, v2)
 18814  		return true
 18815  	}
 18816  	return false
 18817  }
 18818  func rewriteValueARM64_OpLsh64x16(v *Value) bool {
 18819  	v_1 := v.Args[1]
 18820  	v_0 := v.Args[0]
 18821  	b := v.Block
 18822  	typ := &b.Func.Config.Types
 18823  	// match: (Lsh64x16 <t> x y)
 18824  	// cond: shiftIsBounded(v)
 18825  	// result: (SLL <t> x y)
 18826  	for {
 18827  		t := v.Type
 18828  		x := v_0
 18829  		y := v_1
 18830  		if !(shiftIsBounded(v)) {
 18831  			break
 18832  		}
 18833  		v.reset(OpARM64SLL)
 18834  		v.Type = t
 18835  		v.AddArg2(x, y)
 18836  		return true
 18837  	}
 18838  	// match: (Lsh64x16 <t> x y)
 18839  	// cond: !shiftIsBounded(v)
 18840  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 18841  	for {
 18842  		t := v.Type
 18843  		x := v_0
 18844  		y := v_1
 18845  		if !(!shiftIsBounded(v)) {
 18846  			break
 18847  		}
 18848  		v.reset(OpARM64CSEL)
 18849  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18850  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18851  		v0.AddArg2(x, y)
 18852  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18853  		v1.AuxInt = int64ToAuxInt(0)
 18854  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18855  		v2.AuxInt = int64ToAuxInt(64)
 18856  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 18857  		v3.AddArg(y)
 18858  		v2.AddArg(v3)
 18859  		v.AddArg3(v0, v1, v2)
 18860  		return true
 18861  	}
 18862  	return false
 18863  }
 18864  func rewriteValueARM64_OpLsh64x32(v *Value) bool {
 18865  	v_1 := v.Args[1]
 18866  	v_0 := v.Args[0]
 18867  	b := v.Block
 18868  	typ := &b.Func.Config.Types
 18869  	// match: (Lsh64x32 <t> x y)
 18870  	// cond: shiftIsBounded(v)
 18871  	// result: (SLL <t> x y)
 18872  	for {
 18873  		t := v.Type
 18874  		x := v_0
 18875  		y := v_1
 18876  		if !(shiftIsBounded(v)) {
 18877  			break
 18878  		}
 18879  		v.reset(OpARM64SLL)
 18880  		v.Type = t
 18881  		v.AddArg2(x, y)
 18882  		return true
 18883  	}
 18884  	// match: (Lsh64x32 <t> x y)
 18885  	// cond: !shiftIsBounded(v)
 18886  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 18887  	for {
 18888  		t := v.Type
 18889  		x := v_0
 18890  		y := v_1
 18891  		if !(!shiftIsBounded(v)) {
 18892  			break
 18893  		}
 18894  		v.reset(OpARM64CSEL)
 18895  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18896  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18897  		v0.AddArg2(x, y)
 18898  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18899  		v1.AuxInt = int64ToAuxInt(0)
 18900  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18901  		v2.AuxInt = int64ToAuxInt(64)
 18902  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 18903  		v3.AddArg(y)
 18904  		v2.AddArg(v3)
 18905  		v.AddArg3(v0, v1, v2)
 18906  		return true
 18907  	}
 18908  	return false
 18909  }
 18910  func rewriteValueARM64_OpLsh64x64(v *Value) bool {
 18911  	v_1 := v.Args[1]
 18912  	v_0 := v.Args[0]
 18913  	b := v.Block
 18914  	// match: (Lsh64x64 <t> x y)
 18915  	// cond: shiftIsBounded(v)
 18916  	// result: (SLL <t> x y)
 18917  	for {
 18918  		t := v.Type
 18919  		x := v_0
 18920  		y := v_1
 18921  		if !(shiftIsBounded(v)) {
 18922  			break
 18923  		}
 18924  		v.reset(OpARM64SLL)
 18925  		v.Type = t
 18926  		v.AddArg2(x, y)
 18927  		return true
 18928  	}
 18929  	// match: (Lsh64x64 <t> x y)
 18930  	// cond: !shiftIsBounded(v)
 18931  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] y))
 18932  	for {
 18933  		t := v.Type
 18934  		x := v_0
 18935  		y := v_1
 18936  		if !(!shiftIsBounded(v)) {
 18937  			break
 18938  		}
 18939  		v.reset(OpARM64CSEL)
 18940  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18941  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18942  		v0.AddArg2(x, y)
 18943  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18944  		v1.AuxInt = int64ToAuxInt(0)
 18945  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18946  		v2.AuxInt = int64ToAuxInt(64)
 18947  		v2.AddArg(y)
 18948  		v.AddArg3(v0, v1, v2)
 18949  		return true
 18950  	}
 18951  	return false
 18952  }
 18953  func rewriteValueARM64_OpLsh64x8(v *Value) bool {
 18954  	v_1 := v.Args[1]
 18955  	v_0 := v.Args[0]
 18956  	b := v.Block
 18957  	typ := &b.Func.Config.Types
 18958  	// match: (Lsh64x8 <t> x y)
 18959  	// cond: shiftIsBounded(v)
 18960  	// result: (SLL <t> x y)
 18961  	for {
 18962  		t := v.Type
 18963  		x := v_0
 18964  		y := v_1
 18965  		if !(shiftIsBounded(v)) {
 18966  			break
 18967  		}
 18968  		v.reset(OpARM64SLL)
 18969  		v.Type = t
 18970  		v.AddArg2(x, y)
 18971  		return true
 18972  	}
 18973  	// match: (Lsh64x8 <t> x y)
 18974  	// cond: !shiftIsBounded(v)
 18975  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 18976  	for {
 18977  		t := v.Type
 18978  		x := v_0
 18979  		y := v_1
 18980  		if !(!shiftIsBounded(v)) {
 18981  			break
 18982  		}
 18983  		v.reset(OpARM64CSEL)
 18984  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18985  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18986  		v0.AddArg2(x, y)
 18987  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18988  		v1.AuxInt = int64ToAuxInt(0)
 18989  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18990  		v2.AuxInt = int64ToAuxInt(64)
 18991  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 18992  		v3.AddArg(y)
 18993  		v2.AddArg(v3)
 18994  		v.AddArg3(v0, v1, v2)
 18995  		return true
 18996  	}
 18997  	return false
 18998  }
 18999  func rewriteValueARM64_OpLsh8x16(v *Value) bool {
 19000  	v_1 := v.Args[1]
 19001  	v_0 := v.Args[0]
 19002  	b := v.Block
 19003  	typ := &b.Func.Config.Types
 19004  	// match: (Lsh8x16 <t> x y)
 19005  	// cond: shiftIsBounded(v)
 19006  	// result: (SLL <t> x y)
 19007  	for {
 19008  		t := v.Type
 19009  		x := v_0
 19010  		y := v_1
 19011  		if !(shiftIsBounded(v)) {
 19012  			break
 19013  		}
 19014  		v.reset(OpARM64SLL)
 19015  		v.Type = t
 19016  		v.AddArg2(x, y)
 19017  		return true
 19018  	}
 19019  	// match: (Lsh8x16 <t> x y)
 19020  	// cond: !shiftIsBounded(v)
 19021  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 19022  	for {
 19023  		t := v.Type
 19024  		x := v_0
 19025  		y := v_1
 19026  		if !(!shiftIsBounded(v)) {
 19027  			break
 19028  		}
 19029  		v.reset(OpARM64CSEL)
 19030  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 19031  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 19032  		v0.AddArg2(x, y)
 19033  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 19034  		v1.AuxInt = int64ToAuxInt(0)
 19035  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 19036  		v2.AuxInt = int64ToAuxInt(64)
 19037  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 19038  		v3.AddArg(y)
 19039  		v2.AddArg(v3)
 19040  		v.AddArg3(v0, v1, v2)
 19041  		return true
 19042  	}
 19043  	return false
 19044  }
 19045  func rewriteValueARM64_OpLsh8x32(v *Value) bool {
 19046  	v_1 := v.Args[1]
 19047  	v_0 := v.Args[0]
 19048  	b := v.Block
 19049  	typ := &b.Func.Config.Types
 19050  	// match: (Lsh8x32 <t> x y)
 19051  	// cond: shiftIsBounded(v)
 19052  	// result: (SLL <t> x y)
 19053  	for {
 19054  		t := v.Type
 19055  		x := v_0
 19056  		y := v_1
 19057  		if !(shiftIsBounded(v)) {
 19058  			break
 19059  		}
 19060  		v.reset(OpARM64SLL)
 19061  		v.Type = t
 19062  		v.AddArg2(x, y)
 19063  		return true
 19064  	}
 19065  	// match: (Lsh8x32 <t> x y)
 19066  	// cond: !shiftIsBounded(v)
 19067  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 19068  	for {
 19069  		t := v.Type
 19070  		x := v_0
 19071  		y := v_1
 19072  		if !(!shiftIsBounded(v)) {
 19073  			break
 19074  		}
 19075  		v.reset(OpARM64CSEL)
 19076  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 19077  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 19078  		v0.AddArg2(x, y)
 19079  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 19080  		v1.AuxInt = int64ToAuxInt(0)
 19081  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 19082  		v2.AuxInt = int64ToAuxInt(64)
 19083  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 19084  		v3.AddArg(y)
 19085  		v2.AddArg(v3)
 19086  		v.AddArg3(v0, v1, v2)
 19087  		return true
 19088  	}
 19089  	return false
 19090  }
 19091  func rewriteValueARM64_OpLsh8x64(v *Value) bool {
 19092  	v_1 := v.Args[1]
 19093  	v_0 := v.Args[0]
 19094  	b := v.Block
 19095  	// match: (Lsh8x64 <t> x y)
 19096  	// cond: shiftIsBounded(v)
 19097  	// result: (SLL <t> x y)
 19098  	for {
 19099  		t := v.Type
 19100  		x := v_0
 19101  		y := v_1
 19102  		if !(shiftIsBounded(v)) {
 19103  			break
 19104  		}
 19105  		v.reset(OpARM64SLL)
 19106  		v.Type = t
 19107  		v.AddArg2(x, y)
 19108  		return true
 19109  	}
 19110  	// match: (Lsh8x64 <t> x y)
 19111  	// cond: !shiftIsBounded(v)
 19112  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] y))
 19113  	for {
 19114  		t := v.Type
 19115  		x := v_0
 19116  		y := v_1
 19117  		if !(!shiftIsBounded(v)) {
 19118  			break
 19119  		}
 19120  		v.reset(OpARM64CSEL)
 19121  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 19122  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 19123  		v0.AddArg2(x, y)
 19124  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 19125  		v1.AuxInt = int64ToAuxInt(0)
 19126  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 19127  		v2.AuxInt = int64ToAuxInt(64)
 19128  		v2.AddArg(y)
 19129  		v.AddArg3(v0, v1, v2)
 19130  		return true
 19131  	}
 19132  	return false
 19133  }
 19134  func rewriteValueARM64_OpLsh8x8(v *Value) bool {
 19135  	v_1 := v.Args[1]
 19136  	v_0 := v.Args[0]
 19137  	b := v.Block
 19138  	typ := &b.Func.Config.Types
 19139  	// match: (Lsh8x8 <t> x y)
 19140  	// cond: shiftIsBounded(v)
 19141  	// result: (SLL <t> x y)
 19142  	for {
 19143  		t := v.Type
 19144  		x := v_0
 19145  		y := v_1
 19146  		if !(shiftIsBounded(v)) {
 19147  			break
 19148  		}
 19149  		v.reset(OpARM64SLL)
 19150  		v.Type = t
 19151  		v.AddArg2(x, y)
 19152  		return true
 19153  	}
 19154  	// match: (Lsh8x8 <t> x y)
 19155  	// cond: !shiftIsBounded(v)
 19156  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 19157  	for {
 19158  		t := v.Type
 19159  		x := v_0
 19160  		y := v_1
 19161  		if !(!shiftIsBounded(v)) {
 19162  			break
 19163  		}
 19164  		v.reset(OpARM64CSEL)
 19165  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 19166  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 19167  		v0.AddArg2(x, y)
 19168  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 19169  		v1.AuxInt = int64ToAuxInt(0)
 19170  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 19171  		v2.AuxInt = int64ToAuxInt(64)
 19172  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 19173  		v3.AddArg(y)
 19174  		v2.AddArg(v3)
 19175  		v.AddArg3(v0, v1, v2)
 19176  		return true
 19177  	}
 19178  	return false
 19179  }
 19180  func rewriteValueARM64_OpMod16(v *Value) bool {
 19181  	v_1 := v.Args[1]
 19182  	v_0 := v.Args[0]
 19183  	b := v.Block
 19184  	typ := &b.Func.Config.Types
 19185  	// match: (Mod16 x y)
 19186  	// result: (MODW (SignExt16to32 x) (SignExt16to32 y))
 19187  	for {
 19188  		x := v_0
 19189  		y := v_1
 19190  		v.reset(OpARM64MODW)
 19191  		v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 19192  		v0.AddArg(x)
 19193  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 19194  		v1.AddArg(y)
 19195  		v.AddArg2(v0, v1)
 19196  		return true
 19197  	}
 19198  }
 19199  func rewriteValueARM64_OpMod16u(v *Value) bool {
 19200  	v_1 := v.Args[1]
 19201  	v_0 := v.Args[0]
 19202  	b := v.Block
 19203  	typ := &b.Func.Config.Types
 19204  	// match: (Mod16u x y)
 19205  	// result: (UMODW (ZeroExt16to32 x) (ZeroExt16to32 y))
 19206  	for {
 19207  		x := v_0
 19208  		y := v_1
 19209  		v.reset(OpARM64UMODW)
 19210  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 19211  		v0.AddArg(x)
 19212  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 19213  		v1.AddArg(y)
 19214  		v.AddArg2(v0, v1)
 19215  		return true
 19216  	}
 19217  }
 19218  func rewriteValueARM64_OpMod32(v *Value) bool {
 19219  	v_1 := v.Args[1]
 19220  	v_0 := v.Args[0]
 19221  	// match: (Mod32 x y)
 19222  	// result: (MODW x y)
 19223  	for {
 19224  		x := v_0
 19225  		y := v_1
 19226  		v.reset(OpARM64MODW)
 19227  		v.AddArg2(x, y)
 19228  		return true
 19229  	}
 19230  }
 19231  func rewriteValueARM64_OpMod64(v *Value) bool {
 19232  	v_1 := v.Args[1]
 19233  	v_0 := v.Args[0]
 19234  	// match: (Mod64 x y)
 19235  	// result: (MOD x y)
 19236  	for {
 19237  		x := v_0
 19238  		y := v_1
 19239  		v.reset(OpARM64MOD)
 19240  		v.AddArg2(x, y)
 19241  		return true
 19242  	}
 19243  }
 19244  func rewriteValueARM64_OpMod8(v *Value) bool {
 19245  	v_1 := v.Args[1]
 19246  	v_0 := v.Args[0]
 19247  	b := v.Block
 19248  	typ := &b.Func.Config.Types
 19249  	// match: (Mod8 x y)
 19250  	// result: (MODW (SignExt8to32 x) (SignExt8to32 y))
 19251  	for {
 19252  		x := v_0
 19253  		y := v_1
 19254  		v.reset(OpARM64MODW)
 19255  		v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 19256  		v0.AddArg(x)
 19257  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 19258  		v1.AddArg(y)
 19259  		v.AddArg2(v0, v1)
 19260  		return true
 19261  	}
 19262  }
 19263  func rewriteValueARM64_OpMod8u(v *Value) bool {
 19264  	v_1 := v.Args[1]
 19265  	v_0 := v.Args[0]
 19266  	b := v.Block
 19267  	typ := &b.Func.Config.Types
 19268  	// match: (Mod8u x y)
 19269  	// result: (UMODW (ZeroExt8to32 x) (ZeroExt8to32 y))
 19270  	for {
 19271  		x := v_0
 19272  		y := v_1
 19273  		v.reset(OpARM64UMODW)
 19274  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 19275  		v0.AddArg(x)
 19276  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 19277  		v1.AddArg(y)
 19278  		v.AddArg2(v0, v1)
 19279  		return true
 19280  	}
 19281  }
 19282  func rewriteValueARM64_OpMove(v *Value) bool {
 19283  	v_2 := v.Args[2]
 19284  	v_1 := v.Args[1]
 19285  	v_0 := v.Args[0]
 19286  	b := v.Block
 19287  	typ := &b.Func.Config.Types
 19288  	// match: (Move [0] _ _ mem)
 19289  	// result: mem
 19290  	for {
 19291  		if auxIntToInt64(v.AuxInt) != 0 {
 19292  			break
 19293  		}
 19294  		mem := v_2
 19295  		v.copyOf(mem)
 19296  		return true
 19297  	}
 19298  	// match: (Move [1] dst src mem)
 19299  	// result: (MOVBstore dst (MOVBUload src mem) mem)
 19300  	for {
 19301  		if auxIntToInt64(v.AuxInt) != 1 {
 19302  			break
 19303  		}
 19304  		dst := v_0
 19305  		src := v_1
 19306  		mem := v_2
 19307  		v.reset(OpARM64MOVBstore)
 19308  		v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
 19309  		v0.AddArg2(src, mem)
 19310  		v.AddArg3(dst, v0, mem)
 19311  		return true
 19312  	}
 19313  	// match: (Move [2] dst src mem)
 19314  	// result: (MOVHstore dst (MOVHUload src mem) mem)
 19315  	for {
 19316  		if auxIntToInt64(v.AuxInt) != 2 {
 19317  			break
 19318  		}
 19319  		dst := v_0
 19320  		src := v_1
 19321  		mem := v_2
 19322  		v.reset(OpARM64MOVHstore)
 19323  		v0 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
 19324  		v0.AddArg2(src, mem)
 19325  		v.AddArg3(dst, v0, mem)
 19326  		return true
 19327  	}
 19328  	// match: (Move [3] dst src mem)
 19329  	// result: (MOVBstore [2] dst (MOVBUload [2] src mem) (MOVHstore dst (MOVHUload src mem) mem))
 19330  	for {
 19331  		if auxIntToInt64(v.AuxInt) != 3 {
 19332  			break
 19333  		}
 19334  		dst := v_0
 19335  		src := v_1
 19336  		mem := v_2
 19337  		v.reset(OpARM64MOVBstore)
 19338  		v.AuxInt = int32ToAuxInt(2)
 19339  		v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
 19340  		v0.AuxInt = int32ToAuxInt(2)
 19341  		v0.AddArg2(src, mem)
 19342  		v1 := b.NewValue0(v.Pos, OpARM64MOVHstore, types.TypeMem)
 19343  		v2 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
 19344  		v2.AddArg2(src, mem)
 19345  		v1.AddArg3(dst, v2, mem)
 19346  		v.AddArg3(dst, v0, v1)
 19347  		return true
 19348  	}
 19349  	// match: (Move [4] dst src mem)
 19350  	// result: (MOVWstore dst (MOVWUload src mem) mem)
 19351  	for {
 19352  		if auxIntToInt64(v.AuxInt) != 4 {
 19353  			break
 19354  		}
 19355  		dst := v_0
 19356  		src := v_1
 19357  		mem := v_2
 19358  		v.reset(OpARM64MOVWstore)
 19359  		v0 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 19360  		v0.AddArg2(src, mem)
 19361  		v.AddArg3(dst, v0, mem)
 19362  		return true
 19363  	}
 19364  	// match: (Move [5] dst src mem)
 19365  	// result: (MOVBstore [4] dst (MOVBUload [4] src mem) (MOVWstore dst (MOVWUload src mem) mem))
 19366  	for {
 19367  		if auxIntToInt64(v.AuxInt) != 5 {
 19368  			break
 19369  		}
 19370  		dst := v_0
 19371  		src := v_1
 19372  		mem := v_2
 19373  		v.reset(OpARM64MOVBstore)
 19374  		v.AuxInt = int32ToAuxInt(4)
 19375  		v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
 19376  		v0.AuxInt = int32ToAuxInt(4)
 19377  		v0.AddArg2(src, mem)
 19378  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 19379  		v2 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 19380  		v2.AddArg2(src, mem)
 19381  		v1.AddArg3(dst, v2, mem)
 19382  		v.AddArg3(dst, v0, v1)
 19383  		return true
 19384  	}
 19385  	// match: (Move [6] dst src mem)
 19386  	// result: (MOVHstore [4] dst (MOVHUload [4] src mem) (MOVWstore dst (MOVWUload src mem) mem))
 19387  	for {
 19388  		if auxIntToInt64(v.AuxInt) != 6 {
 19389  			break
 19390  		}
 19391  		dst := v_0
 19392  		src := v_1
 19393  		mem := v_2
 19394  		v.reset(OpARM64MOVHstore)
 19395  		v.AuxInt = int32ToAuxInt(4)
 19396  		v0 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
 19397  		v0.AuxInt = int32ToAuxInt(4)
 19398  		v0.AddArg2(src, mem)
 19399  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 19400  		v2 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 19401  		v2.AddArg2(src, mem)
 19402  		v1.AddArg3(dst, v2, mem)
 19403  		v.AddArg3(dst, v0, v1)
 19404  		return true
 19405  	}
 19406  	// match: (Move [7] dst src mem)
 19407  	// result: (MOVWstore [3] dst (MOVWUload [3] src mem) (MOVWstore dst (MOVWUload src mem) mem))
 19408  	for {
 19409  		if auxIntToInt64(v.AuxInt) != 7 {
 19410  			break
 19411  		}
 19412  		dst := v_0
 19413  		src := v_1
 19414  		mem := v_2
 19415  		v.reset(OpARM64MOVWstore)
 19416  		v.AuxInt = int32ToAuxInt(3)
 19417  		v0 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 19418  		v0.AuxInt = int32ToAuxInt(3)
 19419  		v0.AddArg2(src, mem)
 19420  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 19421  		v2 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 19422  		v2.AddArg2(src, mem)
 19423  		v1.AddArg3(dst, v2, mem)
 19424  		v.AddArg3(dst, v0, v1)
 19425  		return true
 19426  	}
 19427  	// match: (Move [8] dst src mem)
 19428  	// result: (MOVDstore dst (MOVDload src mem) mem)
 19429  	for {
 19430  		if auxIntToInt64(v.AuxInt) != 8 {
 19431  			break
 19432  		}
 19433  		dst := v_0
 19434  		src := v_1
 19435  		mem := v_2
 19436  		v.reset(OpARM64MOVDstore)
 19437  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19438  		v0.AddArg2(src, mem)
 19439  		v.AddArg3(dst, v0, mem)
 19440  		return true
 19441  	}
 19442  	// match: (Move [9] dst src mem)
 19443  	// result: (MOVBstore [8] dst (MOVBUload [8] src mem) (MOVDstore dst (MOVDload src mem) mem))
 19444  	for {
 19445  		if auxIntToInt64(v.AuxInt) != 9 {
 19446  			break
 19447  		}
 19448  		dst := v_0
 19449  		src := v_1
 19450  		mem := v_2
 19451  		v.reset(OpARM64MOVBstore)
 19452  		v.AuxInt = int32ToAuxInt(8)
 19453  		v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
 19454  		v0.AuxInt = int32ToAuxInt(8)
 19455  		v0.AddArg2(src, mem)
 19456  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 19457  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19458  		v2.AddArg2(src, mem)
 19459  		v1.AddArg3(dst, v2, mem)
 19460  		v.AddArg3(dst, v0, v1)
 19461  		return true
 19462  	}
 19463  	// match: (Move [10] dst src mem)
 19464  	// result: (MOVHstore [8] dst (MOVHUload [8] src mem) (MOVDstore dst (MOVDload src mem) mem))
 19465  	for {
 19466  		if auxIntToInt64(v.AuxInt) != 10 {
 19467  			break
 19468  		}
 19469  		dst := v_0
 19470  		src := v_1
 19471  		mem := v_2
 19472  		v.reset(OpARM64MOVHstore)
 19473  		v.AuxInt = int32ToAuxInt(8)
 19474  		v0 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
 19475  		v0.AuxInt = int32ToAuxInt(8)
 19476  		v0.AddArg2(src, mem)
 19477  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 19478  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19479  		v2.AddArg2(src, mem)
 19480  		v1.AddArg3(dst, v2, mem)
 19481  		v.AddArg3(dst, v0, v1)
 19482  		return true
 19483  	}
 19484  	// match: (Move [11] dst src mem)
 19485  	// result: (MOVDstore [3] dst (MOVDload [3] src mem) (MOVDstore dst (MOVDload src mem) mem))
 19486  	for {
 19487  		if auxIntToInt64(v.AuxInt) != 11 {
 19488  			break
 19489  		}
 19490  		dst := v_0
 19491  		src := v_1
 19492  		mem := v_2
 19493  		v.reset(OpARM64MOVDstore)
 19494  		v.AuxInt = int32ToAuxInt(3)
 19495  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19496  		v0.AuxInt = int32ToAuxInt(3)
 19497  		v0.AddArg2(src, mem)
 19498  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 19499  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19500  		v2.AddArg2(src, mem)
 19501  		v1.AddArg3(dst, v2, mem)
 19502  		v.AddArg3(dst, v0, v1)
 19503  		return true
 19504  	}
 19505  	// match: (Move [12] dst src mem)
 19506  	// result: (MOVWstore [8] dst (MOVWUload [8] src mem) (MOVDstore dst (MOVDload src mem) mem))
 19507  	for {
 19508  		if auxIntToInt64(v.AuxInt) != 12 {
 19509  			break
 19510  		}
 19511  		dst := v_0
 19512  		src := v_1
 19513  		mem := v_2
 19514  		v.reset(OpARM64MOVWstore)
 19515  		v.AuxInt = int32ToAuxInt(8)
 19516  		v0 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 19517  		v0.AuxInt = int32ToAuxInt(8)
 19518  		v0.AddArg2(src, mem)
 19519  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 19520  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19521  		v2.AddArg2(src, mem)
 19522  		v1.AddArg3(dst, v2, mem)
 19523  		v.AddArg3(dst, v0, v1)
 19524  		return true
 19525  	}
 19526  	// match: (Move [13] dst src mem)
 19527  	// result: (MOVDstore [5] dst (MOVDload [5] src mem) (MOVDstore dst (MOVDload src mem) mem))
 19528  	for {
 19529  		if auxIntToInt64(v.AuxInt) != 13 {
 19530  			break
 19531  		}
 19532  		dst := v_0
 19533  		src := v_1
 19534  		mem := v_2
 19535  		v.reset(OpARM64MOVDstore)
 19536  		v.AuxInt = int32ToAuxInt(5)
 19537  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19538  		v0.AuxInt = int32ToAuxInt(5)
 19539  		v0.AddArg2(src, mem)
 19540  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 19541  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19542  		v2.AddArg2(src, mem)
 19543  		v1.AddArg3(dst, v2, mem)
 19544  		v.AddArg3(dst, v0, v1)
 19545  		return true
 19546  	}
 19547  	// match: (Move [14] dst src mem)
 19548  	// result: (MOVDstore [6] dst (MOVDload [6] src mem) (MOVDstore dst (MOVDload src mem) mem))
 19549  	for {
 19550  		if auxIntToInt64(v.AuxInt) != 14 {
 19551  			break
 19552  		}
 19553  		dst := v_0
 19554  		src := v_1
 19555  		mem := v_2
 19556  		v.reset(OpARM64MOVDstore)
 19557  		v.AuxInt = int32ToAuxInt(6)
 19558  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19559  		v0.AuxInt = int32ToAuxInt(6)
 19560  		v0.AddArg2(src, mem)
 19561  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 19562  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19563  		v2.AddArg2(src, mem)
 19564  		v1.AddArg3(dst, v2, mem)
 19565  		v.AddArg3(dst, v0, v1)
 19566  		return true
 19567  	}
 19568  	// match: (Move [15] dst src mem)
 19569  	// result: (MOVDstore [7] dst (MOVDload [7] src mem) (MOVDstore dst (MOVDload src mem) mem))
 19570  	for {
 19571  		if auxIntToInt64(v.AuxInt) != 15 {
 19572  			break
 19573  		}
 19574  		dst := v_0
 19575  		src := v_1
 19576  		mem := v_2
 19577  		v.reset(OpARM64MOVDstore)
 19578  		v.AuxInt = int32ToAuxInt(7)
 19579  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19580  		v0.AuxInt = int32ToAuxInt(7)
 19581  		v0.AddArg2(src, mem)
 19582  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 19583  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19584  		v2.AddArg2(src, mem)
 19585  		v1.AddArg3(dst, v2, mem)
 19586  		v.AddArg3(dst, v0, v1)
 19587  		return true
 19588  	}
 19589  	// match: (Move [16] dst src mem)
 19590  	// result: (STP dst (Select0 <typ.UInt64> (LDP src mem)) (Select1 <typ.UInt64> (LDP src mem)) mem)
 19591  	for {
 19592  		if auxIntToInt64(v.AuxInt) != 16 {
 19593  			break
 19594  		}
 19595  		dst := v_0
 19596  		src := v_1
 19597  		mem := v_2
 19598  		v.reset(OpARM64STP)
 19599  		v0 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19600  		v1 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19601  		v1.AddArg2(src, mem)
 19602  		v0.AddArg(v1)
 19603  		v2 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19604  		v2.AddArg(v1)
 19605  		v.AddArg4(dst, v0, v2, mem)
 19606  		return true
 19607  	}
 19608  	// match: (Move [32] dst src mem)
 19609  	// result: (STP [16] dst (Select0 <typ.UInt64> (LDP [16] src mem)) (Select1 <typ.UInt64> (LDP [16] src mem)) (STP dst (Select0 <typ.UInt64> (LDP src mem)) (Select1 <typ.UInt64> (LDP src mem)) mem))
 19610  	for {
 19611  		if auxIntToInt64(v.AuxInt) != 32 {
 19612  			break
 19613  		}
 19614  		dst := v_0
 19615  		src := v_1
 19616  		mem := v_2
 19617  		v.reset(OpARM64STP)
 19618  		v.AuxInt = int32ToAuxInt(16)
 19619  		v0 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19620  		v1 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19621  		v1.AuxInt = int32ToAuxInt(16)
 19622  		v1.AddArg2(src, mem)
 19623  		v0.AddArg(v1)
 19624  		v2 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19625  		v2.AddArg(v1)
 19626  		v3 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 19627  		v4 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19628  		v5 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19629  		v5.AddArg2(src, mem)
 19630  		v4.AddArg(v5)
 19631  		v6 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19632  		v6.AddArg(v5)
 19633  		v3.AddArg4(dst, v4, v6, mem)
 19634  		v.AddArg4(dst, v0, v2, v3)
 19635  		return true
 19636  	}
 19637  	// match: (Move [48] dst src mem)
 19638  	// result: (STP [32] dst (Select0 <typ.UInt64> (LDP [32] src mem)) (Select1 <typ.UInt64> (LDP [32] src mem)) (STP [16] dst (Select0 <typ.UInt64> (LDP [16] src mem)) (Select1 <typ.UInt64> (LDP [16] src mem)) (STP dst (Select0 <typ.UInt64> (LDP src mem)) (Select1 <typ.UInt64> (LDP src mem)) mem)))
 19639  	for {
 19640  		if auxIntToInt64(v.AuxInt) != 48 {
 19641  			break
 19642  		}
 19643  		dst := v_0
 19644  		src := v_1
 19645  		mem := v_2
 19646  		v.reset(OpARM64STP)
 19647  		v.AuxInt = int32ToAuxInt(32)
 19648  		v0 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19649  		v1 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19650  		v1.AuxInt = int32ToAuxInt(32)
 19651  		v1.AddArg2(src, mem)
 19652  		v0.AddArg(v1)
 19653  		v2 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19654  		v2.AddArg(v1)
 19655  		v3 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 19656  		v3.AuxInt = int32ToAuxInt(16)
 19657  		v4 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19658  		v5 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19659  		v5.AuxInt = int32ToAuxInt(16)
 19660  		v5.AddArg2(src, mem)
 19661  		v4.AddArg(v5)
 19662  		v6 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19663  		v6.AddArg(v5)
 19664  		v7 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 19665  		v8 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19666  		v9 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19667  		v9.AddArg2(src, mem)
 19668  		v8.AddArg(v9)
 19669  		v10 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19670  		v10.AddArg(v9)
 19671  		v7.AddArg4(dst, v8, v10, mem)
 19672  		v3.AddArg4(dst, v4, v6, v7)
 19673  		v.AddArg4(dst, v0, v2, v3)
 19674  		return true
 19675  	}
 19676  	// match: (Move [64] dst src mem)
 19677  	// result: (STP [48] dst (Select0 <typ.UInt64> (LDP [48] src mem)) (Select1 <typ.UInt64> (LDP [48] src mem)) (STP [32] dst (Select0 <typ.UInt64> (LDP [32] src mem)) (Select1 <typ.UInt64> (LDP [32] src mem)) (STP [16] dst (Select0 <typ.UInt64> (LDP [16] src mem)) (Select1 <typ.UInt64> (LDP [16] src mem)) (STP dst (Select0 <typ.UInt64> (LDP src mem)) (Select1 <typ.UInt64> (LDP src mem)) mem))))
 19678  	for {
 19679  		if auxIntToInt64(v.AuxInt) != 64 {
 19680  			break
 19681  		}
 19682  		dst := v_0
 19683  		src := v_1
 19684  		mem := v_2
 19685  		v.reset(OpARM64STP)
 19686  		v.AuxInt = int32ToAuxInt(48)
 19687  		v0 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19688  		v1 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19689  		v1.AuxInt = int32ToAuxInt(48)
 19690  		v1.AddArg2(src, mem)
 19691  		v0.AddArg(v1)
 19692  		v2 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19693  		v2.AddArg(v1)
 19694  		v3 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 19695  		v3.AuxInt = int32ToAuxInt(32)
 19696  		v4 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19697  		v5 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19698  		v5.AuxInt = int32ToAuxInt(32)
 19699  		v5.AddArg2(src, mem)
 19700  		v4.AddArg(v5)
 19701  		v6 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19702  		v6.AddArg(v5)
 19703  		v7 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 19704  		v7.AuxInt = int32ToAuxInt(16)
 19705  		v8 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19706  		v9 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19707  		v9.AuxInt = int32ToAuxInt(16)
 19708  		v9.AddArg2(src, mem)
 19709  		v8.AddArg(v9)
 19710  		v10 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19711  		v10.AddArg(v9)
 19712  		v11 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 19713  		v12 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19714  		v13 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19715  		v13.AddArg2(src, mem)
 19716  		v12.AddArg(v13)
 19717  		v14 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19718  		v14.AddArg(v13)
 19719  		v11.AddArg4(dst, v12, v14, mem)
 19720  		v7.AddArg4(dst, v8, v10, v11)
 19721  		v3.AddArg4(dst, v4, v6, v7)
 19722  		v.AddArg4(dst, v0, v2, v3)
 19723  		return true
 19724  	}
 19725  	// match: (Move [s] dst src mem)
 19726  	// cond: s%16 != 0 && s%16 <= 8 && s > 16
 19727  	// result: (Move [8] (OffPtr <dst.Type> dst [s-8]) (OffPtr <src.Type> src [s-8]) (Move [s-s%16] dst src mem))
 19728  	for {
 19729  		s := auxIntToInt64(v.AuxInt)
 19730  		dst := v_0
 19731  		src := v_1
 19732  		mem := v_2
 19733  		if !(s%16 != 0 && s%16 <= 8 && s > 16) {
 19734  			break
 19735  		}
 19736  		v.reset(OpMove)
 19737  		v.AuxInt = int64ToAuxInt(8)
 19738  		v0 := b.NewValue0(v.Pos, OpOffPtr, dst.Type)
 19739  		v0.AuxInt = int64ToAuxInt(s - 8)
 19740  		v0.AddArg(dst)
 19741  		v1 := b.NewValue0(v.Pos, OpOffPtr, src.Type)
 19742  		v1.AuxInt = int64ToAuxInt(s - 8)
 19743  		v1.AddArg(src)
 19744  		v2 := b.NewValue0(v.Pos, OpMove, types.TypeMem)
 19745  		v2.AuxInt = int64ToAuxInt(s - s%16)
 19746  		v2.AddArg3(dst, src, mem)
 19747  		v.AddArg3(v0, v1, v2)
 19748  		return true
 19749  	}
 19750  	// match: (Move [s] dst src mem)
 19751  	// cond: s%16 != 0 && s%16 > 8 && s > 16
 19752  	// result: (Move [16] (OffPtr <dst.Type> dst [s-16]) (OffPtr <src.Type> src [s-16]) (Move [s-s%16] dst src mem))
 19753  	for {
 19754  		s := auxIntToInt64(v.AuxInt)
 19755  		dst := v_0
 19756  		src := v_1
 19757  		mem := v_2
 19758  		if !(s%16 != 0 && s%16 > 8 && s > 16) {
 19759  			break
 19760  		}
 19761  		v.reset(OpMove)
 19762  		v.AuxInt = int64ToAuxInt(16)
 19763  		v0 := b.NewValue0(v.Pos, OpOffPtr, dst.Type)
 19764  		v0.AuxInt = int64ToAuxInt(s - 16)
 19765  		v0.AddArg(dst)
 19766  		v1 := b.NewValue0(v.Pos, OpOffPtr, src.Type)
 19767  		v1.AuxInt = int64ToAuxInt(s - 16)
 19768  		v1.AddArg(src)
 19769  		v2 := b.NewValue0(v.Pos, OpMove, types.TypeMem)
 19770  		v2.AuxInt = int64ToAuxInt(s - s%16)
 19771  		v2.AddArg3(dst, src, mem)
 19772  		v.AddArg3(v0, v1, v2)
 19773  		return true
 19774  	}
 19775  	// match: (Move [s] dst src mem)
 19776  	// cond: s > 64 && s <= 16*64 && s%16 == 0 && logLargeCopy(v, s)
 19777  	// result: (DUFFCOPY [8 * (64 - s/16)] dst src mem)
 19778  	for {
 19779  		s := auxIntToInt64(v.AuxInt)
 19780  		dst := v_0
 19781  		src := v_1
 19782  		mem := v_2
 19783  		if !(s > 64 && s <= 16*64 && s%16 == 0 && logLargeCopy(v, s)) {
 19784  			break
 19785  		}
 19786  		v.reset(OpARM64DUFFCOPY)
 19787  		v.AuxInt = int64ToAuxInt(8 * (64 - s/16))
 19788  		v.AddArg3(dst, src, mem)
 19789  		return true
 19790  	}
 19791  	// match: (Move [s] dst src mem)
 19792  	// cond: s%16 == 0 && s > 16*64 && logLargeCopy(v, s)
 19793  	// result: (LoweredMove dst src (ADDconst <src.Type> src [s-16]) mem)
 19794  	for {
 19795  		s := auxIntToInt64(v.AuxInt)
 19796  		dst := v_0
 19797  		src := v_1
 19798  		mem := v_2
 19799  		if !(s%16 == 0 && s > 16*64 && logLargeCopy(v, s)) {
 19800  			break
 19801  		}
 19802  		v.reset(OpARM64LoweredMove)
 19803  		v0 := b.NewValue0(v.Pos, OpARM64ADDconst, src.Type)
 19804  		v0.AuxInt = int64ToAuxInt(s - 16)
 19805  		v0.AddArg(src)
 19806  		v.AddArg4(dst, src, v0, mem)
 19807  		return true
 19808  	}
 19809  	return false
 19810  }
 19811  func rewriteValueARM64_OpNeq16(v *Value) bool {
 19812  	v_1 := v.Args[1]
 19813  	v_0 := v.Args[0]
 19814  	b := v.Block
 19815  	typ := &b.Func.Config.Types
 19816  	// match: (Neq16 x y)
 19817  	// result: (NotEqual (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
 19818  	for {
 19819  		x := v_0
 19820  		y := v_1
 19821  		v.reset(OpARM64NotEqual)
 19822  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 19823  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 19824  		v1.AddArg(x)
 19825  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 19826  		v2.AddArg(y)
 19827  		v0.AddArg2(v1, v2)
 19828  		v.AddArg(v0)
 19829  		return true
 19830  	}
 19831  }
 19832  func rewriteValueARM64_OpNeq32(v *Value) bool {
 19833  	v_1 := v.Args[1]
 19834  	v_0 := v.Args[0]
 19835  	b := v.Block
 19836  	// match: (Neq32 x y)
 19837  	// result: (NotEqual (CMPW x y))
 19838  	for {
 19839  		x := v_0
 19840  		y := v_1
 19841  		v.reset(OpARM64NotEqual)
 19842  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 19843  		v0.AddArg2(x, y)
 19844  		v.AddArg(v0)
 19845  		return true
 19846  	}
 19847  }
 19848  func rewriteValueARM64_OpNeq32F(v *Value) bool {
 19849  	v_1 := v.Args[1]
 19850  	v_0 := v.Args[0]
 19851  	b := v.Block
 19852  	// match: (Neq32F x y)
 19853  	// result: (NotEqual (FCMPS x y))
 19854  	for {
 19855  		x := v_0
 19856  		y := v_1
 19857  		v.reset(OpARM64NotEqual)
 19858  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
 19859  		v0.AddArg2(x, y)
 19860  		v.AddArg(v0)
 19861  		return true
 19862  	}
 19863  }
 19864  func rewriteValueARM64_OpNeq64(v *Value) bool {
 19865  	v_1 := v.Args[1]
 19866  	v_0 := v.Args[0]
 19867  	b := v.Block
 19868  	// match: (Neq64 x y)
 19869  	// result: (NotEqual (CMP x y))
 19870  	for {
 19871  		x := v_0
 19872  		y := v_1
 19873  		v.reset(OpARM64NotEqual)
 19874  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 19875  		v0.AddArg2(x, y)
 19876  		v.AddArg(v0)
 19877  		return true
 19878  	}
 19879  }
 19880  func rewriteValueARM64_OpNeq64F(v *Value) bool {
 19881  	v_1 := v.Args[1]
 19882  	v_0 := v.Args[0]
 19883  	b := v.Block
 19884  	// match: (Neq64F x y)
 19885  	// result: (NotEqual (FCMPD x y))
 19886  	for {
 19887  		x := v_0
 19888  		y := v_1
 19889  		v.reset(OpARM64NotEqual)
 19890  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
 19891  		v0.AddArg2(x, y)
 19892  		v.AddArg(v0)
 19893  		return true
 19894  	}
 19895  }
 19896  func rewriteValueARM64_OpNeq8(v *Value) bool {
 19897  	v_1 := v.Args[1]
 19898  	v_0 := v.Args[0]
 19899  	b := v.Block
 19900  	typ := &b.Func.Config.Types
 19901  	// match: (Neq8 x y)
 19902  	// result: (NotEqual (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
 19903  	for {
 19904  		x := v_0
 19905  		y := v_1
 19906  		v.reset(OpARM64NotEqual)
 19907  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 19908  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 19909  		v1.AddArg(x)
 19910  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 19911  		v2.AddArg(y)
 19912  		v0.AddArg2(v1, v2)
 19913  		v.AddArg(v0)
 19914  		return true
 19915  	}
 19916  }
 19917  func rewriteValueARM64_OpNeqPtr(v *Value) bool {
 19918  	v_1 := v.Args[1]
 19919  	v_0 := v.Args[0]
 19920  	b := v.Block
 19921  	// match: (NeqPtr x y)
 19922  	// result: (NotEqual (CMP x y))
 19923  	for {
 19924  		x := v_0
 19925  		y := v_1
 19926  		v.reset(OpARM64NotEqual)
 19927  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 19928  		v0.AddArg2(x, y)
 19929  		v.AddArg(v0)
 19930  		return true
 19931  	}
 19932  }
 19933  func rewriteValueARM64_OpNot(v *Value) bool {
 19934  	v_0 := v.Args[0]
 19935  	b := v.Block
 19936  	typ := &b.Func.Config.Types
 19937  	// match: (Not x)
 19938  	// result: (XOR (MOVDconst [1]) x)
 19939  	for {
 19940  		x := v_0
 19941  		v.reset(OpARM64XOR)
 19942  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 19943  		v0.AuxInt = int64ToAuxInt(1)
 19944  		v.AddArg2(v0, x)
 19945  		return true
 19946  	}
 19947  }
 19948  func rewriteValueARM64_OpOffPtr(v *Value) bool {
 19949  	v_0 := v.Args[0]
 19950  	// match: (OffPtr [off] ptr:(SP))
 19951  	// cond: is32Bit(off)
 19952  	// result: (MOVDaddr [int32(off)] ptr)
 19953  	for {
 19954  		off := auxIntToInt64(v.AuxInt)
 19955  		ptr := v_0
 19956  		if ptr.Op != OpSP || !(is32Bit(off)) {
 19957  			break
 19958  		}
 19959  		v.reset(OpARM64MOVDaddr)
 19960  		v.AuxInt = int32ToAuxInt(int32(off))
 19961  		v.AddArg(ptr)
 19962  		return true
 19963  	}
 19964  	// match: (OffPtr [off] ptr)
 19965  	// result: (ADDconst [off] ptr)
 19966  	for {
 19967  		off := auxIntToInt64(v.AuxInt)
 19968  		ptr := v_0
 19969  		v.reset(OpARM64ADDconst)
 19970  		v.AuxInt = int64ToAuxInt(off)
 19971  		v.AddArg(ptr)
 19972  		return true
 19973  	}
 19974  }
 19975  func rewriteValueARM64_OpPanicBounds(v *Value) bool {
 19976  	v_2 := v.Args[2]
 19977  	v_1 := v.Args[1]
 19978  	v_0 := v.Args[0]
 19979  	// match: (PanicBounds [kind] x y mem)
 19980  	// cond: boundsABI(kind) == 0
 19981  	// result: (LoweredPanicBoundsA [kind] x y mem)
 19982  	for {
 19983  		kind := auxIntToInt64(v.AuxInt)
 19984  		x := v_0
 19985  		y := v_1
 19986  		mem := v_2
 19987  		if !(boundsABI(kind) == 0) {
 19988  			break
 19989  		}
 19990  		v.reset(OpARM64LoweredPanicBoundsA)
 19991  		v.AuxInt = int64ToAuxInt(kind)
 19992  		v.AddArg3(x, y, mem)
 19993  		return true
 19994  	}
 19995  	// match: (PanicBounds [kind] x y mem)
 19996  	// cond: boundsABI(kind) == 1
 19997  	// result: (LoweredPanicBoundsB [kind] x y mem)
 19998  	for {
 19999  		kind := auxIntToInt64(v.AuxInt)
 20000  		x := v_0
 20001  		y := v_1
 20002  		mem := v_2
 20003  		if !(boundsABI(kind) == 1) {
 20004  			break
 20005  		}
 20006  		v.reset(OpARM64LoweredPanicBoundsB)
 20007  		v.AuxInt = int64ToAuxInt(kind)
 20008  		v.AddArg3(x, y, mem)
 20009  		return true
 20010  	}
 20011  	// match: (PanicBounds [kind] x y mem)
 20012  	// cond: boundsABI(kind) == 2
 20013  	// result: (LoweredPanicBoundsC [kind] x y mem)
 20014  	for {
 20015  		kind := auxIntToInt64(v.AuxInt)
 20016  		x := v_0
 20017  		y := v_1
 20018  		mem := v_2
 20019  		if !(boundsABI(kind) == 2) {
 20020  			break
 20021  		}
 20022  		v.reset(OpARM64LoweredPanicBoundsC)
 20023  		v.AuxInt = int64ToAuxInt(kind)
 20024  		v.AddArg3(x, y, mem)
 20025  		return true
 20026  	}
 20027  	return false
 20028  }
 20029  func rewriteValueARM64_OpPopCount16(v *Value) bool {
 20030  	v_0 := v.Args[0]
 20031  	b := v.Block
 20032  	typ := &b.Func.Config.Types
 20033  	// match: (PopCount16 <t> x)
 20034  	// result: (FMOVDfpgp <t> (VUADDLV <typ.Float64> (VCNT <typ.Float64> (FMOVDgpfp <typ.Float64> (ZeroExt16to64 x)))))
 20035  	for {
 20036  		t := v.Type
 20037  		x := v_0
 20038  		v.reset(OpARM64FMOVDfpgp)
 20039  		v.Type = t
 20040  		v0 := b.NewValue0(v.Pos, OpARM64VUADDLV, typ.Float64)
 20041  		v1 := b.NewValue0(v.Pos, OpARM64VCNT, typ.Float64)
 20042  		v2 := b.NewValue0(v.Pos, OpARM64FMOVDgpfp, typ.Float64)
 20043  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20044  		v3.AddArg(x)
 20045  		v2.AddArg(v3)
 20046  		v1.AddArg(v2)
 20047  		v0.AddArg(v1)
 20048  		v.AddArg(v0)
 20049  		return true
 20050  	}
 20051  }
 20052  func rewriteValueARM64_OpPopCount32(v *Value) bool {
 20053  	v_0 := v.Args[0]
 20054  	b := v.Block
 20055  	typ := &b.Func.Config.Types
 20056  	// match: (PopCount32 <t> x)
 20057  	// result: (FMOVDfpgp <t> (VUADDLV <typ.Float64> (VCNT <typ.Float64> (FMOVDgpfp <typ.Float64> (ZeroExt32to64 x)))))
 20058  	for {
 20059  		t := v.Type
 20060  		x := v_0
 20061  		v.reset(OpARM64FMOVDfpgp)
 20062  		v.Type = t
 20063  		v0 := b.NewValue0(v.Pos, OpARM64VUADDLV, typ.Float64)
 20064  		v1 := b.NewValue0(v.Pos, OpARM64VCNT, typ.Float64)
 20065  		v2 := b.NewValue0(v.Pos, OpARM64FMOVDgpfp, typ.Float64)
 20066  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20067  		v3.AddArg(x)
 20068  		v2.AddArg(v3)
 20069  		v1.AddArg(v2)
 20070  		v0.AddArg(v1)
 20071  		v.AddArg(v0)
 20072  		return true
 20073  	}
 20074  }
 20075  func rewriteValueARM64_OpPopCount64(v *Value) bool {
 20076  	v_0 := v.Args[0]
 20077  	b := v.Block
 20078  	typ := &b.Func.Config.Types
 20079  	// match: (PopCount64 <t> x)
 20080  	// result: (FMOVDfpgp <t> (VUADDLV <typ.Float64> (VCNT <typ.Float64> (FMOVDgpfp <typ.Float64> x))))
 20081  	for {
 20082  		t := v.Type
 20083  		x := v_0
 20084  		v.reset(OpARM64FMOVDfpgp)
 20085  		v.Type = t
 20086  		v0 := b.NewValue0(v.Pos, OpARM64VUADDLV, typ.Float64)
 20087  		v1 := b.NewValue0(v.Pos, OpARM64VCNT, typ.Float64)
 20088  		v2 := b.NewValue0(v.Pos, OpARM64FMOVDgpfp, typ.Float64)
 20089  		v2.AddArg(x)
 20090  		v1.AddArg(v2)
 20091  		v0.AddArg(v1)
 20092  		v.AddArg(v0)
 20093  		return true
 20094  	}
 20095  }
 20096  func rewriteValueARM64_OpPrefetchCache(v *Value) bool {
 20097  	v_1 := v.Args[1]
 20098  	v_0 := v.Args[0]
 20099  	// match: (PrefetchCache addr mem)
 20100  	// result: (PRFM [0] addr mem)
 20101  	for {
 20102  		addr := v_0
 20103  		mem := v_1
 20104  		v.reset(OpARM64PRFM)
 20105  		v.AuxInt = int64ToAuxInt(0)
 20106  		v.AddArg2(addr, mem)
 20107  		return true
 20108  	}
 20109  }
 20110  func rewriteValueARM64_OpPrefetchCacheStreamed(v *Value) bool {
 20111  	v_1 := v.Args[1]
 20112  	v_0 := v.Args[0]
 20113  	// match: (PrefetchCacheStreamed addr mem)
 20114  	// result: (PRFM [1] addr mem)
 20115  	for {
 20116  		addr := v_0
 20117  		mem := v_1
 20118  		v.reset(OpARM64PRFM)
 20119  		v.AuxInt = int64ToAuxInt(1)
 20120  		v.AddArg2(addr, mem)
 20121  		return true
 20122  	}
 20123  }
 20124  func rewriteValueARM64_OpPubBarrier(v *Value) bool {
 20125  	v_0 := v.Args[0]
 20126  	// match: (PubBarrier mem)
 20127  	// result: (DMB [0xe] mem)
 20128  	for {
 20129  		mem := v_0
 20130  		v.reset(OpARM64DMB)
 20131  		v.AuxInt = int64ToAuxInt(0xe)
 20132  		v.AddArg(mem)
 20133  		return true
 20134  	}
 20135  }
 20136  func rewriteValueARM64_OpRotateLeft16(v *Value) bool {
 20137  	v_1 := v.Args[1]
 20138  	v_0 := v.Args[0]
 20139  	b := v.Block
 20140  	typ := &b.Func.Config.Types
 20141  	// match: (RotateLeft16 <t> x (MOVDconst [c]))
 20142  	// result: (Or16 (Lsh16x64 <t> x (MOVDconst [c&15])) (Rsh16Ux64 <t> x (MOVDconst [-c&15])))
 20143  	for {
 20144  		t := v.Type
 20145  		x := v_0
 20146  		if v_1.Op != OpARM64MOVDconst {
 20147  			break
 20148  		}
 20149  		c := auxIntToInt64(v_1.AuxInt)
 20150  		v.reset(OpOr16)
 20151  		v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
 20152  		v1 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20153  		v1.AuxInt = int64ToAuxInt(c & 15)
 20154  		v0.AddArg2(x, v1)
 20155  		v2 := b.NewValue0(v.Pos, OpRsh16Ux64, t)
 20156  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20157  		v3.AuxInt = int64ToAuxInt(-c & 15)
 20158  		v2.AddArg2(x, v3)
 20159  		v.AddArg2(v0, v2)
 20160  		return true
 20161  	}
 20162  	// match: (RotateLeft16 <t> x y)
 20163  	// result: (RORW <t> (ORshiftLL <typ.UInt32> (ZeroExt16to32 x) (ZeroExt16to32 x) [16]) (NEG <typ.Int64> y))
 20164  	for {
 20165  		t := v.Type
 20166  		x := v_0
 20167  		y := v_1
 20168  		v.reset(OpARM64RORW)
 20169  		v.Type = t
 20170  		v0 := b.NewValue0(v.Pos, OpARM64ORshiftLL, typ.UInt32)
 20171  		v0.AuxInt = int64ToAuxInt(16)
 20172  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 20173  		v1.AddArg(x)
 20174  		v0.AddArg2(v1, v1)
 20175  		v2 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 20176  		v2.AddArg(y)
 20177  		v.AddArg2(v0, v2)
 20178  		return true
 20179  	}
 20180  }
 20181  func rewriteValueARM64_OpRotateLeft32(v *Value) bool {
 20182  	v_1 := v.Args[1]
 20183  	v_0 := v.Args[0]
 20184  	b := v.Block
 20185  	// match: (RotateLeft32 x y)
 20186  	// result: (RORW x (NEG <y.Type> y))
 20187  	for {
 20188  		x := v_0
 20189  		y := v_1
 20190  		v.reset(OpARM64RORW)
 20191  		v0 := b.NewValue0(v.Pos, OpARM64NEG, y.Type)
 20192  		v0.AddArg(y)
 20193  		v.AddArg2(x, v0)
 20194  		return true
 20195  	}
 20196  }
 20197  func rewriteValueARM64_OpRotateLeft64(v *Value) bool {
 20198  	v_1 := v.Args[1]
 20199  	v_0 := v.Args[0]
 20200  	b := v.Block
 20201  	// match: (RotateLeft64 x y)
 20202  	// result: (ROR x (NEG <y.Type> y))
 20203  	for {
 20204  		x := v_0
 20205  		y := v_1
 20206  		v.reset(OpARM64ROR)
 20207  		v0 := b.NewValue0(v.Pos, OpARM64NEG, y.Type)
 20208  		v0.AddArg(y)
 20209  		v.AddArg2(x, v0)
 20210  		return true
 20211  	}
 20212  }
 20213  func rewriteValueARM64_OpRotateLeft8(v *Value) bool {
 20214  	v_1 := v.Args[1]
 20215  	v_0 := v.Args[0]
 20216  	b := v.Block
 20217  	typ := &b.Func.Config.Types
 20218  	// match: (RotateLeft8 <t> x (MOVDconst [c]))
 20219  	// result: (Or8 (Lsh8x64 <t> x (MOVDconst [c&7])) (Rsh8Ux64 <t> x (MOVDconst [-c&7])))
 20220  	for {
 20221  		t := v.Type
 20222  		x := v_0
 20223  		if v_1.Op != OpARM64MOVDconst {
 20224  			break
 20225  		}
 20226  		c := auxIntToInt64(v_1.AuxInt)
 20227  		v.reset(OpOr8)
 20228  		v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
 20229  		v1 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20230  		v1.AuxInt = int64ToAuxInt(c & 7)
 20231  		v0.AddArg2(x, v1)
 20232  		v2 := b.NewValue0(v.Pos, OpRsh8Ux64, t)
 20233  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20234  		v3.AuxInt = int64ToAuxInt(-c & 7)
 20235  		v2.AddArg2(x, v3)
 20236  		v.AddArg2(v0, v2)
 20237  		return true
 20238  	}
 20239  	// match: (RotateLeft8 <t> x y)
 20240  	// result: (OR <t> (SLL <t> x (ANDconst <typ.Int64> [7] y)) (SRL <t> (ZeroExt8to64 x) (ANDconst <typ.Int64> [7] (NEG <typ.Int64> y))))
 20241  	for {
 20242  		t := v.Type
 20243  		x := v_0
 20244  		y := v_1
 20245  		v.reset(OpARM64OR)
 20246  		v.Type = t
 20247  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 20248  		v1 := b.NewValue0(v.Pos, OpARM64ANDconst, typ.Int64)
 20249  		v1.AuxInt = int64ToAuxInt(7)
 20250  		v1.AddArg(y)
 20251  		v0.AddArg2(x, v1)
 20252  		v2 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20253  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 20254  		v3.AddArg(x)
 20255  		v4 := b.NewValue0(v.Pos, OpARM64ANDconst, typ.Int64)
 20256  		v4.AuxInt = int64ToAuxInt(7)
 20257  		v5 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 20258  		v5.AddArg(y)
 20259  		v4.AddArg(v5)
 20260  		v2.AddArg2(v3, v4)
 20261  		v.AddArg2(v0, v2)
 20262  		return true
 20263  	}
 20264  }
 20265  func rewriteValueARM64_OpRsh16Ux16(v *Value) bool {
 20266  	v_1 := v.Args[1]
 20267  	v_0 := v.Args[0]
 20268  	b := v.Block
 20269  	typ := &b.Func.Config.Types
 20270  	// match: (Rsh16Ux16 <t> x y)
 20271  	// cond: shiftIsBounded(v)
 20272  	// result: (SRL <t> (ZeroExt16to64 x) y)
 20273  	for {
 20274  		t := v.Type
 20275  		x := v_0
 20276  		y := v_1
 20277  		if !(shiftIsBounded(v)) {
 20278  			break
 20279  		}
 20280  		v.reset(OpARM64SRL)
 20281  		v.Type = t
 20282  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20283  		v0.AddArg(x)
 20284  		v.AddArg2(v0, y)
 20285  		return true
 20286  	}
 20287  	// match: (Rsh16Ux16 <t> x y)
 20288  	// cond: !shiftIsBounded(v)
 20289  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt16to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 20290  	for {
 20291  		t := v.Type
 20292  		x := v_0
 20293  		y := v_1
 20294  		if !(!shiftIsBounded(v)) {
 20295  			break
 20296  		}
 20297  		v.reset(OpARM64CSEL)
 20298  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20299  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20300  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20301  		v1.AddArg(x)
 20302  		v0.AddArg2(v1, y)
 20303  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 20304  		v2.AuxInt = int64ToAuxInt(0)
 20305  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20306  		v3.AuxInt = int64ToAuxInt(64)
 20307  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20308  		v4.AddArg(y)
 20309  		v3.AddArg(v4)
 20310  		v.AddArg3(v0, v2, v3)
 20311  		return true
 20312  	}
 20313  	return false
 20314  }
 20315  func rewriteValueARM64_OpRsh16Ux32(v *Value) bool {
 20316  	v_1 := v.Args[1]
 20317  	v_0 := v.Args[0]
 20318  	b := v.Block
 20319  	typ := &b.Func.Config.Types
 20320  	// match: (Rsh16Ux32 <t> x y)
 20321  	// cond: shiftIsBounded(v)
 20322  	// result: (SRL <t> (ZeroExt16to64 x) y)
 20323  	for {
 20324  		t := v.Type
 20325  		x := v_0
 20326  		y := v_1
 20327  		if !(shiftIsBounded(v)) {
 20328  			break
 20329  		}
 20330  		v.reset(OpARM64SRL)
 20331  		v.Type = t
 20332  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20333  		v0.AddArg(x)
 20334  		v.AddArg2(v0, y)
 20335  		return true
 20336  	}
 20337  	// match: (Rsh16Ux32 <t> x y)
 20338  	// cond: !shiftIsBounded(v)
 20339  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt16to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 20340  	for {
 20341  		t := v.Type
 20342  		x := v_0
 20343  		y := v_1
 20344  		if !(!shiftIsBounded(v)) {
 20345  			break
 20346  		}
 20347  		v.reset(OpARM64CSEL)
 20348  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20349  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20350  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20351  		v1.AddArg(x)
 20352  		v0.AddArg2(v1, y)
 20353  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 20354  		v2.AuxInt = int64ToAuxInt(0)
 20355  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20356  		v3.AuxInt = int64ToAuxInt(64)
 20357  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20358  		v4.AddArg(y)
 20359  		v3.AddArg(v4)
 20360  		v.AddArg3(v0, v2, v3)
 20361  		return true
 20362  	}
 20363  	return false
 20364  }
 20365  func rewriteValueARM64_OpRsh16Ux64(v *Value) bool {
 20366  	v_1 := v.Args[1]
 20367  	v_0 := v.Args[0]
 20368  	b := v.Block
 20369  	typ := &b.Func.Config.Types
 20370  	// match: (Rsh16Ux64 <t> x y)
 20371  	// cond: shiftIsBounded(v)
 20372  	// result: (SRL <t> (ZeroExt16to64 x) y)
 20373  	for {
 20374  		t := v.Type
 20375  		x := v_0
 20376  		y := v_1
 20377  		if !(shiftIsBounded(v)) {
 20378  			break
 20379  		}
 20380  		v.reset(OpARM64SRL)
 20381  		v.Type = t
 20382  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20383  		v0.AddArg(x)
 20384  		v.AddArg2(v0, y)
 20385  		return true
 20386  	}
 20387  	// match: (Rsh16Ux64 <t> x y)
 20388  	// cond: !shiftIsBounded(v)
 20389  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt16to64 x) y) (Const64 <t> [0]) (CMPconst [64] y))
 20390  	for {
 20391  		t := v.Type
 20392  		x := v_0
 20393  		y := v_1
 20394  		if !(!shiftIsBounded(v)) {
 20395  			break
 20396  		}
 20397  		v.reset(OpARM64CSEL)
 20398  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20399  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20400  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20401  		v1.AddArg(x)
 20402  		v0.AddArg2(v1, y)
 20403  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 20404  		v2.AuxInt = int64ToAuxInt(0)
 20405  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20406  		v3.AuxInt = int64ToAuxInt(64)
 20407  		v3.AddArg(y)
 20408  		v.AddArg3(v0, v2, v3)
 20409  		return true
 20410  	}
 20411  	return false
 20412  }
 20413  func rewriteValueARM64_OpRsh16Ux8(v *Value) bool {
 20414  	v_1 := v.Args[1]
 20415  	v_0 := v.Args[0]
 20416  	b := v.Block
 20417  	typ := &b.Func.Config.Types
 20418  	// match: (Rsh16Ux8 <t> x y)
 20419  	// cond: shiftIsBounded(v)
 20420  	// result: (SRL <t> (ZeroExt16to64 x) y)
 20421  	for {
 20422  		t := v.Type
 20423  		x := v_0
 20424  		y := v_1
 20425  		if !(shiftIsBounded(v)) {
 20426  			break
 20427  		}
 20428  		v.reset(OpARM64SRL)
 20429  		v.Type = t
 20430  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20431  		v0.AddArg(x)
 20432  		v.AddArg2(v0, y)
 20433  		return true
 20434  	}
 20435  	// match: (Rsh16Ux8 <t> x y)
 20436  	// cond: !shiftIsBounded(v)
 20437  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt16to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 20438  	for {
 20439  		t := v.Type
 20440  		x := v_0
 20441  		y := v_1
 20442  		if !(!shiftIsBounded(v)) {
 20443  			break
 20444  		}
 20445  		v.reset(OpARM64CSEL)
 20446  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20447  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20448  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20449  		v1.AddArg(x)
 20450  		v0.AddArg2(v1, y)
 20451  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 20452  		v2.AuxInt = int64ToAuxInt(0)
 20453  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20454  		v3.AuxInt = int64ToAuxInt(64)
 20455  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 20456  		v4.AddArg(y)
 20457  		v3.AddArg(v4)
 20458  		v.AddArg3(v0, v2, v3)
 20459  		return true
 20460  	}
 20461  	return false
 20462  }
 20463  func rewriteValueARM64_OpRsh16x16(v *Value) bool {
 20464  	v_1 := v.Args[1]
 20465  	v_0 := v.Args[0]
 20466  	b := v.Block
 20467  	typ := &b.Func.Config.Types
 20468  	// match: (Rsh16x16 <t> x y)
 20469  	// cond: shiftIsBounded(v)
 20470  	// result: (SRA <t> (SignExt16to64 x) y)
 20471  	for {
 20472  		t := v.Type
 20473  		x := v_0
 20474  		y := v_1
 20475  		if !(shiftIsBounded(v)) {
 20476  			break
 20477  		}
 20478  		v.reset(OpARM64SRA)
 20479  		v.Type = t
 20480  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 20481  		v0.AddArg(x)
 20482  		v.AddArg2(v0, y)
 20483  		return true
 20484  	}
 20485  	// match: (Rsh16x16 x y)
 20486  	// cond: !shiftIsBounded(v)
 20487  	// result: (SRA (SignExt16to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt16to64 y))))
 20488  	for {
 20489  		x := v_0
 20490  		y := v_1
 20491  		if !(!shiftIsBounded(v)) {
 20492  			break
 20493  		}
 20494  		v.reset(OpARM64SRA)
 20495  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 20496  		v0.AddArg(x)
 20497  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 20498  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 20499  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 20500  		v2.AuxInt = int64ToAuxInt(63)
 20501  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20502  		v3.AuxInt = int64ToAuxInt(64)
 20503  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20504  		v4.AddArg(y)
 20505  		v3.AddArg(v4)
 20506  		v1.AddArg3(y, v2, v3)
 20507  		v.AddArg2(v0, v1)
 20508  		return true
 20509  	}
 20510  	return false
 20511  }
 20512  func rewriteValueARM64_OpRsh16x32(v *Value) bool {
 20513  	v_1 := v.Args[1]
 20514  	v_0 := v.Args[0]
 20515  	b := v.Block
 20516  	typ := &b.Func.Config.Types
 20517  	// match: (Rsh16x32 <t> x y)
 20518  	// cond: shiftIsBounded(v)
 20519  	// result: (SRA <t> (SignExt16to64 x) y)
 20520  	for {
 20521  		t := v.Type
 20522  		x := v_0
 20523  		y := v_1
 20524  		if !(shiftIsBounded(v)) {
 20525  			break
 20526  		}
 20527  		v.reset(OpARM64SRA)
 20528  		v.Type = t
 20529  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 20530  		v0.AddArg(x)
 20531  		v.AddArg2(v0, y)
 20532  		return true
 20533  	}
 20534  	// match: (Rsh16x32 x y)
 20535  	// cond: !shiftIsBounded(v)
 20536  	// result: (SRA (SignExt16to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt32to64 y))))
 20537  	for {
 20538  		x := v_0
 20539  		y := v_1
 20540  		if !(!shiftIsBounded(v)) {
 20541  			break
 20542  		}
 20543  		v.reset(OpARM64SRA)
 20544  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 20545  		v0.AddArg(x)
 20546  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 20547  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 20548  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 20549  		v2.AuxInt = int64ToAuxInt(63)
 20550  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20551  		v3.AuxInt = int64ToAuxInt(64)
 20552  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20553  		v4.AddArg(y)
 20554  		v3.AddArg(v4)
 20555  		v1.AddArg3(y, v2, v3)
 20556  		v.AddArg2(v0, v1)
 20557  		return true
 20558  	}
 20559  	return false
 20560  }
 20561  func rewriteValueARM64_OpRsh16x64(v *Value) bool {
 20562  	v_1 := v.Args[1]
 20563  	v_0 := v.Args[0]
 20564  	b := v.Block
 20565  	typ := &b.Func.Config.Types
 20566  	// match: (Rsh16x64 <t> x y)
 20567  	// cond: shiftIsBounded(v)
 20568  	// result: (SRA <t> (SignExt16to64 x) y)
 20569  	for {
 20570  		t := v.Type
 20571  		x := v_0
 20572  		y := v_1
 20573  		if !(shiftIsBounded(v)) {
 20574  			break
 20575  		}
 20576  		v.reset(OpARM64SRA)
 20577  		v.Type = t
 20578  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 20579  		v0.AddArg(x)
 20580  		v.AddArg2(v0, y)
 20581  		return true
 20582  	}
 20583  	// match: (Rsh16x64 x y)
 20584  	// cond: !shiftIsBounded(v)
 20585  	// result: (SRA (SignExt16to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] y)))
 20586  	for {
 20587  		x := v_0
 20588  		y := v_1
 20589  		if !(!shiftIsBounded(v)) {
 20590  			break
 20591  		}
 20592  		v.reset(OpARM64SRA)
 20593  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 20594  		v0.AddArg(x)
 20595  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 20596  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 20597  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 20598  		v2.AuxInt = int64ToAuxInt(63)
 20599  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20600  		v3.AuxInt = int64ToAuxInt(64)
 20601  		v3.AddArg(y)
 20602  		v1.AddArg3(y, v2, v3)
 20603  		v.AddArg2(v0, v1)
 20604  		return true
 20605  	}
 20606  	return false
 20607  }
 20608  func rewriteValueARM64_OpRsh16x8(v *Value) bool {
 20609  	v_1 := v.Args[1]
 20610  	v_0 := v.Args[0]
 20611  	b := v.Block
 20612  	typ := &b.Func.Config.Types
 20613  	// match: (Rsh16x8 <t> x y)
 20614  	// cond: shiftIsBounded(v)
 20615  	// result: (SRA <t> (SignExt16to64 x) y)
 20616  	for {
 20617  		t := v.Type
 20618  		x := v_0
 20619  		y := v_1
 20620  		if !(shiftIsBounded(v)) {
 20621  			break
 20622  		}
 20623  		v.reset(OpARM64SRA)
 20624  		v.Type = t
 20625  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 20626  		v0.AddArg(x)
 20627  		v.AddArg2(v0, y)
 20628  		return true
 20629  	}
 20630  	// match: (Rsh16x8 x y)
 20631  	// cond: !shiftIsBounded(v)
 20632  	// result: (SRA (SignExt16to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt8to64 y))))
 20633  	for {
 20634  		x := v_0
 20635  		y := v_1
 20636  		if !(!shiftIsBounded(v)) {
 20637  			break
 20638  		}
 20639  		v.reset(OpARM64SRA)
 20640  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 20641  		v0.AddArg(x)
 20642  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 20643  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 20644  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 20645  		v2.AuxInt = int64ToAuxInt(63)
 20646  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20647  		v3.AuxInt = int64ToAuxInt(64)
 20648  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 20649  		v4.AddArg(y)
 20650  		v3.AddArg(v4)
 20651  		v1.AddArg3(y, v2, v3)
 20652  		v.AddArg2(v0, v1)
 20653  		return true
 20654  	}
 20655  	return false
 20656  }
 20657  func rewriteValueARM64_OpRsh32Ux16(v *Value) bool {
 20658  	v_1 := v.Args[1]
 20659  	v_0 := v.Args[0]
 20660  	b := v.Block
 20661  	typ := &b.Func.Config.Types
 20662  	// match: (Rsh32Ux16 <t> x y)
 20663  	// cond: shiftIsBounded(v)
 20664  	// result: (SRL <t> (ZeroExt32to64 x) y)
 20665  	for {
 20666  		t := v.Type
 20667  		x := v_0
 20668  		y := v_1
 20669  		if !(shiftIsBounded(v)) {
 20670  			break
 20671  		}
 20672  		v.reset(OpARM64SRL)
 20673  		v.Type = t
 20674  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20675  		v0.AddArg(x)
 20676  		v.AddArg2(v0, y)
 20677  		return true
 20678  	}
 20679  	// match: (Rsh32Ux16 <t> x y)
 20680  	// cond: !shiftIsBounded(v)
 20681  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt32to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 20682  	for {
 20683  		t := v.Type
 20684  		x := v_0
 20685  		y := v_1
 20686  		if !(!shiftIsBounded(v)) {
 20687  			break
 20688  		}
 20689  		v.reset(OpARM64CSEL)
 20690  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20691  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20692  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20693  		v1.AddArg(x)
 20694  		v0.AddArg2(v1, y)
 20695  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 20696  		v2.AuxInt = int64ToAuxInt(0)
 20697  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20698  		v3.AuxInt = int64ToAuxInt(64)
 20699  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20700  		v4.AddArg(y)
 20701  		v3.AddArg(v4)
 20702  		v.AddArg3(v0, v2, v3)
 20703  		return true
 20704  	}
 20705  	return false
 20706  }
 20707  func rewriteValueARM64_OpRsh32Ux32(v *Value) bool {
 20708  	v_1 := v.Args[1]
 20709  	v_0 := v.Args[0]
 20710  	b := v.Block
 20711  	typ := &b.Func.Config.Types
 20712  	// match: (Rsh32Ux32 <t> x y)
 20713  	// cond: shiftIsBounded(v)
 20714  	// result: (SRL <t> (ZeroExt32to64 x) y)
 20715  	for {
 20716  		t := v.Type
 20717  		x := v_0
 20718  		y := v_1
 20719  		if !(shiftIsBounded(v)) {
 20720  			break
 20721  		}
 20722  		v.reset(OpARM64SRL)
 20723  		v.Type = t
 20724  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20725  		v0.AddArg(x)
 20726  		v.AddArg2(v0, y)
 20727  		return true
 20728  	}
 20729  	// match: (Rsh32Ux32 <t> x y)
 20730  	// cond: !shiftIsBounded(v)
 20731  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt32to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 20732  	for {
 20733  		t := v.Type
 20734  		x := v_0
 20735  		y := v_1
 20736  		if !(!shiftIsBounded(v)) {
 20737  			break
 20738  		}
 20739  		v.reset(OpARM64CSEL)
 20740  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20741  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20742  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20743  		v1.AddArg(x)
 20744  		v0.AddArg2(v1, y)
 20745  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 20746  		v2.AuxInt = int64ToAuxInt(0)
 20747  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20748  		v3.AuxInt = int64ToAuxInt(64)
 20749  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20750  		v4.AddArg(y)
 20751  		v3.AddArg(v4)
 20752  		v.AddArg3(v0, v2, v3)
 20753  		return true
 20754  	}
 20755  	return false
 20756  }
 20757  func rewriteValueARM64_OpRsh32Ux64(v *Value) bool {
 20758  	v_1 := v.Args[1]
 20759  	v_0 := v.Args[0]
 20760  	b := v.Block
 20761  	typ := &b.Func.Config.Types
 20762  	// match: (Rsh32Ux64 <t> x y)
 20763  	// cond: shiftIsBounded(v)
 20764  	// result: (SRL <t> (ZeroExt32to64 x) y)
 20765  	for {
 20766  		t := v.Type
 20767  		x := v_0
 20768  		y := v_1
 20769  		if !(shiftIsBounded(v)) {
 20770  			break
 20771  		}
 20772  		v.reset(OpARM64SRL)
 20773  		v.Type = t
 20774  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20775  		v0.AddArg(x)
 20776  		v.AddArg2(v0, y)
 20777  		return true
 20778  	}
 20779  	// match: (Rsh32Ux64 <t> x y)
 20780  	// cond: !shiftIsBounded(v)
 20781  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt32to64 x) y) (Const64 <t> [0]) (CMPconst [64] y))
 20782  	for {
 20783  		t := v.Type
 20784  		x := v_0
 20785  		y := v_1
 20786  		if !(!shiftIsBounded(v)) {
 20787  			break
 20788  		}
 20789  		v.reset(OpARM64CSEL)
 20790  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20791  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20792  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20793  		v1.AddArg(x)
 20794  		v0.AddArg2(v1, y)
 20795  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 20796  		v2.AuxInt = int64ToAuxInt(0)
 20797  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20798  		v3.AuxInt = int64ToAuxInt(64)
 20799  		v3.AddArg(y)
 20800  		v.AddArg3(v0, v2, v3)
 20801  		return true
 20802  	}
 20803  	return false
 20804  }
 20805  func rewriteValueARM64_OpRsh32Ux8(v *Value) bool {
 20806  	v_1 := v.Args[1]
 20807  	v_0 := v.Args[0]
 20808  	b := v.Block
 20809  	typ := &b.Func.Config.Types
 20810  	// match: (Rsh32Ux8 <t> x y)
 20811  	// cond: shiftIsBounded(v)
 20812  	// result: (SRL <t> (ZeroExt32to64 x) y)
 20813  	for {
 20814  		t := v.Type
 20815  		x := v_0
 20816  		y := v_1
 20817  		if !(shiftIsBounded(v)) {
 20818  			break
 20819  		}
 20820  		v.reset(OpARM64SRL)
 20821  		v.Type = t
 20822  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20823  		v0.AddArg(x)
 20824  		v.AddArg2(v0, y)
 20825  		return true
 20826  	}
 20827  	// match: (Rsh32Ux8 <t> x y)
 20828  	// cond: !shiftIsBounded(v)
 20829  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt32to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 20830  	for {
 20831  		t := v.Type
 20832  		x := v_0
 20833  		y := v_1
 20834  		if !(!shiftIsBounded(v)) {
 20835  			break
 20836  		}
 20837  		v.reset(OpARM64CSEL)
 20838  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20839  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20840  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20841  		v1.AddArg(x)
 20842  		v0.AddArg2(v1, y)
 20843  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 20844  		v2.AuxInt = int64ToAuxInt(0)
 20845  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20846  		v3.AuxInt = int64ToAuxInt(64)
 20847  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 20848  		v4.AddArg(y)
 20849  		v3.AddArg(v4)
 20850  		v.AddArg3(v0, v2, v3)
 20851  		return true
 20852  	}
 20853  	return false
 20854  }
 20855  func rewriteValueARM64_OpRsh32x16(v *Value) bool {
 20856  	v_1 := v.Args[1]
 20857  	v_0 := v.Args[0]
 20858  	b := v.Block
 20859  	typ := &b.Func.Config.Types
 20860  	// match: (Rsh32x16 <t> x y)
 20861  	// cond: shiftIsBounded(v)
 20862  	// result: (SRA <t> (SignExt32to64 x) y)
 20863  	for {
 20864  		t := v.Type
 20865  		x := v_0
 20866  		y := v_1
 20867  		if !(shiftIsBounded(v)) {
 20868  			break
 20869  		}
 20870  		v.reset(OpARM64SRA)
 20871  		v.Type = t
 20872  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 20873  		v0.AddArg(x)
 20874  		v.AddArg2(v0, y)
 20875  		return true
 20876  	}
 20877  	// match: (Rsh32x16 x y)
 20878  	// cond: !shiftIsBounded(v)
 20879  	// result: (SRA (SignExt32to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt16to64 y))))
 20880  	for {
 20881  		x := v_0
 20882  		y := v_1
 20883  		if !(!shiftIsBounded(v)) {
 20884  			break
 20885  		}
 20886  		v.reset(OpARM64SRA)
 20887  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 20888  		v0.AddArg(x)
 20889  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 20890  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 20891  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 20892  		v2.AuxInt = int64ToAuxInt(63)
 20893  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20894  		v3.AuxInt = int64ToAuxInt(64)
 20895  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20896  		v4.AddArg(y)
 20897  		v3.AddArg(v4)
 20898  		v1.AddArg3(y, v2, v3)
 20899  		v.AddArg2(v0, v1)
 20900  		return true
 20901  	}
 20902  	return false
 20903  }
 20904  func rewriteValueARM64_OpRsh32x32(v *Value) bool {
 20905  	v_1 := v.Args[1]
 20906  	v_0 := v.Args[0]
 20907  	b := v.Block
 20908  	typ := &b.Func.Config.Types
 20909  	// match: (Rsh32x32 <t> x y)
 20910  	// cond: shiftIsBounded(v)
 20911  	// result: (SRA <t> (SignExt32to64 x) y)
 20912  	for {
 20913  		t := v.Type
 20914  		x := v_0
 20915  		y := v_1
 20916  		if !(shiftIsBounded(v)) {
 20917  			break
 20918  		}
 20919  		v.reset(OpARM64SRA)
 20920  		v.Type = t
 20921  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 20922  		v0.AddArg(x)
 20923  		v.AddArg2(v0, y)
 20924  		return true
 20925  	}
 20926  	// match: (Rsh32x32 x y)
 20927  	// cond: !shiftIsBounded(v)
 20928  	// result: (SRA (SignExt32to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt32to64 y))))
 20929  	for {
 20930  		x := v_0
 20931  		y := v_1
 20932  		if !(!shiftIsBounded(v)) {
 20933  			break
 20934  		}
 20935  		v.reset(OpARM64SRA)
 20936  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 20937  		v0.AddArg(x)
 20938  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 20939  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 20940  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 20941  		v2.AuxInt = int64ToAuxInt(63)
 20942  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20943  		v3.AuxInt = int64ToAuxInt(64)
 20944  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20945  		v4.AddArg(y)
 20946  		v3.AddArg(v4)
 20947  		v1.AddArg3(y, v2, v3)
 20948  		v.AddArg2(v0, v1)
 20949  		return true
 20950  	}
 20951  	return false
 20952  }
 20953  func rewriteValueARM64_OpRsh32x64(v *Value) bool {
 20954  	v_1 := v.Args[1]
 20955  	v_0 := v.Args[0]
 20956  	b := v.Block
 20957  	typ := &b.Func.Config.Types
 20958  	// match: (Rsh32x64 <t> x y)
 20959  	// cond: shiftIsBounded(v)
 20960  	// result: (SRA <t> (SignExt32to64 x) y)
 20961  	for {
 20962  		t := v.Type
 20963  		x := v_0
 20964  		y := v_1
 20965  		if !(shiftIsBounded(v)) {
 20966  			break
 20967  		}
 20968  		v.reset(OpARM64SRA)
 20969  		v.Type = t
 20970  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 20971  		v0.AddArg(x)
 20972  		v.AddArg2(v0, y)
 20973  		return true
 20974  	}
 20975  	// match: (Rsh32x64 x y)
 20976  	// cond: !shiftIsBounded(v)
 20977  	// result: (SRA (SignExt32to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] y)))
 20978  	for {
 20979  		x := v_0
 20980  		y := v_1
 20981  		if !(!shiftIsBounded(v)) {
 20982  			break
 20983  		}
 20984  		v.reset(OpARM64SRA)
 20985  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 20986  		v0.AddArg(x)
 20987  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 20988  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 20989  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 20990  		v2.AuxInt = int64ToAuxInt(63)
 20991  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20992  		v3.AuxInt = int64ToAuxInt(64)
 20993  		v3.AddArg(y)
 20994  		v1.AddArg3(y, v2, v3)
 20995  		v.AddArg2(v0, v1)
 20996  		return true
 20997  	}
 20998  	return false
 20999  }
 21000  func rewriteValueARM64_OpRsh32x8(v *Value) bool {
 21001  	v_1 := v.Args[1]
 21002  	v_0 := v.Args[0]
 21003  	b := v.Block
 21004  	typ := &b.Func.Config.Types
 21005  	// match: (Rsh32x8 <t> x y)
 21006  	// cond: shiftIsBounded(v)
 21007  	// result: (SRA <t> (SignExt32to64 x) y)
 21008  	for {
 21009  		t := v.Type
 21010  		x := v_0
 21011  		y := v_1
 21012  		if !(shiftIsBounded(v)) {
 21013  			break
 21014  		}
 21015  		v.reset(OpARM64SRA)
 21016  		v.Type = t
 21017  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 21018  		v0.AddArg(x)
 21019  		v.AddArg2(v0, y)
 21020  		return true
 21021  	}
 21022  	// match: (Rsh32x8 x y)
 21023  	// cond: !shiftIsBounded(v)
 21024  	// result: (SRA (SignExt32to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt8to64 y))))
 21025  	for {
 21026  		x := v_0
 21027  		y := v_1
 21028  		if !(!shiftIsBounded(v)) {
 21029  			break
 21030  		}
 21031  		v.reset(OpARM64SRA)
 21032  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 21033  		v0.AddArg(x)
 21034  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21035  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 21036  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21037  		v2.AuxInt = int64ToAuxInt(63)
 21038  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21039  		v3.AuxInt = int64ToAuxInt(64)
 21040  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21041  		v4.AddArg(y)
 21042  		v3.AddArg(v4)
 21043  		v1.AddArg3(y, v2, v3)
 21044  		v.AddArg2(v0, v1)
 21045  		return true
 21046  	}
 21047  	return false
 21048  }
 21049  func rewriteValueARM64_OpRsh64Ux16(v *Value) bool {
 21050  	v_1 := v.Args[1]
 21051  	v_0 := v.Args[0]
 21052  	b := v.Block
 21053  	typ := &b.Func.Config.Types
 21054  	// match: (Rsh64Ux16 <t> x y)
 21055  	// cond: shiftIsBounded(v)
 21056  	// result: (SRL <t> x y)
 21057  	for {
 21058  		t := v.Type
 21059  		x := v_0
 21060  		y := v_1
 21061  		if !(shiftIsBounded(v)) {
 21062  			break
 21063  		}
 21064  		v.reset(OpARM64SRL)
 21065  		v.Type = t
 21066  		v.AddArg2(x, y)
 21067  		return true
 21068  	}
 21069  	// match: (Rsh64Ux16 <t> x y)
 21070  	// cond: !shiftIsBounded(v)
 21071  	// result: (CSEL [OpARM64LessThanU] (SRL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 21072  	for {
 21073  		t := v.Type
 21074  		x := v_0
 21075  		y := v_1
 21076  		if !(!shiftIsBounded(v)) {
 21077  			break
 21078  		}
 21079  		v.reset(OpARM64CSEL)
 21080  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21081  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21082  		v0.AddArg2(x, y)
 21083  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 21084  		v1.AuxInt = int64ToAuxInt(0)
 21085  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21086  		v2.AuxInt = int64ToAuxInt(64)
 21087  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 21088  		v3.AddArg(y)
 21089  		v2.AddArg(v3)
 21090  		v.AddArg3(v0, v1, v2)
 21091  		return true
 21092  	}
 21093  	return false
 21094  }
 21095  func rewriteValueARM64_OpRsh64Ux32(v *Value) bool {
 21096  	v_1 := v.Args[1]
 21097  	v_0 := v.Args[0]
 21098  	b := v.Block
 21099  	typ := &b.Func.Config.Types
 21100  	// match: (Rsh64Ux32 <t> x y)
 21101  	// cond: shiftIsBounded(v)
 21102  	// result: (SRL <t> x y)
 21103  	for {
 21104  		t := v.Type
 21105  		x := v_0
 21106  		y := v_1
 21107  		if !(shiftIsBounded(v)) {
 21108  			break
 21109  		}
 21110  		v.reset(OpARM64SRL)
 21111  		v.Type = t
 21112  		v.AddArg2(x, y)
 21113  		return true
 21114  	}
 21115  	// match: (Rsh64Ux32 <t> x y)
 21116  	// cond: !shiftIsBounded(v)
 21117  	// result: (CSEL [OpARM64LessThanU] (SRL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 21118  	for {
 21119  		t := v.Type
 21120  		x := v_0
 21121  		y := v_1
 21122  		if !(!shiftIsBounded(v)) {
 21123  			break
 21124  		}
 21125  		v.reset(OpARM64CSEL)
 21126  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21127  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21128  		v0.AddArg2(x, y)
 21129  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 21130  		v1.AuxInt = int64ToAuxInt(0)
 21131  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21132  		v2.AuxInt = int64ToAuxInt(64)
 21133  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 21134  		v3.AddArg(y)
 21135  		v2.AddArg(v3)
 21136  		v.AddArg3(v0, v1, v2)
 21137  		return true
 21138  	}
 21139  	return false
 21140  }
 21141  func rewriteValueARM64_OpRsh64Ux64(v *Value) bool {
 21142  	v_1 := v.Args[1]
 21143  	v_0 := v.Args[0]
 21144  	b := v.Block
 21145  	// match: (Rsh64Ux64 <t> x y)
 21146  	// cond: shiftIsBounded(v)
 21147  	// result: (SRL <t> x y)
 21148  	for {
 21149  		t := v.Type
 21150  		x := v_0
 21151  		y := v_1
 21152  		if !(shiftIsBounded(v)) {
 21153  			break
 21154  		}
 21155  		v.reset(OpARM64SRL)
 21156  		v.Type = t
 21157  		v.AddArg2(x, y)
 21158  		return true
 21159  	}
 21160  	// match: (Rsh64Ux64 <t> x y)
 21161  	// cond: !shiftIsBounded(v)
 21162  	// result: (CSEL [OpARM64LessThanU] (SRL <t> x y) (Const64 <t> [0]) (CMPconst [64] y))
 21163  	for {
 21164  		t := v.Type
 21165  		x := v_0
 21166  		y := v_1
 21167  		if !(!shiftIsBounded(v)) {
 21168  			break
 21169  		}
 21170  		v.reset(OpARM64CSEL)
 21171  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21172  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21173  		v0.AddArg2(x, y)
 21174  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 21175  		v1.AuxInt = int64ToAuxInt(0)
 21176  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21177  		v2.AuxInt = int64ToAuxInt(64)
 21178  		v2.AddArg(y)
 21179  		v.AddArg3(v0, v1, v2)
 21180  		return true
 21181  	}
 21182  	return false
 21183  }
 21184  func rewriteValueARM64_OpRsh64Ux8(v *Value) bool {
 21185  	v_1 := v.Args[1]
 21186  	v_0 := v.Args[0]
 21187  	b := v.Block
 21188  	typ := &b.Func.Config.Types
 21189  	// match: (Rsh64Ux8 <t> x y)
 21190  	// cond: shiftIsBounded(v)
 21191  	// result: (SRL <t> x y)
 21192  	for {
 21193  		t := v.Type
 21194  		x := v_0
 21195  		y := v_1
 21196  		if !(shiftIsBounded(v)) {
 21197  			break
 21198  		}
 21199  		v.reset(OpARM64SRL)
 21200  		v.Type = t
 21201  		v.AddArg2(x, y)
 21202  		return true
 21203  	}
 21204  	// match: (Rsh64Ux8 <t> x y)
 21205  	// cond: !shiftIsBounded(v)
 21206  	// result: (CSEL [OpARM64LessThanU] (SRL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 21207  	for {
 21208  		t := v.Type
 21209  		x := v_0
 21210  		y := v_1
 21211  		if !(!shiftIsBounded(v)) {
 21212  			break
 21213  		}
 21214  		v.reset(OpARM64CSEL)
 21215  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21216  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21217  		v0.AddArg2(x, y)
 21218  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 21219  		v1.AuxInt = int64ToAuxInt(0)
 21220  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21221  		v2.AuxInt = int64ToAuxInt(64)
 21222  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21223  		v3.AddArg(y)
 21224  		v2.AddArg(v3)
 21225  		v.AddArg3(v0, v1, v2)
 21226  		return true
 21227  	}
 21228  	return false
 21229  }
 21230  func rewriteValueARM64_OpRsh64x16(v *Value) bool {
 21231  	v_1 := v.Args[1]
 21232  	v_0 := v.Args[0]
 21233  	b := v.Block
 21234  	typ := &b.Func.Config.Types
 21235  	// match: (Rsh64x16 <t> x y)
 21236  	// cond: shiftIsBounded(v)
 21237  	// result: (SRA <t> x y)
 21238  	for {
 21239  		t := v.Type
 21240  		x := v_0
 21241  		y := v_1
 21242  		if !(shiftIsBounded(v)) {
 21243  			break
 21244  		}
 21245  		v.reset(OpARM64SRA)
 21246  		v.Type = t
 21247  		v.AddArg2(x, y)
 21248  		return true
 21249  	}
 21250  	// match: (Rsh64x16 x y)
 21251  	// cond: !shiftIsBounded(v)
 21252  	// result: (SRA x (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt16to64 y))))
 21253  	for {
 21254  		x := v_0
 21255  		y := v_1
 21256  		if !(!shiftIsBounded(v)) {
 21257  			break
 21258  		}
 21259  		v.reset(OpARM64SRA)
 21260  		v0 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21261  		v0.AuxInt = opToAuxInt(OpARM64LessThanU)
 21262  		v1 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21263  		v1.AuxInt = int64ToAuxInt(63)
 21264  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21265  		v2.AuxInt = int64ToAuxInt(64)
 21266  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 21267  		v3.AddArg(y)
 21268  		v2.AddArg(v3)
 21269  		v0.AddArg3(y, v1, v2)
 21270  		v.AddArg2(x, v0)
 21271  		return true
 21272  	}
 21273  	return false
 21274  }
 21275  func rewriteValueARM64_OpRsh64x32(v *Value) bool {
 21276  	v_1 := v.Args[1]
 21277  	v_0 := v.Args[0]
 21278  	b := v.Block
 21279  	typ := &b.Func.Config.Types
 21280  	// match: (Rsh64x32 <t> x y)
 21281  	// cond: shiftIsBounded(v)
 21282  	// result: (SRA <t> x y)
 21283  	for {
 21284  		t := v.Type
 21285  		x := v_0
 21286  		y := v_1
 21287  		if !(shiftIsBounded(v)) {
 21288  			break
 21289  		}
 21290  		v.reset(OpARM64SRA)
 21291  		v.Type = t
 21292  		v.AddArg2(x, y)
 21293  		return true
 21294  	}
 21295  	// match: (Rsh64x32 x y)
 21296  	// cond: !shiftIsBounded(v)
 21297  	// result: (SRA x (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt32to64 y))))
 21298  	for {
 21299  		x := v_0
 21300  		y := v_1
 21301  		if !(!shiftIsBounded(v)) {
 21302  			break
 21303  		}
 21304  		v.reset(OpARM64SRA)
 21305  		v0 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21306  		v0.AuxInt = opToAuxInt(OpARM64LessThanU)
 21307  		v1 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21308  		v1.AuxInt = int64ToAuxInt(63)
 21309  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21310  		v2.AuxInt = int64ToAuxInt(64)
 21311  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 21312  		v3.AddArg(y)
 21313  		v2.AddArg(v3)
 21314  		v0.AddArg3(y, v1, v2)
 21315  		v.AddArg2(x, v0)
 21316  		return true
 21317  	}
 21318  	return false
 21319  }
 21320  func rewriteValueARM64_OpRsh64x64(v *Value) bool {
 21321  	v_1 := v.Args[1]
 21322  	v_0 := v.Args[0]
 21323  	b := v.Block
 21324  	// match: (Rsh64x64 <t> x y)
 21325  	// cond: shiftIsBounded(v)
 21326  	// result: (SRA <t> x y)
 21327  	for {
 21328  		t := v.Type
 21329  		x := v_0
 21330  		y := v_1
 21331  		if !(shiftIsBounded(v)) {
 21332  			break
 21333  		}
 21334  		v.reset(OpARM64SRA)
 21335  		v.Type = t
 21336  		v.AddArg2(x, y)
 21337  		return true
 21338  	}
 21339  	// match: (Rsh64x64 x y)
 21340  	// cond: !shiftIsBounded(v)
 21341  	// result: (SRA x (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] y)))
 21342  	for {
 21343  		x := v_0
 21344  		y := v_1
 21345  		if !(!shiftIsBounded(v)) {
 21346  			break
 21347  		}
 21348  		v.reset(OpARM64SRA)
 21349  		v0 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21350  		v0.AuxInt = opToAuxInt(OpARM64LessThanU)
 21351  		v1 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21352  		v1.AuxInt = int64ToAuxInt(63)
 21353  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21354  		v2.AuxInt = int64ToAuxInt(64)
 21355  		v2.AddArg(y)
 21356  		v0.AddArg3(y, v1, v2)
 21357  		v.AddArg2(x, v0)
 21358  		return true
 21359  	}
 21360  	return false
 21361  }
 21362  func rewriteValueARM64_OpRsh64x8(v *Value) bool {
 21363  	v_1 := v.Args[1]
 21364  	v_0 := v.Args[0]
 21365  	b := v.Block
 21366  	typ := &b.Func.Config.Types
 21367  	// match: (Rsh64x8 <t> x y)
 21368  	// cond: shiftIsBounded(v)
 21369  	// result: (SRA <t> x y)
 21370  	for {
 21371  		t := v.Type
 21372  		x := v_0
 21373  		y := v_1
 21374  		if !(shiftIsBounded(v)) {
 21375  			break
 21376  		}
 21377  		v.reset(OpARM64SRA)
 21378  		v.Type = t
 21379  		v.AddArg2(x, y)
 21380  		return true
 21381  	}
 21382  	// match: (Rsh64x8 x y)
 21383  	// cond: !shiftIsBounded(v)
 21384  	// result: (SRA x (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt8to64 y))))
 21385  	for {
 21386  		x := v_0
 21387  		y := v_1
 21388  		if !(!shiftIsBounded(v)) {
 21389  			break
 21390  		}
 21391  		v.reset(OpARM64SRA)
 21392  		v0 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21393  		v0.AuxInt = opToAuxInt(OpARM64LessThanU)
 21394  		v1 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21395  		v1.AuxInt = int64ToAuxInt(63)
 21396  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21397  		v2.AuxInt = int64ToAuxInt(64)
 21398  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21399  		v3.AddArg(y)
 21400  		v2.AddArg(v3)
 21401  		v0.AddArg3(y, v1, v2)
 21402  		v.AddArg2(x, v0)
 21403  		return true
 21404  	}
 21405  	return false
 21406  }
 21407  func rewriteValueARM64_OpRsh8Ux16(v *Value) bool {
 21408  	v_1 := v.Args[1]
 21409  	v_0 := v.Args[0]
 21410  	b := v.Block
 21411  	typ := &b.Func.Config.Types
 21412  	// match: (Rsh8Ux16 <t> x y)
 21413  	// cond: shiftIsBounded(v)
 21414  	// result: (SRL <t> (ZeroExt8to64 x) y)
 21415  	for {
 21416  		t := v.Type
 21417  		x := v_0
 21418  		y := v_1
 21419  		if !(shiftIsBounded(v)) {
 21420  			break
 21421  		}
 21422  		v.reset(OpARM64SRL)
 21423  		v.Type = t
 21424  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21425  		v0.AddArg(x)
 21426  		v.AddArg2(v0, y)
 21427  		return true
 21428  	}
 21429  	// match: (Rsh8Ux16 <t> x y)
 21430  	// cond: !shiftIsBounded(v)
 21431  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt8to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 21432  	for {
 21433  		t := v.Type
 21434  		x := v_0
 21435  		y := v_1
 21436  		if !(!shiftIsBounded(v)) {
 21437  			break
 21438  		}
 21439  		v.reset(OpARM64CSEL)
 21440  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21441  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21442  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21443  		v1.AddArg(x)
 21444  		v0.AddArg2(v1, y)
 21445  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 21446  		v2.AuxInt = int64ToAuxInt(0)
 21447  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21448  		v3.AuxInt = int64ToAuxInt(64)
 21449  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 21450  		v4.AddArg(y)
 21451  		v3.AddArg(v4)
 21452  		v.AddArg3(v0, v2, v3)
 21453  		return true
 21454  	}
 21455  	return false
 21456  }
 21457  func rewriteValueARM64_OpRsh8Ux32(v *Value) bool {
 21458  	v_1 := v.Args[1]
 21459  	v_0 := v.Args[0]
 21460  	b := v.Block
 21461  	typ := &b.Func.Config.Types
 21462  	// match: (Rsh8Ux32 <t> x y)
 21463  	// cond: shiftIsBounded(v)
 21464  	// result: (SRL <t> (ZeroExt8to64 x) y)
 21465  	for {
 21466  		t := v.Type
 21467  		x := v_0
 21468  		y := v_1
 21469  		if !(shiftIsBounded(v)) {
 21470  			break
 21471  		}
 21472  		v.reset(OpARM64SRL)
 21473  		v.Type = t
 21474  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21475  		v0.AddArg(x)
 21476  		v.AddArg2(v0, y)
 21477  		return true
 21478  	}
 21479  	// match: (Rsh8Ux32 <t> x y)
 21480  	// cond: !shiftIsBounded(v)
 21481  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt8to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 21482  	for {
 21483  		t := v.Type
 21484  		x := v_0
 21485  		y := v_1
 21486  		if !(!shiftIsBounded(v)) {
 21487  			break
 21488  		}
 21489  		v.reset(OpARM64CSEL)
 21490  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21491  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21492  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21493  		v1.AddArg(x)
 21494  		v0.AddArg2(v1, y)
 21495  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 21496  		v2.AuxInt = int64ToAuxInt(0)
 21497  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21498  		v3.AuxInt = int64ToAuxInt(64)
 21499  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 21500  		v4.AddArg(y)
 21501  		v3.AddArg(v4)
 21502  		v.AddArg3(v0, v2, v3)
 21503  		return true
 21504  	}
 21505  	return false
 21506  }
 21507  func rewriteValueARM64_OpRsh8Ux64(v *Value) bool {
 21508  	v_1 := v.Args[1]
 21509  	v_0 := v.Args[0]
 21510  	b := v.Block
 21511  	typ := &b.Func.Config.Types
 21512  	// match: (Rsh8Ux64 <t> x y)
 21513  	// cond: shiftIsBounded(v)
 21514  	// result: (SRL <t> (ZeroExt8to64 x) y)
 21515  	for {
 21516  		t := v.Type
 21517  		x := v_0
 21518  		y := v_1
 21519  		if !(shiftIsBounded(v)) {
 21520  			break
 21521  		}
 21522  		v.reset(OpARM64SRL)
 21523  		v.Type = t
 21524  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21525  		v0.AddArg(x)
 21526  		v.AddArg2(v0, y)
 21527  		return true
 21528  	}
 21529  	// match: (Rsh8Ux64 <t> x y)
 21530  	// cond: !shiftIsBounded(v)
 21531  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt8to64 x) y) (Const64 <t> [0]) (CMPconst [64] y))
 21532  	for {
 21533  		t := v.Type
 21534  		x := v_0
 21535  		y := v_1
 21536  		if !(!shiftIsBounded(v)) {
 21537  			break
 21538  		}
 21539  		v.reset(OpARM64CSEL)
 21540  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21541  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21542  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21543  		v1.AddArg(x)
 21544  		v0.AddArg2(v1, y)
 21545  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 21546  		v2.AuxInt = int64ToAuxInt(0)
 21547  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21548  		v3.AuxInt = int64ToAuxInt(64)
 21549  		v3.AddArg(y)
 21550  		v.AddArg3(v0, v2, v3)
 21551  		return true
 21552  	}
 21553  	return false
 21554  }
 21555  func rewriteValueARM64_OpRsh8Ux8(v *Value) bool {
 21556  	v_1 := v.Args[1]
 21557  	v_0 := v.Args[0]
 21558  	b := v.Block
 21559  	typ := &b.Func.Config.Types
 21560  	// match: (Rsh8Ux8 <t> x y)
 21561  	// cond: shiftIsBounded(v)
 21562  	// result: (SRL <t> (ZeroExt8to64 x) y)
 21563  	for {
 21564  		t := v.Type
 21565  		x := v_0
 21566  		y := v_1
 21567  		if !(shiftIsBounded(v)) {
 21568  			break
 21569  		}
 21570  		v.reset(OpARM64SRL)
 21571  		v.Type = t
 21572  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21573  		v0.AddArg(x)
 21574  		v.AddArg2(v0, y)
 21575  		return true
 21576  	}
 21577  	// match: (Rsh8Ux8 <t> x y)
 21578  	// cond: !shiftIsBounded(v)
 21579  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt8to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 21580  	for {
 21581  		t := v.Type
 21582  		x := v_0
 21583  		y := v_1
 21584  		if !(!shiftIsBounded(v)) {
 21585  			break
 21586  		}
 21587  		v.reset(OpARM64CSEL)
 21588  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21589  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21590  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21591  		v1.AddArg(x)
 21592  		v0.AddArg2(v1, y)
 21593  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 21594  		v2.AuxInt = int64ToAuxInt(0)
 21595  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21596  		v3.AuxInt = int64ToAuxInt(64)
 21597  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21598  		v4.AddArg(y)
 21599  		v3.AddArg(v4)
 21600  		v.AddArg3(v0, v2, v3)
 21601  		return true
 21602  	}
 21603  	return false
 21604  }
 21605  func rewriteValueARM64_OpRsh8x16(v *Value) bool {
 21606  	v_1 := v.Args[1]
 21607  	v_0 := v.Args[0]
 21608  	b := v.Block
 21609  	typ := &b.Func.Config.Types
 21610  	// match: (Rsh8x16 <t> x y)
 21611  	// cond: shiftIsBounded(v)
 21612  	// result: (SRA <t> (SignExt8to64 x) y)
 21613  	for {
 21614  		t := v.Type
 21615  		x := v_0
 21616  		y := v_1
 21617  		if !(shiftIsBounded(v)) {
 21618  			break
 21619  		}
 21620  		v.reset(OpARM64SRA)
 21621  		v.Type = t
 21622  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 21623  		v0.AddArg(x)
 21624  		v.AddArg2(v0, y)
 21625  		return true
 21626  	}
 21627  	// match: (Rsh8x16 x y)
 21628  	// cond: !shiftIsBounded(v)
 21629  	// result: (SRA (SignExt8to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt16to64 y))))
 21630  	for {
 21631  		x := v_0
 21632  		y := v_1
 21633  		if !(!shiftIsBounded(v)) {
 21634  			break
 21635  		}
 21636  		v.reset(OpARM64SRA)
 21637  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 21638  		v0.AddArg(x)
 21639  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21640  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 21641  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21642  		v2.AuxInt = int64ToAuxInt(63)
 21643  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21644  		v3.AuxInt = int64ToAuxInt(64)
 21645  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 21646  		v4.AddArg(y)
 21647  		v3.AddArg(v4)
 21648  		v1.AddArg3(y, v2, v3)
 21649  		v.AddArg2(v0, v1)
 21650  		return true
 21651  	}
 21652  	return false
 21653  }
 21654  func rewriteValueARM64_OpRsh8x32(v *Value) bool {
 21655  	v_1 := v.Args[1]
 21656  	v_0 := v.Args[0]
 21657  	b := v.Block
 21658  	typ := &b.Func.Config.Types
 21659  	// match: (Rsh8x32 <t> x y)
 21660  	// cond: shiftIsBounded(v)
 21661  	// result: (SRA <t> (SignExt8to64 x) y)
 21662  	for {
 21663  		t := v.Type
 21664  		x := v_0
 21665  		y := v_1
 21666  		if !(shiftIsBounded(v)) {
 21667  			break
 21668  		}
 21669  		v.reset(OpARM64SRA)
 21670  		v.Type = t
 21671  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 21672  		v0.AddArg(x)
 21673  		v.AddArg2(v0, y)
 21674  		return true
 21675  	}
 21676  	// match: (Rsh8x32 x y)
 21677  	// cond: !shiftIsBounded(v)
 21678  	// result: (SRA (SignExt8to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt32to64 y))))
 21679  	for {
 21680  		x := v_0
 21681  		y := v_1
 21682  		if !(!shiftIsBounded(v)) {
 21683  			break
 21684  		}
 21685  		v.reset(OpARM64SRA)
 21686  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 21687  		v0.AddArg(x)
 21688  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21689  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 21690  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21691  		v2.AuxInt = int64ToAuxInt(63)
 21692  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21693  		v3.AuxInt = int64ToAuxInt(64)
 21694  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 21695  		v4.AddArg(y)
 21696  		v3.AddArg(v4)
 21697  		v1.AddArg3(y, v2, v3)
 21698  		v.AddArg2(v0, v1)
 21699  		return true
 21700  	}
 21701  	return false
 21702  }
 21703  func rewriteValueARM64_OpRsh8x64(v *Value) bool {
 21704  	v_1 := v.Args[1]
 21705  	v_0 := v.Args[0]
 21706  	b := v.Block
 21707  	typ := &b.Func.Config.Types
 21708  	// match: (Rsh8x64 <t> x y)
 21709  	// cond: shiftIsBounded(v)
 21710  	// result: (SRA <t> (SignExt8to64 x) y)
 21711  	for {
 21712  		t := v.Type
 21713  		x := v_0
 21714  		y := v_1
 21715  		if !(shiftIsBounded(v)) {
 21716  			break
 21717  		}
 21718  		v.reset(OpARM64SRA)
 21719  		v.Type = t
 21720  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 21721  		v0.AddArg(x)
 21722  		v.AddArg2(v0, y)
 21723  		return true
 21724  	}
 21725  	// match: (Rsh8x64 x y)
 21726  	// cond: !shiftIsBounded(v)
 21727  	// result: (SRA (SignExt8to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] y)))
 21728  	for {
 21729  		x := v_0
 21730  		y := v_1
 21731  		if !(!shiftIsBounded(v)) {
 21732  			break
 21733  		}
 21734  		v.reset(OpARM64SRA)
 21735  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 21736  		v0.AddArg(x)
 21737  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21738  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 21739  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21740  		v2.AuxInt = int64ToAuxInt(63)
 21741  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21742  		v3.AuxInt = int64ToAuxInt(64)
 21743  		v3.AddArg(y)
 21744  		v1.AddArg3(y, v2, v3)
 21745  		v.AddArg2(v0, v1)
 21746  		return true
 21747  	}
 21748  	return false
 21749  }
 21750  func rewriteValueARM64_OpRsh8x8(v *Value) bool {
 21751  	v_1 := v.Args[1]
 21752  	v_0 := v.Args[0]
 21753  	b := v.Block
 21754  	typ := &b.Func.Config.Types
 21755  	// match: (Rsh8x8 <t> x y)
 21756  	// cond: shiftIsBounded(v)
 21757  	// result: (SRA <t> (SignExt8to64 x) y)
 21758  	for {
 21759  		t := v.Type
 21760  		x := v_0
 21761  		y := v_1
 21762  		if !(shiftIsBounded(v)) {
 21763  			break
 21764  		}
 21765  		v.reset(OpARM64SRA)
 21766  		v.Type = t
 21767  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 21768  		v0.AddArg(x)
 21769  		v.AddArg2(v0, y)
 21770  		return true
 21771  	}
 21772  	// match: (Rsh8x8 x y)
 21773  	// cond: !shiftIsBounded(v)
 21774  	// result: (SRA (SignExt8to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt8to64 y))))
 21775  	for {
 21776  		x := v_0
 21777  		y := v_1
 21778  		if !(!shiftIsBounded(v)) {
 21779  			break
 21780  		}
 21781  		v.reset(OpARM64SRA)
 21782  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 21783  		v0.AddArg(x)
 21784  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21785  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 21786  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21787  		v2.AuxInt = int64ToAuxInt(63)
 21788  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21789  		v3.AuxInt = int64ToAuxInt(64)
 21790  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21791  		v4.AddArg(y)
 21792  		v3.AddArg(v4)
 21793  		v1.AddArg3(y, v2, v3)
 21794  		v.AddArg2(v0, v1)
 21795  		return true
 21796  	}
 21797  	return false
 21798  }
 21799  func rewriteValueARM64_OpSelect0(v *Value) bool {
 21800  	v_0 := v.Args[0]
 21801  	b := v.Block
 21802  	typ := &b.Func.Config.Types
 21803  	// match: (Select0 (Mul64uhilo x y))
 21804  	// result: (UMULH x y)
 21805  	for {
 21806  		if v_0.Op != OpMul64uhilo {
 21807  			break
 21808  		}
 21809  		y := v_0.Args[1]
 21810  		x := v_0.Args[0]
 21811  		v.reset(OpARM64UMULH)
 21812  		v.AddArg2(x, y)
 21813  		return true
 21814  	}
 21815  	// match: (Select0 (Add64carry x y c))
 21816  	// result: (Select0 <typ.UInt64> (ADCSflags x y (Select1 <types.TypeFlags> (ADDSconstflags [-1] c))))
 21817  	for {
 21818  		if v_0.Op != OpAdd64carry {
 21819  			break
 21820  		}
 21821  		c := v_0.Args[2]
 21822  		x := v_0.Args[0]
 21823  		y := v_0.Args[1]
 21824  		v.reset(OpSelect0)
 21825  		v.Type = typ.UInt64
 21826  		v0 := b.NewValue0(v.Pos, OpARM64ADCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 21827  		v1 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 21828  		v2 := b.NewValue0(v.Pos, OpARM64ADDSconstflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 21829  		v2.AuxInt = int64ToAuxInt(-1)
 21830  		v2.AddArg(c)
 21831  		v1.AddArg(v2)
 21832  		v0.AddArg3(x, y, v1)
 21833  		v.AddArg(v0)
 21834  		return true
 21835  	}
 21836  	// match: (Select0 (Sub64borrow x y bo))
 21837  	// result: (Select0 <typ.UInt64> (SBCSflags x y (Select1 <types.TypeFlags> (NEGSflags bo))))
 21838  	for {
 21839  		if v_0.Op != OpSub64borrow {
 21840  			break
 21841  		}
 21842  		bo := v_0.Args[2]
 21843  		x := v_0.Args[0]
 21844  		y := v_0.Args[1]
 21845  		v.reset(OpSelect0)
 21846  		v.Type = typ.UInt64
 21847  		v0 := b.NewValue0(v.Pos, OpARM64SBCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 21848  		v1 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 21849  		v2 := b.NewValue0(v.Pos, OpARM64NEGSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 21850  		v2.AddArg(bo)
 21851  		v1.AddArg(v2)
 21852  		v0.AddArg3(x, y, v1)
 21853  		v.AddArg(v0)
 21854  		return true
 21855  	}
 21856  	// match: (Select0 (Mul64uover x y))
 21857  	// result: (MUL x y)
 21858  	for {
 21859  		if v_0.Op != OpMul64uover {
 21860  			break
 21861  		}
 21862  		y := v_0.Args[1]
 21863  		x := v_0.Args[0]
 21864  		v.reset(OpARM64MUL)
 21865  		v.AddArg2(x, y)
 21866  		return true
 21867  	}
 21868  	return false
 21869  }
 21870  func rewriteValueARM64_OpSelect1(v *Value) bool {
 21871  	v_0 := v.Args[0]
 21872  	b := v.Block
 21873  	typ := &b.Func.Config.Types
 21874  	// match: (Select1 (Mul64uhilo x y))
 21875  	// result: (MUL x y)
 21876  	for {
 21877  		if v_0.Op != OpMul64uhilo {
 21878  			break
 21879  		}
 21880  		y := v_0.Args[1]
 21881  		x := v_0.Args[0]
 21882  		v.reset(OpARM64MUL)
 21883  		v.AddArg2(x, y)
 21884  		return true
 21885  	}
 21886  	// match: (Select1 (Add64carry x y c))
 21887  	// result: (ADCzerocarry <typ.UInt64> (Select1 <types.TypeFlags> (ADCSflags x y (Select1 <types.TypeFlags> (ADDSconstflags [-1] c)))))
 21888  	for {
 21889  		if v_0.Op != OpAdd64carry {
 21890  			break
 21891  		}
 21892  		c := v_0.Args[2]
 21893  		x := v_0.Args[0]
 21894  		y := v_0.Args[1]
 21895  		v.reset(OpARM64ADCzerocarry)
 21896  		v.Type = typ.UInt64
 21897  		v0 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 21898  		v1 := b.NewValue0(v.Pos, OpARM64ADCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 21899  		v2 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 21900  		v3 := b.NewValue0(v.Pos, OpARM64ADDSconstflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 21901  		v3.AuxInt = int64ToAuxInt(-1)
 21902  		v3.AddArg(c)
 21903  		v2.AddArg(v3)
 21904  		v1.AddArg3(x, y, v2)
 21905  		v0.AddArg(v1)
 21906  		v.AddArg(v0)
 21907  		return true
 21908  	}
 21909  	// match: (Select1 (Sub64borrow x y bo))
 21910  	// result: (NEG <typ.UInt64> (NGCzerocarry <typ.UInt64> (Select1 <types.TypeFlags> (SBCSflags x y (Select1 <types.TypeFlags> (NEGSflags bo))))))
 21911  	for {
 21912  		if v_0.Op != OpSub64borrow {
 21913  			break
 21914  		}
 21915  		bo := v_0.Args[2]
 21916  		x := v_0.Args[0]
 21917  		y := v_0.Args[1]
 21918  		v.reset(OpARM64NEG)
 21919  		v.Type = typ.UInt64
 21920  		v0 := b.NewValue0(v.Pos, OpARM64NGCzerocarry, typ.UInt64)
 21921  		v1 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 21922  		v2 := b.NewValue0(v.Pos, OpARM64SBCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 21923  		v3 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 21924  		v4 := b.NewValue0(v.Pos, OpARM64NEGSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 21925  		v4.AddArg(bo)
 21926  		v3.AddArg(v4)
 21927  		v2.AddArg3(x, y, v3)
 21928  		v1.AddArg(v2)
 21929  		v0.AddArg(v1)
 21930  		v.AddArg(v0)
 21931  		return true
 21932  	}
 21933  	// match: (Select1 (Mul64uover x y))
 21934  	// result: (NotEqual (CMPconst (UMULH <typ.UInt64> x y) [0]))
 21935  	for {
 21936  		if v_0.Op != OpMul64uover {
 21937  			break
 21938  		}
 21939  		y := v_0.Args[1]
 21940  		x := v_0.Args[0]
 21941  		v.reset(OpARM64NotEqual)
 21942  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21943  		v0.AuxInt = int64ToAuxInt(0)
 21944  		v1 := b.NewValue0(v.Pos, OpARM64UMULH, typ.UInt64)
 21945  		v1.AddArg2(x, y)
 21946  		v0.AddArg(v1)
 21947  		v.AddArg(v0)
 21948  		return true
 21949  	}
 21950  	return false
 21951  }
 21952  func rewriteValueARM64_OpSelectN(v *Value) bool {
 21953  	v_0 := v.Args[0]
 21954  	b := v.Block
 21955  	config := b.Func.Config
 21956  	// match: (SelectN [0] call:(CALLstatic {sym} s1:(MOVDstore _ (MOVDconst [sz]) s2:(MOVDstore _ src s3:(MOVDstore {t} _ dst mem)))))
 21957  	// cond: sz >= 0 && isSameCall(sym, "runtime.memmove") && s1.Uses == 1 && s2.Uses == 1 && s3.Uses == 1 && isInlinableMemmove(dst, src, sz, config) && clobber(s1, s2, s3, call)
 21958  	// result: (Move [sz] dst src mem)
 21959  	for {
 21960  		if auxIntToInt64(v.AuxInt) != 0 {
 21961  			break
 21962  		}
 21963  		call := v_0
 21964  		if call.Op != OpARM64CALLstatic || len(call.Args) != 1 {
 21965  			break
 21966  		}
 21967  		sym := auxToCall(call.Aux)
 21968  		s1 := call.Args[0]
 21969  		if s1.Op != OpARM64MOVDstore {
 21970  			break
 21971  		}
 21972  		_ = s1.Args[2]
 21973  		s1_1 := s1.Args[1]
 21974  		if s1_1.Op != OpARM64MOVDconst {
 21975  			break
 21976  		}
 21977  		sz := auxIntToInt64(s1_1.AuxInt)
 21978  		s2 := s1.Args[2]
 21979  		if s2.Op != OpARM64MOVDstore {
 21980  			break
 21981  		}
 21982  		_ = s2.Args[2]
 21983  		src := s2.Args[1]
 21984  		s3 := s2.Args[2]
 21985  		if s3.Op != OpARM64MOVDstore {
 21986  			break
 21987  		}
 21988  		mem := s3.Args[2]
 21989  		dst := s3.Args[1]
 21990  		if !(sz >= 0 && isSameCall(sym, "runtime.memmove") && s1.Uses == 1 && s2.Uses == 1 && s3.Uses == 1 && isInlinableMemmove(dst, src, sz, config) && clobber(s1, s2, s3, call)) {
 21991  			break
 21992  		}
 21993  		v.reset(OpMove)
 21994  		v.AuxInt = int64ToAuxInt(sz)
 21995  		v.AddArg3(dst, src, mem)
 21996  		return true
 21997  	}
 21998  	// match: (SelectN [0] call:(CALLstatic {sym} dst src (MOVDconst [sz]) mem))
 21999  	// cond: sz >= 0 && isSameCall(sym, "runtime.memmove") && call.Uses == 1 && isInlinableMemmove(dst, src, sz, config) && clobber(call)
 22000  	// result: (Move [sz] dst src mem)
 22001  	for {
 22002  		if auxIntToInt64(v.AuxInt) != 0 {
 22003  			break
 22004  		}
 22005  		call := v_0
 22006  		if call.Op != OpARM64CALLstatic || len(call.Args) != 4 {
 22007  			break
 22008  		}
 22009  		sym := auxToCall(call.Aux)
 22010  		mem := call.Args[3]
 22011  		dst := call.Args[0]
 22012  		src := call.Args[1]
 22013  		call_2 := call.Args[2]
 22014  		if call_2.Op != OpARM64MOVDconst {
 22015  			break
 22016  		}
 22017  		sz := auxIntToInt64(call_2.AuxInt)
 22018  		if !(sz >= 0 && isSameCall(sym, "runtime.memmove") && call.Uses == 1 && isInlinableMemmove(dst, src, sz, config) && clobber(call)) {
 22019  			break
 22020  		}
 22021  		v.reset(OpMove)
 22022  		v.AuxInt = int64ToAuxInt(sz)
 22023  		v.AddArg3(dst, src, mem)
 22024  		return true
 22025  	}
 22026  	return false
 22027  }
 22028  func rewriteValueARM64_OpSlicemask(v *Value) bool {
 22029  	v_0 := v.Args[0]
 22030  	b := v.Block
 22031  	// match: (Slicemask <t> x)
 22032  	// result: (SRAconst (NEG <t> x) [63])
 22033  	for {
 22034  		t := v.Type
 22035  		x := v_0
 22036  		v.reset(OpARM64SRAconst)
 22037  		v.AuxInt = int64ToAuxInt(63)
 22038  		v0 := b.NewValue0(v.Pos, OpARM64NEG, t)
 22039  		v0.AddArg(x)
 22040  		v.AddArg(v0)
 22041  		return true
 22042  	}
 22043  }
 22044  func rewriteValueARM64_OpStore(v *Value) bool {
 22045  	v_2 := v.Args[2]
 22046  	v_1 := v.Args[1]
 22047  	v_0 := v.Args[0]
 22048  	// match: (Store {t} ptr val mem)
 22049  	// cond: t.Size() == 1
 22050  	// result: (MOVBstore ptr val mem)
 22051  	for {
 22052  		t := auxToType(v.Aux)
 22053  		ptr := v_0
 22054  		val := v_1
 22055  		mem := v_2
 22056  		if !(t.Size() == 1) {
 22057  			break
 22058  		}
 22059  		v.reset(OpARM64MOVBstore)
 22060  		v.AddArg3(ptr, val, mem)
 22061  		return true
 22062  	}
 22063  	// match: (Store {t} ptr val mem)
 22064  	// cond: t.Size() == 2
 22065  	// result: (MOVHstore ptr val mem)
 22066  	for {
 22067  		t := auxToType(v.Aux)
 22068  		ptr := v_0
 22069  		val := v_1
 22070  		mem := v_2
 22071  		if !(t.Size() == 2) {
 22072  			break
 22073  		}
 22074  		v.reset(OpARM64MOVHstore)
 22075  		v.AddArg3(ptr, val, mem)
 22076  		return true
 22077  	}
 22078  	// match: (Store {t} ptr val mem)
 22079  	// cond: t.Size() == 4 && !t.IsFloat()
 22080  	// result: (MOVWstore ptr val mem)
 22081  	for {
 22082  		t := auxToType(v.Aux)
 22083  		ptr := v_0
 22084  		val := v_1
 22085  		mem := v_2
 22086  		if !(t.Size() == 4 && !t.IsFloat()) {
 22087  			break
 22088  		}
 22089  		v.reset(OpARM64MOVWstore)
 22090  		v.AddArg3(ptr, val, mem)
 22091  		return true
 22092  	}
 22093  	// match: (Store {t} ptr val mem)
 22094  	// cond: t.Size() == 8 && !t.IsFloat()
 22095  	// result: (MOVDstore ptr val mem)
 22096  	for {
 22097  		t := auxToType(v.Aux)
 22098  		ptr := v_0
 22099  		val := v_1
 22100  		mem := v_2
 22101  		if !(t.Size() == 8 && !t.IsFloat()) {
 22102  			break
 22103  		}
 22104  		v.reset(OpARM64MOVDstore)
 22105  		v.AddArg3(ptr, val, mem)
 22106  		return true
 22107  	}
 22108  	// match: (Store {t} ptr val mem)
 22109  	// cond: t.Size() == 4 && t.IsFloat()
 22110  	// result: (FMOVSstore ptr val mem)
 22111  	for {
 22112  		t := auxToType(v.Aux)
 22113  		ptr := v_0
 22114  		val := v_1
 22115  		mem := v_2
 22116  		if !(t.Size() == 4 && t.IsFloat()) {
 22117  			break
 22118  		}
 22119  		v.reset(OpARM64FMOVSstore)
 22120  		v.AddArg3(ptr, val, mem)
 22121  		return true
 22122  	}
 22123  	// match: (Store {t} ptr val mem)
 22124  	// cond: t.Size() == 8 && t.IsFloat()
 22125  	// result: (FMOVDstore ptr val mem)
 22126  	for {
 22127  		t := auxToType(v.Aux)
 22128  		ptr := v_0
 22129  		val := v_1
 22130  		mem := v_2
 22131  		if !(t.Size() == 8 && t.IsFloat()) {
 22132  			break
 22133  		}
 22134  		v.reset(OpARM64FMOVDstore)
 22135  		v.AddArg3(ptr, val, mem)
 22136  		return true
 22137  	}
 22138  	return false
 22139  }
 22140  func rewriteValueARM64_OpZero(v *Value) bool {
 22141  	v_1 := v.Args[1]
 22142  	v_0 := v.Args[0]
 22143  	b := v.Block
 22144  	typ := &b.Func.Config.Types
 22145  	// match: (Zero [0] _ mem)
 22146  	// result: mem
 22147  	for {
 22148  		if auxIntToInt64(v.AuxInt) != 0 {
 22149  			break
 22150  		}
 22151  		mem := v_1
 22152  		v.copyOf(mem)
 22153  		return true
 22154  	}
 22155  	// match: (Zero [1] ptr mem)
 22156  	// result: (MOVBstore ptr (MOVDconst [0]) mem)
 22157  	for {
 22158  		if auxIntToInt64(v.AuxInt) != 1 {
 22159  			break
 22160  		}
 22161  		ptr := v_0
 22162  		mem := v_1
 22163  		v.reset(OpARM64MOVBstore)
 22164  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22165  		v0.AuxInt = int64ToAuxInt(0)
 22166  		v.AddArg3(ptr, v0, mem)
 22167  		return true
 22168  	}
 22169  	// match: (Zero [2] ptr mem)
 22170  	// result: (MOVHstore ptr (MOVDconst [0]) mem)
 22171  	for {
 22172  		if auxIntToInt64(v.AuxInt) != 2 {
 22173  			break
 22174  		}
 22175  		ptr := v_0
 22176  		mem := v_1
 22177  		v.reset(OpARM64MOVHstore)
 22178  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22179  		v0.AuxInt = int64ToAuxInt(0)
 22180  		v.AddArg3(ptr, v0, mem)
 22181  		return true
 22182  	}
 22183  	// match: (Zero [4] ptr mem)
 22184  	// result: (MOVWstore ptr (MOVDconst [0]) mem)
 22185  	for {
 22186  		if auxIntToInt64(v.AuxInt) != 4 {
 22187  			break
 22188  		}
 22189  		ptr := v_0
 22190  		mem := v_1
 22191  		v.reset(OpARM64MOVWstore)
 22192  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22193  		v0.AuxInt = int64ToAuxInt(0)
 22194  		v.AddArg3(ptr, v0, mem)
 22195  		return true
 22196  	}
 22197  	// match: (Zero [3] ptr mem)
 22198  	// result: (MOVBstore [2] ptr (MOVDconst [0]) (MOVHstore ptr (MOVDconst [0]) mem))
 22199  	for {
 22200  		if auxIntToInt64(v.AuxInt) != 3 {
 22201  			break
 22202  		}
 22203  		ptr := v_0
 22204  		mem := v_1
 22205  		v.reset(OpARM64MOVBstore)
 22206  		v.AuxInt = int32ToAuxInt(2)
 22207  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22208  		v0.AuxInt = int64ToAuxInt(0)
 22209  		v1 := b.NewValue0(v.Pos, OpARM64MOVHstore, types.TypeMem)
 22210  		v1.AddArg3(ptr, v0, mem)
 22211  		v.AddArg3(ptr, v0, v1)
 22212  		return true
 22213  	}
 22214  	// match: (Zero [5] ptr mem)
 22215  	// result: (MOVBstore [4] ptr (MOVDconst [0]) (MOVWstore ptr (MOVDconst [0]) mem))
 22216  	for {
 22217  		if auxIntToInt64(v.AuxInt) != 5 {
 22218  			break
 22219  		}
 22220  		ptr := v_0
 22221  		mem := v_1
 22222  		v.reset(OpARM64MOVBstore)
 22223  		v.AuxInt = int32ToAuxInt(4)
 22224  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22225  		v0.AuxInt = int64ToAuxInt(0)
 22226  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 22227  		v1.AddArg3(ptr, v0, mem)
 22228  		v.AddArg3(ptr, v0, v1)
 22229  		return true
 22230  	}
 22231  	// match: (Zero [6] ptr mem)
 22232  	// result: (MOVHstore [4] ptr (MOVDconst [0]) (MOVWstore ptr (MOVDconst [0]) mem))
 22233  	for {
 22234  		if auxIntToInt64(v.AuxInt) != 6 {
 22235  			break
 22236  		}
 22237  		ptr := v_0
 22238  		mem := v_1
 22239  		v.reset(OpARM64MOVHstore)
 22240  		v.AuxInt = int32ToAuxInt(4)
 22241  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22242  		v0.AuxInt = int64ToAuxInt(0)
 22243  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 22244  		v1.AddArg3(ptr, v0, mem)
 22245  		v.AddArg3(ptr, v0, v1)
 22246  		return true
 22247  	}
 22248  	// match: (Zero [7] ptr mem)
 22249  	// result: (MOVWstore [3] ptr (MOVDconst [0]) (MOVWstore ptr (MOVDconst [0]) mem))
 22250  	for {
 22251  		if auxIntToInt64(v.AuxInt) != 7 {
 22252  			break
 22253  		}
 22254  		ptr := v_0
 22255  		mem := v_1
 22256  		v.reset(OpARM64MOVWstore)
 22257  		v.AuxInt = int32ToAuxInt(3)
 22258  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22259  		v0.AuxInt = int64ToAuxInt(0)
 22260  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 22261  		v1.AddArg3(ptr, v0, mem)
 22262  		v.AddArg3(ptr, v0, v1)
 22263  		return true
 22264  	}
 22265  	// match: (Zero [8] ptr mem)
 22266  	// result: (MOVDstore ptr (MOVDconst [0]) mem)
 22267  	for {
 22268  		if auxIntToInt64(v.AuxInt) != 8 {
 22269  			break
 22270  		}
 22271  		ptr := v_0
 22272  		mem := v_1
 22273  		v.reset(OpARM64MOVDstore)
 22274  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22275  		v0.AuxInt = int64ToAuxInt(0)
 22276  		v.AddArg3(ptr, v0, mem)
 22277  		return true
 22278  	}
 22279  	// match: (Zero [9] ptr mem)
 22280  	// result: (MOVBstore [8] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 22281  	for {
 22282  		if auxIntToInt64(v.AuxInt) != 9 {
 22283  			break
 22284  		}
 22285  		ptr := v_0
 22286  		mem := v_1
 22287  		v.reset(OpARM64MOVBstore)
 22288  		v.AuxInt = int32ToAuxInt(8)
 22289  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22290  		v0.AuxInt = int64ToAuxInt(0)
 22291  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 22292  		v1.AddArg3(ptr, v0, mem)
 22293  		v.AddArg3(ptr, v0, v1)
 22294  		return true
 22295  	}
 22296  	// match: (Zero [10] ptr mem)
 22297  	// result: (MOVHstore [8] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 22298  	for {
 22299  		if auxIntToInt64(v.AuxInt) != 10 {
 22300  			break
 22301  		}
 22302  		ptr := v_0
 22303  		mem := v_1
 22304  		v.reset(OpARM64MOVHstore)
 22305  		v.AuxInt = int32ToAuxInt(8)
 22306  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22307  		v0.AuxInt = int64ToAuxInt(0)
 22308  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 22309  		v1.AddArg3(ptr, v0, mem)
 22310  		v.AddArg3(ptr, v0, v1)
 22311  		return true
 22312  	}
 22313  	// match: (Zero [11] ptr mem)
 22314  	// result: (MOVDstore [3] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 22315  	for {
 22316  		if auxIntToInt64(v.AuxInt) != 11 {
 22317  			break
 22318  		}
 22319  		ptr := v_0
 22320  		mem := v_1
 22321  		v.reset(OpARM64MOVDstore)
 22322  		v.AuxInt = int32ToAuxInt(3)
 22323  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22324  		v0.AuxInt = int64ToAuxInt(0)
 22325  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 22326  		v1.AddArg3(ptr, v0, mem)
 22327  		v.AddArg3(ptr, v0, v1)
 22328  		return true
 22329  	}
 22330  	// match: (Zero [12] ptr mem)
 22331  	// result: (MOVWstore [8] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 22332  	for {
 22333  		if auxIntToInt64(v.AuxInt) != 12 {
 22334  			break
 22335  		}
 22336  		ptr := v_0
 22337  		mem := v_1
 22338  		v.reset(OpARM64MOVWstore)
 22339  		v.AuxInt = int32ToAuxInt(8)
 22340  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22341  		v0.AuxInt = int64ToAuxInt(0)
 22342  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 22343  		v1.AddArg3(ptr, v0, mem)
 22344  		v.AddArg3(ptr, v0, v1)
 22345  		return true
 22346  	}
 22347  	// match: (Zero [13] ptr mem)
 22348  	// result: (MOVDstore [5] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 22349  	for {
 22350  		if auxIntToInt64(v.AuxInt) != 13 {
 22351  			break
 22352  		}
 22353  		ptr := v_0
 22354  		mem := v_1
 22355  		v.reset(OpARM64MOVDstore)
 22356  		v.AuxInt = int32ToAuxInt(5)
 22357  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22358  		v0.AuxInt = int64ToAuxInt(0)
 22359  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 22360  		v1.AddArg3(ptr, v0, mem)
 22361  		v.AddArg3(ptr, v0, v1)
 22362  		return true
 22363  	}
 22364  	// match: (Zero [14] ptr mem)
 22365  	// result: (MOVDstore [6] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 22366  	for {
 22367  		if auxIntToInt64(v.AuxInt) != 14 {
 22368  			break
 22369  		}
 22370  		ptr := v_0
 22371  		mem := v_1
 22372  		v.reset(OpARM64MOVDstore)
 22373  		v.AuxInt = int32ToAuxInt(6)
 22374  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22375  		v0.AuxInt = int64ToAuxInt(0)
 22376  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 22377  		v1.AddArg3(ptr, v0, mem)
 22378  		v.AddArg3(ptr, v0, v1)
 22379  		return true
 22380  	}
 22381  	// match: (Zero [15] ptr mem)
 22382  	// result: (MOVDstore [7] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 22383  	for {
 22384  		if auxIntToInt64(v.AuxInt) != 15 {
 22385  			break
 22386  		}
 22387  		ptr := v_0
 22388  		mem := v_1
 22389  		v.reset(OpARM64MOVDstore)
 22390  		v.AuxInt = int32ToAuxInt(7)
 22391  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22392  		v0.AuxInt = int64ToAuxInt(0)
 22393  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 22394  		v1.AddArg3(ptr, v0, mem)
 22395  		v.AddArg3(ptr, v0, v1)
 22396  		return true
 22397  	}
 22398  	// match: (Zero [16] ptr mem)
 22399  	// result: (STP [0] ptr (MOVDconst [0]) (MOVDconst [0]) mem)
 22400  	for {
 22401  		if auxIntToInt64(v.AuxInt) != 16 {
 22402  			break
 22403  		}
 22404  		ptr := v_0
 22405  		mem := v_1
 22406  		v.reset(OpARM64STP)
 22407  		v.AuxInt = int32ToAuxInt(0)
 22408  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22409  		v0.AuxInt = int64ToAuxInt(0)
 22410  		v.AddArg4(ptr, v0, v0, mem)
 22411  		return true
 22412  	}
 22413  	// match: (Zero [32] ptr mem)
 22414  	// result: (STP [16] ptr (MOVDconst [0]) (MOVDconst [0]) (STP [0] ptr (MOVDconst [0]) (MOVDconst [0]) mem))
 22415  	for {
 22416  		if auxIntToInt64(v.AuxInt) != 32 {
 22417  			break
 22418  		}
 22419  		ptr := v_0
 22420  		mem := v_1
 22421  		v.reset(OpARM64STP)
 22422  		v.AuxInt = int32ToAuxInt(16)
 22423  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22424  		v0.AuxInt = int64ToAuxInt(0)
 22425  		v1 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 22426  		v1.AuxInt = int32ToAuxInt(0)
 22427  		v1.AddArg4(ptr, v0, v0, mem)
 22428  		v.AddArg4(ptr, v0, v0, v1)
 22429  		return true
 22430  	}
 22431  	// match: (Zero [48] ptr mem)
 22432  	// result: (STP [32] ptr (MOVDconst [0]) (MOVDconst [0]) (STP [16] ptr (MOVDconst [0]) (MOVDconst [0]) (STP [0] ptr (MOVDconst [0]) (MOVDconst [0]) mem)))
 22433  	for {
 22434  		if auxIntToInt64(v.AuxInt) != 48 {
 22435  			break
 22436  		}
 22437  		ptr := v_0
 22438  		mem := v_1
 22439  		v.reset(OpARM64STP)
 22440  		v.AuxInt = int32ToAuxInt(32)
 22441  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22442  		v0.AuxInt = int64ToAuxInt(0)
 22443  		v1 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 22444  		v1.AuxInt = int32ToAuxInt(16)
 22445  		v2 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 22446  		v2.AuxInt = int32ToAuxInt(0)
 22447  		v2.AddArg4(ptr, v0, v0, mem)
 22448  		v1.AddArg4(ptr, v0, v0, v2)
 22449  		v.AddArg4(ptr, v0, v0, v1)
 22450  		return true
 22451  	}
 22452  	// match: (Zero [64] ptr mem)
 22453  	// result: (STP [48] ptr (MOVDconst [0]) (MOVDconst [0]) (STP [32] ptr (MOVDconst [0]) (MOVDconst [0]) (STP [16] ptr (MOVDconst [0]) (MOVDconst [0]) (STP [0] ptr (MOVDconst [0]) (MOVDconst [0]) mem))))
 22454  	for {
 22455  		if auxIntToInt64(v.AuxInt) != 64 {
 22456  			break
 22457  		}
 22458  		ptr := v_0
 22459  		mem := v_1
 22460  		v.reset(OpARM64STP)
 22461  		v.AuxInt = int32ToAuxInt(48)
 22462  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22463  		v0.AuxInt = int64ToAuxInt(0)
 22464  		v1 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 22465  		v1.AuxInt = int32ToAuxInt(32)
 22466  		v2 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 22467  		v2.AuxInt = int32ToAuxInt(16)
 22468  		v3 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 22469  		v3.AuxInt = int32ToAuxInt(0)
 22470  		v3.AddArg4(ptr, v0, v0, mem)
 22471  		v2.AddArg4(ptr, v0, v0, v3)
 22472  		v1.AddArg4(ptr, v0, v0, v2)
 22473  		v.AddArg4(ptr, v0, v0, v1)
 22474  		return true
 22475  	}
 22476  	// match: (Zero [s] ptr mem)
 22477  	// cond: s%16 != 0 && s%16 <= 8 && s > 16
 22478  	// result: (Zero [8] (OffPtr <ptr.Type> ptr [s-8]) (Zero [s-s%16] ptr mem))
 22479  	for {
 22480  		s := auxIntToInt64(v.AuxInt)
 22481  		ptr := v_0
 22482  		mem := v_1
 22483  		if !(s%16 != 0 && s%16 <= 8 && s > 16) {
 22484  			break
 22485  		}
 22486  		v.reset(OpZero)
 22487  		v.AuxInt = int64ToAuxInt(8)
 22488  		v0 := b.NewValue0(v.Pos, OpOffPtr, ptr.Type)
 22489  		v0.AuxInt = int64ToAuxInt(s - 8)
 22490  		v0.AddArg(ptr)
 22491  		v1 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
 22492  		v1.AuxInt = int64ToAuxInt(s - s%16)
 22493  		v1.AddArg2(ptr, mem)
 22494  		v.AddArg2(v0, v1)
 22495  		return true
 22496  	}
 22497  	// match: (Zero [s] ptr mem)
 22498  	// cond: s%16 != 0 && s%16 > 8 && s > 16
 22499  	// result: (Zero [16] (OffPtr <ptr.Type> ptr [s-16]) (Zero [s-s%16] ptr mem))
 22500  	for {
 22501  		s := auxIntToInt64(v.AuxInt)
 22502  		ptr := v_0
 22503  		mem := v_1
 22504  		if !(s%16 != 0 && s%16 > 8 && s > 16) {
 22505  			break
 22506  		}
 22507  		v.reset(OpZero)
 22508  		v.AuxInt = int64ToAuxInt(16)
 22509  		v0 := b.NewValue0(v.Pos, OpOffPtr, ptr.Type)
 22510  		v0.AuxInt = int64ToAuxInt(s - 16)
 22511  		v0.AddArg(ptr)
 22512  		v1 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
 22513  		v1.AuxInt = int64ToAuxInt(s - s%16)
 22514  		v1.AddArg2(ptr, mem)
 22515  		v.AddArg2(v0, v1)
 22516  		return true
 22517  	}
 22518  	// match: (Zero [s] ptr mem)
 22519  	// cond: s%16 == 0 && s > 64 && s <= 16*64
 22520  	// result: (DUFFZERO [4 * (64 - s/16)] ptr mem)
 22521  	for {
 22522  		s := auxIntToInt64(v.AuxInt)
 22523  		ptr := v_0
 22524  		mem := v_1
 22525  		if !(s%16 == 0 && s > 64 && s <= 16*64) {
 22526  			break
 22527  		}
 22528  		v.reset(OpARM64DUFFZERO)
 22529  		v.AuxInt = int64ToAuxInt(4 * (64 - s/16))
 22530  		v.AddArg2(ptr, mem)
 22531  		return true
 22532  	}
 22533  	// match: (Zero [s] ptr mem)
 22534  	// cond: s%16 == 0 && s > 16*64
 22535  	// result: (LoweredZero ptr (ADDconst <ptr.Type> [s-16] ptr) mem)
 22536  	for {
 22537  		s := auxIntToInt64(v.AuxInt)
 22538  		ptr := v_0
 22539  		mem := v_1
 22540  		if !(s%16 == 0 && s > 16*64) {
 22541  			break
 22542  		}
 22543  		v.reset(OpARM64LoweredZero)
 22544  		v0 := b.NewValue0(v.Pos, OpARM64ADDconst, ptr.Type)
 22545  		v0.AuxInt = int64ToAuxInt(s - 16)
 22546  		v0.AddArg(ptr)
 22547  		v.AddArg3(ptr, v0, mem)
 22548  		return true
 22549  	}
 22550  	return false
 22551  }
 22552  func rewriteBlockARM64(b *Block) bool {
 22553  	typ := &b.Func.Config.Types
 22554  	switch b.Kind {
 22555  	case BlockARM64EQ:
 22556  		// match: (EQ (CMPconst [0] z:(AND x y)) yes no)
 22557  		// cond: z.Uses == 1
 22558  		// result: (EQ (TST x y) yes no)
 22559  		for b.Controls[0].Op == OpARM64CMPconst {
 22560  			v_0 := b.Controls[0]
 22561  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22562  				break
 22563  			}
 22564  			z := v_0.Args[0]
 22565  			if z.Op != OpARM64AND {
 22566  				break
 22567  			}
 22568  			_ = z.Args[1]
 22569  			z_0 := z.Args[0]
 22570  			z_1 := z.Args[1]
 22571  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 22572  				x := z_0
 22573  				y := z_1
 22574  				if !(z.Uses == 1) {
 22575  					continue
 22576  				}
 22577  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 22578  				v0.AddArg2(x, y)
 22579  				b.resetWithControl(BlockARM64EQ, v0)
 22580  				return true
 22581  			}
 22582  			break
 22583  		}
 22584  		// match: (EQ (CMPconst [0] x:(ANDconst [c] y)) yes no)
 22585  		// cond: x.Uses == 1
 22586  		// result: (EQ (TSTconst [c] y) yes no)
 22587  		for b.Controls[0].Op == OpARM64CMPconst {
 22588  			v_0 := b.Controls[0]
 22589  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22590  				break
 22591  			}
 22592  			x := v_0.Args[0]
 22593  			if x.Op != OpARM64ANDconst {
 22594  				break
 22595  			}
 22596  			c := auxIntToInt64(x.AuxInt)
 22597  			y := x.Args[0]
 22598  			if !(x.Uses == 1) {
 22599  				break
 22600  			}
 22601  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 22602  			v0.AuxInt = int64ToAuxInt(c)
 22603  			v0.AddArg(y)
 22604  			b.resetWithControl(BlockARM64EQ, v0)
 22605  			return true
 22606  		}
 22607  		// match: (EQ (CMPWconst [0] z:(AND x y)) yes no)
 22608  		// cond: z.Uses == 1
 22609  		// result: (EQ (TSTW x y) yes no)
 22610  		for b.Controls[0].Op == OpARM64CMPWconst {
 22611  			v_0 := b.Controls[0]
 22612  			if auxIntToInt32(v_0.AuxInt) != 0 {
 22613  				break
 22614  			}
 22615  			z := v_0.Args[0]
 22616  			if z.Op != OpARM64AND {
 22617  				break
 22618  			}
 22619  			_ = z.Args[1]
 22620  			z_0 := z.Args[0]
 22621  			z_1 := z.Args[1]
 22622  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 22623  				x := z_0
 22624  				y := z_1
 22625  				if !(z.Uses == 1) {
 22626  					continue
 22627  				}
 22628  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 22629  				v0.AddArg2(x, y)
 22630  				b.resetWithControl(BlockARM64EQ, v0)
 22631  				return true
 22632  			}
 22633  			break
 22634  		}
 22635  		// match: (EQ (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 22636  		// cond: x.Uses == 1
 22637  		// result: (EQ (TSTWconst [int32(c)] y) yes no)
 22638  		for b.Controls[0].Op == OpARM64CMPWconst {
 22639  			v_0 := b.Controls[0]
 22640  			if auxIntToInt32(v_0.AuxInt) != 0 {
 22641  				break
 22642  			}
 22643  			x := v_0.Args[0]
 22644  			if x.Op != OpARM64ANDconst {
 22645  				break
 22646  			}
 22647  			c := auxIntToInt64(x.AuxInt)
 22648  			y := x.Args[0]
 22649  			if !(x.Uses == 1) {
 22650  				break
 22651  			}
 22652  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 22653  			v0.AuxInt = int32ToAuxInt(int32(c))
 22654  			v0.AddArg(y)
 22655  			b.resetWithControl(BlockARM64EQ, v0)
 22656  			return true
 22657  		}
 22658  		// match: (EQ (CMPconst [0] x:(ADDconst [c] y)) yes no)
 22659  		// cond: x.Uses == 1
 22660  		// result: (EQ (CMNconst [c] y) yes no)
 22661  		for b.Controls[0].Op == OpARM64CMPconst {
 22662  			v_0 := b.Controls[0]
 22663  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22664  				break
 22665  			}
 22666  			x := v_0.Args[0]
 22667  			if x.Op != OpARM64ADDconst {
 22668  				break
 22669  			}
 22670  			c := auxIntToInt64(x.AuxInt)
 22671  			y := x.Args[0]
 22672  			if !(x.Uses == 1) {
 22673  				break
 22674  			}
 22675  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 22676  			v0.AuxInt = int64ToAuxInt(c)
 22677  			v0.AddArg(y)
 22678  			b.resetWithControl(BlockARM64EQ, v0)
 22679  			return true
 22680  		}
 22681  		// match: (EQ (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 22682  		// cond: x.Uses == 1
 22683  		// result: (EQ (CMNWconst [int32(c)] y) yes no)
 22684  		for b.Controls[0].Op == OpARM64CMPWconst {
 22685  			v_0 := b.Controls[0]
 22686  			if auxIntToInt32(v_0.AuxInt) != 0 {
 22687  				break
 22688  			}
 22689  			x := v_0.Args[0]
 22690  			if x.Op != OpARM64ADDconst {
 22691  				break
 22692  			}
 22693  			c := auxIntToInt64(x.AuxInt)
 22694  			y := x.Args[0]
 22695  			if !(x.Uses == 1) {
 22696  				break
 22697  			}
 22698  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 22699  			v0.AuxInt = int32ToAuxInt(int32(c))
 22700  			v0.AddArg(y)
 22701  			b.resetWithControl(BlockARM64EQ, v0)
 22702  			return true
 22703  		}
 22704  		// match: (EQ (CMPconst [0] z:(ADD x y)) yes no)
 22705  		// cond: z.Uses == 1
 22706  		// result: (EQ (CMN x y) yes no)
 22707  		for b.Controls[0].Op == OpARM64CMPconst {
 22708  			v_0 := b.Controls[0]
 22709  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22710  				break
 22711  			}
 22712  			z := v_0.Args[0]
 22713  			if z.Op != OpARM64ADD {
 22714  				break
 22715  			}
 22716  			_ = z.Args[1]
 22717  			z_0 := z.Args[0]
 22718  			z_1 := z.Args[1]
 22719  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 22720  				x := z_0
 22721  				y := z_1
 22722  				if !(z.Uses == 1) {
 22723  					continue
 22724  				}
 22725  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 22726  				v0.AddArg2(x, y)
 22727  				b.resetWithControl(BlockARM64EQ, v0)
 22728  				return true
 22729  			}
 22730  			break
 22731  		}
 22732  		// match: (EQ (CMPWconst [0] z:(ADD x y)) yes no)
 22733  		// cond: z.Uses == 1
 22734  		// result: (EQ (CMNW x y) yes no)
 22735  		for b.Controls[0].Op == OpARM64CMPWconst {
 22736  			v_0 := b.Controls[0]
 22737  			if auxIntToInt32(v_0.AuxInt) != 0 {
 22738  				break
 22739  			}
 22740  			z := v_0.Args[0]
 22741  			if z.Op != OpARM64ADD {
 22742  				break
 22743  			}
 22744  			_ = z.Args[1]
 22745  			z_0 := z.Args[0]
 22746  			z_1 := z.Args[1]
 22747  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 22748  				x := z_0
 22749  				y := z_1
 22750  				if !(z.Uses == 1) {
 22751  					continue
 22752  				}
 22753  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 22754  				v0.AddArg2(x, y)
 22755  				b.resetWithControl(BlockARM64EQ, v0)
 22756  				return true
 22757  			}
 22758  			break
 22759  		}
 22760  		// match: (EQ (CMP x z:(NEG y)) yes no)
 22761  		// cond: z.Uses == 1
 22762  		// result: (EQ (CMN x y) yes no)
 22763  		for b.Controls[0].Op == OpARM64CMP {
 22764  			v_0 := b.Controls[0]
 22765  			_ = v_0.Args[1]
 22766  			x := v_0.Args[0]
 22767  			z := v_0.Args[1]
 22768  			if z.Op != OpARM64NEG {
 22769  				break
 22770  			}
 22771  			y := z.Args[0]
 22772  			if !(z.Uses == 1) {
 22773  				break
 22774  			}
 22775  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 22776  			v0.AddArg2(x, y)
 22777  			b.resetWithControl(BlockARM64EQ, v0)
 22778  			return true
 22779  		}
 22780  		// match: (EQ (CMPW x z:(NEG y)) yes no)
 22781  		// cond: z.Uses == 1
 22782  		// result: (EQ (CMNW x y) yes no)
 22783  		for b.Controls[0].Op == OpARM64CMPW {
 22784  			v_0 := b.Controls[0]
 22785  			_ = v_0.Args[1]
 22786  			x := v_0.Args[0]
 22787  			z := v_0.Args[1]
 22788  			if z.Op != OpARM64NEG {
 22789  				break
 22790  			}
 22791  			y := z.Args[0]
 22792  			if !(z.Uses == 1) {
 22793  				break
 22794  			}
 22795  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 22796  			v0.AddArg2(x, y)
 22797  			b.resetWithControl(BlockARM64EQ, v0)
 22798  			return true
 22799  		}
 22800  		// match: (EQ (CMPconst [0] x) yes no)
 22801  		// result: (Z x yes no)
 22802  		for b.Controls[0].Op == OpARM64CMPconst {
 22803  			v_0 := b.Controls[0]
 22804  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22805  				break
 22806  			}
 22807  			x := v_0.Args[0]
 22808  			b.resetWithControl(BlockARM64Z, x)
 22809  			return true
 22810  		}
 22811  		// match: (EQ (CMPWconst [0] x) yes no)
 22812  		// result: (ZW x yes no)
 22813  		for b.Controls[0].Op == OpARM64CMPWconst {
 22814  			v_0 := b.Controls[0]
 22815  			if auxIntToInt32(v_0.AuxInt) != 0 {
 22816  				break
 22817  			}
 22818  			x := v_0.Args[0]
 22819  			b.resetWithControl(BlockARM64ZW, x)
 22820  			return true
 22821  		}
 22822  		// match: (EQ (CMPconst [0] z:(MADD a x y)) yes no)
 22823  		// cond: z.Uses==1
 22824  		// result: (EQ (CMN a (MUL <x.Type> x y)) yes no)
 22825  		for b.Controls[0].Op == OpARM64CMPconst {
 22826  			v_0 := b.Controls[0]
 22827  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22828  				break
 22829  			}
 22830  			z := v_0.Args[0]
 22831  			if z.Op != OpARM64MADD {
 22832  				break
 22833  			}
 22834  			y := z.Args[2]
 22835  			a := z.Args[0]
 22836  			x := z.Args[1]
 22837  			if !(z.Uses == 1) {
 22838  				break
 22839  			}
 22840  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 22841  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 22842  			v1.AddArg2(x, y)
 22843  			v0.AddArg2(a, v1)
 22844  			b.resetWithControl(BlockARM64EQ, v0)
 22845  			return true
 22846  		}
 22847  		// match: (EQ (CMPconst [0] z:(MSUB a x y)) yes no)
 22848  		// cond: z.Uses==1
 22849  		// result: (EQ (CMP a (MUL <x.Type> x y)) yes no)
 22850  		for b.Controls[0].Op == OpARM64CMPconst {
 22851  			v_0 := b.Controls[0]
 22852  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22853  				break
 22854  			}
 22855  			z := v_0.Args[0]
 22856  			if z.Op != OpARM64MSUB {
 22857  				break
 22858  			}
 22859  			y := z.Args[2]
 22860  			a := z.Args[0]
 22861  			x := z.Args[1]
 22862  			if !(z.Uses == 1) {
 22863  				break
 22864  			}
 22865  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 22866  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 22867  			v1.AddArg2(x, y)
 22868  			v0.AddArg2(a, v1)
 22869  			b.resetWithControl(BlockARM64EQ, v0)
 22870  			return true
 22871  		}
 22872  		// match: (EQ (CMPWconst [0] z:(MADDW a x y)) yes no)
 22873  		// cond: z.Uses==1
 22874  		// result: (EQ (CMNW a (MULW <x.Type> x y)) yes no)
 22875  		for b.Controls[0].Op == OpARM64CMPWconst {
 22876  			v_0 := b.Controls[0]
 22877  			if auxIntToInt32(v_0.AuxInt) != 0 {
 22878  				break
 22879  			}
 22880  			z := v_0.Args[0]
 22881  			if z.Op != OpARM64MADDW {
 22882  				break
 22883  			}
 22884  			y := z.Args[2]
 22885  			a := z.Args[0]
 22886  			x := z.Args[1]
 22887  			if !(z.Uses == 1) {
 22888  				break
 22889  			}
 22890  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 22891  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 22892  			v1.AddArg2(x, y)
 22893  			v0.AddArg2(a, v1)
 22894  			b.resetWithControl(BlockARM64EQ, v0)
 22895  			return true
 22896  		}
 22897  		// match: (EQ (CMPWconst [0] z:(MSUBW a x y)) yes no)
 22898  		// cond: z.Uses==1
 22899  		// result: (EQ (CMPW a (MULW <x.Type> x y)) yes no)
 22900  		for b.Controls[0].Op == OpARM64CMPWconst {
 22901  			v_0 := b.Controls[0]
 22902  			if auxIntToInt32(v_0.AuxInt) != 0 {
 22903  				break
 22904  			}
 22905  			z := v_0.Args[0]
 22906  			if z.Op != OpARM64MSUBW {
 22907  				break
 22908  			}
 22909  			y := z.Args[2]
 22910  			a := z.Args[0]
 22911  			x := z.Args[1]
 22912  			if !(z.Uses == 1) {
 22913  				break
 22914  			}
 22915  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 22916  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 22917  			v1.AddArg2(x, y)
 22918  			v0.AddArg2(a, v1)
 22919  			b.resetWithControl(BlockARM64EQ, v0)
 22920  			return true
 22921  		}
 22922  		// match: (EQ (TSTconst [c] x) yes no)
 22923  		// cond: oneBit(c)
 22924  		// result: (TBZ [int64(ntz64(c))] x yes no)
 22925  		for b.Controls[0].Op == OpARM64TSTconst {
 22926  			v_0 := b.Controls[0]
 22927  			c := auxIntToInt64(v_0.AuxInt)
 22928  			x := v_0.Args[0]
 22929  			if !(oneBit(c)) {
 22930  				break
 22931  			}
 22932  			b.resetWithControl(BlockARM64TBZ, x)
 22933  			b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
 22934  			return true
 22935  		}
 22936  		// match: (EQ (TSTWconst [c] x) yes no)
 22937  		// cond: oneBit(int64(uint32(c)))
 22938  		// result: (TBZ [int64(ntz64(int64(uint32(c))))] x yes no)
 22939  		for b.Controls[0].Op == OpARM64TSTWconst {
 22940  			v_0 := b.Controls[0]
 22941  			c := auxIntToInt32(v_0.AuxInt)
 22942  			x := v_0.Args[0]
 22943  			if !(oneBit(int64(uint32(c)))) {
 22944  				break
 22945  			}
 22946  			b.resetWithControl(BlockARM64TBZ, x)
 22947  			b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
 22948  			return true
 22949  		}
 22950  		// match: (EQ (FlagConstant [fc]) yes no)
 22951  		// cond: fc.eq()
 22952  		// result: (First yes no)
 22953  		for b.Controls[0].Op == OpARM64FlagConstant {
 22954  			v_0 := b.Controls[0]
 22955  			fc := auxIntToFlagConstant(v_0.AuxInt)
 22956  			if !(fc.eq()) {
 22957  				break
 22958  			}
 22959  			b.Reset(BlockFirst)
 22960  			return true
 22961  		}
 22962  		// match: (EQ (FlagConstant [fc]) yes no)
 22963  		// cond: !fc.eq()
 22964  		// result: (First no yes)
 22965  		for b.Controls[0].Op == OpARM64FlagConstant {
 22966  			v_0 := b.Controls[0]
 22967  			fc := auxIntToFlagConstant(v_0.AuxInt)
 22968  			if !(!fc.eq()) {
 22969  				break
 22970  			}
 22971  			b.Reset(BlockFirst)
 22972  			b.swapSuccessors()
 22973  			return true
 22974  		}
 22975  		// match: (EQ (InvertFlags cmp) yes no)
 22976  		// result: (EQ cmp yes no)
 22977  		for b.Controls[0].Op == OpARM64InvertFlags {
 22978  			v_0 := b.Controls[0]
 22979  			cmp := v_0.Args[0]
 22980  			b.resetWithControl(BlockARM64EQ, cmp)
 22981  			return true
 22982  		}
 22983  	case BlockARM64FGE:
 22984  		// match: (FGE (InvertFlags cmp) yes no)
 22985  		// result: (FLE cmp yes no)
 22986  		for b.Controls[0].Op == OpARM64InvertFlags {
 22987  			v_0 := b.Controls[0]
 22988  			cmp := v_0.Args[0]
 22989  			b.resetWithControl(BlockARM64FLE, cmp)
 22990  			return true
 22991  		}
 22992  	case BlockARM64FGT:
 22993  		// match: (FGT (InvertFlags cmp) yes no)
 22994  		// result: (FLT cmp yes no)
 22995  		for b.Controls[0].Op == OpARM64InvertFlags {
 22996  			v_0 := b.Controls[0]
 22997  			cmp := v_0.Args[0]
 22998  			b.resetWithControl(BlockARM64FLT, cmp)
 22999  			return true
 23000  		}
 23001  	case BlockARM64FLE:
 23002  		// match: (FLE (InvertFlags cmp) yes no)
 23003  		// result: (FGE cmp yes no)
 23004  		for b.Controls[0].Op == OpARM64InvertFlags {
 23005  			v_0 := b.Controls[0]
 23006  			cmp := v_0.Args[0]
 23007  			b.resetWithControl(BlockARM64FGE, cmp)
 23008  			return true
 23009  		}
 23010  	case BlockARM64FLT:
 23011  		// match: (FLT (InvertFlags cmp) yes no)
 23012  		// result: (FGT cmp yes no)
 23013  		for b.Controls[0].Op == OpARM64InvertFlags {
 23014  			v_0 := b.Controls[0]
 23015  			cmp := v_0.Args[0]
 23016  			b.resetWithControl(BlockARM64FGT, cmp)
 23017  			return true
 23018  		}
 23019  	case BlockARM64GE:
 23020  		// match: (GE (CMPconst [0] z:(AND x y)) yes no)
 23021  		// cond: z.Uses == 1
 23022  		// result: (GE (TST x y) yes no)
 23023  		for b.Controls[0].Op == OpARM64CMPconst {
 23024  			v_0 := b.Controls[0]
 23025  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23026  				break
 23027  			}
 23028  			z := v_0.Args[0]
 23029  			if z.Op != OpARM64AND {
 23030  				break
 23031  			}
 23032  			_ = z.Args[1]
 23033  			z_0 := z.Args[0]
 23034  			z_1 := z.Args[1]
 23035  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23036  				x := z_0
 23037  				y := z_1
 23038  				if !(z.Uses == 1) {
 23039  					continue
 23040  				}
 23041  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 23042  				v0.AddArg2(x, y)
 23043  				b.resetWithControl(BlockARM64GE, v0)
 23044  				return true
 23045  			}
 23046  			break
 23047  		}
 23048  		// match: (GE (CMPconst [0] x:(ANDconst [c] y)) yes no)
 23049  		// cond: x.Uses == 1
 23050  		// result: (GE (TSTconst [c] y) yes no)
 23051  		for b.Controls[0].Op == OpARM64CMPconst {
 23052  			v_0 := b.Controls[0]
 23053  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23054  				break
 23055  			}
 23056  			x := v_0.Args[0]
 23057  			if x.Op != OpARM64ANDconst {
 23058  				break
 23059  			}
 23060  			c := auxIntToInt64(x.AuxInt)
 23061  			y := x.Args[0]
 23062  			if !(x.Uses == 1) {
 23063  				break
 23064  			}
 23065  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 23066  			v0.AuxInt = int64ToAuxInt(c)
 23067  			v0.AddArg(y)
 23068  			b.resetWithControl(BlockARM64GE, v0)
 23069  			return true
 23070  		}
 23071  		// match: (GE (CMPWconst [0] z:(AND x y)) yes no)
 23072  		// cond: z.Uses == 1
 23073  		// result: (GE (TSTW x y) yes no)
 23074  		for b.Controls[0].Op == OpARM64CMPWconst {
 23075  			v_0 := b.Controls[0]
 23076  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23077  				break
 23078  			}
 23079  			z := v_0.Args[0]
 23080  			if z.Op != OpARM64AND {
 23081  				break
 23082  			}
 23083  			_ = z.Args[1]
 23084  			z_0 := z.Args[0]
 23085  			z_1 := z.Args[1]
 23086  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23087  				x := z_0
 23088  				y := z_1
 23089  				if !(z.Uses == 1) {
 23090  					continue
 23091  				}
 23092  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 23093  				v0.AddArg2(x, y)
 23094  				b.resetWithControl(BlockARM64GE, v0)
 23095  				return true
 23096  			}
 23097  			break
 23098  		}
 23099  		// match: (GE (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 23100  		// cond: x.Uses == 1
 23101  		// result: (GE (TSTWconst [int32(c)] y) yes no)
 23102  		for b.Controls[0].Op == OpARM64CMPWconst {
 23103  			v_0 := b.Controls[0]
 23104  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23105  				break
 23106  			}
 23107  			x := v_0.Args[0]
 23108  			if x.Op != OpARM64ANDconst {
 23109  				break
 23110  			}
 23111  			c := auxIntToInt64(x.AuxInt)
 23112  			y := x.Args[0]
 23113  			if !(x.Uses == 1) {
 23114  				break
 23115  			}
 23116  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 23117  			v0.AuxInt = int32ToAuxInt(int32(c))
 23118  			v0.AddArg(y)
 23119  			b.resetWithControl(BlockARM64GE, v0)
 23120  			return true
 23121  		}
 23122  		// match: (GE (CMPconst [0] x:(ADDconst [c] y)) yes no)
 23123  		// cond: x.Uses == 1
 23124  		// result: (GEnoov (CMNconst [c] y) yes no)
 23125  		for b.Controls[0].Op == OpARM64CMPconst {
 23126  			v_0 := b.Controls[0]
 23127  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23128  				break
 23129  			}
 23130  			x := v_0.Args[0]
 23131  			if x.Op != OpARM64ADDconst {
 23132  				break
 23133  			}
 23134  			c := auxIntToInt64(x.AuxInt)
 23135  			y := x.Args[0]
 23136  			if !(x.Uses == 1) {
 23137  				break
 23138  			}
 23139  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 23140  			v0.AuxInt = int64ToAuxInt(c)
 23141  			v0.AddArg(y)
 23142  			b.resetWithControl(BlockARM64GEnoov, v0)
 23143  			return true
 23144  		}
 23145  		// match: (GE (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 23146  		// cond: x.Uses == 1
 23147  		// result: (GEnoov (CMNWconst [int32(c)] y) yes no)
 23148  		for b.Controls[0].Op == OpARM64CMPWconst {
 23149  			v_0 := b.Controls[0]
 23150  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23151  				break
 23152  			}
 23153  			x := v_0.Args[0]
 23154  			if x.Op != OpARM64ADDconst {
 23155  				break
 23156  			}
 23157  			c := auxIntToInt64(x.AuxInt)
 23158  			y := x.Args[0]
 23159  			if !(x.Uses == 1) {
 23160  				break
 23161  			}
 23162  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 23163  			v0.AuxInt = int32ToAuxInt(int32(c))
 23164  			v0.AddArg(y)
 23165  			b.resetWithControl(BlockARM64GEnoov, v0)
 23166  			return true
 23167  		}
 23168  		// match: (GE (CMPconst [0] z:(ADD x y)) yes no)
 23169  		// cond: z.Uses == 1
 23170  		// result: (GEnoov (CMN x y) yes no)
 23171  		for b.Controls[0].Op == OpARM64CMPconst {
 23172  			v_0 := b.Controls[0]
 23173  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23174  				break
 23175  			}
 23176  			z := v_0.Args[0]
 23177  			if z.Op != OpARM64ADD {
 23178  				break
 23179  			}
 23180  			_ = z.Args[1]
 23181  			z_0 := z.Args[0]
 23182  			z_1 := z.Args[1]
 23183  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23184  				x := z_0
 23185  				y := z_1
 23186  				if !(z.Uses == 1) {
 23187  					continue
 23188  				}
 23189  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 23190  				v0.AddArg2(x, y)
 23191  				b.resetWithControl(BlockARM64GEnoov, v0)
 23192  				return true
 23193  			}
 23194  			break
 23195  		}
 23196  		// match: (GE (CMPWconst [0] z:(ADD x y)) yes no)
 23197  		// cond: z.Uses == 1
 23198  		// result: (GEnoov (CMNW x y) yes no)
 23199  		for b.Controls[0].Op == OpARM64CMPWconst {
 23200  			v_0 := b.Controls[0]
 23201  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23202  				break
 23203  			}
 23204  			z := v_0.Args[0]
 23205  			if z.Op != OpARM64ADD {
 23206  				break
 23207  			}
 23208  			_ = z.Args[1]
 23209  			z_0 := z.Args[0]
 23210  			z_1 := z.Args[1]
 23211  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23212  				x := z_0
 23213  				y := z_1
 23214  				if !(z.Uses == 1) {
 23215  					continue
 23216  				}
 23217  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 23218  				v0.AddArg2(x, y)
 23219  				b.resetWithControl(BlockARM64GEnoov, v0)
 23220  				return true
 23221  			}
 23222  			break
 23223  		}
 23224  		// match: (GE (CMPconst [0] z:(MADD a x y)) yes no)
 23225  		// cond: z.Uses==1
 23226  		// result: (GEnoov (CMN a (MUL <x.Type> x y)) yes no)
 23227  		for b.Controls[0].Op == OpARM64CMPconst {
 23228  			v_0 := b.Controls[0]
 23229  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23230  				break
 23231  			}
 23232  			z := v_0.Args[0]
 23233  			if z.Op != OpARM64MADD {
 23234  				break
 23235  			}
 23236  			y := z.Args[2]
 23237  			a := z.Args[0]
 23238  			x := z.Args[1]
 23239  			if !(z.Uses == 1) {
 23240  				break
 23241  			}
 23242  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 23243  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 23244  			v1.AddArg2(x, y)
 23245  			v0.AddArg2(a, v1)
 23246  			b.resetWithControl(BlockARM64GEnoov, v0)
 23247  			return true
 23248  		}
 23249  		// match: (GE (CMPconst [0] z:(MSUB a x y)) yes no)
 23250  		// cond: z.Uses==1
 23251  		// result: (GEnoov (CMP a (MUL <x.Type> x y)) yes no)
 23252  		for b.Controls[0].Op == OpARM64CMPconst {
 23253  			v_0 := b.Controls[0]
 23254  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23255  				break
 23256  			}
 23257  			z := v_0.Args[0]
 23258  			if z.Op != OpARM64MSUB {
 23259  				break
 23260  			}
 23261  			y := z.Args[2]
 23262  			a := z.Args[0]
 23263  			x := z.Args[1]
 23264  			if !(z.Uses == 1) {
 23265  				break
 23266  			}
 23267  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 23268  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 23269  			v1.AddArg2(x, y)
 23270  			v0.AddArg2(a, v1)
 23271  			b.resetWithControl(BlockARM64GEnoov, v0)
 23272  			return true
 23273  		}
 23274  		// match: (GE (CMPWconst [0] z:(MADDW a x y)) yes no)
 23275  		// cond: z.Uses==1
 23276  		// result: (GEnoov (CMNW a (MULW <x.Type> x y)) yes no)
 23277  		for b.Controls[0].Op == OpARM64CMPWconst {
 23278  			v_0 := b.Controls[0]
 23279  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23280  				break
 23281  			}
 23282  			z := v_0.Args[0]
 23283  			if z.Op != OpARM64MADDW {
 23284  				break
 23285  			}
 23286  			y := z.Args[2]
 23287  			a := z.Args[0]
 23288  			x := z.Args[1]
 23289  			if !(z.Uses == 1) {
 23290  				break
 23291  			}
 23292  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 23293  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 23294  			v1.AddArg2(x, y)
 23295  			v0.AddArg2(a, v1)
 23296  			b.resetWithControl(BlockARM64GEnoov, v0)
 23297  			return true
 23298  		}
 23299  		// match: (GE (CMPWconst [0] z:(MSUBW a x y)) yes no)
 23300  		// cond: z.Uses==1
 23301  		// result: (GEnoov (CMPW a (MULW <x.Type> x y)) yes no)
 23302  		for b.Controls[0].Op == OpARM64CMPWconst {
 23303  			v_0 := b.Controls[0]
 23304  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23305  				break
 23306  			}
 23307  			z := v_0.Args[0]
 23308  			if z.Op != OpARM64MSUBW {
 23309  				break
 23310  			}
 23311  			y := z.Args[2]
 23312  			a := z.Args[0]
 23313  			x := z.Args[1]
 23314  			if !(z.Uses == 1) {
 23315  				break
 23316  			}
 23317  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 23318  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 23319  			v1.AddArg2(x, y)
 23320  			v0.AddArg2(a, v1)
 23321  			b.resetWithControl(BlockARM64GEnoov, v0)
 23322  			return true
 23323  		}
 23324  		// match: (GE (CMPWconst [0] x) yes no)
 23325  		// result: (TBZ [31] x yes no)
 23326  		for b.Controls[0].Op == OpARM64CMPWconst {
 23327  			v_0 := b.Controls[0]
 23328  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23329  				break
 23330  			}
 23331  			x := v_0.Args[0]
 23332  			b.resetWithControl(BlockARM64TBZ, x)
 23333  			b.AuxInt = int64ToAuxInt(31)
 23334  			return true
 23335  		}
 23336  		// match: (GE (CMPconst [0] x) yes no)
 23337  		// result: (TBZ [63] x yes no)
 23338  		for b.Controls[0].Op == OpARM64CMPconst {
 23339  			v_0 := b.Controls[0]
 23340  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23341  				break
 23342  			}
 23343  			x := v_0.Args[0]
 23344  			b.resetWithControl(BlockARM64TBZ, x)
 23345  			b.AuxInt = int64ToAuxInt(63)
 23346  			return true
 23347  		}
 23348  		// match: (GE (FlagConstant [fc]) yes no)
 23349  		// cond: fc.ge()
 23350  		// result: (First yes no)
 23351  		for b.Controls[0].Op == OpARM64FlagConstant {
 23352  			v_0 := b.Controls[0]
 23353  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23354  			if !(fc.ge()) {
 23355  				break
 23356  			}
 23357  			b.Reset(BlockFirst)
 23358  			return true
 23359  		}
 23360  		// match: (GE (FlagConstant [fc]) yes no)
 23361  		// cond: !fc.ge()
 23362  		// result: (First no yes)
 23363  		for b.Controls[0].Op == OpARM64FlagConstant {
 23364  			v_0 := b.Controls[0]
 23365  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23366  			if !(!fc.ge()) {
 23367  				break
 23368  			}
 23369  			b.Reset(BlockFirst)
 23370  			b.swapSuccessors()
 23371  			return true
 23372  		}
 23373  		// match: (GE (InvertFlags cmp) yes no)
 23374  		// result: (LE cmp yes no)
 23375  		for b.Controls[0].Op == OpARM64InvertFlags {
 23376  			v_0 := b.Controls[0]
 23377  			cmp := v_0.Args[0]
 23378  			b.resetWithControl(BlockARM64LE, cmp)
 23379  			return true
 23380  		}
 23381  	case BlockARM64GEnoov:
 23382  		// match: (GEnoov (FlagConstant [fc]) yes no)
 23383  		// cond: fc.geNoov()
 23384  		// result: (First yes no)
 23385  		for b.Controls[0].Op == OpARM64FlagConstant {
 23386  			v_0 := b.Controls[0]
 23387  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23388  			if !(fc.geNoov()) {
 23389  				break
 23390  			}
 23391  			b.Reset(BlockFirst)
 23392  			return true
 23393  		}
 23394  		// match: (GEnoov (FlagConstant [fc]) yes no)
 23395  		// cond: !fc.geNoov()
 23396  		// result: (First no yes)
 23397  		for b.Controls[0].Op == OpARM64FlagConstant {
 23398  			v_0 := b.Controls[0]
 23399  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23400  			if !(!fc.geNoov()) {
 23401  				break
 23402  			}
 23403  			b.Reset(BlockFirst)
 23404  			b.swapSuccessors()
 23405  			return true
 23406  		}
 23407  		// match: (GEnoov (InvertFlags cmp) yes no)
 23408  		// result: (LEnoov cmp yes no)
 23409  		for b.Controls[0].Op == OpARM64InvertFlags {
 23410  			v_0 := b.Controls[0]
 23411  			cmp := v_0.Args[0]
 23412  			b.resetWithControl(BlockARM64LEnoov, cmp)
 23413  			return true
 23414  		}
 23415  	case BlockARM64GT:
 23416  		// match: (GT (CMPconst [0] z:(AND x y)) yes no)
 23417  		// cond: z.Uses == 1
 23418  		// result: (GT (TST x y) yes no)
 23419  		for b.Controls[0].Op == OpARM64CMPconst {
 23420  			v_0 := b.Controls[0]
 23421  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23422  				break
 23423  			}
 23424  			z := v_0.Args[0]
 23425  			if z.Op != OpARM64AND {
 23426  				break
 23427  			}
 23428  			_ = z.Args[1]
 23429  			z_0 := z.Args[0]
 23430  			z_1 := z.Args[1]
 23431  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23432  				x := z_0
 23433  				y := z_1
 23434  				if !(z.Uses == 1) {
 23435  					continue
 23436  				}
 23437  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 23438  				v0.AddArg2(x, y)
 23439  				b.resetWithControl(BlockARM64GT, v0)
 23440  				return true
 23441  			}
 23442  			break
 23443  		}
 23444  		// match: (GT (CMPconst [0] x:(ANDconst [c] y)) yes no)
 23445  		// cond: x.Uses == 1
 23446  		// result: (GT (TSTconst [c] y) yes no)
 23447  		for b.Controls[0].Op == OpARM64CMPconst {
 23448  			v_0 := b.Controls[0]
 23449  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23450  				break
 23451  			}
 23452  			x := v_0.Args[0]
 23453  			if x.Op != OpARM64ANDconst {
 23454  				break
 23455  			}
 23456  			c := auxIntToInt64(x.AuxInt)
 23457  			y := x.Args[0]
 23458  			if !(x.Uses == 1) {
 23459  				break
 23460  			}
 23461  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 23462  			v0.AuxInt = int64ToAuxInt(c)
 23463  			v0.AddArg(y)
 23464  			b.resetWithControl(BlockARM64GT, v0)
 23465  			return true
 23466  		}
 23467  		// match: (GT (CMPWconst [0] z:(AND x y)) yes no)
 23468  		// cond: z.Uses == 1
 23469  		// result: (GT (TSTW x y) yes no)
 23470  		for b.Controls[0].Op == OpARM64CMPWconst {
 23471  			v_0 := b.Controls[0]
 23472  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23473  				break
 23474  			}
 23475  			z := v_0.Args[0]
 23476  			if z.Op != OpARM64AND {
 23477  				break
 23478  			}
 23479  			_ = z.Args[1]
 23480  			z_0 := z.Args[0]
 23481  			z_1 := z.Args[1]
 23482  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23483  				x := z_0
 23484  				y := z_1
 23485  				if !(z.Uses == 1) {
 23486  					continue
 23487  				}
 23488  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 23489  				v0.AddArg2(x, y)
 23490  				b.resetWithControl(BlockARM64GT, v0)
 23491  				return true
 23492  			}
 23493  			break
 23494  		}
 23495  		// match: (GT (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 23496  		// cond: x.Uses == 1
 23497  		// result: (GT (TSTWconst [int32(c)] y) yes no)
 23498  		for b.Controls[0].Op == OpARM64CMPWconst {
 23499  			v_0 := b.Controls[0]
 23500  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23501  				break
 23502  			}
 23503  			x := v_0.Args[0]
 23504  			if x.Op != OpARM64ANDconst {
 23505  				break
 23506  			}
 23507  			c := auxIntToInt64(x.AuxInt)
 23508  			y := x.Args[0]
 23509  			if !(x.Uses == 1) {
 23510  				break
 23511  			}
 23512  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 23513  			v0.AuxInt = int32ToAuxInt(int32(c))
 23514  			v0.AddArg(y)
 23515  			b.resetWithControl(BlockARM64GT, v0)
 23516  			return true
 23517  		}
 23518  		// match: (GT (CMPconst [0] x:(ADDconst [c] y)) yes no)
 23519  		// cond: x.Uses == 1
 23520  		// result: (GTnoov (CMNconst [c] y) yes no)
 23521  		for b.Controls[0].Op == OpARM64CMPconst {
 23522  			v_0 := b.Controls[0]
 23523  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23524  				break
 23525  			}
 23526  			x := v_0.Args[0]
 23527  			if x.Op != OpARM64ADDconst {
 23528  				break
 23529  			}
 23530  			c := auxIntToInt64(x.AuxInt)
 23531  			y := x.Args[0]
 23532  			if !(x.Uses == 1) {
 23533  				break
 23534  			}
 23535  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 23536  			v0.AuxInt = int64ToAuxInt(c)
 23537  			v0.AddArg(y)
 23538  			b.resetWithControl(BlockARM64GTnoov, v0)
 23539  			return true
 23540  		}
 23541  		// match: (GT (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 23542  		// cond: x.Uses == 1
 23543  		// result: (GTnoov (CMNWconst [int32(c)] y) yes no)
 23544  		for b.Controls[0].Op == OpARM64CMPWconst {
 23545  			v_0 := b.Controls[0]
 23546  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23547  				break
 23548  			}
 23549  			x := v_0.Args[0]
 23550  			if x.Op != OpARM64ADDconst {
 23551  				break
 23552  			}
 23553  			c := auxIntToInt64(x.AuxInt)
 23554  			y := x.Args[0]
 23555  			if !(x.Uses == 1) {
 23556  				break
 23557  			}
 23558  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 23559  			v0.AuxInt = int32ToAuxInt(int32(c))
 23560  			v0.AddArg(y)
 23561  			b.resetWithControl(BlockARM64GTnoov, v0)
 23562  			return true
 23563  		}
 23564  		// match: (GT (CMPconst [0] z:(ADD x y)) yes no)
 23565  		// cond: z.Uses == 1
 23566  		// result: (GTnoov (CMN x y) yes no)
 23567  		for b.Controls[0].Op == OpARM64CMPconst {
 23568  			v_0 := b.Controls[0]
 23569  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23570  				break
 23571  			}
 23572  			z := v_0.Args[0]
 23573  			if z.Op != OpARM64ADD {
 23574  				break
 23575  			}
 23576  			_ = z.Args[1]
 23577  			z_0 := z.Args[0]
 23578  			z_1 := z.Args[1]
 23579  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23580  				x := z_0
 23581  				y := z_1
 23582  				if !(z.Uses == 1) {
 23583  					continue
 23584  				}
 23585  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 23586  				v0.AddArg2(x, y)
 23587  				b.resetWithControl(BlockARM64GTnoov, v0)
 23588  				return true
 23589  			}
 23590  			break
 23591  		}
 23592  		// match: (GT (CMPWconst [0] z:(ADD x y)) yes no)
 23593  		// cond: z.Uses == 1
 23594  		// result: (GTnoov (CMNW x y) yes no)
 23595  		for b.Controls[0].Op == OpARM64CMPWconst {
 23596  			v_0 := b.Controls[0]
 23597  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23598  				break
 23599  			}
 23600  			z := v_0.Args[0]
 23601  			if z.Op != OpARM64ADD {
 23602  				break
 23603  			}
 23604  			_ = z.Args[1]
 23605  			z_0 := z.Args[0]
 23606  			z_1 := z.Args[1]
 23607  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23608  				x := z_0
 23609  				y := z_1
 23610  				if !(z.Uses == 1) {
 23611  					continue
 23612  				}
 23613  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 23614  				v0.AddArg2(x, y)
 23615  				b.resetWithControl(BlockARM64GTnoov, v0)
 23616  				return true
 23617  			}
 23618  			break
 23619  		}
 23620  		// match: (GT (CMPconst [0] z:(MADD a x y)) yes no)
 23621  		// cond: z.Uses==1
 23622  		// result: (GTnoov (CMN a (MUL <x.Type> x y)) yes no)
 23623  		for b.Controls[0].Op == OpARM64CMPconst {
 23624  			v_0 := b.Controls[0]
 23625  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23626  				break
 23627  			}
 23628  			z := v_0.Args[0]
 23629  			if z.Op != OpARM64MADD {
 23630  				break
 23631  			}
 23632  			y := z.Args[2]
 23633  			a := z.Args[0]
 23634  			x := z.Args[1]
 23635  			if !(z.Uses == 1) {
 23636  				break
 23637  			}
 23638  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 23639  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 23640  			v1.AddArg2(x, y)
 23641  			v0.AddArg2(a, v1)
 23642  			b.resetWithControl(BlockARM64GTnoov, v0)
 23643  			return true
 23644  		}
 23645  		// match: (GT (CMPconst [0] z:(MSUB a x y)) yes no)
 23646  		// cond: z.Uses==1
 23647  		// result: (GTnoov (CMP a (MUL <x.Type> x y)) yes no)
 23648  		for b.Controls[0].Op == OpARM64CMPconst {
 23649  			v_0 := b.Controls[0]
 23650  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23651  				break
 23652  			}
 23653  			z := v_0.Args[0]
 23654  			if z.Op != OpARM64MSUB {
 23655  				break
 23656  			}
 23657  			y := z.Args[2]
 23658  			a := z.Args[0]
 23659  			x := z.Args[1]
 23660  			if !(z.Uses == 1) {
 23661  				break
 23662  			}
 23663  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 23664  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 23665  			v1.AddArg2(x, y)
 23666  			v0.AddArg2(a, v1)
 23667  			b.resetWithControl(BlockARM64GTnoov, v0)
 23668  			return true
 23669  		}
 23670  		// match: (GT (CMPWconst [0] z:(MADDW a x y)) yes no)
 23671  		// cond: z.Uses==1
 23672  		// result: (GTnoov (CMNW a (MULW <x.Type> x y)) yes no)
 23673  		for b.Controls[0].Op == OpARM64CMPWconst {
 23674  			v_0 := b.Controls[0]
 23675  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23676  				break
 23677  			}
 23678  			z := v_0.Args[0]
 23679  			if z.Op != OpARM64MADDW {
 23680  				break
 23681  			}
 23682  			y := z.Args[2]
 23683  			a := z.Args[0]
 23684  			x := z.Args[1]
 23685  			if !(z.Uses == 1) {
 23686  				break
 23687  			}
 23688  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 23689  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 23690  			v1.AddArg2(x, y)
 23691  			v0.AddArg2(a, v1)
 23692  			b.resetWithControl(BlockARM64GTnoov, v0)
 23693  			return true
 23694  		}
 23695  		// match: (GT (CMPWconst [0] z:(MSUBW a x y)) yes no)
 23696  		// cond: z.Uses==1
 23697  		// result: (GTnoov (CMPW a (MULW <x.Type> x y)) yes no)
 23698  		for b.Controls[0].Op == OpARM64CMPWconst {
 23699  			v_0 := b.Controls[0]
 23700  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23701  				break
 23702  			}
 23703  			z := v_0.Args[0]
 23704  			if z.Op != OpARM64MSUBW {
 23705  				break
 23706  			}
 23707  			y := z.Args[2]
 23708  			a := z.Args[0]
 23709  			x := z.Args[1]
 23710  			if !(z.Uses == 1) {
 23711  				break
 23712  			}
 23713  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 23714  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 23715  			v1.AddArg2(x, y)
 23716  			v0.AddArg2(a, v1)
 23717  			b.resetWithControl(BlockARM64GTnoov, v0)
 23718  			return true
 23719  		}
 23720  		// match: (GT (FlagConstant [fc]) yes no)
 23721  		// cond: fc.gt()
 23722  		// result: (First yes no)
 23723  		for b.Controls[0].Op == OpARM64FlagConstant {
 23724  			v_0 := b.Controls[0]
 23725  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23726  			if !(fc.gt()) {
 23727  				break
 23728  			}
 23729  			b.Reset(BlockFirst)
 23730  			return true
 23731  		}
 23732  		// match: (GT (FlagConstant [fc]) yes no)
 23733  		// cond: !fc.gt()
 23734  		// result: (First no yes)
 23735  		for b.Controls[0].Op == OpARM64FlagConstant {
 23736  			v_0 := b.Controls[0]
 23737  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23738  			if !(!fc.gt()) {
 23739  				break
 23740  			}
 23741  			b.Reset(BlockFirst)
 23742  			b.swapSuccessors()
 23743  			return true
 23744  		}
 23745  		// match: (GT (InvertFlags cmp) yes no)
 23746  		// result: (LT cmp yes no)
 23747  		for b.Controls[0].Op == OpARM64InvertFlags {
 23748  			v_0 := b.Controls[0]
 23749  			cmp := v_0.Args[0]
 23750  			b.resetWithControl(BlockARM64LT, cmp)
 23751  			return true
 23752  		}
 23753  	case BlockARM64GTnoov:
 23754  		// match: (GTnoov (FlagConstant [fc]) yes no)
 23755  		// cond: fc.gtNoov()
 23756  		// result: (First yes no)
 23757  		for b.Controls[0].Op == OpARM64FlagConstant {
 23758  			v_0 := b.Controls[0]
 23759  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23760  			if !(fc.gtNoov()) {
 23761  				break
 23762  			}
 23763  			b.Reset(BlockFirst)
 23764  			return true
 23765  		}
 23766  		// match: (GTnoov (FlagConstant [fc]) yes no)
 23767  		// cond: !fc.gtNoov()
 23768  		// result: (First no yes)
 23769  		for b.Controls[0].Op == OpARM64FlagConstant {
 23770  			v_0 := b.Controls[0]
 23771  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23772  			if !(!fc.gtNoov()) {
 23773  				break
 23774  			}
 23775  			b.Reset(BlockFirst)
 23776  			b.swapSuccessors()
 23777  			return true
 23778  		}
 23779  		// match: (GTnoov (InvertFlags cmp) yes no)
 23780  		// result: (LTnoov cmp yes no)
 23781  		for b.Controls[0].Op == OpARM64InvertFlags {
 23782  			v_0 := b.Controls[0]
 23783  			cmp := v_0.Args[0]
 23784  			b.resetWithControl(BlockARM64LTnoov, cmp)
 23785  			return true
 23786  		}
 23787  	case BlockIf:
 23788  		// match: (If (Equal cc) yes no)
 23789  		// result: (EQ cc yes no)
 23790  		for b.Controls[0].Op == OpARM64Equal {
 23791  			v_0 := b.Controls[0]
 23792  			cc := v_0.Args[0]
 23793  			b.resetWithControl(BlockARM64EQ, cc)
 23794  			return true
 23795  		}
 23796  		// match: (If (NotEqual cc) yes no)
 23797  		// result: (NE cc yes no)
 23798  		for b.Controls[0].Op == OpARM64NotEqual {
 23799  			v_0 := b.Controls[0]
 23800  			cc := v_0.Args[0]
 23801  			b.resetWithControl(BlockARM64NE, cc)
 23802  			return true
 23803  		}
 23804  		// match: (If (LessThan cc) yes no)
 23805  		// result: (LT cc yes no)
 23806  		for b.Controls[0].Op == OpARM64LessThan {
 23807  			v_0 := b.Controls[0]
 23808  			cc := v_0.Args[0]
 23809  			b.resetWithControl(BlockARM64LT, cc)
 23810  			return true
 23811  		}
 23812  		// match: (If (LessThanU cc) yes no)
 23813  		// result: (ULT cc yes no)
 23814  		for b.Controls[0].Op == OpARM64LessThanU {
 23815  			v_0 := b.Controls[0]
 23816  			cc := v_0.Args[0]
 23817  			b.resetWithControl(BlockARM64ULT, cc)
 23818  			return true
 23819  		}
 23820  		// match: (If (LessEqual cc) yes no)
 23821  		// result: (LE cc yes no)
 23822  		for b.Controls[0].Op == OpARM64LessEqual {
 23823  			v_0 := b.Controls[0]
 23824  			cc := v_0.Args[0]
 23825  			b.resetWithControl(BlockARM64LE, cc)
 23826  			return true
 23827  		}
 23828  		// match: (If (LessEqualU cc) yes no)
 23829  		// result: (ULE cc yes no)
 23830  		for b.Controls[0].Op == OpARM64LessEqualU {
 23831  			v_0 := b.Controls[0]
 23832  			cc := v_0.Args[0]
 23833  			b.resetWithControl(BlockARM64ULE, cc)
 23834  			return true
 23835  		}
 23836  		// match: (If (GreaterThan cc) yes no)
 23837  		// result: (GT cc yes no)
 23838  		for b.Controls[0].Op == OpARM64GreaterThan {
 23839  			v_0 := b.Controls[0]
 23840  			cc := v_0.Args[0]
 23841  			b.resetWithControl(BlockARM64GT, cc)
 23842  			return true
 23843  		}
 23844  		// match: (If (GreaterThanU cc) yes no)
 23845  		// result: (UGT cc yes no)
 23846  		for b.Controls[0].Op == OpARM64GreaterThanU {
 23847  			v_0 := b.Controls[0]
 23848  			cc := v_0.Args[0]
 23849  			b.resetWithControl(BlockARM64UGT, cc)
 23850  			return true
 23851  		}
 23852  		// match: (If (GreaterEqual cc) yes no)
 23853  		// result: (GE cc yes no)
 23854  		for b.Controls[0].Op == OpARM64GreaterEqual {
 23855  			v_0 := b.Controls[0]
 23856  			cc := v_0.Args[0]
 23857  			b.resetWithControl(BlockARM64GE, cc)
 23858  			return true
 23859  		}
 23860  		// match: (If (GreaterEqualU cc) yes no)
 23861  		// result: (UGE cc yes no)
 23862  		for b.Controls[0].Op == OpARM64GreaterEqualU {
 23863  			v_0 := b.Controls[0]
 23864  			cc := v_0.Args[0]
 23865  			b.resetWithControl(BlockARM64UGE, cc)
 23866  			return true
 23867  		}
 23868  		// match: (If (LessThanF cc) yes no)
 23869  		// result: (FLT cc yes no)
 23870  		for b.Controls[0].Op == OpARM64LessThanF {
 23871  			v_0 := b.Controls[0]
 23872  			cc := v_0.Args[0]
 23873  			b.resetWithControl(BlockARM64FLT, cc)
 23874  			return true
 23875  		}
 23876  		// match: (If (LessEqualF cc) yes no)
 23877  		// result: (FLE cc yes no)
 23878  		for b.Controls[0].Op == OpARM64LessEqualF {
 23879  			v_0 := b.Controls[0]
 23880  			cc := v_0.Args[0]
 23881  			b.resetWithControl(BlockARM64FLE, cc)
 23882  			return true
 23883  		}
 23884  		// match: (If (GreaterThanF cc) yes no)
 23885  		// result: (FGT cc yes no)
 23886  		for b.Controls[0].Op == OpARM64GreaterThanF {
 23887  			v_0 := b.Controls[0]
 23888  			cc := v_0.Args[0]
 23889  			b.resetWithControl(BlockARM64FGT, cc)
 23890  			return true
 23891  		}
 23892  		// match: (If (GreaterEqualF cc) yes no)
 23893  		// result: (FGE cc yes no)
 23894  		for b.Controls[0].Op == OpARM64GreaterEqualF {
 23895  			v_0 := b.Controls[0]
 23896  			cc := v_0.Args[0]
 23897  			b.resetWithControl(BlockARM64FGE, cc)
 23898  			return true
 23899  		}
 23900  		// match: (If cond yes no)
 23901  		// result: (TBNZ [0] cond yes no)
 23902  		for {
 23903  			cond := b.Controls[0]
 23904  			b.resetWithControl(BlockARM64TBNZ, cond)
 23905  			b.AuxInt = int64ToAuxInt(0)
 23906  			return true
 23907  		}
 23908  	case BlockJumpTable:
 23909  		// match: (JumpTable idx)
 23910  		// result: (JUMPTABLE {makeJumpTableSym(b)} idx (MOVDaddr <typ.Uintptr> {makeJumpTableSym(b)} (SB)))
 23911  		for {
 23912  			idx := b.Controls[0]
 23913  			v0 := b.NewValue0(b.Pos, OpARM64MOVDaddr, typ.Uintptr)
 23914  			v0.Aux = symToAux(makeJumpTableSym(b))
 23915  			v1 := b.NewValue0(b.Pos, OpSB, typ.Uintptr)
 23916  			v0.AddArg(v1)
 23917  			b.resetWithControl2(BlockARM64JUMPTABLE, idx, v0)
 23918  			b.Aux = symToAux(makeJumpTableSym(b))
 23919  			return true
 23920  		}
 23921  	case BlockARM64LE:
 23922  		// match: (LE (CMPconst [0] z:(AND x y)) yes no)
 23923  		// cond: z.Uses == 1
 23924  		// result: (LE (TST x y) yes no)
 23925  		for b.Controls[0].Op == OpARM64CMPconst {
 23926  			v_0 := b.Controls[0]
 23927  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23928  				break
 23929  			}
 23930  			z := v_0.Args[0]
 23931  			if z.Op != OpARM64AND {
 23932  				break
 23933  			}
 23934  			_ = z.Args[1]
 23935  			z_0 := z.Args[0]
 23936  			z_1 := z.Args[1]
 23937  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23938  				x := z_0
 23939  				y := z_1
 23940  				if !(z.Uses == 1) {
 23941  					continue
 23942  				}
 23943  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 23944  				v0.AddArg2(x, y)
 23945  				b.resetWithControl(BlockARM64LE, v0)
 23946  				return true
 23947  			}
 23948  			break
 23949  		}
 23950  		// match: (LE (CMPconst [0] x:(ANDconst [c] y)) yes no)
 23951  		// cond: x.Uses == 1
 23952  		// result: (LE (TSTconst [c] y) yes no)
 23953  		for b.Controls[0].Op == OpARM64CMPconst {
 23954  			v_0 := b.Controls[0]
 23955  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23956  				break
 23957  			}
 23958  			x := v_0.Args[0]
 23959  			if x.Op != OpARM64ANDconst {
 23960  				break
 23961  			}
 23962  			c := auxIntToInt64(x.AuxInt)
 23963  			y := x.Args[0]
 23964  			if !(x.Uses == 1) {
 23965  				break
 23966  			}
 23967  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 23968  			v0.AuxInt = int64ToAuxInt(c)
 23969  			v0.AddArg(y)
 23970  			b.resetWithControl(BlockARM64LE, v0)
 23971  			return true
 23972  		}
 23973  		// match: (LE (CMPWconst [0] z:(AND x y)) yes no)
 23974  		// cond: z.Uses == 1
 23975  		// result: (LE (TSTW x y) yes no)
 23976  		for b.Controls[0].Op == OpARM64CMPWconst {
 23977  			v_0 := b.Controls[0]
 23978  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23979  				break
 23980  			}
 23981  			z := v_0.Args[0]
 23982  			if z.Op != OpARM64AND {
 23983  				break
 23984  			}
 23985  			_ = z.Args[1]
 23986  			z_0 := z.Args[0]
 23987  			z_1 := z.Args[1]
 23988  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23989  				x := z_0
 23990  				y := z_1
 23991  				if !(z.Uses == 1) {
 23992  					continue
 23993  				}
 23994  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 23995  				v0.AddArg2(x, y)
 23996  				b.resetWithControl(BlockARM64LE, v0)
 23997  				return true
 23998  			}
 23999  			break
 24000  		}
 24001  		// match: (LE (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 24002  		// cond: x.Uses == 1
 24003  		// result: (LE (TSTWconst [int32(c)] y) yes no)
 24004  		for b.Controls[0].Op == OpARM64CMPWconst {
 24005  			v_0 := b.Controls[0]
 24006  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24007  				break
 24008  			}
 24009  			x := v_0.Args[0]
 24010  			if x.Op != OpARM64ANDconst {
 24011  				break
 24012  			}
 24013  			c := auxIntToInt64(x.AuxInt)
 24014  			y := x.Args[0]
 24015  			if !(x.Uses == 1) {
 24016  				break
 24017  			}
 24018  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 24019  			v0.AuxInt = int32ToAuxInt(int32(c))
 24020  			v0.AddArg(y)
 24021  			b.resetWithControl(BlockARM64LE, v0)
 24022  			return true
 24023  		}
 24024  		// match: (LE (CMPconst [0] x:(ADDconst [c] y)) yes no)
 24025  		// cond: x.Uses == 1
 24026  		// result: (LEnoov (CMNconst [c] y) yes no)
 24027  		for b.Controls[0].Op == OpARM64CMPconst {
 24028  			v_0 := b.Controls[0]
 24029  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24030  				break
 24031  			}
 24032  			x := v_0.Args[0]
 24033  			if x.Op != OpARM64ADDconst {
 24034  				break
 24035  			}
 24036  			c := auxIntToInt64(x.AuxInt)
 24037  			y := x.Args[0]
 24038  			if !(x.Uses == 1) {
 24039  				break
 24040  			}
 24041  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 24042  			v0.AuxInt = int64ToAuxInt(c)
 24043  			v0.AddArg(y)
 24044  			b.resetWithControl(BlockARM64LEnoov, v0)
 24045  			return true
 24046  		}
 24047  		// match: (LE (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 24048  		// cond: x.Uses == 1
 24049  		// result: (LEnoov (CMNWconst [int32(c)] y) yes no)
 24050  		for b.Controls[0].Op == OpARM64CMPWconst {
 24051  			v_0 := b.Controls[0]
 24052  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24053  				break
 24054  			}
 24055  			x := v_0.Args[0]
 24056  			if x.Op != OpARM64ADDconst {
 24057  				break
 24058  			}
 24059  			c := auxIntToInt64(x.AuxInt)
 24060  			y := x.Args[0]
 24061  			if !(x.Uses == 1) {
 24062  				break
 24063  			}
 24064  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 24065  			v0.AuxInt = int32ToAuxInt(int32(c))
 24066  			v0.AddArg(y)
 24067  			b.resetWithControl(BlockARM64LEnoov, v0)
 24068  			return true
 24069  		}
 24070  		// match: (LE (CMPconst [0] z:(ADD x y)) yes no)
 24071  		// cond: z.Uses == 1
 24072  		// result: (LEnoov (CMN x y) yes no)
 24073  		for b.Controls[0].Op == OpARM64CMPconst {
 24074  			v_0 := b.Controls[0]
 24075  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24076  				break
 24077  			}
 24078  			z := v_0.Args[0]
 24079  			if z.Op != OpARM64ADD {
 24080  				break
 24081  			}
 24082  			_ = z.Args[1]
 24083  			z_0 := z.Args[0]
 24084  			z_1 := z.Args[1]
 24085  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24086  				x := z_0
 24087  				y := z_1
 24088  				if !(z.Uses == 1) {
 24089  					continue
 24090  				}
 24091  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24092  				v0.AddArg2(x, y)
 24093  				b.resetWithControl(BlockARM64LEnoov, v0)
 24094  				return true
 24095  			}
 24096  			break
 24097  		}
 24098  		// match: (LE (CMPWconst [0] z:(ADD x y)) yes no)
 24099  		// cond: z.Uses == 1
 24100  		// result: (LEnoov (CMNW x y) yes no)
 24101  		for b.Controls[0].Op == OpARM64CMPWconst {
 24102  			v_0 := b.Controls[0]
 24103  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24104  				break
 24105  			}
 24106  			z := v_0.Args[0]
 24107  			if z.Op != OpARM64ADD {
 24108  				break
 24109  			}
 24110  			_ = z.Args[1]
 24111  			z_0 := z.Args[0]
 24112  			z_1 := z.Args[1]
 24113  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24114  				x := z_0
 24115  				y := z_1
 24116  				if !(z.Uses == 1) {
 24117  					continue
 24118  				}
 24119  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24120  				v0.AddArg2(x, y)
 24121  				b.resetWithControl(BlockARM64LEnoov, v0)
 24122  				return true
 24123  			}
 24124  			break
 24125  		}
 24126  		// match: (LE (CMPconst [0] z:(MADD a x y)) yes no)
 24127  		// cond: z.Uses==1
 24128  		// result: (LEnoov (CMN a (MUL <x.Type> x y)) yes no)
 24129  		for b.Controls[0].Op == OpARM64CMPconst {
 24130  			v_0 := b.Controls[0]
 24131  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24132  				break
 24133  			}
 24134  			z := v_0.Args[0]
 24135  			if z.Op != OpARM64MADD {
 24136  				break
 24137  			}
 24138  			y := z.Args[2]
 24139  			a := z.Args[0]
 24140  			x := z.Args[1]
 24141  			if !(z.Uses == 1) {
 24142  				break
 24143  			}
 24144  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24145  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 24146  			v1.AddArg2(x, y)
 24147  			v0.AddArg2(a, v1)
 24148  			b.resetWithControl(BlockARM64LEnoov, v0)
 24149  			return true
 24150  		}
 24151  		// match: (LE (CMPconst [0] z:(MSUB a x y)) yes no)
 24152  		// cond: z.Uses==1
 24153  		// result: (LEnoov (CMP a (MUL <x.Type> x y)) yes no)
 24154  		for b.Controls[0].Op == OpARM64CMPconst {
 24155  			v_0 := b.Controls[0]
 24156  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24157  				break
 24158  			}
 24159  			z := v_0.Args[0]
 24160  			if z.Op != OpARM64MSUB {
 24161  				break
 24162  			}
 24163  			y := z.Args[2]
 24164  			a := z.Args[0]
 24165  			x := z.Args[1]
 24166  			if !(z.Uses == 1) {
 24167  				break
 24168  			}
 24169  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 24170  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 24171  			v1.AddArg2(x, y)
 24172  			v0.AddArg2(a, v1)
 24173  			b.resetWithControl(BlockARM64LEnoov, v0)
 24174  			return true
 24175  		}
 24176  		// match: (LE (CMPWconst [0] z:(MADDW a x y)) yes no)
 24177  		// cond: z.Uses==1
 24178  		// result: (LEnoov (CMNW a (MULW <x.Type> x y)) yes no)
 24179  		for b.Controls[0].Op == OpARM64CMPWconst {
 24180  			v_0 := b.Controls[0]
 24181  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24182  				break
 24183  			}
 24184  			z := v_0.Args[0]
 24185  			if z.Op != OpARM64MADDW {
 24186  				break
 24187  			}
 24188  			y := z.Args[2]
 24189  			a := z.Args[0]
 24190  			x := z.Args[1]
 24191  			if !(z.Uses == 1) {
 24192  				break
 24193  			}
 24194  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24195  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 24196  			v1.AddArg2(x, y)
 24197  			v0.AddArg2(a, v1)
 24198  			b.resetWithControl(BlockARM64LEnoov, v0)
 24199  			return true
 24200  		}
 24201  		// match: (LE (CMPWconst [0] z:(MSUBW a x y)) yes no)
 24202  		// cond: z.Uses==1
 24203  		// result: (LEnoov (CMPW a (MULW <x.Type> x y)) yes no)
 24204  		for b.Controls[0].Op == OpARM64CMPWconst {
 24205  			v_0 := b.Controls[0]
 24206  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24207  				break
 24208  			}
 24209  			z := v_0.Args[0]
 24210  			if z.Op != OpARM64MSUBW {
 24211  				break
 24212  			}
 24213  			y := z.Args[2]
 24214  			a := z.Args[0]
 24215  			x := z.Args[1]
 24216  			if !(z.Uses == 1) {
 24217  				break
 24218  			}
 24219  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 24220  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 24221  			v1.AddArg2(x, y)
 24222  			v0.AddArg2(a, v1)
 24223  			b.resetWithControl(BlockARM64LEnoov, v0)
 24224  			return true
 24225  		}
 24226  		// match: (LE (FlagConstant [fc]) yes no)
 24227  		// cond: fc.le()
 24228  		// result: (First yes no)
 24229  		for b.Controls[0].Op == OpARM64FlagConstant {
 24230  			v_0 := b.Controls[0]
 24231  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24232  			if !(fc.le()) {
 24233  				break
 24234  			}
 24235  			b.Reset(BlockFirst)
 24236  			return true
 24237  		}
 24238  		// match: (LE (FlagConstant [fc]) yes no)
 24239  		// cond: !fc.le()
 24240  		// result: (First no yes)
 24241  		for b.Controls[0].Op == OpARM64FlagConstant {
 24242  			v_0 := b.Controls[0]
 24243  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24244  			if !(!fc.le()) {
 24245  				break
 24246  			}
 24247  			b.Reset(BlockFirst)
 24248  			b.swapSuccessors()
 24249  			return true
 24250  		}
 24251  		// match: (LE (InvertFlags cmp) yes no)
 24252  		// result: (GE cmp yes no)
 24253  		for b.Controls[0].Op == OpARM64InvertFlags {
 24254  			v_0 := b.Controls[0]
 24255  			cmp := v_0.Args[0]
 24256  			b.resetWithControl(BlockARM64GE, cmp)
 24257  			return true
 24258  		}
 24259  	case BlockARM64LEnoov:
 24260  		// match: (LEnoov (FlagConstant [fc]) yes no)
 24261  		// cond: fc.leNoov()
 24262  		// result: (First yes no)
 24263  		for b.Controls[0].Op == OpARM64FlagConstant {
 24264  			v_0 := b.Controls[0]
 24265  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24266  			if !(fc.leNoov()) {
 24267  				break
 24268  			}
 24269  			b.Reset(BlockFirst)
 24270  			return true
 24271  		}
 24272  		// match: (LEnoov (FlagConstant [fc]) yes no)
 24273  		// cond: !fc.leNoov()
 24274  		// result: (First no yes)
 24275  		for b.Controls[0].Op == OpARM64FlagConstant {
 24276  			v_0 := b.Controls[0]
 24277  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24278  			if !(!fc.leNoov()) {
 24279  				break
 24280  			}
 24281  			b.Reset(BlockFirst)
 24282  			b.swapSuccessors()
 24283  			return true
 24284  		}
 24285  		// match: (LEnoov (InvertFlags cmp) yes no)
 24286  		// result: (GEnoov cmp yes no)
 24287  		for b.Controls[0].Op == OpARM64InvertFlags {
 24288  			v_0 := b.Controls[0]
 24289  			cmp := v_0.Args[0]
 24290  			b.resetWithControl(BlockARM64GEnoov, cmp)
 24291  			return true
 24292  		}
 24293  	case BlockARM64LT:
 24294  		// match: (LT (CMPconst [0] z:(AND x y)) yes no)
 24295  		// cond: z.Uses == 1
 24296  		// result: (LT (TST x y) yes no)
 24297  		for b.Controls[0].Op == OpARM64CMPconst {
 24298  			v_0 := b.Controls[0]
 24299  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24300  				break
 24301  			}
 24302  			z := v_0.Args[0]
 24303  			if z.Op != OpARM64AND {
 24304  				break
 24305  			}
 24306  			_ = z.Args[1]
 24307  			z_0 := z.Args[0]
 24308  			z_1 := z.Args[1]
 24309  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24310  				x := z_0
 24311  				y := z_1
 24312  				if !(z.Uses == 1) {
 24313  					continue
 24314  				}
 24315  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 24316  				v0.AddArg2(x, y)
 24317  				b.resetWithControl(BlockARM64LT, v0)
 24318  				return true
 24319  			}
 24320  			break
 24321  		}
 24322  		// match: (LT (CMPconst [0] x:(ANDconst [c] y)) yes no)
 24323  		// cond: x.Uses == 1
 24324  		// result: (LT (TSTconst [c] y) yes no)
 24325  		for b.Controls[0].Op == OpARM64CMPconst {
 24326  			v_0 := b.Controls[0]
 24327  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24328  				break
 24329  			}
 24330  			x := v_0.Args[0]
 24331  			if x.Op != OpARM64ANDconst {
 24332  				break
 24333  			}
 24334  			c := auxIntToInt64(x.AuxInt)
 24335  			y := x.Args[0]
 24336  			if !(x.Uses == 1) {
 24337  				break
 24338  			}
 24339  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 24340  			v0.AuxInt = int64ToAuxInt(c)
 24341  			v0.AddArg(y)
 24342  			b.resetWithControl(BlockARM64LT, v0)
 24343  			return true
 24344  		}
 24345  		// match: (LT (CMPWconst [0] z:(AND x y)) yes no)
 24346  		// cond: z.Uses == 1
 24347  		// result: (LT (TSTW x y) yes no)
 24348  		for b.Controls[0].Op == OpARM64CMPWconst {
 24349  			v_0 := b.Controls[0]
 24350  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24351  				break
 24352  			}
 24353  			z := v_0.Args[0]
 24354  			if z.Op != OpARM64AND {
 24355  				break
 24356  			}
 24357  			_ = z.Args[1]
 24358  			z_0 := z.Args[0]
 24359  			z_1 := z.Args[1]
 24360  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24361  				x := z_0
 24362  				y := z_1
 24363  				if !(z.Uses == 1) {
 24364  					continue
 24365  				}
 24366  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 24367  				v0.AddArg2(x, y)
 24368  				b.resetWithControl(BlockARM64LT, v0)
 24369  				return true
 24370  			}
 24371  			break
 24372  		}
 24373  		// match: (LT (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 24374  		// cond: x.Uses == 1
 24375  		// result: (LT (TSTWconst [int32(c)] y) yes no)
 24376  		for b.Controls[0].Op == OpARM64CMPWconst {
 24377  			v_0 := b.Controls[0]
 24378  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24379  				break
 24380  			}
 24381  			x := v_0.Args[0]
 24382  			if x.Op != OpARM64ANDconst {
 24383  				break
 24384  			}
 24385  			c := auxIntToInt64(x.AuxInt)
 24386  			y := x.Args[0]
 24387  			if !(x.Uses == 1) {
 24388  				break
 24389  			}
 24390  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 24391  			v0.AuxInt = int32ToAuxInt(int32(c))
 24392  			v0.AddArg(y)
 24393  			b.resetWithControl(BlockARM64LT, v0)
 24394  			return true
 24395  		}
 24396  		// match: (LT (CMPconst [0] x:(ADDconst [c] y)) yes no)
 24397  		// cond: x.Uses == 1
 24398  		// result: (LTnoov (CMNconst [c] y) yes no)
 24399  		for b.Controls[0].Op == OpARM64CMPconst {
 24400  			v_0 := b.Controls[0]
 24401  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24402  				break
 24403  			}
 24404  			x := v_0.Args[0]
 24405  			if x.Op != OpARM64ADDconst {
 24406  				break
 24407  			}
 24408  			c := auxIntToInt64(x.AuxInt)
 24409  			y := x.Args[0]
 24410  			if !(x.Uses == 1) {
 24411  				break
 24412  			}
 24413  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 24414  			v0.AuxInt = int64ToAuxInt(c)
 24415  			v0.AddArg(y)
 24416  			b.resetWithControl(BlockARM64LTnoov, v0)
 24417  			return true
 24418  		}
 24419  		// match: (LT (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 24420  		// cond: x.Uses == 1
 24421  		// result: (LTnoov (CMNWconst [int32(c)] y) yes no)
 24422  		for b.Controls[0].Op == OpARM64CMPWconst {
 24423  			v_0 := b.Controls[0]
 24424  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24425  				break
 24426  			}
 24427  			x := v_0.Args[0]
 24428  			if x.Op != OpARM64ADDconst {
 24429  				break
 24430  			}
 24431  			c := auxIntToInt64(x.AuxInt)
 24432  			y := x.Args[0]
 24433  			if !(x.Uses == 1) {
 24434  				break
 24435  			}
 24436  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 24437  			v0.AuxInt = int32ToAuxInt(int32(c))
 24438  			v0.AddArg(y)
 24439  			b.resetWithControl(BlockARM64LTnoov, v0)
 24440  			return true
 24441  		}
 24442  		// match: (LT (CMPconst [0] z:(ADD x y)) yes no)
 24443  		// cond: z.Uses == 1
 24444  		// result: (LTnoov (CMN x y) yes no)
 24445  		for b.Controls[0].Op == OpARM64CMPconst {
 24446  			v_0 := b.Controls[0]
 24447  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24448  				break
 24449  			}
 24450  			z := v_0.Args[0]
 24451  			if z.Op != OpARM64ADD {
 24452  				break
 24453  			}
 24454  			_ = z.Args[1]
 24455  			z_0 := z.Args[0]
 24456  			z_1 := z.Args[1]
 24457  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24458  				x := z_0
 24459  				y := z_1
 24460  				if !(z.Uses == 1) {
 24461  					continue
 24462  				}
 24463  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24464  				v0.AddArg2(x, y)
 24465  				b.resetWithControl(BlockARM64LTnoov, v0)
 24466  				return true
 24467  			}
 24468  			break
 24469  		}
 24470  		// match: (LT (CMPWconst [0] z:(ADD x y)) yes no)
 24471  		// cond: z.Uses == 1
 24472  		// result: (LTnoov (CMNW x y) yes no)
 24473  		for b.Controls[0].Op == OpARM64CMPWconst {
 24474  			v_0 := b.Controls[0]
 24475  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24476  				break
 24477  			}
 24478  			z := v_0.Args[0]
 24479  			if z.Op != OpARM64ADD {
 24480  				break
 24481  			}
 24482  			_ = z.Args[1]
 24483  			z_0 := z.Args[0]
 24484  			z_1 := z.Args[1]
 24485  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24486  				x := z_0
 24487  				y := z_1
 24488  				if !(z.Uses == 1) {
 24489  					continue
 24490  				}
 24491  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24492  				v0.AddArg2(x, y)
 24493  				b.resetWithControl(BlockARM64LTnoov, v0)
 24494  				return true
 24495  			}
 24496  			break
 24497  		}
 24498  		// match: (LT (CMPconst [0] z:(MADD a x y)) yes no)
 24499  		// cond: z.Uses==1
 24500  		// result: (LTnoov (CMN a (MUL <x.Type> x y)) yes no)
 24501  		for b.Controls[0].Op == OpARM64CMPconst {
 24502  			v_0 := b.Controls[0]
 24503  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24504  				break
 24505  			}
 24506  			z := v_0.Args[0]
 24507  			if z.Op != OpARM64MADD {
 24508  				break
 24509  			}
 24510  			y := z.Args[2]
 24511  			a := z.Args[0]
 24512  			x := z.Args[1]
 24513  			if !(z.Uses == 1) {
 24514  				break
 24515  			}
 24516  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24517  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 24518  			v1.AddArg2(x, y)
 24519  			v0.AddArg2(a, v1)
 24520  			b.resetWithControl(BlockARM64LTnoov, v0)
 24521  			return true
 24522  		}
 24523  		// match: (LT (CMPconst [0] z:(MSUB a x y)) yes no)
 24524  		// cond: z.Uses==1
 24525  		// result: (LTnoov (CMP a (MUL <x.Type> x y)) yes no)
 24526  		for b.Controls[0].Op == OpARM64CMPconst {
 24527  			v_0 := b.Controls[0]
 24528  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24529  				break
 24530  			}
 24531  			z := v_0.Args[0]
 24532  			if z.Op != OpARM64MSUB {
 24533  				break
 24534  			}
 24535  			y := z.Args[2]
 24536  			a := z.Args[0]
 24537  			x := z.Args[1]
 24538  			if !(z.Uses == 1) {
 24539  				break
 24540  			}
 24541  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 24542  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 24543  			v1.AddArg2(x, y)
 24544  			v0.AddArg2(a, v1)
 24545  			b.resetWithControl(BlockARM64LTnoov, v0)
 24546  			return true
 24547  		}
 24548  		// match: (LT (CMPWconst [0] z:(MADDW a x y)) yes no)
 24549  		// cond: z.Uses==1
 24550  		// result: (LTnoov (CMNW a (MULW <x.Type> x y)) yes no)
 24551  		for b.Controls[0].Op == OpARM64CMPWconst {
 24552  			v_0 := b.Controls[0]
 24553  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24554  				break
 24555  			}
 24556  			z := v_0.Args[0]
 24557  			if z.Op != OpARM64MADDW {
 24558  				break
 24559  			}
 24560  			y := z.Args[2]
 24561  			a := z.Args[0]
 24562  			x := z.Args[1]
 24563  			if !(z.Uses == 1) {
 24564  				break
 24565  			}
 24566  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24567  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 24568  			v1.AddArg2(x, y)
 24569  			v0.AddArg2(a, v1)
 24570  			b.resetWithControl(BlockARM64LTnoov, v0)
 24571  			return true
 24572  		}
 24573  		// match: (LT (CMPWconst [0] z:(MSUBW a x y)) yes no)
 24574  		// cond: z.Uses==1
 24575  		// result: (LTnoov (CMPW a (MULW <x.Type> x y)) yes no)
 24576  		for b.Controls[0].Op == OpARM64CMPWconst {
 24577  			v_0 := b.Controls[0]
 24578  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24579  				break
 24580  			}
 24581  			z := v_0.Args[0]
 24582  			if z.Op != OpARM64MSUBW {
 24583  				break
 24584  			}
 24585  			y := z.Args[2]
 24586  			a := z.Args[0]
 24587  			x := z.Args[1]
 24588  			if !(z.Uses == 1) {
 24589  				break
 24590  			}
 24591  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 24592  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 24593  			v1.AddArg2(x, y)
 24594  			v0.AddArg2(a, v1)
 24595  			b.resetWithControl(BlockARM64LTnoov, v0)
 24596  			return true
 24597  		}
 24598  		// match: (LT (CMPWconst [0] x) yes no)
 24599  		// result: (TBNZ [31] x yes no)
 24600  		for b.Controls[0].Op == OpARM64CMPWconst {
 24601  			v_0 := b.Controls[0]
 24602  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24603  				break
 24604  			}
 24605  			x := v_0.Args[0]
 24606  			b.resetWithControl(BlockARM64TBNZ, x)
 24607  			b.AuxInt = int64ToAuxInt(31)
 24608  			return true
 24609  		}
 24610  		// match: (LT (CMPconst [0] x) yes no)
 24611  		// result: (TBNZ [63] x yes no)
 24612  		for b.Controls[0].Op == OpARM64CMPconst {
 24613  			v_0 := b.Controls[0]
 24614  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24615  				break
 24616  			}
 24617  			x := v_0.Args[0]
 24618  			b.resetWithControl(BlockARM64TBNZ, x)
 24619  			b.AuxInt = int64ToAuxInt(63)
 24620  			return true
 24621  		}
 24622  		// match: (LT (FlagConstant [fc]) yes no)
 24623  		// cond: fc.lt()
 24624  		// result: (First yes no)
 24625  		for b.Controls[0].Op == OpARM64FlagConstant {
 24626  			v_0 := b.Controls[0]
 24627  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24628  			if !(fc.lt()) {
 24629  				break
 24630  			}
 24631  			b.Reset(BlockFirst)
 24632  			return true
 24633  		}
 24634  		// match: (LT (FlagConstant [fc]) yes no)
 24635  		// cond: !fc.lt()
 24636  		// result: (First no yes)
 24637  		for b.Controls[0].Op == OpARM64FlagConstant {
 24638  			v_0 := b.Controls[0]
 24639  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24640  			if !(!fc.lt()) {
 24641  				break
 24642  			}
 24643  			b.Reset(BlockFirst)
 24644  			b.swapSuccessors()
 24645  			return true
 24646  		}
 24647  		// match: (LT (InvertFlags cmp) yes no)
 24648  		// result: (GT cmp yes no)
 24649  		for b.Controls[0].Op == OpARM64InvertFlags {
 24650  			v_0 := b.Controls[0]
 24651  			cmp := v_0.Args[0]
 24652  			b.resetWithControl(BlockARM64GT, cmp)
 24653  			return true
 24654  		}
 24655  	case BlockARM64LTnoov:
 24656  		// match: (LTnoov (FlagConstant [fc]) yes no)
 24657  		// cond: fc.ltNoov()
 24658  		// result: (First yes no)
 24659  		for b.Controls[0].Op == OpARM64FlagConstant {
 24660  			v_0 := b.Controls[0]
 24661  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24662  			if !(fc.ltNoov()) {
 24663  				break
 24664  			}
 24665  			b.Reset(BlockFirst)
 24666  			return true
 24667  		}
 24668  		// match: (LTnoov (FlagConstant [fc]) yes no)
 24669  		// cond: !fc.ltNoov()
 24670  		// result: (First no yes)
 24671  		for b.Controls[0].Op == OpARM64FlagConstant {
 24672  			v_0 := b.Controls[0]
 24673  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24674  			if !(!fc.ltNoov()) {
 24675  				break
 24676  			}
 24677  			b.Reset(BlockFirst)
 24678  			b.swapSuccessors()
 24679  			return true
 24680  		}
 24681  		// match: (LTnoov (InvertFlags cmp) yes no)
 24682  		// result: (GTnoov cmp yes no)
 24683  		for b.Controls[0].Op == OpARM64InvertFlags {
 24684  			v_0 := b.Controls[0]
 24685  			cmp := v_0.Args[0]
 24686  			b.resetWithControl(BlockARM64GTnoov, cmp)
 24687  			return true
 24688  		}
 24689  	case BlockARM64NE:
 24690  		// match: (NE (CMPconst [0] z:(AND x y)) yes no)
 24691  		// cond: z.Uses == 1
 24692  		// result: (NE (TST x y) yes no)
 24693  		for b.Controls[0].Op == OpARM64CMPconst {
 24694  			v_0 := b.Controls[0]
 24695  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24696  				break
 24697  			}
 24698  			z := v_0.Args[0]
 24699  			if z.Op != OpARM64AND {
 24700  				break
 24701  			}
 24702  			_ = z.Args[1]
 24703  			z_0 := z.Args[0]
 24704  			z_1 := z.Args[1]
 24705  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24706  				x := z_0
 24707  				y := z_1
 24708  				if !(z.Uses == 1) {
 24709  					continue
 24710  				}
 24711  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 24712  				v0.AddArg2(x, y)
 24713  				b.resetWithControl(BlockARM64NE, v0)
 24714  				return true
 24715  			}
 24716  			break
 24717  		}
 24718  		// match: (NE (CMPconst [0] x:(ANDconst [c] y)) yes no)
 24719  		// cond: x.Uses == 1
 24720  		// result: (NE (TSTconst [c] y) yes no)
 24721  		for b.Controls[0].Op == OpARM64CMPconst {
 24722  			v_0 := b.Controls[0]
 24723  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24724  				break
 24725  			}
 24726  			x := v_0.Args[0]
 24727  			if x.Op != OpARM64ANDconst {
 24728  				break
 24729  			}
 24730  			c := auxIntToInt64(x.AuxInt)
 24731  			y := x.Args[0]
 24732  			if !(x.Uses == 1) {
 24733  				break
 24734  			}
 24735  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 24736  			v0.AuxInt = int64ToAuxInt(c)
 24737  			v0.AddArg(y)
 24738  			b.resetWithControl(BlockARM64NE, v0)
 24739  			return true
 24740  		}
 24741  		// match: (NE (CMPWconst [0] z:(AND x y)) yes no)
 24742  		// cond: z.Uses == 1
 24743  		// result: (NE (TSTW x y) yes no)
 24744  		for b.Controls[0].Op == OpARM64CMPWconst {
 24745  			v_0 := b.Controls[0]
 24746  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24747  				break
 24748  			}
 24749  			z := v_0.Args[0]
 24750  			if z.Op != OpARM64AND {
 24751  				break
 24752  			}
 24753  			_ = z.Args[1]
 24754  			z_0 := z.Args[0]
 24755  			z_1 := z.Args[1]
 24756  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24757  				x := z_0
 24758  				y := z_1
 24759  				if !(z.Uses == 1) {
 24760  					continue
 24761  				}
 24762  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 24763  				v0.AddArg2(x, y)
 24764  				b.resetWithControl(BlockARM64NE, v0)
 24765  				return true
 24766  			}
 24767  			break
 24768  		}
 24769  		// match: (NE (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 24770  		// cond: x.Uses == 1
 24771  		// result: (NE (TSTWconst [int32(c)] y) yes no)
 24772  		for b.Controls[0].Op == OpARM64CMPWconst {
 24773  			v_0 := b.Controls[0]
 24774  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24775  				break
 24776  			}
 24777  			x := v_0.Args[0]
 24778  			if x.Op != OpARM64ANDconst {
 24779  				break
 24780  			}
 24781  			c := auxIntToInt64(x.AuxInt)
 24782  			y := x.Args[0]
 24783  			if !(x.Uses == 1) {
 24784  				break
 24785  			}
 24786  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 24787  			v0.AuxInt = int32ToAuxInt(int32(c))
 24788  			v0.AddArg(y)
 24789  			b.resetWithControl(BlockARM64NE, v0)
 24790  			return true
 24791  		}
 24792  		// match: (NE (CMPconst [0] x:(ADDconst [c] y)) yes no)
 24793  		// cond: x.Uses == 1
 24794  		// result: (NE (CMNconst [c] y) yes no)
 24795  		for b.Controls[0].Op == OpARM64CMPconst {
 24796  			v_0 := b.Controls[0]
 24797  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24798  				break
 24799  			}
 24800  			x := v_0.Args[0]
 24801  			if x.Op != OpARM64ADDconst {
 24802  				break
 24803  			}
 24804  			c := auxIntToInt64(x.AuxInt)
 24805  			y := x.Args[0]
 24806  			if !(x.Uses == 1) {
 24807  				break
 24808  			}
 24809  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 24810  			v0.AuxInt = int64ToAuxInt(c)
 24811  			v0.AddArg(y)
 24812  			b.resetWithControl(BlockARM64NE, v0)
 24813  			return true
 24814  		}
 24815  		// match: (NE (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 24816  		// cond: x.Uses == 1
 24817  		// result: (NE (CMNWconst [int32(c)] y) yes no)
 24818  		for b.Controls[0].Op == OpARM64CMPWconst {
 24819  			v_0 := b.Controls[0]
 24820  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24821  				break
 24822  			}
 24823  			x := v_0.Args[0]
 24824  			if x.Op != OpARM64ADDconst {
 24825  				break
 24826  			}
 24827  			c := auxIntToInt64(x.AuxInt)
 24828  			y := x.Args[0]
 24829  			if !(x.Uses == 1) {
 24830  				break
 24831  			}
 24832  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 24833  			v0.AuxInt = int32ToAuxInt(int32(c))
 24834  			v0.AddArg(y)
 24835  			b.resetWithControl(BlockARM64NE, v0)
 24836  			return true
 24837  		}
 24838  		// match: (NE (CMPconst [0] z:(ADD x y)) yes no)
 24839  		// cond: z.Uses == 1
 24840  		// result: (NE (CMN x y) yes no)
 24841  		for b.Controls[0].Op == OpARM64CMPconst {
 24842  			v_0 := b.Controls[0]
 24843  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24844  				break
 24845  			}
 24846  			z := v_0.Args[0]
 24847  			if z.Op != OpARM64ADD {
 24848  				break
 24849  			}
 24850  			_ = z.Args[1]
 24851  			z_0 := z.Args[0]
 24852  			z_1 := z.Args[1]
 24853  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24854  				x := z_0
 24855  				y := z_1
 24856  				if !(z.Uses == 1) {
 24857  					continue
 24858  				}
 24859  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24860  				v0.AddArg2(x, y)
 24861  				b.resetWithControl(BlockARM64NE, v0)
 24862  				return true
 24863  			}
 24864  			break
 24865  		}
 24866  		// match: (NE (CMPWconst [0] z:(ADD x y)) yes no)
 24867  		// cond: z.Uses == 1
 24868  		// result: (NE (CMNW x y) yes no)
 24869  		for b.Controls[0].Op == OpARM64CMPWconst {
 24870  			v_0 := b.Controls[0]
 24871  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24872  				break
 24873  			}
 24874  			z := v_0.Args[0]
 24875  			if z.Op != OpARM64ADD {
 24876  				break
 24877  			}
 24878  			_ = z.Args[1]
 24879  			z_0 := z.Args[0]
 24880  			z_1 := z.Args[1]
 24881  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24882  				x := z_0
 24883  				y := z_1
 24884  				if !(z.Uses == 1) {
 24885  					continue
 24886  				}
 24887  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24888  				v0.AddArg2(x, y)
 24889  				b.resetWithControl(BlockARM64NE, v0)
 24890  				return true
 24891  			}
 24892  			break
 24893  		}
 24894  		// match: (NE (CMP x z:(NEG y)) yes no)
 24895  		// cond: z.Uses == 1
 24896  		// result: (NE (CMN x y) yes no)
 24897  		for b.Controls[0].Op == OpARM64CMP {
 24898  			v_0 := b.Controls[0]
 24899  			_ = v_0.Args[1]
 24900  			x := v_0.Args[0]
 24901  			z := v_0.Args[1]
 24902  			if z.Op != OpARM64NEG {
 24903  				break
 24904  			}
 24905  			y := z.Args[0]
 24906  			if !(z.Uses == 1) {
 24907  				break
 24908  			}
 24909  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24910  			v0.AddArg2(x, y)
 24911  			b.resetWithControl(BlockARM64NE, v0)
 24912  			return true
 24913  		}
 24914  		// match: (NE (CMPW x z:(NEG y)) yes no)
 24915  		// cond: z.Uses == 1
 24916  		// result: (NE (CMNW x y) yes no)
 24917  		for b.Controls[0].Op == OpARM64CMPW {
 24918  			v_0 := b.Controls[0]
 24919  			_ = v_0.Args[1]
 24920  			x := v_0.Args[0]
 24921  			z := v_0.Args[1]
 24922  			if z.Op != OpARM64NEG {
 24923  				break
 24924  			}
 24925  			y := z.Args[0]
 24926  			if !(z.Uses == 1) {
 24927  				break
 24928  			}
 24929  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24930  			v0.AddArg2(x, y)
 24931  			b.resetWithControl(BlockARM64NE, v0)
 24932  			return true
 24933  		}
 24934  		// match: (NE (CMPconst [0] x) yes no)
 24935  		// result: (NZ x yes no)
 24936  		for b.Controls[0].Op == OpARM64CMPconst {
 24937  			v_0 := b.Controls[0]
 24938  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24939  				break
 24940  			}
 24941  			x := v_0.Args[0]
 24942  			b.resetWithControl(BlockARM64NZ, x)
 24943  			return true
 24944  		}
 24945  		// match: (NE (CMPWconst [0] x) yes no)
 24946  		// result: (NZW x yes no)
 24947  		for b.Controls[0].Op == OpARM64CMPWconst {
 24948  			v_0 := b.Controls[0]
 24949  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24950  				break
 24951  			}
 24952  			x := v_0.Args[0]
 24953  			b.resetWithControl(BlockARM64NZW, x)
 24954  			return true
 24955  		}
 24956  		// match: (NE (CMPconst [0] z:(MADD a x y)) yes no)
 24957  		// cond: z.Uses==1
 24958  		// result: (NE (CMN a (MUL <x.Type> x y)) yes no)
 24959  		for b.Controls[0].Op == OpARM64CMPconst {
 24960  			v_0 := b.Controls[0]
 24961  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24962  				break
 24963  			}
 24964  			z := v_0.Args[0]
 24965  			if z.Op != OpARM64MADD {
 24966  				break
 24967  			}
 24968  			y := z.Args[2]
 24969  			a := z.Args[0]
 24970  			x := z.Args[1]
 24971  			if !(z.Uses == 1) {
 24972  				break
 24973  			}
 24974  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24975  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 24976  			v1.AddArg2(x, y)
 24977  			v0.AddArg2(a, v1)
 24978  			b.resetWithControl(BlockARM64NE, v0)
 24979  			return true
 24980  		}
 24981  		// match: (NE (CMPconst [0] z:(MSUB a x y)) yes no)
 24982  		// cond: z.Uses==1
 24983  		// result: (NE (CMP a (MUL <x.Type> x y)) yes no)
 24984  		for b.Controls[0].Op == OpARM64CMPconst {
 24985  			v_0 := b.Controls[0]
 24986  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24987  				break
 24988  			}
 24989  			z := v_0.Args[0]
 24990  			if z.Op != OpARM64MSUB {
 24991  				break
 24992  			}
 24993  			y := z.Args[2]
 24994  			a := z.Args[0]
 24995  			x := z.Args[1]
 24996  			if !(z.Uses == 1) {
 24997  				break
 24998  			}
 24999  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 25000  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 25001  			v1.AddArg2(x, y)
 25002  			v0.AddArg2(a, v1)
 25003  			b.resetWithControl(BlockARM64NE, v0)
 25004  			return true
 25005  		}
 25006  		// match: (NE (CMPWconst [0] z:(MADDW a x y)) yes no)
 25007  		// cond: z.Uses==1
 25008  		// result: (NE (CMNW a (MULW <x.Type> x y)) yes no)
 25009  		for b.Controls[0].Op == OpARM64CMPWconst {
 25010  			v_0 := b.Controls[0]
 25011  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25012  				break
 25013  			}
 25014  			z := v_0.Args[0]
 25015  			if z.Op != OpARM64MADDW {
 25016  				break
 25017  			}
 25018  			y := z.Args[2]
 25019  			a := z.Args[0]
 25020  			x := z.Args[1]
 25021  			if !(z.Uses == 1) {
 25022  				break
 25023  			}
 25024  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 25025  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 25026  			v1.AddArg2(x, y)
 25027  			v0.AddArg2(a, v1)
 25028  			b.resetWithControl(BlockARM64NE, v0)
 25029  			return true
 25030  		}
 25031  		// match: (NE (CMPWconst [0] z:(MSUBW a x y)) yes no)
 25032  		// cond: z.Uses==1
 25033  		// result: (NE (CMPW a (MULW <x.Type> x y)) yes no)
 25034  		for b.Controls[0].Op == OpARM64CMPWconst {
 25035  			v_0 := b.Controls[0]
 25036  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25037  				break
 25038  			}
 25039  			z := v_0.Args[0]
 25040  			if z.Op != OpARM64MSUBW {
 25041  				break
 25042  			}
 25043  			y := z.Args[2]
 25044  			a := z.Args[0]
 25045  			x := z.Args[1]
 25046  			if !(z.Uses == 1) {
 25047  				break
 25048  			}
 25049  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 25050  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 25051  			v1.AddArg2(x, y)
 25052  			v0.AddArg2(a, v1)
 25053  			b.resetWithControl(BlockARM64NE, v0)
 25054  			return true
 25055  		}
 25056  		// match: (NE (TSTconst [c] x) yes no)
 25057  		// cond: oneBit(c)
 25058  		// result: (TBNZ [int64(ntz64(c))] x yes no)
 25059  		for b.Controls[0].Op == OpARM64TSTconst {
 25060  			v_0 := b.Controls[0]
 25061  			c := auxIntToInt64(v_0.AuxInt)
 25062  			x := v_0.Args[0]
 25063  			if !(oneBit(c)) {
 25064  				break
 25065  			}
 25066  			b.resetWithControl(BlockARM64TBNZ, x)
 25067  			b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
 25068  			return true
 25069  		}
 25070  		// match: (NE (TSTWconst [c] x) yes no)
 25071  		// cond: oneBit(int64(uint32(c)))
 25072  		// result: (TBNZ [int64(ntz64(int64(uint32(c))))] x yes no)
 25073  		for b.Controls[0].Op == OpARM64TSTWconst {
 25074  			v_0 := b.Controls[0]
 25075  			c := auxIntToInt32(v_0.AuxInt)
 25076  			x := v_0.Args[0]
 25077  			if !(oneBit(int64(uint32(c)))) {
 25078  				break
 25079  			}
 25080  			b.resetWithControl(BlockARM64TBNZ, x)
 25081  			b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
 25082  			return true
 25083  		}
 25084  		// match: (NE (FlagConstant [fc]) yes no)
 25085  		// cond: fc.ne()
 25086  		// result: (First yes no)
 25087  		for b.Controls[0].Op == OpARM64FlagConstant {
 25088  			v_0 := b.Controls[0]
 25089  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25090  			if !(fc.ne()) {
 25091  				break
 25092  			}
 25093  			b.Reset(BlockFirst)
 25094  			return true
 25095  		}
 25096  		// match: (NE (FlagConstant [fc]) yes no)
 25097  		// cond: !fc.ne()
 25098  		// result: (First no yes)
 25099  		for b.Controls[0].Op == OpARM64FlagConstant {
 25100  			v_0 := b.Controls[0]
 25101  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25102  			if !(!fc.ne()) {
 25103  				break
 25104  			}
 25105  			b.Reset(BlockFirst)
 25106  			b.swapSuccessors()
 25107  			return true
 25108  		}
 25109  		// match: (NE (InvertFlags cmp) yes no)
 25110  		// result: (NE cmp yes no)
 25111  		for b.Controls[0].Op == OpARM64InvertFlags {
 25112  			v_0 := b.Controls[0]
 25113  			cmp := v_0.Args[0]
 25114  			b.resetWithControl(BlockARM64NE, cmp)
 25115  			return true
 25116  		}
 25117  	case BlockARM64NZ:
 25118  		// match: (NZ (Equal cc) yes no)
 25119  		// result: (EQ cc yes no)
 25120  		for b.Controls[0].Op == OpARM64Equal {
 25121  			v_0 := b.Controls[0]
 25122  			cc := v_0.Args[0]
 25123  			b.resetWithControl(BlockARM64EQ, cc)
 25124  			return true
 25125  		}
 25126  		// match: (NZ (NotEqual cc) yes no)
 25127  		// result: (NE cc yes no)
 25128  		for b.Controls[0].Op == OpARM64NotEqual {
 25129  			v_0 := b.Controls[0]
 25130  			cc := v_0.Args[0]
 25131  			b.resetWithControl(BlockARM64NE, cc)
 25132  			return true
 25133  		}
 25134  		// match: (NZ (LessThan cc) yes no)
 25135  		// result: (LT cc yes no)
 25136  		for b.Controls[0].Op == OpARM64LessThan {
 25137  			v_0 := b.Controls[0]
 25138  			cc := v_0.Args[0]
 25139  			b.resetWithControl(BlockARM64LT, cc)
 25140  			return true
 25141  		}
 25142  		// match: (NZ (LessThanU cc) yes no)
 25143  		// result: (ULT cc yes no)
 25144  		for b.Controls[0].Op == OpARM64LessThanU {
 25145  			v_0 := b.Controls[0]
 25146  			cc := v_0.Args[0]
 25147  			b.resetWithControl(BlockARM64ULT, cc)
 25148  			return true
 25149  		}
 25150  		// match: (NZ (LessEqual cc) yes no)
 25151  		// result: (LE cc yes no)
 25152  		for b.Controls[0].Op == OpARM64LessEqual {
 25153  			v_0 := b.Controls[0]
 25154  			cc := v_0.Args[0]
 25155  			b.resetWithControl(BlockARM64LE, cc)
 25156  			return true
 25157  		}
 25158  		// match: (NZ (LessEqualU cc) yes no)
 25159  		// result: (ULE cc yes no)
 25160  		for b.Controls[0].Op == OpARM64LessEqualU {
 25161  			v_0 := b.Controls[0]
 25162  			cc := v_0.Args[0]
 25163  			b.resetWithControl(BlockARM64ULE, cc)
 25164  			return true
 25165  		}
 25166  		// match: (NZ (GreaterThan cc) yes no)
 25167  		// result: (GT cc yes no)
 25168  		for b.Controls[0].Op == OpARM64GreaterThan {
 25169  			v_0 := b.Controls[0]
 25170  			cc := v_0.Args[0]
 25171  			b.resetWithControl(BlockARM64GT, cc)
 25172  			return true
 25173  		}
 25174  		// match: (NZ (GreaterThanU cc) yes no)
 25175  		// result: (UGT cc yes no)
 25176  		for b.Controls[0].Op == OpARM64GreaterThanU {
 25177  			v_0 := b.Controls[0]
 25178  			cc := v_0.Args[0]
 25179  			b.resetWithControl(BlockARM64UGT, cc)
 25180  			return true
 25181  		}
 25182  		// match: (NZ (GreaterEqual cc) yes no)
 25183  		// result: (GE cc yes no)
 25184  		for b.Controls[0].Op == OpARM64GreaterEqual {
 25185  			v_0 := b.Controls[0]
 25186  			cc := v_0.Args[0]
 25187  			b.resetWithControl(BlockARM64GE, cc)
 25188  			return true
 25189  		}
 25190  		// match: (NZ (GreaterEqualU cc) yes no)
 25191  		// result: (UGE cc yes no)
 25192  		for b.Controls[0].Op == OpARM64GreaterEqualU {
 25193  			v_0 := b.Controls[0]
 25194  			cc := v_0.Args[0]
 25195  			b.resetWithControl(BlockARM64UGE, cc)
 25196  			return true
 25197  		}
 25198  		// match: (NZ (LessThanF cc) yes no)
 25199  		// result: (FLT cc yes no)
 25200  		for b.Controls[0].Op == OpARM64LessThanF {
 25201  			v_0 := b.Controls[0]
 25202  			cc := v_0.Args[0]
 25203  			b.resetWithControl(BlockARM64FLT, cc)
 25204  			return true
 25205  		}
 25206  		// match: (NZ (LessEqualF cc) yes no)
 25207  		// result: (FLE cc yes no)
 25208  		for b.Controls[0].Op == OpARM64LessEqualF {
 25209  			v_0 := b.Controls[0]
 25210  			cc := v_0.Args[0]
 25211  			b.resetWithControl(BlockARM64FLE, cc)
 25212  			return true
 25213  		}
 25214  		// match: (NZ (GreaterThanF cc) yes no)
 25215  		// result: (FGT cc yes no)
 25216  		for b.Controls[0].Op == OpARM64GreaterThanF {
 25217  			v_0 := b.Controls[0]
 25218  			cc := v_0.Args[0]
 25219  			b.resetWithControl(BlockARM64FGT, cc)
 25220  			return true
 25221  		}
 25222  		// match: (NZ (GreaterEqualF cc) yes no)
 25223  		// result: (FGE cc yes no)
 25224  		for b.Controls[0].Op == OpARM64GreaterEqualF {
 25225  			v_0 := b.Controls[0]
 25226  			cc := v_0.Args[0]
 25227  			b.resetWithControl(BlockARM64FGE, cc)
 25228  			return true
 25229  		}
 25230  		// match: (NZ (ANDconst [c] x) yes no)
 25231  		// cond: oneBit(c)
 25232  		// result: (TBNZ [int64(ntz64(c))] x yes no)
 25233  		for b.Controls[0].Op == OpARM64ANDconst {
 25234  			v_0 := b.Controls[0]
 25235  			c := auxIntToInt64(v_0.AuxInt)
 25236  			x := v_0.Args[0]
 25237  			if !(oneBit(c)) {
 25238  				break
 25239  			}
 25240  			b.resetWithControl(BlockARM64TBNZ, x)
 25241  			b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
 25242  			return true
 25243  		}
 25244  		// match: (NZ (MOVDconst [0]) yes no)
 25245  		// result: (First no yes)
 25246  		for b.Controls[0].Op == OpARM64MOVDconst {
 25247  			v_0 := b.Controls[0]
 25248  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25249  				break
 25250  			}
 25251  			b.Reset(BlockFirst)
 25252  			b.swapSuccessors()
 25253  			return true
 25254  		}
 25255  		// match: (NZ (MOVDconst [c]) yes no)
 25256  		// cond: c != 0
 25257  		// result: (First yes no)
 25258  		for b.Controls[0].Op == OpARM64MOVDconst {
 25259  			v_0 := b.Controls[0]
 25260  			c := auxIntToInt64(v_0.AuxInt)
 25261  			if !(c != 0) {
 25262  				break
 25263  			}
 25264  			b.Reset(BlockFirst)
 25265  			return true
 25266  		}
 25267  	case BlockARM64NZW:
 25268  		// match: (NZW (ANDconst [c] x) yes no)
 25269  		// cond: oneBit(int64(uint32(c)))
 25270  		// result: (TBNZ [int64(ntz64(int64(uint32(c))))] x yes no)
 25271  		for b.Controls[0].Op == OpARM64ANDconst {
 25272  			v_0 := b.Controls[0]
 25273  			c := auxIntToInt64(v_0.AuxInt)
 25274  			x := v_0.Args[0]
 25275  			if !(oneBit(int64(uint32(c)))) {
 25276  				break
 25277  			}
 25278  			b.resetWithControl(BlockARM64TBNZ, x)
 25279  			b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
 25280  			return true
 25281  		}
 25282  		// match: (NZW (MOVDconst [c]) yes no)
 25283  		// cond: int32(c) == 0
 25284  		// result: (First no yes)
 25285  		for b.Controls[0].Op == OpARM64MOVDconst {
 25286  			v_0 := b.Controls[0]
 25287  			c := auxIntToInt64(v_0.AuxInt)
 25288  			if !(int32(c) == 0) {
 25289  				break
 25290  			}
 25291  			b.Reset(BlockFirst)
 25292  			b.swapSuccessors()
 25293  			return true
 25294  		}
 25295  		// match: (NZW (MOVDconst [c]) yes no)
 25296  		// cond: int32(c) != 0
 25297  		// result: (First yes no)
 25298  		for b.Controls[0].Op == OpARM64MOVDconst {
 25299  			v_0 := b.Controls[0]
 25300  			c := auxIntToInt64(v_0.AuxInt)
 25301  			if !(int32(c) != 0) {
 25302  				break
 25303  			}
 25304  			b.Reset(BlockFirst)
 25305  			return true
 25306  		}
 25307  	case BlockARM64TBNZ:
 25308  		// match: (TBNZ [0] (Equal cc) yes no)
 25309  		// result: (EQ cc yes no)
 25310  		for b.Controls[0].Op == OpARM64Equal {
 25311  			v_0 := b.Controls[0]
 25312  			cc := v_0.Args[0]
 25313  			if auxIntToInt64(b.AuxInt) != 0 {
 25314  				break
 25315  			}
 25316  			b.resetWithControl(BlockARM64EQ, cc)
 25317  			return true
 25318  		}
 25319  		// match: (TBNZ [0] (NotEqual cc) yes no)
 25320  		// result: (NE cc yes no)
 25321  		for b.Controls[0].Op == OpARM64NotEqual {
 25322  			v_0 := b.Controls[0]
 25323  			cc := v_0.Args[0]
 25324  			if auxIntToInt64(b.AuxInt) != 0 {
 25325  				break
 25326  			}
 25327  			b.resetWithControl(BlockARM64NE, cc)
 25328  			return true
 25329  		}
 25330  		// match: (TBNZ [0] (LessThan cc) yes no)
 25331  		// result: (LT cc yes no)
 25332  		for b.Controls[0].Op == OpARM64LessThan {
 25333  			v_0 := b.Controls[0]
 25334  			cc := v_0.Args[0]
 25335  			if auxIntToInt64(b.AuxInt) != 0 {
 25336  				break
 25337  			}
 25338  			b.resetWithControl(BlockARM64LT, cc)
 25339  			return true
 25340  		}
 25341  		// match: (TBNZ [0] (LessThanU cc) yes no)
 25342  		// result: (ULT cc yes no)
 25343  		for b.Controls[0].Op == OpARM64LessThanU {
 25344  			v_0 := b.Controls[0]
 25345  			cc := v_0.Args[0]
 25346  			if auxIntToInt64(b.AuxInt) != 0 {
 25347  				break
 25348  			}
 25349  			b.resetWithControl(BlockARM64ULT, cc)
 25350  			return true
 25351  		}
 25352  		// match: (TBNZ [0] (LessEqual cc) yes no)
 25353  		// result: (LE cc yes no)
 25354  		for b.Controls[0].Op == OpARM64LessEqual {
 25355  			v_0 := b.Controls[0]
 25356  			cc := v_0.Args[0]
 25357  			if auxIntToInt64(b.AuxInt) != 0 {
 25358  				break
 25359  			}
 25360  			b.resetWithControl(BlockARM64LE, cc)
 25361  			return true
 25362  		}
 25363  		// match: (TBNZ [0] (LessEqualU cc) yes no)
 25364  		// result: (ULE cc yes no)
 25365  		for b.Controls[0].Op == OpARM64LessEqualU {
 25366  			v_0 := b.Controls[0]
 25367  			cc := v_0.Args[0]
 25368  			if auxIntToInt64(b.AuxInt) != 0 {
 25369  				break
 25370  			}
 25371  			b.resetWithControl(BlockARM64ULE, cc)
 25372  			return true
 25373  		}
 25374  		// match: (TBNZ [0] (GreaterThan cc) yes no)
 25375  		// result: (GT cc yes no)
 25376  		for b.Controls[0].Op == OpARM64GreaterThan {
 25377  			v_0 := b.Controls[0]
 25378  			cc := v_0.Args[0]
 25379  			if auxIntToInt64(b.AuxInt) != 0 {
 25380  				break
 25381  			}
 25382  			b.resetWithControl(BlockARM64GT, cc)
 25383  			return true
 25384  		}
 25385  		// match: (TBNZ [0] (GreaterThanU cc) yes no)
 25386  		// result: (UGT cc yes no)
 25387  		for b.Controls[0].Op == OpARM64GreaterThanU {
 25388  			v_0 := b.Controls[0]
 25389  			cc := v_0.Args[0]
 25390  			if auxIntToInt64(b.AuxInt) != 0 {
 25391  				break
 25392  			}
 25393  			b.resetWithControl(BlockARM64UGT, cc)
 25394  			return true
 25395  		}
 25396  		// match: (TBNZ [0] (GreaterEqual cc) yes no)
 25397  		// result: (GE cc yes no)
 25398  		for b.Controls[0].Op == OpARM64GreaterEqual {
 25399  			v_0 := b.Controls[0]
 25400  			cc := v_0.Args[0]
 25401  			if auxIntToInt64(b.AuxInt) != 0 {
 25402  				break
 25403  			}
 25404  			b.resetWithControl(BlockARM64GE, cc)
 25405  			return true
 25406  		}
 25407  		// match: (TBNZ [0] (GreaterEqualU cc) yes no)
 25408  		// result: (UGE cc yes no)
 25409  		for b.Controls[0].Op == OpARM64GreaterEqualU {
 25410  			v_0 := b.Controls[0]
 25411  			cc := v_0.Args[0]
 25412  			if auxIntToInt64(b.AuxInt) != 0 {
 25413  				break
 25414  			}
 25415  			b.resetWithControl(BlockARM64UGE, cc)
 25416  			return true
 25417  		}
 25418  		// match: (TBNZ [0] (LessThanF cc) yes no)
 25419  		// result: (FLT cc yes no)
 25420  		for b.Controls[0].Op == OpARM64LessThanF {
 25421  			v_0 := b.Controls[0]
 25422  			cc := v_0.Args[0]
 25423  			if auxIntToInt64(b.AuxInt) != 0 {
 25424  				break
 25425  			}
 25426  			b.resetWithControl(BlockARM64FLT, cc)
 25427  			return true
 25428  		}
 25429  		// match: (TBNZ [0] (LessEqualF cc) yes no)
 25430  		// result: (FLE cc yes no)
 25431  		for b.Controls[0].Op == OpARM64LessEqualF {
 25432  			v_0 := b.Controls[0]
 25433  			cc := v_0.Args[0]
 25434  			if auxIntToInt64(b.AuxInt) != 0 {
 25435  				break
 25436  			}
 25437  			b.resetWithControl(BlockARM64FLE, cc)
 25438  			return true
 25439  		}
 25440  		// match: (TBNZ [0] (GreaterThanF cc) yes no)
 25441  		// result: (FGT cc yes no)
 25442  		for b.Controls[0].Op == OpARM64GreaterThanF {
 25443  			v_0 := b.Controls[0]
 25444  			cc := v_0.Args[0]
 25445  			if auxIntToInt64(b.AuxInt) != 0 {
 25446  				break
 25447  			}
 25448  			b.resetWithControl(BlockARM64FGT, cc)
 25449  			return true
 25450  		}
 25451  		// match: (TBNZ [0] (GreaterEqualF cc) yes no)
 25452  		// result: (FGE cc yes no)
 25453  		for b.Controls[0].Op == OpARM64GreaterEqualF {
 25454  			v_0 := b.Controls[0]
 25455  			cc := v_0.Args[0]
 25456  			if auxIntToInt64(b.AuxInt) != 0 {
 25457  				break
 25458  			}
 25459  			b.resetWithControl(BlockARM64FGE, cc)
 25460  			return true
 25461  		}
 25462  	case BlockARM64UGE:
 25463  		// match: (UGE (FlagConstant [fc]) yes no)
 25464  		// cond: fc.uge()
 25465  		// result: (First yes no)
 25466  		for b.Controls[0].Op == OpARM64FlagConstant {
 25467  			v_0 := b.Controls[0]
 25468  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25469  			if !(fc.uge()) {
 25470  				break
 25471  			}
 25472  			b.Reset(BlockFirst)
 25473  			return true
 25474  		}
 25475  		// match: (UGE (FlagConstant [fc]) yes no)
 25476  		// cond: !fc.uge()
 25477  		// result: (First no yes)
 25478  		for b.Controls[0].Op == OpARM64FlagConstant {
 25479  			v_0 := b.Controls[0]
 25480  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25481  			if !(!fc.uge()) {
 25482  				break
 25483  			}
 25484  			b.Reset(BlockFirst)
 25485  			b.swapSuccessors()
 25486  			return true
 25487  		}
 25488  		// match: (UGE (InvertFlags cmp) yes no)
 25489  		// result: (ULE cmp yes no)
 25490  		for b.Controls[0].Op == OpARM64InvertFlags {
 25491  			v_0 := b.Controls[0]
 25492  			cmp := v_0.Args[0]
 25493  			b.resetWithControl(BlockARM64ULE, cmp)
 25494  			return true
 25495  		}
 25496  	case BlockARM64UGT:
 25497  		// match: (UGT (FlagConstant [fc]) yes no)
 25498  		// cond: fc.ugt()
 25499  		// result: (First yes no)
 25500  		for b.Controls[0].Op == OpARM64FlagConstant {
 25501  			v_0 := b.Controls[0]
 25502  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25503  			if !(fc.ugt()) {
 25504  				break
 25505  			}
 25506  			b.Reset(BlockFirst)
 25507  			return true
 25508  		}
 25509  		// match: (UGT (FlagConstant [fc]) yes no)
 25510  		// cond: !fc.ugt()
 25511  		// result: (First no yes)
 25512  		for b.Controls[0].Op == OpARM64FlagConstant {
 25513  			v_0 := b.Controls[0]
 25514  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25515  			if !(!fc.ugt()) {
 25516  				break
 25517  			}
 25518  			b.Reset(BlockFirst)
 25519  			b.swapSuccessors()
 25520  			return true
 25521  		}
 25522  		// match: (UGT (InvertFlags cmp) yes no)
 25523  		// result: (ULT cmp yes no)
 25524  		for b.Controls[0].Op == OpARM64InvertFlags {
 25525  			v_0 := b.Controls[0]
 25526  			cmp := v_0.Args[0]
 25527  			b.resetWithControl(BlockARM64ULT, cmp)
 25528  			return true
 25529  		}
 25530  	case BlockARM64ULE:
 25531  		// match: (ULE (FlagConstant [fc]) yes no)
 25532  		// cond: fc.ule()
 25533  		// result: (First yes no)
 25534  		for b.Controls[0].Op == OpARM64FlagConstant {
 25535  			v_0 := b.Controls[0]
 25536  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25537  			if !(fc.ule()) {
 25538  				break
 25539  			}
 25540  			b.Reset(BlockFirst)
 25541  			return true
 25542  		}
 25543  		// match: (ULE (FlagConstant [fc]) yes no)
 25544  		// cond: !fc.ule()
 25545  		// result: (First no yes)
 25546  		for b.Controls[0].Op == OpARM64FlagConstant {
 25547  			v_0 := b.Controls[0]
 25548  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25549  			if !(!fc.ule()) {
 25550  				break
 25551  			}
 25552  			b.Reset(BlockFirst)
 25553  			b.swapSuccessors()
 25554  			return true
 25555  		}
 25556  		// match: (ULE (InvertFlags cmp) yes no)
 25557  		// result: (UGE cmp yes no)
 25558  		for b.Controls[0].Op == OpARM64InvertFlags {
 25559  			v_0 := b.Controls[0]
 25560  			cmp := v_0.Args[0]
 25561  			b.resetWithControl(BlockARM64UGE, cmp)
 25562  			return true
 25563  		}
 25564  	case BlockARM64ULT:
 25565  		// match: (ULT (FlagConstant [fc]) yes no)
 25566  		// cond: fc.ult()
 25567  		// result: (First yes no)
 25568  		for b.Controls[0].Op == OpARM64FlagConstant {
 25569  			v_0 := b.Controls[0]
 25570  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25571  			if !(fc.ult()) {
 25572  				break
 25573  			}
 25574  			b.Reset(BlockFirst)
 25575  			return true
 25576  		}
 25577  		// match: (ULT (FlagConstant [fc]) yes no)
 25578  		// cond: !fc.ult()
 25579  		// result: (First no yes)
 25580  		for b.Controls[0].Op == OpARM64FlagConstant {
 25581  			v_0 := b.Controls[0]
 25582  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25583  			if !(!fc.ult()) {
 25584  				break
 25585  			}
 25586  			b.Reset(BlockFirst)
 25587  			b.swapSuccessors()
 25588  			return true
 25589  		}
 25590  		// match: (ULT (InvertFlags cmp) yes no)
 25591  		// result: (UGT cmp yes no)
 25592  		for b.Controls[0].Op == OpARM64InvertFlags {
 25593  			v_0 := b.Controls[0]
 25594  			cmp := v_0.Args[0]
 25595  			b.resetWithControl(BlockARM64UGT, cmp)
 25596  			return true
 25597  		}
 25598  	case BlockARM64Z:
 25599  		// match: (Z (ANDconst [c] x) yes no)
 25600  		// cond: oneBit(c)
 25601  		// result: (TBZ [int64(ntz64(c))] x yes no)
 25602  		for b.Controls[0].Op == OpARM64ANDconst {
 25603  			v_0 := b.Controls[0]
 25604  			c := auxIntToInt64(v_0.AuxInt)
 25605  			x := v_0.Args[0]
 25606  			if !(oneBit(c)) {
 25607  				break
 25608  			}
 25609  			b.resetWithControl(BlockARM64TBZ, x)
 25610  			b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
 25611  			return true
 25612  		}
 25613  		// match: (Z (MOVDconst [0]) yes no)
 25614  		// result: (First yes no)
 25615  		for b.Controls[0].Op == OpARM64MOVDconst {
 25616  			v_0 := b.Controls[0]
 25617  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25618  				break
 25619  			}
 25620  			b.Reset(BlockFirst)
 25621  			return true
 25622  		}
 25623  		// match: (Z (MOVDconst [c]) yes no)
 25624  		// cond: c != 0
 25625  		// result: (First no yes)
 25626  		for b.Controls[0].Op == OpARM64MOVDconst {
 25627  			v_0 := b.Controls[0]
 25628  			c := auxIntToInt64(v_0.AuxInt)
 25629  			if !(c != 0) {
 25630  				break
 25631  			}
 25632  			b.Reset(BlockFirst)
 25633  			b.swapSuccessors()
 25634  			return true
 25635  		}
 25636  	case BlockARM64ZW:
 25637  		// match: (ZW (ANDconst [c] x) yes no)
 25638  		// cond: oneBit(int64(uint32(c)))
 25639  		// result: (TBZ [int64(ntz64(int64(uint32(c))))] x yes no)
 25640  		for b.Controls[0].Op == OpARM64ANDconst {
 25641  			v_0 := b.Controls[0]
 25642  			c := auxIntToInt64(v_0.AuxInt)
 25643  			x := v_0.Args[0]
 25644  			if !(oneBit(int64(uint32(c)))) {
 25645  				break
 25646  			}
 25647  			b.resetWithControl(BlockARM64TBZ, x)
 25648  			b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
 25649  			return true
 25650  		}
 25651  		// match: (ZW (MOVDconst [c]) yes no)
 25652  		// cond: int32(c) == 0
 25653  		// result: (First yes no)
 25654  		for b.Controls[0].Op == OpARM64MOVDconst {
 25655  			v_0 := b.Controls[0]
 25656  			c := auxIntToInt64(v_0.AuxInt)
 25657  			if !(int32(c) == 0) {
 25658  				break
 25659  			}
 25660  			b.Reset(BlockFirst)
 25661  			return true
 25662  		}
 25663  		// match: (ZW (MOVDconst [c]) yes no)
 25664  		// cond: int32(c) != 0
 25665  		// result: (First no yes)
 25666  		for b.Controls[0].Op == OpARM64MOVDconst {
 25667  			v_0 := b.Controls[0]
 25668  			c := auxIntToInt64(v_0.AuxInt)
 25669  			if !(int32(c) != 0) {
 25670  				break
 25671  			}
 25672  			b.Reset(BlockFirst)
 25673  			b.swapSuccessors()
 25674  			return true
 25675  		}
 25676  	}
 25677  	return false
 25678  }
 25679  

View as plain text