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 OpARM64FCVTDS:
   110  		return rewriteValueARM64_OpARM64FCVTDS(v)
   111  	case OpARM64FLDPQ:
   112  		return rewriteValueARM64_OpARM64FLDPQ(v)
   113  	case OpARM64FMOVDfpgp:
   114  		return rewriteValueARM64_OpARM64FMOVDfpgp(v)
   115  	case OpARM64FMOVDgpfp:
   116  		return rewriteValueARM64_OpARM64FMOVDgpfp(v)
   117  	case OpARM64FMOVDload:
   118  		return rewriteValueARM64_OpARM64FMOVDload(v)
   119  	case OpARM64FMOVDloadidx:
   120  		return rewriteValueARM64_OpARM64FMOVDloadidx(v)
   121  	case OpARM64FMOVDloadidx8:
   122  		return rewriteValueARM64_OpARM64FMOVDloadidx8(v)
   123  	case OpARM64FMOVDstore:
   124  		return rewriteValueARM64_OpARM64FMOVDstore(v)
   125  	case OpARM64FMOVDstoreidx:
   126  		return rewriteValueARM64_OpARM64FMOVDstoreidx(v)
   127  	case OpARM64FMOVDstoreidx8:
   128  		return rewriteValueARM64_OpARM64FMOVDstoreidx8(v)
   129  	case OpARM64FMOVQload:
   130  		return rewriteValueARM64_OpARM64FMOVQload(v)
   131  	case OpARM64FMOVQstore:
   132  		return rewriteValueARM64_OpARM64FMOVQstore(v)
   133  	case OpARM64FMOVSload:
   134  		return rewriteValueARM64_OpARM64FMOVSload(v)
   135  	case OpARM64FMOVSloadidx:
   136  		return rewriteValueARM64_OpARM64FMOVSloadidx(v)
   137  	case OpARM64FMOVSloadidx4:
   138  		return rewriteValueARM64_OpARM64FMOVSloadidx4(v)
   139  	case OpARM64FMOVSstore:
   140  		return rewriteValueARM64_OpARM64FMOVSstore(v)
   141  	case OpARM64FMOVSstoreidx:
   142  		return rewriteValueARM64_OpARM64FMOVSstoreidx(v)
   143  	case OpARM64FMOVSstoreidx4:
   144  		return rewriteValueARM64_OpARM64FMOVSstoreidx4(v)
   145  	case OpARM64FMULD:
   146  		return rewriteValueARM64_OpARM64FMULD(v)
   147  	case OpARM64FMULS:
   148  		return rewriteValueARM64_OpARM64FMULS(v)
   149  	case OpARM64FNEGD:
   150  		return rewriteValueARM64_OpARM64FNEGD(v)
   151  	case OpARM64FNEGS:
   152  		return rewriteValueARM64_OpARM64FNEGS(v)
   153  	case OpARM64FNMULD:
   154  		return rewriteValueARM64_OpARM64FNMULD(v)
   155  	case OpARM64FNMULS:
   156  		return rewriteValueARM64_OpARM64FNMULS(v)
   157  	case OpARM64FSTPQ:
   158  		return rewriteValueARM64_OpARM64FSTPQ(v)
   159  	case OpARM64FSUBD:
   160  		return rewriteValueARM64_OpARM64FSUBD(v)
   161  	case OpARM64FSUBS:
   162  		return rewriteValueARM64_OpARM64FSUBS(v)
   163  	case OpARM64GreaterEqual:
   164  		return rewriteValueARM64_OpARM64GreaterEqual(v)
   165  	case OpARM64GreaterEqualF:
   166  		return rewriteValueARM64_OpARM64GreaterEqualF(v)
   167  	case OpARM64GreaterEqualNoov:
   168  		return rewriteValueARM64_OpARM64GreaterEqualNoov(v)
   169  	case OpARM64GreaterEqualU:
   170  		return rewriteValueARM64_OpARM64GreaterEqualU(v)
   171  	case OpARM64GreaterThan:
   172  		return rewriteValueARM64_OpARM64GreaterThan(v)
   173  	case OpARM64GreaterThanF:
   174  		return rewriteValueARM64_OpARM64GreaterThanF(v)
   175  	case OpARM64GreaterThanU:
   176  		return rewriteValueARM64_OpARM64GreaterThanU(v)
   177  	case OpARM64LDP:
   178  		return rewriteValueARM64_OpARM64LDP(v)
   179  	case OpARM64LessEqual:
   180  		return rewriteValueARM64_OpARM64LessEqual(v)
   181  	case OpARM64LessEqualF:
   182  		return rewriteValueARM64_OpARM64LessEqualF(v)
   183  	case OpARM64LessEqualU:
   184  		return rewriteValueARM64_OpARM64LessEqualU(v)
   185  	case OpARM64LessThan:
   186  		return rewriteValueARM64_OpARM64LessThan(v)
   187  	case OpARM64LessThanF:
   188  		return rewriteValueARM64_OpARM64LessThanF(v)
   189  	case OpARM64LessThanNoov:
   190  		return rewriteValueARM64_OpARM64LessThanNoov(v)
   191  	case OpARM64LessThanU:
   192  		return rewriteValueARM64_OpARM64LessThanU(v)
   193  	case OpARM64LoweredPanicBoundsCR:
   194  		return rewriteValueARM64_OpARM64LoweredPanicBoundsCR(v)
   195  	case OpARM64LoweredPanicBoundsRC:
   196  		return rewriteValueARM64_OpARM64LoweredPanicBoundsRC(v)
   197  	case OpARM64LoweredPanicBoundsRR:
   198  		return rewriteValueARM64_OpARM64LoweredPanicBoundsRR(v)
   199  	case OpARM64MADD:
   200  		return rewriteValueARM64_OpARM64MADD(v)
   201  	case OpARM64MADDW:
   202  		return rewriteValueARM64_OpARM64MADDW(v)
   203  	case OpARM64MNEG:
   204  		return rewriteValueARM64_OpARM64MNEG(v)
   205  	case OpARM64MNEGW:
   206  		return rewriteValueARM64_OpARM64MNEGW(v)
   207  	case OpARM64MOD:
   208  		return rewriteValueARM64_OpARM64MOD(v)
   209  	case OpARM64MODW:
   210  		return rewriteValueARM64_OpARM64MODW(v)
   211  	case OpARM64MOVBUload:
   212  		return rewriteValueARM64_OpARM64MOVBUload(v)
   213  	case OpARM64MOVBUloadidx:
   214  		return rewriteValueARM64_OpARM64MOVBUloadidx(v)
   215  	case OpARM64MOVBUreg:
   216  		return rewriteValueARM64_OpARM64MOVBUreg(v)
   217  	case OpARM64MOVBload:
   218  		return rewriteValueARM64_OpARM64MOVBload(v)
   219  	case OpARM64MOVBloadidx:
   220  		return rewriteValueARM64_OpARM64MOVBloadidx(v)
   221  	case OpARM64MOVBreg:
   222  		return rewriteValueARM64_OpARM64MOVBreg(v)
   223  	case OpARM64MOVBstore:
   224  		return rewriteValueARM64_OpARM64MOVBstore(v)
   225  	case OpARM64MOVBstoreidx:
   226  		return rewriteValueARM64_OpARM64MOVBstoreidx(v)
   227  	case OpARM64MOVDload:
   228  		return rewriteValueARM64_OpARM64MOVDload(v)
   229  	case OpARM64MOVDloadidx:
   230  		return rewriteValueARM64_OpARM64MOVDloadidx(v)
   231  	case OpARM64MOVDloadidx8:
   232  		return rewriteValueARM64_OpARM64MOVDloadidx8(v)
   233  	case OpARM64MOVDnop:
   234  		return rewriteValueARM64_OpARM64MOVDnop(v)
   235  	case OpARM64MOVDreg:
   236  		return rewriteValueARM64_OpARM64MOVDreg(v)
   237  	case OpARM64MOVDstore:
   238  		return rewriteValueARM64_OpARM64MOVDstore(v)
   239  	case OpARM64MOVDstoreidx:
   240  		return rewriteValueARM64_OpARM64MOVDstoreidx(v)
   241  	case OpARM64MOVDstoreidx8:
   242  		return rewriteValueARM64_OpARM64MOVDstoreidx8(v)
   243  	case OpARM64MOVHUload:
   244  		return rewriteValueARM64_OpARM64MOVHUload(v)
   245  	case OpARM64MOVHUloadidx:
   246  		return rewriteValueARM64_OpARM64MOVHUloadidx(v)
   247  	case OpARM64MOVHUloadidx2:
   248  		return rewriteValueARM64_OpARM64MOVHUloadidx2(v)
   249  	case OpARM64MOVHUreg:
   250  		return rewriteValueARM64_OpARM64MOVHUreg(v)
   251  	case OpARM64MOVHload:
   252  		return rewriteValueARM64_OpARM64MOVHload(v)
   253  	case OpARM64MOVHloadidx:
   254  		return rewriteValueARM64_OpARM64MOVHloadidx(v)
   255  	case OpARM64MOVHloadidx2:
   256  		return rewriteValueARM64_OpARM64MOVHloadidx2(v)
   257  	case OpARM64MOVHreg:
   258  		return rewriteValueARM64_OpARM64MOVHreg(v)
   259  	case OpARM64MOVHstore:
   260  		return rewriteValueARM64_OpARM64MOVHstore(v)
   261  	case OpARM64MOVHstoreidx:
   262  		return rewriteValueARM64_OpARM64MOVHstoreidx(v)
   263  	case OpARM64MOVHstoreidx2:
   264  		return rewriteValueARM64_OpARM64MOVHstoreidx2(v)
   265  	case OpARM64MOVWUload:
   266  		return rewriteValueARM64_OpARM64MOVWUload(v)
   267  	case OpARM64MOVWUloadidx:
   268  		return rewriteValueARM64_OpARM64MOVWUloadidx(v)
   269  	case OpARM64MOVWUloadidx4:
   270  		return rewriteValueARM64_OpARM64MOVWUloadidx4(v)
   271  	case OpARM64MOVWUreg:
   272  		return rewriteValueARM64_OpARM64MOVWUreg(v)
   273  	case OpARM64MOVWload:
   274  		return rewriteValueARM64_OpARM64MOVWload(v)
   275  	case OpARM64MOVWloadidx:
   276  		return rewriteValueARM64_OpARM64MOVWloadidx(v)
   277  	case OpARM64MOVWloadidx4:
   278  		return rewriteValueARM64_OpARM64MOVWloadidx4(v)
   279  	case OpARM64MOVWreg:
   280  		return rewriteValueARM64_OpARM64MOVWreg(v)
   281  	case OpARM64MOVWstore:
   282  		return rewriteValueARM64_OpARM64MOVWstore(v)
   283  	case OpARM64MOVWstoreidx:
   284  		return rewriteValueARM64_OpARM64MOVWstoreidx(v)
   285  	case OpARM64MOVWstoreidx4:
   286  		return rewriteValueARM64_OpARM64MOVWstoreidx4(v)
   287  	case OpARM64MSUB:
   288  		return rewriteValueARM64_OpARM64MSUB(v)
   289  	case OpARM64MSUBW:
   290  		return rewriteValueARM64_OpARM64MSUBW(v)
   291  	case OpARM64MUL:
   292  		return rewriteValueARM64_OpARM64MUL(v)
   293  	case OpARM64MULW:
   294  		return rewriteValueARM64_OpARM64MULW(v)
   295  	case OpARM64MVN:
   296  		return rewriteValueARM64_OpARM64MVN(v)
   297  	case OpARM64MVNshiftLL:
   298  		return rewriteValueARM64_OpARM64MVNshiftLL(v)
   299  	case OpARM64MVNshiftRA:
   300  		return rewriteValueARM64_OpARM64MVNshiftRA(v)
   301  	case OpARM64MVNshiftRL:
   302  		return rewriteValueARM64_OpARM64MVNshiftRL(v)
   303  	case OpARM64MVNshiftRO:
   304  		return rewriteValueARM64_OpARM64MVNshiftRO(v)
   305  	case OpARM64NEG:
   306  		return rewriteValueARM64_OpARM64NEG(v)
   307  	case OpARM64NEGshiftLL:
   308  		return rewriteValueARM64_OpARM64NEGshiftLL(v)
   309  	case OpARM64NEGshiftRA:
   310  		return rewriteValueARM64_OpARM64NEGshiftRA(v)
   311  	case OpARM64NEGshiftRL:
   312  		return rewriteValueARM64_OpARM64NEGshiftRL(v)
   313  	case OpARM64NotEqual:
   314  		return rewriteValueARM64_OpARM64NotEqual(v)
   315  	case OpARM64OR:
   316  		return rewriteValueARM64_OpARM64OR(v)
   317  	case OpARM64ORN:
   318  		return rewriteValueARM64_OpARM64ORN(v)
   319  	case OpARM64ORNshiftLL:
   320  		return rewriteValueARM64_OpARM64ORNshiftLL(v)
   321  	case OpARM64ORNshiftRA:
   322  		return rewriteValueARM64_OpARM64ORNshiftRA(v)
   323  	case OpARM64ORNshiftRL:
   324  		return rewriteValueARM64_OpARM64ORNshiftRL(v)
   325  	case OpARM64ORNshiftRO:
   326  		return rewriteValueARM64_OpARM64ORNshiftRO(v)
   327  	case OpARM64ORconst:
   328  		return rewriteValueARM64_OpARM64ORconst(v)
   329  	case OpARM64ORshiftLL:
   330  		return rewriteValueARM64_OpARM64ORshiftLL(v)
   331  	case OpARM64ORshiftRA:
   332  		return rewriteValueARM64_OpARM64ORshiftRA(v)
   333  	case OpARM64ORshiftRL:
   334  		return rewriteValueARM64_OpARM64ORshiftRL(v)
   335  	case OpARM64ORshiftRO:
   336  		return rewriteValueARM64_OpARM64ORshiftRO(v)
   337  	case OpARM64REV:
   338  		return rewriteValueARM64_OpARM64REV(v)
   339  	case OpARM64REV16:
   340  		return rewriteValueARM64_OpARM64REV16(v)
   341  	case OpARM64REVW:
   342  		return rewriteValueARM64_OpARM64REVW(v)
   343  	case OpARM64ROR:
   344  		return rewriteValueARM64_OpARM64ROR(v)
   345  	case OpARM64RORW:
   346  		return rewriteValueARM64_OpARM64RORW(v)
   347  	case OpARM64SBCSflags:
   348  		return rewriteValueARM64_OpARM64SBCSflags(v)
   349  	case OpARM64SBFX:
   350  		return rewriteValueARM64_OpARM64SBFX(v)
   351  	case OpARM64SLL:
   352  		return rewriteValueARM64_OpARM64SLL(v)
   353  	case OpARM64SLLconst:
   354  		return rewriteValueARM64_OpARM64SLLconst(v)
   355  	case OpARM64SRA:
   356  		return rewriteValueARM64_OpARM64SRA(v)
   357  	case OpARM64SRAconst:
   358  		return rewriteValueARM64_OpARM64SRAconst(v)
   359  	case OpARM64SRL:
   360  		return rewriteValueARM64_OpARM64SRL(v)
   361  	case OpARM64SRLconst:
   362  		return rewriteValueARM64_OpARM64SRLconst(v)
   363  	case OpARM64STP:
   364  		return rewriteValueARM64_OpARM64STP(v)
   365  	case OpARM64SUB:
   366  		return rewriteValueARM64_OpARM64SUB(v)
   367  	case OpARM64SUBconst:
   368  		return rewriteValueARM64_OpARM64SUBconst(v)
   369  	case OpARM64SUBshiftLL:
   370  		return rewriteValueARM64_OpARM64SUBshiftLL(v)
   371  	case OpARM64SUBshiftRA:
   372  		return rewriteValueARM64_OpARM64SUBshiftRA(v)
   373  	case OpARM64SUBshiftRL:
   374  		return rewriteValueARM64_OpARM64SUBshiftRL(v)
   375  	case OpARM64TST:
   376  		return rewriteValueARM64_OpARM64TST(v)
   377  	case OpARM64TSTW:
   378  		return rewriteValueARM64_OpARM64TSTW(v)
   379  	case OpARM64TSTWconst:
   380  		return rewriteValueARM64_OpARM64TSTWconst(v)
   381  	case OpARM64TSTconst:
   382  		return rewriteValueARM64_OpARM64TSTconst(v)
   383  	case OpARM64TSTshiftLL:
   384  		return rewriteValueARM64_OpARM64TSTshiftLL(v)
   385  	case OpARM64TSTshiftRA:
   386  		return rewriteValueARM64_OpARM64TSTshiftRA(v)
   387  	case OpARM64TSTshiftRL:
   388  		return rewriteValueARM64_OpARM64TSTshiftRL(v)
   389  	case OpARM64TSTshiftRO:
   390  		return rewriteValueARM64_OpARM64TSTshiftRO(v)
   391  	case OpARM64UBFIZ:
   392  		return rewriteValueARM64_OpARM64UBFIZ(v)
   393  	case OpARM64UBFX:
   394  		return rewriteValueARM64_OpARM64UBFX(v)
   395  	case OpARM64UDIV:
   396  		return rewriteValueARM64_OpARM64UDIV(v)
   397  	case OpARM64UDIVW:
   398  		return rewriteValueARM64_OpARM64UDIVW(v)
   399  	case OpARM64UMOD:
   400  		return rewriteValueARM64_OpARM64UMOD(v)
   401  	case OpARM64UMODW:
   402  		return rewriteValueARM64_OpARM64UMODW(v)
   403  	case OpARM64VBIF16B:
   404  		return rewriteValueARM64_OpARM64VBIF16B(v)
   405  	case OpARM64VBIT16B:
   406  		return rewriteValueARM64_OpARM64VBIT16B(v)
   407  	case OpARM64VDUPBbcast:
   408  		return rewriteValueARM64_OpARM64VDUPBbcast(v)
   409  	case OpARM64VFCVTL4S:
   410  		return rewriteValueARM64_OpARM64VFCVTL4S(v)
   411  	case OpARM64VMOVDins0:
   412  		return rewriteValueARM64_OpARM64VMOVDins0(v)
   413  	case OpARM64VMOVSins0:
   414  		return rewriteValueARM64_OpARM64VMOVSins0(v)
   415  	case OpARM64VPMULL2D:
   416  		return rewriteValueARM64_OpARM64VPMULL2D(v)
   417  	case OpARM64VSHL16B:
   418  		return rewriteValueARM64_OpARM64VSHL16B(v)
   419  	case OpARM64VSHL2D:
   420  		return rewriteValueARM64_OpARM64VSHL2D(v)
   421  	case OpARM64VSHL4S:
   422  		return rewriteValueARM64_OpARM64VSHL4S(v)
   423  	case OpARM64VSHL8H:
   424  		return rewriteValueARM64_OpARM64VSHL8H(v)
   425  	case OpARM64VSHRN2D:
   426  		return rewriteValueARM64_OpARM64VSHRN2D(v)
   427  	case OpARM64VSHRN4S:
   428  		return rewriteValueARM64_OpARM64VSHRN4S(v)
   429  	case OpARM64VSHRN8H:
   430  		return rewriteValueARM64_OpARM64VSHRN8H(v)
   431  	case OpARM64VSMULL16B:
   432  		return rewriteValueARM64_OpARM64VSMULL16B(v)
   433  	case OpARM64VSMULL4S:
   434  		return rewriteValueARM64_OpARM64VSMULL4S(v)
   435  	case OpARM64VSMULL8H:
   436  		return rewriteValueARM64_OpARM64VSMULL8H(v)
   437  	case OpARM64VSQSHL16Bconst:
   438  		return rewriteValueARM64_OpARM64VSQSHL16Bconst(v)
   439  	case OpARM64VSQSHL2Dconst:
   440  		return rewriteValueARM64_OpARM64VSQSHL2Dconst(v)
   441  	case OpARM64VSQSHL4Sconst:
   442  		return rewriteValueARM64_OpARM64VSQSHL4Sconst(v)
   443  	case OpARM64VSQSHL8Hconst:
   444  		return rewriteValueARM64_OpARM64VSQSHL8Hconst(v)
   445  	case OpARM64VSSHLL16B:
   446  		return rewriteValueARM64_OpARM64VSSHLL16B(v)
   447  	case OpARM64VSSHLL4S:
   448  		return rewriteValueARM64_OpARM64VSSHLL4S(v)
   449  	case OpARM64VSSHLL8H:
   450  		return rewriteValueARM64_OpARM64VSSHLL8H(v)
   451  	case OpARM64VSSHR16B:
   452  		return rewriteValueARM64_OpARM64VSSHR16B(v)
   453  	case OpARM64VSSHR2D:
   454  		return rewriteValueARM64_OpARM64VSSHR2D(v)
   455  	case OpARM64VSSHR4S:
   456  		return rewriteValueARM64_OpARM64VSSHR4S(v)
   457  	case OpARM64VSSHR8H:
   458  		return rewriteValueARM64_OpARM64VSSHR8H(v)
   459  	case OpARM64VSXTL16B:
   460  		return rewriteValueARM64_OpARM64VSXTL16B(v)
   461  	case OpARM64VSXTL4S:
   462  		return rewriteValueARM64_OpARM64VSXTL4S(v)
   463  	case OpARM64VSXTL8H:
   464  		return rewriteValueARM64_OpARM64VSXTL8H(v)
   465  	case OpARM64VUMULL16B:
   466  		return rewriteValueARM64_OpARM64VUMULL16B(v)
   467  	case OpARM64VUMULL4S:
   468  		return rewriteValueARM64_OpARM64VUMULL4S(v)
   469  	case OpARM64VUMULL8H:
   470  		return rewriteValueARM64_OpARM64VUMULL8H(v)
   471  	case OpARM64VUQSHL16Bconst:
   472  		return rewriteValueARM64_OpARM64VUQSHL16Bconst(v)
   473  	case OpARM64VUQSHL2Dconst:
   474  		return rewriteValueARM64_OpARM64VUQSHL2Dconst(v)
   475  	case OpARM64VUQSHL4Sconst:
   476  		return rewriteValueARM64_OpARM64VUQSHL4Sconst(v)
   477  	case OpARM64VUQSHL8Hconst:
   478  		return rewriteValueARM64_OpARM64VUQSHL8Hconst(v)
   479  	case OpARM64VUSHLL16B:
   480  		return rewriteValueARM64_OpARM64VUSHLL16B(v)
   481  	case OpARM64VUSHLL4S:
   482  		return rewriteValueARM64_OpARM64VUSHLL4S(v)
   483  	case OpARM64VUSHLL8H:
   484  		return rewriteValueARM64_OpARM64VUSHLL8H(v)
   485  	case OpARM64VUSHR16B:
   486  		return rewriteValueARM64_OpARM64VUSHR16B(v)
   487  	case OpARM64VUSHR2D:
   488  		return rewriteValueARM64_OpARM64VUSHR2D(v)
   489  	case OpARM64VUSHR4S:
   490  		return rewriteValueARM64_OpARM64VUSHR4S(v)
   491  	case OpARM64VUSHR8H:
   492  		return rewriteValueARM64_OpARM64VUSHR8H(v)
   493  	case OpARM64VUXTL16B:
   494  		return rewriteValueARM64_OpARM64VUXTL16B(v)
   495  	case OpARM64VUXTL4S:
   496  		return rewriteValueARM64_OpARM64VUXTL4S(v)
   497  	case OpARM64VUXTL8H:
   498  		return rewriteValueARM64_OpARM64VUXTL8H(v)
   499  	case OpARM64XOR:
   500  		return rewriteValueARM64_OpARM64XOR(v)
   501  	case OpARM64XORconst:
   502  		return rewriteValueARM64_OpARM64XORconst(v)
   503  	case OpARM64XORshiftLL:
   504  		return rewriteValueARM64_OpARM64XORshiftLL(v)
   505  	case OpARM64XORshiftRA:
   506  		return rewriteValueARM64_OpARM64XORshiftRA(v)
   507  	case OpARM64XORshiftRL:
   508  		return rewriteValueARM64_OpARM64XORshiftRL(v)
   509  	case OpARM64XORshiftRO:
   510  		return rewriteValueARM64_OpARM64XORshiftRO(v)
   511  	case OpAbs:
   512  		v.Op = OpARM64FABSD
   513  		return true
   514  	case OpAbsFloat32x4:
   515  		v.Op = OpARM64VFABS4S
   516  		return true
   517  	case OpAbsFloat64x2:
   518  		v.Op = OpARM64VFABS2D
   519  		return true
   520  	case OpAbsInt16x8:
   521  		v.Op = OpARM64VABS8H
   522  		return true
   523  	case OpAbsInt32x4:
   524  		v.Op = OpARM64VABS4S
   525  		return true
   526  	case OpAbsInt64x2:
   527  		v.Op = OpARM64VABS2D
   528  		return true
   529  	case OpAbsInt8x16:
   530  		v.Op = OpARM64VABS16B
   531  		return true
   532  	case OpAdd16:
   533  		v.Op = OpARM64ADD
   534  		return true
   535  	case OpAdd32:
   536  		v.Op = OpARM64ADD
   537  		return true
   538  	case OpAdd32F:
   539  		v.Op = OpARM64FADDS
   540  		return true
   541  	case OpAdd64:
   542  		v.Op = OpARM64ADD
   543  		return true
   544  	case OpAdd64F:
   545  		v.Op = OpARM64FADDD
   546  		return true
   547  	case OpAdd8:
   548  		v.Op = OpARM64ADD
   549  		return true
   550  	case OpAddFloat32x4:
   551  		v.Op = OpARM64VFADD4S
   552  		return true
   553  	case OpAddFloat64x2:
   554  		v.Op = OpARM64VFADD2D
   555  		return true
   556  	case OpAddInt16x8:
   557  		v.Op = OpARM64VADD8H
   558  		return true
   559  	case OpAddInt32x4:
   560  		v.Op = OpARM64VADD4S
   561  		return true
   562  	case OpAddInt64x2:
   563  		v.Op = OpARM64VADD2D
   564  		return true
   565  	case OpAddInt8x16:
   566  		v.Op = OpARM64VADD16B
   567  		return true
   568  	case OpAddPtr:
   569  		v.Op = OpARM64ADD
   570  		return true
   571  	case OpAddSaturatedInt16x8:
   572  		v.Op = OpARM64VSQADD8H
   573  		return true
   574  	case OpAddSaturatedInt32x4:
   575  		v.Op = OpARM64VSQADD4S
   576  		return true
   577  	case OpAddSaturatedInt64x2:
   578  		v.Op = OpARM64VSQADD2D
   579  		return true
   580  	case OpAddSaturatedInt8x16:
   581  		v.Op = OpARM64VSQADD16B
   582  		return true
   583  	case OpAddSaturatedUint16x8:
   584  		v.Op = OpARM64VUQADD8H
   585  		return true
   586  	case OpAddSaturatedUint32x4:
   587  		v.Op = OpARM64VUQADD4S
   588  		return true
   589  	case OpAddSaturatedUint64x2:
   590  		v.Op = OpARM64VUQADD2D
   591  		return true
   592  	case OpAddSaturatedUint8x16:
   593  		v.Op = OpARM64VUQADD16B
   594  		return true
   595  	case OpAddUint16x8:
   596  		v.Op = OpARM64VADD8H
   597  		return true
   598  	case OpAddUint32x4:
   599  		v.Op = OpARM64VADD4S
   600  		return true
   601  	case OpAddUint64x2:
   602  		v.Op = OpARM64VADD2D
   603  		return true
   604  	case OpAddUint8x16:
   605  		v.Op = OpARM64VADD16B
   606  		return true
   607  	case OpAddr:
   608  		return rewriteValueARM64_OpAddr(v)
   609  	case OpAnd16:
   610  		v.Op = OpARM64AND
   611  		return true
   612  	case OpAnd32:
   613  		v.Op = OpARM64AND
   614  		return true
   615  	case OpAnd64:
   616  		v.Op = OpARM64AND
   617  		return true
   618  	case OpAnd8:
   619  		v.Op = OpARM64AND
   620  		return true
   621  	case OpAndB:
   622  		v.Op = OpARM64AND
   623  		return true
   624  	case OpAndInt16x8:
   625  		v.Op = OpARM64VAND16B
   626  		return true
   627  	case OpAndInt32x4:
   628  		v.Op = OpARM64VAND16B
   629  		return true
   630  	case OpAndInt64x2:
   631  		v.Op = OpARM64VAND16B
   632  		return true
   633  	case OpAndInt8x16:
   634  		v.Op = OpARM64VAND16B
   635  		return true
   636  	case OpAndNotInt16x8:
   637  		v.Op = OpARM64VBIC16B
   638  		return true
   639  	case OpAndNotInt32x4:
   640  		v.Op = OpARM64VBIC16B
   641  		return true
   642  	case OpAndNotInt64x2:
   643  		v.Op = OpARM64VBIC16B
   644  		return true
   645  	case OpAndNotInt8x16:
   646  		v.Op = OpARM64VBIC16B
   647  		return true
   648  	case OpAndNotUint16x8:
   649  		v.Op = OpARM64VBIC16B
   650  		return true
   651  	case OpAndNotUint32x4:
   652  		v.Op = OpARM64VBIC16B
   653  		return true
   654  	case OpAndNotUint64x2:
   655  		v.Op = OpARM64VBIC16B
   656  		return true
   657  	case OpAndNotUint8x16:
   658  		v.Op = OpARM64VBIC16B
   659  		return true
   660  	case OpAndUint16x8:
   661  		v.Op = OpARM64VAND16B
   662  		return true
   663  	case OpAndUint32x4:
   664  		v.Op = OpARM64VAND16B
   665  		return true
   666  	case OpAndUint64x2:
   667  		v.Op = OpARM64VAND16B
   668  		return true
   669  	case OpAndUint8x16:
   670  		v.Op = OpARM64VAND16B
   671  		return true
   672  	case OpAtomicAdd32:
   673  		v.Op = OpARM64LoweredAtomicAdd32
   674  		return true
   675  	case OpAtomicAdd32Variant:
   676  		v.Op = OpARM64LoweredAtomicAdd32Variant
   677  		return true
   678  	case OpAtomicAdd64:
   679  		v.Op = OpARM64LoweredAtomicAdd64
   680  		return true
   681  	case OpAtomicAdd64Variant:
   682  		v.Op = OpARM64LoweredAtomicAdd64Variant
   683  		return true
   684  	case OpAtomicAnd32value:
   685  		v.Op = OpARM64LoweredAtomicAnd32
   686  		return true
   687  	case OpAtomicAnd32valueVariant:
   688  		v.Op = OpARM64LoweredAtomicAnd32Variant
   689  		return true
   690  	case OpAtomicAnd64value:
   691  		v.Op = OpARM64LoweredAtomicAnd64
   692  		return true
   693  	case OpAtomicAnd64valueVariant:
   694  		v.Op = OpARM64LoweredAtomicAnd64Variant
   695  		return true
   696  	case OpAtomicAnd8value:
   697  		v.Op = OpARM64LoweredAtomicAnd8
   698  		return true
   699  	case OpAtomicAnd8valueVariant:
   700  		v.Op = OpARM64LoweredAtomicAnd8Variant
   701  		return true
   702  	case OpAtomicCompareAndSwap32:
   703  		v.Op = OpARM64LoweredAtomicCas32
   704  		return true
   705  	case OpAtomicCompareAndSwap32Variant:
   706  		v.Op = OpARM64LoweredAtomicCas32Variant
   707  		return true
   708  	case OpAtomicCompareAndSwap64:
   709  		v.Op = OpARM64LoweredAtomicCas64
   710  		return true
   711  	case OpAtomicCompareAndSwap64Variant:
   712  		v.Op = OpARM64LoweredAtomicCas64Variant
   713  		return true
   714  	case OpAtomicExchange32:
   715  		v.Op = OpARM64LoweredAtomicExchange32
   716  		return true
   717  	case OpAtomicExchange32Variant:
   718  		v.Op = OpARM64LoweredAtomicExchange32Variant
   719  		return true
   720  	case OpAtomicExchange64:
   721  		v.Op = OpARM64LoweredAtomicExchange64
   722  		return true
   723  	case OpAtomicExchange64Variant:
   724  		v.Op = OpARM64LoweredAtomicExchange64Variant
   725  		return true
   726  	case OpAtomicExchange8:
   727  		v.Op = OpARM64LoweredAtomicExchange8
   728  		return true
   729  	case OpAtomicExchange8Variant:
   730  		v.Op = OpARM64LoweredAtomicExchange8Variant
   731  		return true
   732  	case OpAtomicLoad32:
   733  		v.Op = OpARM64LDARW
   734  		return true
   735  	case OpAtomicLoad64:
   736  		v.Op = OpARM64LDAR
   737  		return true
   738  	case OpAtomicLoad8:
   739  		v.Op = OpARM64LDARB
   740  		return true
   741  	case OpAtomicLoadPtr:
   742  		v.Op = OpARM64LDAR
   743  		return true
   744  	case OpAtomicOr32value:
   745  		v.Op = OpARM64LoweredAtomicOr32
   746  		return true
   747  	case OpAtomicOr32valueVariant:
   748  		v.Op = OpARM64LoweredAtomicOr32Variant
   749  		return true
   750  	case OpAtomicOr64value:
   751  		v.Op = OpARM64LoweredAtomicOr64
   752  		return true
   753  	case OpAtomicOr64valueVariant:
   754  		v.Op = OpARM64LoweredAtomicOr64Variant
   755  		return true
   756  	case OpAtomicOr8value:
   757  		v.Op = OpARM64LoweredAtomicOr8
   758  		return true
   759  	case OpAtomicOr8valueVariant:
   760  		v.Op = OpARM64LoweredAtomicOr8Variant
   761  		return true
   762  	case OpAtomicStore32:
   763  		v.Op = OpARM64STLRW
   764  		return true
   765  	case OpAtomicStore64:
   766  		v.Op = OpARM64STLR
   767  		return true
   768  	case OpAtomicStore8:
   769  		v.Op = OpARM64STLRB
   770  		return true
   771  	case OpAtomicStorePtrNoWB:
   772  		v.Op = OpARM64STLR
   773  		return true
   774  	case OpAverageInt16x8:
   775  		v.Op = OpARM64VSRHADD8H
   776  		return true
   777  	case OpAverageInt32x4:
   778  		v.Op = OpARM64VSRHADD4S
   779  		return true
   780  	case OpAverageInt8x16:
   781  		v.Op = OpARM64VSRHADD16B
   782  		return true
   783  	case OpAverageUint16x8:
   784  		v.Op = OpARM64VURHADD8H
   785  		return true
   786  	case OpAverageUint32x4:
   787  		v.Op = OpARM64VURHADD4S
   788  		return true
   789  	case OpAverageUint8x16:
   790  		v.Op = OpARM64VURHADD16B
   791  		return true
   792  	case OpAvg64u:
   793  		return rewriteValueARM64_OpAvg64u(v)
   794  	case OpBitLen16:
   795  		return rewriteValueARM64_OpBitLen16(v)
   796  	case OpBitLen32:
   797  		return rewriteValueARM64_OpBitLen32(v)
   798  	case OpBitLen64:
   799  		return rewriteValueARM64_OpBitLen64(v)
   800  	case OpBitLen8:
   801  		return rewriteValueARM64_OpBitLen8(v)
   802  	case OpBitRev16:
   803  		return rewriteValueARM64_OpBitRev16(v)
   804  	case OpBitRev32:
   805  		v.Op = OpARM64RBITW
   806  		return true
   807  	case OpBitRev64:
   808  		v.Op = OpARM64RBIT
   809  		return true
   810  	case OpBitRev8:
   811  		return rewriteValueARM64_OpBitRev8(v)
   812  	case OpBswap16:
   813  		v.Op = OpARM64REV16W
   814  		return true
   815  	case OpBswap32:
   816  		v.Op = OpARM64REVW
   817  		return true
   818  	case OpBswap64:
   819  		v.Op = OpARM64REV
   820  		return true
   821  	case OpCeil:
   822  		v.Op = OpARM64FRINTPD
   823  		return true
   824  	case OpCeilFloat32x4:
   825  		v.Op = OpARM64VFRINTP4S
   826  		return true
   827  	case OpCeilFloat64x2:
   828  		v.Op = OpARM64VFRINTP2D
   829  		return true
   830  	case OpClosureCall:
   831  		v.Op = OpARM64CALLclosure
   832  		return true
   833  	case OpCom16:
   834  		v.Op = OpARM64MVN
   835  		return true
   836  	case OpCom32:
   837  		v.Op = OpARM64MVN
   838  		return true
   839  	case OpCom64:
   840  		v.Op = OpARM64MVN
   841  		return true
   842  	case OpCom8:
   843  		v.Op = OpARM64MVN
   844  		return true
   845  	case OpConcatAddPairsFloat32x4:
   846  		v.Op = OpARM64VFADDP4S
   847  		return true
   848  	case OpConcatAddPairsFloat64x2:
   849  		v.Op = OpARM64VFADDP2D
   850  		return true
   851  	case OpConcatAddPairsInt16x8:
   852  		v.Op = OpARM64VADDP8H
   853  		return true
   854  	case OpConcatAddPairsInt32x4:
   855  		v.Op = OpARM64VADDP4S
   856  		return true
   857  	case OpConcatAddPairsInt64x2:
   858  		v.Op = OpARM64VADDP2D
   859  		return true
   860  	case OpConcatAddPairsUint16x8:
   861  		v.Op = OpARM64VADDP8H
   862  		return true
   863  	case OpConcatAddPairsUint32x4:
   864  		v.Op = OpARM64VADDP4S
   865  		return true
   866  	case OpConcatAddPairsUint64x2:
   867  		v.Op = OpARM64VADDP2D
   868  		return true
   869  	case OpConcatEvenInt16x8:
   870  		v.Op = OpARM64VUZP18H
   871  		return true
   872  	case OpConcatEvenInt32x4:
   873  		v.Op = OpARM64VUZP14S
   874  		return true
   875  	case OpConcatEvenInt64x2:
   876  		v.Op = OpARM64VUZP12D
   877  		return true
   878  	case OpConcatEvenInt8x16:
   879  		v.Op = OpARM64VUZP116B
   880  		return true
   881  	case OpConcatEvenUint16x8:
   882  		v.Op = OpARM64VUZP18H
   883  		return true
   884  	case OpConcatEvenUint32x4:
   885  		v.Op = OpARM64VUZP14S
   886  		return true
   887  	case OpConcatEvenUint64x2:
   888  		v.Op = OpARM64VUZP12D
   889  		return true
   890  	case OpConcatEvenUint8x16:
   891  		v.Op = OpARM64VUZP116B
   892  		return true
   893  	case OpConcatOddInt16x8:
   894  		v.Op = OpARM64VUZP28H
   895  		return true
   896  	case OpConcatOddInt32x4:
   897  		v.Op = OpARM64VUZP24S
   898  		return true
   899  	case OpConcatOddInt64x2:
   900  		v.Op = OpARM64VUZP22D
   901  		return true
   902  	case OpConcatOddInt8x16:
   903  		v.Op = OpARM64VUZP216B
   904  		return true
   905  	case OpConcatOddUint16x8:
   906  		v.Op = OpARM64VUZP28H
   907  		return true
   908  	case OpConcatOddUint32x4:
   909  		v.Op = OpARM64VUZP24S
   910  		return true
   911  	case OpConcatOddUint64x2:
   912  		v.Op = OpARM64VUZP22D
   913  		return true
   914  	case OpConcatOddUint8x16:
   915  		v.Op = OpARM64VUZP216B
   916  		return true
   917  	case OpConcatShiftBytesRightUint8x16:
   918  		v.Op = OpARM64VEXT16B
   919  		return true
   920  	case OpCondSelect:
   921  		return rewriteValueARM64_OpCondSelect(v)
   922  	case OpConst16:
   923  		return rewriteValueARM64_OpConst16(v)
   924  	case OpConst32:
   925  		return rewriteValueARM64_OpConst32(v)
   926  	case OpConst32F:
   927  		return rewriteValueARM64_OpConst32F(v)
   928  	case OpConst64:
   929  		return rewriteValueARM64_OpConst64(v)
   930  	case OpConst64F:
   931  		return rewriteValueARM64_OpConst64F(v)
   932  	case OpConst8:
   933  		return rewriteValueARM64_OpConst8(v)
   934  	case OpConstBool:
   935  		return rewriteValueARM64_OpConstBool(v)
   936  	case OpConstNil:
   937  		return rewriteValueARM64_OpConstNil(v)
   938  	case OpConvertLo2ToFloat64Float32x4:
   939  		v.Op = OpARM64VFCVTL4S
   940  		return true
   941  	case OpConvertToFloat32Float64x2:
   942  		v.Op = OpARM64VFCVTN2D
   943  		return true
   944  	case OpConvertToFloat32Int32x4:
   945  		v.Op = OpARM64VSCVTF4S
   946  		return true
   947  	case OpConvertToFloat32Uint32x4:
   948  		v.Op = OpARM64VUCVTF4S
   949  		return true
   950  	case OpConvertToFloat64Int64x2:
   951  		v.Op = OpARM64VSCVTF2D
   952  		return true
   953  	case OpConvertToFloat64Uint64x2:
   954  		v.Op = OpARM64VUCVTF2D
   955  		return true
   956  	case OpConvertToInt32Float32x4:
   957  		v.Op = OpARM64VFCVTZS4S
   958  		return true
   959  	case OpConvertToInt64Float64x2:
   960  		v.Op = OpARM64VFCVTZS2D
   961  		return true
   962  	case OpConvertToUint32Float32x4:
   963  		v.Op = OpARM64VFCVTZU4S
   964  		return true
   965  	case OpConvertToUint64Float64x2:
   966  		v.Op = OpARM64VFCVTZU2D
   967  		return true
   968  	case OpCtz16:
   969  		return rewriteValueARM64_OpCtz16(v)
   970  	case OpCtz16NonZero:
   971  		v.Op = OpCtz32
   972  		return true
   973  	case OpCtz32:
   974  		return rewriteValueARM64_OpCtz32(v)
   975  	case OpCtz32NonZero:
   976  		v.Op = OpCtz32
   977  		return true
   978  	case OpCtz64:
   979  		return rewriteValueARM64_OpCtz64(v)
   980  	case OpCtz64NonZero:
   981  		v.Op = OpCtz64
   982  		return true
   983  	case OpCtz8:
   984  		return rewriteValueARM64_OpCtz8(v)
   985  	case OpCtz8NonZero:
   986  		v.Op = OpCtz32
   987  		return true
   988  	case OpCvt32Fto32:
   989  		v.Op = OpARM64FCVTZSSW
   990  		return true
   991  	case OpCvt32Fto32U:
   992  		v.Op = OpARM64FCVTZUSW
   993  		return true
   994  	case OpCvt32Fto64:
   995  		v.Op = OpARM64FCVTZSS
   996  		return true
   997  	case OpCvt32Fto64F:
   998  		v.Op = OpARM64FCVTSD
   999  		return true
  1000  	case OpCvt32Fto64U:
  1001  		v.Op = OpARM64FCVTZUS
  1002  		return true
  1003  	case OpCvt32Uto32F:
  1004  		v.Op = OpARM64UCVTFWS
  1005  		return true
  1006  	case OpCvt32Uto64F:
  1007  		v.Op = OpARM64UCVTFWD
  1008  		return true
  1009  	case OpCvt32to32F:
  1010  		v.Op = OpARM64SCVTFWS
  1011  		return true
  1012  	case OpCvt32to64F:
  1013  		v.Op = OpARM64SCVTFWD
  1014  		return true
  1015  	case OpCvt64Fto32:
  1016  		v.Op = OpARM64FCVTZSDW
  1017  		return true
  1018  	case OpCvt64Fto32F:
  1019  		v.Op = OpARM64FCVTDS
  1020  		return true
  1021  	case OpCvt64Fto32U:
  1022  		v.Op = OpARM64FCVTZUDW
  1023  		return true
  1024  	case OpCvt64Fto64:
  1025  		v.Op = OpARM64FCVTZSD
  1026  		return true
  1027  	case OpCvt64Fto64U:
  1028  		v.Op = OpARM64FCVTZUD
  1029  		return true
  1030  	case OpCvt64Uto32F:
  1031  		v.Op = OpARM64UCVTFS
  1032  		return true
  1033  	case OpCvt64Uto64F:
  1034  		v.Op = OpARM64UCVTFD
  1035  		return true
  1036  	case OpCvt64to32F:
  1037  		v.Op = OpARM64SCVTFS
  1038  		return true
  1039  	case OpCvt64to64F:
  1040  		v.Op = OpARM64SCVTFD
  1041  		return true
  1042  	case OpCvtBoolToUint8:
  1043  		v.Op = OpCopy
  1044  		return true
  1045  	case OpDiv16:
  1046  		return rewriteValueARM64_OpDiv16(v)
  1047  	case OpDiv16u:
  1048  		return rewriteValueARM64_OpDiv16u(v)
  1049  	case OpDiv32:
  1050  		return rewriteValueARM64_OpDiv32(v)
  1051  	case OpDiv32F:
  1052  		v.Op = OpARM64FDIVS
  1053  		return true
  1054  	case OpDiv32u:
  1055  		v.Op = OpARM64UDIVW
  1056  		return true
  1057  	case OpDiv64:
  1058  		return rewriteValueARM64_OpDiv64(v)
  1059  	case OpDiv64F:
  1060  		v.Op = OpARM64FDIVD
  1061  		return true
  1062  	case OpDiv64u:
  1063  		v.Op = OpARM64UDIV
  1064  		return true
  1065  	case OpDiv8:
  1066  		return rewriteValueARM64_OpDiv8(v)
  1067  	case OpDiv8u:
  1068  		return rewriteValueARM64_OpDiv8u(v)
  1069  	case OpDivFloat32x4:
  1070  		v.Op = OpARM64VFDIV4S
  1071  		return true
  1072  	case OpDivFloat64x2:
  1073  		v.Op = OpARM64VFDIV2D
  1074  		return true
  1075  	case OpEq16:
  1076  		return rewriteValueARM64_OpEq16(v)
  1077  	case OpEq32:
  1078  		return rewriteValueARM64_OpEq32(v)
  1079  	case OpEq32F:
  1080  		return rewriteValueARM64_OpEq32F(v)
  1081  	case OpEq64:
  1082  		return rewriteValueARM64_OpEq64(v)
  1083  	case OpEq64F:
  1084  		return rewriteValueARM64_OpEq64F(v)
  1085  	case OpEq8:
  1086  		return rewriteValueARM64_OpEq8(v)
  1087  	case OpEqB:
  1088  		return rewriteValueARM64_OpEqB(v)
  1089  	case OpEqPtr:
  1090  		return rewriteValueARM64_OpEqPtr(v)
  1091  	case OpEqualFloat32x4:
  1092  		v.Op = OpARM64VFCMEQ4S
  1093  		return true
  1094  	case OpEqualFloat64x2:
  1095  		v.Op = OpARM64VFCMEQ2D
  1096  		return true
  1097  	case OpEqualInt16x8:
  1098  		v.Op = OpARM64VCMEQ8H
  1099  		return true
  1100  	case OpEqualInt32x4:
  1101  		v.Op = OpARM64VCMEQ4S
  1102  		return true
  1103  	case OpEqualInt64x2:
  1104  		v.Op = OpARM64VCMEQ2D
  1105  		return true
  1106  	case OpEqualInt8x16:
  1107  		v.Op = OpARM64VCMEQ16B
  1108  		return true
  1109  	case OpEqualUint16x8:
  1110  		v.Op = OpARM64VCMEQ8H
  1111  		return true
  1112  	case OpEqualUint32x4:
  1113  		v.Op = OpARM64VCMEQ4S
  1114  		return true
  1115  	case OpEqualUint64x2:
  1116  		v.Op = OpARM64VCMEQ2D
  1117  		return true
  1118  	case OpEqualUint8x16:
  1119  		v.Op = OpARM64VCMEQ16B
  1120  		return true
  1121  	case OpExtendLo2ToInt64Int32x4:
  1122  		v.Op = OpARM64VSXTL4S
  1123  		return true
  1124  	case OpExtendLo2ToUint64Uint32x4:
  1125  		v.Op = OpARM64VUXTL4S
  1126  		return true
  1127  	case OpExtendLo4ToInt32Int16x8:
  1128  		v.Op = OpARM64VSXTL8H
  1129  		return true
  1130  	case OpExtendLo4ToUint32Uint16x8:
  1131  		v.Op = OpARM64VUXTL8H
  1132  		return true
  1133  	case OpExtendLo8ToInt16Int8x16:
  1134  		v.Op = OpARM64VSXTL16B
  1135  		return true
  1136  	case OpExtendLo8ToUint16Uint8x16:
  1137  		v.Op = OpARM64VUXTL16B
  1138  		return true
  1139  	case OpFMA:
  1140  		return rewriteValueARM64_OpFMA(v)
  1141  	case OpFloor:
  1142  		v.Op = OpARM64FRINTMD
  1143  		return true
  1144  	case OpFloorFloat32x4:
  1145  		v.Op = OpARM64VFRINTM4S
  1146  		return true
  1147  	case OpFloorFloat64x2:
  1148  		v.Op = OpARM64VFRINTM2D
  1149  		return true
  1150  	case OpGetCallerPC:
  1151  		v.Op = OpARM64LoweredGetCallerPC
  1152  		return true
  1153  	case OpGetCallerSP:
  1154  		v.Op = OpARM64LoweredGetCallerSP
  1155  		return true
  1156  	case OpGetClosurePtr:
  1157  		v.Op = OpARM64LoweredGetClosurePtr
  1158  		return true
  1159  	case OpGetElemFloat32x4:
  1160  		v.Op = OpARM64VDUPSextr
  1161  		return true
  1162  	case OpGetElemFloat64x2:
  1163  		v.Op = OpARM64VDUPDextr
  1164  		return true
  1165  	case OpGetElemInt16x8:
  1166  		v.Op = OpARM64VMOVHextr
  1167  		return true
  1168  	case OpGetElemInt32x4:
  1169  		v.Op = OpARM64VMOVSextr
  1170  		return true
  1171  	case OpGetElemInt64x2:
  1172  		v.Op = OpARM64VMOVDextr
  1173  		return true
  1174  	case OpGetElemInt8x16:
  1175  		v.Op = OpARM64VMOVBextr
  1176  		return true
  1177  	case OpGetElemUint16x8:
  1178  		v.Op = OpARM64VMOVHextr
  1179  		return true
  1180  	case OpGetElemUint32x4:
  1181  		v.Op = OpARM64VMOVSextr
  1182  		return true
  1183  	case OpGetElemUint64x2:
  1184  		v.Op = OpARM64VMOVDextr
  1185  		return true
  1186  	case OpGetElemUint8x16:
  1187  		v.Op = OpARM64VMOVBextr
  1188  		return true
  1189  	case OpGreaterEqualFloat32x4:
  1190  		v.Op = OpARM64VFCMGE4S
  1191  		return true
  1192  	case OpGreaterEqualFloat64x2:
  1193  		v.Op = OpARM64VFCMGE2D
  1194  		return true
  1195  	case OpGreaterEqualInt16x8:
  1196  		v.Op = OpARM64VCMGE8H
  1197  		return true
  1198  	case OpGreaterEqualInt32x4:
  1199  		v.Op = OpARM64VCMGE4S
  1200  		return true
  1201  	case OpGreaterEqualInt64x2:
  1202  		v.Op = OpARM64VCMGE2D
  1203  		return true
  1204  	case OpGreaterEqualInt8x16:
  1205  		v.Op = OpARM64VCMGE16B
  1206  		return true
  1207  	case OpGreaterEqualUint16x8:
  1208  		v.Op = OpARM64VCMHS8H
  1209  		return true
  1210  	case OpGreaterEqualUint32x4:
  1211  		v.Op = OpARM64VCMHS4S
  1212  		return true
  1213  	case OpGreaterEqualUint64x2:
  1214  		v.Op = OpARM64VCMHS2D
  1215  		return true
  1216  	case OpGreaterEqualUint8x16:
  1217  		v.Op = OpARM64VCMHS16B
  1218  		return true
  1219  	case OpGreaterFloat32x4:
  1220  		v.Op = OpARM64VFCMGT4S
  1221  		return true
  1222  	case OpGreaterFloat64x2:
  1223  		v.Op = OpARM64VFCMGT2D
  1224  		return true
  1225  	case OpGreaterInt16x8:
  1226  		v.Op = OpARM64VCMGT8H
  1227  		return true
  1228  	case OpGreaterInt32x4:
  1229  		v.Op = OpARM64VCMGT4S
  1230  		return true
  1231  	case OpGreaterInt64x2:
  1232  		v.Op = OpARM64VCMGT2D
  1233  		return true
  1234  	case OpGreaterInt8x16:
  1235  		v.Op = OpARM64VCMGT16B
  1236  		return true
  1237  	case OpGreaterUint16x8:
  1238  		v.Op = OpARM64VCMHI8H
  1239  		return true
  1240  	case OpGreaterUint32x4:
  1241  		v.Op = OpARM64VCMHI4S
  1242  		return true
  1243  	case OpGreaterUint64x2:
  1244  		v.Op = OpARM64VCMHI2D
  1245  		return true
  1246  	case OpGreaterUint8x16:
  1247  		v.Op = OpARM64VCMHI16B
  1248  		return true
  1249  	case OpHmul32:
  1250  		return rewriteValueARM64_OpHmul32(v)
  1251  	case OpHmul32u:
  1252  		return rewriteValueARM64_OpHmul32u(v)
  1253  	case OpHmul64:
  1254  		v.Op = OpARM64MULH
  1255  		return true
  1256  	case OpHmul64u:
  1257  		v.Op = OpARM64UMULH
  1258  		return true
  1259  	case OpInterCall:
  1260  		v.Op = OpARM64CALLinter
  1261  		return true
  1262  	case OpInterleaveEvenInt16x8:
  1263  		v.Op = OpARM64VTRN18H
  1264  		return true
  1265  	case OpInterleaveEvenInt32x4:
  1266  		v.Op = OpARM64VTRN14S
  1267  		return true
  1268  	case OpInterleaveEvenInt64x2:
  1269  		v.Op = OpARM64VTRN12D
  1270  		return true
  1271  	case OpInterleaveEvenInt8x16:
  1272  		v.Op = OpARM64VTRN116B
  1273  		return true
  1274  	case OpInterleaveEvenUint16x8:
  1275  		v.Op = OpARM64VTRN18H
  1276  		return true
  1277  	case OpInterleaveEvenUint32x4:
  1278  		v.Op = OpARM64VTRN14S
  1279  		return true
  1280  	case OpInterleaveEvenUint64x2:
  1281  		v.Op = OpARM64VTRN12D
  1282  		return true
  1283  	case OpInterleaveEvenUint8x16:
  1284  		v.Op = OpARM64VTRN116B
  1285  		return true
  1286  	case OpInterleaveHiInt16x8:
  1287  		v.Op = OpARM64VZIP28H
  1288  		return true
  1289  	case OpInterleaveHiInt32x4:
  1290  		v.Op = OpARM64VZIP24S
  1291  		return true
  1292  	case OpInterleaveHiInt64x2:
  1293  		v.Op = OpARM64VZIP22D
  1294  		return true
  1295  	case OpInterleaveHiInt8x16:
  1296  		v.Op = OpARM64VZIP216B
  1297  		return true
  1298  	case OpInterleaveHiUint16x8:
  1299  		v.Op = OpARM64VZIP28H
  1300  		return true
  1301  	case OpInterleaveHiUint32x4:
  1302  		v.Op = OpARM64VZIP24S
  1303  		return true
  1304  	case OpInterleaveHiUint64x2:
  1305  		v.Op = OpARM64VZIP22D
  1306  		return true
  1307  	case OpInterleaveHiUint8x16:
  1308  		v.Op = OpARM64VZIP216B
  1309  		return true
  1310  	case OpInterleaveLoInt16x8:
  1311  		v.Op = OpARM64VZIP18H
  1312  		return true
  1313  	case OpInterleaveLoInt32x4:
  1314  		v.Op = OpARM64VZIP14S
  1315  		return true
  1316  	case OpInterleaveLoInt64x2:
  1317  		v.Op = OpARM64VZIP12D
  1318  		return true
  1319  	case OpInterleaveLoInt8x16:
  1320  		v.Op = OpARM64VZIP116B
  1321  		return true
  1322  	case OpInterleaveLoUint16x8:
  1323  		v.Op = OpARM64VZIP18H
  1324  		return true
  1325  	case OpInterleaveLoUint32x4:
  1326  		v.Op = OpARM64VZIP14S
  1327  		return true
  1328  	case OpInterleaveLoUint64x2:
  1329  		v.Op = OpARM64VZIP12D
  1330  		return true
  1331  	case OpInterleaveLoUint8x16:
  1332  		v.Op = OpARM64VZIP116B
  1333  		return true
  1334  	case OpInterleaveOddInt16x8:
  1335  		v.Op = OpARM64VTRN28H
  1336  		return true
  1337  	case OpInterleaveOddInt32x4:
  1338  		v.Op = OpARM64VTRN24S
  1339  		return true
  1340  	case OpInterleaveOddInt64x2:
  1341  		v.Op = OpARM64VTRN22D
  1342  		return true
  1343  	case OpInterleaveOddInt8x16:
  1344  		v.Op = OpARM64VTRN216B
  1345  		return true
  1346  	case OpInterleaveOddUint16x8:
  1347  		v.Op = OpARM64VTRN28H
  1348  		return true
  1349  	case OpInterleaveOddUint32x4:
  1350  		v.Op = OpARM64VTRN24S
  1351  		return true
  1352  	case OpInterleaveOddUint64x2:
  1353  		v.Op = OpARM64VTRN22D
  1354  		return true
  1355  	case OpInterleaveOddUint8x16:
  1356  		v.Op = OpARM64VTRN216B
  1357  		return true
  1358  	case OpIsInBounds:
  1359  		return rewriteValueARM64_OpIsInBounds(v)
  1360  	case OpIsNonNil:
  1361  		return rewriteValueARM64_OpIsNonNil(v)
  1362  	case OpIsSliceInBounds:
  1363  		return rewriteValueARM64_OpIsSliceInBounds(v)
  1364  	case OpLeadingSignBitsInt16x8:
  1365  		v.Op = OpARM64VCLS8H
  1366  		return true
  1367  	case OpLeadingSignBitsInt32x4:
  1368  		v.Op = OpARM64VCLS4S
  1369  		return true
  1370  	case OpLeadingSignBitsInt8x16:
  1371  		v.Op = OpARM64VCLS16B
  1372  		return true
  1373  	case OpLeadingSignBitsUint16x8:
  1374  		v.Op = OpARM64VCLS8H
  1375  		return true
  1376  	case OpLeadingSignBitsUint32x4:
  1377  		v.Op = OpARM64VCLS4S
  1378  		return true
  1379  	case OpLeadingSignBitsUint8x16:
  1380  		v.Op = OpARM64VCLS16B
  1381  		return true
  1382  	case OpLeadingZerosInt16x8:
  1383  		v.Op = OpARM64VCLZ8H
  1384  		return true
  1385  	case OpLeadingZerosInt32x4:
  1386  		v.Op = OpARM64VCLZ4S
  1387  		return true
  1388  	case OpLeadingZerosInt8x16:
  1389  		v.Op = OpARM64VCLZ16B
  1390  		return true
  1391  	case OpLeadingZerosUint16x8:
  1392  		v.Op = OpARM64VCLZ8H
  1393  		return true
  1394  	case OpLeadingZerosUint32x4:
  1395  		v.Op = OpARM64VCLZ4S
  1396  		return true
  1397  	case OpLeadingZerosUint8x16:
  1398  		v.Op = OpARM64VCLZ16B
  1399  		return true
  1400  	case OpLeq16:
  1401  		return rewriteValueARM64_OpLeq16(v)
  1402  	case OpLeq16U:
  1403  		return rewriteValueARM64_OpLeq16U(v)
  1404  	case OpLeq32:
  1405  		return rewriteValueARM64_OpLeq32(v)
  1406  	case OpLeq32F:
  1407  		return rewriteValueARM64_OpLeq32F(v)
  1408  	case OpLeq32U:
  1409  		return rewriteValueARM64_OpLeq32U(v)
  1410  	case OpLeq64:
  1411  		return rewriteValueARM64_OpLeq64(v)
  1412  	case OpLeq64F:
  1413  		return rewriteValueARM64_OpLeq64F(v)
  1414  	case OpLeq64U:
  1415  		return rewriteValueARM64_OpLeq64U(v)
  1416  	case OpLeq8:
  1417  		return rewriteValueARM64_OpLeq8(v)
  1418  	case OpLeq8U:
  1419  		return rewriteValueARM64_OpLeq8U(v)
  1420  	case OpLess16:
  1421  		return rewriteValueARM64_OpLess16(v)
  1422  	case OpLess16U:
  1423  		return rewriteValueARM64_OpLess16U(v)
  1424  	case OpLess32:
  1425  		return rewriteValueARM64_OpLess32(v)
  1426  	case OpLess32F:
  1427  		return rewriteValueARM64_OpLess32F(v)
  1428  	case OpLess32U:
  1429  		return rewriteValueARM64_OpLess32U(v)
  1430  	case OpLess64:
  1431  		return rewriteValueARM64_OpLess64(v)
  1432  	case OpLess64F:
  1433  		return rewriteValueARM64_OpLess64F(v)
  1434  	case OpLess64U:
  1435  		return rewriteValueARM64_OpLess64U(v)
  1436  	case OpLess8:
  1437  		return rewriteValueARM64_OpLess8(v)
  1438  	case OpLess8U:
  1439  		return rewriteValueARM64_OpLess8U(v)
  1440  	case OpLoad:
  1441  		return rewriteValueARM64_OpLoad(v)
  1442  	case OpLocalAddr:
  1443  		return rewriteValueARM64_OpLocalAddr(v)
  1444  	case OpLookupOrZeroInt8x16:
  1445  		v.Op = OpARM64VTBL16B
  1446  		return true
  1447  	case OpLookupOrZeroUint8x16:
  1448  		v.Op = OpARM64VTBL16B
  1449  		return true
  1450  	case OpLsh16x16:
  1451  		v.Op = OpLsh64x16
  1452  		return true
  1453  	case OpLsh16x32:
  1454  		v.Op = OpLsh64x32
  1455  		return true
  1456  	case OpLsh16x64:
  1457  		v.Op = OpLsh64x64
  1458  		return true
  1459  	case OpLsh16x8:
  1460  		v.Op = OpLsh64x8
  1461  		return true
  1462  	case OpLsh32x16:
  1463  		v.Op = OpLsh64x16
  1464  		return true
  1465  	case OpLsh32x32:
  1466  		v.Op = OpLsh64x32
  1467  		return true
  1468  	case OpLsh32x64:
  1469  		v.Op = OpLsh64x64
  1470  		return true
  1471  	case OpLsh32x8:
  1472  		v.Op = OpLsh64x8
  1473  		return true
  1474  	case OpLsh64x16:
  1475  		return rewriteValueARM64_OpLsh64x16(v)
  1476  	case OpLsh64x32:
  1477  		return rewriteValueARM64_OpLsh64x32(v)
  1478  	case OpLsh64x64:
  1479  		return rewriteValueARM64_OpLsh64x64(v)
  1480  	case OpLsh64x8:
  1481  		return rewriteValueARM64_OpLsh64x8(v)
  1482  	case OpLsh8x16:
  1483  		v.Op = OpLsh64x16
  1484  		return true
  1485  	case OpLsh8x32:
  1486  		v.Op = OpLsh64x32
  1487  		return true
  1488  	case OpLsh8x64:
  1489  		v.Op = OpLsh64x64
  1490  		return true
  1491  	case OpLsh8x8:
  1492  		v.Op = OpLsh64x8
  1493  		return true
  1494  	case OpMax32F:
  1495  		v.Op = OpARM64FMAXS
  1496  		return true
  1497  	case OpMax64F:
  1498  		v.Op = OpARM64FMAXD
  1499  		return true
  1500  	case OpMaxFloat32x4:
  1501  		v.Op = OpARM64VFMAX4S
  1502  		return true
  1503  	case OpMaxFloat64x2:
  1504  		v.Op = OpARM64VFMAX2D
  1505  		return true
  1506  	case OpMaxInt16x8:
  1507  		v.Op = OpARM64VSMAX8H
  1508  		return true
  1509  	case OpMaxInt32x4:
  1510  		v.Op = OpARM64VSMAX4S
  1511  		return true
  1512  	case OpMaxInt8x16:
  1513  		v.Op = OpARM64VSMAX16B
  1514  		return true
  1515  	case OpMaxUint16x8:
  1516  		v.Op = OpARM64VUMAX8H
  1517  		return true
  1518  	case OpMaxUint32x4:
  1519  		v.Op = OpARM64VUMAX4S
  1520  		return true
  1521  	case OpMaxUint8x16:
  1522  		v.Op = OpARM64VUMAX16B
  1523  		return true
  1524  	case OpMemEq:
  1525  		v.Op = OpARM64LoweredMemEq
  1526  		return true
  1527  	case OpMin32F:
  1528  		v.Op = OpARM64FMINS
  1529  		return true
  1530  	case OpMin64F:
  1531  		v.Op = OpARM64FMIND
  1532  		return true
  1533  	case OpMinFloat32x4:
  1534  		v.Op = OpARM64VFMIN4S
  1535  		return true
  1536  	case OpMinFloat64x2:
  1537  		v.Op = OpARM64VFMIN2D
  1538  		return true
  1539  	case OpMinInt16x8:
  1540  		v.Op = OpARM64VSMIN8H
  1541  		return true
  1542  	case OpMinInt32x4:
  1543  		v.Op = OpARM64VSMIN4S
  1544  		return true
  1545  	case OpMinInt8x16:
  1546  		v.Op = OpARM64VSMIN16B
  1547  		return true
  1548  	case OpMinUint16x8:
  1549  		v.Op = OpARM64VUMIN8H
  1550  		return true
  1551  	case OpMinUint32x4:
  1552  		v.Op = OpARM64VUMIN4S
  1553  		return true
  1554  	case OpMinUint8x16:
  1555  		v.Op = OpARM64VUMIN16B
  1556  		return true
  1557  	case OpMod16:
  1558  		return rewriteValueARM64_OpMod16(v)
  1559  	case OpMod16u:
  1560  		return rewriteValueARM64_OpMod16u(v)
  1561  	case OpMod32:
  1562  		return rewriteValueARM64_OpMod32(v)
  1563  	case OpMod32u:
  1564  		v.Op = OpARM64UMODW
  1565  		return true
  1566  	case OpMod64:
  1567  		return rewriteValueARM64_OpMod64(v)
  1568  	case OpMod64u:
  1569  		v.Op = OpARM64UMOD
  1570  		return true
  1571  	case OpMod8:
  1572  		return rewriteValueARM64_OpMod8(v)
  1573  	case OpMod8u:
  1574  		return rewriteValueARM64_OpMod8u(v)
  1575  	case OpMove:
  1576  		return rewriteValueARM64_OpMove(v)
  1577  	case OpMul16:
  1578  		v.Op = OpARM64MULW
  1579  		return true
  1580  	case OpMul32:
  1581  		v.Op = OpARM64MULW
  1582  		return true
  1583  	case OpMul32F:
  1584  		v.Op = OpARM64FMULS
  1585  		return true
  1586  	case OpMul64:
  1587  		v.Op = OpARM64MUL
  1588  		return true
  1589  	case OpMul64F:
  1590  		v.Op = OpARM64FMULD
  1591  		return true
  1592  	case OpMul8:
  1593  		v.Op = OpARM64MULW
  1594  		return true
  1595  	case OpMulAddFloat32x4:
  1596  		return rewriteValueARM64_OpMulAddFloat32x4(v)
  1597  	case OpMulAddFloat64x2:
  1598  		return rewriteValueARM64_OpMulAddFloat64x2(v)
  1599  	case OpMulAddInt16x8:
  1600  		return rewriteValueARM64_OpMulAddInt16x8(v)
  1601  	case OpMulAddInt32x4:
  1602  		return rewriteValueARM64_OpMulAddInt32x4(v)
  1603  	case OpMulAddInt8x16:
  1604  		return rewriteValueARM64_OpMulAddInt8x16(v)
  1605  	case OpMulAddUint16x8:
  1606  		return rewriteValueARM64_OpMulAddUint16x8(v)
  1607  	case OpMulAddUint32x4:
  1608  		return rewriteValueARM64_OpMulAddUint32x4(v)
  1609  	case OpMulAddUint8x16:
  1610  		return rewriteValueARM64_OpMulAddUint8x16(v)
  1611  	case OpMulFloat32x4:
  1612  		v.Op = OpARM64VFMUL4S
  1613  		return true
  1614  	case OpMulFloat64x2:
  1615  		v.Op = OpARM64VFMUL2D
  1616  		return true
  1617  	case OpMulInt16x8:
  1618  		v.Op = OpARM64VMUL8H
  1619  		return true
  1620  	case OpMulInt32x4:
  1621  		v.Op = OpARM64VMUL4S
  1622  		return true
  1623  	case OpMulInt8x16:
  1624  		v.Op = OpARM64VMUL16B
  1625  		return true
  1626  	case OpMulUint16x8:
  1627  		v.Op = OpARM64VMUL8H
  1628  		return true
  1629  	case OpMulUint32x4:
  1630  		v.Op = OpARM64VMUL4S
  1631  		return true
  1632  	case OpMulUint8x16:
  1633  		v.Op = OpARM64VMUL16B
  1634  		return true
  1635  	case OpMulWidenLoInt16x8:
  1636  		v.Op = OpARM64VSMULL8H
  1637  		return true
  1638  	case OpMulWidenLoInt32x4:
  1639  		v.Op = OpARM64VSMULL4S
  1640  		return true
  1641  	case OpMulWidenLoInt8x16:
  1642  		v.Op = OpARM64VSMULL16B
  1643  		return true
  1644  	case OpMulWidenLoUint16x8:
  1645  		v.Op = OpARM64VUMULL8H
  1646  		return true
  1647  	case OpMulWidenLoUint32x4:
  1648  		v.Op = OpARM64VUMULL4S
  1649  		return true
  1650  	case OpMulWidenLoUint8x16:
  1651  		v.Op = OpARM64VUMULL16B
  1652  		return true
  1653  	case OpNeg16:
  1654  		v.Op = OpARM64NEG
  1655  		return true
  1656  	case OpNeg32:
  1657  		v.Op = OpARM64NEG
  1658  		return true
  1659  	case OpNeg32F:
  1660  		v.Op = OpARM64FNEGS
  1661  		return true
  1662  	case OpNeg64:
  1663  		v.Op = OpARM64NEG
  1664  		return true
  1665  	case OpNeg64F:
  1666  		v.Op = OpARM64FNEGD
  1667  		return true
  1668  	case OpNeg8:
  1669  		v.Op = OpARM64NEG
  1670  		return true
  1671  	case OpNegFloat32x4:
  1672  		v.Op = OpARM64VFNEG4S
  1673  		return true
  1674  	case OpNegFloat64x2:
  1675  		v.Op = OpARM64VFNEG2D
  1676  		return true
  1677  	case OpNegInt16x8:
  1678  		v.Op = OpARM64VNEG8H
  1679  		return true
  1680  	case OpNegInt32x4:
  1681  		v.Op = OpARM64VNEG4S
  1682  		return true
  1683  	case OpNegInt64x2:
  1684  		v.Op = OpARM64VNEG2D
  1685  		return true
  1686  	case OpNegInt8x16:
  1687  		v.Op = OpARM64VNEG16B
  1688  		return true
  1689  	case OpNeq16:
  1690  		return rewriteValueARM64_OpNeq16(v)
  1691  	case OpNeq32:
  1692  		return rewriteValueARM64_OpNeq32(v)
  1693  	case OpNeq32F:
  1694  		return rewriteValueARM64_OpNeq32F(v)
  1695  	case OpNeq64:
  1696  		return rewriteValueARM64_OpNeq64(v)
  1697  	case OpNeq64F:
  1698  		return rewriteValueARM64_OpNeq64F(v)
  1699  	case OpNeq8:
  1700  		return rewriteValueARM64_OpNeq8(v)
  1701  	case OpNeqB:
  1702  		v.Op = OpARM64XOR
  1703  		return true
  1704  	case OpNeqPtr:
  1705  		return rewriteValueARM64_OpNeqPtr(v)
  1706  	case OpNilCheck:
  1707  		v.Op = OpARM64LoweredNilCheck
  1708  		return true
  1709  	case OpNot:
  1710  		return rewriteValueARM64_OpNot(v)
  1711  	case OpNotInt16x8:
  1712  		v.Op = OpARM64VNOT16B
  1713  		return true
  1714  	case OpNotInt32x4:
  1715  		v.Op = OpARM64VNOT16B
  1716  		return true
  1717  	case OpNotInt64x2:
  1718  		v.Op = OpARM64VNOT16B
  1719  		return true
  1720  	case OpNotInt8x16:
  1721  		v.Op = OpARM64VNOT16B
  1722  		return true
  1723  	case OpNotUint16x8:
  1724  		v.Op = OpARM64VNOT16B
  1725  		return true
  1726  	case OpNotUint32x4:
  1727  		v.Op = OpARM64VNOT16B
  1728  		return true
  1729  	case OpNotUint64x2:
  1730  		v.Op = OpARM64VNOT16B
  1731  		return true
  1732  	case OpNotUint8x16:
  1733  		v.Op = OpARM64VNOT16B
  1734  		return true
  1735  	case OpOffPtr:
  1736  		return rewriteValueARM64_OpOffPtr(v)
  1737  	case OpOnesCountInt8x16:
  1738  		v.Op = OpARM64VCNT16B
  1739  		return true
  1740  	case OpOnesCountUint8x16:
  1741  		v.Op = OpARM64VCNT16B
  1742  		return true
  1743  	case OpOr16:
  1744  		v.Op = OpARM64OR
  1745  		return true
  1746  	case OpOr32:
  1747  		v.Op = OpARM64OR
  1748  		return true
  1749  	case OpOr64:
  1750  		v.Op = OpARM64OR
  1751  		return true
  1752  	case OpOr8:
  1753  		v.Op = OpARM64OR
  1754  		return true
  1755  	case OpOrB:
  1756  		v.Op = OpARM64OR
  1757  		return true
  1758  	case OpOrInt16x8:
  1759  		v.Op = OpARM64VORR16B
  1760  		return true
  1761  	case OpOrInt32x4:
  1762  		v.Op = OpARM64VORR16B
  1763  		return true
  1764  	case OpOrInt64x2:
  1765  		v.Op = OpARM64VORR16B
  1766  		return true
  1767  	case OpOrInt8x16:
  1768  		v.Op = OpARM64VORR16B
  1769  		return true
  1770  	case OpOrNotInt16x8:
  1771  		v.Op = OpARM64VORN16B
  1772  		return true
  1773  	case OpOrNotInt32x4:
  1774  		v.Op = OpARM64VORN16B
  1775  		return true
  1776  	case OpOrNotInt64x2:
  1777  		v.Op = OpARM64VORN16B
  1778  		return true
  1779  	case OpOrNotInt8x16:
  1780  		v.Op = OpARM64VORN16B
  1781  		return true
  1782  	case OpOrNotUint16x8:
  1783  		v.Op = OpARM64VORN16B
  1784  		return true
  1785  	case OpOrNotUint32x4:
  1786  		v.Op = OpARM64VORN16B
  1787  		return true
  1788  	case OpOrNotUint64x2:
  1789  		v.Op = OpARM64VORN16B
  1790  		return true
  1791  	case OpOrNotUint8x16:
  1792  		v.Op = OpARM64VORN16B
  1793  		return true
  1794  	case OpOrUint16x8:
  1795  		v.Op = OpARM64VORR16B
  1796  		return true
  1797  	case OpOrUint32x4:
  1798  		v.Op = OpARM64VORR16B
  1799  		return true
  1800  	case OpOrUint64x2:
  1801  		v.Op = OpARM64VORR16B
  1802  		return true
  1803  	case OpOrUint8x16:
  1804  		v.Op = OpARM64VORR16B
  1805  		return true
  1806  	case OpPanicBounds:
  1807  		v.Op = OpARM64LoweredPanicBoundsRR
  1808  		return true
  1809  	case OpPopCount16:
  1810  		return rewriteValueARM64_OpPopCount16(v)
  1811  	case OpPopCount32:
  1812  		return rewriteValueARM64_OpPopCount32(v)
  1813  	case OpPopCount64:
  1814  		return rewriteValueARM64_OpPopCount64(v)
  1815  	case OpPrefetchCache:
  1816  		return rewriteValueARM64_OpPrefetchCache(v)
  1817  	case OpPrefetchCacheStreamed:
  1818  		return rewriteValueARM64_OpPrefetchCacheStreamed(v)
  1819  	case OpPubBarrier:
  1820  		return rewriteValueARM64_OpPubBarrier(v)
  1821  	case OpRotateLeft16:
  1822  		return rewriteValueARM64_OpRotateLeft16(v)
  1823  	case OpRotateLeft32:
  1824  		return rewriteValueARM64_OpRotateLeft32(v)
  1825  	case OpRotateLeft64:
  1826  		return rewriteValueARM64_OpRotateLeft64(v)
  1827  	case OpRotateLeft8:
  1828  		return rewriteValueARM64_OpRotateLeft8(v)
  1829  	case OpRound:
  1830  		v.Op = OpARM64FRINTAD
  1831  		return true
  1832  	case OpRound32F:
  1833  		v.Op = OpARM64LoweredRound32F
  1834  		return true
  1835  	case OpRound64F:
  1836  		v.Op = OpARM64LoweredRound64F
  1837  		return true
  1838  	case OpRoundFloat32x4:
  1839  		v.Op = OpARM64VFRINTN4S
  1840  		return true
  1841  	case OpRoundFloat64x2:
  1842  		v.Op = OpARM64VFRINTN2D
  1843  		return true
  1844  	case OpRoundToEven:
  1845  		v.Op = OpARM64FRINTND
  1846  		return true
  1847  	case OpRsh16Ux16:
  1848  		return rewriteValueARM64_OpRsh16Ux16(v)
  1849  	case OpRsh16Ux32:
  1850  		return rewriteValueARM64_OpRsh16Ux32(v)
  1851  	case OpRsh16Ux64:
  1852  		return rewriteValueARM64_OpRsh16Ux64(v)
  1853  	case OpRsh16Ux8:
  1854  		return rewriteValueARM64_OpRsh16Ux8(v)
  1855  	case OpRsh16x16:
  1856  		return rewriteValueARM64_OpRsh16x16(v)
  1857  	case OpRsh16x32:
  1858  		return rewriteValueARM64_OpRsh16x32(v)
  1859  	case OpRsh16x64:
  1860  		return rewriteValueARM64_OpRsh16x64(v)
  1861  	case OpRsh16x8:
  1862  		return rewriteValueARM64_OpRsh16x8(v)
  1863  	case OpRsh32Ux16:
  1864  		return rewriteValueARM64_OpRsh32Ux16(v)
  1865  	case OpRsh32Ux32:
  1866  		return rewriteValueARM64_OpRsh32Ux32(v)
  1867  	case OpRsh32Ux64:
  1868  		return rewriteValueARM64_OpRsh32Ux64(v)
  1869  	case OpRsh32Ux8:
  1870  		return rewriteValueARM64_OpRsh32Ux8(v)
  1871  	case OpRsh32x16:
  1872  		return rewriteValueARM64_OpRsh32x16(v)
  1873  	case OpRsh32x32:
  1874  		return rewriteValueARM64_OpRsh32x32(v)
  1875  	case OpRsh32x64:
  1876  		return rewriteValueARM64_OpRsh32x64(v)
  1877  	case OpRsh32x8:
  1878  		return rewriteValueARM64_OpRsh32x8(v)
  1879  	case OpRsh64Ux16:
  1880  		return rewriteValueARM64_OpRsh64Ux16(v)
  1881  	case OpRsh64Ux32:
  1882  		return rewriteValueARM64_OpRsh64Ux32(v)
  1883  	case OpRsh64Ux64:
  1884  		return rewriteValueARM64_OpRsh64Ux64(v)
  1885  	case OpRsh64Ux8:
  1886  		return rewriteValueARM64_OpRsh64Ux8(v)
  1887  	case OpRsh64x16:
  1888  		return rewriteValueARM64_OpRsh64x16(v)
  1889  	case OpRsh64x32:
  1890  		return rewriteValueARM64_OpRsh64x32(v)
  1891  	case OpRsh64x64:
  1892  		return rewriteValueARM64_OpRsh64x64(v)
  1893  	case OpRsh64x8:
  1894  		return rewriteValueARM64_OpRsh64x8(v)
  1895  	case OpRsh8Ux16:
  1896  		return rewriteValueARM64_OpRsh8Ux16(v)
  1897  	case OpRsh8Ux32:
  1898  		return rewriteValueARM64_OpRsh8Ux32(v)
  1899  	case OpRsh8Ux64:
  1900  		return rewriteValueARM64_OpRsh8Ux64(v)
  1901  	case OpRsh8Ux8:
  1902  		return rewriteValueARM64_OpRsh8Ux8(v)
  1903  	case OpRsh8x16:
  1904  		return rewriteValueARM64_OpRsh8x16(v)
  1905  	case OpRsh8x32:
  1906  		return rewriteValueARM64_OpRsh8x32(v)
  1907  	case OpRsh8x64:
  1908  		return rewriteValueARM64_OpRsh8x64(v)
  1909  	case OpRsh8x8:
  1910  		return rewriteValueARM64_OpRsh8x8(v)
  1911  	case OpSaturateToInt16Int32x4:
  1912  		v.Op = OpARM64VSQXTN4S
  1913  		return true
  1914  	case OpSaturateToInt32Int64x2:
  1915  		v.Op = OpARM64VSQXTN2D
  1916  		return true
  1917  	case OpSaturateToInt8Int16x8:
  1918  		v.Op = OpARM64VSQXTN8H
  1919  		return true
  1920  	case OpSaturateToUint16Int32x4:
  1921  		v.Op = OpARM64VSQXTUN4S
  1922  		return true
  1923  	case OpSaturateToUint16Uint32x4:
  1924  		v.Op = OpARM64VUQXTN4S
  1925  		return true
  1926  	case OpSaturateToUint32Int64x2:
  1927  		v.Op = OpARM64VSQXTUN2D
  1928  		return true
  1929  	case OpSaturateToUint32Uint64x2:
  1930  		v.Op = OpARM64VUQXTN2D
  1931  		return true
  1932  	case OpSaturateToUint8Int16x8:
  1933  		v.Op = OpARM64VSQXTUN8H
  1934  		return true
  1935  	case OpSaturateToUint8Uint16x8:
  1936  		v.Op = OpARM64VUQXTN8H
  1937  		return true
  1938  	case OpSelect0:
  1939  		return rewriteValueARM64_OpSelect0(v)
  1940  	case OpSelect1:
  1941  		return rewriteValueARM64_OpSelect1(v)
  1942  	case OpSelectN:
  1943  		return rewriteValueARM64_OpSelectN(v)
  1944  	case OpSetElemFloat32x4:
  1945  		v.Op = OpARM64VMOVSins0
  1946  		return true
  1947  	case OpSetElemFloat64x2:
  1948  		v.Op = OpARM64VMOVDins0
  1949  		return true
  1950  	case OpSetElemInt16x8:
  1951  		v.Op = OpARM64VMOVHins
  1952  		return true
  1953  	case OpSetElemInt32x4:
  1954  		v.Op = OpARM64VMOVSins
  1955  		return true
  1956  	case OpSetElemInt64x2:
  1957  		v.Op = OpARM64VMOVDins
  1958  		return true
  1959  	case OpSetElemInt8x16:
  1960  		v.Op = OpARM64VMOVBins
  1961  		return true
  1962  	case OpSetElemUint16x8:
  1963  		v.Op = OpARM64VMOVHins
  1964  		return true
  1965  	case OpSetElemUint32x4:
  1966  		v.Op = OpARM64VMOVSins
  1967  		return true
  1968  	case OpSetElemUint64x2:
  1969  		v.Op = OpARM64VMOVDins
  1970  		return true
  1971  	case OpSetElemUint8x16:
  1972  		v.Op = OpARM64VMOVBins
  1973  		return true
  1974  	case OpShiftAllLeftInt16x8:
  1975  		return rewriteValueARM64_OpShiftAllLeftInt16x8(v)
  1976  	case OpShiftAllLeftInt32x4:
  1977  		return rewriteValueARM64_OpShiftAllLeftInt32x4(v)
  1978  	case OpShiftAllLeftInt64x2:
  1979  		return rewriteValueARM64_OpShiftAllLeftInt64x2(v)
  1980  	case OpShiftAllLeftInt8x16:
  1981  		return rewriteValueARM64_OpShiftAllLeftInt8x16(v)
  1982  	case OpShiftAllLeftUint16x8:
  1983  		return rewriteValueARM64_OpShiftAllLeftUint16x8(v)
  1984  	case OpShiftAllLeftUint32x4:
  1985  		return rewriteValueARM64_OpShiftAllLeftUint32x4(v)
  1986  	case OpShiftAllLeftUint64x2:
  1987  		return rewriteValueARM64_OpShiftAllLeftUint64x2(v)
  1988  	case OpShiftAllLeftUint8x16:
  1989  		return rewriteValueARM64_OpShiftAllLeftUint8x16(v)
  1990  	case OpShiftAllRightInt16x8:
  1991  		return rewriteValueARM64_OpShiftAllRightInt16x8(v)
  1992  	case OpShiftAllRightInt32x4:
  1993  		return rewriteValueARM64_OpShiftAllRightInt32x4(v)
  1994  	case OpShiftAllRightInt64x2:
  1995  		return rewriteValueARM64_OpShiftAllRightInt64x2(v)
  1996  	case OpShiftAllRightInt8x16:
  1997  		return rewriteValueARM64_OpShiftAllRightInt8x16(v)
  1998  	case OpShiftAllRightUint16x8:
  1999  		return rewriteValueARM64_OpShiftAllRightUint16x8(v)
  2000  	case OpShiftAllRightUint32x4:
  2001  		return rewriteValueARM64_OpShiftAllRightUint32x4(v)
  2002  	case OpShiftAllRightUint64x2:
  2003  		return rewriteValueARM64_OpShiftAllRightUint64x2(v)
  2004  	case OpShiftAllRightUint8x16:
  2005  		return rewriteValueARM64_OpShiftAllRightUint8x16(v)
  2006  	case OpShiftInt16x8:
  2007  		v.Op = OpARM64VSSHL8H
  2008  		return true
  2009  	case OpShiftInt32x4:
  2010  		v.Op = OpARM64VSSHL4S
  2011  		return true
  2012  	case OpShiftInt64x2:
  2013  		v.Op = OpARM64VSSHL2D
  2014  		return true
  2015  	case OpShiftInt8x16:
  2016  		v.Op = OpARM64VSSHL16B
  2017  		return true
  2018  	case OpShiftSaturatedInt16x8:
  2019  		v.Op = OpARM64VSQSHL8H
  2020  		return true
  2021  	case OpShiftSaturatedInt32x4:
  2022  		v.Op = OpARM64VSQSHL4S
  2023  		return true
  2024  	case OpShiftSaturatedInt64x2:
  2025  		v.Op = OpARM64VSQSHL2D
  2026  		return true
  2027  	case OpShiftSaturatedInt8x16:
  2028  		v.Op = OpARM64VSQSHL16B
  2029  		return true
  2030  	case OpShiftSaturatedUint16x8:
  2031  		v.Op = OpARM64VUQSHL8H
  2032  		return true
  2033  	case OpShiftSaturatedUint32x4:
  2034  		v.Op = OpARM64VUQSHL4S
  2035  		return true
  2036  	case OpShiftSaturatedUint64x2:
  2037  		v.Op = OpARM64VUQSHL2D
  2038  		return true
  2039  	case OpShiftSaturatedUint8x16:
  2040  		v.Op = OpARM64VUQSHL16B
  2041  		return true
  2042  	case OpShiftUint16x8:
  2043  		v.Op = OpARM64VUSHL8H
  2044  		return true
  2045  	case OpShiftUint32x4:
  2046  		v.Op = OpARM64VUSHL4S
  2047  		return true
  2048  	case OpShiftUint64x2:
  2049  		v.Op = OpARM64VUSHL2D
  2050  		return true
  2051  	case OpShiftUint8x16:
  2052  		v.Op = OpARM64VUSHL16B
  2053  		return true
  2054  	case OpSignExt16to32:
  2055  		v.Op = OpARM64MOVHreg
  2056  		return true
  2057  	case OpSignExt16to64:
  2058  		v.Op = OpARM64MOVHreg
  2059  		return true
  2060  	case OpSignExt32to64:
  2061  		v.Op = OpARM64MOVWreg
  2062  		return true
  2063  	case OpSignExt8to16:
  2064  		v.Op = OpARM64MOVBreg
  2065  		return true
  2066  	case OpSignExt8to32:
  2067  		v.Op = OpARM64MOVBreg
  2068  		return true
  2069  	case OpSignExt8to64:
  2070  		v.Op = OpARM64MOVBreg
  2071  		return true
  2072  	case OpSlicemask:
  2073  		return rewriteValueARM64_OpSlicemask(v)
  2074  	case OpSqrt:
  2075  		v.Op = OpARM64FSQRTD
  2076  		return true
  2077  	case OpSqrt32:
  2078  		v.Op = OpARM64FSQRTS
  2079  		return true
  2080  	case OpSqrtFloat32x4:
  2081  		v.Op = OpARM64VFSQRT4S
  2082  		return true
  2083  	case OpSqrtFloat64x2:
  2084  		v.Op = OpARM64VFSQRT2D
  2085  		return true
  2086  	case OpStaticCall:
  2087  		v.Op = OpARM64CALLstatic
  2088  		return true
  2089  	case OpStore:
  2090  		return rewriteValueARM64_OpStore(v)
  2091  	case OpSub16:
  2092  		v.Op = OpARM64SUB
  2093  		return true
  2094  	case OpSub32:
  2095  		v.Op = OpARM64SUB
  2096  		return true
  2097  	case OpSub32F:
  2098  		v.Op = OpARM64FSUBS
  2099  		return true
  2100  	case OpSub64:
  2101  		v.Op = OpARM64SUB
  2102  		return true
  2103  	case OpSub64F:
  2104  		v.Op = OpARM64FSUBD
  2105  		return true
  2106  	case OpSub8:
  2107  		v.Op = OpARM64SUB
  2108  		return true
  2109  	case OpSubFloat32x4:
  2110  		v.Op = OpARM64VFSUB4S
  2111  		return true
  2112  	case OpSubFloat64x2:
  2113  		v.Op = OpARM64VFSUB2D
  2114  		return true
  2115  	case OpSubInt16x8:
  2116  		v.Op = OpARM64VSUB8H
  2117  		return true
  2118  	case OpSubInt32x4:
  2119  		v.Op = OpARM64VSUB4S
  2120  		return true
  2121  	case OpSubInt64x2:
  2122  		v.Op = OpARM64VSUB2D
  2123  		return true
  2124  	case OpSubInt8x16:
  2125  		v.Op = OpARM64VSUB16B
  2126  		return true
  2127  	case OpSubPtr:
  2128  		v.Op = OpARM64SUB
  2129  		return true
  2130  	case OpSubSaturatedInt16x8:
  2131  		v.Op = OpARM64VSQSUB8H
  2132  		return true
  2133  	case OpSubSaturatedInt32x4:
  2134  		v.Op = OpARM64VSQSUB4S
  2135  		return true
  2136  	case OpSubSaturatedInt64x2:
  2137  		v.Op = OpARM64VSQSUB2D
  2138  		return true
  2139  	case OpSubSaturatedInt8x16:
  2140  		v.Op = OpARM64VSQSUB16B
  2141  		return true
  2142  	case OpSubSaturatedUint16x8:
  2143  		v.Op = OpARM64VUQSUB8H
  2144  		return true
  2145  	case OpSubSaturatedUint32x4:
  2146  		v.Op = OpARM64VUQSUB4S
  2147  		return true
  2148  	case OpSubSaturatedUint64x2:
  2149  		v.Op = OpARM64VUQSUB2D
  2150  		return true
  2151  	case OpSubSaturatedUint8x16:
  2152  		v.Op = OpARM64VUQSUB16B
  2153  		return true
  2154  	case OpSubUint16x8:
  2155  		v.Op = OpARM64VSUB8H
  2156  		return true
  2157  	case OpSubUint32x4:
  2158  		v.Op = OpARM64VSUB4S
  2159  		return true
  2160  	case OpSubUint64x2:
  2161  		v.Op = OpARM64VSUB2D
  2162  		return true
  2163  	case OpSubUint8x16:
  2164  		v.Op = OpARM64VSUB16B
  2165  		return true
  2166  	case OpTailCall:
  2167  		v.Op = OpARM64CALLtail
  2168  		return true
  2169  	case OpTailCallInter:
  2170  		v.Op = OpARM64CALLtailinter
  2171  		return true
  2172  	case OpTrunc:
  2173  		v.Op = OpARM64FRINTZD
  2174  		return true
  2175  	case OpTrunc16to8:
  2176  		v.Op = OpCopy
  2177  		return true
  2178  	case OpTrunc32to16:
  2179  		v.Op = OpCopy
  2180  		return true
  2181  	case OpTrunc32to8:
  2182  		v.Op = OpCopy
  2183  		return true
  2184  	case OpTrunc64to16:
  2185  		v.Op = OpCopy
  2186  		return true
  2187  	case OpTrunc64to32:
  2188  		v.Op = OpCopy
  2189  		return true
  2190  	case OpTrunc64to8:
  2191  		v.Op = OpCopy
  2192  		return true
  2193  	case OpTruncFloat32x4:
  2194  		v.Op = OpARM64VFRINTZ4S
  2195  		return true
  2196  	case OpTruncFloat64x2:
  2197  		v.Op = OpARM64VFRINTZ2D
  2198  		return true
  2199  	case OpTruncToInt16Int32x4:
  2200  		v.Op = OpARM64VXTN4S
  2201  		return true
  2202  	case OpTruncToInt32Int64x2:
  2203  		v.Op = OpARM64VXTN2D
  2204  		return true
  2205  	case OpTruncToInt8Int16x8:
  2206  		v.Op = OpARM64VXTN8H
  2207  		return true
  2208  	case OpTruncToUint16Uint32x4:
  2209  		v.Op = OpARM64VXTN4S
  2210  		return true
  2211  	case OpTruncToUint32Uint64x2:
  2212  		v.Op = OpARM64VXTN2D
  2213  		return true
  2214  	case OpTruncToUint8Uint16x8:
  2215  		v.Op = OpARM64VXTN8H
  2216  		return true
  2217  	case OpWB:
  2218  		v.Op = OpARM64LoweredWB
  2219  		return true
  2220  	case OpXor16:
  2221  		v.Op = OpARM64XOR
  2222  		return true
  2223  	case OpXor32:
  2224  		v.Op = OpARM64XOR
  2225  		return true
  2226  	case OpXor64:
  2227  		v.Op = OpARM64XOR
  2228  		return true
  2229  	case OpXor8:
  2230  		v.Op = OpARM64XOR
  2231  		return true
  2232  	case OpXorInt16x8:
  2233  		v.Op = OpARM64VEOR16B
  2234  		return true
  2235  	case OpXorInt32x4:
  2236  		v.Op = OpARM64VEOR16B
  2237  		return true
  2238  	case OpXorInt64x2:
  2239  		v.Op = OpARM64VEOR16B
  2240  		return true
  2241  	case OpXorInt8x16:
  2242  		v.Op = OpARM64VEOR16B
  2243  		return true
  2244  	case OpXorUint16x8:
  2245  		v.Op = OpARM64VEOR16B
  2246  		return true
  2247  	case OpXorUint32x4:
  2248  		v.Op = OpARM64VEOR16B
  2249  		return true
  2250  	case OpXorUint64x2:
  2251  		v.Op = OpARM64VEOR16B
  2252  		return true
  2253  	case OpXorUint8x16:
  2254  		v.Op = OpARM64VEOR16B
  2255  		return true
  2256  	case OpZero:
  2257  		return rewriteValueARM64_OpZero(v)
  2258  	case OpZeroExt16to32:
  2259  		v.Op = OpARM64MOVHUreg
  2260  		return true
  2261  	case OpZeroExt16to64:
  2262  		v.Op = OpARM64MOVHUreg
  2263  		return true
  2264  	case OpZeroExt32to64:
  2265  		v.Op = OpARM64MOVWUreg
  2266  		return true
  2267  	case OpZeroExt8to16:
  2268  		v.Op = OpARM64MOVBUreg
  2269  		return true
  2270  	case OpZeroExt8to32:
  2271  		v.Op = OpARM64MOVBUreg
  2272  		return true
  2273  	case OpZeroExt8to64:
  2274  		v.Op = OpARM64MOVBUreg
  2275  		return true
  2276  	case OpZeroSIMD:
  2277  		return rewriteValueARM64_OpZeroSIMD(v)
  2278  	case OpbitSelectInt8x16:
  2279  		v.Op = OpARM64VBIF16B
  2280  		return true
  2281  	case OpbitSelectNotInt8x16:
  2282  		v.Op = OpARM64VBIT16B
  2283  		return true
  2284  	case Opbroadcast1To16Int8x16:
  2285  		return rewriteValueARM64_Opbroadcast1To16Int8x16(v)
  2286  	case Opbroadcast1To16Uint8x16:
  2287  		return rewriteValueARM64_Opbroadcast1To16Uint8x16(v)
  2288  	case Opbroadcast1To2Float64x2:
  2289  		return rewriteValueARM64_Opbroadcast1To2Float64x2(v)
  2290  	case Opbroadcast1To2Int64x2:
  2291  		return rewriteValueARM64_Opbroadcast1To2Int64x2(v)
  2292  	case Opbroadcast1To2Uint64x2:
  2293  		return rewriteValueARM64_Opbroadcast1To2Uint64x2(v)
  2294  	case Opbroadcast1To4Float32x4:
  2295  		return rewriteValueARM64_Opbroadcast1To4Float32x4(v)
  2296  	case Opbroadcast1To4Int32x4:
  2297  		return rewriteValueARM64_Opbroadcast1To4Int32x4(v)
  2298  	case Opbroadcast1To4Uint32x4:
  2299  		return rewriteValueARM64_Opbroadcast1To4Uint32x4(v)
  2300  	case Opbroadcast1To8Int16x8:
  2301  		return rewriteValueARM64_Opbroadcast1To8Int16x8(v)
  2302  	case Opbroadcast1To8Uint16x8:
  2303  		return rewriteValueARM64_Opbroadcast1To8Uint16x8(v)
  2304  	case OpcarrylessMultiplyWidenLoUint64x2:
  2305  		v.Op = OpARM64VPMULL2D
  2306  		return true
  2307  	case OpreduceMaxFloat32x4:
  2308  		v.Op = OpARM64VFMAXV4S
  2309  		return true
  2310  	case OpreduceMaxInt16x8:
  2311  		v.Op = OpARM64VSMAXV8H
  2312  		return true
  2313  	case OpreduceMaxInt32x4:
  2314  		v.Op = OpARM64VSMAXV4S
  2315  		return true
  2316  	case OpreduceMaxInt8x16:
  2317  		v.Op = OpARM64VSMAXV16B
  2318  		return true
  2319  	case OpreduceMaxUint16x8:
  2320  		v.Op = OpARM64VUMAXV8H
  2321  		return true
  2322  	case OpreduceMaxUint32x4:
  2323  		v.Op = OpARM64VUMAXV4S
  2324  		return true
  2325  	case OpreduceMaxUint8x16:
  2326  		v.Op = OpARM64VUMAXV16B
  2327  		return true
  2328  	case OpreduceMinFloat32x4:
  2329  		v.Op = OpARM64VFMINV4S
  2330  		return true
  2331  	case OpreduceMinInt16x8:
  2332  		v.Op = OpARM64VSMINV8H
  2333  		return true
  2334  	case OpreduceMinInt32x4:
  2335  		v.Op = OpARM64VSMINV4S
  2336  		return true
  2337  	case OpreduceMinInt8x16:
  2338  		v.Op = OpARM64VSMINV16B
  2339  		return true
  2340  	case OpreduceMinUint16x8:
  2341  		v.Op = OpARM64VUMINV8H
  2342  		return true
  2343  	case OpreduceMinUint32x4:
  2344  		v.Op = OpARM64VUMINV4S
  2345  		return true
  2346  	case OpreduceMinUint8x16:
  2347  		v.Op = OpARM64VUMINV16B
  2348  		return true
  2349  	case OpreduceSumInt16x8:
  2350  		v.Op = OpARM64VADDV8H
  2351  		return true
  2352  	case OpreduceSumInt32x4:
  2353  		v.Op = OpARM64VADDV4S
  2354  		return true
  2355  	case OpreduceSumInt8x16:
  2356  		v.Op = OpARM64VADDV16B
  2357  		return true
  2358  	case OpreduceSumUint16x8:
  2359  		v.Op = OpARM64VADDV8H
  2360  		return true
  2361  	case OpreduceSumUint32x4:
  2362  		v.Op = OpARM64VADDV4S
  2363  		return true
  2364  	case OpreduceSumUint8x16:
  2365  		v.Op = OpARM64VADDV16B
  2366  		return true
  2367  	}
  2368  	return false
  2369  }
  2370  func rewriteValueARM64_OpARM64ADCSflags(v *Value) bool {
  2371  	v_2 := v.Args[2]
  2372  	v_1 := v.Args[1]
  2373  	v_0 := v.Args[0]
  2374  	b := v.Block
  2375  	typ := &b.Func.Config.Types
  2376  	// match: (ADCSflags x y (Select1 <types.TypeFlags> (ADDSconstflags [-1] (ADCzerocarry <typ.UInt64> c))))
  2377  	// result: (ADCSflags x y c)
  2378  	for {
  2379  		x := v_0
  2380  		y := v_1
  2381  		if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
  2382  			break
  2383  		}
  2384  		v_2_0 := v_2.Args[0]
  2385  		if v_2_0.Op != OpARM64ADDSconstflags || auxIntToInt64(v_2_0.AuxInt) != -1 {
  2386  			break
  2387  		}
  2388  		v_2_0_0 := v_2_0.Args[0]
  2389  		if v_2_0_0.Op != OpARM64ADCzerocarry || v_2_0_0.Type != typ.UInt64 {
  2390  			break
  2391  		}
  2392  		c := v_2_0_0.Args[0]
  2393  		v.reset(OpARM64ADCSflags)
  2394  		v.AddArg3(x, y, c)
  2395  		return true
  2396  	}
  2397  	// match: (ADCSflags x y (Select1 <types.TypeFlags> (ADDSconstflags [-1] (MOVDconst [0]))))
  2398  	// result: (ADDSflags x y)
  2399  	for {
  2400  		x := v_0
  2401  		y := v_1
  2402  		if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
  2403  			break
  2404  		}
  2405  		v_2_0 := v_2.Args[0]
  2406  		if v_2_0.Op != OpARM64ADDSconstflags || auxIntToInt64(v_2_0.AuxInt) != -1 {
  2407  			break
  2408  		}
  2409  		v_2_0_0 := v_2_0.Args[0]
  2410  		if v_2_0_0.Op != OpARM64MOVDconst || auxIntToInt64(v_2_0_0.AuxInt) != 0 {
  2411  			break
  2412  		}
  2413  		v.reset(OpARM64ADDSflags)
  2414  		v.AddArg2(x, y)
  2415  		return true
  2416  	}
  2417  	return false
  2418  }
  2419  func rewriteValueARM64_OpARM64ADD(v *Value) bool {
  2420  	v_1 := v.Args[1]
  2421  	v_0 := v.Args[0]
  2422  	b := v.Block
  2423  	// match: (ADD x (MOVDconst <t> [c]))
  2424  	// cond: !t.IsPtr()
  2425  	// result: (ADDconst [c] x)
  2426  	for {
  2427  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2428  			x := v_0
  2429  			if v_1.Op != OpARM64MOVDconst {
  2430  				continue
  2431  			}
  2432  			t := v_1.Type
  2433  			c := auxIntToInt64(v_1.AuxInt)
  2434  			if !(!t.IsPtr()) {
  2435  				continue
  2436  			}
  2437  			v.reset(OpARM64ADDconst)
  2438  			v.AuxInt = int64ToAuxInt(c)
  2439  			v.AddArg(x)
  2440  			return true
  2441  		}
  2442  		break
  2443  	}
  2444  	// match: (ADD a l:(MUL x y))
  2445  	// cond: l.Uses==1 && clobber(l)
  2446  	// result: (MADD a x y)
  2447  	for {
  2448  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2449  			a := v_0
  2450  			l := v_1
  2451  			if l.Op != OpARM64MUL {
  2452  				continue
  2453  			}
  2454  			y := l.Args[1]
  2455  			x := l.Args[0]
  2456  			if !(l.Uses == 1 && clobber(l)) {
  2457  				continue
  2458  			}
  2459  			v.reset(OpARM64MADD)
  2460  			v.AddArg3(a, x, y)
  2461  			return true
  2462  		}
  2463  		break
  2464  	}
  2465  	// match: (ADD a l:(MNEG x y))
  2466  	// cond: l.Uses==1 && clobber(l)
  2467  	// result: (MSUB a x y)
  2468  	for {
  2469  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2470  			a := v_0
  2471  			l := v_1
  2472  			if l.Op != OpARM64MNEG {
  2473  				continue
  2474  			}
  2475  			y := l.Args[1]
  2476  			x := l.Args[0]
  2477  			if !(l.Uses == 1 && clobber(l)) {
  2478  				continue
  2479  			}
  2480  			v.reset(OpARM64MSUB)
  2481  			v.AddArg3(a, x, y)
  2482  			return true
  2483  		}
  2484  		break
  2485  	}
  2486  	// match: (ADD a l:(MULW x y))
  2487  	// cond: v.Type.Size() <= 4 && l.Uses==1 && clobber(l)
  2488  	// result: (MADDW a x y)
  2489  	for {
  2490  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2491  			a := v_0
  2492  			l := v_1
  2493  			if l.Op != OpARM64MULW {
  2494  				continue
  2495  			}
  2496  			y := l.Args[1]
  2497  			x := l.Args[0]
  2498  			if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
  2499  				continue
  2500  			}
  2501  			v.reset(OpARM64MADDW)
  2502  			v.AddArg3(a, x, y)
  2503  			return true
  2504  		}
  2505  		break
  2506  	}
  2507  	// match: (ADD a l:(MNEGW x y))
  2508  	// cond: v.Type.Size() <= 4 && l.Uses==1 && clobber(l)
  2509  	// result: (MSUBW a x y)
  2510  	for {
  2511  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2512  			a := v_0
  2513  			l := v_1
  2514  			if l.Op != OpARM64MNEGW {
  2515  				continue
  2516  			}
  2517  			y := l.Args[1]
  2518  			x := l.Args[0]
  2519  			if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
  2520  				continue
  2521  			}
  2522  			v.reset(OpARM64MSUBW)
  2523  			v.AddArg3(a, x, y)
  2524  			return true
  2525  		}
  2526  		break
  2527  	}
  2528  	// match: (ADD <t> a p:(ADDconst [c] m:(MUL _ _)))
  2529  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  2530  	// result: (ADDconst [c] (ADD <v.Type> a m))
  2531  	for {
  2532  		t := v.Type
  2533  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2534  			a := v_0
  2535  			p := v_1
  2536  			if p.Op != OpARM64ADDconst {
  2537  				continue
  2538  			}
  2539  			c := auxIntToInt64(p.AuxInt)
  2540  			m := p.Args[0]
  2541  			if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  2542  				continue
  2543  			}
  2544  			v.reset(OpARM64ADDconst)
  2545  			v.AuxInt = int64ToAuxInt(c)
  2546  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  2547  			v0.AddArg2(a, m)
  2548  			v.AddArg(v0)
  2549  			return true
  2550  		}
  2551  		break
  2552  	}
  2553  	// match: (ADD <t> a p:(ADDconst [c] m:(MULW _ _)))
  2554  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  2555  	// result: (ADDconst [c] (ADD <v.Type> a m))
  2556  	for {
  2557  		t := v.Type
  2558  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2559  			a := v_0
  2560  			p := v_1
  2561  			if p.Op != OpARM64ADDconst {
  2562  				continue
  2563  			}
  2564  			c := auxIntToInt64(p.AuxInt)
  2565  			m := p.Args[0]
  2566  			if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  2567  				continue
  2568  			}
  2569  			v.reset(OpARM64ADDconst)
  2570  			v.AuxInt = int64ToAuxInt(c)
  2571  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  2572  			v0.AddArg2(a, m)
  2573  			v.AddArg(v0)
  2574  			return true
  2575  		}
  2576  		break
  2577  	}
  2578  	// match: (ADD <t> a p:(ADDconst [c] m:(MNEG _ _)))
  2579  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  2580  	// result: (ADDconst [c] (ADD <v.Type> a m))
  2581  	for {
  2582  		t := v.Type
  2583  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2584  			a := v_0
  2585  			p := v_1
  2586  			if p.Op != OpARM64ADDconst {
  2587  				continue
  2588  			}
  2589  			c := auxIntToInt64(p.AuxInt)
  2590  			m := p.Args[0]
  2591  			if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  2592  				continue
  2593  			}
  2594  			v.reset(OpARM64ADDconst)
  2595  			v.AuxInt = int64ToAuxInt(c)
  2596  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  2597  			v0.AddArg2(a, m)
  2598  			v.AddArg(v0)
  2599  			return true
  2600  		}
  2601  		break
  2602  	}
  2603  	// match: (ADD <t> a p:(ADDconst [c] m:(MNEGW _ _)))
  2604  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  2605  	// result: (ADDconst [c] (ADD <v.Type> a m))
  2606  	for {
  2607  		t := v.Type
  2608  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2609  			a := v_0
  2610  			p := v_1
  2611  			if p.Op != OpARM64ADDconst {
  2612  				continue
  2613  			}
  2614  			c := auxIntToInt64(p.AuxInt)
  2615  			m := p.Args[0]
  2616  			if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  2617  				continue
  2618  			}
  2619  			v.reset(OpARM64ADDconst)
  2620  			v.AuxInt = int64ToAuxInt(c)
  2621  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  2622  			v0.AddArg2(a, m)
  2623  			v.AddArg(v0)
  2624  			return true
  2625  		}
  2626  		break
  2627  	}
  2628  	// match: (ADD <t> a p:(SUBconst [c] m:(MUL _ _)))
  2629  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  2630  	// result: (SUBconst [c] (ADD <v.Type> a m))
  2631  	for {
  2632  		t := v.Type
  2633  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2634  			a := v_0
  2635  			p := v_1
  2636  			if p.Op != OpARM64SUBconst {
  2637  				continue
  2638  			}
  2639  			c := auxIntToInt64(p.AuxInt)
  2640  			m := p.Args[0]
  2641  			if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  2642  				continue
  2643  			}
  2644  			v.reset(OpARM64SUBconst)
  2645  			v.AuxInt = int64ToAuxInt(c)
  2646  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  2647  			v0.AddArg2(a, m)
  2648  			v.AddArg(v0)
  2649  			return true
  2650  		}
  2651  		break
  2652  	}
  2653  	// match: (ADD <t> a p:(SUBconst [c] m:(MULW _ _)))
  2654  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  2655  	// result: (SUBconst [c] (ADD <v.Type> a m))
  2656  	for {
  2657  		t := v.Type
  2658  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2659  			a := v_0
  2660  			p := v_1
  2661  			if p.Op != OpARM64SUBconst {
  2662  				continue
  2663  			}
  2664  			c := auxIntToInt64(p.AuxInt)
  2665  			m := p.Args[0]
  2666  			if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  2667  				continue
  2668  			}
  2669  			v.reset(OpARM64SUBconst)
  2670  			v.AuxInt = int64ToAuxInt(c)
  2671  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  2672  			v0.AddArg2(a, m)
  2673  			v.AddArg(v0)
  2674  			return true
  2675  		}
  2676  		break
  2677  	}
  2678  	// match: (ADD <t> a p:(SUBconst [c] m:(MNEG _ _)))
  2679  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  2680  	// result: (SUBconst [c] (ADD <v.Type> a m))
  2681  	for {
  2682  		t := v.Type
  2683  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2684  			a := v_0
  2685  			p := v_1
  2686  			if p.Op != OpARM64SUBconst {
  2687  				continue
  2688  			}
  2689  			c := auxIntToInt64(p.AuxInt)
  2690  			m := p.Args[0]
  2691  			if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  2692  				continue
  2693  			}
  2694  			v.reset(OpARM64SUBconst)
  2695  			v.AuxInt = int64ToAuxInt(c)
  2696  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  2697  			v0.AddArg2(a, m)
  2698  			v.AddArg(v0)
  2699  			return true
  2700  		}
  2701  		break
  2702  	}
  2703  	// match: (ADD <t> a p:(SUBconst [c] m:(MNEGW _ _)))
  2704  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  2705  	// result: (SUBconst [c] (ADD <v.Type> a m))
  2706  	for {
  2707  		t := v.Type
  2708  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2709  			a := v_0
  2710  			p := v_1
  2711  			if p.Op != OpARM64SUBconst {
  2712  				continue
  2713  			}
  2714  			c := auxIntToInt64(p.AuxInt)
  2715  			m := p.Args[0]
  2716  			if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  2717  				continue
  2718  			}
  2719  			v.reset(OpARM64SUBconst)
  2720  			v.AuxInt = int64ToAuxInt(c)
  2721  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  2722  			v0.AddArg2(a, m)
  2723  			v.AddArg(v0)
  2724  			return true
  2725  		}
  2726  		break
  2727  	}
  2728  	// match: (ADD x (NEG y))
  2729  	// result: (SUB x y)
  2730  	for {
  2731  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2732  			x := v_0
  2733  			if v_1.Op != OpARM64NEG {
  2734  				continue
  2735  			}
  2736  			y := v_1.Args[0]
  2737  			v.reset(OpARM64SUB)
  2738  			v.AddArg2(x, y)
  2739  			return true
  2740  		}
  2741  		break
  2742  	}
  2743  	// match: (ADD x0 x1:(SLLconst [c] y))
  2744  	// cond: clobberIfDead(x1)
  2745  	// result: (ADDshiftLL x0 y [c])
  2746  	for {
  2747  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2748  			x0 := v_0
  2749  			x1 := v_1
  2750  			if x1.Op != OpARM64SLLconst {
  2751  				continue
  2752  			}
  2753  			c := auxIntToInt64(x1.AuxInt)
  2754  			y := x1.Args[0]
  2755  			if !(clobberIfDead(x1)) {
  2756  				continue
  2757  			}
  2758  			v.reset(OpARM64ADDshiftLL)
  2759  			v.AuxInt = int64ToAuxInt(c)
  2760  			v.AddArg2(x0, y)
  2761  			return true
  2762  		}
  2763  		break
  2764  	}
  2765  	// match: (ADD x0 x1:(SRLconst [c] y))
  2766  	// cond: clobberIfDead(x1)
  2767  	// result: (ADDshiftRL x0 y [c])
  2768  	for {
  2769  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2770  			x0 := v_0
  2771  			x1 := v_1
  2772  			if x1.Op != OpARM64SRLconst {
  2773  				continue
  2774  			}
  2775  			c := auxIntToInt64(x1.AuxInt)
  2776  			y := x1.Args[0]
  2777  			if !(clobberIfDead(x1)) {
  2778  				continue
  2779  			}
  2780  			v.reset(OpARM64ADDshiftRL)
  2781  			v.AuxInt = int64ToAuxInt(c)
  2782  			v.AddArg2(x0, y)
  2783  			return true
  2784  		}
  2785  		break
  2786  	}
  2787  	// match: (ADD x0 x1:(SRAconst [c] y))
  2788  	// cond: clobberIfDead(x1)
  2789  	// result: (ADDshiftRA x0 y [c])
  2790  	for {
  2791  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2792  			x0 := v_0
  2793  			x1 := v_1
  2794  			if x1.Op != OpARM64SRAconst {
  2795  				continue
  2796  			}
  2797  			c := auxIntToInt64(x1.AuxInt)
  2798  			y := x1.Args[0]
  2799  			if !(clobberIfDead(x1)) {
  2800  				continue
  2801  			}
  2802  			v.reset(OpARM64ADDshiftRA)
  2803  			v.AuxInt = int64ToAuxInt(c)
  2804  			v.AddArg2(x0, y)
  2805  			return true
  2806  		}
  2807  		break
  2808  	}
  2809  	// match: (ADD x0 x1:(ANDshiftRA x2:(SLLconst [sl] y) z [63]))
  2810  	// cond: x1.Uses == 1 && x2.Uses == 1
  2811  	// result: (ADDshiftLL x0 (ANDshiftRA <y.Type> y z [63]) [sl])
  2812  	for {
  2813  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2814  			x0 := v_0
  2815  			x1 := v_1
  2816  			if x1.Op != OpARM64ANDshiftRA || auxIntToInt64(x1.AuxInt) != 63 {
  2817  				continue
  2818  			}
  2819  			z := x1.Args[1]
  2820  			x2 := x1.Args[0]
  2821  			if x2.Op != OpARM64SLLconst {
  2822  				continue
  2823  			}
  2824  			sl := auxIntToInt64(x2.AuxInt)
  2825  			y := x2.Args[0]
  2826  			if !(x1.Uses == 1 && x2.Uses == 1) {
  2827  				continue
  2828  			}
  2829  			v.reset(OpARM64ADDshiftLL)
  2830  			v.AuxInt = int64ToAuxInt(sl)
  2831  			v0 := b.NewValue0(v.Pos, OpARM64ANDshiftRA, y.Type)
  2832  			v0.AuxInt = int64ToAuxInt(63)
  2833  			v0.AddArg2(y, z)
  2834  			v.AddArg2(x0, v0)
  2835  			return true
  2836  		}
  2837  		break
  2838  	}
  2839  	// match: (ADD x0 x1:(ANDshiftLL x2:(SRAconst [63] z) y [sl]))
  2840  	// cond: x1.Uses == 1 && x2.Uses == 1
  2841  	// result: (ADDshiftLL x0 (ANDshiftRA <y.Type> y z [63]) [sl])
  2842  	for {
  2843  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2844  			x0 := v_0
  2845  			x1 := v_1
  2846  			if x1.Op != OpARM64ANDshiftLL {
  2847  				continue
  2848  			}
  2849  			sl := auxIntToInt64(x1.AuxInt)
  2850  			y := x1.Args[1]
  2851  			x2 := x1.Args[0]
  2852  			if x2.Op != OpARM64SRAconst || auxIntToInt64(x2.AuxInt) != 63 {
  2853  				continue
  2854  			}
  2855  			z := x2.Args[0]
  2856  			if !(x1.Uses == 1 && x2.Uses == 1) {
  2857  				continue
  2858  			}
  2859  			v.reset(OpARM64ADDshiftLL)
  2860  			v.AuxInt = int64ToAuxInt(sl)
  2861  			v0 := b.NewValue0(v.Pos, OpARM64ANDshiftRA, y.Type)
  2862  			v0.AuxInt = int64ToAuxInt(63)
  2863  			v0.AddArg2(y, z)
  2864  			v.AddArg2(x0, v0)
  2865  			return true
  2866  		}
  2867  		break
  2868  	}
  2869  	return false
  2870  }
  2871  func rewriteValueARM64_OpARM64ADDSflags(v *Value) bool {
  2872  	v_1 := v.Args[1]
  2873  	v_0 := v.Args[0]
  2874  	// match: (ADDSflags x (MOVDconst [c]))
  2875  	// result: (ADDSconstflags [c] x)
  2876  	for {
  2877  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2878  			x := v_0
  2879  			if v_1.Op != OpARM64MOVDconst {
  2880  				continue
  2881  			}
  2882  			c := auxIntToInt64(v_1.AuxInt)
  2883  			v.reset(OpARM64ADDSconstflags)
  2884  			v.AuxInt = int64ToAuxInt(c)
  2885  			v.AddArg(x)
  2886  			return true
  2887  		}
  2888  		break
  2889  	}
  2890  	return false
  2891  }
  2892  func rewriteValueARM64_OpARM64ADDconst(v *Value) bool {
  2893  	v_0 := v.Args[0]
  2894  	// match: (ADDconst [off1] (MOVDaddr [off2] {sym} ptr))
  2895  	// cond: is32Bit(off1+int64(off2))
  2896  	// result: (MOVDaddr [int32(off1)+off2] {sym} ptr)
  2897  	for {
  2898  		off1 := auxIntToInt64(v.AuxInt)
  2899  		if v_0.Op != OpARM64MOVDaddr {
  2900  			break
  2901  		}
  2902  		off2 := auxIntToInt32(v_0.AuxInt)
  2903  		sym := auxToSym(v_0.Aux)
  2904  		ptr := v_0.Args[0]
  2905  		if !(is32Bit(off1 + int64(off2))) {
  2906  			break
  2907  		}
  2908  		v.reset(OpARM64MOVDaddr)
  2909  		v.AuxInt = int32ToAuxInt(int32(off1) + off2)
  2910  		v.Aux = symToAux(sym)
  2911  		v.AddArg(ptr)
  2912  		return true
  2913  	}
  2914  	// match: (ADDconst [c] y)
  2915  	// cond: c < 0
  2916  	// result: (SUBconst [-c] y)
  2917  	for {
  2918  		c := auxIntToInt64(v.AuxInt)
  2919  		y := v_0
  2920  		if !(c < 0) {
  2921  			break
  2922  		}
  2923  		v.reset(OpARM64SUBconst)
  2924  		v.AuxInt = int64ToAuxInt(-c)
  2925  		v.AddArg(y)
  2926  		return true
  2927  	}
  2928  	// match: (ADDconst [0] x)
  2929  	// result: x
  2930  	for {
  2931  		if auxIntToInt64(v.AuxInt) != 0 {
  2932  			break
  2933  		}
  2934  		x := v_0
  2935  		v.copyOf(x)
  2936  		return true
  2937  	}
  2938  	// match: (ADDconst [c] (MOVDconst [d]))
  2939  	// result: (MOVDconst [c+d])
  2940  	for {
  2941  		c := auxIntToInt64(v.AuxInt)
  2942  		if v_0.Op != OpARM64MOVDconst {
  2943  			break
  2944  		}
  2945  		d := auxIntToInt64(v_0.AuxInt)
  2946  		v.reset(OpARM64MOVDconst)
  2947  		v.AuxInt = int64ToAuxInt(c + d)
  2948  		return true
  2949  	}
  2950  	// match: (ADDconst [c] (ADDconst [d] x))
  2951  	// result: (ADDconst [c+d] x)
  2952  	for {
  2953  		c := auxIntToInt64(v.AuxInt)
  2954  		if v_0.Op != OpARM64ADDconst {
  2955  			break
  2956  		}
  2957  		d := auxIntToInt64(v_0.AuxInt)
  2958  		x := v_0.Args[0]
  2959  		v.reset(OpARM64ADDconst)
  2960  		v.AuxInt = int64ToAuxInt(c + d)
  2961  		v.AddArg(x)
  2962  		return true
  2963  	}
  2964  	// match: (ADDconst [c] (SUBconst [d] x))
  2965  	// result: (ADDconst [c-d] x)
  2966  	for {
  2967  		c := auxIntToInt64(v.AuxInt)
  2968  		if v_0.Op != OpARM64SUBconst {
  2969  			break
  2970  		}
  2971  		d := auxIntToInt64(v_0.AuxInt)
  2972  		x := v_0.Args[0]
  2973  		v.reset(OpARM64ADDconst)
  2974  		v.AuxInt = int64ToAuxInt(c - d)
  2975  		v.AddArg(x)
  2976  		return true
  2977  	}
  2978  	return false
  2979  }
  2980  func rewriteValueARM64_OpARM64ADDshiftLL(v *Value) bool {
  2981  	v_1 := v.Args[1]
  2982  	v_0 := v.Args[0]
  2983  	b := v.Block
  2984  	typ := &b.Func.Config.Types
  2985  	// match: (ADDshiftLL (MOVDconst [c]) x [d])
  2986  	// result: (ADDconst [c] (SLLconst <x.Type> x [d]))
  2987  	for {
  2988  		d := auxIntToInt64(v.AuxInt)
  2989  		if v_0.Op != OpARM64MOVDconst {
  2990  			break
  2991  		}
  2992  		c := auxIntToInt64(v_0.AuxInt)
  2993  		x := v_1
  2994  		v.reset(OpARM64ADDconst)
  2995  		v.AuxInt = int64ToAuxInt(c)
  2996  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  2997  		v0.AuxInt = int64ToAuxInt(d)
  2998  		v0.AddArg(x)
  2999  		v.AddArg(v0)
  3000  		return true
  3001  	}
  3002  	// match: (ADDshiftLL x (MOVDconst [c]) [d])
  3003  	// result: (ADDconst x [int64(uint64(c)<<uint64(d))])
  3004  	for {
  3005  		d := auxIntToInt64(v.AuxInt)
  3006  		x := v_0
  3007  		if v_1.Op != OpARM64MOVDconst {
  3008  			break
  3009  		}
  3010  		c := auxIntToInt64(v_1.AuxInt)
  3011  		v.reset(OpARM64ADDconst)
  3012  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
  3013  		v.AddArg(x)
  3014  		return true
  3015  	}
  3016  	// match: (ADDshiftLL <typ.UInt16> [8] (UBFX <typ.UInt16> [armBFAuxInt(8, 8)] x) x)
  3017  	// result: (REV16W x)
  3018  	for {
  3019  		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) {
  3020  			break
  3021  		}
  3022  		x := v_0.Args[0]
  3023  		if x != v_1 {
  3024  			break
  3025  		}
  3026  		v.reset(OpARM64REV16W)
  3027  		v.AddArg(x)
  3028  		return true
  3029  	}
  3030  	// match: (ADDshiftLL [8] (UBFX [armBFAuxInt(8, 24)] (ANDconst [c1] x)) (ANDconst [c2] x))
  3031  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
  3032  	// result: (REV16W x)
  3033  	for {
  3034  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64UBFX || auxIntToArm64BitField(v_0.AuxInt) != armBFAuxInt(8, 24) {
  3035  			break
  3036  		}
  3037  		v_0_0 := v_0.Args[0]
  3038  		if v_0_0.Op != OpARM64ANDconst {
  3039  			break
  3040  		}
  3041  		c1 := auxIntToInt64(v_0_0.AuxInt)
  3042  		x := v_0_0.Args[0]
  3043  		if v_1.Op != OpARM64ANDconst {
  3044  			break
  3045  		}
  3046  		c2 := auxIntToInt64(v_1.AuxInt)
  3047  		if x != v_1.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
  3048  			break
  3049  		}
  3050  		v.reset(OpARM64REV16W)
  3051  		v.AddArg(x)
  3052  		return true
  3053  	}
  3054  	// match: (ADDshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
  3055  	// cond: (uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff)
  3056  	// result: (REV16 x)
  3057  	for {
  3058  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
  3059  			break
  3060  		}
  3061  		v_0_0 := v_0.Args[0]
  3062  		if v_0_0.Op != OpARM64ANDconst {
  3063  			break
  3064  		}
  3065  		c1 := auxIntToInt64(v_0_0.AuxInt)
  3066  		x := v_0_0.Args[0]
  3067  		if v_1.Op != OpARM64ANDconst {
  3068  			break
  3069  		}
  3070  		c2 := auxIntToInt64(v_1.AuxInt)
  3071  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
  3072  			break
  3073  		}
  3074  		v.reset(OpARM64REV16)
  3075  		v.AddArg(x)
  3076  		return true
  3077  	}
  3078  	// match: (ADDshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
  3079  	// cond: (uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff)
  3080  	// result: (REV16 (ANDconst <x.Type> [0xffffffff] x))
  3081  	for {
  3082  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
  3083  			break
  3084  		}
  3085  		v_0_0 := v_0.Args[0]
  3086  		if v_0_0.Op != OpARM64ANDconst {
  3087  			break
  3088  		}
  3089  		c1 := auxIntToInt64(v_0_0.AuxInt)
  3090  		x := v_0_0.Args[0]
  3091  		if v_1.Op != OpARM64ANDconst {
  3092  			break
  3093  		}
  3094  		c2 := auxIntToInt64(v_1.AuxInt)
  3095  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
  3096  			break
  3097  		}
  3098  		v.reset(OpARM64REV16)
  3099  		v0 := b.NewValue0(v.Pos, OpARM64ANDconst, x.Type)
  3100  		v0.AuxInt = int64ToAuxInt(0xffffffff)
  3101  		v0.AddArg(x)
  3102  		v.AddArg(v0)
  3103  		return true
  3104  	}
  3105  	// match: (ADDshiftLL [c] (SRLconst x [64-c]) x2)
  3106  	// result: (EXTRconst [64-c] x2 x)
  3107  	for {
  3108  		c := auxIntToInt64(v.AuxInt)
  3109  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 64-c {
  3110  			break
  3111  		}
  3112  		x := v_0.Args[0]
  3113  		x2 := v_1
  3114  		v.reset(OpARM64EXTRconst)
  3115  		v.AuxInt = int64ToAuxInt(64 - c)
  3116  		v.AddArg2(x2, x)
  3117  		return true
  3118  	}
  3119  	// match: (ADDshiftLL <t> [c] (UBFX [bfc] x) x2)
  3120  	// cond: c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)
  3121  	// result: (EXTRWconst [32-c] x2 x)
  3122  	for {
  3123  		t := v.Type
  3124  		c := auxIntToInt64(v.AuxInt)
  3125  		if v_0.Op != OpARM64UBFX {
  3126  			break
  3127  		}
  3128  		bfc := auxIntToArm64BitField(v_0.AuxInt)
  3129  		x := v_0.Args[0]
  3130  		x2 := v_1
  3131  		if !(c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)) {
  3132  			break
  3133  		}
  3134  		v.reset(OpARM64EXTRWconst)
  3135  		v.AuxInt = int64ToAuxInt(32 - c)
  3136  		v.AddArg2(x2, x)
  3137  		return true
  3138  	}
  3139  	return false
  3140  }
  3141  func rewriteValueARM64_OpARM64ADDshiftRA(v *Value) bool {
  3142  	v_1 := v.Args[1]
  3143  	v_0 := v.Args[0]
  3144  	b := v.Block
  3145  	// match: (ADDshiftRA (MOVDconst [c]) x [d])
  3146  	// result: (ADDconst [c] (SRAconst <x.Type> x [d]))
  3147  	for {
  3148  		d := auxIntToInt64(v.AuxInt)
  3149  		if v_0.Op != OpARM64MOVDconst {
  3150  			break
  3151  		}
  3152  		c := auxIntToInt64(v_0.AuxInt)
  3153  		x := v_1
  3154  		v.reset(OpARM64ADDconst)
  3155  		v.AuxInt = int64ToAuxInt(c)
  3156  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
  3157  		v0.AuxInt = int64ToAuxInt(d)
  3158  		v0.AddArg(x)
  3159  		v.AddArg(v0)
  3160  		return true
  3161  	}
  3162  	// match: (ADDshiftRA x (MOVDconst [c]) [d])
  3163  	// result: (ADDconst x [c>>uint64(d)])
  3164  	for {
  3165  		d := auxIntToInt64(v.AuxInt)
  3166  		x := v_0
  3167  		if v_1.Op != OpARM64MOVDconst {
  3168  			break
  3169  		}
  3170  		c := auxIntToInt64(v_1.AuxInt)
  3171  		v.reset(OpARM64ADDconst)
  3172  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
  3173  		v.AddArg(x)
  3174  		return true
  3175  	}
  3176  	return false
  3177  }
  3178  func rewriteValueARM64_OpARM64ADDshiftRL(v *Value) bool {
  3179  	v_1 := v.Args[1]
  3180  	v_0 := v.Args[0]
  3181  	b := v.Block
  3182  	// match: (ADDshiftRL (MOVDconst [c]) x [d])
  3183  	// result: (ADDconst [c] (SRLconst <x.Type> x [d]))
  3184  	for {
  3185  		d := auxIntToInt64(v.AuxInt)
  3186  		if v_0.Op != OpARM64MOVDconst {
  3187  			break
  3188  		}
  3189  		c := auxIntToInt64(v_0.AuxInt)
  3190  		x := v_1
  3191  		v.reset(OpARM64ADDconst)
  3192  		v.AuxInt = int64ToAuxInt(c)
  3193  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
  3194  		v0.AuxInt = int64ToAuxInt(d)
  3195  		v0.AddArg(x)
  3196  		v.AddArg(v0)
  3197  		return true
  3198  	}
  3199  	// match: (ADDshiftRL x (MOVDconst [c]) [d])
  3200  	// result: (ADDconst x [int64(uint64(c)>>uint64(d))])
  3201  	for {
  3202  		d := auxIntToInt64(v.AuxInt)
  3203  		x := v_0
  3204  		if v_1.Op != OpARM64MOVDconst {
  3205  			break
  3206  		}
  3207  		c := auxIntToInt64(v_1.AuxInt)
  3208  		v.reset(OpARM64ADDconst)
  3209  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
  3210  		v.AddArg(x)
  3211  		return true
  3212  	}
  3213  	return false
  3214  }
  3215  func rewriteValueARM64_OpARM64AND(v *Value) bool {
  3216  	v_1 := v.Args[1]
  3217  	v_0 := v.Args[0]
  3218  	// match: (AND x (MOVDconst [c]))
  3219  	// result: (ANDconst [c] x)
  3220  	for {
  3221  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3222  			x := v_0
  3223  			if v_1.Op != OpARM64MOVDconst {
  3224  				continue
  3225  			}
  3226  			c := auxIntToInt64(v_1.AuxInt)
  3227  			v.reset(OpARM64ANDconst)
  3228  			v.AuxInt = int64ToAuxInt(c)
  3229  			v.AddArg(x)
  3230  			return true
  3231  		}
  3232  		break
  3233  	}
  3234  	// match: (AND x x)
  3235  	// result: x
  3236  	for {
  3237  		x := v_0
  3238  		if x != v_1 {
  3239  			break
  3240  		}
  3241  		v.copyOf(x)
  3242  		return true
  3243  	}
  3244  	// match: (AND x (MVN y))
  3245  	// result: (BIC x y)
  3246  	for {
  3247  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3248  			x := v_0
  3249  			if v_1.Op != OpARM64MVN {
  3250  				continue
  3251  			}
  3252  			y := v_1.Args[0]
  3253  			v.reset(OpARM64BIC)
  3254  			v.AddArg2(x, y)
  3255  			return true
  3256  		}
  3257  		break
  3258  	}
  3259  	// match: (AND x0 x1:(SLLconst [c] y))
  3260  	// cond: clobberIfDead(x1)
  3261  	// result: (ANDshiftLL x0 y [c])
  3262  	for {
  3263  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3264  			x0 := v_0
  3265  			x1 := v_1
  3266  			if x1.Op != OpARM64SLLconst {
  3267  				continue
  3268  			}
  3269  			c := auxIntToInt64(x1.AuxInt)
  3270  			y := x1.Args[0]
  3271  			if !(clobberIfDead(x1)) {
  3272  				continue
  3273  			}
  3274  			v.reset(OpARM64ANDshiftLL)
  3275  			v.AuxInt = int64ToAuxInt(c)
  3276  			v.AddArg2(x0, y)
  3277  			return true
  3278  		}
  3279  		break
  3280  	}
  3281  	// match: (AND x0 x1:(SRLconst [c] y))
  3282  	// cond: clobberIfDead(x1)
  3283  	// result: (ANDshiftRL x0 y [c])
  3284  	for {
  3285  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3286  			x0 := v_0
  3287  			x1 := v_1
  3288  			if x1.Op != OpARM64SRLconst {
  3289  				continue
  3290  			}
  3291  			c := auxIntToInt64(x1.AuxInt)
  3292  			y := x1.Args[0]
  3293  			if !(clobberIfDead(x1)) {
  3294  				continue
  3295  			}
  3296  			v.reset(OpARM64ANDshiftRL)
  3297  			v.AuxInt = int64ToAuxInt(c)
  3298  			v.AddArg2(x0, y)
  3299  			return true
  3300  		}
  3301  		break
  3302  	}
  3303  	// match: (AND x0 x1:(SRAconst [c] y))
  3304  	// cond: clobberIfDead(x1)
  3305  	// result: (ANDshiftRA x0 y [c])
  3306  	for {
  3307  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3308  			x0 := v_0
  3309  			x1 := v_1
  3310  			if x1.Op != OpARM64SRAconst {
  3311  				continue
  3312  			}
  3313  			c := auxIntToInt64(x1.AuxInt)
  3314  			y := x1.Args[0]
  3315  			if !(clobberIfDead(x1)) {
  3316  				continue
  3317  			}
  3318  			v.reset(OpARM64ANDshiftRA)
  3319  			v.AuxInt = int64ToAuxInt(c)
  3320  			v.AddArg2(x0, y)
  3321  			return true
  3322  		}
  3323  		break
  3324  	}
  3325  	// match: (AND x0 x1:(RORconst [c] y))
  3326  	// cond: clobberIfDead(x1)
  3327  	// result: (ANDshiftRO x0 y [c])
  3328  	for {
  3329  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3330  			x0 := v_0
  3331  			x1 := v_1
  3332  			if x1.Op != OpARM64RORconst {
  3333  				continue
  3334  			}
  3335  			c := auxIntToInt64(x1.AuxInt)
  3336  			y := x1.Args[0]
  3337  			if !(clobberIfDead(x1)) {
  3338  				continue
  3339  			}
  3340  			v.reset(OpARM64ANDshiftRO)
  3341  			v.AuxInt = int64ToAuxInt(c)
  3342  			v.AddArg2(x0, y)
  3343  			return true
  3344  		}
  3345  		break
  3346  	}
  3347  	return false
  3348  }
  3349  func rewriteValueARM64_OpARM64ANDconst(v *Value) bool {
  3350  	v_0 := v.Args[0]
  3351  	// match: (ANDconst [0] _)
  3352  	// result: (MOVDconst [0])
  3353  	for {
  3354  		if auxIntToInt64(v.AuxInt) != 0 {
  3355  			break
  3356  		}
  3357  		v.reset(OpARM64MOVDconst)
  3358  		v.AuxInt = int64ToAuxInt(0)
  3359  		return true
  3360  	}
  3361  	// match: (ANDconst [-1] x)
  3362  	// result: x
  3363  	for {
  3364  		if auxIntToInt64(v.AuxInt) != -1 {
  3365  			break
  3366  		}
  3367  		x := v_0
  3368  		v.copyOf(x)
  3369  		return true
  3370  	}
  3371  	// match: (ANDconst [c] (MOVDconst [d]))
  3372  	// result: (MOVDconst [c&d])
  3373  	for {
  3374  		c := auxIntToInt64(v.AuxInt)
  3375  		if v_0.Op != OpARM64MOVDconst {
  3376  			break
  3377  		}
  3378  		d := auxIntToInt64(v_0.AuxInt)
  3379  		v.reset(OpARM64MOVDconst)
  3380  		v.AuxInt = int64ToAuxInt(c & d)
  3381  		return true
  3382  	}
  3383  	// match: (ANDconst [c] (ANDconst [d] x))
  3384  	// result: (ANDconst [c&d] x)
  3385  	for {
  3386  		c := auxIntToInt64(v.AuxInt)
  3387  		if v_0.Op != OpARM64ANDconst {
  3388  			break
  3389  		}
  3390  		d := auxIntToInt64(v_0.AuxInt)
  3391  		x := v_0.Args[0]
  3392  		v.reset(OpARM64ANDconst)
  3393  		v.AuxInt = int64ToAuxInt(c & d)
  3394  		v.AddArg(x)
  3395  		return true
  3396  	}
  3397  	// match: (ANDconst [c] (MOVWUreg x))
  3398  	// result: (ANDconst [c&(1<<32-1)] x)
  3399  	for {
  3400  		c := auxIntToInt64(v.AuxInt)
  3401  		if v_0.Op != OpARM64MOVWUreg {
  3402  			break
  3403  		}
  3404  		x := v_0.Args[0]
  3405  		v.reset(OpARM64ANDconst)
  3406  		v.AuxInt = int64ToAuxInt(c & (1<<32 - 1))
  3407  		v.AddArg(x)
  3408  		return true
  3409  	}
  3410  	// match: (ANDconst [c] (MOVHUreg x))
  3411  	// result: (ANDconst [c&(1<<16-1)] x)
  3412  	for {
  3413  		c := auxIntToInt64(v.AuxInt)
  3414  		if v_0.Op != OpARM64MOVHUreg {
  3415  			break
  3416  		}
  3417  		x := v_0.Args[0]
  3418  		v.reset(OpARM64ANDconst)
  3419  		v.AuxInt = int64ToAuxInt(c & (1<<16 - 1))
  3420  		v.AddArg(x)
  3421  		return true
  3422  	}
  3423  	// match: (ANDconst [c] (MOVBUreg x))
  3424  	// result: (ANDconst [c&(1<<8-1)] x)
  3425  	for {
  3426  		c := auxIntToInt64(v.AuxInt)
  3427  		if v_0.Op != OpARM64MOVBUreg {
  3428  			break
  3429  		}
  3430  		x := v_0.Args[0]
  3431  		v.reset(OpARM64ANDconst)
  3432  		v.AuxInt = int64ToAuxInt(c & (1<<8 - 1))
  3433  		v.AddArg(x)
  3434  		return true
  3435  	}
  3436  	// match: (ANDconst [ac] (SLLconst [sc] x))
  3437  	// cond: isARM64BFMask(sc, ac, sc)
  3438  	// result: (UBFIZ [armBFAuxInt(sc, arm64BFWidth(ac, sc))] x)
  3439  	for {
  3440  		ac := auxIntToInt64(v.AuxInt)
  3441  		if v_0.Op != OpARM64SLLconst {
  3442  			break
  3443  		}
  3444  		sc := auxIntToInt64(v_0.AuxInt)
  3445  		x := v_0.Args[0]
  3446  		if !(isARM64BFMask(sc, ac, sc)) {
  3447  			break
  3448  		}
  3449  		v.reset(OpARM64UBFIZ)
  3450  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, sc)))
  3451  		v.AddArg(x)
  3452  		return true
  3453  	}
  3454  	// match: (ANDconst [ac] (SRLconst [sc] x))
  3455  	// cond: isARM64BFMask(sc, ac, 0)
  3456  	// result: (UBFX [armBFAuxInt(sc, arm64BFWidth(ac, 0))] x)
  3457  	for {
  3458  		ac := auxIntToInt64(v.AuxInt)
  3459  		if v_0.Op != OpARM64SRLconst {
  3460  			break
  3461  		}
  3462  		sc := auxIntToInt64(v_0.AuxInt)
  3463  		x := v_0.Args[0]
  3464  		if !(isARM64BFMask(sc, ac, 0)) {
  3465  			break
  3466  		}
  3467  		v.reset(OpARM64UBFX)
  3468  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, 0)))
  3469  		v.AddArg(x)
  3470  		return true
  3471  	}
  3472  	// match: (ANDconst [c] (UBFX [bfc] x))
  3473  	// cond: isARM64BFMask(0, c, 0)
  3474  	// result: (UBFX [armBFAuxInt(bfc.lsb(), min(bfc.width(), arm64BFWidth(c, 0)))] x)
  3475  	for {
  3476  		c := auxIntToInt64(v.AuxInt)
  3477  		if v_0.Op != OpARM64UBFX {
  3478  			break
  3479  		}
  3480  		bfc := auxIntToArm64BitField(v_0.AuxInt)
  3481  		x := v_0.Args[0]
  3482  		if !(isARM64BFMask(0, c, 0)) {
  3483  			break
  3484  		}
  3485  		v.reset(OpARM64UBFX)
  3486  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), arm64BFWidth(c, 0))))
  3487  		v.AddArg(x)
  3488  		return true
  3489  	}
  3490  	// match: (ANDconst [0xffffffff] x)
  3491  	// result: (MOVWUreg x)
  3492  	for {
  3493  		if auxIntToInt64(v.AuxInt) != 0xffffffff {
  3494  			break
  3495  		}
  3496  		x := v_0
  3497  		v.reset(OpARM64MOVWUreg)
  3498  		v.AddArg(x)
  3499  		return true
  3500  	}
  3501  	// match: (ANDconst [0xffff ] x)
  3502  	// result: (MOVHUreg x)
  3503  	for {
  3504  		if auxIntToInt64(v.AuxInt) != 0xffff {
  3505  			break
  3506  		}
  3507  		x := v_0
  3508  		v.reset(OpARM64MOVHUreg)
  3509  		v.AddArg(x)
  3510  		return true
  3511  	}
  3512  	// match: (ANDconst [0xff ] x)
  3513  	// result: (MOVBUreg x)
  3514  	for {
  3515  		if auxIntToInt64(v.AuxInt) != 0xff {
  3516  			break
  3517  		}
  3518  		x := v_0
  3519  		v.reset(OpARM64MOVBUreg)
  3520  		v.AddArg(x)
  3521  		return true
  3522  	}
  3523  	return false
  3524  }
  3525  func rewriteValueARM64_OpARM64ANDshiftLL(v *Value) bool {
  3526  	v_1 := v.Args[1]
  3527  	v_0 := v.Args[0]
  3528  	b := v.Block
  3529  	// match: (ANDshiftLL (MOVDconst [c]) x [d])
  3530  	// result: (ANDconst [c] (SLLconst <x.Type> x [d]))
  3531  	for {
  3532  		d := auxIntToInt64(v.AuxInt)
  3533  		if v_0.Op != OpARM64MOVDconst {
  3534  			break
  3535  		}
  3536  		c := auxIntToInt64(v_0.AuxInt)
  3537  		x := v_1
  3538  		v.reset(OpARM64ANDconst)
  3539  		v.AuxInt = int64ToAuxInt(c)
  3540  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  3541  		v0.AuxInt = int64ToAuxInt(d)
  3542  		v0.AddArg(x)
  3543  		v.AddArg(v0)
  3544  		return true
  3545  	}
  3546  	// match: (ANDshiftLL x (MOVDconst [c]) [d])
  3547  	// result: (ANDconst x [int64(uint64(c)<<uint64(d))])
  3548  	for {
  3549  		d := auxIntToInt64(v.AuxInt)
  3550  		x := v_0
  3551  		if v_1.Op != OpARM64MOVDconst {
  3552  			break
  3553  		}
  3554  		c := auxIntToInt64(v_1.AuxInt)
  3555  		v.reset(OpARM64ANDconst)
  3556  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
  3557  		v.AddArg(x)
  3558  		return true
  3559  	}
  3560  	// match: (ANDshiftLL y:(SLLconst x [c]) x [c])
  3561  	// result: y
  3562  	for {
  3563  		c := auxIntToInt64(v.AuxInt)
  3564  		y := v_0
  3565  		if y.Op != OpARM64SLLconst || auxIntToInt64(y.AuxInt) != c {
  3566  			break
  3567  		}
  3568  		x := y.Args[0]
  3569  		if x != v_1 {
  3570  			break
  3571  		}
  3572  		v.copyOf(y)
  3573  		return true
  3574  	}
  3575  	return false
  3576  }
  3577  func rewriteValueARM64_OpARM64ANDshiftRA(v *Value) bool {
  3578  	v_1 := v.Args[1]
  3579  	v_0 := v.Args[0]
  3580  	b := v.Block
  3581  	// match: (ANDshiftRA (MOVDconst [c]) x [d])
  3582  	// result: (ANDconst [c] (SRAconst <x.Type> x [d]))
  3583  	for {
  3584  		d := auxIntToInt64(v.AuxInt)
  3585  		if v_0.Op != OpARM64MOVDconst {
  3586  			break
  3587  		}
  3588  		c := auxIntToInt64(v_0.AuxInt)
  3589  		x := v_1
  3590  		v.reset(OpARM64ANDconst)
  3591  		v.AuxInt = int64ToAuxInt(c)
  3592  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
  3593  		v0.AuxInt = int64ToAuxInt(d)
  3594  		v0.AddArg(x)
  3595  		v.AddArg(v0)
  3596  		return true
  3597  	}
  3598  	// match: (ANDshiftRA x (MOVDconst [c]) [d])
  3599  	// result: (ANDconst x [c>>uint64(d)])
  3600  	for {
  3601  		d := auxIntToInt64(v.AuxInt)
  3602  		x := v_0
  3603  		if v_1.Op != OpARM64MOVDconst {
  3604  			break
  3605  		}
  3606  		c := auxIntToInt64(v_1.AuxInt)
  3607  		v.reset(OpARM64ANDconst)
  3608  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
  3609  		v.AddArg(x)
  3610  		return true
  3611  	}
  3612  	// match: (ANDshiftRA y:(SRAconst x [c]) x [c])
  3613  	// result: y
  3614  	for {
  3615  		c := auxIntToInt64(v.AuxInt)
  3616  		y := v_0
  3617  		if y.Op != OpARM64SRAconst || auxIntToInt64(y.AuxInt) != c {
  3618  			break
  3619  		}
  3620  		x := y.Args[0]
  3621  		if x != v_1 {
  3622  			break
  3623  		}
  3624  		v.copyOf(y)
  3625  		return true
  3626  	}
  3627  	return false
  3628  }
  3629  func rewriteValueARM64_OpARM64ANDshiftRL(v *Value) bool {
  3630  	v_1 := v.Args[1]
  3631  	v_0 := v.Args[0]
  3632  	b := v.Block
  3633  	// match: (ANDshiftRL (MOVDconst [c]) x [d])
  3634  	// result: (ANDconst [c] (SRLconst <x.Type> x [d]))
  3635  	for {
  3636  		d := auxIntToInt64(v.AuxInt)
  3637  		if v_0.Op != OpARM64MOVDconst {
  3638  			break
  3639  		}
  3640  		c := auxIntToInt64(v_0.AuxInt)
  3641  		x := v_1
  3642  		v.reset(OpARM64ANDconst)
  3643  		v.AuxInt = int64ToAuxInt(c)
  3644  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
  3645  		v0.AuxInt = int64ToAuxInt(d)
  3646  		v0.AddArg(x)
  3647  		v.AddArg(v0)
  3648  		return true
  3649  	}
  3650  	// match: (ANDshiftRL x (MOVDconst [c]) [d])
  3651  	// result: (ANDconst x [int64(uint64(c)>>uint64(d))])
  3652  	for {
  3653  		d := auxIntToInt64(v.AuxInt)
  3654  		x := v_0
  3655  		if v_1.Op != OpARM64MOVDconst {
  3656  			break
  3657  		}
  3658  		c := auxIntToInt64(v_1.AuxInt)
  3659  		v.reset(OpARM64ANDconst)
  3660  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
  3661  		v.AddArg(x)
  3662  		return true
  3663  	}
  3664  	// match: (ANDshiftRL y:(SRLconst x [c]) x [c])
  3665  	// result: y
  3666  	for {
  3667  		c := auxIntToInt64(v.AuxInt)
  3668  		y := v_0
  3669  		if y.Op != OpARM64SRLconst || auxIntToInt64(y.AuxInt) != c {
  3670  			break
  3671  		}
  3672  		x := y.Args[0]
  3673  		if x != v_1 {
  3674  			break
  3675  		}
  3676  		v.copyOf(y)
  3677  		return true
  3678  	}
  3679  	return false
  3680  }
  3681  func rewriteValueARM64_OpARM64ANDshiftRO(v *Value) bool {
  3682  	v_1 := v.Args[1]
  3683  	v_0 := v.Args[0]
  3684  	b := v.Block
  3685  	// match: (ANDshiftRO (MOVDconst [c]) x [d])
  3686  	// result: (ANDconst [c] (RORconst <x.Type> x [d]))
  3687  	for {
  3688  		d := auxIntToInt64(v.AuxInt)
  3689  		if v_0.Op != OpARM64MOVDconst {
  3690  			break
  3691  		}
  3692  		c := auxIntToInt64(v_0.AuxInt)
  3693  		x := v_1
  3694  		v.reset(OpARM64ANDconst)
  3695  		v.AuxInt = int64ToAuxInt(c)
  3696  		v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
  3697  		v0.AuxInt = int64ToAuxInt(d)
  3698  		v0.AddArg(x)
  3699  		v.AddArg(v0)
  3700  		return true
  3701  	}
  3702  	// match: (ANDshiftRO x (MOVDconst [c]) [d])
  3703  	// result: (ANDconst x [rotateRight64(c, d)])
  3704  	for {
  3705  		d := auxIntToInt64(v.AuxInt)
  3706  		x := v_0
  3707  		if v_1.Op != OpARM64MOVDconst {
  3708  			break
  3709  		}
  3710  		c := auxIntToInt64(v_1.AuxInt)
  3711  		v.reset(OpARM64ANDconst)
  3712  		v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
  3713  		v.AddArg(x)
  3714  		return true
  3715  	}
  3716  	// match: (ANDshiftRO y:(RORconst x [c]) x [c])
  3717  	// result: y
  3718  	for {
  3719  		c := auxIntToInt64(v.AuxInt)
  3720  		y := v_0
  3721  		if y.Op != OpARM64RORconst || auxIntToInt64(y.AuxInt) != c {
  3722  			break
  3723  		}
  3724  		x := y.Args[0]
  3725  		if x != v_1 {
  3726  			break
  3727  		}
  3728  		v.copyOf(y)
  3729  		return true
  3730  	}
  3731  	return false
  3732  }
  3733  func rewriteValueARM64_OpARM64BIC(v *Value) bool {
  3734  	v_1 := v.Args[1]
  3735  	v_0 := v.Args[0]
  3736  	// match: (BIC x (MOVDconst [c]))
  3737  	// result: (ANDconst [^c] x)
  3738  	for {
  3739  		x := v_0
  3740  		if v_1.Op != OpARM64MOVDconst {
  3741  			break
  3742  		}
  3743  		c := auxIntToInt64(v_1.AuxInt)
  3744  		v.reset(OpARM64ANDconst)
  3745  		v.AuxInt = int64ToAuxInt(^c)
  3746  		v.AddArg(x)
  3747  		return true
  3748  	}
  3749  	// match: (BIC x x)
  3750  	// result: (MOVDconst [0])
  3751  	for {
  3752  		x := v_0
  3753  		if x != v_1 {
  3754  			break
  3755  		}
  3756  		v.reset(OpARM64MOVDconst)
  3757  		v.AuxInt = int64ToAuxInt(0)
  3758  		return true
  3759  	}
  3760  	// match: (BIC x0 x1:(SLLconst [c] y))
  3761  	// cond: clobberIfDead(x1)
  3762  	// result: (BICshiftLL x0 y [c])
  3763  	for {
  3764  		x0 := v_0
  3765  		x1 := v_1
  3766  		if x1.Op != OpARM64SLLconst {
  3767  			break
  3768  		}
  3769  		c := auxIntToInt64(x1.AuxInt)
  3770  		y := x1.Args[0]
  3771  		if !(clobberIfDead(x1)) {
  3772  			break
  3773  		}
  3774  		v.reset(OpARM64BICshiftLL)
  3775  		v.AuxInt = int64ToAuxInt(c)
  3776  		v.AddArg2(x0, y)
  3777  		return true
  3778  	}
  3779  	// match: (BIC x0 x1:(SRLconst [c] y))
  3780  	// cond: clobberIfDead(x1)
  3781  	// result: (BICshiftRL x0 y [c])
  3782  	for {
  3783  		x0 := v_0
  3784  		x1 := v_1
  3785  		if x1.Op != OpARM64SRLconst {
  3786  			break
  3787  		}
  3788  		c := auxIntToInt64(x1.AuxInt)
  3789  		y := x1.Args[0]
  3790  		if !(clobberIfDead(x1)) {
  3791  			break
  3792  		}
  3793  		v.reset(OpARM64BICshiftRL)
  3794  		v.AuxInt = int64ToAuxInt(c)
  3795  		v.AddArg2(x0, y)
  3796  		return true
  3797  	}
  3798  	// match: (BIC x0 x1:(SRAconst [c] y))
  3799  	// cond: clobberIfDead(x1)
  3800  	// result: (BICshiftRA x0 y [c])
  3801  	for {
  3802  		x0 := v_0
  3803  		x1 := v_1
  3804  		if x1.Op != OpARM64SRAconst {
  3805  			break
  3806  		}
  3807  		c := auxIntToInt64(x1.AuxInt)
  3808  		y := x1.Args[0]
  3809  		if !(clobberIfDead(x1)) {
  3810  			break
  3811  		}
  3812  		v.reset(OpARM64BICshiftRA)
  3813  		v.AuxInt = int64ToAuxInt(c)
  3814  		v.AddArg2(x0, y)
  3815  		return true
  3816  	}
  3817  	// match: (BIC x0 x1:(RORconst [c] y))
  3818  	// cond: clobberIfDead(x1)
  3819  	// result: (BICshiftRO x0 y [c])
  3820  	for {
  3821  		x0 := v_0
  3822  		x1 := v_1
  3823  		if x1.Op != OpARM64RORconst {
  3824  			break
  3825  		}
  3826  		c := auxIntToInt64(x1.AuxInt)
  3827  		y := x1.Args[0]
  3828  		if !(clobberIfDead(x1)) {
  3829  			break
  3830  		}
  3831  		v.reset(OpARM64BICshiftRO)
  3832  		v.AuxInt = int64ToAuxInt(c)
  3833  		v.AddArg2(x0, y)
  3834  		return true
  3835  	}
  3836  	return false
  3837  }
  3838  func rewriteValueARM64_OpARM64BICshiftLL(v *Value) bool {
  3839  	v_1 := v.Args[1]
  3840  	v_0 := v.Args[0]
  3841  	// match: (BICshiftLL x (MOVDconst [c]) [d])
  3842  	// result: (ANDconst x [^int64(uint64(c)<<uint64(d))])
  3843  	for {
  3844  		d := auxIntToInt64(v.AuxInt)
  3845  		x := v_0
  3846  		if v_1.Op != OpARM64MOVDconst {
  3847  			break
  3848  		}
  3849  		c := auxIntToInt64(v_1.AuxInt)
  3850  		v.reset(OpARM64ANDconst)
  3851  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
  3852  		v.AddArg(x)
  3853  		return true
  3854  	}
  3855  	// match: (BICshiftLL (SLLconst x [c]) x [c])
  3856  	// result: (MOVDconst [0])
  3857  	for {
  3858  		c := auxIntToInt64(v.AuxInt)
  3859  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
  3860  			break
  3861  		}
  3862  		x := v_0.Args[0]
  3863  		if x != v_1 {
  3864  			break
  3865  		}
  3866  		v.reset(OpARM64MOVDconst)
  3867  		v.AuxInt = int64ToAuxInt(0)
  3868  		return true
  3869  	}
  3870  	return false
  3871  }
  3872  func rewriteValueARM64_OpARM64BICshiftRA(v *Value) bool {
  3873  	v_1 := v.Args[1]
  3874  	v_0 := v.Args[0]
  3875  	// match: (BICshiftRA x (MOVDconst [c]) [d])
  3876  	// result: (ANDconst x [^(c>>uint64(d))])
  3877  	for {
  3878  		d := auxIntToInt64(v.AuxInt)
  3879  		x := v_0
  3880  		if v_1.Op != OpARM64MOVDconst {
  3881  			break
  3882  		}
  3883  		c := auxIntToInt64(v_1.AuxInt)
  3884  		v.reset(OpARM64ANDconst)
  3885  		v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
  3886  		v.AddArg(x)
  3887  		return true
  3888  	}
  3889  	// match: (BICshiftRA (SRAconst x [c]) x [c])
  3890  	// result: (MOVDconst [0])
  3891  	for {
  3892  		c := auxIntToInt64(v.AuxInt)
  3893  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
  3894  			break
  3895  		}
  3896  		x := v_0.Args[0]
  3897  		if x != v_1 {
  3898  			break
  3899  		}
  3900  		v.reset(OpARM64MOVDconst)
  3901  		v.AuxInt = int64ToAuxInt(0)
  3902  		return true
  3903  	}
  3904  	return false
  3905  }
  3906  func rewriteValueARM64_OpARM64BICshiftRL(v *Value) bool {
  3907  	v_1 := v.Args[1]
  3908  	v_0 := v.Args[0]
  3909  	// match: (BICshiftRL x (MOVDconst [c]) [d])
  3910  	// result: (ANDconst x [^int64(uint64(c)>>uint64(d))])
  3911  	for {
  3912  		d := auxIntToInt64(v.AuxInt)
  3913  		x := v_0
  3914  		if v_1.Op != OpARM64MOVDconst {
  3915  			break
  3916  		}
  3917  		c := auxIntToInt64(v_1.AuxInt)
  3918  		v.reset(OpARM64ANDconst)
  3919  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
  3920  		v.AddArg(x)
  3921  		return true
  3922  	}
  3923  	// match: (BICshiftRL (SRLconst x [c]) x [c])
  3924  	// result: (MOVDconst [0])
  3925  	for {
  3926  		c := auxIntToInt64(v.AuxInt)
  3927  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
  3928  			break
  3929  		}
  3930  		x := v_0.Args[0]
  3931  		if x != v_1 {
  3932  			break
  3933  		}
  3934  		v.reset(OpARM64MOVDconst)
  3935  		v.AuxInt = int64ToAuxInt(0)
  3936  		return true
  3937  	}
  3938  	return false
  3939  }
  3940  func rewriteValueARM64_OpARM64BICshiftRO(v *Value) bool {
  3941  	v_1 := v.Args[1]
  3942  	v_0 := v.Args[0]
  3943  	// match: (BICshiftRO x (MOVDconst [c]) [d])
  3944  	// result: (ANDconst x [^rotateRight64(c, d)])
  3945  	for {
  3946  		d := auxIntToInt64(v.AuxInt)
  3947  		x := v_0
  3948  		if v_1.Op != OpARM64MOVDconst {
  3949  			break
  3950  		}
  3951  		c := auxIntToInt64(v_1.AuxInt)
  3952  		v.reset(OpARM64ANDconst)
  3953  		v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
  3954  		v.AddArg(x)
  3955  		return true
  3956  	}
  3957  	// match: (BICshiftRO (RORconst x [c]) x [c])
  3958  	// result: (MOVDconst [0])
  3959  	for {
  3960  		c := auxIntToInt64(v.AuxInt)
  3961  		if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
  3962  			break
  3963  		}
  3964  		x := v_0.Args[0]
  3965  		if x != v_1 {
  3966  			break
  3967  		}
  3968  		v.reset(OpARM64MOVDconst)
  3969  		v.AuxInt = int64ToAuxInt(0)
  3970  		return true
  3971  	}
  3972  	return false
  3973  }
  3974  func rewriteValueARM64_OpARM64CMN(v *Value) bool {
  3975  	v_1 := v.Args[1]
  3976  	v_0 := v.Args[0]
  3977  	// match: (CMN x (MOVDconst [c]))
  3978  	// result: (CMNconst [c] x)
  3979  	for {
  3980  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3981  			x := v_0
  3982  			if v_1.Op != OpARM64MOVDconst {
  3983  				continue
  3984  			}
  3985  			c := auxIntToInt64(v_1.AuxInt)
  3986  			v.reset(OpARM64CMNconst)
  3987  			v.AuxInt = int64ToAuxInt(c)
  3988  			v.AddArg(x)
  3989  			return true
  3990  		}
  3991  		break
  3992  	}
  3993  	// match: (CMN x0 x1:(SLLconst [c] y))
  3994  	// cond: clobberIfDead(x1)
  3995  	// result: (CMNshiftLL x0 y [c])
  3996  	for {
  3997  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3998  			x0 := v_0
  3999  			x1 := v_1
  4000  			if x1.Op != OpARM64SLLconst {
  4001  				continue
  4002  			}
  4003  			c := auxIntToInt64(x1.AuxInt)
  4004  			y := x1.Args[0]
  4005  			if !(clobberIfDead(x1)) {
  4006  				continue
  4007  			}
  4008  			v.reset(OpARM64CMNshiftLL)
  4009  			v.AuxInt = int64ToAuxInt(c)
  4010  			v.AddArg2(x0, y)
  4011  			return true
  4012  		}
  4013  		break
  4014  	}
  4015  	// match: (CMN x0 x1:(SRLconst [c] y))
  4016  	// cond: clobberIfDead(x1)
  4017  	// result: (CMNshiftRL x0 y [c])
  4018  	for {
  4019  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4020  			x0 := v_0
  4021  			x1 := v_1
  4022  			if x1.Op != OpARM64SRLconst {
  4023  				continue
  4024  			}
  4025  			c := auxIntToInt64(x1.AuxInt)
  4026  			y := x1.Args[0]
  4027  			if !(clobberIfDead(x1)) {
  4028  				continue
  4029  			}
  4030  			v.reset(OpARM64CMNshiftRL)
  4031  			v.AuxInt = int64ToAuxInt(c)
  4032  			v.AddArg2(x0, y)
  4033  			return true
  4034  		}
  4035  		break
  4036  	}
  4037  	// match: (CMN x0 x1:(SRAconst [c] y))
  4038  	// cond: clobberIfDead(x1)
  4039  	// result: (CMNshiftRA x0 y [c])
  4040  	for {
  4041  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4042  			x0 := v_0
  4043  			x1 := v_1
  4044  			if x1.Op != OpARM64SRAconst {
  4045  				continue
  4046  			}
  4047  			c := auxIntToInt64(x1.AuxInt)
  4048  			y := x1.Args[0]
  4049  			if !(clobberIfDead(x1)) {
  4050  				continue
  4051  			}
  4052  			v.reset(OpARM64CMNshiftRA)
  4053  			v.AuxInt = int64ToAuxInt(c)
  4054  			v.AddArg2(x0, y)
  4055  			return true
  4056  		}
  4057  		break
  4058  	}
  4059  	return false
  4060  }
  4061  func rewriteValueARM64_OpARM64CMNW(v *Value) bool {
  4062  	v_1 := v.Args[1]
  4063  	v_0 := v.Args[0]
  4064  	// match: (CMNW x (MOVDconst [c]))
  4065  	// result: (CMNWconst [int32(c)] x)
  4066  	for {
  4067  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4068  			x := v_0
  4069  			if v_1.Op != OpARM64MOVDconst {
  4070  				continue
  4071  			}
  4072  			c := auxIntToInt64(v_1.AuxInt)
  4073  			v.reset(OpARM64CMNWconst)
  4074  			v.AuxInt = int32ToAuxInt(int32(c))
  4075  			v.AddArg(x)
  4076  			return true
  4077  		}
  4078  		break
  4079  	}
  4080  	return false
  4081  }
  4082  func rewriteValueARM64_OpARM64CMNWconst(v *Value) bool {
  4083  	v_0 := v.Args[0]
  4084  	// match: (CMNWconst [c] y)
  4085  	// cond: c < 0 && c != -1<<31
  4086  	// result: (CMPWconst [-c] y)
  4087  	for {
  4088  		c := auxIntToInt32(v.AuxInt)
  4089  		y := v_0
  4090  		if !(c < 0 && c != -1<<31) {
  4091  			break
  4092  		}
  4093  		v.reset(OpARM64CMPWconst)
  4094  		v.AuxInt = int32ToAuxInt(-c)
  4095  		v.AddArg(y)
  4096  		return true
  4097  	}
  4098  	// match: (CMNWconst (MOVDconst [x]) [y])
  4099  	// result: (FlagConstant [addFlags32(int32(x),y)])
  4100  	for {
  4101  		y := auxIntToInt32(v.AuxInt)
  4102  		if v_0.Op != OpARM64MOVDconst {
  4103  			break
  4104  		}
  4105  		x := auxIntToInt64(v_0.AuxInt)
  4106  		v.reset(OpARM64FlagConstant)
  4107  		v.AuxInt = flagConstantToAuxInt(addFlags32(int32(x), y))
  4108  		return true
  4109  	}
  4110  	return false
  4111  }
  4112  func rewriteValueARM64_OpARM64CMNconst(v *Value) bool {
  4113  	v_0 := v.Args[0]
  4114  	// match: (CMNconst [c] y)
  4115  	// cond: c < 0 && c != -1<<63
  4116  	// result: (CMPconst [-c] y)
  4117  	for {
  4118  		c := auxIntToInt64(v.AuxInt)
  4119  		y := v_0
  4120  		if !(c < 0 && c != -1<<63) {
  4121  			break
  4122  		}
  4123  		v.reset(OpARM64CMPconst)
  4124  		v.AuxInt = int64ToAuxInt(-c)
  4125  		v.AddArg(y)
  4126  		return true
  4127  	}
  4128  	// match: (CMNconst (MOVDconst [x]) [y])
  4129  	// result: (FlagConstant [addFlags64(x,y)])
  4130  	for {
  4131  		y := auxIntToInt64(v.AuxInt)
  4132  		if v_0.Op != OpARM64MOVDconst {
  4133  			break
  4134  		}
  4135  		x := auxIntToInt64(v_0.AuxInt)
  4136  		v.reset(OpARM64FlagConstant)
  4137  		v.AuxInt = flagConstantToAuxInt(addFlags64(x, y))
  4138  		return true
  4139  	}
  4140  	return false
  4141  }
  4142  func rewriteValueARM64_OpARM64CMNshiftLL(v *Value) bool {
  4143  	v_1 := v.Args[1]
  4144  	v_0 := v.Args[0]
  4145  	b := v.Block
  4146  	// match: (CMNshiftLL (MOVDconst [c]) x [d])
  4147  	// result: (CMNconst [c] (SLLconst <x.Type> x [d]))
  4148  	for {
  4149  		d := auxIntToInt64(v.AuxInt)
  4150  		if v_0.Op != OpARM64MOVDconst {
  4151  			break
  4152  		}
  4153  		c := auxIntToInt64(v_0.AuxInt)
  4154  		x := v_1
  4155  		v.reset(OpARM64CMNconst)
  4156  		v.AuxInt = int64ToAuxInt(c)
  4157  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  4158  		v0.AuxInt = int64ToAuxInt(d)
  4159  		v0.AddArg(x)
  4160  		v.AddArg(v0)
  4161  		return true
  4162  	}
  4163  	// match: (CMNshiftLL x (MOVDconst [c]) [d])
  4164  	// result: (CMNconst x [int64(uint64(c)<<uint64(d))])
  4165  	for {
  4166  		d := auxIntToInt64(v.AuxInt)
  4167  		x := v_0
  4168  		if v_1.Op != OpARM64MOVDconst {
  4169  			break
  4170  		}
  4171  		c := auxIntToInt64(v_1.AuxInt)
  4172  		v.reset(OpARM64CMNconst)
  4173  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
  4174  		v.AddArg(x)
  4175  		return true
  4176  	}
  4177  	return false
  4178  }
  4179  func rewriteValueARM64_OpARM64CMNshiftRA(v *Value) bool {
  4180  	v_1 := v.Args[1]
  4181  	v_0 := v.Args[0]
  4182  	b := v.Block
  4183  	// match: (CMNshiftRA (MOVDconst [c]) x [d])
  4184  	// result: (CMNconst [c] (SRAconst <x.Type> x [d]))
  4185  	for {
  4186  		d := auxIntToInt64(v.AuxInt)
  4187  		if v_0.Op != OpARM64MOVDconst {
  4188  			break
  4189  		}
  4190  		c := auxIntToInt64(v_0.AuxInt)
  4191  		x := v_1
  4192  		v.reset(OpARM64CMNconst)
  4193  		v.AuxInt = int64ToAuxInt(c)
  4194  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
  4195  		v0.AuxInt = int64ToAuxInt(d)
  4196  		v0.AddArg(x)
  4197  		v.AddArg(v0)
  4198  		return true
  4199  	}
  4200  	// match: (CMNshiftRA x (MOVDconst [c]) [d])
  4201  	// result: (CMNconst x [c>>uint64(d)])
  4202  	for {
  4203  		d := auxIntToInt64(v.AuxInt)
  4204  		x := v_0
  4205  		if v_1.Op != OpARM64MOVDconst {
  4206  			break
  4207  		}
  4208  		c := auxIntToInt64(v_1.AuxInt)
  4209  		v.reset(OpARM64CMNconst)
  4210  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
  4211  		v.AddArg(x)
  4212  		return true
  4213  	}
  4214  	return false
  4215  }
  4216  func rewriteValueARM64_OpARM64CMNshiftRL(v *Value) bool {
  4217  	v_1 := v.Args[1]
  4218  	v_0 := v.Args[0]
  4219  	b := v.Block
  4220  	// match: (CMNshiftRL (MOVDconst [c]) x [d])
  4221  	// result: (CMNconst [c] (SRLconst <x.Type> x [d]))
  4222  	for {
  4223  		d := auxIntToInt64(v.AuxInt)
  4224  		if v_0.Op != OpARM64MOVDconst {
  4225  			break
  4226  		}
  4227  		c := auxIntToInt64(v_0.AuxInt)
  4228  		x := v_1
  4229  		v.reset(OpARM64CMNconst)
  4230  		v.AuxInt = int64ToAuxInt(c)
  4231  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
  4232  		v0.AuxInt = int64ToAuxInt(d)
  4233  		v0.AddArg(x)
  4234  		v.AddArg(v0)
  4235  		return true
  4236  	}
  4237  	// match: (CMNshiftRL x (MOVDconst [c]) [d])
  4238  	// result: (CMNconst x [int64(uint64(c)>>uint64(d))])
  4239  	for {
  4240  		d := auxIntToInt64(v.AuxInt)
  4241  		x := v_0
  4242  		if v_1.Op != OpARM64MOVDconst {
  4243  			break
  4244  		}
  4245  		c := auxIntToInt64(v_1.AuxInt)
  4246  		v.reset(OpARM64CMNconst)
  4247  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
  4248  		v.AddArg(x)
  4249  		return true
  4250  	}
  4251  	return false
  4252  }
  4253  func rewriteValueARM64_OpARM64CMP(v *Value) bool {
  4254  	v_1 := v.Args[1]
  4255  	v_0 := v.Args[0]
  4256  	b := v.Block
  4257  	// match: (CMP x (MOVDconst [c]))
  4258  	// result: (CMPconst [c] x)
  4259  	for {
  4260  		x := v_0
  4261  		if v_1.Op != OpARM64MOVDconst {
  4262  			break
  4263  		}
  4264  		c := auxIntToInt64(v_1.AuxInt)
  4265  		v.reset(OpARM64CMPconst)
  4266  		v.AuxInt = int64ToAuxInt(c)
  4267  		v.AddArg(x)
  4268  		return true
  4269  	}
  4270  	// match: (CMP (MOVDconst [c]) x)
  4271  	// result: (InvertFlags (CMPconst [c] x))
  4272  	for {
  4273  		if v_0.Op != OpARM64MOVDconst {
  4274  			break
  4275  		}
  4276  		c := auxIntToInt64(v_0.AuxInt)
  4277  		x := v_1
  4278  		v.reset(OpARM64InvertFlags)
  4279  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
  4280  		v0.AuxInt = int64ToAuxInt(c)
  4281  		v0.AddArg(x)
  4282  		v.AddArg(v0)
  4283  		return true
  4284  	}
  4285  	// match: (CMP x y)
  4286  	// cond: canonLessThan(x,y)
  4287  	// result: (InvertFlags (CMP y x))
  4288  	for {
  4289  		x := v_0
  4290  		y := v_1
  4291  		if !(canonLessThan(x, y)) {
  4292  			break
  4293  		}
  4294  		v.reset(OpARM64InvertFlags)
  4295  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
  4296  		v0.AddArg2(y, x)
  4297  		v.AddArg(v0)
  4298  		return true
  4299  	}
  4300  	// match: (CMP x0 x1:(SLLconst [c] y))
  4301  	// cond: clobberIfDead(x1)
  4302  	// result: (CMPshiftLL x0 y [c])
  4303  	for {
  4304  		x0 := v_0
  4305  		x1 := v_1
  4306  		if x1.Op != OpARM64SLLconst {
  4307  			break
  4308  		}
  4309  		c := auxIntToInt64(x1.AuxInt)
  4310  		y := x1.Args[0]
  4311  		if !(clobberIfDead(x1)) {
  4312  			break
  4313  		}
  4314  		v.reset(OpARM64CMPshiftLL)
  4315  		v.AuxInt = int64ToAuxInt(c)
  4316  		v.AddArg2(x0, y)
  4317  		return true
  4318  	}
  4319  	// match: (CMP x0:(SLLconst [c] y) x1)
  4320  	// cond: clobberIfDead(x0)
  4321  	// result: (InvertFlags (CMPshiftLL x1 y [c]))
  4322  	for {
  4323  		x0 := v_0
  4324  		if x0.Op != OpARM64SLLconst {
  4325  			break
  4326  		}
  4327  		c := auxIntToInt64(x0.AuxInt)
  4328  		y := x0.Args[0]
  4329  		x1 := v_1
  4330  		if !(clobberIfDead(x0)) {
  4331  			break
  4332  		}
  4333  		v.reset(OpARM64InvertFlags)
  4334  		v0 := b.NewValue0(v.Pos, OpARM64CMPshiftLL, types.TypeFlags)
  4335  		v0.AuxInt = int64ToAuxInt(c)
  4336  		v0.AddArg2(x1, y)
  4337  		v.AddArg(v0)
  4338  		return true
  4339  	}
  4340  	// match: (CMP x0 x1:(SRLconst [c] y))
  4341  	// cond: clobberIfDead(x1)
  4342  	// result: (CMPshiftRL x0 y [c])
  4343  	for {
  4344  		x0 := v_0
  4345  		x1 := v_1
  4346  		if x1.Op != OpARM64SRLconst {
  4347  			break
  4348  		}
  4349  		c := auxIntToInt64(x1.AuxInt)
  4350  		y := x1.Args[0]
  4351  		if !(clobberIfDead(x1)) {
  4352  			break
  4353  		}
  4354  		v.reset(OpARM64CMPshiftRL)
  4355  		v.AuxInt = int64ToAuxInt(c)
  4356  		v.AddArg2(x0, y)
  4357  		return true
  4358  	}
  4359  	// match: (CMP x0:(SRLconst [c] y) x1)
  4360  	// cond: clobberIfDead(x0)
  4361  	// result: (InvertFlags (CMPshiftRL x1 y [c]))
  4362  	for {
  4363  		x0 := v_0
  4364  		if x0.Op != OpARM64SRLconst {
  4365  			break
  4366  		}
  4367  		c := auxIntToInt64(x0.AuxInt)
  4368  		y := x0.Args[0]
  4369  		x1 := v_1
  4370  		if !(clobberIfDead(x0)) {
  4371  			break
  4372  		}
  4373  		v.reset(OpARM64InvertFlags)
  4374  		v0 := b.NewValue0(v.Pos, OpARM64CMPshiftRL, types.TypeFlags)
  4375  		v0.AuxInt = int64ToAuxInt(c)
  4376  		v0.AddArg2(x1, y)
  4377  		v.AddArg(v0)
  4378  		return true
  4379  	}
  4380  	// match: (CMP x0 x1:(SRAconst [c] y))
  4381  	// cond: clobberIfDead(x1)
  4382  	// result: (CMPshiftRA x0 y [c])
  4383  	for {
  4384  		x0 := v_0
  4385  		x1 := v_1
  4386  		if x1.Op != OpARM64SRAconst {
  4387  			break
  4388  		}
  4389  		c := auxIntToInt64(x1.AuxInt)
  4390  		y := x1.Args[0]
  4391  		if !(clobberIfDead(x1)) {
  4392  			break
  4393  		}
  4394  		v.reset(OpARM64CMPshiftRA)
  4395  		v.AuxInt = int64ToAuxInt(c)
  4396  		v.AddArg2(x0, y)
  4397  		return true
  4398  	}
  4399  	// match: (CMP x0:(SRAconst [c] y) x1)
  4400  	// cond: clobberIfDead(x0)
  4401  	// result: (InvertFlags (CMPshiftRA x1 y [c]))
  4402  	for {
  4403  		x0 := v_0
  4404  		if x0.Op != OpARM64SRAconst {
  4405  			break
  4406  		}
  4407  		c := auxIntToInt64(x0.AuxInt)
  4408  		y := x0.Args[0]
  4409  		x1 := v_1
  4410  		if !(clobberIfDead(x0)) {
  4411  			break
  4412  		}
  4413  		v.reset(OpARM64InvertFlags)
  4414  		v0 := b.NewValue0(v.Pos, OpARM64CMPshiftRA, types.TypeFlags)
  4415  		v0.AuxInt = int64ToAuxInt(c)
  4416  		v0.AddArg2(x1, y)
  4417  		v.AddArg(v0)
  4418  		return true
  4419  	}
  4420  	return false
  4421  }
  4422  func rewriteValueARM64_OpARM64CMPW(v *Value) bool {
  4423  	v_1 := v.Args[1]
  4424  	v_0 := v.Args[0]
  4425  	b := v.Block
  4426  	// match: (CMPW x (MOVDconst [c]))
  4427  	// result: (CMPWconst [int32(c)] x)
  4428  	for {
  4429  		x := v_0
  4430  		if v_1.Op != OpARM64MOVDconst {
  4431  			break
  4432  		}
  4433  		c := auxIntToInt64(v_1.AuxInt)
  4434  		v.reset(OpARM64CMPWconst)
  4435  		v.AuxInt = int32ToAuxInt(int32(c))
  4436  		v.AddArg(x)
  4437  		return true
  4438  	}
  4439  	// match: (CMPW (MOVDconst [c]) x)
  4440  	// result: (InvertFlags (CMPWconst [int32(c)] x))
  4441  	for {
  4442  		if v_0.Op != OpARM64MOVDconst {
  4443  			break
  4444  		}
  4445  		c := auxIntToInt64(v_0.AuxInt)
  4446  		x := v_1
  4447  		v.reset(OpARM64InvertFlags)
  4448  		v0 := b.NewValue0(v.Pos, OpARM64CMPWconst, types.TypeFlags)
  4449  		v0.AuxInt = int32ToAuxInt(int32(c))
  4450  		v0.AddArg(x)
  4451  		v.AddArg(v0)
  4452  		return true
  4453  	}
  4454  	// match: (CMPW x y)
  4455  	// cond: canonLessThan(x,y)
  4456  	// result: (InvertFlags (CMPW y x))
  4457  	for {
  4458  		x := v_0
  4459  		y := v_1
  4460  		if !(canonLessThan(x, y)) {
  4461  			break
  4462  		}
  4463  		v.reset(OpARM64InvertFlags)
  4464  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
  4465  		v0.AddArg2(y, x)
  4466  		v.AddArg(v0)
  4467  		return true
  4468  	}
  4469  	return false
  4470  }
  4471  func rewriteValueARM64_OpARM64CMPWconst(v *Value) bool {
  4472  	v_0 := v.Args[0]
  4473  	// match: (CMPWconst [c] y)
  4474  	// cond: c < 0 && c != -1<<31
  4475  	// result: (CMNWconst [-c] y)
  4476  	for {
  4477  		c := auxIntToInt32(v.AuxInt)
  4478  		y := v_0
  4479  		if !(c < 0 && c != -1<<31) {
  4480  			break
  4481  		}
  4482  		v.reset(OpARM64CMNWconst)
  4483  		v.AuxInt = int32ToAuxInt(-c)
  4484  		v.AddArg(y)
  4485  		return true
  4486  	}
  4487  	// match: (CMPWconst (MOVDconst [x]) [y])
  4488  	// result: (FlagConstant [subFlags32(int32(x),y)])
  4489  	for {
  4490  		y := auxIntToInt32(v.AuxInt)
  4491  		if v_0.Op != OpARM64MOVDconst {
  4492  			break
  4493  		}
  4494  		x := auxIntToInt64(v_0.AuxInt)
  4495  		v.reset(OpARM64FlagConstant)
  4496  		v.AuxInt = flagConstantToAuxInt(subFlags32(int32(x), y))
  4497  		return true
  4498  	}
  4499  	// match: (CMPWconst (MOVBUreg _) [c])
  4500  	// cond: 0xff < c
  4501  	// result: (FlagConstant [subFlags64(0,1)])
  4502  	for {
  4503  		c := auxIntToInt32(v.AuxInt)
  4504  		if v_0.Op != OpARM64MOVBUreg || !(0xff < c) {
  4505  			break
  4506  		}
  4507  		v.reset(OpARM64FlagConstant)
  4508  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  4509  		return true
  4510  	}
  4511  	// match: (CMPWconst (MOVHUreg _) [c])
  4512  	// cond: 0xffff < c
  4513  	// result: (FlagConstant [subFlags64(0,1)])
  4514  	for {
  4515  		c := auxIntToInt32(v.AuxInt)
  4516  		if v_0.Op != OpARM64MOVHUreg || !(0xffff < c) {
  4517  			break
  4518  		}
  4519  		v.reset(OpARM64FlagConstant)
  4520  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  4521  		return true
  4522  	}
  4523  	return false
  4524  }
  4525  func rewriteValueARM64_OpARM64CMPconst(v *Value) bool {
  4526  	v_0 := v.Args[0]
  4527  	// match: (CMPconst [c] y)
  4528  	// cond: c < 0 && c != -1<<63
  4529  	// result: (CMNconst [-c] y)
  4530  	for {
  4531  		c := auxIntToInt64(v.AuxInt)
  4532  		y := v_0
  4533  		if !(c < 0 && c != -1<<63) {
  4534  			break
  4535  		}
  4536  		v.reset(OpARM64CMNconst)
  4537  		v.AuxInt = int64ToAuxInt(-c)
  4538  		v.AddArg(y)
  4539  		return true
  4540  	}
  4541  	// match: (CMPconst (MOVDconst [x]) [y])
  4542  	// result: (FlagConstant [subFlags64(x,y)])
  4543  	for {
  4544  		y := auxIntToInt64(v.AuxInt)
  4545  		if v_0.Op != OpARM64MOVDconst {
  4546  			break
  4547  		}
  4548  		x := auxIntToInt64(v_0.AuxInt)
  4549  		v.reset(OpARM64FlagConstant)
  4550  		v.AuxInt = flagConstantToAuxInt(subFlags64(x, y))
  4551  		return true
  4552  	}
  4553  	// match: (CMPconst (MOVBUreg _) [c])
  4554  	// cond: 0xff < c
  4555  	// result: (FlagConstant [subFlags64(0,1)])
  4556  	for {
  4557  		c := auxIntToInt64(v.AuxInt)
  4558  		if v_0.Op != OpARM64MOVBUreg || !(0xff < c) {
  4559  			break
  4560  		}
  4561  		v.reset(OpARM64FlagConstant)
  4562  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  4563  		return true
  4564  	}
  4565  	// match: (CMPconst (MOVHUreg _) [c])
  4566  	// cond: 0xffff < c
  4567  	// result: (FlagConstant [subFlags64(0,1)])
  4568  	for {
  4569  		c := auxIntToInt64(v.AuxInt)
  4570  		if v_0.Op != OpARM64MOVHUreg || !(0xffff < c) {
  4571  			break
  4572  		}
  4573  		v.reset(OpARM64FlagConstant)
  4574  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  4575  		return true
  4576  	}
  4577  	// match: (CMPconst (MOVWUreg _) [c])
  4578  	// cond: 0xffffffff < c
  4579  	// result: (FlagConstant [subFlags64(0,1)])
  4580  	for {
  4581  		c := auxIntToInt64(v.AuxInt)
  4582  		if v_0.Op != OpARM64MOVWUreg || !(0xffffffff < c) {
  4583  			break
  4584  		}
  4585  		v.reset(OpARM64FlagConstant)
  4586  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  4587  		return true
  4588  	}
  4589  	// match: (CMPconst (ANDconst _ [m]) [n])
  4590  	// cond: 0 <= m && m < n
  4591  	// result: (FlagConstant [subFlags64(0,1)])
  4592  	for {
  4593  		n := auxIntToInt64(v.AuxInt)
  4594  		if v_0.Op != OpARM64ANDconst {
  4595  			break
  4596  		}
  4597  		m := auxIntToInt64(v_0.AuxInt)
  4598  		if !(0 <= m && m < n) {
  4599  			break
  4600  		}
  4601  		v.reset(OpARM64FlagConstant)
  4602  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  4603  		return true
  4604  	}
  4605  	// match: (CMPconst (SRLconst _ [c]) [n])
  4606  	// cond: 0 <= n && 0 < c && c <= 63 && (1<<uint64(64-c)) <= uint64(n)
  4607  	// result: (FlagConstant [subFlags64(0,1)])
  4608  	for {
  4609  		n := auxIntToInt64(v.AuxInt)
  4610  		if v_0.Op != OpARM64SRLconst {
  4611  			break
  4612  		}
  4613  		c := auxIntToInt64(v_0.AuxInt)
  4614  		if !(0 <= n && 0 < c && c <= 63 && (1<<uint64(64-c)) <= uint64(n)) {
  4615  			break
  4616  		}
  4617  		v.reset(OpARM64FlagConstant)
  4618  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  4619  		return true
  4620  	}
  4621  	return false
  4622  }
  4623  func rewriteValueARM64_OpARM64CMPshiftLL(v *Value) bool {
  4624  	v_1 := v.Args[1]
  4625  	v_0 := v.Args[0]
  4626  	b := v.Block
  4627  	// match: (CMPshiftLL (MOVDconst [c]) x [d])
  4628  	// result: (InvertFlags (CMPconst [c] (SLLconst <x.Type> x [d])))
  4629  	for {
  4630  		d := auxIntToInt64(v.AuxInt)
  4631  		if v_0.Op != OpARM64MOVDconst {
  4632  			break
  4633  		}
  4634  		c := auxIntToInt64(v_0.AuxInt)
  4635  		x := v_1
  4636  		v.reset(OpARM64InvertFlags)
  4637  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
  4638  		v0.AuxInt = int64ToAuxInt(c)
  4639  		v1 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  4640  		v1.AuxInt = int64ToAuxInt(d)
  4641  		v1.AddArg(x)
  4642  		v0.AddArg(v1)
  4643  		v.AddArg(v0)
  4644  		return true
  4645  	}
  4646  	// match: (CMPshiftLL x (MOVDconst [c]) [d])
  4647  	// result: (CMPconst x [int64(uint64(c)<<uint64(d))])
  4648  	for {
  4649  		d := auxIntToInt64(v.AuxInt)
  4650  		x := v_0
  4651  		if v_1.Op != OpARM64MOVDconst {
  4652  			break
  4653  		}
  4654  		c := auxIntToInt64(v_1.AuxInt)
  4655  		v.reset(OpARM64CMPconst)
  4656  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
  4657  		v.AddArg(x)
  4658  		return true
  4659  	}
  4660  	return false
  4661  }
  4662  func rewriteValueARM64_OpARM64CMPshiftRA(v *Value) bool {
  4663  	v_1 := v.Args[1]
  4664  	v_0 := v.Args[0]
  4665  	b := v.Block
  4666  	// match: (CMPshiftRA (MOVDconst [c]) x [d])
  4667  	// result: (InvertFlags (CMPconst [c] (SRAconst <x.Type> x [d])))
  4668  	for {
  4669  		d := auxIntToInt64(v.AuxInt)
  4670  		if v_0.Op != OpARM64MOVDconst {
  4671  			break
  4672  		}
  4673  		c := auxIntToInt64(v_0.AuxInt)
  4674  		x := v_1
  4675  		v.reset(OpARM64InvertFlags)
  4676  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
  4677  		v0.AuxInt = int64ToAuxInt(c)
  4678  		v1 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
  4679  		v1.AuxInt = int64ToAuxInt(d)
  4680  		v1.AddArg(x)
  4681  		v0.AddArg(v1)
  4682  		v.AddArg(v0)
  4683  		return true
  4684  	}
  4685  	// match: (CMPshiftRA x (MOVDconst [c]) [d])
  4686  	// result: (CMPconst x [c>>uint64(d)])
  4687  	for {
  4688  		d := auxIntToInt64(v.AuxInt)
  4689  		x := v_0
  4690  		if v_1.Op != OpARM64MOVDconst {
  4691  			break
  4692  		}
  4693  		c := auxIntToInt64(v_1.AuxInt)
  4694  		v.reset(OpARM64CMPconst)
  4695  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
  4696  		v.AddArg(x)
  4697  		return true
  4698  	}
  4699  	return false
  4700  }
  4701  func rewriteValueARM64_OpARM64CMPshiftRL(v *Value) bool {
  4702  	v_1 := v.Args[1]
  4703  	v_0 := v.Args[0]
  4704  	b := v.Block
  4705  	// match: (CMPshiftRL (MOVDconst [c]) x [d])
  4706  	// result: (InvertFlags (CMPconst [c] (SRLconst <x.Type> x [d])))
  4707  	for {
  4708  		d := auxIntToInt64(v.AuxInt)
  4709  		if v_0.Op != OpARM64MOVDconst {
  4710  			break
  4711  		}
  4712  		c := auxIntToInt64(v_0.AuxInt)
  4713  		x := v_1
  4714  		v.reset(OpARM64InvertFlags)
  4715  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
  4716  		v0.AuxInt = int64ToAuxInt(c)
  4717  		v1 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
  4718  		v1.AuxInt = int64ToAuxInt(d)
  4719  		v1.AddArg(x)
  4720  		v0.AddArg(v1)
  4721  		v.AddArg(v0)
  4722  		return true
  4723  	}
  4724  	// match: (CMPshiftRL x (MOVDconst [c]) [d])
  4725  	// result: (CMPconst x [int64(uint64(c)>>uint64(d))])
  4726  	for {
  4727  		d := auxIntToInt64(v.AuxInt)
  4728  		x := v_0
  4729  		if v_1.Op != OpARM64MOVDconst {
  4730  			break
  4731  		}
  4732  		c := auxIntToInt64(v_1.AuxInt)
  4733  		v.reset(OpARM64CMPconst)
  4734  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
  4735  		v.AddArg(x)
  4736  		return true
  4737  	}
  4738  	return false
  4739  }
  4740  func rewriteValueARM64_OpARM64CSEL(v *Value) bool {
  4741  	v_2 := v.Args[2]
  4742  	v_1 := v.Args[1]
  4743  	v_0 := v.Args[0]
  4744  	// match: (CSEL [cc] (MOVDconst [-1]) (MOVDconst [0]) flag)
  4745  	// result: (CSETM [cc] flag)
  4746  	for {
  4747  		cc := auxIntToOp(v.AuxInt)
  4748  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != -1 || v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  4749  			break
  4750  		}
  4751  		flag := v_2
  4752  		v.reset(OpARM64CSETM)
  4753  		v.AuxInt = opToAuxInt(cc)
  4754  		v.AddArg(flag)
  4755  		return true
  4756  	}
  4757  	// match: (CSEL [cc] (MOVDconst [0]) (MOVDconst [-1]) flag)
  4758  	// result: (CSETM [arm64Negate(cc)] flag)
  4759  	for {
  4760  		cc := auxIntToOp(v.AuxInt)
  4761  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 0 || v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
  4762  			break
  4763  		}
  4764  		flag := v_2
  4765  		v.reset(OpARM64CSETM)
  4766  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  4767  		v.AddArg(flag)
  4768  		return true
  4769  	}
  4770  	// match: (CSEL [cc] x (MOVDconst [0]) flag)
  4771  	// result: (CSEL0 [cc] x flag)
  4772  	for {
  4773  		cc := auxIntToOp(v.AuxInt)
  4774  		x := v_0
  4775  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  4776  			break
  4777  		}
  4778  		flag := v_2
  4779  		v.reset(OpARM64CSEL0)
  4780  		v.AuxInt = opToAuxInt(cc)
  4781  		v.AddArg2(x, flag)
  4782  		return true
  4783  	}
  4784  	// match: (CSEL [cc] (MOVDconst [0]) y flag)
  4785  	// result: (CSEL0 [arm64Negate(cc)] y flag)
  4786  	for {
  4787  		cc := auxIntToOp(v.AuxInt)
  4788  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 0 {
  4789  			break
  4790  		}
  4791  		y := v_1
  4792  		flag := v_2
  4793  		v.reset(OpARM64CSEL0)
  4794  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  4795  		v.AddArg2(y, flag)
  4796  		return true
  4797  	}
  4798  	// match: (CSEL [cc] x (ADDconst [1] a) flag)
  4799  	// result: (CSINC [cc] x a flag)
  4800  	for {
  4801  		cc := auxIntToOp(v.AuxInt)
  4802  		x := v_0
  4803  		if v_1.Op != OpARM64ADDconst || auxIntToInt64(v_1.AuxInt) != 1 {
  4804  			break
  4805  		}
  4806  		a := v_1.Args[0]
  4807  		flag := v_2
  4808  		v.reset(OpARM64CSINC)
  4809  		v.AuxInt = opToAuxInt(cc)
  4810  		v.AddArg3(x, a, flag)
  4811  		return true
  4812  	}
  4813  	// match: (CSEL [cc] (ADDconst [1] a) x flag)
  4814  	// result: (CSINC [arm64Negate(cc)] x a flag)
  4815  	for {
  4816  		cc := auxIntToOp(v.AuxInt)
  4817  		if v_0.Op != OpARM64ADDconst || auxIntToInt64(v_0.AuxInt) != 1 {
  4818  			break
  4819  		}
  4820  		a := v_0.Args[0]
  4821  		x := v_1
  4822  		flag := v_2
  4823  		v.reset(OpARM64CSINC)
  4824  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  4825  		v.AddArg3(x, a, flag)
  4826  		return true
  4827  	}
  4828  	// match: (CSEL [cc] x (MVN a) flag)
  4829  	// result: (CSINV [cc] x a flag)
  4830  	for {
  4831  		cc := auxIntToOp(v.AuxInt)
  4832  		x := v_0
  4833  		if v_1.Op != OpARM64MVN {
  4834  			break
  4835  		}
  4836  		a := v_1.Args[0]
  4837  		flag := v_2
  4838  		v.reset(OpARM64CSINV)
  4839  		v.AuxInt = opToAuxInt(cc)
  4840  		v.AddArg3(x, a, flag)
  4841  		return true
  4842  	}
  4843  	// match: (CSEL [cc] (MVN a) x flag)
  4844  	// result: (CSINV [arm64Negate(cc)] x a flag)
  4845  	for {
  4846  		cc := auxIntToOp(v.AuxInt)
  4847  		if v_0.Op != OpARM64MVN {
  4848  			break
  4849  		}
  4850  		a := v_0.Args[0]
  4851  		x := v_1
  4852  		flag := v_2
  4853  		v.reset(OpARM64CSINV)
  4854  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  4855  		v.AddArg3(x, a, flag)
  4856  		return true
  4857  	}
  4858  	// match: (CSEL [cc] x (NEG a) flag)
  4859  	// result: (CSNEG [cc] x a flag)
  4860  	for {
  4861  		cc := auxIntToOp(v.AuxInt)
  4862  		x := v_0
  4863  		if v_1.Op != OpARM64NEG {
  4864  			break
  4865  		}
  4866  		a := v_1.Args[0]
  4867  		flag := v_2
  4868  		v.reset(OpARM64CSNEG)
  4869  		v.AuxInt = opToAuxInt(cc)
  4870  		v.AddArg3(x, a, flag)
  4871  		return true
  4872  	}
  4873  	// match: (CSEL [cc] (NEG a) x flag)
  4874  	// result: (CSNEG [arm64Negate(cc)] x a flag)
  4875  	for {
  4876  		cc := auxIntToOp(v.AuxInt)
  4877  		if v_0.Op != OpARM64NEG {
  4878  			break
  4879  		}
  4880  		a := v_0.Args[0]
  4881  		x := v_1
  4882  		flag := v_2
  4883  		v.reset(OpARM64CSNEG)
  4884  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  4885  		v.AddArg3(x, a, flag)
  4886  		return true
  4887  	}
  4888  	// match: (CSEL [cc] x y (InvertFlags cmp))
  4889  	// result: (CSEL [arm64Invert(cc)] x y cmp)
  4890  	for {
  4891  		cc := auxIntToOp(v.AuxInt)
  4892  		x := v_0
  4893  		y := v_1
  4894  		if v_2.Op != OpARM64InvertFlags {
  4895  			break
  4896  		}
  4897  		cmp := v_2.Args[0]
  4898  		v.reset(OpARM64CSEL)
  4899  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  4900  		v.AddArg3(x, y, cmp)
  4901  		return true
  4902  	}
  4903  	// match: (CSEL [cc] x _ flag)
  4904  	// cond: ccARM64Eval(cc, flag) > 0
  4905  	// result: x
  4906  	for {
  4907  		cc := auxIntToOp(v.AuxInt)
  4908  		x := v_0
  4909  		flag := v_2
  4910  		if !(ccARM64Eval(cc, flag) > 0) {
  4911  			break
  4912  		}
  4913  		v.copyOf(x)
  4914  		return true
  4915  	}
  4916  	// match: (CSEL [cc] _ y flag)
  4917  	// cond: ccARM64Eval(cc, flag) < 0
  4918  	// result: y
  4919  	for {
  4920  		cc := auxIntToOp(v.AuxInt)
  4921  		y := v_1
  4922  		flag := v_2
  4923  		if !(ccARM64Eval(cc, flag) < 0) {
  4924  			break
  4925  		}
  4926  		v.copyOf(y)
  4927  		return true
  4928  	}
  4929  	// match: (CSEL [cc] x y (CMPWconst [0] boolval))
  4930  	// cond: cc == OpARM64NotEqual && flagArg(boolval) != nil
  4931  	// result: (CSEL [boolval.Op] x y flagArg(boolval))
  4932  	for {
  4933  		cc := auxIntToOp(v.AuxInt)
  4934  		x := v_0
  4935  		y := v_1
  4936  		if v_2.Op != OpARM64CMPWconst || auxIntToInt32(v_2.AuxInt) != 0 {
  4937  			break
  4938  		}
  4939  		boolval := v_2.Args[0]
  4940  		if !(cc == OpARM64NotEqual && flagArg(boolval) != nil) {
  4941  			break
  4942  		}
  4943  		v.reset(OpARM64CSEL)
  4944  		v.AuxInt = opToAuxInt(boolval.Op)
  4945  		v.AddArg3(x, y, flagArg(boolval))
  4946  		return true
  4947  	}
  4948  	// match: (CSEL [cc] x y (CMPWconst [0] boolval))
  4949  	// cond: cc == OpARM64Equal && flagArg(boolval) != nil
  4950  	// result: (CSEL [arm64Negate(boolval.Op)] x y flagArg(boolval))
  4951  	for {
  4952  		cc := auxIntToOp(v.AuxInt)
  4953  		x := v_0
  4954  		y := v_1
  4955  		if v_2.Op != OpARM64CMPWconst || auxIntToInt32(v_2.AuxInt) != 0 {
  4956  			break
  4957  		}
  4958  		boolval := v_2.Args[0]
  4959  		if !(cc == OpARM64Equal && flagArg(boolval) != nil) {
  4960  			break
  4961  		}
  4962  		v.reset(OpARM64CSEL)
  4963  		v.AuxInt = opToAuxInt(arm64Negate(boolval.Op))
  4964  		v.AddArg3(x, y, flagArg(boolval))
  4965  		return true
  4966  	}
  4967  	return false
  4968  }
  4969  func rewriteValueARM64_OpARM64CSEL0(v *Value) bool {
  4970  	v_1 := v.Args[1]
  4971  	v_0 := v.Args[0]
  4972  	// match: (CSEL0 [cc] x (InvertFlags cmp))
  4973  	// result: (CSEL0 [arm64Invert(cc)] x cmp)
  4974  	for {
  4975  		cc := auxIntToOp(v.AuxInt)
  4976  		x := v_0
  4977  		if v_1.Op != OpARM64InvertFlags {
  4978  			break
  4979  		}
  4980  		cmp := v_1.Args[0]
  4981  		v.reset(OpARM64CSEL0)
  4982  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  4983  		v.AddArg2(x, cmp)
  4984  		return true
  4985  	}
  4986  	// match: (CSEL0 [cc] x flag)
  4987  	// cond: ccARM64Eval(cc, flag) > 0
  4988  	// result: x
  4989  	for {
  4990  		cc := auxIntToOp(v.AuxInt)
  4991  		x := v_0
  4992  		flag := v_1
  4993  		if !(ccARM64Eval(cc, flag) > 0) {
  4994  			break
  4995  		}
  4996  		v.copyOf(x)
  4997  		return true
  4998  	}
  4999  	// match: (CSEL0 [cc] _ flag)
  5000  	// cond: ccARM64Eval(cc, flag) < 0
  5001  	// result: (MOVDconst [0])
  5002  	for {
  5003  		cc := auxIntToOp(v.AuxInt)
  5004  		flag := v_1
  5005  		if !(ccARM64Eval(cc, flag) < 0) {
  5006  			break
  5007  		}
  5008  		v.reset(OpARM64MOVDconst)
  5009  		v.AuxInt = int64ToAuxInt(0)
  5010  		return true
  5011  	}
  5012  	// match: (CSEL0 [cc] x (CMPWconst [0] boolval))
  5013  	// cond: cc == OpARM64NotEqual && flagArg(boolval) != nil
  5014  	// result: (CSEL0 [boolval.Op] x flagArg(boolval))
  5015  	for {
  5016  		cc := auxIntToOp(v.AuxInt)
  5017  		x := v_0
  5018  		if v_1.Op != OpARM64CMPWconst || auxIntToInt32(v_1.AuxInt) != 0 {
  5019  			break
  5020  		}
  5021  		boolval := v_1.Args[0]
  5022  		if !(cc == OpARM64NotEqual && flagArg(boolval) != nil) {
  5023  			break
  5024  		}
  5025  		v.reset(OpARM64CSEL0)
  5026  		v.AuxInt = opToAuxInt(boolval.Op)
  5027  		v.AddArg2(x, flagArg(boolval))
  5028  		return true
  5029  	}
  5030  	// match: (CSEL0 [cc] x (CMPWconst [0] boolval))
  5031  	// cond: cc == OpARM64Equal && flagArg(boolval) != nil
  5032  	// result: (CSEL0 [arm64Negate(boolval.Op)] x flagArg(boolval))
  5033  	for {
  5034  		cc := auxIntToOp(v.AuxInt)
  5035  		x := v_0
  5036  		if v_1.Op != OpARM64CMPWconst || auxIntToInt32(v_1.AuxInt) != 0 {
  5037  			break
  5038  		}
  5039  		boolval := v_1.Args[0]
  5040  		if !(cc == OpARM64Equal && flagArg(boolval) != nil) {
  5041  			break
  5042  		}
  5043  		v.reset(OpARM64CSEL0)
  5044  		v.AuxInt = opToAuxInt(arm64Negate(boolval.Op))
  5045  		v.AddArg2(x, flagArg(boolval))
  5046  		return true
  5047  	}
  5048  	return false
  5049  }
  5050  func rewriteValueARM64_OpARM64CSETM(v *Value) bool {
  5051  	v_0 := v.Args[0]
  5052  	// match: (CSETM [cc] (InvertFlags cmp))
  5053  	// result: (CSETM [arm64Invert(cc)] cmp)
  5054  	for {
  5055  		cc := auxIntToOp(v.AuxInt)
  5056  		if v_0.Op != OpARM64InvertFlags {
  5057  			break
  5058  		}
  5059  		cmp := v_0.Args[0]
  5060  		v.reset(OpARM64CSETM)
  5061  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  5062  		v.AddArg(cmp)
  5063  		return true
  5064  	}
  5065  	// match: (CSETM [cc] flag)
  5066  	// cond: ccARM64Eval(cc, flag) > 0
  5067  	// result: (MOVDconst [-1])
  5068  	for {
  5069  		cc := auxIntToOp(v.AuxInt)
  5070  		flag := v_0
  5071  		if !(ccARM64Eval(cc, flag) > 0) {
  5072  			break
  5073  		}
  5074  		v.reset(OpARM64MOVDconst)
  5075  		v.AuxInt = int64ToAuxInt(-1)
  5076  		return true
  5077  	}
  5078  	// match: (CSETM [cc] flag)
  5079  	// cond: ccARM64Eval(cc, flag) < 0
  5080  	// result: (MOVDconst [0])
  5081  	for {
  5082  		cc := auxIntToOp(v.AuxInt)
  5083  		flag := v_0
  5084  		if !(ccARM64Eval(cc, flag) < 0) {
  5085  			break
  5086  		}
  5087  		v.reset(OpARM64MOVDconst)
  5088  		v.AuxInt = int64ToAuxInt(0)
  5089  		return true
  5090  	}
  5091  	return false
  5092  }
  5093  func rewriteValueARM64_OpARM64CSINC(v *Value) bool {
  5094  	v_2 := v.Args[2]
  5095  	v_1 := v.Args[1]
  5096  	v_0 := v.Args[0]
  5097  	// match: (CSINC [cc] x y (InvertFlags cmp))
  5098  	// result: (CSINC [arm64Invert(cc)] x y cmp)
  5099  	for {
  5100  		cc := auxIntToOp(v.AuxInt)
  5101  		x := v_0
  5102  		y := v_1
  5103  		if v_2.Op != OpARM64InvertFlags {
  5104  			break
  5105  		}
  5106  		cmp := v_2.Args[0]
  5107  		v.reset(OpARM64CSINC)
  5108  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  5109  		v.AddArg3(x, y, cmp)
  5110  		return true
  5111  	}
  5112  	// match: (CSINC [cc] x _ flag)
  5113  	// cond: ccARM64Eval(cc, flag) > 0
  5114  	// result: x
  5115  	for {
  5116  		cc := auxIntToOp(v.AuxInt)
  5117  		x := v_0
  5118  		flag := v_2
  5119  		if !(ccARM64Eval(cc, flag) > 0) {
  5120  			break
  5121  		}
  5122  		v.copyOf(x)
  5123  		return true
  5124  	}
  5125  	// match: (CSINC [cc] _ y flag)
  5126  	// cond: ccARM64Eval(cc, flag) < 0
  5127  	// result: (ADDconst [1] y)
  5128  	for {
  5129  		cc := auxIntToOp(v.AuxInt)
  5130  		y := v_1
  5131  		flag := v_2
  5132  		if !(ccARM64Eval(cc, flag) < 0) {
  5133  			break
  5134  		}
  5135  		v.reset(OpARM64ADDconst)
  5136  		v.AuxInt = int64ToAuxInt(1)
  5137  		v.AddArg(y)
  5138  		return true
  5139  	}
  5140  	return false
  5141  }
  5142  func rewriteValueARM64_OpARM64CSINV(v *Value) bool {
  5143  	v_2 := v.Args[2]
  5144  	v_1 := v.Args[1]
  5145  	v_0 := v.Args[0]
  5146  	// match: (CSINV [cc] x y (InvertFlags cmp))
  5147  	// result: (CSINV [arm64Invert(cc)] x y cmp)
  5148  	for {
  5149  		cc := auxIntToOp(v.AuxInt)
  5150  		x := v_0
  5151  		y := v_1
  5152  		if v_2.Op != OpARM64InvertFlags {
  5153  			break
  5154  		}
  5155  		cmp := v_2.Args[0]
  5156  		v.reset(OpARM64CSINV)
  5157  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  5158  		v.AddArg3(x, y, cmp)
  5159  		return true
  5160  	}
  5161  	// match: (CSINV [cc] x _ flag)
  5162  	// cond: ccARM64Eval(cc, flag) > 0
  5163  	// result: x
  5164  	for {
  5165  		cc := auxIntToOp(v.AuxInt)
  5166  		x := v_0
  5167  		flag := v_2
  5168  		if !(ccARM64Eval(cc, flag) > 0) {
  5169  			break
  5170  		}
  5171  		v.copyOf(x)
  5172  		return true
  5173  	}
  5174  	// match: (CSINV [cc] _ y flag)
  5175  	// cond: ccARM64Eval(cc, flag) < 0
  5176  	// result: (Not y)
  5177  	for {
  5178  		cc := auxIntToOp(v.AuxInt)
  5179  		y := v_1
  5180  		flag := v_2
  5181  		if !(ccARM64Eval(cc, flag) < 0) {
  5182  			break
  5183  		}
  5184  		v.reset(OpNot)
  5185  		v.AddArg(y)
  5186  		return true
  5187  	}
  5188  	return false
  5189  }
  5190  func rewriteValueARM64_OpARM64CSNEG(v *Value) bool {
  5191  	v_2 := v.Args[2]
  5192  	v_1 := v.Args[1]
  5193  	v_0 := v.Args[0]
  5194  	// match: (CSNEG [cc] x y (InvertFlags cmp))
  5195  	// result: (CSNEG [arm64Invert(cc)] x y cmp)
  5196  	for {
  5197  		cc := auxIntToOp(v.AuxInt)
  5198  		x := v_0
  5199  		y := v_1
  5200  		if v_2.Op != OpARM64InvertFlags {
  5201  			break
  5202  		}
  5203  		cmp := v_2.Args[0]
  5204  		v.reset(OpARM64CSNEG)
  5205  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  5206  		v.AddArg3(x, y, cmp)
  5207  		return true
  5208  	}
  5209  	// match: (CSNEG [cc] x _ flag)
  5210  	// cond: ccARM64Eval(cc, flag) > 0
  5211  	// result: x
  5212  	for {
  5213  		cc := auxIntToOp(v.AuxInt)
  5214  		x := v_0
  5215  		flag := v_2
  5216  		if !(ccARM64Eval(cc, flag) > 0) {
  5217  			break
  5218  		}
  5219  		v.copyOf(x)
  5220  		return true
  5221  	}
  5222  	// match: (CSNEG [cc] _ y flag)
  5223  	// cond: ccARM64Eval(cc, flag) < 0
  5224  	// result: (NEG y)
  5225  	for {
  5226  		cc := auxIntToOp(v.AuxInt)
  5227  		y := v_1
  5228  		flag := v_2
  5229  		if !(ccARM64Eval(cc, flag) < 0) {
  5230  			break
  5231  		}
  5232  		v.reset(OpARM64NEG)
  5233  		v.AddArg(y)
  5234  		return true
  5235  	}
  5236  	return false
  5237  }
  5238  func rewriteValueARM64_OpARM64DIV(v *Value) bool {
  5239  	v_1 := v.Args[1]
  5240  	v_0 := v.Args[0]
  5241  	// match: (DIV (MOVDconst [c]) (MOVDconst [d]))
  5242  	// cond: d != 0
  5243  	// result: (MOVDconst [c/d])
  5244  	for {
  5245  		if v_0.Op != OpARM64MOVDconst {
  5246  			break
  5247  		}
  5248  		c := auxIntToInt64(v_0.AuxInt)
  5249  		if v_1.Op != OpARM64MOVDconst {
  5250  			break
  5251  		}
  5252  		d := auxIntToInt64(v_1.AuxInt)
  5253  		if !(d != 0) {
  5254  			break
  5255  		}
  5256  		v.reset(OpARM64MOVDconst)
  5257  		v.AuxInt = int64ToAuxInt(c / d)
  5258  		return true
  5259  	}
  5260  	return false
  5261  }
  5262  func rewriteValueARM64_OpARM64DIVW(v *Value) bool {
  5263  	v_1 := v.Args[1]
  5264  	v_0 := v.Args[0]
  5265  	// match: (DIVW (MOVDconst [c]) (MOVDconst [d]))
  5266  	// cond: d != 0
  5267  	// result: (MOVDconst [int64(uint32(int32(c)/int32(d)))])
  5268  	for {
  5269  		if v_0.Op != OpARM64MOVDconst {
  5270  			break
  5271  		}
  5272  		c := auxIntToInt64(v_0.AuxInt)
  5273  		if v_1.Op != OpARM64MOVDconst {
  5274  			break
  5275  		}
  5276  		d := auxIntToInt64(v_1.AuxInt)
  5277  		if !(d != 0) {
  5278  			break
  5279  		}
  5280  		v.reset(OpARM64MOVDconst)
  5281  		v.AuxInt = int64ToAuxInt(int64(uint32(int32(c) / int32(d))))
  5282  		return true
  5283  	}
  5284  	return false
  5285  }
  5286  func rewriteValueARM64_OpARM64EON(v *Value) bool {
  5287  	v_1 := v.Args[1]
  5288  	v_0 := v.Args[0]
  5289  	// match: (EON x (MOVDconst [c]))
  5290  	// result: (XORconst [^c] x)
  5291  	for {
  5292  		x := v_0
  5293  		if v_1.Op != OpARM64MOVDconst {
  5294  			break
  5295  		}
  5296  		c := auxIntToInt64(v_1.AuxInt)
  5297  		v.reset(OpARM64XORconst)
  5298  		v.AuxInt = int64ToAuxInt(^c)
  5299  		v.AddArg(x)
  5300  		return true
  5301  	}
  5302  	// match: (EON x x)
  5303  	// result: (MOVDconst [-1])
  5304  	for {
  5305  		x := v_0
  5306  		if x != v_1 {
  5307  			break
  5308  		}
  5309  		v.reset(OpARM64MOVDconst)
  5310  		v.AuxInt = int64ToAuxInt(-1)
  5311  		return true
  5312  	}
  5313  	// match: (EON x0 x1:(SLLconst [c] y))
  5314  	// cond: clobberIfDead(x1)
  5315  	// result: (EONshiftLL x0 y [c])
  5316  	for {
  5317  		x0 := v_0
  5318  		x1 := v_1
  5319  		if x1.Op != OpARM64SLLconst {
  5320  			break
  5321  		}
  5322  		c := auxIntToInt64(x1.AuxInt)
  5323  		y := x1.Args[0]
  5324  		if !(clobberIfDead(x1)) {
  5325  			break
  5326  		}
  5327  		v.reset(OpARM64EONshiftLL)
  5328  		v.AuxInt = int64ToAuxInt(c)
  5329  		v.AddArg2(x0, y)
  5330  		return true
  5331  	}
  5332  	// match: (EON x0 x1:(SRLconst [c] y))
  5333  	// cond: clobberIfDead(x1)
  5334  	// result: (EONshiftRL x0 y [c])
  5335  	for {
  5336  		x0 := v_0
  5337  		x1 := v_1
  5338  		if x1.Op != OpARM64SRLconst {
  5339  			break
  5340  		}
  5341  		c := auxIntToInt64(x1.AuxInt)
  5342  		y := x1.Args[0]
  5343  		if !(clobberIfDead(x1)) {
  5344  			break
  5345  		}
  5346  		v.reset(OpARM64EONshiftRL)
  5347  		v.AuxInt = int64ToAuxInt(c)
  5348  		v.AddArg2(x0, y)
  5349  		return true
  5350  	}
  5351  	// match: (EON x0 x1:(SRAconst [c] y))
  5352  	// cond: clobberIfDead(x1)
  5353  	// result: (EONshiftRA x0 y [c])
  5354  	for {
  5355  		x0 := v_0
  5356  		x1 := v_1
  5357  		if x1.Op != OpARM64SRAconst {
  5358  			break
  5359  		}
  5360  		c := auxIntToInt64(x1.AuxInt)
  5361  		y := x1.Args[0]
  5362  		if !(clobberIfDead(x1)) {
  5363  			break
  5364  		}
  5365  		v.reset(OpARM64EONshiftRA)
  5366  		v.AuxInt = int64ToAuxInt(c)
  5367  		v.AddArg2(x0, y)
  5368  		return true
  5369  	}
  5370  	// match: (EON x0 x1:(RORconst [c] y))
  5371  	// cond: clobberIfDead(x1)
  5372  	// result: (EONshiftRO x0 y [c])
  5373  	for {
  5374  		x0 := v_0
  5375  		x1 := v_1
  5376  		if x1.Op != OpARM64RORconst {
  5377  			break
  5378  		}
  5379  		c := auxIntToInt64(x1.AuxInt)
  5380  		y := x1.Args[0]
  5381  		if !(clobberIfDead(x1)) {
  5382  			break
  5383  		}
  5384  		v.reset(OpARM64EONshiftRO)
  5385  		v.AuxInt = int64ToAuxInt(c)
  5386  		v.AddArg2(x0, y)
  5387  		return true
  5388  	}
  5389  	return false
  5390  }
  5391  func rewriteValueARM64_OpARM64EONshiftLL(v *Value) bool {
  5392  	v_1 := v.Args[1]
  5393  	v_0 := v.Args[0]
  5394  	// match: (EONshiftLL x (MOVDconst [c]) [d])
  5395  	// result: (XORconst x [^int64(uint64(c)<<uint64(d))])
  5396  	for {
  5397  		d := auxIntToInt64(v.AuxInt)
  5398  		x := v_0
  5399  		if v_1.Op != OpARM64MOVDconst {
  5400  			break
  5401  		}
  5402  		c := auxIntToInt64(v_1.AuxInt)
  5403  		v.reset(OpARM64XORconst)
  5404  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
  5405  		v.AddArg(x)
  5406  		return true
  5407  	}
  5408  	// match: (EONshiftLL (SLLconst x [c]) x [c])
  5409  	// result: (MOVDconst [-1])
  5410  	for {
  5411  		c := auxIntToInt64(v.AuxInt)
  5412  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
  5413  			break
  5414  		}
  5415  		x := v_0.Args[0]
  5416  		if x != v_1 {
  5417  			break
  5418  		}
  5419  		v.reset(OpARM64MOVDconst)
  5420  		v.AuxInt = int64ToAuxInt(-1)
  5421  		return true
  5422  	}
  5423  	return false
  5424  }
  5425  func rewriteValueARM64_OpARM64EONshiftRA(v *Value) bool {
  5426  	v_1 := v.Args[1]
  5427  	v_0 := v.Args[0]
  5428  	// match: (EONshiftRA x (MOVDconst [c]) [d])
  5429  	// result: (XORconst x [^(c>>uint64(d))])
  5430  	for {
  5431  		d := auxIntToInt64(v.AuxInt)
  5432  		x := v_0
  5433  		if v_1.Op != OpARM64MOVDconst {
  5434  			break
  5435  		}
  5436  		c := auxIntToInt64(v_1.AuxInt)
  5437  		v.reset(OpARM64XORconst)
  5438  		v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
  5439  		v.AddArg(x)
  5440  		return true
  5441  	}
  5442  	// match: (EONshiftRA (SRAconst x [c]) x [c])
  5443  	// result: (MOVDconst [-1])
  5444  	for {
  5445  		c := auxIntToInt64(v.AuxInt)
  5446  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
  5447  			break
  5448  		}
  5449  		x := v_0.Args[0]
  5450  		if x != v_1 {
  5451  			break
  5452  		}
  5453  		v.reset(OpARM64MOVDconst)
  5454  		v.AuxInt = int64ToAuxInt(-1)
  5455  		return true
  5456  	}
  5457  	return false
  5458  }
  5459  func rewriteValueARM64_OpARM64EONshiftRL(v *Value) bool {
  5460  	v_1 := v.Args[1]
  5461  	v_0 := v.Args[0]
  5462  	// match: (EONshiftRL x (MOVDconst [c]) [d])
  5463  	// result: (XORconst x [^int64(uint64(c)>>uint64(d))])
  5464  	for {
  5465  		d := auxIntToInt64(v.AuxInt)
  5466  		x := v_0
  5467  		if v_1.Op != OpARM64MOVDconst {
  5468  			break
  5469  		}
  5470  		c := auxIntToInt64(v_1.AuxInt)
  5471  		v.reset(OpARM64XORconst)
  5472  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
  5473  		v.AddArg(x)
  5474  		return true
  5475  	}
  5476  	// match: (EONshiftRL (SRLconst x [c]) x [c])
  5477  	// result: (MOVDconst [-1])
  5478  	for {
  5479  		c := auxIntToInt64(v.AuxInt)
  5480  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
  5481  			break
  5482  		}
  5483  		x := v_0.Args[0]
  5484  		if x != v_1 {
  5485  			break
  5486  		}
  5487  		v.reset(OpARM64MOVDconst)
  5488  		v.AuxInt = int64ToAuxInt(-1)
  5489  		return true
  5490  	}
  5491  	return false
  5492  }
  5493  func rewriteValueARM64_OpARM64EONshiftRO(v *Value) bool {
  5494  	v_1 := v.Args[1]
  5495  	v_0 := v.Args[0]
  5496  	// match: (EONshiftRO x (MOVDconst [c]) [d])
  5497  	// result: (XORconst x [^rotateRight64(c, d)])
  5498  	for {
  5499  		d := auxIntToInt64(v.AuxInt)
  5500  		x := v_0
  5501  		if v_1.Op != OpARM64MOVDconst {
  5502  			break
  5503  		}
  5504  		c := auxIntToInt64(v_1.AuxInt)
  5505  		v.reset(OpARM64XORconst)
  5506  		v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
  5507  		v.AddArg(x)
  5508  		return true
  5509  	}
  5510  	// match: (EONshiftRO (RORconst x [c]) x [c])
  5511  	// result: (MOVDconst [-1])
  5512  	for {
  5513  		c := auxIntToInt64(v.AuxInt)
  5514  		if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
  5515  			break
  5516  		}
  5517  		x := v_0.Args[0]
  5518  		if x != v_1 {
  5519  			break
  5520  		}
  5521  		v.reset(OpARM64MOVDconst)
  5522  		v.AuxInt = int64ToAuxInt(-1)
  5523  		return true
  5524  	}
  5525  	return false
  5526  }
  5527  func rewriteValueARM64_OpARM64Equal(v *Value) bool {
  5528  	v_0 := v.Args[0]
  5529  	b := v.Block
  5530  	// match: (Equal (CMPconst [0] z:(AND x y)))
  5531  	// cond: z.Uses == 1
  5532  	// result: (Equal (TST x y))
  5533  	for {
  5534  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  5535  			break
  5536  		}
  5537  		z := v_0.Args[0]
  5538  		if z.Op != OpARM64AND {
  5539  			break
  5540  		}
  5541  		y := z.Args[1]
  5542  		x := z.Args[0]
  5543  		if !(z.Uses == 1) {
  5544  			break
  5545  		}
  5546  		v.reset(OpARM64Equal)
  5547  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  5548  		v0.AddArg2(x, y)
  5549  		v.AddArg(v0)
  5550  		return true
  5551  	}
  5552  	// match: (Equal (CMPWconst [0] x:(ANDconst [c] y)))
  5553  	// cond: x.Uses == 1
  5554  	// result: (Equal (TSTWconst [int32(c)] y))
  5555  	for {
  5556  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  5557  			break
  5558  		}
  5559  		x := v_0.Args[0]
  5560  		if x.Op != OpARM64ANDconst {
  5561  			break
  5562  		}
  5563  		c := auxIntToInt64(x.AuxInt)
  5564  		y := x.Args[0]
  5565  		if !(x.Uses == 1) {
  5566  			break
  5567  		}
  5568  		v.reset(OpARM64Equal)
  5569  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  5570  		v0.AuxInt = int32ToAuxInt(int32(c))
  5571  		v0.AddArg(y)
  5572  		v.AddArg(v0)
  5573  		return true
  5574  	}
  5575  	// match: (Equal (CMPWconst [0] z:(AND x y)))
  5576  	// cond: z.Uses == 1
  5577  	// result: (Equal (TSTW x y))
  5578  	for {
  5579  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  5580  			break
  5581  		}
  5582  		z := v_0.Args[0]
  5583  		if z.Op != OpARM64AND {
  5584  			break
  5585  		}
  5586  		y := z.Args[1]
  5587  		x := z.Args[0]
  5588  		if !(z.Uses == 1) {
  5589  			break
  5590  		}
  5591  		v.reset(OpARM64Equal)
  5592  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  5593  		v0.AddArg2(x, y)
  5594  		v.AddArg(v0)
  5595  		return true
  5596  	}
  5597  	// match: (Equal (CMPconst [0] x:(ANDconst [c] y)))
  5598  	// cond: x.Uses == 1
  5599  	// result: (Equal (TSTconst [c] y))
  5600  	for {
  5601  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  5602  			break
  5603  		}
  5604  		x := v_0.Args[0]
  5605  		if x.Op != OpARM64ANDconst {
  5606  			break
  5607  		}
  5608  		c := auxIntToInt64(x.AuxInt)
  5609  		y := x.Args[0]
  5610  		if !(x.Uses == 1) {
  5611  			break
  5612  		}
  5613  		v.reset(OpARM64Equal)
  5614  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  5615  		v0.AuxInt = int64ToAuxInt(c)
  5616  		v0.AddArg(y)
  5617  		v.AddArg(v0)
  5618  		return true
  5619  	}
  5620  	// match: (Equal (CMP x z:(NEG y)))
  5621  	// cond: z.Uses == 1
  5622  	// result: (Equal (CMN x y))
  5623  	for {
  5624  		if v_0.Op != OpARM64CMP {
  5625  			break
  5626  		}
  5627  		_ = v_0.Args[1]
  5628  		x := v_0.Args[0]
  5629  		z := v_0.Args[1]
  5630  		if z.Op != OpARM64NEG {
  5631  			break
  5632  		}
  5633  		y := z.Args[0]
  5634  		if !(z.Uses == 1) {
  5635  			break
  5636  		}
  5637  		v.reset(OpARM64Equal)
  5638  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  5639  		v0.AddArg2(x, y)
  5640  		v.AddArg(v0)
  5641  		return true
  5642  	}
  5643  	// match: (Equal (CMPW x z:(NEG y)))
  5644  	// cond: z.Uses == 1
  5645  	// result: (Equal (CMNW x y))
  5646  	for {
  5647  		if v_0.Op != OpARM64CMPW {
  5648  			break
  5649  		}
  5650  		_ = v_0.Args[1]
  5651  		x := v_0.Args[0]
  5652  		z := v_0.Args[1]
  5653  		if z.Op != OpARM64NEG {
  5654  			break
  5655  		}
  5656  		y := z.Args[0]
  5657  		if !(z.Uses == 1) {
  5658  			break
  5659  		}
  5660  		v.reset(OpARM64Equal)
  5661  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  5662  		v0.AddArg2(x, y)
  5663  		v.AddArg(v0)
  5664  		return true
  5665  	}
  5666  	// match: (Equal (CMPconst [0] x:(ADDconst [c] y)))
  5667  	// cond: x.Uses == 1
  5668  	// result: (Equal (CMNconst [c] y))
  5669  	for {
  5670  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  5671  			break
  5672  		}
  5673  		x := v_0.Args[0]
  5674  		if x.Op != OpARM64ADDconst {
  5675  			break
  5676  		}
  5677  		c := auxIntToInt64(x.AuxInt)
  5678  		y := x.Args[0]
  5679  		if !(x.Uses == 1) {
  5680  			break
  5681  		}
  5682  		v.reset(OpARM64Equal)
  5683  		v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
  5684  		v0.AuxInt = int64ToAuxInt(c)
  5685  		v0.AddArg(y)
  5686  		v.AddArg(v0)
  5687  		return true
  5688  	}
  5689  	// match: (Equal (CMPWconst [0] x:(ADDconst [c] y)))
  5690  	// cond: x.Uses == 1
  5691  	// result: (Equal (CMNWconst [int32(c)] y))
  5692  	for {
  5693  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  5694  			break
  5695  		}
  5696  		x := v_0.Args[0]
  5697  		if x.Op != OpARM64ADDconst {
  5698  			break
  5699  		}
  5700  		c := auxIntToInt64(x.AuxInt)
  5701  		y := x.Args[0]
  5702  		if !(x.Uses == 1) {
  5703  			break
  5704  		}
  5705  		v.reset(OpARM64Equal)
  5706  		v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
  5707  		v0.AuxInt = int32ToAuxInt(int32(c))
  5708  		v0.AddArg(y)
  5709  		v.AddArg(v0)
  5710  		return true
  5711  	}
  5712  	// match: (Equal (CMPconst [0] z:(ADD x y)))
  5713  	// cond: z.Uses == 1
  5714  	// result: (Equal (CMN x y))
  5715  	for {
  5716  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  5717  			break
  5718  		}
  5719  		z := v_0.Args[0]
  5720  		if z.Op != OpARM64ADD {
  5721  			break
  5722  		}
  5723  		y := z.Args[1]
  5724  		x := z.Args[0]
  5725  		if !(z.Uses == 1) {
  5726  			break
  5727  		}
  5728  		v.reset(OpARM64Equal)
  5729  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  5730  		v0.AddArg2(x, y)
  5731  		v.AddArg(v0)
  5732  		return true
  5733  	}
  5734  	// match: (Equal (CMPWconst [0] z:(ADD x y)))
  5735  	// cond: z.Uses == 1
  5736  	// result: (Equal (CMNW x y))
  5737  	for {
  5738  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  5739  			break
  5740  		}
  5741  		z := v_0.Args[0]
  5742  		if z.Op != OpARM64ADD {
  5743  			break
  5744  		}
  5745  		y := z.Args[1]
  5746  		x := z.Args[0]
  5747  		if !(z.Uses == 1) {
  5748  			break
  5749  		}
  5750  		v.reset(OpARM64Equal)
  5751  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  5752  		v0.AddArg2(x, y)
  5753  		v.AddArg(v0)
  5754  		return true
  5755  	}
  5756  	// match: (Equal (CMPconst [0] z:(MADD a x y)))
  5757  	// cond: z.Uses == 1
  5758  	// result: (Equal (CMN a (MUL <x.Type> x y)))
  5759  	for {
  5760  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  5761  			break
  5762  		}
  5763  		z := v_0.Args[0]
  5764  		if z.Op != OpARM64MADD {
  5765  			break
  5766  		}
  5767  		y := z.Args[2]
  5768  		a := z.Args[0]
  5769  		x := z.Args[1]
  5770  		if !(z.Uses == 1) {
  5771  			break
  5772  		}
  5773  		v.reset(OpARM64Equal)
  5774  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  5775  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  5776  		v1.AddArg2(x, y)
  5777  		v0.AddArg2(a, v1)
  5778  		v.AddArg(v0)
  5779  		return true
  5780  	}
  5781  	// match: (Equal (CMPWconst [0] z:(MADDW a x y)))
  5782  	// cond: z.Uses == 1
  5783  	// result: (Equal (CMNW a (MULW <x.Type> x y)))
  5784  	for {
  5785  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  5786  			break
  5787  		}
  5788  		z := v_0.Args[0]
  5789  		if z.Op != OpARM64MADDW {
  5790  			break
  5791  		}
  5792  		y := z.Args[2]
  5793  		a := z.Args[0]
  5794  		x := z.Args[1]
  5795  		if !(z.Uses == 1) {
  5796  			break
  5797  		}
  5798  		v.reset(OpARM64Equal)
  5799  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  5800  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  5801  		v1.AddArg2(x, y)
  5802  		v0.AddArg2(a, v1)
  5803  		v.AddArg(v0)
  5804  		return true
  5805  	}
  5806  	// match: (Equal (CMPconst [0] z:(MSUB a x y)))
  5807  	// cond: z.Uses == 1
  5808  	// result: (Equal (CMP a (MUL <x.Type> x y)))
  5809  	for {
  5810  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  5811  			break
  5812  		}
  5813  		z := v_0.Args[0]
  5814  		if z.Op != OpARM64MSUB {
  5815  			break
  5816  		}
  5817  		y := z.Args[2]
  5818  		a := z.Args[0]
  5819  		x := z.Args[1]
  5820  		if !(z.Uses == 1) {
  5821  			break
  5822  		}
  5823  		v.reset(OpARM64Equal)
  5824  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
  5825  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  5826  		v1.AddArg2(x, y)
  5827  		v0.AddArg2(a, v1)
  5828  		v.AddArg(v0)
  5829  		return true
  5830  	}
  5831  	// match: (Equal (CMPWconst [0] z:(MSUBW a x y)))
  5832  	// cond: z.Uses == 1
  5833  	// result: (Equal (CMPW a (MULW <x.Type> x y)))
  5834  	for {
  5835  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  5836  			break
  5837  		}
  5838  		z := v_0.Args[0]
  5839  		if z.Op != OpARM64MSUBW {
  5840  			break
  5841  		}
  5842  		y := z.Args[2]
  5843  		a := z.Args[0]
  5844  		x := z.Args[1]
  5845  		if !(z.Uses == 1) {
  5846  			break
  5847  		}
  5848  		v.reset(OpARM64Equal)
  5849  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
  5850  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  5851  		v1.AddArg2(x, y)
  5852  		v0.AddArg2(a, v1)
  5853  		v.AddArg(v0)
  5854  		return true
  5855  	}
  5856  	// match: (Equal (FlagConstant [fc]))
  5857  	// result: (MOVDconst [b2i(fc.eq())])
  5858  	for {
  5859  		if v_0.Op != OpARM64FlagConstant {
  5860  			break
  5861  		}
  5862  		fc := auxIntToFlagConstant(v_0.AuxInt)
  5863  		v.reset(OpARM64MOVDconst)
  5864  		v.AuxInt = int64ToAuxInt(b2i(fc.eq()))
  5865  		return true
  5866  	}
  5867  	// match: (Equal (InvertFlags x))
  5868  	// result: (Equal x)
  5869  	for {
  5870  		if v_0.Op != OpARM64InvertFlags {
  5871  			break
  5872  		}
  5873  		x := v_0.Args[0]
  5874  		v.reset(OpARM64Equal)
  5875  		v.AddArg(x)
  5876  		return true
  5877  	}
  5878  	return false
  5879  }
  5880  func rewriteValueARM64_OpARM64FADDD(v *Value) bool {
  5881  	v_1 := v.Args[1]
  5882  	v_0 := v.Args[0]
  5883  	// match: (FADDD a (FMULD x y))
  5884  	// cond: a.Block.Func.useFMA(v)
  5885  	// result: (FMADDD a x y)
  5886  	for {
  5887  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5888  			a := v_0
  5889  			if v_1.Op != OpARM64FMULD {
  5890  				continue
  5891  			}
  5892  			y := v_1.Args[1]
  5893  			x := v_1.Args[0]
  5894  			if !(a.Block.Func.useFMA(v)) {
  5895  				continue
  5896  			}
  5897  			v.reset(OpARM64FMADDD)
  5898  			v.AddArg3(a, x, y)
  5899  			return true
  5900  		}
  5901  		break
  5902  	}
  5903  	// match: (FADDD a (FNMULD x y))
  5904  	// cond: a.Block.Func.useFMA(v)
  5905  	// result: (FMSUBD a x y)
  5906  	for {
  5907  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5908  			a := v_0
  5909  			if v_1.Op != OpARM64FNMULD {
  5910  				continue
  5911  			}
  5912  			y := v_1.Args[1]
  5913  			x := v_1.Args[0]
  5914  			if !(a.Block.Func.useFMA(v)) {
  5915  				continue
  5916  			}
  5917  			v.reset(OpARM64FMSUBD)
  5918  			v.AddArg3(a, x, y)
  5919  			return true
  5920  		}
  5921  		break
  5922  	}
  5923  	return false
  5924  }
  5925  func rewriteValueARM64_OpARM64FADDS(v *Value) bool {
  5926  	v_1 := v.Args[1]
  5927  	v_0 := v.Args[0]
  5928  	// match: (FADDS a (FMULS x y))
  5929  	// cond: a.Block.Func.useFMA(v)
  5930  	// result: (FMADDS a x y)
  5931  	for {
  5932  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5933  			a := v_0
  5934  			if v_1.Op != OpARM64FMULS {
  5935  				continue
  5936  			}
  5937  			y := v_1.Args[1]
  5938  			x := v_1.Args[0]
  5939  			if !(a.Block.Func.useFMA(v)) {
  5940  				continue
  5941  			}
  5942  			v.reset(OpARM64FMADDS)
  5943  			v.AddArg3(a, x, y)
  5944  			return true
  5945  		}
  5946  		break
  5947  	}
  5948  	// match: (FADDS a (FNMULS x y))
  5949  	// cond: a.Block.Func.useFMA(v)
  5950  	// result: (FMSUBS a x y)
  5951  	for {
  5952  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5953  			a := v_0
  5954  			if v_1.Op != OpARM64FNMULS {
  5955  				continue
  5956  			}
  5957  			y := v_1.Args[1]
  5958  			x := v_1.Args[0]
  5959  			if !(a.Block.Func.useFMA(v)) {
  5960  				continue
  5961  			}
  5962  			v.reset(OpARM64FMSUBS)
  5963  			v.AddArg3(a, x, y)
  5964  			return true
  5965  		}
  5966  		break
  5967  	}
  5968  	return false
  5969  }
  5970  func rewriteValueARM64_OpARM64FCMPD(v *Value) bool {
  5971  	v_1 := v.Args[1]
  5972  	v_0 := v.Args[0]
  5973  	b := v.Block
  5974  	// match: (FCMPD x (FMOVDconst [0]))
  5975  	// result: (FCMPD0 x)
  5976  	for {
  5977  		x := v_0
  5978  		if v_1.Op != OpARM64FMOVDconst || auxIntToFloat64(v_1.AuxInt) != 0 {
  5979  			break
  5980  		}
  5981  		v.reset(OpARM64FCMPD0)
  5982  		v.AddArg(x)
  5983  		return true
  5984  	}
  5985  	// match: (FCMPD (FMOVDconst [0]) x)
  5986  	// result: (InvertFlags (FCMPD0 x))
  5987  	for {
  5988  		if v_0.Op != OpARM64FMOVDconst || auxIntToFloat64(v_0.AuxInt) != 0 {
  5989  			break
  5990  		}
  5991  		x := v_1
  5992  		v.reset(OpARM64InvertFlags)
  5993  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD0, types.TypeFlags)
  5994  		v0.AddArg(x)
  5995  		v.AddArg(v0)
  5996  		return true
  5997  	}
  5998  	return false
  5999  }
  6000  func rewriteValueARM64_OpARM64FCMPS(v *Value) bool {
  6001  	v_1 := v.Args[1]
  6002  	v_0 := v.Args[0]
  6003  	b := v.Block
  6004  	// match: (FCMPS x (FMOVSconst [0]))
  6005  	// result: (FCMPS0 x)
  6006  	for {
  6007  		x := v_0
  6008  		if v_1.Op != OpARM64FMOVSconst || auxIntToFloat64(v_1.AuxInt) != 0 {
  6009  			break
  6010  		}
  6011  		v.reset(OpARM64FCMPS0)
  6012  		v.AddArg(x)
  6013  		return true
  6014  	}
  6015  	// match: (FCMPS (FMOVSconst [0]) x)
  6016  	// result: (InvertFlags (FCMPS0 x))
  6017  	for {
  6018  		if v_0.Op != OpARM64FMOVSconst || auxIntToFloat64(v_0.AuxInt) != 0 {
  6019  			break
  6020  		}
  6021  		x := v_1
  6022  		v.reset(OpARM64InvertFlags)
  6023  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS0, types.TypeFlags)
  6024  		v0.AddArg(x)
  6025  		v.AddArg(v0)
  6026  		return true
  6027  	}
  6028  	return false
  6029  }
  6030  func rewriteValueARM64_OpARM64FCVTDS(v *Value) bool {
  6031  	v_0 := v.Args[0]
  6032  	// match: (FCVTDS (FABSD (FCVTSD x)))
  6033  	// result: (FABSS x)
  6034  	for {
  6035  		if v_0.Op != OpARM64FABSD {
  6036  			break
  6037  		}
  6038  		v_0_0 := v_0.Args[0]
  6039  		if v_0_0.Op != OpARM64FCVTSD {
  6040  			break
  6041  		}
  6042  		x := v_0_0.Args[0]
  6043  		v.reset(OpARM64FABSS)
  6044  		v.AddArg(x)
  6045  		return true
  6046  	}
  6047  	// match: (FCVTDS (FSQRTD (FCVTSD x)))
  6048  	// result: (FSQRTS x)
  6049  	for {
  6050  		if v_0.Op != OpARM64FSQRTD {
  6051  			break
  6052  		}
  6053  		v_0_0 := v_0.Args[0]
  6054  		if v_0_0.Op != OpARM64FCVTSD {
  6055  			break
  6056  		}
  6057  		x := v_0_0.Args[0]
  6058  		v.reset(OpARM64FSQRTS)
  6059  		v.AddArg(x)
  6060  		return true
  6061  	}
  6062  	// match: (FCVTDS (FRINTPD (FCVTSD x)))
  6063  	// result: (FRINTPS x)
  6064  	for {
  6065  		if v_0.Op != OpARM64FRINTPD {
  6066  			break
  6067  		}
  6068  		v_0_0 := v_0.Args[0]
  6069  		if v_0_0.Op != OpARM64FCVTSD {
  6070  			break
  6071  		}
  6072  		x := v_0_0.Args[0]
  6073  		v.reset(OpARM64FRINTPS)
  6074  		v.AddArg(x)
  6075  		return true
  6076  	}
  6077  	// match: (FCVTDS (FRINTMD (FCVTSD x)))
  6078  	// result: (FRINTMS x)
  6079  	for {
  6080  		if v_0.Op != OpARM64FRINTMD {
  6081  			break
  6082  		}
  6083  		v_0_0 := v_0.Args[0]
  6084  		if v_0_0.Op != OpARM64FCVTSD {
  6085  			break
  6086  		}
  6087  		x := v_0_0.Args[0]
  6088  		v.reset(OpARM64FRINTMS)
  6089  		v.AddArg(x)
  6090  		return true
  6091  	}
  6092  	// match: (FCVTDS (FRINTAD (FCVTSD x)))
  6093  	// result: (FRINTAS x)
  6094  	for {
  6095  		if v_0.Op != OpARM64FRINTAD {
  6096  			break
  6097  		}
  6098  		v_0_0 := v_0.Args[0]
  6099  		if v_0_0.Op != OpARM64FCVTSD {
  6100  			break
  6101  		}
  6102  		x := v_0_0.Args[0]
  6103  		v.reset(OpARM64FRINTAS)
  6104  		v.AddArg(x)
  6105  		return true
  6106  	}
  6107  	// match: (FCVTDS (FRINTND (FCVTSD x)))
  6108  	// result: (FRINTNS x)
  6109  	for {
  6110  		if v_0.Op != OpARM64FRINTND {
  6111  			break
  6112  		}
  6113  		v_0_0 := v_0.Args[0]
  6114  		if v_0_0.Op != OpARM64FCVTSD {
  6115  			break
  6116  		}
  6117  		x := v_0_0.Args[0]
  6118  		v.reset(OpARM64FRINTNS)
  6119  		v.AddArg(x)
  6120  		return true
  6121  	}
  6122  	// match: (FCVTDS (FRINTZD (FCVTSD x)))
  6123  	// result: (FRINTZS x)
  6124  	for {
  6125  		if v_0.Op != OpARM64FRINTZD {
  6126  			break
  6127  		}
  6128  		v_0_0 := v_0.Args[0]
  6129  		if v_0_0.Op != OpARM64FCVTSD {
  6130  			break
  6131  		}
  6132  		x := v_0_0.Args[0]
  6133  		v.reset(OpARM64FRINTZS)
  6134  		v.AddArg(x)
  6135  		return true
  6136  	}
  6137  	return false
  6138  }
  6139  func rewriteValueARM64_OpARM64FLDPQ(v *Value) bool {
  6140  	v_1 := v.Args[1]
  6141  	v_0 := v.Args[0]
  6142  	b := v.Block
  6143  	config := b.Func.Config
  6144  	// match: (FLDPQ [off1] {sym} (ADDconst [off2] ptr) mem)
  6145  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6146  	// result: (FLDPQ [off1+int32(off2)] {sym} ptr mem)
  6147  	for {
  6148  		off1 := auxIntToInt32(v.AuxInt)
  6149  		sym := auxToSym(v.Aux)
  6150  		if v_0.Op != OpARM64ADDconst {
  6151  			break
  6152  		}
  6153  		off2 := auxIntToInt64(v_0.AuxInt)
  6154  		ptr := v_0.Args[0]
  6155  		mem := v_1
  6156  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6157  			break
  6158  		}
  6159  		v.reset(OpARM64FLDPQ)
  6160  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  6161  		v.Aux = symToAux(sym)
  6162  		v.AddArg2(ptr, mem)
  6163  		return true
  6164  	}
  6165  	// match: (FLDPQ [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  6166  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6167  	// result: (FLDPQ [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  6168  	for {
  6169  		off1 := auxIntToInt32(v.AuxInt)
  6170  		sym1 := auxToSym(v.Aux)
  6171  		if v_0.Op != OpARM64MOVDaddr {
  6172  			break
  6173  		}
  6174  		off2 := auxIntToInt32(v_0.AuxInt)
  6175  		sym2 := auxToSym(v_0.Aux)
  6176  		ptr := v_0.Args[0]
  6177  		mem := v_1
  6178  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6179  			break
  6180  		}
  6181  		v.reset(OpARM64FLDPQ)
  6182  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6183  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6184  		v.AddArg2(ptr, mem)
  6185  		return true
  6186  	}
  6187  	return false
  6188  }
  6189  func rewriteValueARM64_OpARM64FMOVDfpgp(v *Value) bool {
  6190  	v_0 := v.Args[0]
  6191  	b := v.Block
  6192  	// match: (FMOVDfpgp <t> (Arg [off] {sym}))
  6193  	// result: @b.Func.Entry (Arg <t> [off] {sym})
  6194  	for {
  6195  		t := v.Type
  6196  		if v_0.Op != OpArg {
  6197  			break
  6198  		}
  6199  		off := auxIntToInt32(v_0.AuxInt)
  6200  		sym := auxToSym(v_0.Aux)
  6201  		b = b.Func.Entry
  6202  		v0 := b.NewValue0(v.Pos, OpArg, t)
  6203  		v.copyOf(v0)
  6204  		v0.AuxInt = int32ToAuxInt(off)
  6205  		v0.Aux = symToAux(sym)
  6206  		return true
  6207  	}
  6208  	return false
  6209  }
  6210  func rewriteValueARM64_OpARM64FMOVDgpfp(v *Value) bool {
  6211  	v_0 := v.Args[0]
  6212  	b := v.Block
  6213  	// match: (FMOVDgpfp <t> (Arg [off] {sym}))
  6214  	// result: @b.Func.Entry (Arg <t> [off] {sym})
  6215  	for {
  6216  		t := v.Type
  6217  		if v_0.Op != OpArg {
  6218  			break
  6219  		}
  6220  		off := auxIntToInt32(v_0.AuxInt)
  6221  		sym := auxToSym(v_0.Aux)
  6222  		b = b.Func.Entry
  6223  		v0 := b.NewValue0(v.Pos, OpArg, t)
  6224  		v.copyOf(v0)
  6225  		v0.AuxInt = int32ToAuxInt(off)
  6226  		v0.Aux = symToAux(sym)
  6227  		return true
  6228  	}
  6229  	return false
  6230  }
  6231  func rewriteValueARM64_OpARM64FMOVDload(v *Value) bool {
  6232  	v_1 := v.Args[1]
  6233  	v_0 := v.Args[0]
  6234  	b := v.Block
  6235  	config := b.Func.Config
  6236  	// match: (FMOVDload [off] {sym} ptr (MOVDstore [off] {sym} ptr val _))
  6237  	// result: (FMOVDgpfp val)
  6238  	for {
  6239  		off := auxIntToInt32(v.AuxInt)
  6240  		sym := auxToSym(v.Aux)
  6241  		ptr := v_0
  6242  		if v_1.Op != OpARM64MOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  6243  			break
  6244  		}
  6245  		val := v_1.Args[1]
  6246  		if ptr != v_1.Args[0] {
  6247  			break
  6248  		}
  6249  		v.reset(OpARM64FMOVDgpfp)
  6250  		v.AddArg(val)
  6251  		return true
  6252  	}
  6253  	// match: (FMOVDload [off1] {sym} (ADDconst [off2] ptr) mem)
  6254  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6255  	// result: (FMOVDload [off1+int32(off2)] {sym} ptr mem)
  6256  	for {
  6257  		off1 := auxIntToInt32(v.AuxInt)
  6258  		sym := auxToSym(v.Aux)
  6259  		if v_0.Op != OpARM64ADDconst {
  6260  			break
  6261  		}
  6262  		off2 := auxIntToInt64(v_0.AuxInt)
  6263  		ptr := v_0.Args[0]
  6264  		mem := v_1
  6265  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6266  			break
  6267  		}
  6268  		v.reset(OpARM64FMOVDload)
  6269  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  6270  		v.Aux = symToAux(sym)
  6271  		v.AddArg2(ptr, mem)
  6272  		return true
  6273  	}
  6274  	// match: (FMOVDload [off] {sym} (ADD ptr idx) mem)
  6275  	// cond: off == 0 && sym == nil
  6276  	// result: (FMOVDloadidx ptr idx mem)
  6277  	for {
  6278  		off := auxIntToInt32(v.AuxInt)
  6279  		sym := auxToSym(v.Aux)
  6280  		if v_0.Op != OpARM64ADD {
  6281  			break
  6282  		}
  6283  		idx := v_0.Args[1]
  6284  		ptr := v_0.Args[0]
  6285  		mem := v_1
  6286  		if !(off == 0 && sym == nil) {
  6287  			break
  6288  		}
  6289  		v.reset(OpARM64FMOVDloadidx)
  6290  		v.AddArg3(ptr, idx, mem)
  6291  		return true
  6292  	}
  6293  	// match: (FMOVDload [off] {sym} (ADDshiftLL [3] ptr idx) mem)
  6294  	// cond: off == 0 && sym == nil
  6295  	// result: (FMOVDloadidx8 ptr idx mem)
  6296  	for {
  6297  		off := auxIntToInt32(v.AuxInt)
  6298  		sym := auxToSym(v.Aux)
  6299  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
  6300  			break
  6301  		}
  6302  		idx := v_0.Args[1]
  6303  		ptr := v_0.Args[0]
  6304  		mem := v_1
  6305  		if !(off == 0 && sym == nil) {
  6306  			break
  6307  		}
  6308  		v.reset(OpARM64FMOVDloadidx8)
  6309  		v.AddArg3(ptr, idx, mem)
  6310  		return true
  6311  	}
  6312  	// match: (FMOVDload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  6313  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6314  	// result: (FMOVDload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  6315  	for {
  6316  		off1 := auxIntToInt32(v.AuxInt)
  6317  		sym1 := auxToSym(v.Aux)
  6318  		if v_0.Op != OpARM64MOVDaddr {
  6319  			break
  6320  		}
  6321  		off2 := auxIntToInt32(v_0.AuxInt)
  6322  		sym2 := auxToSym(v_0.Aux)
  6323  		ptr := v_0.Args[0]
  6324  		mem := v_1
  6325  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6326  			break
  6327  		}
  6328  		v.reset(OpARM64FMOVDload)
  6329  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6330  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6331  		v.AddArg2(ptr, mem)
  6332  		return true
  6333  	}
  6334  	return false
  6335  }
  6336  func rewriteValueARM64_OpARM64FMOVDloadidx(v *Value) bool {
  6337  	v_2 := v.Args[2]
  6338  	v_1 := v.Args[1]
  6339  	v_0 := v.Args[0]
  6340  	// match: (FMOVDloadidx ptr (MOVDconst [c]) mem)
  6341  	// cond: is32Bit(c)
  6342  	// result: (FMOVDload [int32(c)] ptr mem)
  6343  	for {
  6344  		ptr := v_0
  6345  		if v_1.Op != OpARM64MOVDconst {
  6346  			break
  6347  		}
  6348  		c := auxIntToInt64(v_1.AuxInt)
  6349  		mem := v_2
  6350  		if !(is32Bit(c)) {
  6351  			break
  6352  		}
  6353  		v.reset(OpARM64FMOVDload)
  6354  		v.AuxInt = int32ToAuxInt(int32(c))
  6355  		v.AddArg2(ptr, mem)
  6356  		return true
  6357  	}
  6358  	// match: (FMOVDloadidx (MOVDconst [c]) ptr mem)
  6359  	// cond: is32Bit(c)
  6360  	// result: (FMOVDload [int32(c)] ptr mem)
  6361  	for {
  6362  		if v_0.Op != OpARM64MOVDconst {
  6363  			break
  6364  		}
  6365  		c := auxIntToInt64(v_0.AuxInt)
  6366  		ptr := v_1
  6367  		mem := v_2
  6368  		if !(is32Bit(c)) {
  6369  			break
  6370  		}
  6371  		v.reset(OpARM64FMOVDload)
  6372  		v.AuxInt = int32ToAuxInt(int32(c))
  6373  		v.AddArg2(ptr, mem)
  6374  		return true
  6375  	}
  6376  	// match: (FMOVDloadidx ptr (SLLconst [3] idx) mem)
  6377  	// result: (FMOVDloadidx8 ptr idx mem)
  6378  	for {
  6379  		ptr := v_0
  6380  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
  6381  			break
  6382  		}
  6383  		idx := v_1.Args[0]
  6384  		mem := v_2
  6385  		v.reset(OpARM64FMOVDloadidx8)
  6386  		v.AddArg3(ptr, idx, mem)
  6387  		return true
  6388  	}
  6389  	// match: (FMOVDloadidx (SLLconst [3] idx) ptr mem)
  6390  	// result: (FMOVDloadidx8 ptr idx mem)
  6391  	for {
  6392  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
  6393  			break
  6394  		}
  6395  		idx := v_0.Args[0]
  6396  		ptr := v_1
  6397  		mem := v_2
  6398  		v.reset(OpARM64FMOVDloadidx8)
  6399  		v.AddArg3(ptr, idx, mem)
  6400  		return true
  6401  	}
  6402  	return false
  6403  }
  6404  func rewriteValueARM64_OpARM64FMOVDloadidx8(v *Value) bool {
  6405  	v_2 := v.Args[2]
  6406  	v_1 := v.Args[1]
  6407  	v_0 := v.Args[0]
  6408  	// match: (FMOVDloadidx8 ptr (MOVDconst [c]) mem)
  6409  	// cond: is32Bit(c<<3)
  6410  	// result: (FMOVDload ptr [int32(c)<<3] mem)
  6411  	for {
  6412  		ptr := v_0
  6413  		if v_1.Op != OpARM64MOVDconst {
  6414  			break
  6415  		}
  6416  		c := auxIntToInt64(v_1.AuxInt)
  6417  		mem := v_2
  6418  		if !(is32Bit(c << 3)) {
  6419  			break
  6420  		}
  6421  		v.reset(OpARM64FMOVDload)
  6422  		v.AuxInt = int32ToAuxInt(int32(c) << 3)
  6423  		v.AddArg2(ptr, mem)
  6424  		return true
  6425  	}
  6426  	return false
  6427  }
  6428  func rewriteValueARM64_OpARM64FMOVDstore(v *Value) bool {
  6429  	v_2 := v.Args[2]
  6430  	v_1 := v.Args[1]
  6431  	v_0 := v.Args[0]
  6432  	b := v.Block
  6433  	config := b.Func.Config
  6434  	// match: (FMOVDstore [off] {sym} ptr (FMOVDgpfp val) mem)
  6435  	// result: (MOVDstore [off] {sym} ptr val mem)
  6436  	for {
  6437  		off := auxIntToInt32(v.AuxInt)
  6438  		sym := auxToSym(v.Aux)
  6439  		ptr := v_0
  6440  		if v_1.Op != OpARM64FMOVDgpfp {
  6441  			break
  6442  		}
  6443  		val := v_1.Args[0]
  6444  		mem := v_2
  6445  		v.reset(OpARM64MOVDstore)
  6446  		v.AuxInt = int32ToAuxInt(off)
  6447  		v.Aux = symToAux(sym)
  6448  		v.AddArg3(ptr, val, mem)
  6449  		return true
  6450  	}
  6451  	// match: (FMOVDstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  6452  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6453  	// result: (FMOVDstore [off1+int32(off2)] {sym} ptr val mem)
  6454  	for {
  6455  		off1 := auxIntToInt32(v.AuxInt)
  6456  		sym := auxToSym(v.Aux)
  6457  		if v_0.Op != OpARM64ADDconst {
  6458  			break
  6459  		}
  6460  		off2 := auxIntToInt64(v_0.AuxInt)
  6461  		ptr := v_0.Args[0]
  6462  		val := v_1
  6463  		mem := v_2
  6464  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6465  			break
  6466  		}
  6467  		v.reset(OpARM64FMOVDstore)
  6468  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  6469  		v.Aux = symToAux(sym)
  6470  		v.AddArg3(ptr, val, mem)
  6471  		return true
  6472  	}
  6473  	// match: (FMOVDstore [off] {sym} (ADD ptr idx) val mem)
  6474  	// cond: off == 0 && sym == nil
  6475  	// result: (FMOVDstoreidx ptr idx val mem)
  6476  	for {
  6477  		off := auxIntToInt32(v.AuxInt)
  6478  		sym := auxToSym(v.Aux)
  6479  		if v_0.Op != OpARM64ADD {
  6480  			break
  6481  		}
  6482  		idx := v_0.Args[1]
  6483  		ptr := v_0.Args[0]
  6484  		val := v_1
  6485  		mem := v_2
  6486  		if !(off == 0 && sym == nil) {
  6487  			break
  6488  		}
  6489  		v.reset(OpARM64FMOVDstoreidx)
  6490  		v.AddArg4(ptr, idx, val, mem)
  6491  		return true
  6492  	}
  6493  	// match: (FMOVDstore [off] {sym} (ADDshiftLL [3] ptr idx) val mem)
  6494  	// cond: off == 0 && sym == nil
  6495  	// result: (FMOVDstoreidx8 ptr idx val mem)
  6496  	for {
  6497  		off := auxIntToInt32(v.AuxInt)
  6498  		sym := auxToSym(v.Aux)
  6499  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
  6500  			break
  6501  		}
  6502  		idx := v_0.Args[1]
  6503  		ptr := v_0.Args[0]
  6504  		val := v_1
  6505  		mem := v_2
  6506  		if !(off == 0 && sym == nil) {
  6507  			break
  6508  		}
  6509  		v.reset(OpARM64FMOVDstoreidx8)
  6510  		v.AddArg4(ptr, idx, val, mem)
  6511  		return true
  6512  	}
  6513  	// match: (FMOVDstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
  6514  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6515  	// result: (FMOVDstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  6516  	for {
  6517  		off1 := auxIntToInt32(v.AuxInt)
  6518  		sym1 := auxToSym(v.Aux)
  6519  		if v_0.Op != OpARM64MOVDaddr {
  6520  			break
  6521  		}
  6522  		off2 := auxIntToInt32(v_0.AuxInt)
  6523  		sym2 := auxToSym(v_0.Aux)
  6524  		ptr := v_0.Args[0]
  6525  		val := v_1
  6526  		mem := v_2
  6527  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6528  			break
  6529  		}
  6530  		v.reset(OpARM64FMOVDstore)
  6531  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6532  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6533  		v.AddArg3(ptr, val, mem)
  6534  		return true
  6535  	}
  6536  	return false
  6537  }
  6538  func rewriteValueARM64_OpARM64FMOVDstoreidx(v *Value) bool {
  6539  	v_3 := v.Args[3]
  6540  	v_2 := v.Args[2]
  6541  	v_1 := v.Args[1]
  6542  	v_0 := v.Args[0]
  6543  	// match: (FMOVDstoreidx ptr (MOVDconst [c]) val mem)
  6544  	// cond: is32Bit(c)
  6545  	// result: (FMOVDstore [int32(c)] ptr val mem)
  6546  	for {
  6547  		ptr := v_0
  6548  		if v_1.Op != OpARM64MOVDconst {
  6549  			break
  6550  		}
  6551  		c := auxIntToInt64(v_1.AuxInt)
  6552  		val := v_2
  6553  		mem := v_3
  6554  		if !(is32Bit(c)) {
  6555  			break
  6556  		}
  6557  		v.reset(OpARM64FMOVDstore)
  6558  		v.AuxInt = int32ToAuxInt(int32(c))
  6559  		v.AddArg3(ptr, val, mem)
  6560  		return true
  6561  	}
  6562  	// match: (FMOVDstoreidx (MOVDconst [c]) idx val mem)
  6563  	// cond: is32Bit(c)
  6564  	// result: (FMOVDstore [int32(c)] idx val mem)
  6565  	for {
  6566  		if v_0.Op != OpARM64MOVDconst {
  6567  			break
  6568  		}
  6569  		c := auxIntToInt64(v_0.AuxInt)
  6570  		idx := v_1
  6571  		val := v_2
  6572  		mem := v_3
  6573  		if !(is32Bit(c)) {
  6574  			break
  6575  		}
  6576  		v.reset(OpARM64FMOVDstore)
  6577  		v.AuxInt = int32ToAuxInt(int32(c))
  6578  		v.AddArg3(idx, val, mem)
  6579  		return true
  6580  	}
  6581  	// match: (FMOVDstoreidx ptr (SLLconst [3] idx) val mem)
  6582  	// result: (FMOVDstoreidx8 ptr idx val mem)
  6583  	for {
  6584  		ptr := v_0
  6585  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
  6586  			break
  6587  		}
  6588  		idx := v_1.Args[0]
  6589  		val := v_2
  6590  		mem := v_3
  6591  		v.reset(OpARM64FMOVDstoreidx8)
  6592  		v.AddArg4(ptr, idx, val, mem)
  6593  		return true
  6594  	}
  6595  	// match: (FMOVDstoreidx (SLLconst [3] idx) ptr val mem)
  6596  	// result: (FMOVDstoreidx8 ptr idx val mem)
  6597  	for {
  6598  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
  6599  			break
  6600  		}
  6601  		idx := v_0.Args[0]
  6602  		ptr := v_1
  6603  		val := v_2
  6604  		mem := v_3
  6605  		v.reset(OpARM64FMOVDstoreidx8)
  6606  		v.AddArg4(ptr, idx, val, mem)
  6607  		return true
  6608  	}
  6609  	return false
  6610  }
  6611  func rewriteValueARM64_OpARM64FMOVDstoreidx8(v *Value) bool {
  6612  	v_3 := v.Args[3]
  6613  	v_2 := v.Args[2]
  6614  	v_1 := v.Args[1]
  6615  	v_0 := v.Args[0]
  6616  	// match: (FMOVDstoreidx8 ptr (MOVDconst [c]) val mem)
  6617  	// cond: is32Bit(c<<3)
  6618  	// result: (FMOVDstore [int32(c)<<3] ptr val mem)
  6619  	for {
  6620  		ptr := v_0
  6621  		if v_1.Op != OpARM64MOVDconst {
  6622  			break
  6623  		}
  6624  		c := auxIntToInt64(v_1.AuxInt)
  6625  		val := v_2
  6626  		mem := v_3
  6627  		if !(is32Bit(c << 3)) {
  6628  			break
  6629  		}
  6630  		v.reset(OpARM64FMOVDstore)
  6631  		v.AuxInt = int32ToAuxInt(int32(c) << 3)
  6632  		v.AddArg3(ptr, val, mem)
  6633  		return true
  6634  	}
  6635  	return false
  6636  }
  6637  func rewriteValueARM64_OpARM64FMOVQload(v *Value) bool {
  6638  	v_1 := v.Args[1]
  6639  	v_0 := v.Args[0]
  6640  	b := v.Block
  6641  	config := b.Func.Config
  6642  	// match: (FMOVQload [off1] {sym} (ADDconst [off2] ptr) mem)
  6643  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6644  	// result: (FMOVQload [off1+int32(off2)] {sym} ptr mem)
  6645  	for {
  6646  		off1 := auxIntToInt32(v.AuxInt)
  6647  		sym := auxToSym(v.Aux)
  6648  		if v_0.Op != OpARM64ADDconst {
  6649  			break
  6650  		}
  6651  		off2 := auxIntToInt64(v_0.AuxInt)
  6652  		ptr := v_0.Args[0]
  6653  		mem := v_1
  6654  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6655  			break
  6656  		}
  6657  		v.reset(OpARM64FMOVQload)
  6658  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  6659  		v.Aux = symToAux(sym)
  6660  		v.AddArg2(ptr, mem)
  6661  		return true
  6662  	}
  6663  	// match: (FMOVQload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  6664  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6665  	// result: (FMOVQload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  6666  	for {
  6667  		off1 := auxIntToInt32(v.AuxInt)
  6668  		sym1 := auxToSym(v.Aux)
  6669  		if v_0.Op != OpARM64MOVDaddr {
  6670  			break
  6671  		}
  6672  		off2 := auxIntToInt32(v_0.AuxInt)
  6673  		sym2 := auxToSym(v_0.Aux)
  6674  		ptr := v_0.Args[0]
  6675  		mem := v_1
  6676  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6677  			break
  6678  		}
  6679  		v.reset(OpARM64FMOVQload)
  6680  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6681  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6682  		v.AddArg2(ptr, mem)
  6683  		return true
  6684  	}
  6685  	return false
  6686  }
  6687  func rewriteValueARM64_OpARM64FMOVQstore(v *Value) bool {
  6688  	v_2 := v.Args[2]
  6689  	v_1 := v.Args[1]
  6690  	v_0 := v.Args[0]
  6691  	b := v.Block
  6692  	config := b.Func.Config
  6693  	// match: (FMOVQstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  6694  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6695  	// result: (FMOVQstore [off1+int32(off2)] {sym} ptr val mem)
  6696  	for {
  6697  		off1 := auxIntToInt32(v.AuxInt)
  6698  		sym := auxToSym(v.Aux)
  6699  		if v_0.Op != OpARM64ADDconst {
  6700  			break
  6701  		}
  6702  		off2 := auxIntToInt64(v_0.AuxInt)
  6703  		ptr := v_0.Args[0]
  6704  		val := v_1
  6705  		mem := v_2
  6706  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6707  			break
  6708  		}
  6709  		v.reset(OpARM64FMOVQstore)
  6710  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  6711  		v.Aux = symToAux(sym)
  6712  		v.AddArg3(ptr, val, mem)
  6713  		return true
  6714  	}
  6715  	// match: (FMOVQstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
  6716  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6717  	// result: (FMOVQstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  6718  	for {
  6719  		off1 := auxIntToInt32(v.AuxInt)
  6720  		sym1 := auxToSym(v.Aux)
  6721  		if v_0.Op != OpARM64MOVDaddr {
  6722  			break
  6723  		}
  6724  		off2 := auxIntToInt32(v_0.AuxInt)
  6725  		sym2 := auxToSym(v_0.Aux)
  6726  		ptr := v_0.Args[0]
  6727  		val := v_1
  6728  		mem := v_2
  6729  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6730  			break
  6731  		}
  6732  		v.reset(OpARM64FMOVQstore)
  6733  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6734  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6735  		v.AddArg3(ptr, val, mem)
  6736  		return true
  6737  	}
  6738  	return false
  6739  }
  6740  func rewriteValueARM64_OpARM64FMOVSload(v *Value) bool {
  6741  	v_1 := v.Args[1]
  6742  	v_0 := v.Args[0]
  6743  	b := v.Block
  6744  	config := b.Func.Config
  6745  	// match: (FMOVSload [off] {sym} ptr (MOVWstore [off] {sym} ptr val _))
  6746  	// result: (FMOVSgpfp val)
  6747  	for {
  6748  		off := auxIntToInt32(v.AuxInt)
  6749  		sym := auxToSym(v.Aux)
  6750  		ptr := v_0
  6751  		if v_1.Op != OpARM64MOVWstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  6752  			break
  6753  		}
  6754  		val := v_1.Args[1]
  6755  		if ptr != v_1.Args[0] {
  6756  			break
  6757  		}
  6758  		v.reset(OpARM64FMOVSgpfp)
  6759  		v.AddArg(val)
  6760  		return true
  6761  	}
  6762  	// match: (FMOVSload [off1] {sym} (ADDconst [off2] ptr) mem)
  6763  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6764  	// result: (FMOVSload [off1+int32(off2)] {sym} ptr mem)
  6765  	for {
  6766  		off1 := auxIntToInt32(v.AuxInt)
  6767  		sym := auxToSym(v.Aux)
  6768  		if v_0.Op != OpARM64ADDconst {
  6769  			break
  6770  		}
  6771  		off2 := auxIntToInt64(v_0.AuxInt)
  6772  		ptr := v_0.Args[0]
  6773  		mem := v_1
  6774  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6775  			break
  6776  		}
  6777  		v.reset(OpARM64FMOVSload)
  6778  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  6779  		v.Aux = symToAux(sym)
  6780  		v.AddArg2(ptr, mem)
  6781  		return true
  6782  	}
  6783  	// match: (FMOVSload [off] {sym} (ADD ptr idx) mem)
  6784  	// cond: off == 0 && sym == nil
  6785  	// result: (FMOVSloadidx ptr idx mem)
  6786  	for {
  6787  		off := auxIntToInt32(v.AuxInt)
  6788  		sym := auxToSym(v.Aux)
  6789  		if v_0.Op != OpARM64ADD {
  6790  			break
  6791  		}
  6792  		idx := v_0.Args[1]
  6793  		ptr := v_0.Args[0]
  6794  		mem := v_1
  6795  		if !(off == 0 && sym == nil) {
  6796  			break
  6797  		}
  6798  		v.reset(OpARM64FMOVSloadidx)
  6799  		v.AddArg3(ptr, idx, mem)
  6800  		return true
  6801  	}
  6802  	// match: (FMOVSload [off] {sym} (ADDshiftLL [2] ptr idx) mem)
  6803  	// cond: off == 0 && sym == nil
  6804  	// result: (FMOVSloadidx4 ptr idx mem)
  6805  	for {
  6806  		off := auxIntToInt32(v.AuxInt)
  6807  		sym := auxToSym(v.Aux)
  6808  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
  6809  			break
  6810  		}
  6811  		idx := v_0.Args[1]
  6812  		ptr := v_0.Args[0]
  6813  		mem := v_1
  6814  		if !(off == 0 && sym == nil) {
  6815  			break
  6816  		}
  6817  		v.reset(OpARM64FMOVSloadidx4)
  6818  		v.AddArg3(ptr, idx, mem)
  6819  		return true
  6820  	}
  6821  	// match: (FMOVSload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  6822  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6823  	// result: (FMOVSload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  6824  	for {
  6825  		off1 := auxIntToInt32(v.AuxInt)
  6826  		sym1 := auxToSym(v.Aux)
  6827  		if v_0.Op != OpARM64MOVDaddr {
  6828  			break
  6829  		}
  6830  		off2 := auxIntToInt32(v_0.AuxInt)
  6831  		sym2 := auxToSym(v_0.Aux)
  6832  		ptr := v_0.Args[0]
  6833  		mem := v_1
  6834  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6835  			break
  6836  		}
  6837  		v.reset(OpARM64FMOVSload)
  6838  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6839  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6840  		v.AddArg2(ptr, mem)
  6841  		return true
  6842  	}
  6843  	return false
  6844  }
  6845  func rewriteValueARM64_OpARM64FMOVSloadidx(v *Value) bool {
  6846  	v_2 := v.Args[2]
  6847  	v_1 := v.Args[1]
  6848  	v_0 := v.Args[0]
  6849  	// match: (FMOVSloadidx ptr (MOVDconst [c]) mem)
  6850  	// cond: is32Bit(c)
  6851  	// result: (FMOVSload [int32(c)] ptr mem)
  6852  	for {
  6853  		ptr := v_0
  6854  		if v_1.Op != OpARM64MOVDconst {
  6855  			break
  6856  		}
  6857  		c := auxIntToInt64(v_1.AuxInt)
  6858  		mem := v_2
  6859  		if !(is32Bit(c)) {
  6860  			break
  6861  		}
  6862  		v.reset(OpARM64FMOVSload)
  6863  		v.AuxInt = int32ToAuxInt(int32(c))
  6864  		v.AddArg2(ptr, mem)
  6865  		return true
  6866  	}
  6867  	// match: (FMOVSloadidx (MOVDconst [c]) ptr mem)
  6868  	// cond: is32Bit(c)
  6869  	// result: (FMOVSload [int32(c)] ptr mem)
  6870  	for {
  6871  		if v_0.Op != OpARM64MOVDconst {
  6872  			break
  6873  		}
  6874  		c := auxIntToInt64(v_0.AuxInt)
  6875  		ptr := v_1
  6876  		mem := v_2
  6877  		if !(is32Bit(c)) {
  6878  			break
  6879  		}
  6880  		v.reset(OpARM64FMOVSload)
  6881  		v.AuxInt = int32ToAuxInt(int32(c))
  6882  		v.AddArg2(ptr, mem)
  6883  		return true
  6884  	}
  6885  	// match: (FMOVSloadidx ptr (SLLconst [2] idx) mem)
  6886  	// result: (FMOVSloadidx4 ptr idx mem)
  6887  	for {
  6888  		ptr := v_0
  6889  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
  6890  			break
  6891  		}
  6892  		idx := v_1.Args[0]
  6893  		mem := v_2
  6894  		v.reset(OpARM64FMOVSloadidx4)
  6895  		v.AddArg3(ptr, idx, mem)
  6896  		return true
  6897  	}
  6898  	// match: (FMOVSloadidx (SLLconst [2] idx) ptr mem)
  6899  	// result: (FMOVSloadidx4 ptr idx mem)
  6900  	for {
  6901  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
  6902  			break
  6903  		}
  6904  		idx := v_0.Args[0]
  6905  		ptr := v_1
  6906  		mem := v_2
  6907  		v.reset(OpARM64FMOVSloadidx4)
  6908  		v.AddArg3(ptr, idx, mem)
  6909  		return true
  6910  	}
  6911  	return false
  6912  }
  6913  func rewriteValueARM64_OpARM64FMOVSloadidx4(v *Value) bool {
  6914  	v_2 := v.Args[2]
  6915  	v_1 := v.Args[1]
  6916  	v_0 := v.Args[0]
  6917  	// match: (FMOVSloadidx4 ptr (MOVDconst [c]) mem)
  6918  	// cond: is32Bit(c<<2)
  6919  	// result: (FMOVSload ptr [int32(c)<<2] mem)
  6920  	for {
  6921  		ptr := v_0
  6922  		if v_1.Op != OpARM64MOVDconst {
  6923  			break
  6924  		}
  6925  		c := auxIntToInt64(v_1.AuxInt)
  6926  		mem := v_2
  6927  		if !(is32Bit(c << 2)) {
  6928  			break
  6929  		}
  6930  		v.reset(OpARM64FMOVSload)
  6931  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
  6932  		v.AddArg2(ptr, mem)
  6933  		return true
  6934  	}
  6935  	return false
  6936  }
  6937  func rewriteValueARM64_OpARM64FMOVSstore(v *Value) bool {
  6938  	v_2 := v.Args[2]
  6939  	v_1 := v.Args[1]
  6940  	v_0 := v.Args[0]
  6941  	b := v.Block
  6942  	config := b.Func.Config
  6943  	// match: (FMOVSstore [off] {sym} ptr (FMOVSgpfp val) mem)
  6944  	// result: (MOVWstore [off] {sym} ptr val mem)
  6945  	for {
  6946  		off := auxIntToInt32(v.AuxInt)
  6947  		sym := auxToSym(v.Aux)
  6948  		ptr := v_0
  6949  		if v_1.Op != OpARM64FMOVSgpfp {
  6950  			break
  6951  		}
  6952  		val := v_1.Args[0]
  6953  		mem := v_2
  6954  		v.reset(OpARM64MOVWstore)
  6955  		v.AuxInt = int32ToAuxInt(off)
  6956  		v.Aux = symToAux(sym)
  6957  		v.AddArg3(ptr, val, mem)
  6958  		return true
  6959  	}
  6960  	// match: (FMOVSstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  6961  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6962  	// result: (FMOVSstore [off1+int32(off2)] {sym} ptr val mem)
  6963  	for {
  6964  		off1 := auxIntToInt32(v.AuxInt)
  6965  		sym := auxToSym(v.Aux)
  6966  		if v_0.Op != OpARM64ADDconst {
  6967  			break
  6968  		}
  6969  		off2 := auxIntToInt64(v_0.AuxInt)
  6970  		ptr := v_0.Args[0]
  6971  		val := v_1
  6972  		mem := v_2
  6973  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6974  			break
  6975  		}
  6976  		v.reset(OpARM64FMOVSstore)
  6977  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  6978  		v.Aux = symToAux(sym)
  6979  		v.AddArg3(ptr, val, mem)
  6980  		return true
  6981  	}
  6982  	// match: (FMOVSstore [off] {sym} (ADD ptr idx) val mem)
  6983  	// cond: off == 0 && sym == nil
  6984  	// result: (FMOVSstoreidx ptr idx val mem)
  6985  	for {
  6986  		off := auxIntToInt32(v.AuxInt)
  6987  		sym := auxToSym(v.Aux)
  6988  		if v_0.Op != OpARM64ADD {
  6989  			break
  6990  		}
  6991  		idx := v_0.Args[1]
  6992  		ptr := v_0.Args[0]
  6993  		val := v_1
  6994  		mem := v_2
  6995  		if !(off == 0 && sym == nil) {
  6996  			break
  6997  		}
  6998  		v.reset(OpARM64FMOVSstoreidx)
  6999  		v.AddArg4(ptr, idx, val, mem)
  7000  		return true
  7001  	}
  7002  	// match: (FMOVSstore [off] {sym} (ADDshiftLL [2] ptr idx) val mem)
  7003  	// cond: off == 0 && sym == nil
  7004  	// result: (FMOVSstoreidx4 ptr idx val mem)
  7005  	for {
  7006  		off := auxIntToInt32(v.AuxInt)
  7007  		sym := auxToSym(v.Aux)
  7008  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
  7009  			break
  7010  		}
  7011  		idx := v_0.Args[1]
  7012  		ptr := v_0.Args[0]
  7013  		val := v_1
  7014  		mem := v_2
  7015  		if !(off == 0 && sym == nil) {
  7016  			break
  7017  		}
  7018  		v.reset(OpARM64FMOVSstoreidx4)
  7019  		v.AddArg4(ptr, idx, val, mem)
  7020  		return true
  7021  	}
  7022  	// match: (FMOVSstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
  7023  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  7024  	// result: (FMOVSstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  7025  	for {
  7026  		off1 := auxIntToInt32(v.AuxInt)
  7027  		sym1 := auxToSym(v.Aux)
  7028  		if v_0.Op != OpARM64MOVDaddr {
  7029  			break
  7030  		}
  7031  		off2 := auxIntToInt32(v_0.AuxInt)
  7032  		sym2 := auxToSym(v_0.Aux)
  7033  		ptr := v_0.Args[0]
  7034  		val := v_1
  7035  		mem := v_2
  7036  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  7037  			break
  7038  		}
  7039  		v.reset(OpARM64FMOVSstore)
  7040  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7041  		v.Aux = symToAux(mergeSym(sym1, sym2))
  7042  		v.AddArg3(ptr, val, mem)
  7043  		return true
  7044  	}
  7045  	return false
  7046  }
  7047  func rewriteValueARM64_OpARM64FMOVSstoreidx(v *Value) bool {
  7048  	v_3 := v.Args[3]
  7049  	v_2 := v.Args[2]
  7050  	v_1 := v.Args[1]
  7051  	v_0 := v.Args[0]
  7052  	// match: (FMOVSstoreidx ptr (MOVDconst [c]) val mem)
  7053  	// cond: is32Bit(c)
  7054  	// result: (FMOVSstore [int32(c)] ptr val mem)
  7055  	for {
  7056  		ptr := v_0
  7057  		if v_1.Op != OpARM64MOVDconst {
  7058  			break
  7059  		}
  7060  		c := auxIntToInt64(v_1.AuxInt)
  7061  		val := v_2
  7062  		mem := v_3
  7063  		if !(is32Bit(c)) {
  7064  			break
  7065  		}
  7066  		v.reset(OpARM64FMOVSstore)
  7067  		v.AuxInt = int32ToAuxInt(int32(c))
  7068  		v.AddArg3(ptr, val, mem)
  7069  		return true
  7070  	}
  7071  	// match: (FMOVSstoreidx (MOVDconst [c]) idx val mem)
  7072  	// cond: is32Bit(c)
  7073  	// result: (FMOVSstore [int32(c)] idx val mem)
  7074  	for {
  7075  		if v_0.Op != OpARM64MOVDconst {
  7076  			break
  7077  		}
  7078  		c := auxIntToInt64(v_0.AuxInt)
  7079  		idx := v_1
  7080  		val := v_2
  7081  		mem := v_3
  7082  		if !(is32Bit(c)) {
  7083  			break
  7084  		}
  7085  		v.reset(OpARM64FMOVSstore)
  7086  		v.AuxInt = int32ToAuxInt(int32(c))
  7087  		v.AddArg3(idx, val, mem)
  7088  		return true
  7089  	}
  7090  	// match: (FMOVSstoreidx ptr (SLLconst [2] idx) val mem)
  7091  	// result: (FMOVSstoreidx4 ptr idx val mem)
  7092  	for {
  7093  		ptr := v_0
  7094  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
  7095  			break
  7096  		}
  7097  		idx := v_1.Args[0]
  7098  		val := v_2
  7099  		mem := v_3
  7100  		v.reset(OpARM64FMOVSstoreidx4)
  7101  		v.AddArg4(ptr, idx, val, mem)
  7102  		return true
  7103  	}
  7104  	// match: (FMOVSstoreidx (SLLconst [2] idx) ptr val mem)
  7105  	// result: (FMOVSstoreidx4 ptr idx val mem)
  7106  	for {
  7107  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
  7108  			break
  7109  		}
  7110  		idx := v_0.Args[0]
  7111  		ptr := v_1
  7112  		val := v_2
  7113  		mem := v_3
  7114  		v.reset(OpARM64FMOVSstoreidx4)
  7115  		v.AddArg4(ptr, idx, val, mem)
  7116  		return true
  7117  	}
  7118  	return false
  7119  }
  7120  func rewriteValueARM64_OpARM64FMOVSstoreidx4(v *Value) bool {
  7121  	v_3 := v.Args[3]
  7122  	v_2 := v.Args[2]
  7123  	v_1 := v.Args[1]
  7124  	v_0 := v.Args[0]
  7125  	// match: (FMOVSstoreidx4 ptr (MOVDconst [c]) val mem)
  7126  	// cond: is32Bit(c<<2)
  7127  	// result: (FMOVSstore [int32(c)<<2] ptr val mem)
  7128  	for {
  7129  		ptr := v_0
  7130  		if v_1.Op != OpARM64MOVDconst {
  7131  			break
  7132  		}
  7133  		c := auxIntToInt64(v_1.AuxInt)
  7134  		val := v_2
  7135  		mem := v_3
  7136  		if !(is32Bit(c << 2)) {
  7137  			break
  7138  		}
  7139  		v.reset(OpARM64FMOVSstore)
  7140  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
  7141  		v.AddArg3(ptr, val, mem)
  7142  		return true
  7143  	}
  7144  	return false
  7145  }
  7146  func rewriteValueARM64_OpARM64FMULD(v *Value) bool {
  7147  	v_1 := v.Args[1]
  7148  	v_0 := v.Args[0]
  7149  	// match: (FMULD (FNEGD x) y)
  7150  	// result: (FNMULD x y)
  7151  	for {
  7152  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7153  			if v_0.Op != OpARM64FNEGD {
  7154  				continue
  7155  			}
  7156  			x := v_0.Args[0]
  7157  			y := v_1
  7158  			v.reset(OpARM64FNMULD)
  7159  			v.AddArg2(x, y)
  7160  			return true
  7161  		}
  7162  		break
  7163  	}
  7164  	return false
  7165  }
  7166  func rewriteValueARM64_OpARM64FMULS(v *Value) bool {
  7167  	v_1 := v.Args[1]
  7168  	v_0 := v.Args[0]
  7169  	// match: (FMULS (FNEGS x) y)
  7170  	// result: (FNMULS x y)
  7171  	for {
  7172  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7173  			if v_0.Op != OpARM64FNEGS {
  7174  				continue
  7175  			}
  7176  			x := v_0.Args[0]
  7177  			y := v_1
  7178  			v.reset(OpARM64FNMULS)
  7179  			v.AddArg2(x, y)
  7180  			return true
  7181  		}
  7182  		break
  7183  	}
  7184  	return false
  7185  }
  7186  func rewriteValueARM64_OpARM64FNEGD(v *Value) bool {
  7187  	v_0 := v.Args[0]
  7188  	// match: (FNEGD (FMULD x y))
  7189  	// result: (FNMULD x y)
  7190  	for {
  7191  		if v_0.Op != OpARM64FMULD {
  7192  			break
  7193  		}
  7194  		y := v_0.Args[1]
  7195  		x := v_0.Args[0]
  7196  		v.reset(OpARM64FNMULD)
  7197  		v.AddArg2(x, y)
  7198  		return true
  7199  	}
  7200  	// match: (FNEGD (FNMULD x y))
  7201  	// result: (FMULD x y)
  7202  	for {
  7203  		if v_0.Op != OpARM64FNMULD {
  7204  			break
  7205  		}
  7206  		y := v_0.Args[1]
  7207  		x := v_0.Args[0]
  7208  		v.reset(OpARM64FMULD)
  7209  		v.AddArg2(x, y)
  7210  		return true
  7211  	}
  7212  	return false
  7213  }
  7214  func rewriteValueARM64_OpARM64FNEGS(v *Value) bool {
  7215  	v_0 := v.Args[0]
  7216  	// match: (FNEGS (FMULS x y))
  7217  	// result: (FNMULS x y)
  7218  	for {
  7219  		if v_0.Op != OpARM64FMULS {
  7220  			break
  7221  		}
  7222  		y := v_0.Args[1]
  7223  		x := v_0.Args[0]
  7224  		v.reset(OpARM64FNMULS)
  7225  		v.AddArg2(x, y)
  7226  		return true
  7227  	}
  7228  	// match: (FNEGS (FNMULS x y))
  7229  	// result: (FMULS x y)
  7230  	for {
  7231  		if v_0.Op != OpARM64FNMULS {
  7232  			break
  7233  		}
  7234  		y := v_0.Args[1]
  7235  		x := v_0.Args[0]
  7236  		v.reset(OpARM64FMULS)
  7237  		v.AddArg2(x, y)
  7238  		return true
  7239  	}
  7240  	return false
  7241  }
  7242  func rewriteValueARM64_OpARM64FNMULD(v *Value) bool {
  7243  	v_1 := v.Args[1]
  7244  	v_0 := v.Args[0]
  7245  	// match: (FNMULD (FNEGD x) y)
  7246  	// result: (FMULD x y)
  7247  	for {
  7248  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7249  			if v_0.Op != OpARM64FNEGD {
  7250  				continue
  7251  			}
  7252  			x := v_0.Args[0]
  7253  			y := v_1
  7254  			v.reset(OpARM64FMULD)
  7255  			v.AddArg2(x, y)
  7256  			return true
  7257  		}
  7258  		break
  7259  	}
  7260  	return false
  7261  }
  7262  func rewriteValueARM64_OpARM64FNMULS(v *Value) bool {
  7263  	v_1 := v.Args[1]
  7264  	v_0 := v.Args[0]
  7265  	// match: (FNMULS (FNEGS x) y)
  7266  	// result: (FMULS x y)
  7267  	for {
  7268  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7269  			if v_0.Op != OpARM64FNEGS {
  7270  				continue
  7271  			}
  7272  			x := v_0.Args[0]
  7273  			y := v_1
  7274  			v.reset(OpARM64FMULS)
  7275  			v.AddArg2(x, y)
  7276  			return true
  7277  		}
  7278  		break
  7279  	}
  7280  	return false
  7281  }
  7282  func rewriteValueARM64_OpARM64FSTPQ(v *Value) bool {
  7283  	v_3 := v.Args[3]
  7284  	v_2 := v.Args[2]
  7285  	v_1 := v.Args[1]
  7286  	v_0 := v.Args[0]
  7287  	b := v.Block
  7288  	config := b.Func.Config
  7289  	// match: (FSTPQ [off1] {sym} (ADDconst [off2] ptr) val1 val2 mem)
  7290  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  7291  	// result: (FSTPQ [off1+int32(off2)] {sym} ptr val1 val2 mem)
  7292  	for {
  7293  		off1 := auxIntToInt32(v.AuxInt)
  7294  		sym := auxToSym(v.Aux)
  7295  		if v_0.Op != OpARM64ADDconst {
  7296  			break
  7297  		}
  7298  		off2 := auxIntToInt64(v_0.AuxInt)
  7299  		ptr := v_0.Args[0]
  7300  		val1 := v_1
  7301  		val2 := v_2
  7302  		mem := v_3
  7303  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  7304  			break
  7305  		}
  7306  		v.reset(OpARM64FSTPQ)
  7307  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  7308  		v.Aux = symToAux(sym)
  7309  		v.AddArg4(ptr, val1, val2, mem)
  7310  		return true
  7311  	}
  7312  	// match: (FSTPQ [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val1 val2 mem)
  7313  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  7314  	// result: (FSTPQ [off1+off2] {mergeSym(sym1,sym2)} ptr val1 val2 mem)
  7315  	for {
  7316  		off1 := auxIntToInt32(v.AuxInt)
  7317  		sym1 := auxToSym(v.Aux)
  7318  		if v_0.Op != OpARM64MOVDaddr {
  7319  			break
  7320  		}
  7321  		off2 := auxIntToInt32(v_0.AuxInt)
  7322  		sym2 := auxToSym(v_0.Aux)
  7323  		ptr := v_0.Args[0]
  7324  		val1 := v_1
  7325  		val2 := v_2
  7326  		mem := v_3
  7327  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  7328  			break
  7329  		}
  7330  		v.reset(OpARM64FSTPQ)
  7331  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7332  		v.Aux = symToAux(mergeSym(sym1, sym2))
  7333  		v.AddArg4(ptr, val1, val2, mem)
  7334  		return true
  7335  	}
  7336  	return false
  7337  }
  7338  func rewriteValueARM64_OpARM64FSUBD(v *Value) bool {
  7339  	v_1 := v.Args[1]
  7340  	v_0 := v.Args[0]
  7341  	// match: (FSUBD a (FMULD x y))
  7342  	// cond: a.Block.Func.useFMA(v)
  7343  	// result: (FMSUBD a x y)
  7344  	for {
  7345  		a := v_0
  7346  		if v_1.Op != OpARM64FMULD {
  7347  			break
  7348  		}
  7349  		y := v_1.Args[1]
  7350  		x := v_1.Args[0]
  7351  		if !(a.Block.Func.useFMA(v)) {
  7352  			break
  7353  		}
  7354  		v.reset(OpARM64FMSUBD)
  7355  		v.AddArg3(a, x, y)
  7356  		return true
  7357  	}
  7358  	// match: (FSUBD (FMULD x y) a)
  7359  	// cond: a.Block.Func.useFMA(v)
  7360  	// result: (FNMSUBD a x y)
  7361  	for {
  7362  		if v_0.Op != OpARM64FMULD {
  7363  			break
  7364  		}
  7365  		y := v_0.Args[1]
  7366  		x := v_0.Args[0]
  7367  		a := v_1
  7368  		if !(a.Block.Func.useFMA(v)) {
  7369  			break
  7370  		}
  7371  		v.reset(OpARM64FNMSUBD)
  7372  		v.AddArg3(a, x, y)
  7373  		return true
  7374  	}
  7375  	// match: (FSUBD a (FNMULD x y))
  7376  	// cond: a.Block.Func.useFMA(v)
  7377  	// result: (FMADDD a x y)
  7378  	for {
  7379  		a := v_0
  7380  		if v_1.Op != OpARM64FNMULD {
  7381  			break
  7382  		}
  7383  		y := v_1.Args[1]
  7384  		x := v_1.Args[0]
  7385  		if !(a.Block.Func.useFMA(v)) {
  7386  			break
  7387  		}
  7388  		v.reset(OpARM64FMADDD)
  7389  		v.AddArg3(a, x, y)
  7390  		return true
  7391  	}
  7392  	// match: (FSUBD (FNMULD x y) a)
  7393  	// cond: a.Block.Func.useFMA(v)
  7394  	// result: (FNMADDD a x y)
  7395  	for {
  7396  		if v_0.Op != OpARM64FNMULD {
  7397  			break
  7398  		}
  7399  		y := v_0.Args[1]
  7400  		x := v_0.Args[0]
  7401  		a := v_1
  7402  		if !(a.Block.Func.useFMA(v)) {
  7403  			break
  7404  		}
  7405  		v.reset(OpARM64FNMADDD)
  7406  		v.AddArg3(a, x, y)
  7407  		return true
  7408  	}
  7409  	return false
  7410  }
  7411  func rewriteValueARM64_OpARM64FSUBS(v *Value) bool {
  7412  	v_1 := v.Args[1]
  7413  	v_0 := v.Args[0]
  7414  	// match: (FSUBS a (FMULS x y))
  7415  	// cond: a.Block.Func.useFMA(v)
  7416  	// result: (FMSUBS a x y)
  7417  	for {
  7418  		a := v_0
  7419  		if v_1.Op != OpARM64FMULS {
  7420  			break
  7421  		}
  7422  		y := v_1.Args[1]
  7423  		x := v_1.Args[0]
  7424  		if !(a.Block.Func.useFMA(v)) {
  7425  			break
  7426  		}
  7427  		v.reset(OpARM64FMSUBS)
  7428  		v.AddArg3(a, x, y)
  7429  		return true
  7430  	}
  7431  	// match: (FSUBS (FMULS x y) a)
  7432  	// cond: a.Block.Func.useFMA(v)
  7433  	// result: (FNMSUBS a x y)
  7434  	for {
  7435  		if v_0.Op != OpARM64FMULS {
  7436  			break
  7437  		}
  7438  		y := v_0.Args[1]
  7439  		x := v_0.Args[0]
  7440  		a := v_1
  7441  		if !(a.Block.Func.useFMA(v)) {
  7442  			break
  7443  		}
  7444  		v.reset(OpARM64FNMSUBS)
  7445  		v.AddArg3(a, x, y)
  7446  		return true
  7447  	}
  7448  	// match: (FSUBS a (FNMULS x y))
  7449  	// cond: a.Block.Func.useFMA(v)
  7450  	// result: (FMADDS a x y)
  7451  	for {
  7452  		a := v_0
  7453  		if v_1.Op != OpARM64FNMULS {
  7454  			break
  7455  		}
  7456  		y := v_1.Args[1]
  7457  		x := v_1.Args[0]
  7458  		if !(a.Block.Func.useFMA(v)) {
  7459  			break
  7460  		}
  7461  		v.reset(OpARM64FMADDS)
  7462  		v.AddArg3(a, x, y)
  7463  		return true
  7464  	}
  7465  	// match: (FSUBS (FNMULS x y) a)
  7466  	// cond: a.Block.Func.useFMA(v)
  7467  	// result: (FNMADDS a x y)
  7468  	for {
  7469  		if v_0.Op != OpARM64FNMULS {
  7470  			break
  7471  		}
  7472  		y := v_0.Args[1]
  7473  		x := v_0.Args[0]
  7474  		a := v_1
  7475  		if !(a.Block.Func.useFMA(v)) {
  7476  			break
  7477  		}
  7478  		v.reset(OpARM64FNMADDS)
  7479  		v.AddArg3(a, x, y)
  7480  		return true
  7481  	}
  7482  	return false
  7483  }
  7484  func rewriteValueARM64_OpARM64GreaterEqual(v *Value) bool {
  7485  	v_0 := v.Args[0]
  7486  	b := v.Block
  7487  	// match: (GreaterEqual (CMPconst [0] z:(AND x y)))
  7488  	// cond: z.Uses == 1
  7489  	// result: (GreaterEqual (TST x y))
  7490  	for {
  7491  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  7492  			break
  7493  		}
  7494  		z := v_0.Args[0]
  7495  		if z.Op != OpARM64AND {
  7496  			break
  7497  		}
  7498  		y := z.Args[1]
  7499  		x := z.Args[0]
  7500  		if !(z.Uses == 1) {
  7501  			break
  7502  		}
  7503  		v.reset(OpARM64GreaterEqual)
  7504  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  7505  		v0.AddArg2(x, y)
  7506  		v.AddArg(v0)
  7507  		return true
  7508  	}
  7509  	// match: (GreaterEqual (CMPWconst [0] x:(ANDconst [c] y)))
  7510  	// cond: x.Uses == 1
  7511  	// result: (GreaterEqual (TSTWconst [int32(c)] y))
  7512  	for {
  7513  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  7514  			break
  7515  		}
  7516  		x := v_0.Args[0]
  7517  		if x.Op != OpARM64ANDconst {
  7518  			break
  7519  		}
  7520  		c := auxIntToInt64(x.AuxInt)
  7521  		y := x.Args[0]
  7522  		if !(x.Uses == 1) {
  7523  			break
  7524  		}
  7525  		v.reset(OpARM64GreaterEqual)
  7526  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  7527  		v0.AuxInt = int32ToAuxInt(int32(c))
  7528  		v0.AddArg(y)
  7529  		v.AddArg(v0)
  7530  		return true
  7531  	}
  7532  	// match: (GreaterEqual (CMPWconst [0] z:(AND x y)))
  7533  	// cond: z.Uses == 1
  7534  	// result: (GreaterEqual (TSTW x y))
  7535  	for {
  7536  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  7537  			break
  7538  		}
  7539  		z := v_0.Args[0]
  7540  		if z.Op != OpARM64AND {
  7541  			break
  7542  		}
  7543  		y := z.Args[1]
  7544  		x := z.Args[0]
  7545  		if !(z.Uses == 1) {
  7546  			break
  7547  		}
  7548  		v.reset(OpARM64GreaterEqual)
  7549  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  7550  		v0.AddArg2(x, y)
  7551  		v.AddArg(v0)
  7552  		return true
  7553  	}
  7554  	// match: (GreaterEqual (CMPconst [0] x:(ANDconst [c] y)))
  7555  	// cond: x.Uses == 1
  7556  	// result: (GreaterEqual (TSTconst [c] y))
  7557  	for {
  7558  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  7559  			break
  7560  		}
  7561  		x := v_0.Args[0]
  7562  		if x.Op != OpARM64ANDconst {
  7563  			break
  7564  		}
  7565  		c := auxIntToInt64(x.AuxInt)
  7566  		y := x.Args[0]
  7567  		if !(x.Uses == 1) {
  7568  			break
  7569  		}
  7570  		v.reset(OpARM64GreaterEqual)
  7571  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  7572  		v0.AuxInt = int64ToAuxInt(c)
  7573  		v0.AddArg(y)
  7574  		v.AddArg(v0)
  7575  		return true
  7576  	}
  7577  	// match: (GreaterEqual (CMPconst [0] x:(ADDconst [c] y)))
  7578  	// cond: x.Uses == 1
  7579  	// result: (GreaterEqualNoov (CMNconst [c] y))
  7580  	for {
  7581  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  7582  			break
  7583  		}
  7584  		x := v_0.Args[0]
  7585  		if x.Op != OpARM64ADDconst {
  7586  			break
  7587  		}
  7588  		c := auxIntToInt64(x.AuxInt)
  7589  		y := x.Args[0]
  7590  		if !(x.Uses == 1) {
  7591  			break
  7592  		}
  7593  		v.reset(OpARM64GreaterEqualNoov)
  7594  		v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
  7595  		v0.AuxInt = int64ToAuxInt(c)
  7596  		v0.AddArg(y)
  7597  		v.AddArg(v0)
  7598  		return true
  7599  	}
  7600  	// match: (GreaterEqual (CMPWconst [0] x:(ADDconst [c] y)))
  7601  	// cond: x.Uses == 1
  7602  	// result: (GreaterEqualNoov (CMNWconst [int32(c)] y))
  7603  	for {
  7604  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  7605  			break
  7606  		}
  7607  		x := v_0.Args[0]
  7608  		if x.Op != OpARM64ADDconst {
  7609  			break
  7610  		}
  7611  		c := auxIntToInt64(x.AuxInt)
  7612  		y := x.Args[0]
  7613  		if !(x.Uses == 1) {
  7614  			break
  7615  		}
  7616  		v.reset(OpARM64GreaterEqualNoov)
  7617  		v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
  7618  		v0.AuxInt = int32ToAuxInt(int32(c))
  7619  		v0.AddArg(y)
  7620  		v.AddArg(v0)
  7621  		return true
  7622  	}
  7623  	// match: (GreaterEqual (CMPconst [0] z:(ADD x y)))
  7624  	// cond: z.Uses == 1
  7625  	// result: (GreaterEqualNoov (CMN x y))
  7626  	for {
  7627  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  7628  			break
  7629  		}
  7630  		z := v_0.Args[0]
  7631  		if z.Op != OpARM64ADD {
  7632  			break
  7633  		}
  7634  		y := z.Args[1]
  7635  		x := z.Args[0]
  7636  		if !(z.Uses == 1) {
  7637  			break
  7638  		}
  7639  		v.reset(OpARM64GreaterEqualNoov)
  7640  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  7641  		v0.AddArg2(x, y)
  7642  		v.AddArg(v0)
  7643  		return true
  7644  	}
  7645  	// match: (GreaterEqual (CMPWconst [0] z:(ADD x y)))
  7646  	// cond: z.Uses == 1
  7647  	// result: (GreaterEqualNoov (CMNW x y))
  7648  	for {
  7649  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  7650  			break
  7651  		}
  7652  		z := v_0.Args[0]
  7653  		if z.Op != OpARM64ADD {
  7654  			break
  7655  		}
  7656  		y := z.Args[1]
  7657  		x := z.Args[0]
  7658  		if !(z.Uses == 1) {
  7659  			break
  7660  		}
  7661  		v.reset(OpARM64GreaterEqualNoov)
  7662  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  7663  		v0.AddArg2(x, y)
  7664  		v.AddArg(v0)
  7665  		return true
  7666  	}
  7667  	// match: (GreaterEqual (CMPconst [0] z:(MADD a x y)))
  7668  	// cond: z.Uses == 1
  7669  	// result: (GreaterEqualNoov (CMN a (MUL <x.Type> x y)))
  7670  	for {
  7671  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  7672  			break
  7673  		}
  7674  		z := v_0.Args[0]
  7675  		if z.Op != OpARM64MADD {
  7676  			break
  7677  		}
  7678  		y := z.Args[2]
  7679  		a := z.Args[0]
  7680  		x := z.Args[1]
  7681  		if !(z.Uses == 1) {
  7682  			break
  7683  		}
  7684  		v.reset(OpARM64GreaterEqualNoov)
  7685  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  7686  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  7687  		v1.AddArg2(x, y)
  7688  		v0.AddArg2(a, v1)
  7689  		v.AddArg(v0)
  7690  		return true
  7691  	}
  7692  	// match: (GreaterEqual (CMPWconst [0] z:(MADDW a x y)))
  7693  	// cond: z.Uses == 1
  7694  	// result: (GreaterEqualNoov (CMNW a (MULW <x.Type> x y)))
  7695  	for {
  7696  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  7697  			break
  7698  		}
  7699  		z := v_0.Args[0]
  7700  		if z.Op != OpARM64MADDW {
  7701  			break
  7702  		}
  7703  		y := z.Args[2]
  7704  		a := z.Args[0]
  7705  		x := z.Args[1]
  7706  		if !(z.Uses == 1) {
  7707  			break
  7708  		}
  7709  		v.reset(OpARM64GreaterEqualNoov)
  7710  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  7711  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  7712  		v1.AddArg2(x, y)
  7713  		v0.AddArg2(a, v1)
  7714  		v.AddArg(v0)
  7715  		return true
  7716  	}
  7717  	// match: (GreaterEqual (FlagConstant [fc]))
  7718  	// result: (MOVDconst [b2i(fc.ge())])
  7719  	for {
  7720  		if v_0.Op != OpARM64FlagConstant {
  7721  			break
  7722  		}
  7723  		fc := auxIntToFlagConstant(v_0.AuxInt)
  7724  		v.reset(OpARM64MOVDconst)
  7725  		v.AuxInt = int64ToAuxInt(b2i(fc.ge()))
  7726  		return true
  7727  	}
  7728  	// match: (GreaterEqual (InvertFlags x))
  7729  	// result: (LessEqual x)
  7730  	for {
  7731  		if v_0.Op != OpARM64InvertFlags {
  7732  			break
  7733  		}
  7734  		x := v_0.Args[0]
  7735  		v.reset(OpARM64LessEqual)
  7736  		v.AddArg(x)
  7737  		return true
  7738  	}
  7739  	// match: (GreaterEqual (CMPconst x [0]))
  7740  	// result: (XORconst [1] (SRLconst <v.Type> [63] x))
  7741  	for {
  7742  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  7743  			break
  7744  		}
  7745  		x := v_0.Args[0]
  7746  		v.reset(OpARM64XORconst)
  7747  		v.AuxInt = int64ToAuxInt(1)
  7748  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, v.Type)
  7749  		v0.AuxInt = int64ToAuxInt(63)
  7750  		v0.AddArg(x)
  7751  		v.AddArg(v0)
  7752  		return true
  7753  	}
  7754  	// match: (GreaterEqual (CMPWconst x [0]))
  7755  	// result: (XORconst [1] (UBFX <v.Type> [armBFAuxInt(31,1)] x))
  7756  	for {
  7757  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  7758  			break
  7759  		}
  7760  		x := v_0.Args[0]
  7761  		v.reset(OpARM64XORconst)
  7762  		v.AuxInt = int64ToAuxInt(1)
  7763  		v0 := b.NewValue0(v.Pos, OpARM64UBFX, v.Type)
  7764  		v0.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(31, 1))
  7765  		v0.AddArg(x)
  7766  		v.AddArg(v0)
  7767  		return true
  7768  	}
  7769  	return false
  7770  }
  7771  func rewriteValueARM64_OpARM64GreaterEqualF(v *Value) bool {
  7772  	v_0 := v.Args[0]
  7773  	// match: (GreaterEqualF (InvertFlags x))
  7774  	// result: (LessEqualF x)
  7775  	for {
  7776  		if v_0.Op != OpARM64InvertFlags {
  7777  			break
  7778  		}
  7779  		x := v_0.Args[0]
  7780  		v.reset(OpARM64LessEqualF)
  7781  		v.AddArg(x)
  7782  		return true
  7783  	}
  7784  	return false
  7785  }
  7786  func rewriteValueARM64_OpARM64GreaterEqualNoov(v *Value) bool {
  7787  	v_0 := v.Args[0]
  7788  	// match: (GreaterEqualNoov (FlagConstant [fc]))
  7789  	// result: (MOVDconst [b2i(fc.geNoov())])
  7790  	for {
  7791  		if v_0.Op != OpARM64FlagConstant {
  7792  			break
  7793  		}
  7794  		fc := auxIntToFlagConstant(v_0.AuxInt)
  7795  		v.reset(OpARM64MOVDconst)
  7796  		v.AuxInt = int64ToAuxInt(b2i(fc.geNoov()))
  7797  		return true
  7798  	}
  7799  	return false
  7800  }
  7801  func rewriteValueARM64_OpARM64GreaterEqualU(v *Value) bool {
  7802  	v_0 := v.Args[0]
  7803  	// match: (GreaterEqualU (FlagConstant [fc]))
  7804  	// result: (MOVDconst [b2i(fc.uge())])
  7805  	for {
  7806  		if v_0.Op != OpARM64FlagConstant {
  7807  			break
  7808  		}
  7809  		fc := auxIntToFlagConstant(v_0.AuxInt)
  7810  		v.reset(OpARM64MOVDconst)
  7811  		v.AuxInt = int64ToAuxInt(b2i(fc.uge()))
  7812  		return true
  7813  	}
  7814  	// match: (GreaterEqualU (InvertFlags x))
  7815  	// result: (LessEqualU x)
  7816  	for {
  7817  		if v_0.Op != OpARM64InvertFlags {
  7818  			break
  7819  		}
  7820  		x := v_0.Args[0]
  7821  		v.reset(OpARM64LessEqualU)
  7822  		v.AddArg(x)
  7823  		return true
  7824  	}
  7825  	return false
  7826  }
  7827  func rewriteValueARM64_OpARM64GreaterThan(v *Value) bool {
  7828  	v_0 := v.Args[0]
  7829  	b := v.Block
  7830  	// match: (GreaterThan (CMPconst [0] z:(AND x y)))
  7831  	// cond: z.Uses == 1
  7832  	// result: (GreaterThan (TST x y))
  7833  	for {
  7834  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  7835  			break
  7836  		}
  7837  		z := v_0.Args[0]
  7838  		if z.Op != OpARM64AND {
  7839  			break
  7840  		}
  7841  		y := z.Args[1]
  7842  		x := z.Args[0]
  7843  		if !(z.Uses == 1) {
  7844  			break
  7845  		}
  7846  		v.reset(OpARM64GreaterThan)
  7847  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  7848  		v0.AddArg2(x, y)
  7849  		v.AddArg(v0)
  7850  		return true
  7851  	}
  7852  	// match: (GreaterThan (CMPWconst [0] x:(ANDconst [c] y)))
  7853  	// cond: x.Uses == 1
  7854  	// result: (GreaterThan (TSTWconst [int32(c)] y))
  7855  	for {
  7856  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  7857  			break
  7858  		}
  7859  		x := v_0.Args[0]
  7860  		if x.Op != OpARM64ANDconst {
  7861  			break
  7862  		}
  7863  		c := auxIntToInt64(x.AuxInt)
  7864  		y := x.Args[0]
  7865  		if !(x.Uses == 1) {
  7866  			break
  7867  		}
  7868  		v.reset(OpARM64GreaterThan)
  7869  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  7870  		v0.AuxInt = int32ToAuxInt(int32(c))
  7871  		v0.AddArg(y)
  7872  		v.AddArg(v0)
  7873  		return true
  7874  	}
  7875  	// match: (GreaterThan (CMPWconst [0] z:(AND x y)))
  7876  	// cond: z.Uses == 1
  7877  	// result: (GreaterThan (TSTW x y))
  7878  	for {
  7879  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  7880  			break
  7881  		}
  7882  		z := v_0.Args[0]
  7883  		if z.Op != OpARM64AND {
  7884  			break
  7885  		}
  7886  		y := z.Args[1]
  7887  		x := z.Args[0]
  7888  		if !(z.Uses == 1) {
  7889  			break
  7890  		}
  7891  		v.reset(OpARM64GreaterThan)
  7892  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  7893  		v0.AddArg2(x, y)
  7894  		v.AddArg(v0)
  7895  		return true
  7896  	}
  7897  	// match: (GreaterThan (CMPconst [0] x:(ANDconst [c] y)))
  7898  	// cond: x.Uses == 1
  7899  	// result: (GreaterThan (TSTconst [c] y))
  7900  	for {
  7901  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  7902  			break
  7903  		}
  7904  		x := v_0.Args[0]
  7905  		if x.Op != OpARM64ANDconst {
  7906  			break
  7907  		}
  7908  		c := auxIntToInt64(x.AuxInt)
  7909  		y := x.Args[0]
  7910  		if !(x.Uses == 1) {
  7911  			break
  7912  		}
  7913  		v.reset(OpARM64GreaterThan)
  7914  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  7915  		v0.AuxInt = int64ToAuxInt(c)
  7916  		v0.AddArg(y)
  7917  		v.AddArg(v0)
  7918  		return true
  7919  	}
  7920  	// match: (GreaterThan (FlagConstant [fc]))
  7921  	// result: (MOVDconst [b2i(fc.gt())])
  7922  	for {
  7923  		if v_0.Op != OpARM64FlagConstant {
  7924  			break
  7925  		}
  7926  		fc := auxIntToFlagConstant(v_0.AuxInt)
  7927  		v.reset(OpARM64MOVDconst)
  7928  		v.AuxInt = int64ToAuxInt(b2i(fc.gt()))
  7929  		return true
  7930  	}
  7931  	// match: (GreaterThan (InvertFlags x))
  7932  	// result: (LessThan x)
  7933  	for {
  7934  		if v_0.Op != OpARM64InvertFlags {
  7935  			break
  7936  		}
  7937  		x := v_0.Args[0]
  7938  		v.reset(OpARM64LessThan)
  7939  		v.AddArg(x)
  7940  		return true
  7941  	}
  7942  	return false
  7943  }
  7944  func rewriteValueARM64_OpARM64GreaterThanF(v *Value) bool {
  7945  	v_0 := v.Args[0]
  7946  	// match: (GreaterThanF (InvertFlags x))
  7947  	// result: (LessThanF x)
  7948  	for {
  7949  		if v_0.Op != OpARM64InvertFlags {
  7950  			break
  7951  		}
  7952  		x := v_0.Args[0]
  7953  		v.reset(OpARM64LessThanF)
  7954  		v.AddArg(x)
  7955  		return true
  7956  	}
  7957  	return false
  7958  }
  7959  func rewriteValueARM64_OpARM64GreaterThanU(v *Value) bool {
  7960  	v_0 := v.Args[0]
  7961  	// match: (GreaterThanU (FlagConstant [fc]))
  7962  	// result: (MOVDconst [b2i(fc.ugt())])
  7963  	for {
  7964  		if v_0.Op != OpARM64FlagConstant {
  7965  			break
  7966  		}
  7967  		fc := auxIntToFlagConstant(v_0.AuxInt)
  7968  		v.reset(OpARM64MOVDconst)
  7969  		v.AuxInt = int64ToAuxInt(b2i(fc.ugt()))
  7970  		return true
  7971  	}
  7972  	// match: (GreaterThanU (InvertFlags x))
  7973  	// result: (LessThanU x)
  7974  	for {
  7975  		if v_0.Op != OpARM64InvertFlags {
  7976  			break
  7977  		}
  7978  		x := v_0.Args[0]
  7979  		v.reset(OpARM64LessThanU)
  7980  		v.AddArg(x)
  7981  		return true
  7982  	}
  7983  	return false
  7984  }
  7985  func rewriteValueARM64_OpARM64LDP(v *Value) bool {
  7986  	v_1 := v.Args[1]
  7987  	v_0 := v.Args[0]
  7988  	b := v.Block
  7989  	config := b.Func.Config
  7990  	// match: (LDP [off1] {sym} (ADDconst [off2] ptr) mem)
  7991  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  7992  	// result: (LDP [off1+int32(off2)] {sym} ptr mem)
  7993  	for {
  7994  		off1 := auxIntToInt32(v.AuxInt)
  7995  		sym := auxToSym(v.Aux)
  7996  		if v_0.Op != OpARM64ADDconst {
  7997  			break
  7998  		}
  7999  		off2 := auxIntToInt64(v_0.AuxInt)
  8000  		ptr := v_0.Args[0]
  8001  		mem := v_1
  8002  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  8003  			break
  8004  		}
  8005  		v.reset(OpARM64LDP)
  8006  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  8007  		v.Aux = symToAux(sym)
  8008  		v.AddArg2(ptr, mem)
  8009  		return true
  8010  	}
  8011  	// match: (LDP [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  8012  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  8013  	// result: (LDP [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  8014  	for {
  8015  		off1 := auxIntToInt32(v.AuxInt)
  8016  		sym1 := auxToSym(v.Aux)
  8017  		if v_0.Op != OpARM64MOVDaddr {
  8018  			break
  8019  		}
  8020  		off2 := auxIntToInt32(v_0.AuxInt)
  8021  		sym2 := auxToSym(v_0.Aux)
  8022  		ptr := v_0.Args[0]
  8023  		mem := v_1
  8024  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  8025  			break
  8026  		}
  8027  		v.reset(OpARM64LDP)
  8028  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8029  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8030  		v.AddArg2(ptr, mem)
  8031  		return true
  8032  	}
  8033  	return false
  8034  }
  8035  func rewriteValueARM64_OpARM64LessEqual(v *Value) bool {
  8036  	v_0 := v.Args[0]
  8037  	b := v.Block
  8038  	// match: (LessEqual (CMPconst [0] z:(AND x y)))
  8039  	// cond: z.Uses == 1
  8040  	// result: (LessEqual (TST x y))
  8041  	for {
  8042  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  8043  			break
  8044  		}
  8045  		z := v_0.Args[0]
  8046  		if z.Op != OpARM64AND {
  8047  			break
  8048  		}
  8049  		y := z.Args[1]
  8050  		x := z.Args[0]
  8051  		if !(z.Uses == 1) {
  8052  			break
  8053  		}
  8054  		v.reset(OpARM64LessEqual)
  8055  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  8056  		v0.AddArg2(x, y)
  8057  		v.AddArg(v0)
  8058  		return true
  8059  	}
  8060  	// match: (LessEqual (CMPWconst [0] x:(ANDconst [c] y)))
  8061  	// cond: x.Uses == 1
  8062  	// result: (LessEqual (TSTWconst [int32(c)] y))
  8063  	for {
  8064  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  8065  			break
  8066  		}
  8067  		x := v_0.Args[0]
  8068  		if x.Op != OpARM64ANDconst {
  8069  			break
  8070  		}
  8071  		c := auxIntToInt64(x.AuxInt)
  8072  		y := x.Args[0]
  8073  		if !(x.Uses == 1) {
  8074  			break
  8075  		}
  8076  		v.reset(OpARM64LessEqual)
  8077  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  8078  		v0.AuxInt = int32ToAuxInt(int32(c))
  8079  		v0.AddArg(y)
  8080  		v.AddArg(v0)
  8081  		return true
  8082  	}
  8083  	// match: (LessEqual (CMPWconst [0] z:(AND x y)))
  8084  	// cond: z.Uses == 1
  8085  	// result: (LessEqual (TSTW x y))
  8086  	for {
  8087  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  8088  			break
  8089  		}
  8090  		z := v_0.Args[0]
  8091  		if z.Op != OpARM64AND {
  8092  			break
  8093  		}
  8094  		y := z.Args[1]
  8095  		x := z.Args[0]
  8096  		if !(z.Uses == 1) {
  8097  			break
  8098  		}
  8099  		v.reset(OpARM64LessEqual)
  8100  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  8101  		v0.AddArg2(x, y)
  8102  		v.AddArg(v0)
  8103  		return true
  8104  	}
  8105  	// match: (LessEqual (CMPconst [0] x:(ANDconst [c] y)))
  8106  	// cond: x.Uses == 1
  8107  	// result: (LessEqual (TSTconst [c] y))
  8108  	for {
  8109  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  8110  			break
  8111  		}
  8112  		x := v_0.Args[0]
  8113  		if x.Op != OpARM64ANDconst {
  8114  			break
  8115  		}
  8116  		c := auxIntToInt64(x.AuxInt)
  8117  		y := x.Args[0]
  8118  		if !(x.Uses == 1) {
  8119  			break
  8120  		}
  8121  		v.reset(OpARM64LessEqual)
  8122  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  8123  		v0.AuxInt = int64ToAuxInt(c)
  8124  		v0.AddArg(y)
  8125  		v.AddArg(v0)
  8126  		return true
  8127  	}
  8128  	// match: (LessEqual (FlagConstant [fc]))
  8129  	// result: (MOVDconst [b2i(fc.le())])
  8130  	for {
  8131  		if v_0.Op != OpARM64FlagConstant {
  8132  			break
  8133  		}
  8134  		fc := auxIntToFlagConstant(v_0.AuxInt)
  8135  		v.reset(OpARM64MOVDconst)
  8136  		v.AuxInt = int64ToAuxInt(b2i(fc.le()))
  8137  		return true
  8138  	}
  8139  	// match: (LessEqual (InvertFlags x))
  8140  	// result: (GreaterEqual x)
  8141  	for {
  8142  		if v_0.Op != OpARM64InvertFlags {
  8143  			break
  8144  		}
  8145  		x := v_0.Args[0]
  8146  		v.reset(OpARM64GreaterEqual)
  8147  		v.AddArg(x)
  8148  		return true
  8149  	}
  8150  	return false
  8151  }
  8152  func rewriteValueARM64_OpARM64LessEqualF(v *Value) bool {
  8153  	v_0 := v.Args[0]
  8154  	// match: (LessEqualF (InvertFlags x))
  8155  	// result: (GreaterEqualF x)
  8156  	for {
  8157  		if v_0.Op != OpARM64InvertFlags {
  8158  			break
  8159  		}
  8160  		x := v_0.Args[0]
  8161  		v.reset(OpARM64GreaterEqualF)
  8162  		v.AddArg(x)
  8163  		return true
  8164  	}
  8165  	return false
  8166  }
  8167  func rewriteValueARM64_OpARM64LessEqualU(v *Value) bool {
  8168  	v_0 := v.Args[0]
  8169  	// match: (LessEqualU (FlagConstant [fc]))
  8170  	// result: (MOVDconst [b2i(fc.ule())])
  8171  	for {
  8172  		if v_0.Op != OpARM64FlagConstant {
  8173  			break
  8174  		}
  8175  		fc := auxIntToFlagConstant(v_0.AuxInt)
  8176  		v.reset(OpARM64MOVDconst)
  8177  		v.AuxInt = int64ToAuxInt(b2i(fc.ule()))
  8178  		return true
  8179  	}
  8180  	// match: (LessEqualU (InvertFlags x))
  8181  	// result: (GreaterEqualU x)
  8182  	for {
  8183  		if v_0.Op != OpARM64InvertFlags {
  8184  			break
  8185  		}
  8186  		x := v_0.Args[0]
  8187  		v.reset(OpARM64GreaterEqualU)
  8188  		v.AddArg(x)
  8189  		return true
  8190  	}
  8191  	return false
  8192  }
  8193  func rewriteValueARM64_OpARM64LessThan(v *Value) bool {
  8194  	v_0 := v.Args[0]
  8195  	b := v.Block
  8196  	// match: (LessThan (CMPconst [0] z:(AND x y)))
  8197  	// cond: z.Uses == 1
  8198  	// result: (LessThan (TST x y))
  8199  	for {
  8200  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  8201  			break
  8202  		}
  8203  		z := v_0.Args[0]
  8204  		if z.Op != OpARM64AND {
  8205  			break
  8206  		}
  8207  		y := z.Args[1]
  8208  		x := z.Args[0]
  8209  		if !(z.Uses == 1) {
  8210  			break
  8211  		}
  8212  		v.reset(OpARM64LessThan)
  8213  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  8214  		v0.AddArg2(x, y)
  8215  		v.AddArg(v0)
  8216  		return true
  8217  	}
  8218  	// match: (LessThan (CMPWconst [0] x:(ANDconst [c] y)))
  8219  	// cond: x.Uses == 1
  8220  	// result: (LessThan (TSTWconst [int32(c)] y))
  8221  	for {
  8222  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  8223  			break
  8224  		}
  8225  		x := v_0.Args[0]
  8226  		if x.Op != OpARM64ANDconst {
  8227  			break
  8228  		}
  8229  		c := auxIntToInt64(x.AuxInt)
  8230  		y := x.Args[0]
  8231  		if !(x.Uses == 1) {
  8232  			break
  8233  		}
  8234  		v.reset(OpARM64LessThan)
  8235  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  8236  		v0.AuxInt = int32ToAuxInt(int32(c))
  8237  		v0.AddArg(y)
  8238  		v.AddArg(v0)
  8239  		return true
  8240  	}
  8241  	// match: (LessThan (CMPWconst [0] z:(AND x y)))
  8242  	// cond: z.Uses == 1
  8243  	// result: (LessThan (TSTW x y))
  8244  	for {
  8245  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  8246  			break
  8247  		}
  8248  		z := v_0.Args[0]
  8249  		if z.Op != OpARM64AND {
  8250  			break
  8251  		}
  8252  		y := z.Args[1]
  8253  		x := z.Args[0]
  8254  		if !(z.Uses == 1) {
  8255  			break
  8256  		}
  8257  		v.reset(OpARM64LessThan)
  8258  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  8259  		v0.AddArg2(x, y)
  8260  		v.AddArg(v0)
  8261  		return true
  8262  	}
  8263  	// match: (LessThan (CMPconst [0] x:(ANDconst [c] y)))
  8264  	// cond: x.Uses == 1
  8265  	// result: (LessThan (TSTconst [c] y))
  8266  	for {
  8267  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  8268  			break
  8269  		}
  8270  		x := v_0.Args[0]
  8271  		if x.Op != OpARM64ANDconst {
  8272  			break
  8273  		}
  8274  		c := auxIntToInt64(x.AuxInt)
  8275  		y := x.Args[0]
  8276  		if !(x.Uses == 1) {
  8277  			break
  8278  		}
  8279  		v.reset(OpARM64LessThan)
  8280  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  8281  		v0.AuxInt = int64ToAuxInt(c)
  8282  		v0.AddArg(y)
  8283  		v.AddArg(v0)
  8284  		return true
  8285  	}
  8286  	// match: (LessThan (CMPconst [0] x:(ADDconst [c] y)))
  8287  	// cond: x.Uses == 1
  8288  	// result: (LessThanNoov (CMNconst [c] y))
  8289  	for {
  8290  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  8291  			break
  8292  		}
  8293  		x := v_0.Args[0]
  8294  		if x.Op != OpARM64ADDconst {
  8295  			break
  8296  		}
  8297  		c := auxIntToInt64(x.AuxInt)
  8298  		y := x.Args[0]
  8299  		if !(x.Uses == 1) {
  8300  			break
  8301  		}
  8302  		v.reset(OpARM64LessThanNoov)
  8303  		v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
  8304  		v0.AuxInt = int64ToAuxInt(c)
  8305  		v0.AddArg(y)
  8306  		v.AddArg(v0)
  8307  		return true
  8308  	}
  8309  	// match: (LessThan (CMPWconst [0] x:(ADDconst [c] y)))
  8310  	// cond: x.Uses == 1
  8311  	// result: (LessThanNoov (CMNWconst [int32(c)] y))
  8312  	for {
  8313  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  8314  			break
  8315  		}
  8316  		x := v_0.Args[0]
  8317  		if x.Op != OpARM64ADDconst {
  8318  			break
  8319  		}
  8320  		c := auxIntToInt64(x.AuxInt)
  8321  		y := x.Args[0]
  8322  		if !(x.Uses == 1) {
  8323  			break
  8324  		}
  8325  		v.reset(OpARM64LessThanNoov)
  8326  		v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
  8327  		v0.AuxInt = int32ToAuxInt(int32(c))
  8328  		v0.AddArg(y)
  8329  		v.AddArg(v0)
  8330  		return true
  8331  	}
  8332  	// match: (LessThan (CMPconst [0] z:(ADD x y)))
  8333  	// cond: z.Uses == 1
  8334  	// result: (LessThanNoov (CMN x y))
  8335  	for {
  8336  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  8337  			break
  8338  		}
  8339  		z := v_0.Args[0]
  8340  		if z.Op != OpARM64ADD {
  8341  			break
  8342  		}
  8343  		y := z.Args[1]
  8344  		x := z.Args[0]
  8345  		if !(z.Uses == 1) {
  8346  			break
  8347  		}
  8348  		v.reset(OpARM64LessThanNoov)
  8349  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  8350  		v0.AddArg2(x, y)
  8351  		v.AddArg(v0)
  8352  		return true
  8353  	}
  8354  	// match: (LessThan (CMPWconst [0] z:(ADD x y)))
  8355  	// cond: z.Uses == 1
  8356  	// result: (LessThanNoov (CMNW x y))
  8357  	for {
  8358  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  8359  			break
  8360  		}
  8361  		z := v_0.Args[0]
  8362  		if z.Op != OpARM64ADD {
  8363  			break
  8364  		}
  8365  		y := z.Args[1]
  8366  		x := z.Args[0]
  8367  		if !(z.Uses == 1) {
  8368  			break
  8369  		}
  8370  		v.reset(OpARM64LessThanNoov)
  8371  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  8372  		v0.AddArg2(x, y)
  8373  		v.AddArg(v0)
  8374  		return true
  8375  	}
  8376  	// match: (LessThan (CMPconst [0] z:(MADD a x y)))
  8377  	// cond: z.Uses == 1
  8378  	// result: (LessThanNoov (CMN a (MUL <x.Type> x y)))
  8379  	for {
  8380  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  8381  			break
  8382  		}
  8383  		z := v_0.Args[0]
  8384  		if z.Op != OpARM64MADD {
  8385  			break
  8386  		}
  8387  		y := z.Args[2]
  8388  		a := z.Args[0]
  8389  		x := z.Args[1]
  8390  		if !(z.Uses == 1) {
  8391  			break
  8392  		}
  8393  		v.reset(OpARM64LessThanNoov)
  8394  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  8395  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  8396  		v1.AddArg2(x, y)
  8397  		v0.AddArg2(a, v1)
  8398  		v.AddArg(v0)
  8399  		return true
  8400  	}
  8401  	// match: (LessThan (CMPWconst [0] z:(MADDW a x y)))
  8402  	// cond: z.Uses == 1
  8403  	// result: (LessThanNoov (CMNW a (MULW <x.Type> x y)))
  8404  	for {
  8405  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  8406  			break
  8407  		}
  8408  		z := v_0.Args[0]
  8409  		if z.Op != OpARM64MADDW {
  8410  			break
  8411  		}
  8412  		y := z.Args[2]
  8413  		a := z.Args[0]
  8414  		x := z.Args[1]
  8415  		if !(z.Uses == 1) {
  8416  			break
  8417  		}
  8418  		v.reset(OpARM64LessThanNoov)
  8419  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  8420  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  8421  		v1.AddArg2(x, y)
  8422  		v0.AddArg2(a, v1)
  8423  		v.AddArg(v0)
  8424  		return true
  8425  	}
  8426  	// match: (LessThan (FlagConstant [fc]))
  8427  	// result: (MOVDconst [b2i(fc.lt())])
  8428  	for {
  8429  		if v_0.Op != OpARM64FlagConstant {
  8430  			break
  8431  		}
  8432  		fc := auxIntToFlagConstant(v_0.AuxInt)
  8433  		v.reset(OpARM64MOVDconst)
  8434  		v.AuxInt = int64ToAuxInt(b2i(fc.lt()))
  8435  		return true
  8436  	}
  8437  	// match: (LessThan (InvertFlags x))
  8438  	// result: (GreaterThan x)
  8439  	for {
  8440  		if v_0.Op != OpARM64InvertFlags {
  8441  			break
  8442  		}
  8443  		x := v_0.Args[0]
  8444  		v.reset(OpARM64GreaterThan)
  8445  		v.AddArg(x)
  8446  		return true
  8447  	}
  8448  	// match: (LessThan (CMPconst x [0]))
  8449  	// result: (SRLconst [63] x)
  8450  	for {
  8451  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  8452  			break
  8453  		}
  8454  		x := v_0.Args[0]
  8455  		v.reset(OpARM64SRLconst)
  8456  		v.AuxInt = int64ToAuxInt(63)
  8457  		v.AddArg(x)
  8458  		return true
  8459  	}
  8460  	// match: (LessThan (CMPWconst x [0]))
  8461  	// result: (UBFX [armBFAuxInt(31,1)] x)
  8462  	for {
  8463  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  8464  			break
  8465  		}
  8466  		x := v_0.Args[0]
  8467  		v.reset(OpARM64UBFX)
  8468  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(31, 1))
  8469  		v.AddArg(x)
  8470  		return true
  8471  	}
  8472  	return false
  8473  }
  8474  func rewriteValueARM64_OpARM64LessThanF(v *Value) bool {
  8475  	v_0 := v.Args[0]
  8476  	// match: (LessThanF (InvertFlags x))
  8477  	// result: (GreaterThanF x)
  8478  	for {
  8479  		if v_0.Op != OpARM64InvertFlags {
  8480  			break
  8481  		}
  8482  		x := v_0.Args[0]
  8483  		v.reset(OpARM64GreaterThanF)
  8484  		v.AddArg(x)
  8485  		return true
  8486  	}
  8487  	return false
  8488  }
  8489  func rewriteValueARM64_OpARM64LessThanNoov(v *Value) bool {
  8490  	v_0 := v.Args[0]
  8491  	// match: (LessThanNoov (FlagConstant [fc]))
  8492  	// result: (MOVDconst [b2i(fc.ltNoov())])
  8493  	for {
  8494  		if v_0.Op != OpARM64FlagConstant {
  8495  			break
  8496  		}
  8497  		fc := auxIntToFlagConstant(v_0.AuxInt)
  8498  		v.reset(OpARM64MOVDconst)
  8499  		v.AuxInt = int64ToAuxInt(b2i(fc.ltNoov()))
  8500  		return true
  8501  	}
  8502  	return false
  8503  }
  8504  func rewriteValueARM64_OpARM64LessThanU(v *Value) bool {
  8505  	v_0 := v.Args[0]
  8506  	// match: (LessThanU (FlagConstant [fc]))
  8507  	// result: (MOVDconst [b2i(fc.ult())])
  8508  	for {
  8509  		if v_0.Op != OpARM64FlagConstant {
  8510  			break
  8511  		}
  8512  		fc := auxIntToFlagConstant(v_0.AuxInt)
  8513  		v.reset(OpARM64MOVDconst)
  8514  		v.AuxInt = int64ToAuxInt(b2i(fc.ult()))
  8515  		return true
  8516  	}
  8517  	// match: (LessThanU (InvertFlags x))
  8518  	// result: (GreaterThanU x)
  8519  	for {
  8520  		if v_0.Op != OpARM64InvertFlags {
  8521  			break
  8522  		}
  8523  		x := v_0.Args[0]
  8524  		v.reset(OpARM64GreaterThanU)
  8525  		v.AddArg(x)
  8526  		return true
  8527  	}
  8528  	return false
  8529  }
  8530  func rewriteValueARM64_OpARM64LoweredPanicBoundsCR(v *Value) bool {
  8531  	v_1 := v.Args[1]
  8532  	v_0 := v.Args[0]
  8533  	// match: (LoweredPanicBoundsCR [kind] {p} (MOVDconst [c]) mem)
  8534  	// result: (LoweredPanicBoundsCC [kind] {PanicBoundsCC{Cx:p.C, Cy:c}} mem)
  8535  	for {
  8536  		kind := auxIntToInt64(v.AuxInt)
  8537  		p := auxToPanicBoundsC(v.Aux)
  8538  		if v_0.Op != OpARM64MOVDconst {
  8539  			break
  8540  		}
  8541  		c := auxIntToInt64(v_0.AuxInt)
  8542  		mem := v_1
  8543  		v.reset(OpARM64LoweredPanicBoundsCC)
  8544  		v.AuxInt = int64ToAuxInt(kind)
  8545  		v.Aux = panicBoundsCCToAux(PanicBoundsCC{Cx: p.C, Cy: c})
  8546  		v.AddArg(mem)
  8547  		return true
  8548  	}
  8549  	return false
  8550  }
  8551  func rewriteValueARM64_OpARM64LoweredPanicBoundsRC(v *Value) bool {
  8552  	v_1 := v.Args[1]
  8553  	v_0 := v.Args[0]
  8554  	// match: (LoweredPanicBoundsRC [kind] {p} (MOVDconst [c]) mem)
  8555  	// result: (LoweredPanicBoundsCC [kind] {PanicBoundsCC{Cx:c, Cy:p.C}} mem)
  8556  	for {
  8557  		kind := auxIntToInt64(v.AuxInt)
  8558  		p := auxToPanicBoundsC(v.Aux)
  8559  		if v_0.Op != OpARM64MOVDconst {
  8560  			break
  8561  		}
  8562  		c := auxIntToInt64(v_0.AuxInt)
  8563  		mem := v_1
  8564  		v.reset(OpARM64LoweredPanicBoundsCC)
  8565  		v.AuxInt = int64ToAuxInt(kind)
  8566  		v.Aux = panicBoundsCCToAux(PanicBoundsCC{Cx: c, Cy: p.C})
  8567  		v.AddArg(mem)
  8568  		return true
  8569  	}
  8570  	return false
  8571  }
  8572  func rewriteValueARM64_OpARM64LoweredPanicBoundsRR(v *Value) bool {
  8573  	v_2 := v.Args[2]
  8574  	v_1 := v.Args[1]
  8575  	v_0 := v.Args[0]
  8576  	// match: (LoweredPanicBoundsRR [kind] x (MOVDconst [c]) mem)
  8577  	// result: (LoweredPanicBoundsRC [kind] x {PanicBoundsC{C:c}} mem)
  8578  	for {
  8579  		kind := auxIntToInt64(v.AuxInt)
  8580  		x := v_0
  8581  		if v_1.Op != OpARM64MOVDconst {
  8582  			break
  8583  		}
  8584  		c := auxIntToInt64(v_1.AuxInt)
  8585  		mem := v_2
  8586  		v.reset(OpARM64LoweredPanicBoundsRC)
  8587  		v.AuxInt = int64ToAuxInt(kind)
  8588  		v.Aux = panicBoundsCToAux(PanicBoundsC{C: c})
  8589  		v.AddArg2(x, mem)
  8590  		return true
  8591  	}
  8592  	// match: (LoweredPanicBoundsRR [kind] (MOVDconst [c]) y mem)
  8593  	// result: (LoweredPanicBoundsCR [kind] {PanicBoundsC{C:c}} y mem)
  8594  	for {
  8595  		kind := auxIntToInt64(v.AuxInt)
  8596  		if v_0.Op != OpARM64MOVDconst {
  8597  			break
  8598  		}
  8599  		c := auxIntToInt64(v_0.AuxInt)
  8600  		y := v_1
  8601  		mem := v_2
  8602  		v.reset(OpARM64LoweredPanicBoundsCR)
  8603  		v.AuxInt = int64ToAuxInt(kind)
  8604  		v.Aux = panicBoundsCToAux(PanicBoundsC{C: c})
  8605  		v.AddArg2(y, mem)
  8606  		return true
  8607  	}
  8608  	return false
  8609  }
  8610  func rewriteValueARM64_OpARM64MADD(v *Value) bool {
  8611  	v_2 := v.Args[2]
  8612  	v_1 := v.Args[1]
  8613  	v_0 := v.Args[0]
  8614  	b := v.Block
  8615  	// match: (MADD a x (MOVDconst [-1]))
  8616  	// result: (SUB a x)
  8617  	for {
  8618  		a := v_0
  8619  		x := v_1
  8620  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != -1 {
  8621  			break
  8622  		}
  8623  		v.reset(OpARM64SUB)
  8624  		v.AddArg2(a, x)
  8625  		return true
  8626  	}
  8627  	// match: (MADD a _ (MOVDconst [0]))
  8628  	// result: a
  8629  	for {
  8630  		a := v_0
  8631  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 0 {
  8632  			break
  8633  		}
  8634  		v.copyOf(a)
  8635  		return true
  8636  	}
  8637  	// match: (MADD a x (MOVDconst [1]))
  8638  	// result: (ADD a x)
  8639  	for {
  8640  		a := v_0
  8641  		x := v_1
  8642  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 1 {
  8643  			break
  8644  		}
  8645  		v.reset(OpARM64ADD)
  8646  		v.AddArg2(a, x)
  8647  		return true
  8648  	}
  8649  	// match: (MADD a x (MOVDconst [c]))
  8650  	// cond: isPowerOfTwo(c)
  8651  	// result: (ADDshiftLL a x [log64(c)])
  8652  	for {
  8653  		a := v_0
  8654  		x := v_1
  8655  		if v_2.Op != OpARM64MOVDconst {
  8656  			break
  8657  		}
  8658  		c := auxIntToInt64(v_2.AuxInt)
  8659  		if !(isPowerOfTwo(c)) {
  8660  			break
  8661  		}
  8662  		v.reset(OpARM64ADDshiftLL)
  8663  		v.AuxInt = int64ToAuxInt(log64(c))
  8664  		v.AddArg2(a, x)
  8665  		return true
  8666  	}
  8667  	// match: (MADD a x (MOVDconst [c]))
  8668  	// cond: isPowerOfTwo(c-1) && c>=3
  8669  	// result: (ADD a (ADDshiftLL <x.Type> x x [log64(c-1)]))
  8670  	for {
  8671  		a := v_0
  8672  		x := v_1
  8673  		if v_2.Op != OpARM64MOVDconst {
  8674  			break
  8675  		}
  8676  		c := auxIntToInt64(v_2.AuxInt)
  8677  		if !(isPowerOfTwo(c-1) && c >= 3) {
  8678  			break
  8679  		}
  8680  		v.reset(OpARM64ADD)
  8681  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8682  		v0.AuxInt = int64ToAuxInt(log64(c - 1))
  8683  		v0.AddArg2(x, x)
  8684  		v.AddArg2(a, v0)
  8685  		return true
  8686  	}
  8687  	// match: (MADD a x (MOVDconst [c]))
  8688  	// cond: isPowerOfTwo(c+1) && c>=7
  8689  	// result: (SUB a (SUBshiftLL <x.Type> x x [log64(c+1)]))
  8690  	for {
  8691  		a := v_0
  8692  		x := v_1
  8693  		if v_2.Op != OpARM64MOVDconst {
  8694  			break
  8695  		}
  8696  		c := auxIntToInt64(v_2.AuxInt)
  8697  		if !(isPowerOfTwo(c+1) && c >= 7) {
  8698  			break
  8699  		}
  8700  		v.reset(OpARM64SUB)
  8701  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8702  		v0.AuxInt = int64ToAuxInt(log64(c + 1))
  8703  		v0.AddArg2(x, x)
  8704  		v.AddArg2(a, v0)
  8705  		return true
  8706  	}
  8707  	// match: (MADD a x (MOVDconst [c]))
  8708  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
  8709  	// result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
  8710  	for {
  8711  		a := v_0
  8712  		x := v_1
  8713  		if v_2.Op != OpARM64MOVDconst {
  8714  			break
  8715  		}
  8716  		c := auxIntToInt64(v_2.AuxInt)
  8717  		if !(c%3 == 0 && isPowerOfTwo(c/3)) {
  8718  			break
  8719  		}
  8720  		v.reset(OpARM64SUBshiftLL)
  8721  		v.AuxInt = int64ToAuxInt(log64(c / 3))
  8722  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8723  		v0.AuxInt = int64ToAuxInt(2)
  8724  		v0.AddArg2(x, x)
  8725  		v.AddArg2(a, v0)
  8726  		return true
  8727  	}
  8728  	// match: (MADD a x (MOVDconst [c]))
  8729  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
  8730  	// result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
  8731  	for {
  8732  		a := v_0
  8733  		x := v_1
  8734  		if v_2.Op != OpARM64MOVDconst {
  8735  			break
  8736  		}
  8737  		c := auxIntToInt64(v_2.AuxInt)
  8738  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
  8739  			break
  8740  		}
  8741  		v.reset(OpARM64ADDshiftLL)
  8742  		v.AuxInt = int64ToAuxInt(log64(c / 5))
  8743  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8744  		v0.AuxInt = int64ToAuxInt(2)
  8745  		v0.AddArg2(x, x)
  8746  		v.AddArg2(a, v0)
  8747  		return true
  8748  	}
  8749  	// match: (MADD a x (MOVDconst [c]))
  8750  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
  8751  	// result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
  8752  	for {
  8753  		a := v_0
  8754  		x := v_1
  8755  		if v_2.Op != OpARM64MOVDconst {
  8756  			break
  8757  		}
  8758  		c := auxIntToInt64(v_2.AuxInt)
  8759  		if !(c%7 == 0 && isPowerOfTwo(c/7)) {
  8760  			break
  8761  		}
  8762  		v.reset(OpARM64SUBshiftLL)
  8763  		v.AuxInt = int64ToAuxInt(log64(c / 7))
  8764  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8765  		v0.AuxInt = int64ToAuxInt(3)
  8766  		v0.AddArg2(x, x)
  8767  		v.AddArg2(a, v0)
  8768  		return true
  8769  	}
  8770  	// match: (MADD a x (MOVDconst [c]))
  8771  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
  8772  	// result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
  8773  	for {
  8774  		a := v_0
  8775  		x := v_1
  8776  		if v_2.Op != OpARM64MOVDconst {
  8777  			break
  8778  		}
  8779  		c := auxIntToInt64(v_2.AuxInt)
  8780  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
  8781  			break
  8782  		}
  8783  		v.reset(OpARM64ADDshiftLL)
  8784  		v.AuxInt = int64ToAuxInt(log64(c / 9))
  8785  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8786  		v0.AuxInt = int64ToAuxInt(3)
  8787  		v0.AddArg2(x, x)
  8788  		v.AddArg2(a, v0)
  8789  		return true
  8790  	}
  8791  	// match: (MADD a (MOVDconst [-1]) x)
  8792  	// result: (SUB a x)
  8793  	for {
  8794  		a := v_0
  8795  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
  8796  			break
  8797  		}
  8798  		x := v_2
  8799  		v.reset(OpARM64SUB)
  8800  		v.AddArg2(a, x)
  8801  		return true
  8802  	}
  8803  	// match: (MADD a (MOVDconst [0]) _)
  8804  	// result: a
  8805  	for {
  8806  		a := v_0
  8807  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  8808  			break
  8809  		}
  8810  		v.copyOf(a)
  8811  		return true
  8812  	}
  8813  	// match: (MADD a (MOVDconst [1]) x)
  8814  	// result: (ADD a x)
  8815  	for {
  8816  		a := v_0
  8817  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
  8818  			break
  8819  		}
  8820  		x := v_2
  8821  		v.reset(OpARM64ADD)
  8822  		v.AddArg2(a, x)
  8823  		return true
  8824  	}
  8825  	// match: (MADD a (MOVDconst [c]) x)
  8826  	// cond: isPowerOfTwo(c)
  8827  	// result: (ADDshiftLL a x [log64(c)])
  8828  	for {
  8829  		a := v_0
  8830  		if v_1.Op != OpARM64MOVDconst {
  8831  			break
  8832  		}
  8833  		c := auxIntToInt64(v_1.AuxInt)
  8834  		x := v_2
  8835  		if !(isPowerOfTwo(c)) {
  8836  			break
  8837  		}
  8838  		v.reset(OpARM64ADDshiftLL)
  8839  		v.AuxInt = int64ToAuxInt(log64(c))
  8840  		v.AddArg2(a, x)
  8841  		return true
  8842  	}
  8843  	// match: (MADD a (MOVDconst [c]) x)
  8844  	// cond: isPowerOfTwo(c-1) && c>=3
  8845  	// result: (ADD a (ADDshiftLL <x.Type> x x [log64(c-1)]))
  8846  	for {
  8847  		a := v_0
  8848  		if v_1.Op != OpARM64MOVDconst {
  8849  			break
  8850  		}
  8851  		c := auxIntToInt64(v_1.AuxInt)
  8852  		x := v_2
  8853  		if !(isPowerOfTwo(c-1) && c >= 3) {
  8854  			break
  8855  		}
  8856  		v.reset(OpARM64ADD)
  8857  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8858  		v0.AuxInt = int64ToAuxInt(log64(c - 1))
  8859  		v0.AddArg2(x, x)
  8860  		v.AddArg2(a, v0)
  8861  		return true
  8862  	}
  8863  	// match: (MADD a (MOVDconst [c]) x)
  8864  	// cond: isPowerOfTwo(c+1) && c>=7
  8865  	// result: (SUB a (SUBshiftLL <x.Type> x x [log64(c+1)]))
  8866  	for {
  8867  		a := v_0
  8868  		if v_1.Op != OpARM64MOVDconst {
  8869  			break
  8870  		}
  8871  		c := auxIntToInt64(v_1.AuxInt)
  8872  		x := v_2
  8873  		if !(isPowerOfTwo(c+1) && c >= 7) {
  8874  			break
  8875  		}
  8876  		v.reset(OpARM64SUB)
  8877  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8878  		v0.AuxInt = int64ToAuxInt(log64(c + 1))
  8879  		v0.AddArg2(x, x)
  8880  		v.AddArg2(a, v0)
  8881  		return true
  8882  	}
  8883  	// match: (MADD a (MOVDconst [c]) x)
  8884  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
  8885  	// result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
  8886  	for {
  8887  		a := v_0
  8888  		if v_1.Op != OpARM64MOVDconst {
  8889  			break
  8890  		}
  8891  		c := auxIntToInt64(v_1.AuxInt)
  8892  		x := v_2
  8893  		if !(c%3 == 0 && isPowerOfTwo(c/3)) {
  8894  			break
  8895  		}
  8896  		v.reset(OpARM64SUBshiftLL)
  8897  		v.AuxInt = int64ToAuxInt(log64(c / 3))
  8898  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8899  		v0.AuxInt = int64ToAuxInt(2)
  8900  		v0.AddArg2(x, x)
  8901  		v.AddArg2(a, v0)
  8902  		return true
  8903  	}
  8904  	// match: (MADD a (MOVDconst [c]) x)
  8905  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
  8906  	// result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
  8907  	for {
  8908  		a := v_0
  8909  		if v_1.Op != OpARM64MOVDconst {
  8910  			break
  8911  		}
  8912  		c := auxIntToInt64(v_1.AuxInt)
  8913  		x := v_2
  8914  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
  8915  			break
  8916  		}
  8917  		v.reset(OpARM64ADDshiftLL)
  8918  		v.AuxInt = int64ToAuxInt(log64(c / 5))
  8919  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8920  		v0.AuxInt = int64ToAuxInt(2)
  8921  		v0.AddArg2(x, x)
  8922  		v.AddArg2(a, v0)
  8923  		return true
  8924  	}
  8925  	// match: (MADD a (MOVDconst [c]) x)
  8926  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
  8927  	// result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
  8928  	for {
  8929  		a := v_0
  8930  		if v_1.Op != OpARM64MOVDconst {
  8931  			break
  8932  		}
  8933  		c := auxIntToInt64(v_1.AuxInt)
  8934  		x := v_2
  8935  		if !(c%7 == 0 && isPowerOfTwo(c/7)) {
  8936  			break
  8937  		}
  8938  		v.reset(OpARM64SUBshiftLL)
  8939  		v.AuxInt = int64ToAuxInt(log64(c / 7))
  8940  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8941  		v0.AuxInt = int64ToAuxInt(3)
  8942  		v0.AddArg2(x, x)
  8943  		v.AddArg2(a, v0)
  8944  		return true
  8945  	}
  8946  	// match: (MADD a (MOVDconst [c]) x)
  8947  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
  8948  	// result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
  8949  	for {
  8950  		a := v_0
  8951  		if v_1.Op != OpARM64MOVDconst {
  8952  			break
  8953  		}
  8954  		c := auxIntToInt64(v_1.AuxInt)
  8955  		x := v_2
  8956  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
  8957  			break
  8958  		}
  8959  		v.reset(OpARM64ADDshiftLL)
  8960  		v.AuxInt = int64ToAuxInt(log64(c / 9))
  8961  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8962  		v0.AuxInt = int64ToAuxInt(3)
  8963  		v0.AddArg2(x, x)
  8964  		v.AddArg2(a, v0)
  8965  		return true
  8966  	}
  8967  	// match: (MADD (MOVDconst [c]) x y)
  8968  	// result: (ADDconst [c] (MUL <x.Type> x y))
  8969  	for {
  8970  		if v_0.Op != OpARM64MOVDconst {
  8971  			break
  8972  		}
  8973  		c := auxIntToInt64(v_0.AuxInt)
  8974  		x := v_1
  8975  		y := v_2
  8976  		v.reset(OpARM64ADDconst)
  8977  		v.AuxInt = int64ToAuxInt(c)
  8978  		v0 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  8979  		v0.AddArg2(x, y)
  8980  		v.AddArg(v0)
  8981  		return true
  8982  	}
  8983  	// match: (MADD a (MOVDconst [c]) (MOVDconst [d]))
  8984  	// result: (ADDconst [c*d] a)
  8985  	for {
  8986  		a := v_0
  8987  		if v_1.Op != OpARM64MOVDconst {
  8988  			break
  8989  		}
  8990  		c := auxIntToInt64(v_1.AuxInt)
  8991  		if v_2.Op != OpARM64MOVDconst {
  8992  			break
  8993  		}
  8994  		d := auxIntToInt64(v_2.AuxInt)
  8995  		v.reset(OpARM64ADDconst)
  8996  		v.AuxInt = int64ToAuxInt(c * d)
  8997  		v.AddArg(a)
  8998  		return true
  8999  	}
  9000  	return false
  9001  }
  9002  func rewriteValueARM64_OpARM64MADDW(v *Value) bool {
  9003  	v_2 := v.Args[2]
  9004  	v_1 := v.Args[1]
  9005  	v_0 := v.Args[0]
  9006  	b := v.Block
  9007  	// match: (MADDW a x (MOVDconst [c]))
  9008  	// cond: int32(c)==-1
  9009  	// result: (MOVWUreg (SUB <a.Type> a x))
  9010  	for {
  9011  		a := v_0
  9012  		x := v_1
  9013  		if v_2.Op != OpARM64MOVDconst {
  9014  			break
  9015  		}
  9016  		c := auxIntToInt64(v_2.AuxInt)
  9017  		if !(int32(c) == -1) {
  9018  			break
  9019  		}
  9020  		v.reset(OpARM64MOVWUreg)
  9021  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
  9022  		v0.AddArg2(a, x)
  9023  		v.AddArg(v0)
  9024  		return true
  9025  	}
  9026  	// match: (MADDW a _ (MOVDconst [c]))
  9027  	// cond: int32(c)==0
  9028  	// result: (MOVWUreg a)
  9029  	for {
  9030  		a := v_0
  9031  		if v_2.Op != OpARM64MOVDconst {
  9032  			break
  9033  		}
  9034  		c := auxIntToInt64(v_2.AuxInt)
  9035  		if !(int32(c) == 0) {
  9036  			break
  9037  		}
  9038  		v.reset(OpARM64MOVWUreg)
  9039  		v.AddArg(a)
  9040  		return true
  9041  	}
  9042  	// match: (MADDW a x (MOVDconst [c]))
  9043  	// cond: int32(c)==1
  9044  	// result: (MOVWUreg (ADD <a.Type> a x))
  9045  	for {
  9046  		a := v_0
  9047  		x := v_1
  9048  		if v_2.Op != OpARM64MOVDconst {
  9049  			break
  9050  		}
  9051  		c := auxIntToInt64(v_2.AuxInt)
  9052  		if !(int32(c) == 1) {
  9053  			break
  9054  		}
  9055  		v.reset(OpARM64MOVWUreg)
  9056  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
  9057  		v0.AddArg2(a, x)
  9058  		v.AddArg(v0)
  9059  		return true
  9060  	}
  9061  	// match: (MADDW a x (MOVDconst [c]))
  9062  	// cond: isPowerOfTwo(c)
  9063  	// result: (MOVWUreg (ADDshiftLL <a.Type> a x [log64(c)]))
  9064  	for {
  9065  		a := v_0
  9066  		x := v_1
  9067  		if v_2.Op != OpARM64MOVDconst {
  9068  			break
  9069  		}
  9070  		c := auxIntToInt64(v_2.AuxInt)
  9071  		if !(isPowerOfTwo(c)) {
  9072  			break
  9073  		}
  9074  		v.reset(OpARM64MOVWUreg)
  9075  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  9076  		v0.AuxInt = int64ToAuxInt(log64(c))
  9077  		v0.AddArg2(a, x)
  9078  		v.AddArg(v0)
  9079  		return true
  9080  	}
  9081  	// match: (MADDW a x (MOVDconst [c]))
  9082  	// cond: isPowerOfTwo(c-1) && int32(c)>=3
  9083  	// result: (MOVWUreg (ADD <a.Type> a (ADDshiftLL <x.Type> x x [log64(c-1)])))
  9084  	for {
  9085  		a := v_0
  9086  		x := v_1
  9087  		if v_2.Op != OpARM64MOVDconst {
  9088  			break
  9089  		}
  9090  		c := auxIntToInt64(v_2.AuxInt)
  9091  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
  9092  			break
  9093  		}
  9094  		v.reset(OpARM64MOVWUreg)
  9095  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
  9096  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9097  		v1.AuxInt = int64ToAuxInt(log64(c - 1))
  9098  		v1.AddArg2(x, x)
  9099  		v0.AddArg2(a, v1)
  9100  		v.AddArg(v0)
  9101  		return true
  9102  	}
  9103  	// match: (MADDW a x (MOVDconst [c]))
  9104  	// cond: isPowerOfTwo(c+1) && int32(c)>=7
  9105  	// result: (MOVWUreg (SUB <a.Type> a (SUBshiftLL <x.Type> x x [log64(c+1)])))
  9106  	for {
  9107  		a := v_0
  9108  		x := v_1
  9109  		if v_2.Op != OpARM64MOVDconst {
  9110  			break
  9111  		}
  9112  		c := auxIntToInt64(v_2.AuxInt)
  9113  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
  9114  			break
  9115  		}
  9116  		v.reset(OpARM64MOVWUreg)
  9117  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
  9118  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  9119  		v1.AuxInt = int64ToAuxInt(log64(c + 1))
  9120  		v1.AddArg2(x, x)
  9121  		v0.AddArg2(a, v1)
  9122  		v.AddArg(v0)
  9123  		return true
  9124  	}
  9125  	// match: (MADDW a x (MOVDconst [c]))
  9126  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
  9127  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)]))
  9128  	for {
  9129  		a := v_0
  9130  		x := v_1
  9131  		if v_2.Op != OpARM64MOVDconst {
  9132  			break
  9133  		}
  9134  		c := auxIntToInt64(v_2.AuxInt)
  9135  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
  9136  			break
  9137  		}
  9138  		v.reset(OpARM64MOVWUreg)
  9139  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
  9140  		v0.AuxInt = int64ToAuxInt(log64(c / 3))
  9141  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  9142  		v1.AuxInt = int64ToAuxInt(2)
  9143  		v1.AddArg2(x, x)
  9144  		v0.AddArg2(a, v1)
  9145  		v.AddArg(v0)
  9146  		return true
  9147  	}
  9148  	// match: (MADDW a x (MOVDconst [c]))
  9149  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
  9150  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)]))
  9151  	for {
  9152  		a := v_0
  9153  		x := v_1
  9154  		if v_2.Op != OpARM64MOVDconst {
  9155  			break
  9156  		}
  9157  		c := auxIntToInt64(v_2.AuxInt)
  9158  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
  9159  			break
  9160  		}
  9161  		v.reset(OpARM64MOVWUreg)
  9162  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  9163  		v0.AuxInt = int64ToAuxInt(log64(c / 5))
  9164  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9165  		v1.AuxInt = int64ToAuxInt(2)
  9166  		v1.AddArg2(x, x)
  9167  		v0.AddArg2(a, v1)
  9168  		v.AddArg(v0)
  9169  		return true
  9170  	}
  9171  	// match: (MADDW a x (MOVDconst [c]))
  9172  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
  9173  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)]))
  9174  	for {
  9175  		a := v_0
  9176  		x := v_1
  9177  		if v_2.Op != OpARM64MOVDconst {
  9178  			break
  9179  		}
  9180  		c := auxIntToInt64(v_2.AuxInt)
  9181  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
  9182  			break
  9183  		}
  9184  		v.reset(OpARM64MOVWUreg)
  9185  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
  9186  		v0.AuxInt = int64ToAuxInt(log64(c / 7))
  9187  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  9188  		v1.AuxInt = int64ToAuxInt(3)
  9189  		v1.AddArg2(x, x)
  9190  		v0.AddArg2(a, v1)
  9191  		v.AddArg(v0)
  9192  		return true
  9193  	}
  9194  	// match: (MADDW a x (MOVDconst [c]))
  9195  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
  9196  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)]))
  9197  	for {
  9198  		a := v_0
  9199  		x := v_1
  9200  		if v_2.Op != OpARM64MOVDconst {
  9201  			break
  9202  		}
  9203  		c := auxIntToInt64(v_2.AuxInt)
  9204  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
  9205  			break
  9206  		}
  9207  		v.reset(OpARM64MOVWUreg)
  9208  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  9209  		v0.AuxInt = int64ToAuxInt(log64(c / 9))
  9210  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9211  		v1.AuxInt = int64ToAuxInt(3)
  9212  		v1.AddArg2(x, x)
  9213  		v0.AddArg2(a, v1)
  9214  		v.AddArg(v0)
  9215  		return true
  9216  	}
  9217  	// match: (MADDW a (MOVDconst [c]) x)
  9218  	// cond: int32(c)==-1
  9219  	// result: (MOVWUreg (SUB <a.Type> a x))
  9220  	for {
  9221  		a := v_0
  9222  		if v_1.Op != OpARM64MOVDconst {
  9223  			break
  9224  		}
  9225  		c := auxIntToInt64(v_1.AuxInt)
  9226  		x := v_2
  9227  		if !(int32(c) == -1) {
  9228  			break
  9229  		}
  9230  		v.reset(OpARM64MOVWUreg)
  9231  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
  9232  		v0.AddArg2(a, x)
  9233  		v.AddArg(v0)
  9234  		return true
  9235  	}
  9236  	// match: (MADDW a (MOVDconst [c]) _)
  9237  	// cond: int32(c)==0
  9238  	// result: (MOVWUreg a)
  9239  	for {
  9240  		a := v_0
  9241  		if v_1.Op != OpARM64MOVDconst {
  9242  			break
  9243  		}
  9244  		c := auxIntToInt64(v_1.AuxInt)
  9245  		if !(int32(c) == 0) {
  9246  			break
  9247  		}
  9248  		v.reset(OpARM64MOVWUreg)
  9249  		v.AddArg(a)
  9250  		return true
  9251  	}
  9252  	// match: (MADDW a (MOVDconst [c]) x)
  9253  	// cond: int32(c)==1
  9254  	// result: (MOVWUreg (ADD <a.Type> a x))
  9255  	for {
  9256  		a := v_0
  9257  		if v_1.Op != OpARM64MOVDconst {
  9258  			break
  9259  		}
  9260  		c := auxIntToInt64(v_1.AuxInt)
  9261  		x := v_2
  9262  		if !(int32(c) == 1) {
  9263  			break
  9264  		}
  9265  		v.reset(OpARM64MOVWUreg)
  9266  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
  9267  		v0.AddArg2(a, x)
  9268  		v.AddArg(v0)
  9269  		return true
  9270  	}
  9271  	// match: (MADDW a (MOVDconst [c]) x)
  9272  	// cond: isPowerOfTwo(c)
  9273  	// result: (MOVWUreg (ADDshiftLL <a.Type> a x [log64(c)]))
  9274  	for {
  9275  		a := v_0
  9276  		if v_1.Op != OpARM64MOVDconst {
  9277  			break
  9278  		}
  9279  		c := auxIntToInt64(v_1.AuxInt)
  9280  		x := v_2
  9281  		if !(isPowerOfTwo(c)) {
  9282  			break
  9283  		}
  9284  		v.reset(OpARM64MOVWUreg)
  9285  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  9286  		v0.AuxInt = int64ToAuxInt(log64(c))
  9287  		v0.AddArg2(a, x)
  9288  		v.AddArg(v0)
  9289  		return true
  9290  	}
  9291  	// match: (MADDW a (MOVDconst [c]) x)
  9292  	// cond: isPowerOfTwo(c-1) && int32(c)>=3
  9293  	// result: (MOVWUreg (ADD <a.Type> a (ADDshiftLL <x.Type> x x [log64(c-1)])))
  9294  	for {
  9295  		a := v_0
  9296  		if v_1.Op != OpARM64MOVDconst {
  9297  			break
  9298  		}
  9299  		c := auxIntToInt64(v_1.AuxInt)
  9300  		x := v_2
  9301  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
  9302  			break
  9303  		}
  9304  		v.reset(OpARM64MOVWUreg)
  9305  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
  9306  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9307  		v1.AuxInt = int64ToAuxInt(log64(c - 1))
  9308  		v1.AddArg2(x, x)
  9309  		v0.AddArg2(a, v1)
  9310  		v.AddArg(v0)
  9311  		return true
  9312  	}
  9313  	// match: (MADDW a (MOVDconst [c]) x)
  9314  	// cond: isPowerOfTwo(c+1) && int32(c)>=7
  9315  	// result: (MOVWUreg (SUB <a.Type> a (SUBshiftLL <x.Type> x x [log64(c+1)])))
  9316  	for {
  9317  		a := v_0
  9318  		if v_1.Op != OpARM64MOVDconst {
  9319  			break
  9320  		}
  9321  		c := auxIntToInt64(v_1.AuxInt)
  9322  		x := v_2
  9323  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
  9324  			break
  9325  		}
  9326  		v.reset(OpARM64MOVWUreg)
  9327  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
  9328  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  9329  		v1.AuxInt = int64ToAuxInt(log64(c + 1))
  9330  		v1.AddArg2(x, x)
  9331  		v0.AddArg2(a, v1)
  9332  		v.AddArg(v0)
  9333  		return true
  9334  	}
  9335  	// match: (MADDW a (MOVDconst [c]) x)
  9336  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
  9337  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)]))
  9338  	for {
  9339  		a := v_0
  9340  		if v_1.Op != OpARM64MOVDconst {
  9341  			break
  9342  		}
  9343  		c := auxIntToInt64(v_1.AuxInt)
  9344  		x := v_2
  9345  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
  9346  			break
  9347  		}
  9348  		v.reset(OpARM64MOVWUreg)
  9349  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
  9350  		v0.AuxInt = int64ToAuxInt(log64(c / 3))
  9351  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  9352  		v1.AuxInt = int64ToAuxInt(2)
  9353  		v1.AddArg2(x, x)
  9354  		v0.AddArg2(a, v1)
  9355  		v.AddArg(v0)
  9356  		return true
  9357  	}
  9358  	// match: (MADDW a (MOVDconst [c]) x)
  9359  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
  9360  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)]))
  9361  	for {
  9362  		a := v_0
  9363  		if v_1.Op != OpARM64MOVDconst {
  9364  			break
  9365  		}
  9366  		c := auxIntToInt64(v_1.AuxInt)
  9367  		x := v_2
  9368  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
  9369  			break
  9370  		}
  9371  		v.reset(OpARM64MOVWUreg)
  9372  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  9373  		v0.AuxInt = int64ToAuxInt(log64(c / 5))
  9374  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9375  		v1.AuxInt = int64ToAuxInt(2)
  9376  		v1.AddArg2(x, x)
  9377  		v0.AddArg2(a, v1)
  9378  		v.AddArg(v0)
  9379  		return true
  9380  	}
  9381  	// match: (MADDW a (MOVDconst [c]) x)
  9382  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
  9383  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)]))
  9384  	for {
  9385  		a := v_0
  9386  		if v_1.Op != OpARM64MOVDconst {
  9387  			break
  9388  		}
  9389  		c := auxIntToInt64(v_1.AuxInt)
  9390  		x := v_2
  9391  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
  9392  			break
  9393  		}
  9394  		v.reset(OpARM64MOVWUreg)
  9395  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
  9396  		v0.AuxInt = int64ToAuxInt(log64(c / 7))
  9397  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  9398  		v1.AuxInt = int64ToAuxInt(3)
  9399  		v1.AddArg2(x, x)
  9400  		v0.AddArg2(a, v1)
  9401  		v.AddArg(v0)
  9402  		return true
  9403  	}
  9404  	// match: (MADDW a (MOVDconst [c]) x)
  9405  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
  9406  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)]))
  9407  	for {
  9408  		a := v_0
  9409  		if v_1.Op != OpARM64MOVDconst {
  9410  			break
  9411  		}
  9412  		c := auxIntToInt64(v_1.AuxInt)
  9413  		x := v_2
  9414  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
  9415  			break
  9416  		}
  9417  		v.reset(OpARM64MOVWUreg)
  9418  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  9419  		v0.AuxInt = int64ToAuxInt(log64(c / 9))
  9420  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9421  		v1.AuxInt = int64ToAuxInt(3)
  9422  		v1.AddArg2(x, x)
  9423  		v0.AddArg2(a, v1)
  9424  		v.AddArg(v0)
  9425  		return true
  9426  	}
  9427  	// match: (MADDW (MOVDconst [c]) x y)
  9428  	// result: (MOVWUreg (ADDconst <x.Type> [c] (MULW <x.Type> x y)))
  9429  	for {
  9430  		if v_0.Op != OpARM64MOVDconst {
  9431  			break
  9432  		}
  9433  		c := auxIntToInt64(v_0.AuxInt)
  9434  		x := v_1
  9435  		y := v_2
  9436  		v.reset(OpARM64MOVWUreg)
  9437  		v0 := b.NewValue0(v.Pos, OpARM64ADDconst, x.Type)
  9438  		v0.AuxInt = int64ToAuxInt(c)
  9439  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  9440  		v1.AddArg2(x, y)
  9441  		v0.AddArg(v1)
  9442  		v.AddArg(v0)
  9443  		return true
  9444  	}
  9445  	// match: (MADDW a (MOVDconst [c]) (MOVDconst [d]))
  9446  	// result: (MOVWUreg (ADDconst <a.Type> [c*d] a))
  9447  	for {
  9448  		a := v_0
  9449  		if v_1.Op != OpARM64MOVDconst {
  9450  			break
  9451  		}
  9452  		c := auxIntToInt64(v_1.AuxInt)
  9453  		if v_2.Op != OpARM64MOVDconst {
  9454  			break
  9455  		}
  9456  		d := auxIntToInt64(v_2.AuxInt)
  9457  		v.reset(OpARM64MOVWUreg)
  9458  		v0 := b.NewValue0(v.Pos, OpARM64ADDconst, a.Type)
  9459  		v0.AuxInt = int64ToAuxInt(c * d)
  9460  		v0.AddArg(a)
  9461  		v.AddArg(v0)
  9462  		return true
  9463  	}
  9464  	return false
  9465  }
  9466  func rewriteValueARM64_OpARM64MNEG(v *Value) bool {
  9467  	v_1 := v.Args[1]
  9468  	v_0 := v.Args[0]
  9469  	b := v.Block
  9470  	// match: (MNEG x (MOVDconst [-1]))
  9471  	// result: x
  9472  	for {
  9473  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9474  			x := v_0
  9475  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
  9476  				continue
  9477  			}
  9478  			v.copyOf(x)
  9479  			return true
  9480  		}
  9481  		break
  9482  	}
  9483  	// match: (MNEG _ (MOVDconst [0]))
  9484  	// result: (MOVDconst [0])
  9485  	for {
  9486  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9487  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  9488  				continue
  9489  			}
  9490  			v.reset(OpARM64MOVDconst)
  9491  			v.AuxInt = int64ToAuxInt(0)
  9492  			return true
  9493  		}
  9494  		break
  9495  	}
  9496  	// match: (MNEG x (MOVDconst [1]))
  9497  	// result: (NEG x)
  9498  	for {
  9499  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9500  			x := v_0
  9501  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
  9502  				continue
  9503  			}
  9504  			v.reset(OpARM64NEG)
  9505  			v.AddArg(x)
  9506  			return true
  9507  		}
  9508  		break
  9509  	}
  9510  	// match: (MNEG x (MOVDconst [c]))
  9511  	// cond: isPowerOfTwo(c)
  9512  	// result: (NEG (SLLconst <x.Type> [log64(c)] x))
  9513  	for {
  9514  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9515  			x := v_0
  9516  			if v_1.Op != OpARM64MOVDconst {
  9517  				continue
  9518  			}
  9519  			c := auxIntToInt64(v_1.AuxInt)
  9520  			if !(isPowerOfTwo(c)) {
  9521  				continue
  9522  			}
  9523  			v.reset(OpARM64NEG)
  9524  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  9525  			v0.AuxInt = int64ToAuxInt(log64(c))
  9526  			v0.AddArg(x)
  9527  			v.AddArg(v0)
  9528  			return true
  9529  		}
  9530  		break
  9531  	}
  9532  	// match: (MNEG x (MOVDconst [c]))
  9533  	// cond: isPowerOfTwo(c-1) && c >= 3
  9534  	// result: (NEG (ADDshiftLL <x.Type> x x [log64(c-1)]))
  9535  	for {
  9536  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9537  			x := v_0
  9538  			if v_1.Op != OpARM64MOVDconst {
  9539  				continue
  9540  			}
  9541  			c := auxIntToInt64(v_1.AuxInt)
  9542  			if !(isPowerOfTwo(c-1) && c >= 3) {
  9543  				continue
  9544  			}
  9545  			v.reset(OpARM64NEG)
  9546  			v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9547  			v0.AuxInt = int64ToAuxInt(log64(c - 1))
  9548  			v0.AddArg2(x, x)
  9549  			v.AddArg(v0)
  9550  			return true
  9551  		}
  9552  		break
  9553  	}
  9554  	// match: (MNEG x (MOVDconst [c]))
  9555  	// cond: isPowerOfTwo(c+1) && c >= 7
  9556  	// result: (NEG (ADDshiftLL <x.Type> (NEG <x.Type> x) x [log64(c+1)]))
  9557  	for {
  9558  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9559  			x := v_0
  9560  			if v_1.Op != OpARM64MOVDconst {
  9561  				continue
  9562  			}
  9563  			c := auxIntToInt64(v_1.AuxInt)
  9564  			if !(isPowerOfTwo(c+1) && c >= 7) {
  9565  				continue
  9566  			}
  9567  			v.reset(OpARM64NEG)
  9568  			v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9569  			v0.AuxInt = int64ToAuxInt(log64(c + 1))
  9570  			v1 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  9571  			v1.AddArg(x)
  9572  			v0.AddArg2(v1, x)
  9573  			v.AddArg(v0)
  9574  			return true
  9575  		}
  9576  		break
  9577  	}
  9578  	// match: (MNEG x (MOVDconst [c]))
  9579  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
  9580  	// result: (SLLconst <x.Type> [log64(c/3)] (SUBshiftLL <x.Type> x x [2]))
  9581  	for {
  9582  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9583  			x := v_0
  9584  			if v_1.Op != OpARM64MOVDconst {
  9585  				continue
  9586  			}
  9587  			c := auxIntToInt64(v_1.AuxInt)
  9588  			if !(c%3 == 0 && isPowerOfTwo(c/3)) {
  9589  				continue
  9590  			}
  9591  			v.reset(OpARM64SLLconst)
  9592  			v.Type = x.Type
  9593  			v.AuxInt = int64ToAuxInt(log64(c / 3))
  9594  			v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  9595  			v0.AuxInt = int64ToAuxInt(2)
  9596  			v0.AddArg2(x, x)
  9597  			v.AddArg(v0)
  9598  			return true
  9599  		}
  9600  		break
  9601  	}
  9602  	// match: (MNEG x (MOVDconst [c]))
  9603  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
  9604  	// result: (NEG (SLLconst <x.Type> [log64(c/5)] (ADDshiftLL <x.Type> x x [2])))
  9605  	for {
  9606  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9607  			x := v_0
  9608  			if v_1.Op != OpARM64MOVDconst {
  9609  				continue
  9610  			}
  9611  			c := auxIntToInt64(v_1.AuxInt)
  9612  			if !(c%5 == 0 && isPowerOfTwo(c/5)) {
  9613  				continue
  9614  			}
  9615  			v.reset(OpARM64NEG)
  9616  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  9617  			v0.AuxInt = int64ToAuxInt(log64(c / 5))
  9618  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9619  			v1.AuxInt = int64ToAuxInt(2)
  9620  			v1.AddArg2(x, x)
  9621  			v0.AddArg(v1)
  9622  			v.AddArg(v0)
  9623  			return true
  9624  		}
  9625  		break
  9626  	}
  9627  	// match: (MNEG x (MOVDconst [c]))
  9628  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
  9629  	// result: (SLLconst <x.Type> [log64(c/7)] (SUBshiftLL <x.Type> x x [3]))
  9630  	for {
  9631  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9632  			x := v_0
  9633  			if v_1.Op != OpARM64MOVDconst {
  9634  				continue
  9635  			}
  9636  			c := auxIntToInt64(v_1.AuxInt)
  9637  			if !(c%7 == 0 && isPowerOfTwo(c/7)) {
  9638  				continue
  9639  			}
  9640  			v.reset(OpARM64SLLconst)
  9641  			v.Type = x.Type
  9642  			v.AuxInt = int64ToAuxInt(log64(c / 7))
  9643  			v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  9644  			v0.AuxInt = int64ToAuxInt(3)
  9645  			v0.AddArg2(x, x)
  9646  			v.AddArg(v0)
  9647  			return true
  9648  		}
  9649  		break
  9650  	}
  9651  	// match: (MNEG x (MOVDconst [c]))
  9652  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
  9653  	// result: (NEG (SLLconst <x.Type> [log64(c/9)] (ADDshiftLL <x.Type> x x [3])))
  9654  	for {
  9655  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9656  			x := v_0
  9657  			if v_1.Op != OpARM64MOVDconst {
  9658  				continue
  9659  			}
  9660  			c := auxIntToInt64(v_1.AuxInt)
  9661  			if !(c%9 == 0 && isPowerOfTwo(c/9)) {
  9662  				continue
  9663  			}
  9664  			v.reset(OpARM64NEG)
  9665  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  9666  			v0.AuxInt = int64ToAuxInt(log64(c / 9))
  9667  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9668  			v1.AuxInt = int64ToAuxInt(3)
  9669  			v1.AddArg2(x, x)
  9670  			v0.AddArg(v1)
  9671  			v.AddArg(v0)
  9672  			return true
  9673  		}
  9674  		break
  9675  	}
  9676  	// match: (MNEG (MOVDconst [c]) (MOVDconst [d]))
  9677  	// result: (MOVDconst [-c*d])
  9678  	for {
  9679  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9680  			if v_0.Op != OpARM64MOVDconst {
  9681  				continue
  9682  			}
  9683  			c := auxIntToInt64(v_0.AuxInt)
  9684  			if v_1.Op != OpARM64MOVDconst {
  9685  				continue
  9686  			}
  9687  			d := auxIntToInt64(v_1.AuxInt)
  9688  			v.reset(OpARM64MOVDconst)
  9689  			v.AuxInt = int64ToAuxInt(-c * d)
  9690  			return true
  9691  		}
  9692  		break
  9693  	}
  9694  	return false
  9695  }
  9696  func rewriteValueARM64_OpARM64MNEGW(v *Value) bool {
  9697  	v_1 := v.Args[1]
  9698  	v_0 := v.Args[0]
  9699  	b := v.Block
  9700  	// match: (MNEGW x (MOVDconst [c]))
  9701  	// cond: int32(c)==-1
  9702  	// result: (MOVWUreg x)
  9703  	for {
  9704  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9705  			x := v_0
  9706  			if v_1.Op != OpARM64MOVDconst {
  9707  				continue
  9708  			}
  9709  			c := auxIntToInt64(v_1.AuxInt)
  9710  			if !(int32(c) == -1) {
  9711  				continue
  9712  			}
  9713  			v.reset(OpARM64MOVWUreg)
  9714  			v.AddArg(x)
  9715  			return true
  9716  		}
  9717  		break
  9718  	}
  9719  	// match: (MNEGW _ (MOVDconst [c]))
  9720  	// cond: int32(c)==0
  9721  	// result: (MOVDconst [0])
  9722  	for {
  9723  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9724  			if v_1.Op != OpARM64MOVDconst {
  9725  				continue
  9726  			}
  9727  			c := auxIntToInt64(v_1.AuxInt)
  9728  			if !(int32(c) == 0) {
  9729  				continue
  9730  			}
  9731  			v.reset(OpARM64MOVDconst)
  9732  			v.AuxInt = int64ToAuxInt(0)
  9733  			return true
  9734  		}
  9735  		break
  9736  	}
  9737  	// match: (MNEGW x (MOVDconst [c]))
  9738  	// cond: int32(c)==1
  9739  	// result: (MOVWUreg (NEG <x.Type> x))
  9740  	for {
  9741  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9742  			x := v_0
  9743  			if v_1.Op != OpARM64MOVDconst {
  9744  				continue
  9745  			}
  9746  			c := auxIntToInt64(v_1.AuxInt)
  9747  			if !(int32(c) == 1) {
  9748  				continue
  9749  			}
  9750  			v.reset(OpARM64MOVWUreg)
  9751  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  9752  			v0.AddArg(x)
  9753  			v.AddArg(v0)
  9754  			return true
  9755  		}
  9756  		break
  9757  	}
  9758  	// match: (MNEGW x (MOVDconst [c]))
  9759  	// cond: isPowerOfTwo(c)
  9760  	// result: (NEG (SLLconst <x.Type> [log64(c)] x))
  9761  	for {
  9762  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9763  			x := v_0
  9764  			if v_1.Op != OpARM64MOVDconst {
  9765  				continue
  9766  			}
  9767  			c := auxIntToInt64(v_1.AuxInt)
  9768  			if !(isPowerOfTwo(c)) {
  9769  				continue
  9770  			}
  9771  			v.reset(OpARM64NEG)
  9772  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  9773  			v0.AuxInt = int64ToAuxInt(log64(c))
  9774  			v0.AddArg(x)
  9775  			v.AddArg(v0)
  9776  			return true
  9777  		}
  9778  		break
  9779  	}
  9780  	// match: (MNEGW x (MOVDconst [c]))
  9781  	// cond: isPowerOfTwo(c-1) && int32(c) >= 3
  9782  	// result: (MOVWUreg (NEG <x.Type> (ADDshiftLL <x.Type> x x [log64(c-1)])))
  9783  	for {
  9784  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9785  			x := v_0
  9786  			if v_1.Op != OpARM64MOVDconst {
  9787  				continue
  9788  			}
  9789  			c := auxIntToInt64(v_1.AuxInt)
  9790  			if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
  9791  				continue
  9792  			}
  9793  			v.reset(OpARM64MOVWUreg)
  9794  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  9795  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9796  			v1.AuxInt = int64ToAuxInt(log64(c - 1))
  9797  			v1.AddArg2(x, x)
  9798  			v0.AddArg(v1)
  9799  			v.AddArg(v0)
  9800  			return true
  9801  		}
  9802  		break
  9803  	}
  9804  	// match: (MNEGW x (MOVDconst [c]))
  9805  	// cond: isPowerOfTwo(c+1) && int32(c) >= 7
  9806  	// result: (MOVWUreg (NEG <x.Type> (ADDshiftLL <x.Type> (NEG <x.Type> x) x [log64(c+1)])))
  9807  	for {
  9808  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9809  			x := v_0
  9810  			if v_1.Op != OpARM64MOVDconst {
  9811  				continue
  9812  			}
  9813  			c := auxIntToInt64(v_1.AuxInt)
  9814  			if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
  9815  				continue
  9816  			}
  9817  			v.reset(OpARM64MOVWUreg)
  9818  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  9819  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9820  			v1.AuxInt = int64ToAuxInt(log64(c + 1))
  9821  			v2 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  9822  			v2.AddArg(x)
  9823  			v1.AddArg2(v2, x)
  9824  			v0.AddArg(v1)
  9825  			v.AddArg(v0)
  9826  			return true
  9827  		}
  9828  		break
  9829  	}
  9830  	// match: (MNEGW x (MOVDconst [c]))
  9831  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
  9832  	// result: (MOVWUreg (SLLconst <x.Type> [log64(c/3)] (SUBshiftLL <x.Type> x x [2])))
  9833  	for {
  9834  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9835  			x := v_0
  9836  			if v_1.Op != OpARM64MOVDconst {
  9837  				continue
  9838  			}
  9839  			c := auxIntToInt64(v_1.AuxInt)
  9840  			if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
  9841  				continue
  9842  			}
  9843  			v.reset(OpARM64MOVWUreg)
  9844  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  9845  			v0.AuxInt = int64ToAuxInt(log64(c / 3))
  9846  			v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  9847  			v1.AuxInt = int64ToAuxInt(2)
  9848  			v1.AddArg2(x, x)
  9849  			v0.AddArg(v1)
  9850  			v.AddArg(v0)
  9851  			return true
  9852  		}
  9853  		break
  9854  	}
  9855  	// match: (MNEGW x (MOVDconst [c]))
  9856  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
  9857  	// result: (MOVWUreg (NEG <x.Type> (SLLconst <x.Type> [log64(c/5)] (ADDshiftLL <x.Type> x x [2]))))
  9858  	for {
  9859  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9860  			x := v_0
  9861  			if v_1.Op != OpARM64MOVDconst {
  9862  				continue
  9863  			}
  9864  			c := auxIntToInt64(v_1.AuxInt)
  9865  			if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
  9866  				continue
  9867  			}
  9868  			v.reset(OpARM64MOVWUreg)
  9869  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  9870  			v1 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  9871  			v1.AuxInt = int64ToAuxInt(log64(c / 5))
  9872  			v2 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9873  			v2.AuxInt = int64ToAuxInt(2)
  9874  			v2.AddArg2(x, x)
  9875  			v1.AddArg(v2)
  9876  			v0.AddArg(v1)
  9877  			v.AddArg(v0)
  9878  			return true
  9879  		}
  9880  		break
  9881  	}
  9882  	// match: (MNEGW x (MOVDconst [c]))
  9883  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
  9884  	// result: (MOVWUreg (SLLconst <x.Type> [log64(c/7)] (SUBshiftLL <x.Type> x x [3])))
  9885  	for {
  9886  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9887  			x := v_0
  9888  			if v_1.Op != OpARM64MOVDconst {
  9889  				continue
  9890  			}
  9891  			c := auxIntToInt64(v_1.AuxInt)
  9892  			if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
  9893  				continue
  9894  			}
  9895  			v.reset(OpARM64MOVWUreg)
  9896  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  9897  			v0.AuxInt = int64ToAuxInt(log64(c / 7))
  9898  			v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  9899  			v1.AuxInt = int64ToAuxInt(3)
  9900  			v1.AddArg2(x, x)
  9901  			v0.AddArg(v1)
  9902  			v.AddArg(v0)
  9903  			return true
  9904  		}
  9905  		break
  9906  	}
  9907  	// match: (MNEGW x (MOVDconst [c]))
  9908  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
  9909  	// result: (MOVWUreg (NEG <x.Type> (SLLconst <x.Type> [log64(c/9)] (ADDshiftLL <x.Type> x x [3]))))
  9910  	for {
  9911  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9912  			x := v_0
  9913  			if v_1.Op != OpARM64MOVDconst {
  9914  				continue
  9915  			}
  9916  			c := auxIntToInt64(v_1.AuxInt)
  9917  			if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
  9918  				continue
  9919  			}
  9920  			v.reset(OpARM64MOVWUreg)
  9921  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  9922  			v1 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  9923  			v1.AuxInt = int64ToAuxInt(log64(c / 9))
  9924  			v2 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9925  			v2.AuxInt = int64ToAuxInt(3)
  9926  			v2.AddArg2(x, x)
  9927  			v1.AddArg(v2)
  9928  			v0.AddArg(v1)
  9929  			v.AddArg(v0)
  9930  			return true
  9931  		}
  9932  		break
  9933  	}
  9934  	// match: (MNEGW (MOVDconst [c]) (MOVDconst [d]))
  9935  	// result: (MOVDconst [int64(uint32(-c*d))])
  9936  	for {
  9937  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9938  			if v_0.Op != OpARM64MOVDconst {
  9939  				continue
  9940  			}
  9941  			c := auxIntToInt64(v_0.AuxInt)
  9942  			if v_1.Op != OpARM64MOVDconst {
  9943  				continue
  9944  			}
  9945  			d := auxIntToInt64(v_1.AuxInt)
  9946  			v.reset(OpARM64MOVDconst)
  9947  			v.AuxInt = int64ToAuxInt(int64(uint32(-c * d)))
  9948  			return true
  9949  		}
  9950  		break
  9951  	}
  9952  	return false
  9953  }
  9954  func rewriteValueARM64_OpARM64MOD(v *Value) bool {
  9955  	v_1 := v.Args[1]
  9956  	v_0 := v.Args[0]
  9957  	// match: (MOD (MOVDconst [c]) (MOVDconst [d]))
  9958  	// cond: d != 0
  9959  	// result: (MOVDconst [c%d])
  9960  	for {
  9961  		if v_0.Op != OpARM64MOVDconst {
  9962  			break
  9963  		}
  9964  		c := auxIntToInt64(v_0.AuxInt)
  9965  		if v_1.Op != OpARM64MOVDconst {
  9966  			break
  9967  		}
  9968  		d := auxIntToInt64(v_1.AuxInt)
  9969  		if !(d != 0) {
  9970  			break
  9971  		}
  9972  		v.reset(OpARM64MOVDconst)
  9973  		v.AuxInt = int64ToAuxInt(c % d)
  9974  		return true
  9975  	}
  9976  	return false
  9977  }
  9978  func rewriteValueARM64_OpARM64MODW(v *Value) bool {
  9979  	v_1 := v.Args[1]
  9980  	v_0 := v.Args[0]
  9981  	// match: (MODW (MOVDconst [c]) (MOVDconst [d]))
  9982  	// cond: d != 0
  9983  	// result: (MOVDconst [int64(uint32(int32(c)%int32(d)))])
  9984  	for {
  9985  		if v_0.Op != OpARM64MOVDconst {
  9986  			break
  9987  		}
  9988  		c := auxIntToInt64(v_0.AuxInt)
  9989  		if v_1.Op != OpARM64MOVDconst {
  9990  			break
  9991  		}
  9992  		d := auxIntToInt64(v_1.AuxInt)
  9993  		if !(d != 0) {
  9994  			break
  9995  		}
  9996  		v.reset(OpARM64MOVDconst)
  9997  		v.AuxInt = int64ToAuxInt(int64(uint32(int32(c) % int32(d))))
  9998  		return true
  9999  	}
 10000  	return false
 10001  }
 10002  func rewriteValueARM64_OpARM64MOVBUload(v *Value) bool {
 10003  	v_1 := v.Args[1]
 10004  	v_0 := v.Args[0]
 10005  	b := v.Block
 10006  	config := b.Func.Config
 10007  	// match: (MOVBUload [off1] {sym} (ADDconst [off2] ptr) mem)
 10008  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10009  	// result: (MOVBUload [off1+int32(off2)] {sym} ptr mem)
 10010  	for {
 10011  		off1 := auxIntToInt32(v.AuxInt)
 10012  		sym := auxToSym(v.Aux)
 10013  		if v_0.Op != OpARM64ADDconst {
 10014  			break
 10015  		}
 10016  		off2 := auxIntToInt64(v_0.AuxInt)
 10017  		ptr := v_0.Args[0]
 10018  		mem := v_1
 10019  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10020  			break
 10021  		}
 10022  		v.reset(OpARM64MOVBUload)
 10023  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 10024  		v.Aux = symToAux(sym)
 10025  		v.AddArg2(ptr, mem)
 10026  		return true
 10027  	}
 10028  	// match: (MOVBUload [off] {sym} (ADD ptr idx) mem)
 10029  	// cond: off == 0 && sym == nil
 10030  	// result: (MOVBUloadidx ptr idx mem)
 10031  	for {
 10032  		off := auxIntToInt32(v.AuxInt)
 10033  		sym := auxToSym(v.Aux)
 10034  		if v_0.Op != OpARM64ADD {
 10035  			break
 10036  		}
 10037  		idx := v_0.Args[1]
 10038  		ptr := v_0.Args[0]
 10039  		mem := v_1
 10040  		if !(off == 0 && sym == nil) {
 10041  			break
 10042  		}
 10043  		v.reset(OpARM64MOVBUloadidx)
 10044  		v.AddArg3(ptr, idx, mem)
 10045  		return true
 10046  	}
 10047  	// match: (MOVBUload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 10048  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10049  	// result: (MOVBUload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 10050  	for {
 10051  		off1 := auxIntToInt32(v.AuxInt)
 10052  		sym1 := auxToSym(v.Aux)
 10053  		if v_0.Op != OpARM64MOVDaddr {
 10054  			break
 10055  		}
 10056  		off2 := auxIntToInt32(v_0.AuxInt)
 10057  		sym2 := auxToSym(v_0.Aux)
 10058  		ptr := v_0.Args[0]
 10059  		mem := v_1
 10060  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10061  			break
 10062  		}
 10063  		v.reset(OpARM64MOVBUload)
 10064  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10065  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10066  		v.AddArg2(ptr, mem)
 10067  		return true
 10068  	}
 10069  	// match: (MOVBUload [off] {sym} (SB) _)
 10070  	// cond: symIsRO(sym)
 10071  	// result: (MOVDconst [int64(read8(sym, int64(off)))])
 10072  	for {
 10073  		off := auxIntToInt32(v.AuxInt)
 10074  		sym := auxToSym(v.Aux)
 10075  		if v_0.Op != OpSB || !(symIsRO(sym)) {
 10076  			break
 10077  		}
 10078  		v.reset(OpARM64MOVDconst)
 10079  		v.AuxInt = int64ToAuxInt(int64(read8(sym, int64(off))))
 10080  		return true
 10081  	}
 10082  	return false
 10083  }
 10084  func rewriteValueARM64_OpARM64MOVBUloadidx(v *Value) bool {
 10085  	v_2 := v.Args[2]
 10086  	v_1 := v.Args[1]
 10087  	v_0 := v.Args[0]
 10088  	// match: (MOVBUloadidx ptr (MOVDconst [c]) mem)
 10089  	// cond: is32Bit(c)
 10090  	// result: (MOVBUload [int32(c)] ptr mem)
 10091  	for {
 10092  		ptr := v_0
 10093  		if v_1.Op != OpARM64MOVDconst {
 10094  			break
 10095  		}
 10096  		c := auxIntToInt64(v_1.AuxInt)
 10097  		mem := v_2
 10098  		if !(is32Bit(c)) {
 10099  			break
 10100  		}
 10101  		v.reset(OpARM64MOVBUload)
 10102  		v.AuxInt = int32ToAuxInt(int32(c))
 10103  		v.AddArg2(ptr, mem)
 10104  		return true
 10105  	}
 10106  	// match: (MOVBUloadidx (MOVDconst [c]) ptr mem)
 10107  	// cond: is32Bit(c)
 10108  	// result: (MOVBUload [int32(c)] ptr mem)
 10109  	for {
 10110  		if v_0.Op != OpARM64MOVDconst {
 10111  			break
 10112  		}
 10113  		c := auxIntToInt64(v_0.AuxInt)
 10114  		ptr := v_1
 10115  		mem := v_2
 10116  		if !(is32Bit(c)) {
 10117  			break
 10118  		}
 10119  		v.reset(OpARM64MOVBUload)
 10120  		v.AuxInt = int32ToAuxInt(int32(c))
 10121  		v.AddArg2(ptr, mem)
 10122  		return true
 10123  	}
 10124  	return false
 10125  }
 10126  func rewriteValueARM64_OpARM64MOVBUreg(v *Value) bool {
 10127  	v_0 := v.Args[0]
 10128  	// match: (MOVBUreg (ANDconst [c] x))
 10129  	// result: (ANDconst [c&(1<<8-1)] x)
 10130  	for {
 10131  		if v_0.Op != OpARM64ANDconst {
 10132  			break
 10133  		}
 10134  		c := auxIntToInt64(v_0.AuxInt)
 10135  		x := v_0.Args[0]
 10136  		v.reset(OpARM64ANDconst)
 10137  		v.AuxInt = int64ToAuxInt(c & (1<<8 - 1))
 10138  		v.AddArg(x)
 10139  		return true
 10140  	}
 10141  	// match: (MOVBUreg (MOVDconst [c]))
 10142  	// result: (MOVDconst [int64(uint8(c))])
 10143  	for {
 10144  		if v_0.Op != OpARM64MOVDconst {
 10145  			break
 10146  		}
 10147  		c := auxIntToInt64(v_0.AuxInt)
 10148  		v.reset(OpARM64MOVDconst)
 10149  		v.AuxInt = int64ToAuxInt(int64(uint8(c)))
 10150  		return true
 10151  	}
 10152  	// match: (MOVBUreg x)
 10153  	// cond: v.Type.Size() <= 1
 10154  	// result: x
 10155  	for {
 10156  		x := v_0
 10157  		if !(v.Type.Size() <= 1) {
 10158  			break
 10159  		}
 10160  		v.copyOf(x)
 10161  		return true
 10162  	}
 10163  	// match: (MOVBUreg (SLLconst [lc] x))
 10164  	// cond: lc >= 8
 10165  	// result: (MOVDconst [0])
 10166  	for {
 10167  		if v_0.Op != OpARM64SLLconst {
 10168  			break
 10169  		}
 10170  		lc := auxIntToInt64(v_0.AuxInt)
 10171  		if !(lc >= 8) {
 10172  			break
 10173  		}
 10174  		v.reset(OpARM64MOVDconst)
 10175  		v.AuxInt = int64ToAuxInt(0)
 10176  		return true
 10177  	}
 10178  	// match: (MOVBUreg (SLLconst [lc] x))
 10179  	// cond: lc < 8
 10180  	// result: (UBFIZ [armBFAuxInt(lc, 8-lc)] x)
 10181  	for {
 10182  		if v_0.Op != OpARM64SLLconst {
 10183  			break
 10184  		}
 10185  		lc := auxIntToInt64(v_0.AuxInt)
 10186  		x := v_0.Args[0]
 10187  		if !(lc < 8) {
 10188  			break
 10189  		}
 10190  		v.reset(OpARM64UBFIZ)
 10191  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 8-lc))
 10192  		v.AddArg(x)
 10193  		return true
 10194  	}
 10195  	// match: (MOVBUreg (SRLconst [rc] x))
 10196  	// cond: rc < 8
 10197  	// result: (UBFX [armBFAuxInt(rc, 8)] x)
 10198  	for {
 10199  		if v_0.Op != OpARM64SRLconst {
 10200  			break
 10201  		}
 10202  		rc := auxIntToInt64(v_0.AuxInt)
 10203  		x := v_0.Args[0]
 10204  		if !(rc < 8) {
 10205  			break
 10206  		}
 10207  		v.reset(OpARM64UBFX)
 10208  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 8))
 10209  		v.AddArg(x)
 10210  		return true
 10211  	}
 10212  	// match: (MOVBUreg (UBFX [bfc] x))
 10213  	// cond: bfc.width() <= 8
 10214  	// result: (UBFX [bfc] x)
 10215  	for {
 10216  		if v_0.Op != OpARM64UBFX {
 10217  			break
 10218  		}
 10219  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 10220  		x := v_0.Args[0]
 10221  		if !(bfc.width() <= 8) {
 10222  			break
 10223  		}
 10224  		v.reset(OpARM64UBFX)
 10225  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 10226  		v.AddArg(x)
 10227  		return true
 10228  	}
 10229  	return false
 10230  }
 10231  func rewriteValueARM64_OpARM64MOVBload(v *Value) bool {
 10232  	v_1 := v.Args[1]
 10233  	v_0 := v.Args[0]
 10234  	b := v.Block
 10235  	config := b.Func.Config
 10236  	// match: (MOVBload [off1] {sym} (ADDconst [off2] ptr) mem)
 10237  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10238  	// result: (MOVBload [off1+int32(off2)] {sym} ptr mem)
 10239  	for {
 10240  		off1 := auxIntToInt32(v.AuxInt)
 10241  		sym := auxToSym(v.Aux)
 10242  		if v_0.Op != OpARM64ADDconst {
 10243  			break
 10244  		}
 10245  		off2 := auxIntToInt64(v_0.AuxInt)
 10246  		ptr := v_0.Args[0]
 10247  		mem := v_1
 10248  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10249  			break
 10250  		}
 10251  		v.reset(OpARM64MOVBload)
 10252  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 10253  		v.Aux = symToAux(sym)
 10254  		v.AddArg2(ptr, mem)
 10255  		return true
 10256  	}
 10257  	// match: (MOVBload [off] {sym} (ADD ptr idx) mem)
 10258  	// cond: off == 0 && sym == nil
 10259  	// result: (MOVBloadidx ptr idx mem)
 10260  	for {
 10261  		off := auxIntToInt32(v.AuxInt)
 10262  		sym := auxToSym(v.Aux)
 10263  		if v_0.Op != OpARM64ADD {
 10264  			break
 10265  		}
 10266  		idx := v_0.Args[1]
 10267  		ptr := v_0.Args[0]
 10268  		mem := v_1
 10269  		if !(off == 0 && sym == nil) {
 10270  			break
 10271  		}
 10272  		v.reset(OpARM64MOVBloadidx)
 10273  		v.AddArg3(ptr, idx, mem)
 10274  		return true
 10275  	}
 10276  	// match: (MOVBload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 10277  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10278  	// result: (MOVBload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 10279  	for {
 10280  		off1 := auxIntToInt32(v.AuxInt)
 10281  		sym1 := auxToSym(v.Aux)
 10282  		if v_0.Op != OpARM64MOVDaddr {
 10283  			break
 10284  		}
 10285  		off2 := auxIntToInt32(v_0.AuxInt)
 10286  		sym2 := auxToSym(v_0.Aux)
 10287  		ptr := v_0.Args[0]
 10288  		mem := v_1
 10289  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10290  			break
 10291  		}
 10292  		v.reset(OpARM64MOVBload)
 10293  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10294  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10295  		v.AddArg2(ptr, mem)
 10296  		return true
 10297  	}
 10298  	// match: (MOVBload [off] {sym} (SB) _)
 10299  	// cond: symIsRO(sym)
 10300  	// result: (MOVDconst [int64(int8(read8(sym, int64(off))))])
 10301  	for {
 10302  		off := auxIntToInt32(v.AuxInt)
 10303  		sym := auxToSym(v.Aux)
 10304  		if v_0.Op != OpSB || !(symIsRO(sym)) {
 10305  			break
 10306  		}
 10307  		v.reset(OpARM64MOVDconst)
 10308  		v.AuxInt = int64ToAuxInt(int64(int8(read8(sym, int64(off)))))
 10309  		return true
 10310  	}
 10311  	return false
 10312  }
 10313  func rewriteValueARM64_OpARM64MOVBloadidx(v *Value) bool {
 10314  	v_2 := v.Args[2]
 10315  	v_1 := v.Args[1]
 10316  	v_0 := v.Args[0]
 10317  	// match: (MOVBloadidx ptr (MOVDconst [c]) mem)
 10318  	// cond: is32Bit(c)
 10319  	// result: (MOVBload [int32(c)] ptr mem)
 10320  	for {
 10321  		ptr := v_0
 10322  		if v_1.Op != OpARM64MOVDconst {
 10323  			break
 10324  		}
 10325  		c := auxIntToInt64(v_1.AuxInt)
 10326  		mem := v_2
 10327  		if !(is32Bit(c)) {
 10328  			break
 10329  		}
 10330  		v.reset(OpARM64MOVBload)
 10331  		v.AuxInt = int32ToAuxInt(int32(c))
 10332  		v.AddArg2(ptr, mem)
 10333  		return true
 10334  	}
 10335  	// match: (MOVBloadidx (MOVDconst [c]) ptr mem)
 10336  	// cond: is32Bit(c)
 10337  	// result: (MOVBload [int32(c)] ptr mem)
 10338  	for {
 10339  		if v_0.Op != OpARM64MOVDconst {
 10340  			break
 10341  		}
 10342  		c := auxIntToInt64(v_0.AuxInt)
 10343  		ptr := v_1
 10344  		mem := v_2
 10345  		if !(is32Bit(c)) {
 10346  			break
 10347  		}
 10348  		v.reset(OpARM64MOVBload)
 10349  		v.AuxInt = int32ToAuxInt(int32(c))
 10350  		v.AddArg2(ptr, mem)
 10351  		return true
 10352  	}
 10353  	return false
 10354  }
 10355  func rewriteValueARM64_OpARM64MOVBreg(v *Value) bool {
 10356  	v_0 := v.Args[0]
 10357  	// match: (MOVBreg (MOVDconst [c]))
 10358  	// result: (MOVDconst [int64(int8(c))])
 10359  	for {
 10360  		if v_0.Op != OpARM64MOVDconst {
 10361  			break
 10362  		}
 10363  		c := auxIntToInt64(v_0.AuxInt)
 10364  		v.reset(OpARM64MOVDconst)
 10365  		v.AuxInt = int64ToAuxInt(int64(int8(c)))
 10366  		return true
 10367  	}
 10368  	// match: (MOVBreg x)
 10369  	// cond: v.Type.Size() <= 1
 10370  	// result: x
 10371  	for {
 10372  		x := v_0
 10373  		if !(v.Type.Size() <= 1) {
 10374  			break
 10375  		}
 10376  		v.copyOf(x)
 10377  		return true
 10378  	}
 10379  	// match: (MOVBreg <t> (ANDconst x [c]))
 10380  	// cond: uint64(c) & uint64(0xffffffffffffff80) == 0
 10381  	// result: (ANDconst <t> x [c])
 10382  	for {
 10383  		t := v.Type
 10384  		if v_0.Op != OpARM64ANDconst {
 10385  			break
 10386  		}
 10387  		c := auxIntToInt64(v_0.AuxInt)
 10388  		x := v_0.Args[0]
 10389  		if !(uint64(c)&uint64(0xffffffffffffff80) == 0) {
 10390  			break
 10391  		}
 10392  		v.reset(OpARM64ANDconst)
 10393  		v.Type = t
 10394  		v.AuxInt = int64ToAuxInt(c)
 10395  		v.AddArg(x)
 10396  		return true
 10397  	}
 10398  	// match: (MOVBreg (SLLconst [lc] x))
 10399  	// cond: lc < 8
 10400  	// result: (SBFIZ [armBFAuxInt(lc, 8-lc)] x)
 10401  	for {
 10402  		if v_0.Op != OpARM64SLLconst {
 10403  			break
 10404  		}
 10405  		lc := auxIntToInt64(v_0.AuxInt)
 10406  		x := v_0.Args[0]
 10407  		if !(lc < 8) {
 10408  			break
 10409  		}
 10410  		v.reset(OpARM64SBFIZ)
 10411  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 8-lc))
 10412  		v.AddArg(x)
 10413  		return true
 10414  	}
 10415  	// match: (MOVBreg (SBFX [bfc] x))
 10416  	// cond: bfc.width() <= 8
 10417  	// result: (SBFX [bfc] x)
 10418  	for {
 10419  		if v_0.Op != OpARM64SBFX {
 10420  			break
 10421  		}
 10422  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 10423  		x := v_0.Args[0]
 10424  		if !(bfc.width() <= 8) {
 10425  			break
 10426  		}
 10427  		v.reset(OpARM64SBFX)
 10428  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 10429  		v.AddArg(x)
 10430  		return true
 10431  	}
 10432  	return false
 10433  }
 10434  func rewriteValueARM64_OpARM64MOVBstore(v *Value) bool {
 10435  	v_2 := v.Args[2]
 10436  	v_1 := v.Args[1]
 10437  	v_0 := v.Args[0]
 10438  	b := v.Block
 10439  	config := b.Func.Config
 10440  	// match: (MOVBstore [off1] {sym} (ADDconst [off2] ptr) val mem)
 10441  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10442  	// result: (MOVBstore [off1+int32(off2)] {sym} ptr val mem)
 10443  	for {
 10444  		off1 := auxIntToInt32(v.AuxInt)
 10445  		sym := auxToSym(v.Aux)
 10446  		if v_0.Op != OpARM64ADDconst {
 10447  			break
 10448  		}
 10449  		off2 := auxIntToInt64(v_0.AuxInt)
 10450  		ptr := v_0.Args[0]
 10451  		val := v_1
 10452  		mem := v_2
 10453  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10454  			break
 10455  		}
 10456  		v.reset(OpARM64MOVBstore)
 10457  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 10458  		v.Aux = symToAux(sym)
 10459  		v.AddArg3(ptr, val, mem)
 10460  		return true
 10461  	}
 10462  	// match: (MOVBstore [off] {sym} (ADD ptr idx) val mem)
 10463  	// cond: off == 0 && sym == nil
 10464  	// result: (MOVBstoreidx ptr idx val mem)
 10465  	for {
 10466  		off := auxIntToInt32(v.AuxInt)
 10467  		sym := auxToSym(v.Aux)
 10468  		if v_0.Op != OpARM64ADD {
 10469  			break
 10470  		}
 10471  		idx := v_0.Args[1]
 10472  		ptr := v_0.Args[0]
 10473  		val := v_1
 10474  		mem := v_2
 10475  		if !(off == 0 && sym == nil) {
 10476  			break
 10477  		}
 10478  		v.reset(OpARM64MOVBstoreidx)
 10479  		v.AddArg4(ptr, idx, val, mem)
 10480  		return true
 10481  	}
 10482  	// match: (MOVBstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
 10483  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10484  	// result: (MOVBstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
 10485  	for {
 10486  		off1 := auxIntToInt32(v.AuxInt)
 10487  		sym1 := auxToSym(v.Aux)
 10488  		if v_0.Op != OpARM64MOVDaddr {
 10489  			break
 10490  		}
 10491  		off2 := auxIntToInt32(v_0.AuxInt)
 10492  		sym2 := auxToSym(v_0.Aux)
 10493  		ptr := v_0.Args[0]
 10494  		val := v_1
 10495  		mem := v_2
 10496  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10497  			break
 10498  		}
 10499  		v.reset(OpARM64MOVBstore)
 10500  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10501  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10502  		v.AddArg3(ptr, val, mem)
 10503  		return true
 10504  	}
 10505  	// match: (MOVBstore [off] {sym} ptr (MOVBreg x) mem)
 10506  	// result: (MOVBstore [off] {sym} ptr x mem)
 10507  	for {
 10508  		off := auxIntToInt32(v.AuxInt)
 10509  		sym := auxToSym(v.Aux)
 10510  		ptr := v_0
 10511  		if v_1.Op != OpARM64MOVBreg {
 10512  			break
 10513  		}
 10514  		x := v_1.Args[0]
 10515  		mem := v_2
 10516  		v.reset(OpARM64MOVBstore)
 10517  		v.AuxInt = int32ToAuxInt(off)
 10518  		v.Aux = symToAux(sym)
 10519  		v.AddArg3(ptr, x, mem)
 10520  		return true
 10521  	}
 10522  	// match: (MOVBstore [off] {sym} ptr (MOVBUreg x) mem)
 10523  	// result: (MOVBstore [off] {sym} ptr x mem)
 10524  	for {
 10525  		off := auxIntToInt32(v.AuxInt)
 10526  		sym := auxToSym(v.Aux)
 10527  		ptr := v_0
 10528  		if v_1.Op != OpARM64MOVBUreg {
 10529  			break
 10530  		}
 10531  		x := v_1.Args[0]
 10532  		mem := v_2
 10533  		v.reset(OpARM64MOVBstore)
 10534  		v.AuxInt = int32ToAuxInt(off)
 10535  		v.Aux = symToAux(sym)
 10536  		v.AddArg3(ptr, x, mem)
 10537  		return true
 10538  	}
 10539  	// match: (MOVBstore [off] {sym} ptr (MOVHreg x) mem)
 10540  	// result: (MOVBstore [off] {sym} ptr x mem)
 10541  	for {
 10542  		off := auxIntToInt32(v.AuxInt)
 10543  		sym := auxToSym(v.Aux)
 10544  		ptr := v_0
 10545  		if v_1.Op != OpARM64MOVHreg {
 10546  			break
 10547  		}
 10548  		x := v_1.Args[0]
 10549  		mem := v_2
 10550  		v.reset(OpARM64MOVBstore)
 10551  		v.AuxInt = int32ToAuxInt(off)
 10552  		v.Aux = symToAux(sym)
 10553  		v.AddArg3(ptr, x, mem)
 10554  		return true
 10555  	}
 10556  	// match: (MOVBstore [off] {sym} ptr (MOVHUreg x) mem)
 10557  	// result: (MOVBstore [off] {sym} ptr x mem)
 10558  	for {
 10559  		off := auxIntToInt32(v.AuxInt)
 10560  		sym := auxToSym(v.Aux)
 10561  		ptr := v_0
 10562  		if v_1.Op != OpARM64MOVHUreg {
 10563  			break
 10564  		}
 10565  		x := v_1.Args[0]
 10566  		mem := v_2
 10567  		v.reset(OpARM64MOVBstore)
 10568  		v.AuxInt = int32ToAuxInt(off)
 10569  		v.Aux = symToAux(sym)
 10570  		v.AddArg3(ptr, x, mem)
 10571  		return true
 10572  	}
 10573  	// match: (MOVBstore [off] {sym} ptr (MOVWreg x) mem)
 10574  	// result: (MOVBstore [off] {sym} ptr x mem)
 10575  	for {
 10576  		off := auxIntToInt32(v.AuxInt)
 10577  		sym := auxToSym(v.Aux)
 10578  		ptr := v_0
 10579  		if v_1.Op != OpARM64MOVWreg {
 10580  			break
 10581  		}
 10582  		x := v_1.Args[0]
 10583  		mem := v_2
 10584  		v.reset(OpARM64MOVBstore)
 10585  		v.AuxInt = int32ToAuxInt(off)
 10586  		v.Aux = symToAux(sym)
 10587  		v.AddArg3(ptr, x, mem)
 10588  		return true
 10589  	}
 10590  	// match: (MOVBstore [off] {sym} ptr (MOVWUreg x) mem)
 10591  	// result: (MOVBstore [off] {sym} ptr x mem)
 10592  	for {
 10593  		off := auxIntToInt32(v.AuxInt)
 10594  		sym := auxToSym(v.Aux)
 10595  		ptr := v_0
 10596  		if v_1.Op != OpARM64MOVWUreg {
 10597  			break
 10598  		}
 10599  		x := v_1.Args[0]
 10600  		mem := v_2
 10601  		v.reset(OpARM64MOVBstore)
 10602  		v.AuxInt = int32ToAuxInt(off)
 10603  		v.Aux = symToAux(sym)
 10604  		v.AddArg3(ptr, x, mem)
 10605  		return true
 10606  	}
 10607  	return false
 10608  }
 10609  func rewriteValueARM64_OpARM64MOVBstoreidx(v *Value) bool {
 10610  	v_3 := v.Args[3]
 10611  	v_2 := v.Args[2]
 10612  	v_1 := v.Args[1]
 10613  	v_0 := v.Args[0]
 10614  	// match: (MOVBstoreidx ptr (MOVDconst [c]) val mem)
 10615  	// cond: is32Bit(c)
 10616  	// result: (MOVBstore [int32(c)] ptr val mem)
 10617  	for {
 10618  		ptr := v_0
 10619  		if v_1.Op != OpARM64MOVDconst {
 10620  			break
 10621  		}
 10622  		c := auxIntToInt64(v_1.AuxInt)
 10623  		val := v_2
 10624  		mem := v_3
 10625  		if !(is32Bit(c)) {
 10626  			break
 10627  		}
 10628  		v.reset(OpARM64MOVBstore)
 10629  		v.AuxInt = int32ToAuxInt(int32(c))
 10630  		v.AddArg3(ptr, val, mem)
 10631  		return true
 10632  	}
 10633  	// match: (MOVBstoreidx (MOVDconst [c]) idx val mem)
 10634  	// cond: is32Bit(c)
 10635  	// result: (MOVBstore [int32(c)] idx val mem)
 10636  	for {
 10637  		if v_0.Op != OpARM64MOVDconst {
 10638  			break
 10639  		}
 10640  		c := auxIntToInt64(v_0.AuxInt)
 10641  		idx := v_1
 10642  		val := v_2
 10643  		mem := v_3
 10644  		if !(is32Bit(c)) {
 10645  			break
 10646  		}
 10647  		v.reset(OpARM64MOVBstore)
 10648  		v.AuxInt = int32ToAuxInt(int32(c))
 10649  		v.AddArg3(idx, val, mem)
 10650  		return true
 10651  	}
 10652  	// match: (MOVBstoreidx ptr idx (MOVBreg x) mem)
 10653  	// result: (MOVBstoreidx ptr idx x mem)
 10654  	for {
 10655  		ptr := v_0
 10656  		idx := v_1
 10657  		if v_2.Op != OpARM64MOVBreg {
 10658  			break
 10659  		}
 10660  		x := v_2.Args[0]
 10661  		mem := v_3
 10662  		v.reset(OpARM64MOVBstoreidx)
 10663  		v.AddArg4(ptr, idx, x, mem)
 10664  		return true
 10665  	}
 10666  	// match: (MOVBstoreidx ptr idx (MOVBUreg x) mem)
 10667  	// result: (MOVBstoreidx ptr idx x mem)
 10668  	for {
 10669  		ptr := v_0
 10670  		idx := v_1
 10671  		if v_2.Op != OpARM64MOVBUreg {
 10672  			break
 10673  		}
 10674  		x := v_2.Args[0]
 10675  		mem := v_3
 10676  		v.reset(OpARM64MOVBstoreidx)
 10677  		v.AddArg4(ptr, idx, x, mem)
 10678  		return true
 10679  	}
 10680  	// match: (MOVBstoreidx ptr idx (MOVHreg x) mem)
 10681  	// result: (MOVBstoreidx ptr idx x mem)
 10682  	for {
 10683  		ptr := v_0
 10684  		idx := v_1
 10685  		if v_2.Op != OpARM64MOVHreg {
 10686  			break
 10687  		}
 10688  		x := v_2.Args[0]
 10689  		mem := v_3
 10690  		v.reset(OpARM64MOVBstoreidx)
 10691  		v.AddArg4(ptr, idx, x, mem)
 10692  		return true
 10693  	}
 10694  	// match: (MOVBstoreidx ptr idx (MOVHUreg x) mem)
 10695  	// result: (MOVBstoreidx ptr idx x mem)
 10696  	for {
 10697  		ptr := v_0
 10698  		idx := v_1
 10699  		if v_2.Op != OpARM64MOVHUreg {
 10700  			break
 10701  		}
 10702  		x := v_2.Args[0]
 10703  		mem := v_3
 10704  		v.reset(OpARM64MOVBstoreidx)
 10705  		v.AddArg4(ptr, idx, x, mem)
 10706  		return true
 10707  	}
 10708  	// match: (MOVBstoreidx ptr idx (MOVWreg x) mem)
 10709  	// result: (MOVBstoreidx ptr idx x mem)
 10710  	for {
 10711  		ptr := v_0
 10712  		idx := v_1
 10713  		if v_2.Op != OpARM64MOVWreg {
 10714  			break
 10715  		}
 10716  		x := v_2.Args[0]
 10717  		mem := v_3
 10718  		v.reset(OpARM64MOVBstoreidx)
 10719  		v.AddArg4(ptr, idx, x, mem)
 10720  		return true
 10721  	}
 10722  	// match: (MOVBstoreidx ptr idx (MOVWUreg x) mem)
 10723  	// result: (MOVBstoreidx ptr idx x mem)
 10724  	for {
 10725  		ptr := v_0
 10726  		idx := v_1
 10727  		if v_2.Op != OpARM64MOVWUreg {
 10728  			break
 10729  		}
 10730  		x := v_2.Args[0]
 10731  		mem := v_3
 10732  		v.reset(OpARM64MOVBstoreidx)
 10733  		v.AddArg4(ptr, idx, x, mem)
 10734  		return true
 10735  	}
 10736  	return false
 10737  }
 10738  func rewriteValueARM64_OpARM64MOVDload(v *Value) bool {
 10739  	v_1 := v.Args[1]
 10740  	v_0 := v.Args[0]
 10741  	b := v.Block
 10742  	config := b.Func.Config
 10743  	// match: (MOVDload [off] {sym} ptr (FMOVDstore [off] {sym} ptr val _))
 10744  	// result: (FMOVDfpgp val)
 10745  	for {
 10746  		off := auxIntToInt32(v.AuxInt)
 10747  		sym := auxToSym(v.Aux)
 10748  		ptr := v_0
 10749  		if v_1.Op != OpARM64FMOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
 10750  			break
 10751  		}
 10752  		val := v_1.Args[1]
 10753  		if ptr != v_1.Args[0] {
 10754  			break
 10755  		}
 10756  		v.reset(OpARM64FMOVDfpgp)
 10757  		v.AddArg(val)
 10758  		return true
 10759  	}
 10760  	// match: (MOVDload [off1] {sym} (ADDconst [off2] ptr) mem)
 10761  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10762  	// result: (MOVDload [off1+int32(off2)] {sym} ptr mem)
 10763  	for {
 10764  		off1 := auxIntToInt32(v.AuxInt)
 10765  		sym := auxToSym(v.Aux)
 10766  		if v_0.Op != OpARM64ADDconst {
 10767  			break
 10768  		}
 10769  		off2 := auxIntToInt64(v_0.AuxInt)
 10770  		ptr := v_0.Args[0]
 10771  		mem := v_1
 10772  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10773  			break
 10774  		}
 10775  		v.reset(OpARM64MOVDload)
 10776  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 10777  		v.Aux = symToAux(sym)
 10778  		v.AddArg2(ptr, mem)
 10779  		return true
 10780  	}
 10781  	// match: (MOVDload [off] {sym} (ADD ptr idx) mem)
 10782  	// cond: off == 0 && sym == nil
 10783  	// result: (MOVDloadidx ptr idx mem)
 10784  	for {
 10785  		off := auxIntToInt32(v.AuxInt)
 10786  		sym := auxToSym(v.Aux)
 10787  		if v_0.Op != OpARM64ADD {
 10788  			break
 10789  		}
 10790  		idx := v_0.Args[1]
 10791  		ptr := v_0.Args[0]
 10792  		mem := v_1
 10793  		if !(off == 0 && sym == nil) {
 10794  			break
 10795  		}
 10796  		v.reset(OpARM64MOVDloadidx)
 10797  		v.AddArg3(ptr, idx, mem)
 10798  		return true
 10799  	}
 10800  	// match: (MOVDload [off] {sym} (ADDshiftLL [3] ptr idx) mem)
 10801  	// cond: off == 0 && sym == nil
 10802  	// result: (MOVDloadidx8 ptr idx mem)
 10803  	for {
 10804  		off := auxIntToInt32(v.AuxInt)
 10805  		sym := auxToSym(v.Aux)
 10806  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
 10807  			break
 10808  		}
 10809  		idx := v_0.Args[1]
 10810  		ptr := v_0.Args[0]
 10811  		mem := v_1
 10812  		if !(off == 0 && sym == nil) {
 10813  			break
 10814  		}
 10815  		v.reset(OpARM64MOVDloadidx8)
 10816  		v.AddArg3(ptr, idx, mem)
 10817  		return true
 10818  	}
 10819  	// match: (MOVDload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 10820  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10821  	// result: (MOVDload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 10822  	for {
 10823  		off1 := auxIntToInt32(v.AuxInt)
 10824  		sym1 := auxToSym(v.Aux)
 10825  		if v_0.Op != OpARM64MOVDaddr {
 10826  			break
 10827  		}
 10828  		off2 := auxIntToInt32(v_0.AuxInt)
 10829  		sym2 := auxToSym(v_0.Aux)
 10830  		ptr := v_0.Args[0]
 10831  		mem := v_1
 10832  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10833  			break
 10834  		}
 10835  		v.reset(OpARM64MOVDload)
 10836  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10837  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10838  		v.AddArg2(ptr, mem)
 10839  		return true
 10840  	}
 10841  	// match: (MOVDload [off] {sym} (SB) _)
 10842  	// cond: symIsRO(sym)
 10843  	// result: (MOVDconst [int64(read64(sym, int64(off), config.ctxt.Arch.ByteOrder))])
 10844  	for {
 10845  		off := auxIntToInt32(v.AuxInt)
 10846  		sym := auxToSym(v.Aux)
 10847  		if v_0.Op != OpSB || !(symIsRO(sym)) {
 10848  			break
 10849  		}
 10850  		v.reset(OpARM64MOVDconst)
 10851  		v.AuxInt = int64ToAuxInt(int64(read64(sym, int64(off), config.ctxt.Arch.ByteOrder)))
 10852  		return true
 10853  	}
 10854  	return false
 10855  }
 10856  func rewriteValueARM64_OpARM64MOVDloadidx(v *Value) bool {
 10857  	v_2 := v.Args[2]
 10858  	v_1 := v.Args[1]
 10859  	v_0 := v.Args[0]
 10860  	// match: (MOVDloadidx ptr (MOVDconst [c]) mem)
 10861  	// cond: is32Bit(c)
 10862  	// result: (MOVDload [int32(c)] ptr mem)
 10863  	for {
 10864  		ptr := v_0
 10865  		if v_1.Op != OpARM64MOVDconst {
 10866  			break
 10867  		}
 10868  		c := auxIntToInt64(v_1.AuxInt)
 10869  		mem := v_2
 10870  		if !(is32Bit(c)) {
 10871  			break
 10872  		}
 10873  		v.reset(OpARM64MOVDload)
 10874  		v.AuxInt = int32ToAuxInt(int32(c))
 10875  		v.AddArg2(ptr, mem)
 10876  		return true
 10877  	}
 10878  	// match: (MOVDloadidx (MOVDconst [c]) ptr mem)
 10879  	// cond: is32Bit(c)
 10880  	// result: (MOVDload [int32(c)] ptr mem)
 10881  	for {
 10882  		if v_0.Op != OpARM64MOVDconst {
 10883  			break
 10884  		}
 10885  		c := auxIntToInt64(v_0.AuxInt)
 10886  		ptr := v_1
 10887  		mem := v_2
 10888  		if !(is32Bit(c)) {
 10889  			break
 10890  		}
 10891  		v.reset(OpARM64MOVDload)
 10892  		v.AuxInt = int32ToAuxInt(int32(c))
 10893  		v.AddArg2(ptr, mem)
 10894  		return true
 10895  	}
 10896  	// match: (MOVDloadidx ptr (SLLconst [3] idx) mem)
 10897  	// result: (MOVDloadidx8 ptr idx mem)
 10898  	for {
 10899  		ptr := v_0
 10900  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
 10901  			break
 10902  		}
 10903  		idx := v_1.Args[0]
 10904  		mem := v_2
 10905  		v.reset(OpARM64MOVDloadidx8)
 10906  		v.AddArg3(ptr, idx, mem)
 10907  		return true
 10908  	}
 10909  	// match: (MOVDloadidx (SLLconst [3] idx) ptr mem)
 10910  	// result: (MOVDloadidx8 ptr idx mem)
 10911  	for {
 10912  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
 10913  			break
 10914  		}
 10915  		idx := v_0.Args[0]
 10916  		ptr := v_1
 10917  		mem := v_2
 10918  		v.reset(OpARM64MOVDloadidx8)
 10919  		v.AddArg3(ptr, idx, mem)
 10920  		return true
 10921  	}
 10922  	return false
 10923  }
 10924  func rewriteValueARM64_OpARM64MOVDloadidx8(v *Value) bool {
 10925  	v_2 := v.Args[2]
 10926  	v_1 := v.Args[1]
 10927  	v_0 := v.Args[0]
 10928  	// match: (MOVDloadidx8 ptr (MOVDconst [c]) mem)
 10929  	// cond: is32Bit(c<<3)
 10930  	// result: (MOVDload [int32(c)<<3] ptr mem)
 10931  	for {
 10932  		ptr := v_0
 10933  		if v_1.Op != OpARM64MOVDconst {
 10934  			break
 10935  		}
 10936  		c := auxIntToInt64(v_1.AuxInt)
 10937  		mem := v_2
 10938  		if !(is32Bit(c << 3)) {
 10939  			break
 10940  		}
 10941  		v.reset(OpARM64MOVDload)
 10942  		v.AuxInt = int32ToAuxInt(int32(c) << 3)
 10943  		v.AddArg2(ptr, mem)
 10944  		return true
 10945  	}
 10946  	return false
 10947  }
 10948  func rewriteValueARM64_OpARM64MOVDnop(v *Value) bool {
 10949  	v_0 := v.Args[0]
 10950  	// match: (MOVDnop (MOVDconst [c]))
 10951  	// result: (MOVDconst [c])
 10952  	for {
 10953  		if v_0.Op != OpARM64MOVDconst {
 10954  			break
 10955  		}
 10956  		c := auxIntToInt64(v_0.AuxInt)
 10957  		v.reset(OpARM64MOVDconst)
 10958  		v.AuxInt = int64ToAuxInt(c)
 10959  		return true
 10960  	}
 10961  	return false
 10962  }
 10963  func rewriteValueARM64_OpARM64MOVDreg(v *Value) bool {
 10964  	v_0 := v.Args[0]
 10965  	// match: (MOVDreg x)
 10966  	// cond: x.Uses == 1
 10967  	// result: (MOVDnop x)
 10968  	for {
 10969  		x := v_0
 10970  		if !(x.Uses == 1) {
 10971  			break
 10972  		}
 10973  		v.reset(OpARM64MOVDnop)
 10974  		v.AddArg(x)
 10975  		return true
 10976  	}
 10977  	// match: (MOVDreg (MOVDconst [c]))
 10978  	// result: (MOVDconst [c])
 10979  	for {
 10980  		if v_0.Op != OpARM64MOVDconst {
 10981  			break
 10982  		}
 10983  		c := auxIntToInt64(v_0.AuxInt)
 10984  		v.reset(OpARM64MOVDconst)
 10985  		v.AuxInt = int64ToAuxInt(c)
 10986  		return true
 10987  	}
 10988  	return false
 10989  }
 10990  func rewriteValueARM64_OpARM64MOVDstore(v *Value) bool {
 10991  	v_2 := v.Args[2]
 10992  	v_1 := v.Args[1]
 10993  	v_0 := v.Args[0]
 10994  	b := v.Block
 10995  	config := b.Func.Config
 10996  	// match: (MOVDstore [off] {sym} ptr (FMOVDfpgp val) mem)
 10997  	// result: (FMOVDstore [off] {sym} ptr val mem)
 10998  	for {
 10999  		off := auxIntToInt32(v.AuxInt)
 11000  		sym := auxToSym(v.Aux)
 11001  		ptr := v_0
 11002  		if v_1.Op != OpARM64FMOVDfpgp {
 11003  			break
 11004  		}
 11005  		val := v_1.Args[0]
 11006  		mem := v_2
 11007  		v.reset(OpARM64FMOVDstore)
 11008  		v.AuxInt = int32ToAuxInt(off)
 11009  		v.Aux = symToAux(sym)
 11010  		v.AddArg3(ptr, val, mem)
 11011  		return true
 11012  	}
 11013  	// match: (MOVDstore [off1] {sym} (ADDconst [off2] ptr) val mem)
 11014  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11015  	// result: (MOVDstore [off1+int32(off2)] {sym} ptr val mem)
 11016  	for {
 11017  		off1 := auxIntToInt32(v.AuxInt)
 11018  		sym := auxToSym(v.Aux)
 11019  		if v_0.Op != OpARM64ADDconst {
 11020  			break
 11021  		}
 11022  		off2 := auxIntToInt64(v_0.AuxInt)
 11023  		ptr := v_0.Args[0]
 11024  		val := v_1
 11025  		mem := v_2
 11026  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11027  			break
 11028  		}
 11029  		v.reset(OpARM64MOVDstore)
 11030  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 11031  		v.Aux = symToAux(sym)
 11032  		v.AddArg3(ptr, val, mem)
 11033  		return true
 11034  	}
 11035  	// match: (MOVDstore [off] {sym} (ADD ptr idx) val mem)
 11036  	// cond: off == 0 && sym == nil
 11037  	// result: (MOVDstoreidx ptr idx val mem)
 11038  	for {
 11039  		off := auxIntToInt32(v.AuxInt)
 11040  		sym := auxToSym(v.Aux)
 11041  		if v_0.Op != OpARM64ADD {
 11042  			break
 11043  		}
 11044  		idx := v_0.Args[1]
 11045  		ptr := v_0.Args[0]
 11046  		val := v_1
 11047  		mem := v_2
 11048  		if !(off == 0 && sym == nil) {
 11049  			break
 11050  		}
 11051  		v.reset(OpARM64MOVDstoreidx)
 11052  		v.AddArg4(ptr, idx, val, mem)
 11053  		return true
 11054  	}
 11055  	// match: (MOVDstore [off] {sym} (ADDshiftLL [3] ptr idx) val mem)
 11056  	// cond: off == 0 && sym == nil
 11057  	// result: (MOVDstoreidx8 ptr idx val mem)
 11058  	for {
 11059  		off := auxIntToInt32(v.AuxInt)
 11060  		sym := auxToSym(v.Aux)
 11061  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
 11062  			break
 11063  		}
 11064  		idx := v_0.Args[1]
 11065  		ptr := v_0.Args[0]
 11066  		val := v_1
 11067  		mem := v_2
 11068  		if !(off == 0 && sym == nil) {
 11069  			break
 11070  		}
 11071  		v.reset(OpARM64MOVDstoreidx8)
 11072  		v.AddArg4(ptr, idx, val, mem)
 11073  		return true
 11074  	}
 11075  	// match: (MOVDstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
 11076  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11077  	// result: (MOVDstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
 11078  	for {
 11079  		off1 := auxIntToInt32(v.AuxInt)
 11080  		sym1 := auxToSym(v.Aux)
 11081  		if v_0.Op != OpARM64MOVDaddr {
 11082  			break
 11083  		}
 11084  		off2 := auxIntToInt32(v_0.AuxInt)
 11085  		sym2 := auxToSym(v_0.Aux)
 11086  		ptr := v_0.Args[0]
 11087  		val := v_1
 11088  		mem := v_2
 11089  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11090  			break
 11091  		}
 11092  		v.reset(OpARM64MOVDstore)
 11093  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11094  		v.Aux = symToAux(mergeSym(sym1, sym2))
 11095  		v.AddArg3(ptr, val, mem)
 11096  		return true
 11097  	}
 11098  	return false
 11099  }
 11100  func rewriteValueARM64_OpARM64MOVDstoreidx(v *Value) bool {
 11101  	v_3 := v.Args[3]
 11102  	v_2 := v.Args[2]
 11103  	v_1 := v.Args[1]
 11104  	v_0 := v.Args[0]
 11105  	// match: (MOVDstoreidx ptr (MOVDconst [c]) val mem)
 11106  	// cond: is32Bit(c)
 11107  	// result: (MOVDstore [int32(c)] ptr val mem)
 11108  	for {
 11109  		ptr := v_0
 11110  		if v_1.Op != OpARM64MOVDconst {
 11111  			break
 11112  		}
 11113  		c := auxIntToInt64(v_1.AuxInt)
 11114  		val := v_2
 11115  		mem := v_3
 11116  		if !(is32Bit(c)) {
 11117  			break
 11118  		}
 11119  		v.reset(OpARM64MOVDstore)
 11120  		v.AuxInt = int32ToAuxInt(int32(c))
 11121  		v.AddArg3(ptr, val, mem)
 11122  		return true
 11123  	}
 11124  	// match: (MOVDstoreidx (MOVDconst [c]) idx val mem)
 11125  	// cond: is32Bit(c)
 11126  	// result: (MOVDstore [int32(c)] idx val mem)
 11127  	for {
 11128  		if v_0.Op != OpARM64MOVDconst {
 11129  			break
 11130  		}
 11131  		c := auxIntToInt64(v_0.AuxInt)
 11132  		idx := v_1
 11133  		val := v_2
 11134  		mem := v_3
 11135  		if !(is32Bit(c)) {
 11136  			break
 11137  		}
 11138  		v.reset(OpARM64MOVDstore)
 11139  		v.AuxInt = int32ToAuxInt(int32(c))
 11140  		v.AddArg3(idx, val, mem)
 11141  		return true
 11142  	}
 11143  	// match: (MOVDstoreidx ptr (SLLconst [3] idx) val mem)
 11144  	// result: (MOVDstoreidx8 ptr idx val mem)
 11145  	for {
 11146  		ptr := v_0
 11147  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
 11148  			break
 11149  		}
 11150  		idx := v_1.Args[0]
 11151  		val := v_2
 11152  		mem := v_3
 11153  		v.reset(OpARM64MOVDstoreidx8)
 11154  		v.AddArg4(ptr, idx, val, mem)
 11155  		return true
 11156  	}
 11157  	// match: (MOVDstoreidx (SLLconst [3] idx) ptr val mem)
 11158  	// result: (MOVDstoreidx8 ptr idx val mem)
 11159  	for {
 11160  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
 11161  			break
 11162  		}
 11163  		idx := v_0.Args[0]
 11164  		ptr := v_1
 11165  		val := v_2
 11166  		mem := v_3
 11167  		v.reset(OpARM64MOVDstoreidx8)
 11168  		v.AddArg4(ptr, idx, val, mem)
 11169  		return true
 11170  	}
 11171  	return false
 11172  }
 11173  func rewriteValueARM64_OpARM64MOVDstoreidx8(v *Value) bool {
 11174  	v_3 := v.Args[3]
 11175  	v_2 := v.Args[2]
 11176  	v_1 := v.Args[1]
 11177  	v_0 := v.Args[0]
 11178  	// match: (MOVDstoreidx8 ptr (MOVDconst [c]) val mem)
 11179  	// cond: is32Bit(c<<3)
 11180  	// result: (MOVDstore [int32(c)<<3] ptr val mem)
 11181  	for {
 11182  		ptr := v_0
 11183  		if v_1.Op != OpARM64MOVDconst {
 11184  			break
 11185  		}
 11186  		c := auxIntToInt64(v_1.AuxInt)
 11187  		val := v_2
 11188  		mem := v_3
 11189  		if !(is32Bit(c << 3)) {
 11190  			break
 11191  		}
 11192  		v.reset(OpARM64MOVDstore)
 11193  		v.AuxInt = int32ToAuxInt(int32(c) << 3)
 11194  		v.AddArg3(ptr, val, mem)
 11195  		return true
 11196  	}
 11197  	return false
 11198  }
 11199  func rewriteValueARM64_OpARM64MOVHUload(v *Value) bool {
 11200  	v_1 := v.Args[1]
 11201  	v_0 := v.Args[0]
 11202  	b := v.Block
 11203  	config := b.Func.Config
 11204  	// match: (MOVHUload [off1] {sym} (ADDconst [off2] ptr) mem)
 11205  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11206  	// result: (MOVHUload [off1+int32(off2)] {sym} ptr mem)
 11207  	for {
 11208  		off1 := auxIntToInt32(v.AuxInt)
 11209  		sym := auxToSym(v.Aux)
 11210  		if v_0.Op != OpARM64ADDconst {
 11211  			break
 11212  		}
 11213  		off2 := auxIntToInt64(v_0.AuxInt)
 11214  		ptr := v_0.Args[0]
 11215  		mem := v_1
 11216  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11217  			break
 11218  		}
 11219  		v.reset(OpARM64MOVHUload)
 11220  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 11221  		v.Aux = symToAux(sym)
 11222  		v.AddArg2(ptr, mem)
 11223  		return true
 11224  	}
 11225  	// match: (MOVHUload [off] {sym} (ADD ptr idx) mem)
 11226  	// cond: off == 0 && sym == nil
 11227  	// result: (MOVHUloadidx ptr idx mem)
 11228  	for {
 11229  		off := auxIntToInt32(v.AuxInt)
 11230  		sym := auxToSym(v.Aux)
 11231  		if v_0.Op != OpARM64ADD {
 11232  			break
 11233  		}
 11234  		idx := v_0.Args[1]
 11235  		ptr := v_0.Args[0]
 11236  		mem := v_1
 11237  		if !(off == 0 && sym == nil) {
 11238  			break
 11239  		}
 11240  		v.reset(OpARM64MOVHUloadidx)
 11241  		v.AddArg3(ptr, idx, mem)
 11242  		return true
 11243  	}
 11244  	// match: (MOVHUload [off] {sym} (ADDshiftLL [1] ptr idx) mem)
 11245  	// cond: off == 0 && sym == nil
 11246  	// result: (MOVHUloadidx2 ptr idx mem)
 11247  	for {
 11248  		off := auxIntToInt32(v.AuxInt)
 11249  		sym := auxToSym(v.Aux)
 11250  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 1 {
 11251  			break
 11252  		}
 11253  		idx := v_0.Args[1]
 11254  		ptr := v_0.Args[0]
 11255  		mem := v_1
 11256  		if !(off == 0 && sym == nil) {
 11257  			break
 11258  		}
 11259  		v.reset(OpARM64MOVHUloadidx2)
 11260  		v.AddArg3(ptr, idx, mem)
 11261  		return true
 11262  	}
 11263  	// match: (MOVHUload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 11264  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11265  	// result: (MOVHUload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 11266  	for {
 11267  		off1 := auxIntToInt32(v.AuxInt)
 11268  		sym1 := auxToSym(v.Aux)
 11269  		if v_0.Op != OpARM64MOVDaddr {
 11270  			break
 11271  		}
 11272  		off2 := auxIntToInt32(v_0.AuxInt)
 11273  		sym2 := auxToSym(v_0.Aux)
 11274  		ptr := v_0.Args[0]
 11275  		mem := v_1
 11276  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11277  			break
 11278  		}
 11279  		v.reset(OpARM64MOVHUload)
 11280  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11281  		v.Aux = symToAux(mergeSym(sym1, sym2))
 11282  		v.AddArg2(ptr, mem)
 11283  		return true
 11284  	}
 11285  	// match: (MOVHUload [off] {sym} (SB) _)
 11286  	// cond: symIsRO(sym)
 11287  	// result: (MOVDconst [int64(read16(sym, int64(off), config.ctxt.Arch.ByteOrder))])
 11288  	for {
 11289  		off := auxIntToInt32(v.AuxInt)
 11290  		sym := auxToSym(v.Aux)
 11291  		if v_0.Op != OpSB || !(symIsRO(sym)) {
 11292  			break
 11293  		}
 11294  		v.reset(OpARM64MOVDconst)
 11295  		v.AuxInt = int64ToAuxInt(int64(read16(sym, int64(off), config.ctxt.Arch.ByteOrder)))
 11296  		return true
 11297  	}
 11298  	return false
 11299  }
 11300  func rewriteValueARM64_OpARM64MOVHUloadidx(v *Value) bool {
 11301  	v_2 := v.Args[2]
 11302  	v_1 := v.Args[1]
 11303  	v_0 := v.Args[0]
 11304  	// match: (MOVHUloadidx ptr (MOVDconst [c]) mem)
 11305  	// cond: is32Bit(c)
 11306  	// result: (MOVHUload [int32(c)] ptr mem)
 11307  	for {
 11308  		ptr := v_0
 11309  		if v_1.Op != OpARM64MOVDconst {
 11310  			break
 11311  		}
 11312  		c := auxIntToInt64(v_1.AuxInt)
 11313  		mem := v_2
 11314  		if !(is32Bit(c)) {
 11315  			break
 11316  		}
 11317  		v.reset(OpARM64MOVHUload)
 11318  		v.AuxInt = int32ToAuxInt(int32(c))
 11319  		v.AddArg2(ptr, mem)
 11320  		return true
 11321  	}
 11322  	// match: (MOVHUloadidx (MOVDconst [c]) ptr mem)
 11323  	// cond: is32Bit(c)
 11324  	// result: (MOVHUload [int32(c)] ptr mem)
 11325  	for {
 11326  		if v_0.Op != OpARM64MOVDconst {
 11327  			break
 11328  		}
 11329  		c := auxIntToInt64(v_0.AuxInt)
 11330  		ptr := v_1
 11331  		mem := v_2
 11332  		if !(is32Bit(c)) {
 11333  			break
 11334  		}
 11335  		v.reset(OpARM64MOVHUload)
 11336  		v.AuxInt = int32ToAuxInt(int32(c))
 11337  		v.AddArg2(ptr, mem)
 11338  		return true
 11339  	}
 11340  	// match: (MOVHUloadidx ptr (SLLconst [1] idx) mem)
 11341  	// result: (MOVHUloadidx2 ptr idx mem)
 11342  	for {
 11343  		ptr := v_0
 11344  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 1 {
 11345  			break
 11346  		}
 11347  		idx := v_1.Args[0]
 11348  		mem := v_2
 11349  		v.reset(OpARM64MOVHUloadidx2)
 11350  		v.AddArg3(ptr, idx, mem)
 11351  		return true
 11352  	}
 11353  	// match: (MOVHUloadidx ptr (ADD idx idx) mem)
 11354  	// result: (MOVHUloadidx2 ptr idx mem)
 11355  	for {
 11356  		ptr := v_0
 11357  		if v_1.Op != OpARM64ADD {
 11358  			break
 11359  		}
 11360  		idx := v_1.Args[1]
 11361  		if idx != v_1.Args[0] {
 11362  			break
 11363  		}
 11364  		mem := v_2
 11365  		v.reset(OpARM64MOVHUloadidx2)
 11366  		v.AddArg3(ptr, idx, mem)
 11367  		return true
 11368  	}
 11369  	// match: (MOVHUloadidx (ADD idx idx) ptr mem)
 11370  	// result: (MOVHUloadidx2 ptr idx mem)
 11371  	for {
 11372  		if v_0.Op != OpARM64ADD {
 11373  			break
 11374  		}
 11375  		idx := v_0.Args[1]
 11376  		if idx != v_0.Args[0] {
 11377  			break
 11378  		}
 11379  		ptr := v_1
 11380  		mem := v_2
 11381  		v.reset(OpARM64MOVHUloadidx2)
 11382  		v.AddArg3(ptr, idx, mem)
 11383  		return true
 11384  	}
 11385  	return false
 11386  }
 11387  func rewriteValueARM64_OpARM64MOVHUloadidx2(v *Value) bool {
 11388  	v_2 := v.Args[2]
 11389  	v_1 := v.Args[1]
 11390  	v_0 := v.Args[0]
 11391  	// match: (MOVHUloadidx2 ptr (MOVDconst [c]) mem)
 11392  	// cond: is32Bit(c<<1)
 11393  	// result: (MOVHUload [int32(c)<<1] ptr mem)
 11394  	for {
 11395  		ptr := v_0
 11396  		if v_1.Op != OpARM64MOVDconst {
 11397  			break
 11398  		}
 11399  		c := auxIntToInt64(v_1.AuxInt)
 11400  		mem := v_2
 11401  		if !(is32Bit(c << 1)) {
 11402  			break
 11403  		}
 11404  		v.reset(OpARM64MOVHUload)
 11405  		v.AuxInt = int32ToAuxInt(int32(c) << 1)
 11406  		v.AddArg2(ptr, mem)
 11407  		return true
 11408  	}
 11409  	return false
 11410  }
 11411  func rewriteValueARM64_OpARM64MOVHUreg(v *Value) bool {
 11412  	v_0 := v.Args[0]
 11413  	// match: (MOVHUreg (ANDconst [c] x))
 11414  	// result: (ANDconst [c&(1<<16-1)] x)
 11415  	for {
 11416  		if v_0.Op != OpARM64ANDconst {
 11417  			break
 11418  		}
 11419  		c := auxIntToInt64(v_0.AuxInt)
 11420  		x := v_0.Args[0]
 11421  		v.reset(OpARM64ANDconst)
 11422  		v.AuxInt = int64ToAuxInt(c & (1<<16 - 1))
 11423  		v.AddArg(x)
 11424  		return true
 11425  	}
 11426  	// match: (MOVHUreg (MOVDconst [c]))
 11427  	// result: (MOVDconst [int64(uint16(c))])
 11428  	for {
 11429  		if v_0.Op != OpARM64MOVDconst {
 11430  			break
 11431  		}
 11432  		c := auxIntToInt64(v_0.AuxInt)
 11433  		v.reset(OpARM64MOVDconst)
 11434  		v.AuxInt = int64ToAuxInt(int64(uint16(c)))
 11435  		return true
 11436  	}
 11437  	// match: (MOVHUreg x)
 11438  	// cond: v.Type.Size() <= 2
 11439  	// result: x
 11440  	for {
 11441  		x := v_0
 11442  		if !(v.Type.Size() <= 2) {
 11443  			break
 11444  		}
 11445  		v.copyOf(x)
 11446  		return true
 11447  	}
 11448  	// match: (MOVHUreg (SLLconst [lc] x))
 11449  	// cond: lc >= 16
 11450  	// result: (MOVDconst [0])
 11451  	for {
 11452  		if v_0.Op != OpARM64SLLconst {
 11453  			break
 11454  		}
 11455  		lc := auxIntToInt64(v_0.AuxInt)
 11456  		if !(lc >= 16) {
 11457  			break
 11458  		}
 11459  		v.reset(OpARM64MOVDconst)
 11460  		v.AuxInt = int64ToAuxInt(0)
 11461  		return true
 11462  	}
 11463  	// match: (MOVHUreg (SLLconst [lc] x))
 11464  	// cond: lc < 16
 11465  	// result: (UBFIZ [armBFAuxInt(lc, 16-lc)] x)
 11466  	for {
 11467  		if v_0.Op != OpARM64SLLconst {
 11468  			break
 11469  		}
 11470  		lc := auxIntToInt64(v_0.AuxInt)
 11471  		x := v_0.Args[0]
 11472  		if !(lc < 16) {
 11473  			break
 11474  		}
 11475  		v.reset(OpARM64UBFIZ)
 11476  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 16-lc))
 11477  		v.AddArg(x)
 11478  		return true
 11479  	}
 11480  	// match: (MOVHUreg (SRLconst [rc] x))
 11481  	// cond: rc < 16
 11482  	// result: (UBFX [armBFAuxInt(rc, 16)] x)
 11483  	for {
 11484  		if v_0.Op != OpARM64SRLconst {
 11485  			break
 11486  		}
 11487  		rc := auxIntToInt64(v_0.AuxInt)
 11488  		x := v_0.Args[0]
 11489  		if !(rc < 16) {
 11490  			break
 11491  		}
 11492  		v.reset(OpARM64UBFX)
 11493  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 16))
 11494  		v.AddArg(x)
 11495  		return true
 11496  	}
 11497  	// match: (MOVHUreg (UBFX [bfc] x))
 11498  	// cond: bfc.width() <= 16
 11499  	// result: (UBFX [bfc] x)
 11500  	for {
 11501  		if v_0.Op != OpARM64UBFX {
 11502  			break
 11503  		}
 11504  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 11505  		x := v_0.Args[0]
 11506  		if !(bfc.width() <= 16) {
 11507  			break
 11508  		}
 11509  		v.reset(OpARM64UBFX)
 11510  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 11511  		v.AddArg(x)
 11512  		return true
 11513  	}
 11514  	return false
 11515  }
 11516  func rewriteValueARM64_OpARM64MOVHload(v *Value) bool {
 11517  	v_1 := v.Args[1]
 11518  	v_0 := v.Args[0]
 11519  	b := v.Block
 11520  	config := b.Func.Config
 11521  	// match: (MOVHload [off1] {sym} (ADDconst [off2] ptr) mem)
 11522  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11523  	// result: (MOVHload [off1+int32(off2)] {sym} ptr mem)
 11524  	for {
 11525  		off1 := auxIntToInt32(v.AuxInt)
 11526  		sym := auxToSym(v.Aux)
 11527  		if v_0.Op != OpARM64ADDconst {
 11528  			break
 11529  		}
 11530  		off2 := auxIntToInt64(v_0.AuxInt)
 11531  		ptr := v_0.Args[0]
 11532  		mem := v_1
 11533  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11534  			break
 11535  		}
 11536  		v.reset(OpARM64MOVHload)
 11537  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 11538  		v.Aux = symToAux(sym)
 11539  		v.AddArg2(ptr, mem)
 11540  		return true
 11541  	}
 11542  	// match: (MOVHload [off] {sym} (ADD ptr idx) mem)
 11543  	// cond: off == 0 && sym == nil
 11544  	// result: (MOVHloadidx ptr idx mem)
 11545  	for {
 11546  		off := auxIntToInt32(v.AuxInt)
 11547  		sym := auxToSym(v.Aux)
 11548  		if v_0.Op != OpARM64ADD {
 11549  			break
 11550  		}
 11551  		idx := v_0.Args[1]
 11552  		ptr := v_0.Args[0]
 11553  		mem := v_1
 11554  		if !(off == 0 && sym == nil) {
 11555  			break
 11556  		}
 11557  		v.reset(OpARM64MOVHloadidx)
 11558  		v.AddArg3(ptr, idx, mem)
 11559  		return true
 11560  	}
 11561  	// match: (MOVHload [off] {sym} (ADDshiftLL [1] ptr idx) mem)
 11562  	// cond: off == 0 && sym == nil
 11563  	// result: (MOVHloadidx2 ptr idx mem)
 11564  	for {
 11565  		off := auxIntToInt32(v.AuxInt)
 11566  		sym := auxToSym(v.Aux)
 11567  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 1 {
 11568  			break
 11569  		}
 11570  		idx := v_0.Args[1]
 11571  		ptr := v_0.Args[0]
 11572  		mem := v_1
 11573  		if !(off == 0 && sym == nil) {
 11574  			break
 11575  		}
 11576  		v.reset(OpARM64MOVHloadidx2)
 11577  		v.AddArg3(ptr, idx, mem)
 11578  		return true
 11579  	}
 11580  	// match: (MOVHload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 11581  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11582  	// result: (MOVHload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 11583  	for {
 11584  		off1 := auxIntToInt32(v.AuxInt)
 11585  		sym1 := auxToSym(v.Aux)
 11586  		if v_0.Op != OpARM64MOVDaddr {
 11587  			break
 11588  		}
 11589  		off2 := auxIntToInt32(v_0.AuxInt)
 11590  		sym2 := auxToSym(v_0.Aux)
 11591  		ptr := v_0.Args[0]
 11592  		mem := v_1
 11593  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11594  			break
 11595  		}
 11596  		v.reset(OpARM64MOVHload)
 11597  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11598  		v.Aux = symToAux(mergeSym(sym1, sym2))
 11599  		v.AddArg2(ptr, mem)
 11600  		return true
 11601  	}
 11602  	// match: (MOVHload [off] {sym} (SB) _)
 11603  	// cond: symIsRO(sym)
 11604  	// result: (MOVDconst [int64(int16(read16(sym, int64(off), config.ctxt.Arch.ByteOrder)))])
 11605  	for {
 11606  		off := auxIntToInt32(v.AuxInt)
 11607  		sym := auxToSym(v.Aux)
 11608  		if v_0.Op != OpSB || !(symIsRO(sym)) {
 11609  			break
 11610  		}
 11611  		v.reset(OpARM64MOVDconst)
 11612  		v.AuxInt = int64ToAuxInt(int64(int16(read16(sym, int64(off), config.ctxt.Arch.ByteOrder))))
 11613  		return true
 11614  	}
 11615  	return false
 11616  }
 11617  func rewriteValueARM64_OpARM64MOVHloadidx(v *Value) bool {
 11618  	v_2 := v.Args[2]
 11619  	v_1 := v.Args[1]
 11620  	v_0 := v.Args[0]
 11621  	// match: (MOVHloadidx ptr (MOVDconst [c]) mem)
 11622  	// cond: is32Bit(c)
 11623  	// result: (MOVHload [int32(c)] ptr mem)
 11624  	for {
 11625  		ptr := v_0
 11626  		if v_1.Op != OpARM64MOVDconst {
 11627  			break
 11628  		}
 11629  		c := auxIntToInt64(v_1.AuxInt)
 11630  		mem := v_2
 11631  		if !(is32Bit(c)) {
 11632  			break
 11633  		}
 11634  		v.reset(OpARM64MOVHload)
 11635  		v.AuxInt = int32ToAuxInt(int32(c))
 11636  		v.AddArg2(ptr, mem)
 11637  		return true
 11638  	}
 11639  	// match: (MOVHloadidx (MOVDconst [c]) ptr mem)
 11640  	// cond: is32Bit(c)
 11641  	// result: (MOVHload [int32(c)] ptr mem)
 11642  	for {
 11643  		if v_0.Op != OpARM64MOVDconst {
 11644  			break
 11645  		}
 11646  		c := auxIntToInt64(v_0.AuxInt)
 11647  		ptr := v_1
 11648  		mem := v_2
 11649  		if !(is32Bit(c)) {
 11650  			break
 11651  		}
 11652  		v.reset(OpARM64MOVHload)
 11653  		v.AuxInt = int32ToAuxInt(int32(c))
 11654  		v.AddArg2(ptr, mem)
 11655  		return true
 11656  	}
 11657  	// match: (MOVHloadidx ptr (SLLconst [1] idx) mem)
 11658  	// result: (MOVHloadidx2 ptr idx mem)
 11659  	for {
 11660  		ptr := v_0
 11661  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 1 {
 11662  			break
 11663  		}
 11664  		idx := v_1.Args[0]
 11665  		mem := v_2
 11666  		v.reset(OpARM64MOVHloadidx2)
 11667  		v.AddArg3(ptr, idx, mem)
 11668  		return true
 11669  	}
 11670  	// match: (MOVHloadidx ptr (ADD idx idx) mem)
 11671  	// result: (MOVHloadidx2 ptr idx mem)
 11672  	for {
 11673  		ptr := v_0
 11674  		if v_1.Op != OpARM64ADD {
 11675  			break
 11676  		}
 11677  		idx := v_1.Args[1]
 11678  		if idx != v_1.Args[0] {
 11679  			break
 11680  		}
 11681  		mem := v_2
 11682  		v.reset(OpARM64MOVHloadidx2)
 11683  		v.AddArg3(ptr, idx, mem)
 11684  		return true
 11685  	}
 11686  	// match: (MOVHloadidx (ADD idx idx) ptr mem)
 11687  	// result: (MOVHloadidx2 ptr idx mem)
 11688  	for {
 11689  		if v_0.Op != OpARM64ADD {
 11690  			break
 11691  		}
 11692  		idx := v_0.Args[1]
 11693  		if idx != v_0.Args[0] {
 11694  			break
 11695  		}
 11696  		ptr := v_1
 11697  		mem := v_2
 11698  		v.reset(OpARM64MOVHloadidx2)
 11699  		v.AddArg3(ptr, idx, mem)
 11700  		return true
 11701  	}
 11702  	return false
 11703  }
 11704  func rewriteValueARM64_OpARM64MOVHloadidx2(v *Value) bool {
 11705  	v_2 := v.Args[2]
 11706  	v_1 := v.Args[1]
 11707  	v_0 := v.Args[0]
 11708  	// match: (MOVHloadidx2 ptr (MOVDconst [c]) mem)
 11709  	// cond: is32Bit(c<<1)
 11710  	// result: (MOVHload [int32(c)<<1] ptr mem)
 11711  	for {
 11712  		ptr := v_0
 11713  		if v_1.Op != OpARM64MOVDconst {
 11714  			break
 11715  		}
 11716  		c := auxIntToInt64(v_1.AuxInt)
 11717  		mem := v_2
 11718  		if !(is32Bit(c << 1)) {
 11719  			break
 11720  		}
 11721  		v.reset(OpARM64MOVHload)
 11722  		v.AuxInt = int32ToAuxInt(int32(c) << 1)
 11723  		v.AddArg2(ptr, mem)
 11724  		return true
 11725  	}
 11726  	return false
 11727  }
 11728  func rewriteValueARM64_OpARM64MOVHreg(v *Value) bool {
 11729  	v_0 := v.Args[0]
 11730  	// match: (MOVHreg (MOVDconst [c]))
 11731  	// result: (MOVDconst [int64(int16(c))])
 11732  	for {
 11733  		if v_0.Op != OpARM64MOVDconst {
 11734  			break
 11735  		}
 11736  		c := auxIntToInt64(v_0.AuxInt)
 11737  		v.reset(OpARM64MOVDconst)
 11738  		v.AuxInt = int64ToAuxInt(int64(int16(c)))
 11739  		return true
 11740  	}
 11741  	// match: (MOVHreg x)
 11742  	// cond: v.Type.Size() <= 2
 11743  	// result: x
 11744  	for {
 11745  		x := v_0
 11746  		if !(v.Type.Size() <= 2) {
 11747  			break
 11748  		}
 11749  		v.copyOf(x)
 11750  		return true
 11751  	}
 11752  	// match: (MOVHreg <t> (ANDconst x [c]))
 11753  	// cond: uint64(c) & uint64(0xffffffffffff8000) == 0
 11754  	// result: (ANDconst <t> x [c])
 11755  	for {
 11756  		t := v.Type
 11757  		if v_0.Op != OpARM64ANDconst {
 11758  			break
 11759  		}
 11760  		c := auxIntToInt64(v_0.AuxInt)
 11761  		x := v_0.Args[0]
 11762  		if !(uint64(c)&uint64(0xffffffffffff8000) == 0) {
 11763  			break
 11764  		}
 11765  		v.reset(OpARM64ANDconst)
 11766  		v.Type = t
 11767  		v.AuxInt = int64ToAuxInt(c)
 11768  		v.AddArg(x)
 11769  		return true
 11770  	}
 11771  	// match: (MOVHreg (SLLconst [lc] x))
 11772  	// cond: lc < 16
 11773  	// result: (SBFIZ [armBFAuxInt(lc, 16-lc)] x)
 11774  	for {
 11775  		if v_0.Op != OpARM64SLLconst {
 11776  			break
 11777  		}
 11778  		lc := auxIntToInt64(v_0.AuxInt)
 11779  		x := v_0.Args[0]
 11780  		if !(lc < 16) {
 11781  			break
 11782  		}
 11783  		v.reset(OpARM64SBFIZ)
 11784  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 16-lc))
 11785  		v.AddArg(x)
 11786  		return true
 11787  	}
 11788  	// match: (MOVHreg (SBFX [bfc] x))
 11789  	// cond: bfc.width() <= 16
 11790  	// result: (SBFX [bfc] x)
 11791  	for {
 11792  		if v_0.Op != OpARM64SBFX {
 11793  			break
 11794  		}
 11795  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 11796  		x := v_0.Args[0]
 11797  		if !(bfc.width() <= 16) {
 11798  			break
 11799  		}
 11800  		v.reset(OpARM64SBFX)
 11801  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 11802  		v.AddArg(x)
 11803  		return true
 11804  	}
 11805  	return false
 11806  }
 11807  func rewriteValueARM64_OpARM64MOVHstore(v *Value) bool {
 11808  	v_2 := v.Args[2]
 11809  	v_1 := v.Args[1]
 11810  	v_0 := v.Args[0]
 11811  	b := v.Block
 11812  	config := b.Func.Config
 11813  	// match: (MOVHstore [off1] {sym} (ADDconst [off2] ptr) val mem)
 11814  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11815  	// result: (MOVHstore [off1+int32(off2)] {sym} ptr val mem)
 11816  	for {
 11817  		off1 := auxIntToInt32(v.AuxInt)
 11818  		sym := auxToSym(v.Aux)
 11819  		if v_0.Op != OpARM64ADDconst {
 11820  			break
 11821  		}
 11822  		off2 := auxIntToInt64(v_0.AuxInt)
 11823  		ptr := v_0.Args[0]
 11824  		val := v_1
 11825  		mem := v_2
 11826  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11827  			break
 11828  		}
 11829  		v.reset(OpARM64MOVHstore)
 11830  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 11831  		v.Aux = symToAux(sym)
 11832  		v.AddArg3(ptr, val, mem)
 11833  		return true
 11834  	}
 11835  	// match: (MOVHstore [off] {sym} (ADD ptr idx) val mem)
 11836  	// cond: off == 0 && sym == nil
 11837  	// result: (MOVHstoreidx ptr idx val mem)
 11838  	for {
 11839  		off := auxIntToInt32(v.AuxInt)
 11840  		sym := auxToSym(v.Aux)
 11841  		if v_0.Op != OpARM64ADD {
 11842  			break
 11843  		}
 11844  		idx := v_0.Args[1]
 11845  		ptr := v_0.Args[0]
 11846  		val := v_1
 11847  		mem := v_2
 11848  		if !(off == 0 && sym == nil) {
 11849  			break
 11850  		}
 11851  		v.reset(OpARM64MOVHstoreidx)
 11852  		v.AddArg4(ptr, idx, val, mem)
 11853  		return true
 11854  	}
 11855  	// match: (MOVHstore [off] {sym} (ADDshiftLL [1] ptr idx) val mem)
 11856  	// cond: off == 0 && sym == nil
 11857  	// result: (MOVHstoreidx2 ptr idx val mem)
 11858  	for {
 11859  		off := auxIntToInt32(v.AuxInt)
 11860  		sym := auxToSym(v.Aux)
 11861  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 1 {
 11862  			break
 11863  		}
 11864  		idx := v_0.Args[1]
 11865  		ptr := v_0.Args[0]
 11866  		val := v_1
 11867  		mem := v_2
 11868  		if !(off == 0 && sym == nil) {
 11869  			break
 11870  		}
 11871  		v.reset(OpARM64MOVHstoreidx2)
 11872  		v.AddArg4(ptr, idx, val, mem)
 11873  		return true
 11874  	}
 11875  	// match: (MOVHstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
 11876  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11877  	// result: (MOVHstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
 11878  	for {
 11879  		off1 := auxIntToInt32(v.AuxInt)
 11880  		sym1 := auxToSym(v.Aux)
 11881  		if v_0.Op != OpARM64MOVDaddr {
 11882  			break
 11883  		}
 11884  		off2 := auxIntToInt32(v_0.AuxInt)
 11885  		sym2 := auxToSym(v_0.Aux)
 11886  		ptr := v_0.Args[0]
 11887  		val := v_1
 11888  		mem := v_2
 11889  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11890  			break
 11891  		}
 11892  		v.reset(OpARM64MOVHstore)
 11893  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11894  		v.Aux = symToAux(mergeSym(sym1, sym2))
 11895  		v.AddArg3(ptr, val, mem)
 11896  		return true
 11897  	}
 11898  	// match: (MOVHstore [off] {sym} ptr (MOVHreg x) mem)
 11899  	// result: (MOVHstore [off] {sym} ptr x mem)
 11900  	for {
 11901  		off := auxIntToInt32(v.AuxInt)
 11902  		sym := auxToSym(v.Aux)
 11903  		ptr := v_0
 11904  		if v_1.Op != OpARM64MOVHreg {
 11905  			break
 11906  		}
 11907  		x := v_1.Args[0]
 11908  		mem := v_2
 11909  		v.reset(OpARM64MOVHstore)
 11910  		v.AuxInt = int32ToAuxInt(off)
 11911  		v.Aux = symToAux(sym)
 11912  		v.AddArg3(ptr, x, mem)
 11913  		return true
 11914  	}
 11915  	// match: (MOVHstore [off] {sym} ptr (MOVHUreg x) mem)
 11916  	// result: (MOVHstore [off] {sym} ptr x mem)
 11917  	for {
 11918  		off := auxIntToInt32(v.AuxInt)
 11919  		sym := auxToSym(v.Aux)
 11920  		ptr := v_0
 11921  		if v_1.Op != OpARM64MOVHUreg {
 11922  			break
 11923  		}
 11924  		x := v_1.Args[0]
 11925  		mem := v_2
 11926  		v.reset(OpARM64MOVHstore)
 11927  		v.AuxInt = int32ToAuxInt(off)
 11928  		v.Aux = symToAux(sym)
 11929  		v.AddArg3(ptr, x, mem)
 11930  		return true
 11931  	}
 11932  	// match: (MOVHstore [off] {sym} ptr (MOVWreg x) mem)
 11933  	// result: (MOVHstore [off] {sym} ptr x mem)
 11934  	for {
 11935  		off := auxIntToInt32(v.AuxInt)
 11936  		sym := auxToSym(v.Aux)
 11937  		ptr := v_0
 11938  		if v_1.Op != OpARM64MOVWreg {
 11939  			break
 11940  		}
 11941  		x := v_1.Args[0]
 11942  		mem := v_2
 11943  		v.reset(OpARM64MOVHstore)
 11944  		v.AuxInt = int32ToAuxInt(off)
 11945  		v.Aux = symToAux(sym)
 11946  		v.AddArg3(ptr, x, mem)
 11947  		return true
 11948  	}
 11949  	// match: (MOVHstore [off] {sym} ptr (MOVWUreg x) mem)
 11950  	// result: (MOVHstore [off] {sym} ptr x mem)
 11951  	for {
 11952  		off := auxIntToInt32(v.AuxInt)
 11953  		sym := auxToSym(v.Aux)
 11954  		ptr := v_0
 11955  		if v_1.Op != OpARM64MOVWUreg {
 11956  			break
 11957  		}
 11958  		x := v_1.Args[0]
 11959  		mem := v_2
 11960  		v.reset(OpARM64MOVHstore)
 11961  		v.AuxInt = int32ToAuxInt(off)
 11962  		v.Aux = symToAux(sym)
 11963  		v.AddArg3(ptr, x, mem)
 11964  		return true
 11965  	}
 11966  	return false
 11967  }
 11968  func rewriteValueARM64_OpARM64MOVHstoreidx(v *Value) bool {
 11969  	v_3 := v.Args[3]
 11970  	v_2 := v.Args[2]
 11971  	v_1 := v.Args[1]
 11972  	v_0 := v.Args[0]
 11973  	// match: (MOVHstoreidx ptr (MOVDconst [c]) val mem)
 11974  	// cond: is32Bit(c)
 11975  	// result: (MOVHstore [int32(c)] ptr val mem)
 11976  	for {
 11977  		ptr := v_0
 11978  		if v_1.Op != OpARM64MOVDconst {
 11979  			break
 11980  		}
 11981  		c := auxIntToInt64(v_1.AuxInt)
 11982  		val := v_2
 11983  		mem := v_3
 11984  		if !(is32Bit(c)) {
 11985  			break
 11986  		}
 11987  		v.reset(OpARM64MOVHstore)
 11988  		v.AuxInt = int32ToAuxInt(int32(c))
 11989  		v.AddArg3(ptr, val, mem)
 11990  		return true
 11991  	}
 11992  	// match: (MOVHstoreidx (MOVDconst [c]) idx val mem)
 11993  	// cond: is32Bit(c)
 11994  	// result: (MOVHstore [int32(c)] idx val mem)
 11995  	for {
 11996  		if v_0.Op != OpARM64MOVDconst {
 11997  			break
 11998  		}
 11999  		c := auxIntToInt64(v_0.AuxInt)
 12000  		idx := v_1
 12001  		val := v_2
 12002  		mem := v_3
 12003  		if !(is32Bit(c)) {
 12004  			break
 12005  		}
 12006  		v.reset(OpARM64MOVHstore)
 12007  		v.AuxInt = int32ToAuxInt(int32(c))
 12008  		v.AddArg3(idx, val, mem)
 12009  		return true
 12010  	}
 12011  	// match: (MOVHstoreidx ptr (SLLconst [1] idx) val mem)
 12012  	// result: (MOVHstoreidx2 ptr idx val mem)
 12013  	for {
 12014  		ptr := v_0
 12015  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 1 {
 12016  			break
 12017  		}
 12018  		idx := v_1.Args[0]
 12019  		val := v_2
 12020  		mem := v_3
 12021  		v.reset(OpARM64MOVHstoreidx2)
 12022  		v.AddArg4(ptr, idx, val, mem)
 12023  		return true
 12024  	}
 12025  	// match: (MOVHstoreidx ptr (ADD idx idx) val mem)
 12026  	// result: (MOVHstoreidx2 ptr idx val mem)
 12027  	for {
 12028  		ptr := v_0
 12029  		if v_1.Op != OpARM64ADD {
 12030  			break
 12031  		}
 12032  		idx := v_1.Args[1]
 12033  		if idx != v_1.Args[0] {
 12034  			break
 12035  		}
 12036  		val := v_2
 12037  		mem := v_3
 12038  		v.reset(OpARM64MOVHstoreidx2)
 12039  		v.AddArg4(ptr, idx, val, mem)
 12040  		return true
 12041  	}
 12042  	// match: (MOVHstoreidx (SLLconst [1] idx) ptr val mem)
 12043  	// result: (MOVHstoreidx2 ptr idx val mem)
 12044  	for {
 12045  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 1 {
 12046  			break
 12047  		}
 12048  		idx := v_0.Args[0]
 12049  		ptr := v_1
 12050  		val := v_2
 12051  		mem := v_3
 12052  		v.reset(OpARM64MOVHstoreidx2)
 12053  		v.AddArg4(ptr, idx, val, mem)
 12054  		return true
 12055  	}
 12056  	// match: (MOVHstoreidx (ADD idx idx) ptr val mem)
 12057  	// result: (MOVHstoreidx2 ptr idx val mem)
 12058  	for {
 12059  		if v_0.Op != OpARM64ADD {
 12060  			break
 12061  		}
 12062  		idx := v_0.Args[1]
 12063  		if idx != v_0.Args[0] {
 12064  			break
 12065  		}
 12066  		ptr := v_1
 12067  		val := v_2
 12068  		mem := v_3
 12069  		v.reset(OpARM64MOVHstoreidx2)
 12070  		v.AddArg4(ptr, idx, val, mem)
 12071  		return true
 12072  	}
 12073  	// match: (MOVHstoreidx ptr idx (MOVHreg x) mem)
 12074  	// result: (MOVHstoreidx ptr idx x mem)
 12075  	for {
 12076  		ptr := v_0
 12077  		idx := v_1
 12078  		if v_2.Op != OpARM64MOVHreg {
 12079  			break
 12080  		}
 12081  		x := v_2.Args[0]
 12082  		mem := v_3
 12083  		v.reset(OpARM64MOVHstoreidx)
 12084  		v.AddArg4(ptr, idx, x, mem)
 12085  		return true
 12086  	}
 12087  	// match: (MOVHstoreidx ptr idx (MOVHUreg x) mem)
 12088  	// result: (MOVHstoreidx ptr idx x mem)
 12089  	for {
 12090  		ptr := v_0
 12091  		idx := v_1
 12092  		if v_2.Op != OpARM64MOVHUreg {
 12093  			break
 12094  		}
 12095  		x := v_2.Args[0]
 12096  		mem := v_3
 12097  		v.reset(OpARM64MOVHstoreidx)
 12098  		v.AddArg4(ptr, idx, x, mem)
 12099  		return true
 12100  	}
 12101  	// match: (MOVHstoreidx ptr idx (MOVWreg x) mem)
 12102  	// result: (MOVHstoreidx ptr idx x mem)
 12103  	for {
 12104  		ptr := v_0
 12105  		idx := v_1
 12106  		if v_2.Op != OpARM64MOVWreg {
 12107  			break
 12108  		}
 12109  		x := v_2.Args[0]
 12110  		mem := v_3
 12111  		v.reset(OpARM64MOVHstoreidx)
 12112  		v.AddArg4(ptr, idx, x, mem)
 12113  		return true
 12114  	}
 12115  	// match: (MOVHstoreidx ptr idx (MOVWUreg x) mem)
 12116  	// result: (MOVHstoreidx ptr idx x mem)
 12117  	for {
 12118  		ptr := v_0
 12119  		idx := v_1
 12120  		if v_2.Op != OpARM64MOVWUreg {
 12121  			break
 12122  		}
 12123  		x := v_2.Args[0]
 12124  		mem := v_3
 12125  		v.reset(OpARM64MOVHstoreidx)
 12126  		v.AddArg4(ptr, idx, x, mem)
 12127  		return true
 12128  	}
 12129  	return false
 12130  }
 12131  func rewriteValueARM64_OpARM64MOVHstoreidx2(v *Value) bool {
 12132  	v_3 := v.Args[3]
 12133  	v_2 := v.Args[2]
 12134  	v_1 := v.Args[1]
 12135  	v_0 := v.Args[0]
 12136  	// match: (MOVHstoreidx2 ptr (MOVDconst [c]) val mem)
 12137  	// cond: is32Bit(c<<1)
 12138  	// result: (MOVHstore [int32(c)<<1] ptr val mem)
 12139  	for {
 12140  		ptr := v_0
 12141  		if v_1.Op != OpARM64MOVDconst {
 12142  			break
 12143  		}
 12144  		c := auxIntToInt64(v_1.AuxInt)
 12145  		val := v_2
 12146  		mem := v_3
 12147  		if !(is32Bit(c << 1)) {
 12148  			break
 12149  		}
 12150  		v.reset(OpARM64MOVHstore)
 12151  		v.AuxInt = int32ToAuxInt(int32(c) << 1)
 12152  		v.AddArg3(ptr, val, mem)
 12153  		return true
 12154  	}
 12155  	// match: (MOVHstoreidx2 ptr idx (MOVHreg x) mem)
 12156  	// result: (MOVHstoreidx2 ptr idx x mem)
 12157  	for {
 12158  		ptr := v_0
 12159  		idx := v_1
 12160  		if v_2.Op != OpARM64MOVHreg {
 12161  			break
 12162  		}
 12163  		x := v_2.Args[0]
 12164  		mem := v_3
 12165  		v.reset(OpARM64MOVHstoreidx2)
 12166  		v.AddArg4(ptr, idx, x, mem)
 12167  		return true
 12168  	}
 12169  	// match: (MOVHstoreidx2 ptr idx (MOVHUreg x) mem)
 12170  	// result: (MOVHstoreidx2 ptr idx x mem)
 12171  	for {
 12172  		ptr := v_0
 12173  		idx := v_1
 12174  		if v_2.Op != OpARM64MOVHUreg {
 12175  			break
 12176  		}
 12177  		x := v_2.Args[0]
 12178  		mem := v_3
 12179  		v.reset(OpARM64MOVHstoreidx2)
 12180  		v.AddArg4(ptr, idx, x, mem)
 12181  		return true
 12182  	}
 12183  	// match: (MOVHstoreidx2 ptr idx (MOVWreg x) mem)
 12184  	// result: (MOVHstoreidx2 ptr idx x mem)
 12185  	for {
 12186  		ptr := v_0
 12187  		idx := v_1
 12188  		if v_2.Op != OpARM64MOVWreg {
 12189  			break
 12190  		}
 12191  		x := v_2.Args[0]
 12192  		mem := v_3
 12193  		v.reset(OpARM64MOVHstoreidx2)
 12194  		v.AddArg4(ptr, idx, x, mem)
 12195  		return true
 12196  	}
 12197  	// match: (MOVHstoreidx2 ptr idx (MOVWUreg x) mem)
 12198  	// result: (MOVHstoreidx2 ptr idx x mem)
 12199  	for {
 12200  		ptr := v_0
 12201  		idx := v_1
 12202  		if v_2.Op != OpARM64MOVWUreg {
 12203  			break
 12204  		}
 12205  		x := v_2.Args[0]
 12206  		mem := v_3
 12207  		v.reset(OpARM64MOVHstoreidx2)
 12208  		v.AddArg4(ptr, idx, x, mem)
 12209  		return true
 12210  	}
 12211  	return false
 12212  }
 12213  func rewriteValueARM64_OpARM64MOVWUload(v *Value) bool {
 12214  	v_1 := v.Args[1]
 12215  	v_0 := v.Args[0]
 12216  	b := v.Block
 12217  	config := b.Func.Config
 12218  	// match: (MOVWUload [off] {sym} ptr (FMOVSstore [off] {sym} ptr val _))
 12219  	// result: (FMOVSfpgp val)
 12220  	for {
 12221  		off := auxIntToInt32(v.AuxInt)
 12222  		sym := auxToSym(v.Aux)
 12223  		ptr := v_0
 12224  		if v_1.Op != OpARM64FMOVSstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
 12225  			break
 12226  		}
 12227  		val := v_1.Args[1]
 12228  		if ptr != v_1.Args[0] {
 12229  			break
 12230  		}
 12231  		v.reset(OpARM64FMOVSfpgp)
 12232  		v.AddArg(val)
 12233  		return true
 12234  	}
 12235  	// match: (MOVWUload [off1] {sym} (ADDconst [off2] ptr) mem)
 12236  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 12237  	// result: (MOVWUload [off1+int32(off2)] {sym} ptr mem)
 12238  	for {
 12239  		off1 := auxIntToInt32(v.AuxInt)
 12240  		sym := auxToSym(v.Aux)
 12241  		if v_0.Op != OpARM64ADDconst {
 12242  			break
 12243  		}
 12244  		off2 := auxIntToInt64(v_0.AuxInt)
 12245  		ptr := v_0.Args[0]
 12246  		mem := v_1
 12247  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 12248  			break
 12249  		}
 12250  		v.reset(OpARM64MOVWUload)
 12251  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 12252  		v.Aux = symToAux(sym)
 12253  		v.AddArg2(ptr, mem)
 12254  		return true
 12255  	}
 12256  	// match: (MOVWUload [off] {sym} (ADD ptr idx) mem)
 12257  	// cond: off == 0 && sym == nil
 12258  	// result: (MOVWUloadidx ptr idx mem)
 12259  	for {
 12260  		off := auxIntToInt32(v.AuxInt)
 12261  		sym := auxToSym(v.Aux)
 12262  		if v_0.Op != OpARM64ADD {
 12263  			break
 12264  		}
 12265  		idx := v_0.Args[1]
 12266  		ptr := v_0.Args[0]
 12267  		mem := v_1
 12268  		if !(off == 0 && sym == nil) {
 12269  			break
 12270  		}
 12271  		v.reset(OpARM64MOVWUloadidx)
 12272  		v.AddArg3(ptr, idx, mem)
 12273  		return true
 12274  	}
 12275  	// match: (MOVWUload [off] {sym} (ADDshiftLL [2] ptr idx) mem)
 12276  	// cond: off == 0 && sym == nil
 12277  	// result: (MOVWUloadidx4 ptr idx mem)
 12278  	for {
 12279  		off := auxIntToInt32(v.AuxInt)
 12280  		sym := auxToSym(v.Aux)
 12281  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
 12282  			break
 12283  		}
 12284  		idx := v_0.Args[1]
 12285  		ptr := v_0.Args[0]
 12286  		mem := v_1
 12287  		if !(off == 0 && sym == nil) {
 12288  			break
 12289  		}
 12290  		v.reset(OpARM64MOVWUloadidx4)
 12291  		v.AddArg3(ptr, idx, mem)
 12292  		return true
 12293  	}
 12294  	// match: (MOVWUload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 12295  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 12296  	// result: (MOVWUload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 12297  	for {
 12298  		off1 := auxIntToInt32(v.AuxInt)
 12299  		sym1 := auxToSym(v.Aux)
 12300  		if v_0.Op != OpARM64MOVDaddr {
 12301  			break
 12302  		}
 12303  		off2 := auxIntToInt32(v_0.AuxInt)
 12304  		sym2 := auxToSym(v_0.Aux)
 12305  		ptr := v_0.Args[0]
 12306  		mem := v_1
 12307  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 12308  			break
 12309  		}
 12310  		v.reset(OpARM64MOVWUload)
 12311  		v.AuxInt = int32ToAuxInt(off1 + off2)
 12312  		v.Aux = symToAux(mergeSym(sym1, sym2))
 12313  		v.AddArg2(ptr, mem)
 12314  		return true
 12315  	}
 12316  	// match: (MOVWUload [off] {sym} (SB) _)
 12317  	// cond: symIsRO(sym)
 12318  	// result: (MOVDconst [int64(read32(sym, int64(off), config.ctxt.Arch.ByteOrder))])
 12319  	for {
 12320  		off := auxIntToInt32(v.AuxInt)
 12321  		sym := auxToSym(v.Aux)
 12322  		if v_0.Op != OpSB || !(symIsRO(sym)) {
 12323  			break
 12324  		}
 12325  		v.reset(OpARM64MOVDconst)
 12326  		v.AuxInt = int64ToAuxInt(int64(read32(sym, int64(off), config.ctxt.Arch.ByteOrder)))
 12327  		return true
 12328  	}
 12329  	return false
 12330  }
 12331  func rewriteValueARM64_OpARM64MOVWUloadidx(v *Value) bool {
 12332  	v_2 := v.Args[2]
 12333  	v_1 := v.Args[1]
 12334  	v_0 := v.Args[0]
 12335  	// match: (MOVWUloadidx ptr (MOVDconst [c]) mem)
 12336  	// cond: is32Bit(c)
 12337  	// result: (MOVWUload [int32(c)] ptr mem)
 12338  	for {
 12339  		ptr := v_0
 12340  		if v_1.Op != OpARM64MOVDconst {
 12341  			break
 12342  		}
 12343  		c := auxIntToInt64(v_1.AuxInt)
 12344  		mem := v_2
 12345  		if !(is32Bit(c)) {
 12346  			break
 12347  		}
 12348  		v.reset(OpARM64MOVWUload)
 12349  		v.AuxInt = int32ToAuxInt(int32(c))
 12350  		v.AddArg2(ptr, mem)
 12351  		return true
 12352  	}
 12353  	// match: (MOVWUloadidx (MOVDconst [c]) ptr mem)
 12354  	// cond: is32Bit(c)
 12355  	// result: (MOVWUload [int32(c)] ptr mem)
 12356  	for {
 12357  		if v_0.Op != OpARM64MOVDconst {
 12358  			break
 12359  		}
 12360  		c := auxIntToInt64(v_0.AuxInt)
 12361  		ptr := v_1
 12362  		mem := v_2
 12363  		if !(is32Bit(c)) {
 12364  			break
 12365  		}
 12366  		v.reset(OpARM64MOVWUload)
 12367  		v.AuxInt = int32ToAuxInt(int32(c))
 12368  		v.AddArg2(ptr, mem)
 12369  		return true
 12370  	}
 12371  	// match: (MOVWUloadidx ptr (SLLconst [2] idx) mem)
 12372  	// result: (MOVWUloadidx4 ptr idx mem)
 12373  	for {
 12374  		ptr := v_0
 12375  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
 12376  			break
 12377  		}
 12378  		idx := v_1.Args[0]
 12379  		mem := v_2
 12380  		v.reset(OpARM64MOVWUloadidx4)
 12381  		v.AddArg3(ptr, idx, mem)
 12382  		return true
 12383  	}
 12384  	// match: (MOVWUloadidx (SLLconst [2] idx) ptr mem)
 12385  	// result: (MOVWUloadidx4 ptr idx mem)
 12386  	for {
 12387  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
 12388  			break
 12389  		}
 12390  		idx := v_0.Args[0]
 12391  		ptr := v_1
 12392  		mem := v_2
 12393  		v.reset(OpARM64MOVWUloadidx4)
 12394  		v.AddArg3(ptr, idx, mem)
 12395  		return true
 12396  	}
 12397  	return false
 12398  }
 12399  func rewriteValueARM64_OpARM64MOVWUloadidx4(v *Value) bool {
 12400  	v_2 := v.Args[2]
 12401  	v_1 := v.Args[1]
 12402  	v_0 := v.Args[0]
 12403  	// match: (MOVWUloadidx4 ptr (MOVDconst [c]) mem)
 12404  	// cond: is32Bit(c<<2)
 12405  	// result: (MOVWUload [int32(c)<<2] ptr mem)
 12406  	for {
 12407  		ptr := v_0
 12408  		if v_1.Op != OpARM64MOVDconst {
 12409  			break
 12410  		}
 12411  		c := auxIntToInt64(v_1.AuxInt)
 12412  		mem := v_2
 12413  		if !(is32Bit(c << 2)) {
 12414  			break
 12415  		}
 12416  		v.reset(OpARM64MOVWUload)
 12417  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
 12418  		v.AddArg2(ptr, mem)
 12419  		return true
 12420  	}
 12421  	return false
 12422  }
 12423  func rewriteValueARM64_OpARM64MOVWUreg(v *Value) bool {
 12424  	v_0 := v.Args[0]
 12425  	// match: (MOVWUreg (ANDconst [c] x))
 12426  	// result: (ANDconst [c&(1<<32-1)] x)
 12427  	for {
 12428  		if v_0.Op != OpARM64ANDconst {
 12429  			break
 12430  		}
 12431  		c := auxIntToInt64(v_0.AuxInt)
 12432  		x := v_0.Args[0]
 12433  		v.reset(OpARM64ANDconst)
 12434  		v.AuxInt = int64ToAuxInt(c & (1<<32 - 1))
 12435  		v.AddArg(x)
 12436  		return true
 12437  	}
 12438  	// match: (MOVWUreg (MOVDconst [c]))
 12439  	// result: (MOVDconst [int64(uint32(c))])
 12440  	for {
 12441  		if v_0.Op != OpARM64MOVDconst {
 12442  			break
 12443  		}
 12444  		c := auxIntToInt64(v_0.AuxInt)
 12445  		v.reset(OpARM64MOVDconst)
 12446  		v.AuxInt = int64ToAuxInt(int64(uint32(c)))
 12447  		return true
 12448  	}
 12449  	// match: (MOVWUreg x)
 12450  	// cond: v.Type.Size() <= 4
 12451  	// result: x
 12452  	for {
 12453  		x := v_0
 12454  		if !(v.Type.Size() <= 4) {
 12455  			break
 12456  		}
 12457  		v.copyOf(x)
 12458  		return true
 12459  	}
 12460  	// match: (MOVWUreg (SLLconst [lc] x))
 12461  	// cond: lc >= 32
 12462  	// result: (MOVDconst [0])
 12463  	for {
 12464  		if v_0.Op != OpARM64SLLconst {
 12465  			break
 12466  		}
 12467  		lc := auxIntToInt64(v_0.AuxInt)
 12468  		if !(lc >= 32) {
 12469  			break
 12470  		}
 12471  		v.reset(OpARM64MOVDconst)
 12472  		v.AuxInt = int64ToAuxInt(0)
 12473  		return true
 12474  	}
 12475  	// match: (MOVWUreg (SLLconst [lc] x))
 12476  	// cond: lc < 32
 12477  	// result: (UBFIZ [armBFAuxInt(lc, 32-lc)] x)
 12478  	for {
 12479  		if v_0.Op != OpARM64SLLconst {
 12480  			break
 12481  		}
 12482  		lc := auxIntToInt64(v_0.AuxInt)
 12483  		x := v_0.Args[0]
 12484  		if !(lc < 32) {
 12485  			break
 12486  		}
 12487  		v.reset(OpARM64UBFIZ)
 12488  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 32-lc))
 12489  		v.AddArg(x)
 12490  		return true
 12491  	}
 12492  	// match: (MOVWUreg (SRLconst [rc] x))
 12493  	// cond: rc < 32
 12494  	// result: (UBFX [armBFAuxInt(rc, 32)] x)
 12495  	for {
 12496  		if v_0.Op != OpARM64SRLconst {
 12497  			break
 12498  		}
 12499  		rc := auxIntToInt64(v_0.AuxInt)
 12500  		x := v_0.Args[0]
 12501  		if !(rc < 32) {
 12502  			break
 12503  		}
 12504  		v.reset(OpARM64UBFX)
 12505  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 32))
 12506  		v.AddArg(x)
 12507  		return true
 12508  	}
 12509  	// match: (MOVWUreg (UBFX [bfc] x))
 12510  	// cond: bfc.width() <= 32
 12511  	// result: (UBFX [bfc] x)
 12512  	for {
 12513  		if v_0.Op != OpARM64UBFX {
 12514  			break
 12515  		}
 12516  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 12517  		x := v_0.Args[0]
 12518  		if !(bfc.width() <= 32) {
 12519  			break
 12520  		}
 12521  		v.reset(OpARM64UBFX)
 12522  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 12523  		v.AddArg(x)
 12524  		return true
 12525  	}
 12526  	return false
 12527  }
 12528  func rewriteValueARM64_OpARM64MOVWload(v *Value) bool {
 12529  	v_1 := v.Args[1]
 12530  	v_0 := v.Args[0]
 12531  	b := v.Block
 12532  	config := b.Func.Config
 12533  	// match: (MOVWload [off1] {sym} (ADDconst [off2] ptr) mem)
 12534  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 12535  	// result: (MOVWload [off1+int32(off2)] {sym} ptr mem)
 12536  	for {
 12537  		off1 := auxIntToInt32(v.AuxInt)
 12538  		sym := auxToSym(v.Aux)
 12539  		if v_0.Op != OpARM64ADDconst {
 12540  			break
 12541  		}
 12542  		off2 := auxIntToInt64(v_0.AuxInt)
 12543  		ptr := v_0.Args[0]
 12544  		mem := v_1
 12545  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 12546  			break
 12547  		}
 12548  		v.reset(OpARM64MOVWload)
 12549  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 12550  		v.Aux = symToAux(sym)
 12551  		v.AddArg2(ptr, mem)
 12552  		return true
 12553  	}
 12554  	// match: (MOVWload [off] {sym} (ADD ptr idx) mem)
 12555  	// cond: off == 0 && sym == nil
 12556  	// result: (MOVWloadidx ptr idx mem)
 12557  	for {
 12558  		off := auxIntToInt32(v.AuxInt)
 12559  		sym := auxToSym(v.Aux)
 12560  		if v_0.Op != OpARM64ADD {
 12561  			break
 12562  		}
 12563  		idx := v_0.Args[1]
 12564  		ptr := v_0.Args[0]
 12565  		mem := v_1
 12566  		if !(off == 0 && sym == nil) {
 12567  			break
 12568  		}
 12569  		v.reset(OpARM64MOVWloadidx)
 12570  		v.AddArg3(ptr, idx, mem)
 12571  		return true
 12572  	}
 12573  	// match: (MOVWload [off] {sym} (ADDshiftLL [2] ptr idx) mem)
 12574  	// cond: off == 0 && sym == nil
 12575  	// result: (MOVWloadidx4 ptr idx mem)
 12576  	for {
 12577  		off := auxIntToInt32(v.AuxInt)
 12578  		sym := auxToSym(v.Aux)
 12579  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
 12580  			break
 12581  		}
 12582  		idx := v_0.Args[1]
 12583  		ptr := v_0.Args[0]
 12584  		mem := v_1
 12585  		if !(off == 0 && sym == nil) {
 12586  			break
 12587  		}
 12588  		v.reset(OpARM64MOVWloadidx4)
 12589  		v.AddArg3(ptr, idx, mem)
 12590  		return true
 12591  	}
 12592  	// match: (MOVWload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 12593  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 12594  	// result: (MOVWload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 12595  	for {
 12596  		off1 := auxIntToInt32(v.AuxInt)
 12597  		sym1 := auxToSym(v.Aux)
 12598  		if v_0.Op != OpARM64MOVDaddr {
 12599  			break
 12600  		}
 12601  		off2 := auxIntToInt32(v_0.AuxInt)
 12602  		sym2 := auxToSym(v_0.Aux)
 12603  		ptr := v_0.Args[0]
 12604  		mem := v_1
 12605  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 12606  			break
 12607  		}
 12608  		v.reset(OpARM64MOVWload)
 12609  		v.AuxInt = int32ToAuxInt(off1 + off2)
 12610  		v.Aux = symToAux(mergeSym(sym1, sym2))
 12611  		v.AddArg2(ptr, mem)
 12612  		return true
 12613  	}
 12614  	// match: (MOVWload [off] {sym} (SB) _)
 12615  	// cond: symIsRO(sym)
 12616  	// result: (MOVDconst [int64(int32(read32(sym, int64(off), config.ctxt.Arch.ByteOrder)))])
 12617  	for {
 12618  		off := auxIntToInt32(v.AuxInt)
 12619  		sym := auxToSym(v.Aux)
 12620  		if v_0.Op != OpSB || !(symIsRO(sym)) {
 12621  			break
 12622  		}
 12623  		v.reset(OpARM64MOVDconst)
 12624  		v.AuxInt = int64ToAuxInt(int64(int32(read32(sym, int64(off), config.ctxt.Arch.ByteOrder))))
 12625  		return true
 12626  	}
 12627  	return false
 12628  }
 12629  func rewriteValueARM64_OpARM64MOVWloadidx(v *Value) bool {
 12630  	v_2 := v.Args[2]
 12631  	v_1 := v.Args[1]
 12632  	v_0 := v.Args[0]
 12633  	// match: (MOVWloadidx ptr (MOVDconst [c]) mem)
 12634  	// cond: is32Bit(c)
 12635  	// result: (MOVWload [int32(c)] ptr mem)
 12636  	for {
 12637  		ptr := v_0
 12638  		if v_1.Op != OpARM64MOVDconst {
 12639  			break
 12640  		}
 12641  		c := auxIntToInt64(v_1.AuxInt)
 12642  		mem := v_2
 12643  		if !(is32Bit(c)) {
 12644  			break
 12645  		}
 12646  		v.reset(OpARM64MOVWload)
 12647  		v.AuxInt = int32ToAuxInt(int32(c))
 12648  		v.AddArg2(ptr, mem)
 12649  		return true
 12650  	}
 12651  	// match: (MOVWloadidx (MOVDconst [c]) ptr mem)
 12652  	// cond: is32Bit(c)
 12653  	// result: (MOVWload [int32(c)] ptr mem)
 12654  	for {
 12655  		if v_0.Op != OpARM64MOVDconst {
 12656  			break
 12657  		}
 12658  		c := auxIntToInt64(v_0.AuxInt)
 12659  		ptr := v_1
 12660  		mem := v_2
 12661  		if !(is32Bit(c)) {
 12662  			break
 12663  		}
 12664  		v.reset(OpARM64MOVWload)
 12665  		v.AuxInt = int32ToAuxInt(int32(c))
 12666  		v.AddArg2(ptr, mem)
 12667  		return true
 12668  	}
 12669  	// match: (MOVWloadidx ptr (SLLconst [2] idx) mem)
 12670  	// result: (MOVWloadidx4 ptr idx mem)
 12671  	for {
 12672  		ptr := v_0
 12673  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
 12674  			break
 12675  		}
 12676  		idx := v_1.Args[0]
 12677  		mem := v_2
 12678  		v.reset(OpARM64MOVWloadidx4)
 12679  		v.AddArg3(ptr, idx, mem)
 12680  		return true
 12681  	}
 12682  	// match: (MOVWloadidx (SLLconst [2] idx) ptr mem)
 12683  	// result: (MOVWloadidx4 ptr idx mem)
 12684  	for {
 12685  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
 12686  			break
 12687  		}
 12688  		idx := v_0.Args[0]
 12689  		ptr := v_1
 12690  		mem := v_2
 12691  		v.reset(OpARM64MOVWloadidx4)
 12692  		v.AddArg3(ptr, idx, mem)
 12693  		return true
 12694  	}
 12695  	return false
 12696  }
 12697  func rewriteValueARM64_OpARM64MOVWloadidx4(v *Value) bool {
 12698  	v_2 := v.Args[2]
 12699  	v_1 := v.Args[1]
 12700  	v_0 := v.Args[0]
 12701  	// match: (MOVWloadidx4 ptr (MOVDconst [c]) mem)
 12702  	// cond: is32Bit(c<<2)
 12703  	// result: (MOVWload [int32(c)<<2] ptr mem)
 12704  	for {
 12705  		ptr := v_0
 12706  		if v_1.Op != OpARM64MOVDconst {
 12707  			break
 12708  		}
 12709  		c := auxIntToInt64(v_1.AuxInt)
 12710  		mem := v_2
 12711  		if !(is32Bit(c << 2)) {
 12712  			break
 12713  		}
 12714  		v.reset(OpARM64MOVWload)
 12715  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
 12716  		v.AddArg2(ptr, mem)
 12717  		return true
 12718  	}
 12719  	return false
 12720  }
 12721  func rewriteValueARM64_OpARM64MOVWreg(v *Value) bool {
 12722  	v_0 := v.Args[0]
 12723  	// match: (MOVWreg (MOVDconst [c]))
 12724  	// result: (MOVDconst [int64(int32(c))])
 12725  	for {
 12726  		if v_0.Op != OpARM64MOVDconst {
 12727  			break
 12728  		}
 12729  		c := auxIntToInt64(v_0.AuxInt)
 12730  		v.reset(OpARM64MOVDconst)
 12731  		v.AuxInt = int64ToAuxInt(int64(int32(c)))
 12732  		return true
 12733  	}
 12734  	// match: (MOVWreg x)
 12735  	// cond: v.Type.Size() <= 4
 12736  	// result: x
 12737  	for {
 12738  		x := v_0
 12739  		if !(v.Type.Size() <= 4) {
 12740  			break
 12741  		}
 12742  		v.copyOf(x)
 12743  		return true
 12744  	}
 12745  	// match: (MOVWreg <t> (ANDconst x [c]))
 12746  	// cond: uint64(c) & uint64(0xffffffff80000000) == 0
 12747  	// result: (ANDconst <t> x [c])
 12748  	for {
 12749  		t := v.Type
 12750  		if v_0.Op != OpARM64ANDconst {
 12751  			break
 12752  		}
 12753  		c := auxIntToInt64(v_0.AuxInt)
 12754  		x := v_0.Args[0]
 12755  		if !(uint64(c)&uint64(0xffffffff80000000) == 0) {
 12756  			break
 12757  		}
 12758  		v.reset(OpARM64ANDconst)
 12759  		v.Type = t
 12760  		v.AuxInt = int64ToAuxInt(c)
 12761  		v.AddArg(x)
 12762  		return true
 12763  	}
 12764  	// match: (MOVWreg (SLLconst [lc] x))
 12765  	// cond: lc < 32
 12766  	// result: (SBFIZ [armBFAuxInt(lc, 32-lc)] x)
 12767  	for {
 12768  		if v_0.Op != OpARM64SLLconst {
 12769  			break
 12770  		}
 12771  		lc := auxIntToInt64(v_0.AuxInt)
 12772  		x := v_0.Args[0]
 12773  		if !(lc < 32) {
 12774  			break
 12775  		}
 12776  		v.reset(OpARM64SBFIZ)
 12777  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 32-lc))
 12778  		v.AddArg(x)
 12779  		return true
 12780  	}
 12781  	// match: (MOVWreg (SBFX [bfc] x))
 12782  	// cond: bfc.width() <= 32
 12783  	// result: (SBFX [bfc] x)
 12784  	for {
 12785  		if v_0.Op != OpARM64SBFX {
 12786  			break
 12787  		}
 12788  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 12789  		x := v_0.Args[0]
 12790  		if !(bfc.width() <= 32) {
 12791  			break
 12792  		}
 12793  		v.reset(OpARM64SBFX)
 12794  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 12795  		v.AddArg(x)
 12796  		return true
 12797  	}
 12798  	return false
 12799  }
 12800  func rewriteValueARM64_OpARM64MOVWstore(v *Value) bool {
 12801  	v_2 := v.Args[2]
 12802  	v_1 := v.Args[1]
 12803  	v_0 := v.Args[0]
 12804  	b := v.Block
 12805  	config := b.Func.Config
 12806  	// match: (MOVWstore [off] {sym} ptr (FMOVSfpgp val) mem)
 12807  	// result: (FMOVSstore [off] {sym} ptr val mem)
 12808  	for {
 12809  		off := auxIntToInt32(v.AuxInt)
 12810  		sym := auxToSym(v.Aux)
 12811  		ptr := v_0
 12812  		if v_1.Op != OpARM64FMOVSfpgp {
 12813  			break
 12814  		}
 12815  		val := v_1.Args[0]
 12816  		mem := v_2
 12817  		v.reset(OpARM64FMOVSstore)
 12818  		v.AuxInt = int32ToAuxInt(off)
 12819  		v.Aux = symToAux(sym)
 12820  		v.AddArg3(ptr, val, mem)
 12821  		return true
 12822  	}
 12823  	// match: (MOVWstore [off1] {sym} (ADDconst [off2] ptr) val mem)
 12824  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 12825  	// result: (MOVWstore [off1+int32(off2)] {sym} ptr val mem)
 12826  	for {
 12827  		off1 := auxIntToInt32(v.AuxInt)
 12828  		sym := auxToSym(v.Aux)
 12829  		if v_0.Op != OpARM64ADDconst {
 12830  			break
 12831  		}
 12832  		off2 := auxIntToInt64(v_0.AuxInt)
 12833  		ptr := v_0.Args[0]
 12834  		val := v_1
 12835  		mem := v_2
 12836  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 12837  			break
 12838  		}
 12839  		v.reset(OpARM64MOVWstore)
 12840  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 12841  		v.Aux = symToAux(sym)
 12842  		v.AddArg3(ptr, val, mem)
 12843  		return true
 12844  	}
 12845  	// match: (MOVWstore [off] {sym} (ADD ptr idx) val mem)
 12846  	// cond: off == 0 && sym == nil
 12847  	// result: (MOVWstoreidx ptr idx val mem)
 12848  	for {
 12849  		off := auxIntToInt32(v.AuxInt)
 12850  		sym := auxToSym(v.Aux)
 12851  		if v_0.Op != OpARM64ADD {
 12852  			break
 12853  		}
 12854  		idx := v_0.Args[1]
 12855  		ptr := v_0.Args[0]
 12856  		val := v_1
 12857  		mem := v_2
 12858  		if !(off == 0 && sym == nil) {
 12859  			break
 12860  		}
 12861  		v.reset(OpARM64MOVWstoreidx)
 12862  		v.AddArg4(ptr, idx, val, mem)
 12863  		return true
 12864  	}
 12865  	// match: (MOVWstore [off] {sym} (ADDshiftLL [2] ptr idx) val mem)
 12866  	// cond: off == 0 && sym == nil
 12867  	// result: (MOVWstoreidx4 ptr idx val mem)
 12868  	for {
 12869  		off := auxIntToInt32(v.AuxInt)
 12870  		sym := auxToSym(v.Aux)
 12871  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
 12872  			break
 12873  		}
 12874  		idx := v_0.Args[1]
 12875  		ptr := v_0.Args[0]
 12876  		val := v_1
 12877  		mem := v_2
 12878  		if !(off == 0 && sym == nil) {
 12879  			break
 12880  		}
 12881  		v.reset(OpARM64MOVWstoreidx4)
 12882  		v.AddArg4(ptr, idx, val, mem)
 12883  		return true
 12884  	}
 12885  	// match: (MOVWstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
 12886  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 12887  	// result: (MOVWstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
 12888  	for {
 12889  		off1 := auxIntToInt32(v.AuxInt)
 12890  		sym1 := auxToSym(v.Aux)
 12891  		if v_0.Op != OpARM64MOVDaddr {
 12892  			break
 12893  		}
 12894  		off2 := auxIntToInt32(v_0.AuxInt)
 12895  		sym2 := auxToSym(v_0.Aux)
 12896  		ptr := v_0.Args[0]
 12897  		val := v_1
 12898  		mem := v_2
 12899  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 12900  			break
 12901  		}
 12902  		v.reset(OpARM64MOVWstore)
 12903  		v.AuxInt = int32ToAuxInt(off1 + off2)
 12904  		v.Aux = symToAux(mergeSym(sym1, sym2))
 12905  		v.AddArg3(ptr, val, mem)
 12906  		return true
 12907  	}
 12908  	// match: (MOVWstore [off] {sym} ptr (MOVWreg x) mem)
 12909  	// result: (MOVWstore [off] {sym} ptr x mem)
 12910  	for {
 12911  		off := auxIntToInt32(v.AuxInt)
 12912  		sym := auxToSym(v.Aux)
 12913  		ptr := v_0
 12914  		if v_1.Op != OpARM64MOVWreg {
 12915  			break
 12916  		}
 12917  		x := v_1.Args[0]
 12918  		mem := v_2
 12919  		v.reset(OpARM64MOVWstore)
 12920  		v.AuxInt = int32ToAuxInt(off)
 12921  		v.Aux = symToAux(sym)
 12922  		v.AddArg3(ptr, x, mem)
 12923  		return true
 12924  	}
 12925  	// match: (MOVWstore [off] {sym} ptr (MOVWUreg x) mem)
 12926  	// result: (MOVWstore [off] {sym} ptr x mem)
 12927  	for {
 12928  		off := auxIntToInt32(v.AuxInt)
 12929  		sym := auxToSym(v.Aux)
 12930  		ptr := v_0
 12931  		if v_1.Op != OpARM64MOVWUreg {
 12932  			break
 12933  		}
 12934  		x := v_1.Args[0]
 12935  		mem := v_2
 12936  		v.reset(OpARM64MOVWstore)
 12937  		v.AuxInt = int32ToAuxInt(off)
 12938  		v.Aux = symToAux(sym)
 12939  		v.AddArg3(ptr, x, mem)
 12940  		return true
 12941  	}
 12942  	return false
 12943  }
 12944  func rewriteValueARM64_OpARM64MOVWstoreidx(v *Value) bool {
 12945  	v_3 := v.Args[3]
 12946  	v_2 := v.Args[2]
 12947  	v_1 := v.Args[1]
 12948  	v_0 := v.Args[0]
 12949  	// match: (MOVWstoreidx ptr (MOVDconst [c]) val mem)
 12950  	// cond: is32Bit(c)
 12951  	// result: (MOVWstore [int32(c)] ptr val mem)
 12952  	for {
 12953  		ptr := v_0
 12954  		if v_1.Op != OpARM64MOVDconst {
 12955  			break
 12956  		}
 12957  		c := auxIntToInt64(v_1.AuxInt)
 12958  		val := v_2
 12959  		mem := v_3
 12960  		if !(is32Bit(c)) {
 12961  			break
 12962  		}
 12963  		v.reset(OpARM64MOVWstore)
 12964  		v.AuxInt = int32ToAuxInt(int32(c))
 12965  		v.AddArg3(ptr, val, mem)
 12966  		return true
 12967  	}
 12968  	// match: (MOVWstoreidx (MOVDconst [c]) idx val mem)
 12969  	// cond: is32Bit(c)
 12970  	// result: (MOVWstore [int32(c)] idx val mem)
 12971  	for {
 12972  		if v_0.Op != OpARM64MOVDconst {
 12973  			break
 12974  		}
 12975  		c := auxIntToInt64(v_0.AuxInt)
 12976  		idx := v_1
 12977  		val := v_2
 12978  		mem := v_3
 12979  		if !(is32Bit(c)) {
 12980  			break
 12981  		}
 12982  		v.reset(OpARM64MOVWstore)
 12983  		v.AuxInt = int32ToAuxInt(int32(c))
 12984  		v.AddArg3(idx, val, mem)
 12985  		return true
 12986  	}
 12987  	// match: (MOVWstoreidx ptr (SLLconst [2] idx) val mem)
 12988  	// result: (MOVWstoreidx4 ptr idx val mem)
 12989  	for {
 12990  		ptr := v_0
 12991  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
 12992  			break
 12993  		}
 12994  		idx := v_1.Args[0]
 12995  		val := v_2
 12996  		mem := v_3
 12997  		v.reset(OpARM64MOVWstoreidx4)
 12998  		v.AddArg4(ptr, idx, val, mem)
 12999  		return true
 13000  	}
 13001  	// match: (MOVWstoreidx (SLLconst [2] idx) ptr val mem)
 13002  	// result: (MOVWstoreidx4 ptr idx val mem)
 13003  	for {
 13004  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
 13005  			break
 13006  		}
 13007  		idx := v_0.Args[0]
 13008  		ptr := v_1
 13009  		val := v_2
 13010  		mem := v_3
 13011  		v.reset(OpARM64MOVWstoreidx4)
 13012  		v.AddArg4(ptr, idx, val, mem)
 13013  		return true
 13014  	}
 13015  	// match: (MOVWstoreidx ptr idx (MOVWreg x) mem)
 13016  	// result: (MOVWstoreidx ptr idx x mem)
 13017  	for {
 13018  		ptr := v_0
 13019  		idx := v_1
 13020  		if v_2.Op != OpARM64MOVWreg {
 13021  			break
 13022  		}
 13023  		x := v_2.Args[0]
 13024  		mem := v_3
 13025  		v.reset(OpARM64MOVWstoreidx)
 13026  		v.AddArg4(ptr, idx, x, mem)
 13027  		return true
 13028  	}
 13029  	// match: (MOVWstoreidx ptr idx (MOVWUreg x) mem)
 13030  	// result: (MOVWstoreidx ptr idx x mem)
 13031  	for {
 13032  		ptr := v_0
 13033  		idx := v_1
 13034  		if v_2.Op != OpARM64MOVWUreg {
 13035  			break
 13036  		}
 13037  		x := v_2.Args[0]
 13038  		mem := v_3
 13039  		v.reset(OpARM64MOVWstoreidx)
 13040  		v.AddArg4(ptr, idx, x, mem)
 13041  		return true
 13042  	}
 13043  	return false
 13044  }
 13045  func rewriteValueARM64_OpARM64MOVWstoreidx4(v *Value) bool {
 13046  	v_3 := v.Args[3]
 13047  	v_2 := v.Args[2]
 13048  	v_1 := v.Args[1]
 13049  	v_0 := v.Args[0]
 13050  	// match: (MOVWstoreidx4 ptr (MOVDconst [c]) val mem)
 13051  	// cond: is32Bit(c<<2)
 13052  	// result: (MOVWstore [int32(c)<<2] ptr val mem)
 13053  	for {
 13054  		ptr := v_0
 13055  		if v_1.Op != OpARM64MOVDconst {
 13056  			break
 13057  		}
 13058  		c := auxIntToInt64(v_1.AuxInt)
 13059  		val := v_2
 13060  		mem := v_3
 13061  		if !(is32Bit(c << 2)) {
 13062  			break
 13063  		}
 13064  		v.reset(OpARM64MOVWstore)
 13065  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
 13066  		v.AddArg3(ptr, val, mem)
 13067  		return true
 13068  	}
 13069  	// match: (MOVWstoreidx4 ptr idx (MOVWreg x) mem)
 13070  	// result: (MOVWstoreidx4 ptr idx x mem)
 13071  	for {
 13072  		ptr := v_0
 13073  		idx := v_1
 13074  		if v_2.Op != OpARM64MOVWreg {
 13075  			break
 13076  		}
 13077  		x := v_2.Args[0]
 13078  		mem := v_3
 13079  		v.reset(OpARM64MOVWstoreidx4)
 13080  		v.AddArg4(ptr, idx, x, mem)
 13081  		return true
 13082  	}
 13083  	// match: (MOVWstoreidx4 ptr idx (MOVWUreg x) mem)
 13084  	// result: (MOVWstoreidx4 ptr idx x mem)
 13085  	for {
 13086  		ptr := v_0
 13087  		idx := v_1
 13088  		if v_2.Op != OpARM64MOVWUreg {
 13089  			break
 13090  		}
 13091  		x := v_2.Args[0]
 13092  		mem := v_3
 13093  		v.reset(OpARM64MOVWstoreidx4)
 13094  		v.AddArg4(ptr, idx, x, mem)
 13095  		return true
 13096  	}
 13097  	return false
 13098  }
 13099  func rewriteValueARM64_OpARM64MSUB(v *Value) bool {
 13100  	v_2 := v.Args[2]
 13101  	v_1 := v.Args[1]
 13102  	v_0 := v.Args[0]
 13103  	b := v.Block
 13104  	// match: (MSUB a x (MOVDconst [-1]))
 13105  	// result: (ADD a x)
 13106  	for {
 13107  		a := v_0
 13108  		x := v_1
 13109  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != -1 {
 13110  			break
 13111  		}
 13112  		v.reset(OpARM64ADD)
 13113  		v.AddArg2(a, x)
 13114  		return true
 13115  	}
 13116  	// match: (MSUB a _ (MOVDconst [0]))
 13117  	// result: a
 13118  	for {
 13119  		a := v_0
 13120  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 0 {
 13121  			break
 13122  		}
 13123  		v.copyOf(a)
 13124  		return true
 13125  	}
 13126  	// match: (MSUB a x (MOVDconst [1]))
 13127  	// result: (SUB a x)
 13128  	for {
 13129  		a := v_0
 13130  		x := v_1
 13131  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 1 {
 13132  			break
 13133  		}
 13134  		v.reset(OpARM64SUB)
 13135  		v.AddArg2(a, x)
 13136  		return true
 13137  	}
 13138  	// match: (MSUB a x (MOVDconst [c]))
 13139  	// cond: isPowerOfTwo(c)
 13140  	// result: (SUBshiftLL a x [log64(c)])
 13141  	for {
 13142  		a := v_0
 13143  		x := v_1
 13144  		if v_2.Op != OpARM64MOVDconst {
 13145  			break
 13146  		}
 13147  		c := auxIntToInt64(v_2.AuxInt)
 13148  		if !(isPowerOfTwo(c)) {
 13149  			break
 13150  		}
 13151  		v.reset(OpARM64SUBshiftLL)
 13152  		v.AuxInt = int64ToAuxInt(log64(c))
 13153  		v.AddArg2(a, x)
 13154  		return true
 13155  	}
 13156  	// match: (MSUB a x (MOVDconst [c]))
 13157  	// cond: isPowerOfTwo(c-1) && c>=3
 13158  	// result: (SUB a (ADDshiftLL <x.Type> x x [log64(c-1)]))
 13159  	for {
 13160  		a := v_0
 13161  		x := v_1
 13162  		if v_2.Op != OpARM64MOVDconst {
 13163  			break
 13164  		}
 13165  		c := auxIntToInt64(v_2.AuxInt)
 13166  		if !(isPowerOfTwo(c-1) && c >= 3) {
 13167  			break
 13168  		}
 13169  		v.reset(OpARM64SUB)
 13170  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13171  		v0.AuxInt = int64ToAuxInt(log64(c - 1))
 13172  		v0.AddArg2(x, x)
 13173  		v.AddArg2(a, v0)
 13174  		return true
 13175  	}
 13176  	// match: (MSUB a x (MOVDconst [c]))
 13177  	// cond: isPowerOfTwo(c+1) && c>=7
 13178  	// result: (ADD a (SUBshiftLL <x.Type> x x [log64(c+1)]))
 13179  	for {
 13180  		a := v_0
 13181  		x := v_1
 13182  		if v_2.Op != OpARM64MOVDconst {
 13183  			break
 13184  		}
 13185  		c := auxIntToInt64(v_2.AuxInt)
 13186  		if !(isPowerOfTwo(c+1) && c >= 7) {
 13187  			break
 13188  		}
 13189  		v.reset(OpARM64ADD)
 13190  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13191  		v0.AuxInt = int64ToAuxInt(log64(c + 1))
 13192  		v0.AddArg2(x, x)
 13193  		v.AddArg2(a, v0)
 13194  		return true
 13195  	}
 13196  	// match: (MSUB a x (MOVDconst [c]))
 13197  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
 13198  	// result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
 13199  	for {
 13200  		a := v_0
 13201  		x := v_1
 13202  		if v_2.Op != OpARM64MOVDconst {
 13203  			break
 13204  		}
 13205  		c := auxIntToInt64(v_2.AuxInt)
 13206  		if !(c%3 == 0 && isPowerOfTwo(c/3)) {
 13207  			break
 13208  		}
 13209  		v.reset(OpARM64ADDshiftLL)
 13210  		v.AuxInt = int64ToAuxInt(log64(c / 3))
 13211  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13212  		v0.AuxInt = int64ToAuxInt(2)
 13213  		v0.AddArg2(x, x)
 13214  		v.AddArg2(a, v0)
 13215  		return true
 13216  	}
 13217  	// match: (MSUB a x (MOVDconst [c]))
 13218  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
 13219  	// result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
 13220  	for {
 13221  		a := v_0
 13222  		x := v_1
 13223  		if v_2.Op != OpARM64MOVDconst {
 13224  			break
 13225  		}
 13226  		c := auxIntToInt64(v_2.AuxInt)
 13227  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
 13228  			break
 13229  		}
 13230  		v.reset(OpARM64SUBshiftLL)
 13231  		v.AuxInt = int64ToAuxInt(log64(c / 5))
 13232  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13233  		v0.AuxInt = int64ToAuxInt(2)
 13234  		v0.AddArg2(x, x)
 13235  		v.AddArg2(a, v0)
 13236  		return true
 13237  	}
 13238  	// match: (MSUB a x (MOVDconst [c]))
 13239  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
 13240  	// result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
 13241  	for {
 13242  		a := v_0
 13243  		x := v_1
 13244  		if v_2.Op != OpARM64MOVDconst {
 13245  			break
 13246  		}
 13247  		c := auxIntToInt64(v_2.AuxInt)
 13248  		if !(c%7 == 0 && isPowerOfTwo(c/7)) {
 13249  			break
 13250  		}
 13251  		v.reset(OpARM64ADDshiftLL)
 13252  		v.AuxInt = int64ToAuxInt(log64(c / 7))
 13253  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13254  		v0.AuxInt = int64ToAuxInt(3)
 13255  		v0.AddArg2(x, x)
 13256  		v.AddArg2(a, v0)
 13257  		return true
 13258  	}
 13259  	// match: (MSUB a x (MOVDconst [c]))
 13260  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
 13261  	// result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
 13262  	for {
 13263  		a := v_0
 13264  		x := v_1
 13265  		if v_2.Op != OpARM64MOVDconst {
 13266  			break
 13267  		}
 13268  		c := auxIntToInt64(v_2.AuxInt)
 13269  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
 13270  			break
 13271  		}
 13272  		v.reset(OpARM64SUBshiftLL)
 13273  		v.AuxInt = int64ToAuxInt(log64(c / 9))
 13274  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13275  		v0.AuxInt = int64ToAuxInt(3)
 13276  		v0.AddArg2(x, x)
 13277  		v.AddArg2(a, v0)
 13278  		return true
 13279  	}
 13280  	// match: (MSUB a (MOVDconst [-1]) x)
 13281  	// result: (ADD a x)
 13282  	for {
 13283  		a := v_0
 13284  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
 13285  			break
 13286  		}
 13287  		x := v_2
 13288  		v.reset(OpARM64ADD)
 13289  		v.AddArg2(a, x)
 13290  		return true
 13291  	}
 13292  	// match: (MSUB a (MOVDconst [0]) _)
 13293  	// result: a
 13294  	for {
 13295  		a := v_0
 13296  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
 13297  			break
 13298  		}
 13299  		v.copyOf(a)
 13300  		return true
 13301  	}
 13302  	// match: (MSUB a (MOVDconst [1]) x)
 13303  	// result: (SUB a x)
 13304  	for {
 13305  		a := v_0
 13306  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 13307  			break
 13308  		}
 13309  		x := v_2
 13310  		v.reset(OpARM64SUB)
 13311  		v.AddArg2(a, x)
 13312  		return true
 13313  	}
 13314  	// match: (MSUB a (MOVDconst [c]) x)
 13315  	// cond: isPowerOfTwo(c)
 13316  	// result: (SUBshiftLL a x [log64(c)])
 13317  	for {
 13318  		a := v_0
 13319  		if v_1.Op != OpARM64MOVDconst {
 13320  			break
 13321  		}
 13322  		c := auxIntToInt64(v_1.AuxInt)
 13323  		x := v_2
 13324  		if !(isPowerOfTwo(c)) {
 13325  			break
 13326  		}
 13327  		v.reset(OpARM64SUBshiftLL)
 13328  		v.AuxInt = int64ToAuxInt(log64(c))
 13329  		v.AddArg2(a, x)
 13330  		return true
 13331  	}
 13332  	// match: (MSUB a (MOVDconst [c]) x)
 13333  	// cond: isPowerOfTwo(c-1) && c>=3
 13334  	// result: (SUB a (ADDshiftLL <x.Type> x x [log64(c-1)]))
 13335  	for {
 13336  		a := v_0
 13337  		if v_1.Op != OpARM64MOVDconst {
 13338  			break
 13339  		}
 13340  		c := auxIntToInt64(v_1.AuxInt)
 13341  		x := v_2
 13342  		if !(isPowerOfTwo(c-1) && c >= 3) {
 13343  			break
 13344  		}
 13345  		v.reset(OpARM64SUB)
 13346  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13347  		v0.AuxInt = int64ToAuxInt(log64(c - 1))
 13348  		v0.AddArg2(x, x)
 13349  		v.AddArg2(a, v0)
 13350  		return true
 13351  	}
 13352  	// match: (MSUB a (MOVDconst [c]) x)
 13353  	// cond: isPowerOfTwo(c+1) && c>=7
 13354  	// result: (ADD a (SUBshiftLL <x.Type> x x [log64(c+1)]))
 13355  	for {
 13356  		a := v_0
 13357  		if v_1.Op != OpARM64MOVDconst {
 13358  			break
 13359  		}
 13360  		c := auxIntToInt64(v_1.AuxInt)
 13361  		x := v_2
 13362  		if !(isPowerOfTwo(c+1) && c >= 7) {
 13363  			break
 13364  		}
 13365  		v.reset(OpARM64ADD)
 13366  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13367  		v0.AuxInt = int64ToAuxInt(log64(c + 1))
 13368  		v0.AddArg2(x, x)
 13369  		v.AddArg2(a, v0)
 13370  		return true
 13371  	}
 13372  	// match: (MSUB a (MOVDconst [c]) x)
 13373  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
 13374  	// result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
 13375  	for {
 13376  		a := v_0
 13377  		if v_1.Op != OpARM64MOVDconst {
 13378  			break
 13379  		}
 13380  		c := auxIntToInt64(v_1.AuxInt)
 13381  		x := v_2
 13382  		if !(c%3 == 0 && isPowerOfTwo(c/3)) {
 13383  			break
 13384  		}
 13385  		v.reset(OpARM64ADDshiftLL)
 13386  		v.AuxInt = int64ToAuxInt(log64(c / 3))
 13387  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13388  		v0.AuxInt = int64ToAuxInt(2)
 13389  		v0.AddArg2(x, x)
 13390  		v.AddArg2(a, v0)
 13391  		return true
 13392  	}
 13393  	// match: (MSUB a (MOVDconst [c]) x)
 13394  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
 13395  	// result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
 13396  	for {
 13397  		a := v_0
 13398  		if v_1.Op != OpARM64MOVDconst {
 13399  			break
 13400  		}
 13401  		c := auxIntToInt64(v_1.AuxInt)
 13402  		x := v_2
 13403  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
 13404  			break
 13405  		}
 13406  		v.reset(OpARM64SUBshiftLL)
 13407  		v.AuxInt = int64ToAuxInt(log64(c / 5))
 13408  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13409  		v0.AuxInt = int64ToAuxInt(2)
 13410  		v0.AddArg2(x, x)
 13411  		v.AddArg2(a, v0)
 13412  		return true
 13413  	}
 13414  	// match: (MSUB a (MOVDconst [c]) x)
 13415  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
 13416  	// result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
 13417  	for {
 13418  		a := v_0
 13419  		if v_1.Op != OpARM64MOVDconst {
 13420  			break
 13421  		}
 13422  		c := auxIntToInt64(v_1.AuxInt)
 13423  		x := v_2
 13424  		if !(c%7 == 0 && isPowerOfTwo(c/7)) {
 13425  			break
 13426  		}
 13427  		v.reset(OpARM64ADDshiftLL)
 13428  		v.AuxInt = int64ToAuxInt(log64(c / 7))
 13429  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13430  		v0.AuxInt = int64ToAuxInt(3)
 13431  		v0.AddArg2(x, x)
 13432  		v.AddArg2(a, v0)
 13433  		return true
 13434  	}
 13435  	// match: (MSUB a (MOVDconst [c]) x)
 13436  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
 13437  	// result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
 13438  	for {
 13439  		a := v_0
 13440  		if v_1.Op != OpARM64MOVDconst {
 13441  			break
 13442  		}
 13443  		c := auxIntToInt64(v_1.AuxInt)
 13444  		x := v_2
 13445  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
 13446  			break
 13447  		}
 13448  		v.reset(OpARM64SUBshiftLL)
 13449  		v.AuxInt = int64ToAuxInt(log64(c / 9))
 13450  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13451  		v0.AuxInt = int64ToAuxInt(3)
 13452  		v0.AddArg2(x, x)
 13453  		v.AddArg2(a, v0)
 13454  		return true
 13455  	}
 13456  	// match: (MSUB (MOVDconst [c]) x y)
 13457  	// result: (ADDconst [c] (MNEG <x.Type> x y))
 13458  	for {
 13459  		if v_0.Op != OpARM64MOVDconst {
 13460  			break
 13461  		}
 13462  		c := auxIntToInt64(v_0.AuxInt)
 13463  		x := v_1
 13464  		y := v_2
 13465  		v.reset(OpARM64ADDconst)
 13466  		v.AuxInt = int64ToAuxInt(c)
 13467  		v0 := b.NewValue0(v.Pos, OpARM64MNEG, x.Type)
 13468  		v0.AddArg2(x, y)
 13469  		v.AddArg(v0)
 13470  		return true
 13471  	}
 13472  	// match: (MSUB a (MOVDconst [c]) (MOVDconst [d]))
 13473  	// result: (SUBconst [c*d] a)
 13474  	for {
 13475  		a := v_0
 13476  		if v_1.Op != OpARM64MOVDconst {
 13477  			break
 13478  		}
 13479  		c := auxIntToInt64(v_1.AuxInt)
 13480  		if v_2.Op != OpARM64MOVDconst {
 13481  			break
 13482  		}
 13483  		d := auxIntToInt64(v_2.AuxInt)
 13484  		v.reset(OpARM64SUBconst)
 13485  		v.AuxInt = int64ToAuxInt(c * d)
 13486  		v.AddArg(a)
 13487  		return true
 13488  	}
 13489  	return false
 13490  }
 13491  func rewriteValueARM64_OpARM64MSUBW(v *Value) bool {
 13492  	v_2 := v.Args[2]
 13493  	v_1 := v.Args[1]
 13494  	v_0 := v.Args[0]
 13495  	b := v.Block
 13496  	// match: (MSUBW a x (MOVDconst [c]))
 13497  	// cond: int32(c)==-1
 13498  	// result: (MOVWUreg (ADD <a.Type> a x))
 13499  	for {
 13500  		a := v_0
 13501  		x := v_1
 13502  		if v_2.Op != OpARM64MOVDconst {
 13503  			break
 13504  		}
 13505  		c := auxIntToInt64(v_2.AuxInt)
 13506  		if !(int32(c) == -1) {
 13507  			break
 13508  		}
 13509  		v.reset(OpARM64MOVWUreg)
 13510  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
 13511  		v0.AddArg2(a, x)
 13512  		v.AddArg(v0)
 13513  		return true
 13514  	}
 13515  	// match: (MSUBW a _ (MOVDconst [c]))
 13516  	// cond: int32(c)==0
 13517  	// result: (MOVWUreg a)
 13518  	for {
 13519  		a := v_0
 13520  		if v_2.Op != OpARM64MOVDconst {
 13521  			break
 13522  		}
 13523  		c := auxIntToInt64(v_2.AuxInt)
 13524  		if !(int32(c) == 0) {
 13525  			break
 13526  		}
 13527  		v.reset(OpARM64MOVWUreg)
 13528  		v.AddArg(a)
 13529  		return true
 13530  	}
 13531  	// match: (MSUBW a x (MOVDconst [c]))
 13532  	// cond: int32(c)==1
 13533  	// result: (MOVWUreg (SUB <a.Type> a x))
 13534  	for {
 13535  		a := v_0
 13536  		x := v_1
 13537  		if v_2.Op != OpARM64MOVDconst {
 13538  			break
 13539  		}
 13540  		c := auxIntToInt64(v_2.AuxInt)
 13541  		if !(int32(c) == 1) {
 13542  			break
 13543  		}
 13544  		v.reset(OpARM64MOVWUreg)
 13545  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
 13546  		v0.AddArg2(a, x)
 13547  		v.AddArg(v0)
 13548  		return true
 13549  	}
 13550  	// match: (MSUBW a x (MOVDconst [c]))
 13551  	// cond: isPowerOfTwo(c)
 13552  	// result: (MOVWUreg (SUBshiftLL <a.Type> a x [log64(c)]))
 13553  	for {
 13554  		a := v_0
 13555  		x := v_1
 13556  		if v_2.Op != OpARM64MOVDconst {
 13557  			break
 13558  		}
 13559  		c := auxIntToInt64(v_2.AuxInt)
 13560  		if !(isPowerOfTwo(c)) {
 13561  			break
 13562  		}
 13563  		v.reset(OpARM64MOVWUreg)
 13564  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 13565  		v0.AuxInt = int64ToAuxInt(log64(c))
 13566  		v0.AddArg2(a, x)
 13567  		v.AddArg(v0)
 13568  		return true
 13569  	}
 13570  	// match: (MSUBW a x (MOVDconst [c]))
 13571  	// cond: isPowerOfTwo(c-1) && int32(c)>=3
 13572  	// result: (MOVWUreg (SUB <a.Type> a (ADDshiftLL <x.Type> x x [log64(c-1)])))
 13573  	for {
 13574  		a := v_0
 13575  		x := v_1
 13576  		if v_2.Op != OpARM64MOVDconst {
 13577  			break
 13578  		}
 13579  		c := auxIntToInt64(v_2.AuxInt)
 13580  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
 13581  			break
 13582  		}
 13583  		v.reset(OpARM64MOVWUreg)
 13584  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
 13585  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13586  		v1.AuxInt = int64ToAuxInt(log64(c - 1))
 13587  		v1.AddArg2(x, x)
 13588  		v0.AddArg2(a, v1)
 13589  		v.AddArg(v0)
 13590  		return true
 13591  	}
 13592  	// match: (MSUBW a x (MOVDconst [c]))
 13593  	// cond: isPowerOfTwo(c+1) && int32(c)>=7
 13594  	// result: (MOVWUreg (ADD <a.Type> a (SUBshiftLL <x.Type> x x [log64(c+1)])))
 13595  	for {
 13596  		a := v_0
 13597  		x := v_1
 13598  		if v_2.Op != OpARM64MOVDconst {
 13599  			break
 13600  		}
 13601  		c := auxIntToInt64(v_2.AuxInt)
 13602  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
 13603  			break
 13604  		}
 13605  		v.reset(OpARM64MOVWUreg)
 13606  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
 13607  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13608  		v1.AuxInt = int64ToAuxInt(log64(c + 1))
 13609  		v1.AddArg2(x, x)
 13610  		v0.AddArg2(a, v1)
 13611  		v.AddArg(v0)
 13612  		return true
 13613  	}
 13614  	// match: (MSUBW a x (MOVDconst [c]))
 13615  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
 13616  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)]))
 13617  	for {
 13618  		a := v_0
 13619  		x := v_1
 13620  		if v_2.Op != OpARM64MOVDconst {
 13621  			break
 13622  		}
 13623  		c := auxIntToInt64(v_2.AuxInt)
 13624  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
 13625  			break
 13626  		}
 13627  		v.reset(OpARM64MOVWUreg)
 13628  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
 13629  		v0.AuxInt = int64ToAuxInt(log64(c / 3))
 13630  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13631  		v1.AuxInt = int64ToAuxInt(2)
 13632  		v1.AddArg2(x, x)
 13633  		v0.AddArg2(a, v1)
 13634  		v.AddArg(v0)
 13635  		return true
 13636  	}
 13637  	// match: (MSUBW a x (MOVDconst [c]))
 13638  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
 13639  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)]))
 13640  	for {
 13641  		a := v_0
 13642  		x := v_1
 13643  		if v_2.Op != OpARM64MOVDconst {
 13644  			break
 13645  		}
 13646  		c := auxIntToInt64(v_2.AuxInt)
 13647  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
 13648  			break
 13649  		}
 13650  		v.reset(OpARM64MOVWUreg)
 13651  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 13652  		v0.AuxInt = int64ToAuxInt(log64(c / 5))
 13653  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13654  		v1.AuxInt = int64ToAuxInt(2)
 13655  		v1.AddArg2(x, x)
 13656  		v0.AddArg2(a, v1)
 13657  		v.AddArg(v0)
 13658  		return true
 13659  	}
 13660  	// match: (MSUBW a x (MOVDconst [c]))
 13661  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
 13662  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)]))
 13663  	for {
 13664  		a := v_0
 13665  		x := v_1
 13666  		if v_2.Op != OpARM64MOVDconst {
 13667  			break
 13668  		}
 13669  		c := auxIntToInt64(v_2.AuxInt)
 13670  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
 13671  			break
 13672  		}
 13673  		v.reset(OpARM64MOVWUreg)
 13674  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
 13675  		v0.AuxInt = int64ToAuxInt(log64(c / 7))
 13676  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13677  		v1.AuxInt = int64ToAuxInt(3)
 13678  		v1.AddArg2(x, x)
 13679  		v0.AddArg2(a, v1)
 13680  		v.AddArg(v0)
 13681  		return true
 13682  	}
 13683  	// match: (MSUBW a x (MOVDconst [c]))
 13684  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
 13685  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)]))
 13686  	for {
 13687  		a := v_0
 13688  		x := v_1
 13689  		if v_2.Op != OpARM64MOVDconst {
 13690  			break
 13691  		}
 13692  		c := auxIntToInt64(v_2.AuxInt)
 13693  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
 13694  			break
 13695  		}
 13696  		v.reset(OpARM64MOVWUreg)
 13697  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 13698  		v0.AuxInt = int64ToAuxInt(log64(c / 9))
 13699  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13700  		v1.AuxInt = int64ToAuxInt(3)
 13701  		v1.AddArg2(x, x)
 13702  		v0.AddArg2(a, v1)
 13703  		v.AddArg(v0)
 13704  		return true
 13705  	}
 13706  	// match: (MSUBW a (MOVDconst [c]) x)
 13707  	// cond: int32(c)==-1
 13708  	// result: (MOVWUreg (ADD <a.Type> a x))
 13709  	for {
 13710  		a := v_0
 13711  		if v_1.Op != OpARM64MOVDconst {
 13712  			break
 13713  		}
 13714  		c := auxIntToInt64(v_1.AuxInt)
 13715  		x := v_2
 13716  		if !(int32(c) == -1) {
 13717  			break
 13718  		}
 13719  		v.reset(OpARM64MOVWUreg)
 13720  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
 13721  		v0.AddArg2(a, x)
 13722  		v.AddArg(v0)
 13723  		return true
 13724  	}
 13725  	// match: (MSUBW a (MOVDconst [c]) _)
 13726  	// cond: int32(c)==0
 13727  	// result: (MOVWUreg a)
 13728  	for {
 13729  		a := v_0
 13730  		if v_1.Op != OpARM64MOVDconst {
 13731  			break
 13732  		}
 13733  		c := auxIntToInt64(v_1.AuxInt)
 13734  		if !(int32(c) == 0) {
 13735  			break
 13736  		}
 13737  		v.reset(OpARM64MOVWUreg)
 13738  		v.AddArg(a)
 13739  		return true
 13740  	}
 13741  	// match: (MSUBW a (MOVDconst [c]) x)
 13742  	// cond: int32(c)==1
 13743  	// result: (MOVWUreg (SUB <a.Type> a x))
 13744  	for {
 13745  		a := v_0
 13746  		if v_1.Op != OpARM64MOVDconst {
 13747  			break
 13748  		}
 13749  		c := auxIntToInt64(v_1.AuxInt)
 13750  		x := v_2
 13751  		if !(int32(c) == 1) {
 13752  			break
 13753  		}
 13754  		v.reset(OpARM64MOVWUreg)
 13755  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
 13756  		v0.AddArg2(a, x)
 13757  		v.AddArg(v0)
 13758  		return true
 13759  	}
 13760  	// match: (MSUBW a (MOVDconst [c]) x)
 13761  	// cond: isPowerOfTwo(c)
 13762  	// result: (MOVWUreg (SUBshiftLL <a.Type> a x [log64(c)]))
 13763  	for {
 13764  		a := v_0
 13765  		if v_1.Op != OpARM64MOVDconst {
 13766  			break
 13767  		}
 13768  		c := auxIntToInt64(v_1.AuxInt)
 13769  		x := v_2
 13770  		if !(isPowerOfTwo(c)) {
 13771  			break
 13772  		}
 13773  		v.reset(OpARM64MOVWUreg)
 13774  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 13775  		v0.AuxInt = int64ToAuxInt(log64(c))
 13776  		v0.AddArg2(a, x)
 13777  		v.AddArg(v0)
 13778  		return true
 13779  	}
 13780  	// match: (MSUBW a (MOVDconst [c]) x)
 13781  	// cond: isPowerOfTwo(c-1) && int32(c)>=3
 13782  	// result: (MOVWUreg (SUB <a.Type> a (ADDshiftLL <x.Type> x x [log64(c-1)])))
 13783  	for {
 13784  		a := v_0
 13785  		if v_1.Op != OpARM64MOVDconst {
 13786  			break
 13787  		}
 13788  		c := auxIntToInt64(v_1.AuxInt)
 13789  		x := v_2
 13790  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
 13791  			break
 13792  		}
 13793  		v.reset(OpARM64MOVWUreg)
 13794  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
 13795  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13796  		v1.AuxInt = int64ToAuxInt(log64(c - 1))
 13797  		v1.AddArg2(x, x)
 13798  		v0.AddArg2(a, v1)
 13799  		v.AddArg(v0)
 13800  		return true
 13801  	}
 13802  	// match: (MSUBW a (MOVDconst [c]) x)
 13803  	// cond: isPowerOfTwo(c+1) && int32(c)>=7
 13804  	// result: (MOVWUreg (ADD <a.Type> a (SUBshiftLL <x.Type> x x [log64(c+1)])))
 13805  	for {
 13806  		a := v_0
 13807  		if v_1.Op != OpARM64MOVDconst {
 13808  			break
 13809  		}
 13810  		c := auxIntToInt64(v_1.AuxInt)
 13811  		x := v_2
 13812  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
 13813  			break
 13814  		}
 13815  		v.reset(OpARM64MOVWUreg)
 13816  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
 13817  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13818  		v1.AuxInt = int64ToAuxInt(log64(c + 1))
 13819  		v1.AddArg2(x, x)
 13820  		v0.AddArg2(a, v1)
 13821  		v.AddArg(v0)
 13822  		return true
 13823  	}
 13824  	// match: (MSUBW a (MOVDconst [c]) x)
 13825  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
 13826  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)]))
 13827  	for {
 13828  		a := v_0
 13829  		if v_1.Op != OpARM64MOVDconst {
 13830  			break
 13831  		}
 13832  		c := auxIntToInt64(v_1.AuxInt)
 13833  		x := v_2
 13834  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
 13835  			break
 13836  		}
 13837  		v.reset(OpARM64MOVWUreg)
 13838  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
 13839  		v0.AuxInt = int64ToAuxInt(log64(c / 3))
 13840  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13841  		v1.AuxInt = int64ToAuxInt(2)
 13842  		v1.AddArg2(x, x)
 13843  		v0.AddArg2(a, v1)
 13844  		v.AddArg(v0)
 13845  		return true
 13846  	}
 13847  	// match: (MSUBW a (MOVDconst [c]) x)
 13848  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
 13849  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)]))
 13850  	for {
 13851  		a := v_0
 13852  		if v_1.Op != OpARM64MOVDconst {
 13853  			break
 13854  		}
 13855  		c := auxIntToInt64(v_1.AuxInt)
 13856  		x := v_2
 13857  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
 13858  			break
 13859  		}
 13860  		v.reset(OpARM64MOVWUreg)
 13861  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 13862  		v0.AuxInt = int64ToAuxInt(log64(c / 5))
 13863  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13864  		v1.AuxInt = int64ToAuxInt(2)
 13865  		v1.AddArg2(x, x)
 13866  		v0.AddArg2(a, v1)
 13867  		v.AddArg(v0)
 13868  		return true
 13869  	}
 13870  	// match: (MSUBW a (MOVDconst [c]) x)
 13871  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
 13872  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)]))
 13873  	for {
 13874  		a := v_0
 13875  		if v_1.Op != OpARM64MOVDconst {
 13876  			break
 13877  		}
 13878  		c := auxIntToInt64(v_1.AuxInt)
 13879  		x := v_2
 13880  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
 13881  			break
 13882  		}
 13883  		v.reset(OpARM64MOVWUreg)
 13884  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
 13885  		v0.AuxInt = int64ToAuxInt(log64(c / 7))
 13886  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13887  		v1.AuxInt = int64ToAuxInt(3)
 13888  		v1.AddArg2(x, x)
 13889  		v0.AddArg2(a, v1)
 13890  		v.AddArg(v0)
 13891  		return true
 13892  	}
 13893  	// match: (MSUBW a (MOVDconst [c]) x)
 13894  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
 13895  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)]))
 13896  	for {
 13897  		a := v_0
 13898  		if v_1.Op != OpARM64MOVDconst {
 13899  			break
 13900  		}
 13901  		c := auxIntToInt64(v_1.AuxInt)
 13902  		x := v_2
 13903  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
 13904  			break
 13905  		}
 13906  		v.reset(OpARM64MOVWUreg)
 13907  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 13908  		v0.AuxInt = int64ToAuxInt(log64(c / 9))
 13909  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13910  		v1.AuxInt = int64ToAuxInt(3)
 13911  		v1.AddArg2(x, x)
 13912  		v0.AddArg2(a, v1)
 13913  		v.AddArg(v0)
 13914  		return true
 13915  	}
 13916  	// match: (MSUBW (MOVDconst [c]) x y)
 13917  	// result: (MOVWUreg (ADDconst <x.Type> [c] (MNEGW <x.Type> x y)))
 13918  	for {
 13919  		if v_0.Op != OpARM64MOVDconst {
 13920  			break
 13921  		}
 13922  		c := auxIntToInt64(v_0.AuxInt)
 13923  		x := v_1
 13924  		y := v_2
 13925  		v.reset(OpARM64MOVWUreg)
 13926  		v0 := b.NewValue0(v.Pos, OpARM64ADDconst, x.Type)
 13927  		v0.AuxInt = int64ToAuxInt(c)
 13928  		v1 := b.NewValue0(v.Pos, OpARM64MNEGW, x.Type)
 13929  		v1.AddArg2(x, y)
 13930  		v0.AddArg(v1)
 13931  		v.AddArg(v0)
 13932  		return true
 13933  	}
 13934  	// match: (MSUBW a (MOVDconst [c]) (MOVDconst [d]))
 13935  	// result: (MOVWUreg (SUBconst <a.Type> [c*d] a))
 13936  	for {
 13937  		a := v_0
 13938  		if v_1.Op != OpARM64MOVDconst {
 13939  			break
 13940  		}
 13941  		c := auxIntToInt64(v_1.AuxInt)
 13942  		if v_2.Op != OpARM64MOVDconst {
 13943  			break
 13944  		}
 13945  		d := auxIntToInt64(v_2.AuxInt)
 13946  		v.reset(OpARM64MOVWUreg)
 13947  		v0 := b.NewValue0(v.Pos, OpARM64SUBconst, a.Type)
 13948  		v0.AuxInt = int64ToAuxInt(c * d)
 13949  		v0.AddArg(a)
 13950  		v.AddArg(v0)
 13951  		return true
 13952  	}
 13953  	return false
 13954  }
 13955  func rewriteValueARM64_OpARM64MUL(v *Value) bool {
 13956  	v_1 := v.Args[1]
 13957  	v_0 := v.Args[0]
 13958  	b := v.Block
 13959  	config := b.Func.Config
 13960  	// match: (MUL (NEG x) y)
 13961  	// result: (MNEG x y)
 13962  	for {
 13963  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13964  			if v_0.Op != OpARM64NEG {
 13965  				continue
 13966  			}
 13967  			x := v_0.Args[0]
 13968  			y := v_1
 13969  			v.reset(OpARM64MNEG)
 13970  			v.AddArg2(x, y)
 13971  			return true
 13972  		}
 13973  		break
 13974  	}
 13975  	// match: (MUL _ (MOVDconst [0]))
 13976  	// result: (MOVDconst [0])
 13977  	for {
 13978  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13979  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
 13980  				continue
 13981  			}
 13982  			v.reset(OpARM64MOVDconst)
 13983  			v.AuxInt = int64ToAuxInt(0)
 13984  			return true
 13985  		}
 13986  		break
 13987  	}
 13988  	// match: (MUL x (MOVDconst [1]))
 13989  	// result: x
 13990  	for {
 13991  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13992  			x := v_0
 13993  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 13994  				continue
 13995  			}
 13996  			v.copyOf(x)
 13997  			return true
 13998  		}
 13999  		break
 14000  	}
 14001  	// match: (MUL x (MOVDconst [c]))
 14002  	// cond: canMulStrengthReduce(config, c)
 14003  	// result: {mulStrengthReduce(v, x, c)}
 14004  	for {
 14005  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14006  			x := v_0
 14007  			if v_1.Op != OpARM64MOVDconst {
 14008  				continue
 14009  			}
 14010  			c := auxIntToInt64(v_1.AuxInt)
 14011  			if !(canMulStrengthReduce(config, c)) {
 14012  				continue
 14013  			}
 14014  			v.copyOf(mulStrengthReduce(v, x, c))
 14015  			return true
 14016  		}
 14017  		break
 14018  	}
 14019  	// match: (MUL (MOVDconst [c]) (MOVDconst [d]))
 14020  	// result: (MOVDconst [c*d])
 14021  	for {
 14022  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14023  			if v_0.Op != OpARM64MOVDconst {
 14024  				continue
 14025  			}
 14026  			c := auxIntToInt64(v_0.AuxInt)
 14027  			if v_1.Op != OpARM64MOVDconst {
 14028  				continue
 14029  			}
 14030  			d := auxIntToInt64(v_1.AuxInt)
 14031  			v.reset(OpARM64MOVDconst)
 14032  			v.AuxInt = int64ToAuxInt(c * d)
 14033  			return true
 14034  		}
 14035  		break
 14036  	}
 14037  	// match: (MUL r:(MOVWUreg x) s:(MOVWUreg y))
 14038  	// cond: r.Uses == 1 && s.Uses == 1
 14039  	// result: (UMULL x y)
 14040  	for {
 14041  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14042  			r := v_0
 14043  			if r.Op != OpARM64MOVWUreg {
 14044  				continue
 14045  			}
 14046  			x := r.Args[0]
 14047  			s := v_1
 14048  			if s.Op != OpARM64MOVWUreg {
 14049  				continue
 14050  			}
 14051  			y := s.Args[0]
 14052  			if !(r.Uses == 1 && s.Uses == 1) {
 14053  				continue
 14054  			}
 14055  			v.reset(OpARM64UMULL)
 14056  			v.AddArg2(x, y)
 14057  			return true
 14058  		}
 14059  		break
 14060  	}
 14061  	// match: (MUL r:(MOVWreg x) s:(MOVWreg y))
 14062  	// cond: r.Uses == 1 && s.Uses == 1
 14063  	// result: (MULL x y)
 14064  	for {
 14065  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14066  			r := v_0
 14067  			if r.Op != OpARM64MOVWreg {
 14068  				continue
 14069  			}
 14070  			x := r.Args[0]
 14071  			s := v_1
 14072  			if s.Op != OpARM64MOVWreg {
 14073  				continue
 14074  			}
 14075  			y := s.Args[0]
 14076  			if !(r.Uses == 1 && s.Uses == 1) {
 14077  				continue
 14078  			}
 14079  			v.reset(OpARM64MULL)
 14080  			v.AddArg2(x, y)
 14081  			return true
 14082  		}
 14083  		break
 14084  	}
 14085  	return false
 14086  }
 14087  func rewriteValueARM64_OpARM64MULW(v *Value) bool {
 14088  	v_1 := v.Args[1]
 14089  	v_0 := v.Args[0]
 14090  	b := v.Block
 14091  	config := b.Func.Config
 14092  	// match: (MULW (NEG x) y)
 14093  	// result: (MNEGW x y)
 14094  	for {
 14095  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14096  			if v_0.Op != OpARM64NEG {
 14097  				continue
 14098  			}
 14099  			x := v_0.Args[0]
 14100  			y := v_1
 14101  			v.reset(OpARM64MNEGW)
 14102  			v.AddArg2(x, y)
 14103  			return true
 14104  		}
 14105  		break
 14106  	}
 14107  	// match: (MULW _ (MOVDconst [c]))
 14108  	// cond: int32(c)==0
 14109  	// result: (MOVDconst [0])
 14110  	for {
 14111  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14112  			if v_1.Op != OpARM64MOVDconst {
 14113  				continue
 14114  			}
 14115  			c := auxIntToInt64(v_1.AuxInt)
 14116  			if !(int32(c) == 0) {
 14117  				continue
 14118  			}
 14119  			v.reset(OpARM64MOVDconst)
 14120  			v.AuxInt = int64ToAuxInt(0)
 14121  			return true
 14122  		}
 14123  		break
 14124  	}
 14125  	// match: (MULW x (MOVDconst [c]))
 14126  	// cond: int32(c)==1
 14127  	// result: (MOVWUreg x)
 14128  	for {
 14129  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14130  			x := v_0
 14131  			if v_1.Op != OpARM64MOVDconst {
 14132  				continue
 14133  			}
 14134  			c := auxIntToInt64(v_1.AuxInt)
 14135  			if !(int32(c) == 1) {
 14136  				continue
 14137  			}
 14138  			v.reset(OpARM64MOVWUreg)
 14139  			v.AddArg(x)
 14140  			return true
 14141  		}
 14142  		break
 14143  	}
 14144  	// match: (MULW x (MOVDconst [c]))
 14145  	// cond: v.Type.Size() <= 4 && canMulStrengthReduce32(config, int32(c))
 14146  	// result: {mulStrengthReduce32(v, x, int32(c))}
 14147  	for {
 14148  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14149  			x := v_0
 14150  			if v_1.Op != OpARM64MOVDconst {
 14151  				continue
 14152  			}
 14153  			c := auxIntToInt64(v_1.AuxInt)
 14154  			if !(v.Type.Size() <= 4 && canMulStrengthReduce32(config, int32(c))) {
 14155  				continue
 14156  			}
 14157  			v.copyOf(mulStrengthReduce32(v, x, int32(c)))
 14158  			return true
 14159  		}
 14160  		break
 14161  	}
 14162  	// match: (MULW (MOVDconst [c]) (MOVDconst [d]))
 14163  	// result: (MOVDconst [int64(uint32(c*d))])
 14164  	for {
 14165  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14166  			if v_0.Op != OpARM64MOVDconst {
 14167  				continue
 14168  			}
 14169  			c := auxIntToInt64(v_0.AuxInt)
 14170  			if v_1.Op != OpARM64MOVDconst {
 14171  				continue
 14172  			}
 14173  			d := auxIntToInt64(v_1.AuxInt)
 14174  			v.reset(OpARM64MOVDconst)
 14175  			v.AuxInt = int64ToAuxInt(int64(uint32(c * d)))
 14176  			return true
 14177  		}
 14178  		break
 14179  	}
 14180  	return false
 14181  }
 14182  func rewriteValueARM64_OpARM64MVN(v *Value) bool {
 14183  	v_0 := v.Args[0]
 14184  	// match: (MVN (XOR x y))
 14185  	// result: (EON x y)
 14186  	for {
 14187  		if v_0.Op != OpARM64XOR {
 14188  			break
 14189  		}
 14190  		y := v_0.Args[1]
 14191  		x := v_0.Args[0]
 14192  		v.reset(OpARM64EON)
 14193  		v.AddArg2(x, y)
 14194  		return true
 14195  	}
 14196  	// match: (MVN (MOVDconst [c]))
 14197  	// result: (MOVDconst [^c])
 14198  	for {
 14199  		if v_0.Op != OpARM64MOVDconst {
 14200  			break
 14201  		}
 14202  		c := auxIntToInt64(v_0.AuxInt)
 14203  		v.reset(OpARM64MOVDconst)
 14204  		v.AuxInt = int64ToAuxInt(^c)
 14205  		return true
 14206  	}
 14207  	// match: (MVN x:(SLLconst [c] y))
 14208  	// cond: clobberIfDead(x)
 14209  	// result: (MVNshiftLL [c] y)
 14210  	for {
 14211  		x := v_0
 14212  		if x.Op != OpARM64SLLconst {
 14213  			break
 14214  		}
 14215  		c := auxIntToInt64(x.AuxInt)
 14216  		y := x.Args[0]
 14217  		if !(clobberIfDead(x)) {
 14218  			break
 14219  		}
 14220  		v.reset(OpARM64MVNshiftLL)
 14221  		v.AuxInt = int64ToAuxInt(c)
 14222  		v.AddArg(y)
 14223  		return true
 14224  	}
 14225  	// match: (MVN x:(SRLconst [c] y))
 14226  	// cond: clobberIfDead(x)
 14227  	// result: (MVNshiftRL [c] y)
 14228  	for {
 14229  		x := v_0
 14230  		if x.Op != OpARM64SRLconst {
 14231  			break
 14232  		}
 14233  		c := auxIntToInt64(x.AuxInt)
 14234  		y := x.Args[0]
 14235  		if !(clobberIfDead(x)) {
 14236  			break
 14237  		}
 14238  		v.reset(OpARM64MVNshiftRL)
 14239  		v.AuxInt = int64ToAuxInt(c)
 14240  		v.AddArg(y)
 14241  		return true
 14242  	}
 14243  	// match: (MVN x:(SRAconst [c] y))
 14244  	// cond: clobberIfDead(x)
 14245  	// result: (MVNshiftRA [c] y)
 14246  	for {
 14247  		x := v_0
 14248  		if x.Op != OpARM64SRAconst {
 14249  			break
 14250  		}
 14251  		c := auxIntToInt64(x.AuxInt)
 14252  		y := x.Args[0]
 14253  		if !(clobberIfDead(x)) {
 14254  			break
 14255  		}
 14256  		v.reset(OpARM64MVNshiftRA)
 14257  		v.AuxInt = int64ToAuxInt(c)
 14258  		v.AddArg(y)
 14259  		return true
 14260  	}
 14261  	// match: (MVN x:(RORconst [c] y))
 14262  	// cond: clobberIfDead(x)
 14263  	// result: (MVNshiftRO [c] y)
 14264  	for {
 14265  		x := v_0
 14266  		if x.Op != OpARM64RORconst {
 14267  			break
 14268  		}
 14269  		c := auxIntToInt64(x.AuxInt)
 14270  		y := x.Args[0]
 14271  		if !(clobberIfDead(x)) {
 14272  			break
 14273  		}
 14274  		v.reset(OpARM64MVNshiftRO)
 14275  		v.AuxInt = int64ToAuxInt(c)
 14276  		v.AddArg(y)
 14277  		return true
 14278  	}
 14279  	return false
 14280  }
 14281  func rewriteValueARM64_OpARM64MVNshiftLL(v *Value) bool {
 14282  	v_0 := v.Args[0]
 14283  	// match: (MVNshiftLL (MOVDconst [c]) [d])
 14284  	// result: (MOVDconst [^int64(uint64(c)<<uint64(d))])
 14285  	for {
 14286  		d := auxIntToInt64(v.AuxInt)
 14287  		if v_0.Op != OpARM64MOVDconst {
 14288  			break
 14289  		}
 14290  		c := auxIntToInt64(v_0.AuxInt)
 14291  		v.reset(OpARM64MOVDconst)
 14292  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
 14293  		return true
 14294  	}
 14295  	return false
 14296  }
 14297  func rewriteValueARM64_OpARM64MVNshiftRA(v *Value) bool {
 14298  	v_0 := v.Args[0]
 14299  	// match: (MVNshiftRA (MOVDconst [c]) [d])
 14300  	// result: (MOVDconst [^(c>>uint64(d))])
 14301  	for {
 14302  		d := auxIntToInt64(v.AuxInt)
 14303  		if v_0.Op != OpARM64MOVDconst {
 14304  			break
 14305  		}
 14306  		c := auxIntToInt64(v_0.AuxInt)
 14307  		v.reset(OpARM64MOVDconst)
 14308  		v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
 14309  		return true
 14310  	}
 14311  	return false
 14312  }
 14313  func rewriteValueARM64_OpARM64MVNshiftRL(v *Value) bool {
 14314  	v_0 := v.Args[0]
 14315  	// match: (MVNshiftRL (MOVDconst [c]) [d])
 14316  	// result: (MOVDconst [^int64(uint64(c)>>uint64(d))])
 14317  	for {
 14318  		d := auxIntToInt64(v.AuxInt)
 14319  		if v_0.Op != OpARM64MOVDconst {
 14320  			break
 14321  		}
 14322  		c := auxIntToInt64(v_0.AuxInt)
 14323  		v.reset(OpARM64MOVDconst)
 14324  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
 14325  		return true
 14326  	}
 14327  	return false
 14328  }
 14329  func rewriteValueARM64_OpARM64MVNshiftRO(v *Value) bool {
 14330  	v_0 := v.Args[0]
 14331  	// match: (MVNshiftRO (MOVDconst [c]) [d])
 14332  	// result: (MOVDconst [^rotateRight64(c, d)])
 14333  	for {
 14334  		d := auxIntToInt64(v.AuxInt)
 14335  		if v_0.Op != OpARM64MOVDconst {
 14336  			break
 14337  		}
 14338  		c := auxIntToInt64(v_0.AuxInt)
 14339  		v.reset(OpARM64MOVDconst)
 14340  		v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
 14341  		return true
 14342  	}
 14343  	return false
 14344  }
 14345  func rewriteValueARM64_OpARM64NEG(v *Value) bool {
 14346  	v_0 := v.Args[0]
 14347  	// match: (NEG (MUL x y))
 14348  	// result: (MNEG x y)
 14349  	for {
 14350  		if v_0.Op != OpARM64MUL {
 14351  			break
 14352  		}
 14353  		y := v_0.Args[1]
 14354  		x := v_0.Args[0]
 14355  		v.reset(OpARM64MNEG)
 14356  		v.AddArg2(x, y)
 14357  		return true
 14358  	}
 14359  	// match: (NEG (MULW x y))
 14360  	// cond: v.Type.Size() <= 4
 14361  	// result: (MNEGW x y)
 14362  	for {
 14363  		if v_0.Op != OpARM64MULW {
 14364  			break
 14365  		}
 14366  		y := v_0.Args[1]
 14367  		x := v_0.Args[0]
 14368  		if !(v.Type.Size() <= 4) {
 14369  			break
 14370  		}
 14371  		v.reset(OpARM64MNEGW)
 14372  		v.AddArg2(x, y)
 14373  		return true
 14374  	}
 14375  	// match: (NEG (SUB x y))
 14376  	// result: (SUB y x)
 14377  	for {
 14378  		if v_0.Op != OpARM64SUB {
 14379  			break
 14380  		}
 14381  		y := v_0.Args[1]
 14382  		x := v_0.Args[0]
 14383  		v.reset(OpARM64SUB)
 14384  		v.AddArg2(y, x)
 14385  		return true
 14386  	}
 14387  	// match: (NEG (NEG x))
 14388  	// result: x
 14389  	for {
 14390  		if v_0.Op != OpARM64NEG {
 14391  			break
 14392  		}
 14393  		x := v_0.Args[0]
 14394  		v.copyOf(x)
 14395  		return true
 14396  	}
 14397  	// match: (NEG (MOVDconst [c]))
 14398  	// result: (MOVDconst [-c])
 14399  	for {
 14400  		if v_0.Op != OpARM64MOVDconst {
 14401  			break
 14402  		}
 14403  		c := auxIntToInt64(v_0.AuxInt)
 14404  		v.reset(OpARM64MOVDconst)
 14405  		v.AuxInt = int64ToAuxInt(-c)
 14406  		return true
 14407  	}
 14408  	// match: (NEG x:(SLLconst [c] y))
 14409  	// cond: clobberIfDead(x)
 14410  	// result: (NEGshiftLL [c] y)
 14411  	for {
 14412  		x := v_0
 14413  		if x.Op != OpARM64SLLconst {
 14414  			break
 14415  		}
 14416  		c := auxIntToInt64(x.AuxInt)
 14417  		y := x.Args[0]
 14418  		if !(clobberIfDead(x)) {
 14419  			break
 14420  		}
 14421  		v.reset(OpARM64NEGshiftLL)
 14422  		v.AuxInt = int64ToAuxInt(c)
 14423  		v.AddArg(y)
 14424  		return true
 14425  	}
 14426  	// match: (NEG x:(SRLconst [c] y))
 14427  	// cond: clobberIfDead(x)
 14428  	// result: (NEGshiftRL [c] y)
 14429  	for {
 14430  		x := v_0
 14431  		if x.Op != OpARM64SRLconst {
 14432  			break
 14433  		}
 14434  		c := auxIntToInt64(x.AuxInt)
 14435  		y := x.Args[0]
 14436  		if !(clobberIfDead(x)) {
 14437  			break
 14438  		}
 14439  		v.reset(OpARM64NEGshiftRL)
 14440  		v.AuxInt = int64ToAuxInt(c)
 14441  		v.AddArg(y)
 14442  		return true
 14443  	}
 14444  	// match: (NEG x:(SRAconst [c] y))
 14445  	// cond: clobberIfDead(x)
 14446  	// result: (NEGshiftRA [c] y)
 14447  	for {
 14448  		x := v_0
 14449  		if x.Op != OpARM64SRAconst {
 14450  			break
 14451  		}
 14452  		c := auxIntToInt64(x.AuxInt)
 14453  		y := x.Args[0]
 14454  		if !(clobberIfDead(x)) {
 14455  			break
 14456  		}
 14457  		v.reset(OpARM64NEGshiftRA)
 14458  		v.AuxInt = int64ToAuxInt(c)
 14459  		v.AddArg(y)
 14460  		return true
 14461  	}
 14462  	return false
 14463  }
 14464  func rewriteValueARM64_OpARM64NEGshiftLL(v *Value) bool {
 14465  	v_0 := v.Args[0]
 14466  	// match: (NEGshiftLL (MOVDconst [c]) [d])
 14467  	// result: (MOVDconst [-int64(uint64(c)<<uint64(d))])
 14468  	for {
 14469  		d := auxIntToInt64(v.AuxInt)
 14470  		if v_0.Op != OpARM64MOVDconst {
 14471  			break
 14472  		}
 14473  		c := auxIntToInt64(v_0.AuxInt)
 14474  		v.reset(OpARM64MOVDconst)
 14475  		v.AuxInt = int64ToAuxInt(-int64(uint64(c) << uint64(d)))
 14476  		return true
 14477  	}
 14478  	return false
 14479  }
 14480  func rewriteValueARM64_OpARM64NEGshiftRA(v *Value) bool {
 14481  	v_0 := v.Args[0]
 14482  	// match: (NEGshiftRA (MOVDconst [c]) [d])
 14483  	// result: (MOVDconst [-(c>>uint64(d))])
 14484  	for {
 14485  		d := auxIntToInt64(v.AuxInt)
 14486  		if v_0.Op != OpARM64MOVDconst {
 14487  			break
 14488  		}
 14489  		c := auxIntToInt64(v_0.AuxInt)
 14490  		v.reset(OpARM64MOVDconst)
 14491  		v.AuxInt = int64ToAuxInt(-(c >> uint64(d)))
 14492  		return true
 14493  	}
 14494  	return false
 14495  }
 14496  func rewriteValueARM64_OpARM64NEGshiftRL(v *Value) bool {
 14497  	v_0 := v.Args[0]
 14498  	// match: (NEGshiftRL (MOVDconst [c]) [d])
 14499  	// result: (MOVDconst [-int64(uint64(c)>>uint64(d))])
 14500  	for {
 14501  		d := auxIntToInt64(v.AuxInt)
 14502  		if v_0.Op != OpARM64MOVDconst {
 14503  			break
 14504  		}
 14505  		c := auxIntToInt64(v_0.AuxInt)
 14506  		v.reset(OpARM64MOVDconst)
 14507  		v.AuxInt = int64ToAuxInt(-int64(uint64(c) >> uint64(d)))
 14508  		return true
 14509  	}
 14510  	return false
 14511  }
 14512  func rewriteValueARM64_OpARM64NotEqual(v *Value) bool {
 14513  	v_0 := v.Args[0]
 14514  	b := v.Block
 14515  	// match: (NotEqual (CMPconst [0] z:(AND x y)))
 14516  	// cond: z.Uses == 1
 14517  	// result: (NotEqual (TST x y))
 14518  	for {
 14519  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 14520  			break
 14521  		}
 14522  		z := v_0.Args[0]
 14523  		if z.Op != OpARM64AND {
 14524  			break
 14525  		}
 14526  		y := z.Args[1]
 14527  		x := z.Args[0]
 14528  		if !(z.Uses == 1) {
 14529  			break
 14530  		}
 14531  		v.reset(OpARM64NotEqual)
 14532  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
 14533  		v0.AddArg2(x, y)
 14534  		v.AddArg(v0)
 14535  		return true
 14536  	}
 14537  	// match: (NotEqual (CMPWconst [0] x:(ANDconst [c] y)))
 14538  	// cond: x.Uses == 1
 14539  	// result: (NotEqual (TSTWconst [int32(c)] y))
 14540  	for {
 14541  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 14542  			break
 14543  		}
 14544  		x := v_0.Args[0]
 14545  		if x.Op != OpARM64ANDconst {
 14546  			break
 14547  		}
 14548  		c := auxIntToInt64(x.AuxInt)
 14549  		y := x.Args[0]
 14550  		if !(x.Uses == 1) {
 14551  			break
 14552  		}
 14553  		v.reset(OpARM64NotEqual)
 14554  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
 14555  		v0.AuxInt = int32ToAuxInt(int32(c))
 14556  		v0.AddArg(y)
 14557  		v.AddArg(v0)
 14558  		return true
 14559  	}
 14560  	// match: (NotEqual (CMPWconst [0] z:(AND x y)))
 14561  	// cond: z.Uses == 1
 14562  	// result: (NotEqual (TSTW x y))
 14563  	for {
 14564  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 14565  			break
 14566  		}
 14567  		z := v_0.Args[0]
 14568  		if z.Op != OpARM64AND {
 14569  			break
 14570  		}
 14571  		y := z.Args[1]
 14572  		x := z.Args[0]
 14573  		if !(z.Uses == 1) {
 14574  			break
 14575  		}
 14576  		v.reset(OpARM64NotEqual)
 14577  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
 14578  		v0.AddArg2(x, y)
 14579  		v.AddArg(v0)
 14580  		return true
 14581  	}
 14582  	// match: (NotEqual (CMPconst [0] x:(ANDconst [c] y)))
 14583  	// cond: x.Uses == 1
 14584  	// result: (NotEqual (TSTconst [c] y))
 14585  	for {
 14586  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 14587  			break
 14588  		}
 14589  		x := v_0.Args[0]
 14590  		if x.Op != OpARM64ANDconst {
 14591  			break
 14592  		}
 14593  		c := auxIntToInt64(x.AuxInt)
 14594  		y := x.Args[0]
 14595  		if !(x.Uses == 1) {
 14596  			break
 14597  		}
 14598  		v.reset(OpARM64NotEqual)
 14599  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
 14600  		v0.AuxInt = int64ToAuxInt(c)
 14601  		v0.AddArg(y)
 14602  		v.AddArg(v0)
 14603  		return true
 14604  	}
 14605  	// match: (NotEqual (CMP x z:(NEG y)))
 14606  	// cond: z.Uses == 1
 14607  	// result: (NotEqual (CMN x y))
 14608  	for {
 14609  		if v_0.Op != OpARM64CMP {
 14610  			break
 14611  		}
 14612  		_ = v_0.Args[1]
 14613  		x := v_0.Args[0]
 14614  		z := v_0.Args[1]
 14615  		if z.Op != OpARM64NEG {
 14616  			break
 14617  		}
 14618  		y := z.Args[0]
 14619  		if !(z.Uses == 1) {
 14620  			break
 14621  		}
 14622  		v.reset(OpARM64NotEqual)
 14623  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
 14624  		v0.AddArg2(x, y)
 14625  		v.AddArg(v0)
 14626  		return true
 14627  	}
 14628  	// match: (NotEqual (CMPW x z:(NEG y)))
 14629  	// cond: z.Uses == 1
 14630  	// result: (NotEqual (CMNW x y))
 14631  	for {
 14632  		if v_0.Op != OpARM64CMPW {
 14633  			break
 14634  		}
 14635  		_ = v_0.Args[1]
 14636  		x := v_0.Args[0]
 14637  		z := v_0.Args[1]
 14638  		if z.Op != OpARM64NEG {
 14639  			break
 14640  		}
 14641  		y := z.Args[0]
 14642  		if !(z.Uses == 1) {
 14643  			break
 14644  		}
 14645  		v.reset(OpARM64NotEqual)
 14646  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
 14647  		v0.AddArg2(x, y)
 14648  		v.AddArg(v0)
 14649  		return true
 14650  	}
 14651  	// match: (NotEqual (CMPconst [0] x:(ADDconst [c] y)))
 14652  	// cond: x.Uses == 1
 14653  	// result: (NotEqual (CMNconst [c] y))
 14654  	for {
 14655  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 14656  			break
 14657  		}
 14658  		x := v_0.Args[0]
 14659  		if x.Op != OpARM64ADDconst {
 14660  			break
 14661  		}
 14662  		c := auxIntToInt64(x.AuxInt)
 14663  		y := x.Args[0]
 14664  		if !(x.Uses == 1) {
 14665  			break
 14666  		}
 14667  		v.reset(OpARM64NotEqual)
 14668  		v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
 14669  		v0.AuxInt = int64ToAuxInt(c)
 14670  		v0.AddArg(y)
 14671  		v.AddArg(v0)
 14672  		return true
 14673  	}
 14674  	// match: (NotEqual (CMPWconst [0] x:(ADDconst [c] y)))
 14675  	// cond: x.Uses == 1
 14676  	// result: (NotEqual (CMNWconst [int32(c)] y))
 14677  	for {
 14678  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 14679  			break
 14680  		}
 14681  		x := v_0.Args[0]
 14682  		if x.Op != OpARM64ADDconst {
 14683  			break
 14684  		}
 14685  		c := auxIntToInt64(x.AuxInt)
 14686  		y := x.Args[0]
 14687  		if !(x.Uses == 1) {
 14688  			break
 14689  		}
 14690  		v.reset(OpARM64NotEqual)
 14691  		v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
 14692  		v0.AuxInt = int32ToAuxInt(int32(c))
 14693  		v0.AddArg(y)
 14694  		v.AddArg(v0)
 14695  		return true
 14696  	}
 14697  	// match: (NotEqual (CMPconst [0] z:(ADD x y)))
 14698  	// cond: z.Uses == 1
 14699  	// result: (NotEqual (CMN x y))
 14700  	for {
 14701  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 14702  			break
 14703  		}
 14704  		z := v_0.Args[0]
 14705  		if z.Op != OpARM64ADD {
 14706  			break
 14707  		}
 14708  		y := z.Args[1]
 14709  		x := z.Args[0]
 14710  		if !(z.Uses == 1) {
 14711  			break
 14712  		}
 14713  		v.reset(OpARM64NotEqual)
 14714  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
 14715  		v0.AddArg2(x, y)
 14716  		v.AddArg(v0)
 14717  		return true
 14718  	}
 14719  	// match: (NotEqual (CMPWconst [0] z:(ADD x y)))
 14720  	// cond: z.Uses == 1
 14721  	// result: (NotEqual (CMNW x y))
 14722  	for {
 14723  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 14724  			break
 14725  		}
 14726  		z := v_0.Args[0]
 14727  		if z.Op != OpARM64ADD {
 14728  			break
 14729  		}
 14730  		y := z.Args[1]
 14731  		x := z.Args[0]
 14732  		if !(z.Uses == 1) {
 14733  			break
 14734  		}
 14735  		v.reset(OpARM64NotEqual)
 14736  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
 14737  		v0.AddArg2(x, y)
 14738  		v.AddArg(v0)
 14739  		return true
 14740  	}
 14741  	// match: (NotEqual (CMPconst [0] z:(MADD a x y)))
 14742  	// cond: z.Uses == 1
 14743  	// result: (NotEqual (CMN a (MUL <x.Type> x y)))
 14744  	for {
 14745  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 14746  			break
 14747  		}
 14748  		z := v_0.Args[0]
 14749  		if z.Op != OpARM64MADD {
 14750  			break
 14751  		}
 14752  		y := z.Args[2]
 14753  		a := z.Args[0]
 14754  		x := z.Args[1]
 14755  		if !(z.Uses == 1) {
 14756  			break
 14757  		}
 14758  		v.reset(OpARM64NotEqual)
 14759  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
 14760  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
 14761  		v1.AddArg2(x, y)
 14762  		v0.AddArg2(a, v1)
 14763  		v.AddArg(v0)
 14764  		return true
 14765  	}
 14766  	// match: (NotEqual (CMPWconst [0] z:(MADDW a x y)))
 14767  	// cond: z.Uses == 1
 14768  	// result: (NotEqual (CMNW a (MULW <x.Type> x y)))
 14769  	for {
 14770  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 14771  			break
 14772  		}
 14773  		z := v_0.Args[0]
 14774  		if z.Op != OpARM64MADDW {
 14775  			break
 14776  		}
 14777  		y := z.Args[2]
 14778  		a := z.Args[0]
 14779  		x := z.Args[1]
 14780  		if !(z.Uses == 1) {
 14781  			break
 14782  		}
 14783  		v.reset(OpARM64NotEqual)
 14784  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
 14785  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
 14786  		v1.AddArg2(x, y)
 14787  		v0.AddArg2(a, v1)
 14788  		v.AddArg(v0)
 14789  		return true
 14790  	}
 14791  	// match: (NotEqual (CMPconst [0] z:(MSUB a x y)))
 14792  	// cond: z.Uses == 1
 14793  	// result: (NotEqual (CMP a (MUL <x.Type> x y)))
 14794  	for {
 14795  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 14796  			break
 14797  		}
 14798  		z := v_0.Args[0]
 14799  		if z.Op != OpARM64MSUB {
 14800  			break
 14801  		}
 14802  		y := z.Args[2]
 14803  		a := z.Args[0]
 14804  		x := z.Args[1]
 14805  		if !(z.Uses == 1) {
 14806  			break
 14807  		}
 14808  		v.reset(OpARM64NotEqual)
 14809  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 14810  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
 14811  		v1.AddArg2(x, y)
 14812  		v0.AddArg2(a, v1)
 14813  		v.AddArg(v0)
 14814  		return true
 14815  	}
 14816  	// match: (NotEqual (CMPWconst [0] z:(MSUBW a x y)))
 14817  	// cond: z.Uses == 1
 14818  	// result: (NotEqual (CMPW a (MULW <x.Type> x y)))
 14819  	for {
 14820  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 14821  			break
 14822  		}
 14823  		z := v_0.Args[0]
 14824  		if z.Op != OpARM64MSUBW {
 14825  			break
 14826  		}
 14827  		y := z.Args[2]
 14828  		a := z.Args[0]
 14829  		x := z.Args[1]
 14830  		if !(z.Uses == 1) {
 14831  			break
 14832  		}
 14833  		v.reset(OpARM64NotEqual)
 14834  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 14835  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
 14836  		v1.AddArg2(x, y)
 14837  		v0.AddArg2(a, v1)
 14838  		v.AddArg(v0)
 14839  		return true
 14840  	}
 14841  	// match: (NotEqual (FlagConstant [fc]))
 14842  	// result: (MOVDconst [b2i(fc.ne())])
 14843  	for {
 14844  		if v_0.Op != OpARM64FlagConstant {
 14845  			break
 14846  		}
 14847  		fc := auxIntToFlagConstant(v_0.AuxInt)
 14848  		v.reset(OpARM64MOVDconst)
 14849  		v.AuxInt = int64ToAuxInt(b2i(fc.ne()))
 14850  		return true
 14851  	}
 14852  	// match: (NotEqual (InvertFlags x))
 14853  	// result: (NotEqual x)
 14854  	for {
 14855  		if v_0.Op != OpARM64InvertFlags {
 14856  			break
 14857  		}
 14858  		x := v_0.Args[0]
 14859  		v.reset(OpARM64NotEqual)
 14860  		v.AddArg(x)
 14861  		return true
 14862  	}
 14863  	return false
 14864  }
 14865  func rewriteValueARM64_OpARM64OR(v *Value) bool {
 14866  	v_1 := v.Args[1]
 14867  	v_0 := v.Args[0]
 14868  	// match: (OR x (MOVDconst [c]))
 14869  	// result: (ORconst [c] x)
 14870  	for {
 14871  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14872  			x := v_0
 14873  			if v_1.Op != OpARM64MOVDconst {
 14874  				continue
 14875  			}
 14876  			c := auxIntToInt64(v_1.AuxInt)
 14877  			v.reset(OpARM64ORconst)
 14878  			v.AuxInt = int64ToAuxInt(c)
 14879  			v.AddArg(x)
 14880  			return true
 14881  		}
 14882  		break
 14883  	}
 14884  	// match: (OR x x)
 14885  	// result: x
 14886  	for {
 14887  		x := v_0
 14888  		if x != v_1 {
 14889  			break
 14890  		}
 14891  		v.copyOf(x)
 14892  		return true
 14893  	}
 14894  	// match: (OR x (MVN y))
 14895  	// result: (ORN x y)
 14896  	for {
 14897  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14898  			x := v_0
 14899  			if v_1.Op != OpARM64MVN {
 14900  				continue
 14901  			}
 14902  			y := v_1.Args[0]
 14903  			v.reset(OpARM64ORN)
 14904  			v.AddArg2(x, y)
 14905  			return true
 14906  		}
 14907  		break
 14908  	}
 14909  	// match: (OR x0 x1:(SLLconst [c] y))
 14910  	// cond: clobberIfDead(x1)
 14911  	// result: (ORshiftLL x0 y [c])
 14912  	for {
 14913  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14914  			x0 := v_0
 14915  			x1 := v_1
 14916  			if x1.Op != OpARM64SLLconst {
 14917  				continue
 14918  			}
 14919  			c := auxIntToInt64(x1.AuxInt)
 14920  			y := x1.Args[0]
 14921  			if !(clobberIfDead(x1)) {
 14922  				continue
 14923  			}
 14924  			v.reset(OpARM64ORshiftLL)
 14925  			v.AuxInt = int64ToAuxInt(c)
 14926  			v.AddArg2(x0, y)
 14927  			return true
 14928  		}
 14929  		break
 14930  	}
 14931  	// match: (OR x0 x1:(SRLconst [c] y))
 14932  	// cond: clobberIfDead(x1)
 14933  	// result: (ORshiftRL x0 y [c])
 14934  	for {
 14935  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14936  			x0 := v_0
 14937  			x1 := v_1
 14938  			if x1.Op != OpARM64SRLconst {
 14939  				continue
 14940  			}
 14941  			c := auxIntToInt64(x1.AuxInt)
 14942  			y := x1.Args[0]
 14943  			if !(clobberIfDead(x1)) {
 14944  				continue
 14945  			}
 14946  			v.reset(OpARM64ORshiftRL)
 14947  			v.AuxInt = int64ToAuxInt(c)
 14948  			v.AddArg2(x0, y)
 14949  			return true
 14950  		}
 14951  		break
 14952  	}
 14953  	// match: (OR x0 x1:(SRAconst [c] y))
 14954  	// cond: clobberIfDead(x1)
 14955  	// result: (ORshiftRA x0 y [c])
 14956  	for {
 14957  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14958  			x0 := v_0
 14959  			x1 := v_1
 14960  			if x1.Op != OpARM64SRAconst {
 14961  				continue
 14962  			}
 14963  			c := auxIntToInt64(x1.AuxInt)
 14964  			y := x1.Args[0]
 14965  			if !(clobberIfDead(x1)) {
 14966  				continue
 14967  			}
 14968  			v.reset(OpARM64ORshiftRA)
 14969  			v.AuxInt = int64ToAuxInt(c)
 14970  			v.AddArg2(x0, y)
 14971  			return true
 14972  		}
 14973  		break
 14974  	}
 14975  	// match: (OR x0 x1:(RORconst [c] y))
 14976  	// cond: clobberIfDead(x1)
 14977  	// result: (ORshiftRO x0 y [c])
 14978  	for {
 14979  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14980  			x0 := v_0
 14981  			x1 := v_1
 14982  			if x1.Op != OpARM64RORconst {
 14983  				continue
 14984  			}
 14985  			c := auxIntToInt64(x1.AuxInt)
 14986  			y := x1.Args[0]
 14987  			if !(clobberIfDead(x1)) {
 14988  				continue
 14989  			}
 14990  			v.reset(OpARM64ORshiftRO)
 14991  			v.AuxInt = int64ToAuxInt(c)
 14992  			v.AddArg2(x0, y)
 14993  			return true
 14994  		}
 14995  		break
 14996  	}
 14997  	// match: (OR (UBFIZ [bfc] x) (ANDconst [ac] y))
 14998  	// cond: ac == ^((1<<uint(bfc.width())-1) << uint(bfc.lsb()))
 14999  	// result: (BFI [bfc] y x)
 15000  	for {
 15001  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 15002  			if v_0.Op != OpARM64UBFIZ {
 15003  				continue
 15004  			}
 15005  			bfc := auxIntToArm64BitField(v_0.AuxInt)
 15006  			x := v_0.Args[0]
 15007  			if v_1.Op != OpARM64ANDconst {
 15008  				continue
 15009  			}
 15010  			ac := auxIntToInt64(v_1.AuxInt)
 15011  			y := v_1.Args[0]
 15012  			if !(ac == ^((1<<uint(bfc.width()) - 1) << uint(bfc.lsb()))) {
 15013  				continue
 15014  			}
 15015  			v.reset(OpARM64BFI)
 15016  			v.AuxInt = arm64BitFieldToAuxInt(bfc)
 15017  			v.AddArg2(y, x)
 15018  			return true
 15019  		}
 15020  		break
 15021  	}
 15022  	// match: (OR (UBFX [bfc] x) (ANDconst [ac] y))
 15023  	// cond: ac == ^(1<<uint(bfc.width())-1)
 15024  	// result: (BFXIL [bfc] y x)
 15025  	for {
 15026  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 15027  			if v_0.Op != OpARM64UBFX {
 15028  				continue
 15029  			}
 15030  			bfc := auxIntToArm64BitField(v_0.AuxInt)
 15031  			x := v_0.Args[0]
 15032  			if v_1.Op != OpARM64ANDconst {
 15033  				continue
 15034  			}
 15035  			ac := auxIntToInt64(v_1.AuxInt)
 15036  			y := v_1.Args[0]
 15037  			if !(ac == ^(1<<uint(bfc.width()) - 1)) {
 15038  				continue
 15039  			}
 15040  			v.reset(OpARM64BFXIL)
 15041  			v.AuxInt = arm64BitFieldToAuxInt(bfc)
 15042  			v.AddArg2(y, x)
 15043  			return true
 15044  		}
 15045  		break
 15046  	}
 15047  	return false
 15048  }
 15049  func rewriteValueARM64_OpARM64ORN(v *Value) bool {
 15050  	v_1 := v.Args[1]
 15051  	v_0 := v.Args[0]
 15052  	// match: (ORN x (MOVDconst [c]))
 15053  	// result: (ORconst [^c] x)
 15054  	for {
 15055  		x := v_0
 15056  		if v_1.Op != OpARM64MOVDconst {
 15057  			break
 15058  		}
 15059  		c := auxIntToInt64(v_1.AuxInt)
 15060  		v.reset(OpARM64ORconst)
 15061  		v.AuxInt = int64ToAuxInt(^c)
 15062  		v.AddArg(x)
 15063  		return true
 15064  	}
 15065  	// match: (ORN x x)
 15066  	// result: (MOVDconst [-1])
 15067  	for {
 15068  		x := v_0
 15069  		if x != v_1 {
 15070  			break
 15071  		}
 15072  		v.reset(OpARM64MOVDconst)
 15073  		v.AuxInt = int64ToAuxInt(-1)
 15074  		return true
 15075  	}
 15076  	// match: (ORN x0 x1:(SLLconst [c] y))
 15077  	// cond: clobberIfDead(x1)
 15078  	// result: (ORNshiftLL x0 y [c])
 15079  	for {
 15080  		x0 := v_0
 15081  		x1 := v_1
 15082  		if x1.Op != OpARM64SLLconst {
 15083  			break
 15084  		}
 15085  		c := auxIntToInt64(x1.AuxInt)
 15086  		y := x1.Args[0]
 15087  		if !(clobberIfDead(x1)) {
 15088  			break
 15089  		}
 15090  		v.reset(OpARM64ORNshiftLL)
 15091  		v.AuxInt = int64ToAuxInt(c)
 15092  		v.AddArg2(x0, y)
 15093  		return true
 15094  	}
 15095  	// match: (ORN x0 x1:(SRLconst [c] y))
 15096  	// cond: clobberIfDead(x1)
 15097  	// result: (ORNshiftRL x0 y [c])
 15098  	for {
 15099  		x0 := v_0
 15100  		x1 := v_1
 15101  		if x1.Op != OpARM64SRLconst {
 15102  			break
 15103  		}
 15104  		c := auxIntToInt64(x1.AuxInt)
 15105  		y := x1.Args[0]
 15106  		if !(clobberIfDead(x1)) {
 15107  			break
 15108  		}
 15109  		v.reset(OpARM64ORNshiftRL)
 15110  		v.AuxInt = int64ToAuxInt(c)
 15111  		v.AddArg2(x0, y)
 15112  		return true
 15113  	}
 15114  	// match: (ORN x0 x1:(SRAconst [c] y))
 15115  	// cond: clobberIfDead(x1)
 15116  	// result: (ORNshiftRA x0 y [c])
 15117  	for {
 15118  		x0 := v_0
 15119  		x1 := v_1
 15120  		if x1.Op != OpARM64SRAconst {
 15121  			break
 15122  		}
 15123  		c := auxIntToInt64(x1.AuxInt)
 15124  		y := x1.Args[0]
 15125  		if !(clobberIfDead(x1)) {
 15126  			break
 15127  		}
 15128  		v.reset(OpARM64ORNshiftRA)
 15129  		v.AuxInt = int64ToAuxInt(c)
 15130  		v.AddArg2(x0, y)
 15131  		return true
 15132  	}
 15133  	// match: (ORN x0 x1:(RORconst [c] y))
 15134  	// cond: clobberIfDead(x1)
 15135  	// result: (ORNshiftRO x0 y [c])
 15136  	for {
 15137  		x0 := v_0
 15138  		x1 := v_1
 15139  		if x1.Op != OpARM64RORconst {
 15140  			break
 15141  		}
 15142  		c := auxIntToInt64(x1.AuxInt)
 15143  		y := x1.Args[0]
 15144  		if !(clobberIfDead(x1)) {
 15145  			break
 15146  		}
 15147  		v.reset(OpARM64ORNshiftRO)
 15148  		v.AuxInt = int64ToAuxInt(c)
 15149  		v.AddArg2(x0, y)
 15150  		return true
 15151  	}
 15152  	return false
 15153  }
 15154  func rewriteValueARM64_OpARM64ORNshiftLL(v *Value) bool {
 15155  	v_1 := v.Args[1]
 15156  	v_0 := v.Args[0]
 15157  	// match: (ORNshiftLL x (MOVDconst [c]) [d])
 15158  	// result: (ORconst x [^int64(uint64(c)<<uint64(d))])
 15159  	for {
 15160  		d := auxIntToInt64(v.AuxInt)
 15161  		x := v_0
 15162  		if v_1.Op != OpARM64MOVDconst {
 15163  			break
 15164  		}
 15165  		c := auxIntToInt64(v_1.AuxInt)
 15166  		v.reset(OpARM64ORconst)
 15167  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
 15168  		v.AddArg(x)
 15169  		return true
 15170  	}
 15171  	// match: (ORNshiftLL (SLLconst x [c]) x [c])
 15172  	// result: (MOVDconst [-1])
 15173  	for {
 15174  		c := auxIntToInt64(v.AuxInt)
 15175  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
 15176  			break
 15177  		}
 15178  		x := v_0.Args[0]
 15179  		if x != v_1 {
 15180  			break
 15181  		}
 15182  		v.reset(OpARM64MOVDconst)
 15183  		v.AuxInt = int64ToAuxInt(-1)
 15184  		return true
 15185  	}
 15186  	return false
 15187  }
 15188  func rewriteValueARM64_OpARM64ORNshiftRA(v *Value) bool {
 15189  	v_1 := v.Args[1]
 15190  	v_0 := v.Args[0]
 15191  	// match: (ORNshiftRA x (MOVDconst [c]) [d])
 15192  	// result: (ORconst x [^(c>>uint64(d))])
 15193  	for {
 15194  		d := auxIntToInt64(v.AuxInt)
 15195  		x := v_0
 15196  		if v_1.Op != OpARM64MOVDconst {
 15197  			break
 15198  		}
 15199  		c := auxIntToInt64(v_1.AuxInt)
 15200  		v.reset(OpARM64ORconst)
 15201  		v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
 15202  		v.AddArg(x)
 15203  		return true
 15204  	}
 15205  	// match: (ORNshiftRA (SRAconst x [c]) x [c])
 15206  	// result: (MOVDconst [-1])
 15207  	for {
 15208  		c := auxIntToInt64(v.AuxInt)
 15209  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
 15210  			break
 15211  		}
 15212  		x := v_0.Args[0]
 15213  		if x != v_1 {
 15214  			break
 15215  		}
 15216  		v.reset(OpARM64MOVDconst)
 15217  		v.AuxInt = int64ToAuxInt(-1)
 15218  		return true
 15219  	}
 15220  	return false
 15221  }
 15222  func rewriteValueARM64_OpARM64ORNshiftRL(v *Value) bool {
 15223  	v_1 := v.Args[1]
 15224  	v_0 := v.Args[0]
 15225  	// match: (ORNshiftRL x (MOVDconst [c]) [d])
 15226  	// result: (ORconst x [^int64(uint64(c)>>uint64(d))])
 15227  	for {
 15228  		d := auxIntToInt64(v.AuxInt)
 15229  		x := v_0
 15230  		if v_1.Op != OpARM64MOVDconst {
 15231  			break
 15232  		}
 15233  		c := auxIntToInt64(v_1.AuxInt)
 15234  		v.reset(OpARM64ORconst)
 15235  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
 15236  		v.AddArg(x)
 15237  		return true
 15238  	}
 15239  	// match: (ORNshiftRL (SRLconst x [c]) x [c])
 15240  	// result: (MOVDconst [-1])
 15241  	for {
 15242  		c := auxIntToInt64(v.AuxInt)
 15243  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
 15244  			break
 15245  		}
 15246  		x := v_0.Args[0]
 15247  		if x != v_1 {
 15248  			break
 15249  		}
 15250  		v.reset(OpARM64MOVDconst)
 15251  		v.AuxInt = int64ToAuxInt(-1)
 15252  		return true
 15253  	}
 15254  	return false
 15255  }
 15256  func rewriteValueARM64_OpARM64ORNshiftRO(v *Value) bool {
 15257  	v_1 := v.Args[1]
 15258  	v_0 := v.Args[0]
 15259  	// match: (ORNshiftRO x (MOVDconst [c]) [d])
 15260  	// result: (ORconst x [^rotateRight64(c, d)])
 15261  	for {
 15262  		d := auxIntToInt64(v.AuxInt)
 15263  		x := v_0
 15264  		if v_1.Op != OpARM64MOVDconst {
 15265  			break
 15266  		}
 15267  		c := auxIntToInt64(v_1.AuxInt)
 15268  		v.reset(OpARM64ORconst)
 15269  		v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
 15270  		v.AddArg(x)
 15271  		return true
 15272  	}
 15273  	// match: (ORNshiftRO (RORconst x [c]) x [c])
 15274  	// result: (MOVDconst [-1])
 15275  	for {
 15276  		c := auxIntToInt64(v.AuxInt)
 15277  		if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
 15278  			break
 15279  		}
 15280  		x := v_0.Args[0]
 15281  		if x != v_1 {
 15282  			break
 15283  		}
 15284  		v.reset(OpARM64MOVDconst)
 15285  		v.AuxInt = int64ToAuxInt(-1)
 15286  		return true
 15287  	}
 15288  	return false
 15289  }
 15290  func rewriteValueARM64_OpARM64ORconst(v *Value) bool {
 15291  	v_0 := v.Args[0]
 15292  	// match: (ORconst [0] x)
 15293  	// result: x
 15294  	for {
 15295  		if auxIntToInt64(v.AuxInt) != 0 {
 15296  			break
 15297  		}
 15298  		x := v_0
 15299  		v.copyOf(x)
 15300  		return true
 15301  	}
 15302  	// match: (ORconst [-1] _)
 15303  	// result: (MOVDconst [-1])
 15304  	for {
 15305  		if auxIntToInt64(v.AuxInt) != -1 {
 15306  			break
 15307  		}
 15308  		v.reset(OpARM64MOVDconst)
 15309  		v.AuxInt = int64ToAuxInt(-1)
 15310  		return true
 15311  	}
 15312  	// match: (ORconst [c] (MOVDconst [d]))
 15313  	// result: (MOVDconst [c|d])
 15314  	for {
 15315  		c := auxIntToInt64(v.AuxInt)
 15316  		if v_0.Op != OpARM64MOVDconst {
 15317  			break
 15318  		}
 15319  		d := auxIntToInt64(v_0.AuxInt)
 15320  		v.reset(OpARM64MOVDconst)
 15321  		v.AuxInt = int64ToAuxInt(c | d)
 15322  		return true
 15323  	}
 15324  	// match: (ORconst [c] (ORconst [d] x))
 15325  	// result: (ORconst [c|d] x)
 15326  	for {
 15327  		c := auxIntToInt64(v.AuxInt)
 15328  		if v_0.Op != OpARM64ORconst {
 15329  			break
 15330  		}
 15331  		d := auxIntToInt64(v_0.AuxInt)
 15332  		x := v_0.Args[0]
 15333  		v.reset(OpARM64ORconst)
 15334  		v.AuxInt = int64ToAuxInt(c | d)
 15335  		v.AddArg(x)
 15336  		return true
 15337  	}
 15338  	// match: (ORconst [c1] (ANDconst [c2] x))
 15339  	// cond: c2|c1 == ^0
 15340  	// result: (ORconst [c1] x)
 15341  	for {
 15342  		c1 := auxIntToInt64(v.AuxInt)
 15343  		if v_0.Op != OpARM64ANDconst {
 15344  			break
 15345  		}
 15346  		c2 := auxIntToInt64(v_0.AuxInt)
 15347  		x := v_0.Args[0]
 15348  		if !(c2|c1 == ^0) {
 15349  			break
 15350  		}
 15351  		v.reset(OpARM64ORconst)
 15352  		v.AuxInt = int64ToAuxInt(c1)
 15353  		v.AddArg(x)
 15354  		return true
 15355  	}
 15356  	return false
 15357  }
 15358  func rewriteValueARM64_OpARM64ORshiftLL(v *Value) bool {
 15359  	v_1 := v.Args[1]
 15360  	v_0 := v.Args[0]
 15361  	b := v.Block
 15362  	typ := &b.Func.Config.Types
 15363  	// match: (ORshiftLL (MOVDconst [c]) x [d])
 15364  	// result: (ORconst [c] (SLLconst <x.Type> x [d]))
 15365  	for {
 15366  		d := auxIntToInt64(v.AuxInt)
 15367  		if v_0.Op != OpARM64MOVDconst {
 15368  			break
 15369  		}
 15370  		c := auxIntToInt64(v_0.AuxInt)
 15371  		x := v_1
 15372  		v.reset(OpARM64ORconst)
 15373  		v.AuxInt = int64ToAuxInt(c)
 15374  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 15375  		v0.AuxInt = int64ToAuxInt(d)
 15376  		v0.AddArg(x)
 15377  		v.AddArg(v0)
 15378  		return true
 15379  	}
 15380  	// match: (ORshiftLL x (MOVDconst [c]) [d])
 15381  	// result: (ORconst x [int64(uint64(c)<<uint64(d))])
 15382  	for {
 15383  		d := auxIntToInt64(v.AuxInt)
 15384  		x := v_0
 15385  		if v_1.Op != OpARM64MOVDconst {
 15386  			break
 15387  		}
 15388  		c := auxIntToInt64(v_1.AuxInt)
 15389  		v.reset(OpARM64ORconst)
 15390  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
 15391  		v.AddArg(x)
 15392  		return true
 15393  	}
 15394  	// match: (ORshiftLL y:(SLLconst x [c]) x [c])
 15395  	// result: y
 15396  	for {
 15397  		c := auxIntToInt64(v.AuxInt)
 15398  		y := v_0
 15399  		if y.Op != OpARM64SLLconst || auxIntToInt64(y.AuxInt) != c {
 15400  			break
 15401  		}
 15402  		x := y.Args[0]
 15403  		if x != v_1 {
 15404  			break
 15405  		}
 15406  		v.copyOf(y)
 15407  		return true
 15408  	}
 15409  	// match: (ORshiftLL <typ.UInt16> [8] (UBFX <typ.UInt16> [armBFAuxInt(8, 8)] x) x)
 15410  	// result: (REV16W x)
 15411  	for {
 15412  		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) {
 15413  			break
 15414  		}
 15415  		x := v_0.Args[0]
 15416  		if x != v_1 {
 15417  			break
 15418  		}
 15419  		v.reset(OpARM64REV16W)
 15420  		v.AddArg(x)
 15421  		return true
 15422  	}
 15423  	// match: (ORshiftLL [8] (UBFX [armBFAuxInt(8, 24)] (ANDconst [c1] x)) (ANDconst [c2] x))
 15424  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
 15425  	// result: (REV16W x)
 15426  	for {
 15427  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64UBFX || auxIntToArm64BitField(v_0.AuxInt) != armBFAuxInt(8, 24) {
 15428  			break
 15429  		}
 15430  		v_0_0 := v_0.Args[0]
 15431  		if v_0_0.Op != OpARM64ANDconst {
 15432  			break
 15433  		}
 15434  		c1 := auxIntToInt64(v_0_0.AuxInt)
 15435  		x := v_0_0.Args[0]
 15436  		if v_1.Op != OpARM64ANDconst {
 15437  			break
 15438  		}
 15439  		c2 := auxIntToInt64(v_1.AuxInt)
 15440  		if x != v_1.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
 15441  			break
 15442  		}
 15443  		v.reset(OpARM64REV16W)
 15444  		v.AddArg(x)
 15445  		return true
 15446  	}
 15447  	// match: (ORshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
 15448  	// cond: (uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff)
 15449  	// result: (REV16 x)
 15450  	for {
 15451  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
 15452  			break
 15453  		}
 15454  		v_0_0 := v_0.Args[0]
 15455  		if v_0_0.Op != OpARM64ANDconst {
 15456  			break
 15457  		}
 15458  		c1 := auxIntToInt64(v_0_0.AuxInt)
 15459  		x := v_0_0.Args[0]
 15460  		if v_1.Op != OpARM64ANDconst {
 15461  			break
 15462  		}
 15463  		c2 := auxIntToInt64(v_1.AuxInt)
 15464  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
 15465  			break
 15466  		}
 15467  		v.reset(OpARM64REV16)
 15468  		v.AddArg(x)
 15469  		return true
 15470  	}
 15471  	// match: (ORshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
 15472  	// cond: (uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff)
 15473  	// result: (REV16 (ANDconst <x.Type> [0xffffffff] x))
 15474  	for {
 15475  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
 15476  			break
 15477  		}
 15478  		v_0_0 := v_0.Args[0]
 15479  		if v_0_0.Op != OpARM64ANDconst {
 15480  			break
 15481  		}
 15482  		c1 := auxIntToInt64(v_0_0.AuxInt)
 15483  		x := v_0_0.Args[0]
 15484  		if v_1.Op != OpARM64ANDconst {
 15485  			break
 15486  		}
 15487  		c2 := auxIntToInt64(v_1.AuxInt)
 15488  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
 15489  			break
 15490  		}
 15491  		v.reset(OpARM64REV16)
 15492  		v0 := b.NewValue0(v.Pos, OpARM64ANDconst, x.Type)
 15493  		v0.AuxInt = int64ToAuxInt(0xffffffff)
 15494  		v0.AddArg(x)
 15495  		v.AddArg(v0)
 15496  		return true
 15497  	}
 15498  	// match: ( ORshiftLL [c] (SRLconst x [64-c]) x2)
 15499  	// result: (EXTRconst [64-c] x2 x)
 15500  	for {
 15501  		c := auxIntToInt64(v.AuxInt)
 15502  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 64-c {
 15503  			break
 15504  		}
 15505  		x := v_0.Args[0]
 15506  		x2 := v_1
 15507  		v.reset(OpARM64EXTRconst)
 15508  		v.AuxInt = int64ToAuxInt(64 - c)
 15509  		v.AddArg2(x2, x)
 15510  		return true
 15511  	}
 15512  	// match: ( ORshiftLL <t> [c] (UBFX [bfc] x) x2)
 15513  	// cond: c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)
 15514  	// result: (EXTRWconst [32-c] x2 x)
 15515  	for {
 15516  		t := v.Type
 15517  		c := auxIntToInt64(v.AuxInt)
 15518  		if v_0.Op != OpARM64UBFX {
 15519  			break
 15520  		}
 15521  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 15522  		x := v_0.Args[0]
 15523  		x2 := v_1
 15524  		if !(c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)) {
 15525  			break
 15526  		}
 15527  		v.reset(OpARM64EXTRWconst)
 15528  		v.AuxInt = int64ToAuxInt(32 - c)
 15529  		v.AddArg2(x2, x)
 15530  		return true
 15531  	}
 15532  	// match: (ORshiftLL [s] (ANDconst [xc] x) (ANDconst [yc] y))
 15533  	// cond: xc == ^(yc << s) && yc & (yc+1) == 0 && yc > 0 && s+log64(yc+1) <= 64
 15534  	// result: (BFI [armBFAuxInt(s, log64(yc+1))] x y)
 15535  	for {
 15536  		s := auxIntToInt64(v.AuxInt)
 15537  		if v_0.Op != OpARM64ANDconst {
 15538  			break
 15539  		}
 15540  		xc := auxIntToInt64(v_0.AuxInt)
 15541  		x := v_0.Args[0]
 15542  		if v_1.Op != OpARM64ANDconst {
 15543  			break
 15544  		}
 15545  		yc := auxIntToInt64(v_1.AuxInt)
 15546  		y := v_1.Args[0]
 15547  		if !(xc == ^(yc<<s) && yc&(yc+1) == 0 && yc > 0 && s+log64(yc+1) <= 64) {
 15548  			break
 15549  		}
 15550  		v.reset(OpARM64BFI)
 15551  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(s, log64(yc+1)))
 15552  		v.AddArg2(x, y)
 15553  		return true
 15554  	}
 15555  	// match: (ORshiftLL [sc] (UBFX [bfc] x) (SRLconst [sc] y))
 15556  	// cond: sc == bfc.width()
 15557  	// result: (BFXIL [bfc] y x)
 15558  	for {
 15559  		sc := auxIntToInt64(v.AuxInt)
 15560  		if v_0.Op != OpARM64UBFX {
 15561  			break
 15562  		}
 15563  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 15564  		x := v_0.Args[0]
 15565  		if v_1.Op != OpARM64SRLconst || auxIntToInt64(v_1.AuxInt) != sc {
 15566  			break
 15567  		}
 15568  		y := v_1.Args[0]
 15569  		if !(sc == bfc.width()) {
 15570  			break
 15571  		}
 15572  		v.reset(OpARM64BFXIL)
 15573  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 15574  		v.AddArg2(y, x)
 15575  		return true
 15576  	}
 15577  	return false
 15578  }
 15579  func rewriteValueARM64_OpARM64ORshiftRA(v *Value) bool {
 15580  	v_1 := v.Args[1]
 15581  	v_0 := v.Args[0]
 15582  	b := v.Block
 15583  	// match: (ORshiftRA (MOVDconst [c]) x [d])
 15584  	// result: (ORconst [c] (SRAconst <x.Type> x [d]))
 15585  	for {
 15586  		d := auxIntToInt64(v.AuxInt)
 15587  		if v_0.Op != OpARM64MOVDconst {
 15588  			break
 15589  		}
 15590  		c := auxIntToInt64(v_0.AuxInt)
 15591  		x := v_1
 15592  		v.reset(OpARM64ORconst)
 15593  		v.AuxInt = int64ToAuxInt(c)
 15594  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
 15595  		v0.AuxInt = int64ToAuxInt(d)
 15596  		v0.AddArg(x)
 15597  		v.AddArg(v0)
 15598  		return true
 15599  	}
 15600  	// match: (ORshiftRA x (MOVDconst [c]) [d])
 15601  	// result: (ORconst x [c>>uint64(d)])
 15602  	for {
 15603  		d := auxIntToInt64(v.AuxInt)
 15604  		x := v_0
 15605  		if v_1.Op != OpARM64MOVDconst {
 15606  			break
 15607  		}
 15608  		c := auxIntToInt64(v_1.AuxInt)
 15609  		v.reset(OpARM64ORconst)
 15610  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
 15611  		v.AddArg(x)
 15612  		return true
 15613  	}
 15614  	// match: (ORshiftRA y:(SRAconst x [c]) x [c])
 15615  	// result: y
 15616  	for {
 15617  		c := auxIntToInt64(v.AuxInt)
 15618  		y := v_0
 15619  		if y.Op != OpARM64SRAconst || auxIntToInt64(y.AuxInt) != c {
 15620  			break
 15621  		}
 15622  		x := y.Args[0]
 15623  		if x != v_1 {
 15624  			break
 15625  		}
 15626  		v.copyOf(y)
 15627  		return true
 15628  	}
 15629  	return false
 15630  }
 15631  func rewriteValueARM64_OpARM64ORshiftRL(v *Value) bool {
 15632  	v_1 := v.Args[1]
 15633  	v_0 := v.Args[0]
 15634  	b := v.Block
 15635  	// match: (ORshiftRL (MOVDconst [c]) x [d])
 15636  	// result: (ORconst [c] (SRLconst <x.Type> x [d]))
 15637  	for {
 15638  		d := auxIntToInt64(v.AuxInt)
 15639  		if v_0.Op != OpARM64MOVDconst {
 15640  			break
 15641  		}
 15642  		c := auxIntToInt64(v_0.AuxInt)
 15643  		x := v_1
 15644  		v.reset(OpARM64ORconst)
 15645  		v.AuxInt = int64ToAuxInt(c)
 15646  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
 15647  		v0.AuxInt = int64ToAuxInt(d)
 15648  		v0.AddArg(x)
 15649  		v.AddArg(v0)
 15650  		return true
 15651  	}
 15652  	// match: (ORshiftRL x (MOVDconst [c]) [d])
 15653  	// result: (ORconst x [int64(uint64(c)>>uint64(d))])
 15654  	for {
 15655  		d := auxIntToInt64(v.AuxInt)
 15656  		x := v_0
 15657  		if v_1.Op != OpARM64MOVDconst {
 15658  			break
 15659  		}
 15660  		c := auxIntToInt64(v_1.AuxInt)
 15661  		v.reset(OpARM64ORconst)
 15662  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
 15663  		v.AddArg(x)
 15664  		return true
 15665  	}
 15666  	// match: (ORshiftRL y:(SRLconst x [c]) x [c])
 15667  	// result: y
 15668  	for {
 15669  		c := auxIntToInt64(v.AuxInt)
 15670  		y := v_0
 15671  		if y.Op != OpARM64SRLconst || auxIntToInt64(y.AuxInt) != c {
 15672  			break
 15673  		}
 15674  		x := y.Args[0]
 15675  		if x != v_1 {
 15676  			break
 15677  		}
 15678  		v.copyOf(y)
 15679  		return true
 15680  	}
 15681  	// match: (ORshiftRL [rc] (ANDconst [ac] x) (SLLconst [lc] y))
 15682  	// cond: lc > rc && ac == ^((1<<uint(64-lc)-1) << uint64(lc-rc))
 15683  	// result: (BFI [armBFAuxInt(lc-rc, 64-lc)] x y)
 15684  	for {
 15685  		rc := auxIntToInt64(v.AuxInt)
 15686  		if v_0.Op != OpARM64ANDconst {
 15687  			break
 15688  		}
 15689  		ac := auxIntToInt64(v_0.AuxInt)
 15690  		x := v_0.Args[0]
 15691  		if v_1.Op != OpARM64SLLconst {
 15692  			break
 15693  		}
 15694  		lc := auxIntToInt64(v_1.AuxInt)
 15695  		y := v_1.Args[0]
 15696  		if !(lc > rc && ac == ^((1<<uint(64-lc)-1)<<uint64(lc-rc))) {
 15697  			break
 15698  		}
 15699  		v.reset(OpARM64BFI)
 15700  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc-rc, 64-lc))
 15701  		v.AddArg2(x, y)
 15702  		return true
 15703  	}
 15704  	// match: (ORshiftRL [rc] (ANDconst [ac] y) (SLLconst [lc] x))
 15705  	// cond: lc < rc && ac == ^((1<<uint(64-rc)-1))
 15706  	// result: (BFXIL [armBFAuxInt(rc-lc, 64-rc)] y x)
 15707  	for {
 15708  		rc := auxIntToInt64(v.AuxInt)
 15709  		if v_0.Op != OpARM64ANDconst {
 15710  			break
 15711  		}
 15712  		ac := auxIntToInt64(v_0.AuxInt)
 15713  		y := v_0.Args[0]
 15714  		if v_1.Op != OpARM64SLLconst {
 15715  			break
 15716  		}
 15717  		lc := auxIntToInt64(v_1.AuxInt)
 15718  		x := v_1.Args[0]
 15719  		if !(lc < rc && ac == ^(1<<uint(64-rc)-1)) {
 15720  			break
 15721  		}
 15722  		v.reset(OpARM64BFXIL)
 15723  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc-lc, 64-rc))
 15724  		v.AddArg2(y, x)
 15725  		return true
 15726  	}
 15727  	return false
 15728  }
 15729  func rewriteValueARM64_OpARM64ORshiftRO(v *Value) bool {
 15730  	v_1 := v.Args[1]
 15731  	v_0 := v.Args[0]
 15732  	b := v.Block
 15733  	// match: (ORshiftRO (MOVDconst [c]) x [d])
 15734  	// result: (ORconst [c] (RORconst <x.Type> x [d]))
 15735  	for {
 15736  		d := auxIntToInt64(v.AuxInt)
 15737  		if v_0.Op != OpARM64MOVDconst {
 15738  			break
 15739  		}
 15740  		c := auxIntToInt64(v_0.AuxInt)
 15741  		x := v_1
 15742  		v.reset(OpARM64ORconst)
 15743  		v.AuxInt = int64ToAuxInt(c)
 15744  		v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
 15745  		v0.AuxInt = int64ToAuxInt(d)
 15746  		v0.AddArg(x)
 15747  		v.AddArg(v0)
 15748  		return true
 15749  	}
 15750  	// match: (ORshiftRO x (MOVDconst [c]) [d])
 15751  	// result: (ORconst x [rotateRight64(c, d)])
 15752  	for {
 15753  		d := auxIntToInt64(v.AuxInt)
 15754  		x := v_0
 15755  		if v_1.Op != OpARM64MOVDconst {
 15756  			break
 15757  		}
 15758  		c := auxIntToInt64(v_1.AuxInt)
 15759  		v.reset(OpARM64ORconst)
 15760  		v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
 15761  		v.AddArg(x)
 15762  		return true
 15763  	}
 15764  	// match: (ORshiftRO y:(RORconst x [c]) x [c])
 15765  	// result: y
 15766  	for {
 15767  		c := auxIntToInt64(v.AuxInt)
 15768  		y := v_0
 15769  		if y.Op != OpARM64RORconst || auxIntToInt64(y.AuxInt) != c {
 15770  			break
 15771  		}
 15772  		x := y.Args[0]
 15773  		if x != v_1 {
 15774  			break
 15775  		}
 15776  		v.copyOf(y)
 15777  		return true
 15778  	}
 15779  	return false
 15780  }
 15781  func rewriteValueARM64_OpARM64REV(v *Value) bool {
 15782  	v_0 := v.Args[0]
 15783  	// match: (REV (REV p))
 15784  	// result: p
 15785  	for {
 15786  		if v_0.Op != OpARM64REV {
 15787  			break
 15788  		}
 15789  		p := v_0.Args[0]
 15790  		v.copyOf(p)
 15791  		return true
 15792  	}
 15793  	return false
 15794  }
 15795  func rewriteValueARM64_OpARM64REV16(v *Value) bool {
 15796  	v_0 := v.Args[0]
 15797  	// match: (REV16 (MOVWUreg x))
 15798  	// result: (REV16W x)
 15799  	for {
 15800  		if v_0.Op != OpARM64MOVWUreg {
 15801  			break
 15802  		}
 15803  		x := v_0.Args[0]
 15804  		v.reset(OpARM64REV16W)
 15805  		v.AddArg(x)
 15806  		return true
 15807  	}
 15808  	return false
 15809  }
 15810  func rewriteValueARM64_OpARM64REVW(v *Value) bool {
 15811  	v_0 := v.Args[0]
 15812  	// match: (REVW (REVW p))
 15813  	// result: p
 15814  	for {
 15815  		if v_0.Op != OpARM64REVW {
 15816  			break
 15817  		}
 15818  		p := v_0.Args[0]
 15819  		v.copyOf(p)
 15820  		return true
 15821  	}
 15822  	return false
 15823  }
 15824  func rewriteValueARM64_OpARM64ROR(v *Value) bool {
 15825  	v_1 := v.Args[1]
 15826  	v_0 := v.Args[0]
 15827  	// match: (ROR x (MOVDconst [c]))
 15828  	// result: (RORconst x [c&63])
 15829  	for {
 15830  		x := v_0
 15831  		if v_1.Op != OpARM64MOVDconst {
 15832  			break
 15833  		}
 15834  		c := auxIntToInt64(v_1.AuxInt)
 15835  		v.reset(OpARM64RORconst)
 15836  		v.AuxInt = int64ToAuxInt(c & 63)
 15837  		v.AddArg(x)
 15838  		return true
 15839  	}
 15840  	return false
 15841  }
 15842  func rewriteValueARM64_OpARM64RORW(v *Value) bool {
 15843  	v_1 := v.Args[1]
 15844  	v_0 := v.Args[0]
 15845  	// match: (RORW x (MOVDconst [c]))
 15846  	// result: (RORWconst x [c&31])
 15847  	for {
 15848  		x := v_0
 15849  		if v_1.Op != OpARM64MOVDconst {
 15850  			break
 15851  		}
 15852  		c := auxIntToInt64(v_1.AuxInt)
 15853  		v.reset(OpARM64RORWconst)
 15854  		v.AuxInt = int64ToAuxInt(c & 31)
 15855  		v.AddArg(x)
 15856  		return true
 15857  	}
 15858  	return false
 15859  }
 15860  func rewriteValueARM64_OpARM64SBCSflags(v *Value) bool {
 15861  	v_2 := v.Args[2]
 15862  	v_1 := v.Args[1]
 15863  	v_0 := v.Args[0]
 15864  	b := v.Block
 15865  	typ := &b.Func.Config.Types
 15866  	// match: (SBCSflags x y (Select1 <types.TypeFlags> (NEGSflags (NEG <typ.UInt64> (NGCzerocarry <typ.UInt64> bo)))))
 15867  	// result: (SBCSflags x y bo)
 15868  	for {
 15869  		x := v_0
 15870  		y := v_1
 15871  		if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
 15872  			break
 15873  		}
 15874  		v_2_0 := v_2.Args[0]
 15875  		if v_2_0.Op != OpARM64NEGSflags {
 15876  			break
 15877  		}
 15878  		v_2_0_0 := v_2_0.Args[0]
 15879  		if v_2_0_0.Op != OpARM64NEG || v_2_0_0.Type != typ.UInt64 {
 15880  			break
 15881  		}
 15882  		v_2_0_0_0 := v_2_0_0.Args[0]
 15883  		if v_2_0_0_0.Op != OpARM64NGCzerocarry || v_2_0_0_0.Type != typ.UInt64 {
 15884  			break
 15885  		}
 15886  		bo := v_2_0_0_0.Args[0]
 15887  		v.reset(OpARM64SBCSflags)
 15888  		v.AddArg3(x, y, bo)
 15889  		return true
 15890  	}
 15891  	// match: (SBCSflags x y (Select1 <types.TypeFlags> (NEGSflags (MOVDconst [0]))))
 15892  	// result: (SUBSflags x y)
 15893  	for {
 15894  		x := v_0
 15895  		y := v_1
 15896  		if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
 15897  			break
 15898  		}
 15899  		v_2_0 := v_2.Args[0]
 15900  		if v_2_0.Op != OpARM64NEGSflags {
 15901  			break
 15902  		}
 15903  		v_2_0_0 := v_2_0.Args[0]
 15904  		if v_2_0_0.Op != OpARM64MOVDconst || auxIntToInt64(v_2_0_0.AuxInt) != 0 {
 15905  			break
 15906  		}
 15907  		v.reset(OpARM64SUBSflags)
 15908  		v.AddArg2(x, y)
 15909  		return true
 15910  	}
 15911  	return false
 15912  }
 15913  func rewriteValueARM64_OpARM64SBFX(v *Value) bool {
 15914  	v_0 := v.Args[0]
 15915  	// match: (SBFX [bfc] s:(SLLconst [sc] x))
 15916  	// cond: s.Uses == 1 && sc <= bfc.lsb()
 15917  	// result: (SBFX [armBFAuxInt(bfc.lsb() - sc, bfc.width())] x)
 15918  	for {
 15919  		bfc := auxIntToArm64BitField(v.AuxInt)
 15920  		s := v_0
 15921  		if s.Op != OpARM64SLLconst {
 15922  			break
 15923  		}
 15924  		sc := auxIntToInt64(s.AuxInt)
 15925  		x := s.Args[0]
 15926  		if !(s.Uses == 1 && sc <= bfc.lsb()) {
 15927  			break
 15928  		}
 15929  		v.reset(OpARM64SBFX)
 15930  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
 15931  		v.AddArg(x)
 15932  		return true
 15933  	}
 15934  	// match: (SBFX [bfc] s:(SLLconst [sc] x))
 15935  	// cond: s.Uses == 1 && sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()
 15936  	// result: (SBFIZ [armBFAuxInt(sc - bfc.lsb(), bfc.width() - (sc-bfc.lsb()))] x)
 15937  	for {
 15938  		bfc := auxIntToArm64BitField(v.AuxInt)
 15939  		s := v_0
 15940  		if s.Op != OpARM64SLLconst {
 15941  			break
 15942  		}
 15943  		sc := auxIntToInt64(s.AuxInt)
 15944  		x := s.Args[0]
 15945  		if !(s.Uses == 1 && sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()) {
 15946  			break
 15947  		}
 15948  		v.reset(OpARM64SBFIZ)
 15949  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.width()-(sc-bfc.lsb())))
 15950  		v.AddArg(x)
 15951  		return true
 15952  	}
 15953  	return false
 15954  }
 15955  func rewriteValueARM64_OpARM64SLL(v *Value) bool {
 15956  	v_1 := v.Args[1]
 15957  	v_0 := v.Args[0]
 15958  	// match: (SLL x (MOVDconst [c]))
 15959  	// result: (SLLconst x [c&63])
 15960  	for {
 15961  		x := v_0
 15962  		if v_1.Op != OpARM64MOVDconst {
 15963  			break
 15964  		}
 15965  		c := auxIntToInt64(v_1.AuxInt)
 15966  		v.reset(OpARM64SLLconst)
 15967  		v.AuxInt = int64ToAuxInt(c & 63)
 15968  		v.AddArg(x)
 15969  		return true
 15970  	}
 15971  	// match: (SLL x (ANDconst [63] y))
 15972  	// result: (SLL x y)
 15973  	for {
 15974  		x := v_0
 15975  		if v_1.Op != OpARM64ANDconst || auxIntToInt64(v_1.AuxInt) != 63 {
 15976  			break
 15977  		}
 15978  		y := v_1.Args[0]
 15979  		v.reset(OpARM64SLL)
 15980  		v.AddArg2(x, y)
 15981  		return true
 15982  	}
 15983  	return false
 15984  }
 15985  func rewriteValueARM64_OpARM64SLLconst(v *Value) bool {
 15986  	v_0 := v.Args[0]
 15987  	// match: (SLLconst [c] (MOVDconst [d]))
 15988  	// result: (MOVDconst [d<<uint64(c)])
 15989  	for {
 15990  		c := auxIntToInt64(v.AuxInt)
 15991  		if v_0.Op != OpARM64MOVDconst {
 15992  			break
 15993  		}
 15994  		d := auxIntToInt64(v_0.AuxInt)
 15995  		v.reset(OpARM64MOVDconst)
 15996  		v.AuxInt = int64ToAuxInt(d << uint64(c))
 15997  		return true
 15998  	}
 15999  	// match: (SLLconst [c] (SRLconst [c] x))
 16000  	// cond: 0 < c && c < 64
 16001  	// result: (ANDconst [^(1<<uint(c)-1)] x)
 16002  	for {
 16003  		c := auxIntToInt64(v.AuxInt)
 16004  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
 16005  			break
 16006  		}
 16007  		x := v_0.Args[0]
 16008  		if !(0 < c && c < 64) {
 16009  			break
 16010  		}
 16011  		v.reset(OpARM64ANDconst)
 16012  		v.AuxInt = int64ToAuxInt(^(1<<uint(c) - 1))
 16013  		v.AddArg(x)
 16014  		return true
 16015  	}
 16016  	// match: (SLLconst [lc] (MOVWreg x))
 16017  	// result: (SBFIZ [armBFAuxInt(lc, min(32, 64-lc))] x)
 16018  	for {
 16019  		lc := auxIntToInt64(v.AuxInt)
 16020  		if v_0.Op != OpARM64MOVWreg {
 16021  			break
 16022  		}
 16023  		x := v_0.Args[0]
 16024  		v.reset(OpARM64SBFIZ)
 16025  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(32, 64-lc)))
 16026  		v.AddArg(x)
 16027  		return true
 16028  	}
 16029  	// match: (SLLconst [lc] (MOVHreg x))
 16030  	// result: (SBFIZ [armBFAuxInt(lc, min(16, 64-lc))] x)
 16031  	for {
 16032  		lc := auxIntToInt64(v.AuxInt)
 16033  		if v_0.Op != OpARM64MOVHreg {
 16034  			break
 16035  		}
 16036  		x := v_0.Args[0]
 16037  		v.reset(OpARM64SBFIZ)
 16038  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(16, 64-lc)))
 16039  		v.AddArg(x)
 16040  		return true
 16041  	}
 16042  	// match: (SLLconst [lc] (MOVBreg x))
 16043  	// result: (SBFIZ [armBFAuxInt(lc, min(8, 64-lc))] x)
 16044  	for {
 16045  		lc := auxIntToInt64(v.AuxInt)
 16046  		if v_0.Op != OpARM64MOVBreg {
 16047  			break
 16048  		}
 16049  		x := v_0.Args[0]
 16050  		v.reset(OpARM64SBFIZ)
 16051  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(8, 64-lc)))
 16052  		v.AddArg(x)
 16053  		return true
 16054  	}
 16055  	// match: (SLLconst [lc] (MOVWUreg x))
 16056  	// result: (UBFIZ [armBFAuxInt(lc, min(32, 64-lc))] x)
 16057  	for {
 16058  		lc := auxIntToInt64(v.AuxInt)
 16059  		if v_0.Op != OpARM64MOVWUreg {
 16060  			break
 16061  		}
 16062  		x := v_0.Args[0]
 16063  		v.reset(OpARM64UBFIZ)
 16064  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(32, 64-lc)))
 16065  		v.AddArg(x)
 16066  		return true
 16067  	}
 16068  	// match: (SLLconst [lc] (MOVHUreg x))
 16069  	// result: (UBFIZ [armBFAuxInt(lc, min(16, 64-lc))] x)
 16070  	for {
 16071  		lc := auxIntToInt64(v.AuxInt)
 16072  		if v_0.Op != OpARM64MOVHUreg {
 16073  			break
 16074  		}
 16075  		x := v_0.Args[0]
 16076  		v.reset(OpARM64UBFIZ)
 16077  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(16, 64-lc)))
 16078  		v.AddArg(x)
 16079  		return true
 16080  	}
 16081  	// match: (SLLconst [lc] (MOVBUreg x))
 16082  	// result: (UBFIZ [armBFAuxInt(lc, min(8, 64-lc))] x)
 16083  	for {
 16084  		lc := auxIntToInt64(v.AuxInt)
 16085  		if v_0.Op != OpARM64MOVBUreg {
 16086  			break
 16087  		}
 16088  		x := v_0.Args[0]
 16089  		v.reset(OpARM64UBFIZ)
 16090  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(8, 64-lc)))
 16091  		v.AddArg(x)
 16092  		return true
 16093  	}
 16094  	// match: (SLLconst [sc] (ANDconst [ac] x))
 16095  	// cond: isARM64BFMask(sc, ac, 0)
 16096  	// result: (UBFIZ [armBFAuxInt(sc, arm64BFWidth(ac, 0))] x)
 16097  	for {
 16098  		sc := auxIntToInt64(v.AuxInt)
 16099  		if v_0.Op != OpARM64ANDconst {
 16100  			break
 16101  		}
 16102  		ac := auxIntToInt64(v_0.AuxInt)
 16103  		x := v_0.Args[0]
 16104  		if !(isARM64BFMask(sc, ac, 0)) {
 16105  			break
 16106  		}
 16107  		v.reset(OpARM64UBFIZ)
 16108  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, 0)))
 16109  		v.AddArg(x)
 16110  		return true
 16111  	}
 16112  	// match: (SLLconst [sc] (UBFIZ [bfc] x))
 16113  	// cond: sc+bfc.width()+bfc.lsb() < 64
 16114  	// result: (UBFIZ [armBFAuxInt(bfc.lsb()+sc, bfc.width())] x)
 16115  	for {
 16116  		sc := auxIntToInt64(v.AuxInt)
 16117  		if v_0.Op != OpARM64UBFIZ {
 16118  			break
 16119  		}
 16120  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 16121  		x := v_0.Args[0]
 16122  		if !(sc+bfc.width()+bfc.lsb() < 64) {
 16123  			break
 16124  		}
 16125  		v.reset(OpARM64UBFIZ)
 16126  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()))
 16127  		v.AddArg(x)
 16128  		return true
 16129  	}
 16130  	return false
 16131  }
 16132  func rewriteValueARM64_OpARM64SRA(v *Value) bool {
 16133  	v_1 := v.Args[1]
 16134  	v_0 := v.Args[0]
 16135  	// match: (SRA x (MOVDconst [c]))
 16136  	// result: (SRAconst x [c&63])
 16137  	for {
 16138  		x := v_0
 16139  		if v_1.Op != OpARM64MOVDconst {
 16140  			break
 16141  		}
 16142  		c := auxIntToInt64(v_1.AuxInt)
 16143  		v.reset(OpARM64SRAconst)
 16144  		v.AuxInt = int64ToAuxInt(c & 63)
 16145  		v.AddArg(x)
 16146  		return true
 16147  	}
 16148  	// match: (SRA x (ANDconst [63] y))
 16149  	// result: (SRA x y)
 16150  	for {
 16151  		x := v_0
 16152  		if v_1.Op != OpARM64ANDconst || auxIntToInt64(v_1.AuxInt) != 63 {
 16153  			break
 16154  		}
 16155  		y := v_1.Args[0]
 16156  		v.reset(OpARM64SRA)
 16157  		v.AddArg2(x, y)
 16158  		return true
 16159  	}
 16160  	return false
 16161  }
 16162  func rewriteValueARM64_OpARM64SRAconst(v *Value) bool {
 16163  	v_0 := v.Args[0]
 16164  	// match: (SRAconst [c] (MOVDconst [d]))
 16165  	// result: (MOVDconst [d>>uint64(c)])
 16166  	for {
 16167  		c := auxIntToInt64(v.AuxInt)
 16168  		if v_0.Op != OpARM64MOVDconst {
 16169  			break
 16170  		}
 16171  		d := auxIntToInt64(v_0.AuxInt)
 16172  		v.reset(OpARM64MOVDconst)
 16173  		v.AuxInt = int64ToAuxInt(d >> uint64(c))
 16174  		return true
 16175  	}
 16176  	// match: (SRAconst [rc] (SLLconst [lc] x))
 16177  	// cond: lc > rc
 16178  	// result: (SBFIZ [armBFAuxInt(lc-rc, 64-lc)] x)
 16179  	for {
 16180  		rc := auxIntToInt64(v.AuxInt)
 16181  		if v_0.Op != OpARM64SLLconst {
 16182  			break
 16183  		}
 16184  		lc := auxIntToInt64(v_0.AuxInt)
 16185  		x := v_0.Args[0]
 16186  		if !(lc > rc) {
 16187  			break
 16188  		}
 16189  		v.reset(OpARM64SBFIZ)
 16190  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc-rc, 64-lc))
 16191  		v.AddArg(x)
 16192  		return true
 16193  	}
 16194  	// match: (SRAconst [rc] (SLLconst [lc] x))
 16195  	// cond: lc <= rc
 16196  	// result: (SBFX [armBFAuxInt(rc-lc, 64-rc)] x)
 16197  	for {
 16198  		rc := auxIntToInt64(v.AuxInt)
 16199  		if v_0.Op != OpARM64SLLconst {
 16200  			break
 16201  		}
 16202  		lc := auxIntToInt64(v_0.AuxInt)
 16203  		x := v_0.Args[0]
 16204  		if !(lc <= rc) {
 16205  			break
 16206  		}
 16207  		v.reset(OpARM64SBFX)
 16208  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc-lc, 64-rc))
 16209  		v.AddArg(x)
 16210  		return true
 16211  	}
 16212  	// match: (SRAconst [rc] (MOVWreg x))
 16213  	// cond: rc < 32
 16214  	// result: (SBFX [armBFAuxInt(rc, 32-rc)] x)
 16215  	for {
 16216  		rc := auxIntToInt64(v.AuxInt)
 16217  		if v_0.Op != OpARM64MOVWreg {
 16218  			break
 16219  		}
 16220  		x := v_0.Args[0]
 16221  		if !(rc < 32) {
 16222  			break
 16223  		}
 16224  		v.reset(OpARM64SBFX)
 16225  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 32-rc))
 16226  		v.AddArg(x)
 16227  		return true
 16228  	}
 16229  	// match: (SRAconst [rc] (MOVHreg x))
 16230  	// cond: rc < 16
 16231  	// result: (SBFX [armBFAuxInt(rc, 16-rc)] x)
 16232  	for {
 16233  		rc := auxIntToInt64(v.AuxInt)
 16234  		if v_0.Op != OpARM64MOVHreg {
 16235  			break
 16236  		}
 16237  		x := v_0.Args[0]
 16238  		if !(rc < 16) {
 16239  			break
 16240  		}
 16241  		v.reset(OpARM64SBFX)
 16242  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 16-rc))
 16243  		v.AddArg(x)
 16244  		return true
 16245  	}
 16246  	// match: (SRAconst [rc] (MOVBreg x))
 16247  	// cond: rc < 8
 16248  	// result: (SBFX [armBFAuxInt(rc, 8-rc)] x)
 16249  	for {
 16250  		rc := auxIntToInt64(v.AuxInt)
 16251  		if v_0.Op != OpARM64MOVBreg {
 16252  			break
 16253  		}
 16254  		x := v_0.Args[0]
 16255  		if !(rc < 8) {
 16256  			break
 16257  		}
 16258  		v.reset(OpARM64SBFX)
 16259  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 8-rc))
 16260  		v.AddArg(x)
 16261  		return true
 16262  	}
 16263  	// match: (SRAconst [sc] (SBFIZ [bfc] x))
 16264  	// cond: sc < bfc.lsb()
 16265  	// result: (SBFIZ [armBFAuxInt(bfc.lsb()-sc, bfc.width())] x)
 16266  	for {
 16267  		sc := auxIntToInt64(v.AuxInt)
 16268  		if v_0.Op != OpARM64SBFIZ {
 16269  			break
 16270  		}
 16271  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 16272  		x := v_0.Args[0]
 16273  		if !(sc < bfc.lsb()) {
 16274  			break
 16275  		}
 16276  		v.reset(OpARM64SBFIZ)
 16277  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
 16278  		v.AddArg(x)
 16279  		return true
 16280  	}
 16281  	// match: (SRAconst [sc] (SBFIZ [bfc] x))
 16282  	// cond: sc >= bfc.lsb() && sc < bfc.lsb()+bfc.width()
 16283  	// result: (SBFX [armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc)] x)
 16284  	for {
 16285  		sc := auxIntToInt64(v.AuxInt)
 16286  		if v_0.Op != OpARM64SBFIZ {
 16287  			break
 16288  		}
 16289  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 16290  		x := v_0.Args[0]
 16291  		if !(sc >= bfc.lsb() && sc < bfc.lsb()+bfc.width()) {
 16292  			break
 16293  		}
 16294  		v.reset(OpARM64SBFX)
 16295  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc))
 16296  		v.AddArg(x)
 16297  		return true
 16298  	}
 16299  	return false
 16300  }
 16301  func rewriteValueARM64_OpARM64SRL(v *Value) bool {
 16302  	v_1 := v.Args[1]
 16303  	v_0 := v.Args[0]
 16304  	// match: (SRL x (MOVDconst [c]))
 16305  	// result: (SRLconst x [c&63])
 16306  	for {
 16307  		x := v_0
 16308  		if v_1.Op != OpARM64MOVDconst {
 16309  			break
 16310  		}
 16311  		c := auxIntToInt64(v_1.AuxInt)
 16312  		v.reset(OpARM64SRLconst)
 16313  		v.AuxInt = int64ToAuxInt(c & 63)
 16314  		v.AddArg(x)
 16315  		return true
 16316  	}
 16317  	// match: (SRL x (ANDconst [63] y))
 16318  	// result: (SRL x y)
 16319  	for {
 16320  		x := v_0
 16321  		if v_1.Op != OpARM64ANDconst || auxIntToInt64(v_1.AuxInt) != 63 {
 16322  			break
 16323  		}
 16324  		y := v_1.Args[0]
 16325  		v.reset(OpARM64SRL)
 16326  		v.AddArg2(x, y)
 16327  		return true
 16328  	}
 16329  	return false
 16330  }
 16331  func rewriteValueARM64_OpARM64SRLconst(v *Value) bool {
 16332  	v_0 := v.Args[0]
 16333  	// match: (SRLconst [c] (MOVDconst [d]))
 16334  	// result: (MOVDconst [int64(uint64(d)>>uint64(c))])
 16335  	for {
 16336  		c := auxIntToInt64(v.AuxInt)
 16337  		if v_0.Op != OpARM64MOVDconst {
 16338  			break
 16339  		}
 16340  		d := auxIntToInt64(v_0.AuxInt)
 16341  		v.reset(OpARM64MOVDconst)
 16342  		v.AuxInt = int64ToAuxInt(int64(uint64(d) >> uint64(c)))
 16343  		return true
 16344  	}
 16345  	// match: (SRLconst [c] (SLLconst [c] x))
 16346  	// cond: 0 < c && c < 64
 16347  	// result: (ANDconst [1<<uint(64-c)-1] x)
 16348  	for {
 16349  		c := auxIntToInt64(v.AuxInt)
 16350  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
 16351  			break
 16352  		}
 16353  		x := v_0.Args[0]
 16354  		if !(0 < c && c < 64) {
 16355  			break
 16356  		}
 16357  		v.reset(OpARM64ANDconst)
 16358  		v.AuxInt = int64ToAuxInt(1<<uint(64-c) - 1)
 16359  		v.AddArg(x)
 16360  		return true
 16361  	}
 16362  	// match: (SRLconst [rc] (MOVWUreg x))
 16363  	// cond: rc >= 32
 16364  	// result: (MOVDconst [0])
 16365  	for {
 16366  		rc := auxIntToInt64(v.AuxInt)
 16367  		if v_0.Op != OpARM64MOVWUreg {
 16368  			break
 16369  		}
 16370  		if !(rc >= 32) {
 16371  			break
 16372  		}
 16373  		v.reset(OpARM64MOVDconst)
 16374  		v.AuxInt = int64ToAuxInt(0)
 16375  		return true
 16376  	}
 16377  	// match: (SRLconst [rc] (MOVHUreg x))
 16378  	// cond: rc >= 16
 16379  	// result: (MOVDconst [0])
 16380  	for {
 16381  		rc := auxIntToInt64(v.AuxInt)
 16382  		if v_0.Op != OpARM64MOVHUreg {
 16383  			break
 16384  		}
 16385  		if !(rc >= 16) {
 16386  			break
 16387  		}
 16388  		v.reset(OpARM64MOVDconst)
 16389  		v.AuxInt = int64ToAuxInt(0)
 16390  		return true
 16391  	}
 16392  	// match: (SRLconst [rc] (MOVBUreg x))
 16393  	// cond: rc >= 8
 16394  	// result: (MOVDconst [0])
 16395  	for {
 16396  		rc := auxIntToInt64(v.AuxInt)
 16397  		if v_0.Op != OpARM64MOVBUreg {
 16398  			break
 16399  		}
 16400  		if !(rc >= 8) {
 16401  			break
 16402  		}
 16403  		v.reset(OpARM64MOVDconst)
 16404  		v.AuxInt = int64ToAuxInt(0)
 16405  		return true
 16406  	}
 16407  	// match: (SRLconst [rc] (SLLconst [lc] x))
 16408  	// cond: lc > rc
 16409  	// result: (UBFIZ [armBFAuxInt(lc-rc, 64-lc)] x)
 16410  	for {
 16411  		rc := auxIntToInt64(v.AuxInt)
 16412  		if v_0.Op != OpARM64SLLconst {
 16413  			break
 16414  		}
 16415  		lc := auxIntToInt64(v_0.AuxInt)
 16416  		x := v_0.Args[0]
 16417  		if !(lc > rc) {
 16418  			break
 16419  		}
 16420  		v.reset(OpARM64UBFIZ)
 16421  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc-rc, 64-lc))
 16422  		v.AddArg(x)
 16423  		return true
 16424  	}
 16425  	// match: (SRLconst [rc] (SLLconst [lc] x))
 16426  	// cond: lc < rc
 16427  	// result: (UBFX [armBFAuxInt(rc-lc, 64-rc)] x)
 16428  	for {
 16429  		rc := auxIntToInt64(v.AuxInt)
 16430  		if v_0.Op != OpARM64SLLconst {
 16431  			break
 16432  		}
 16433  		lc := auxIntToInt64(v_0.AuxInt)
 16434  		x := v_0.Args[0]
 16435  		if !(lc < rc) {
 16436  			break
 16437  		}
 16438  		v.reset(OpARM64UBFX)
 16439  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc-lc, 64-rc))
 16440  		v.AddArg(x)
 16441  		return true
 16442  	}
 16443  	// match: (SRLconst [rc] (MOVWUreg x))
 16444  	// cond: rc < 32
 16445  	// result: (UBFX [armBFAuxInt(rc, 32-rc)] x)
 16446  	for {
 16447  		rc := auxIntToInt64(v.AuxInt)
 16448  		if v_0.Op != OpARM64MOVWUreg {
 16449  			break
 16450  		}
 16451  		x := v_0.Args[0]
 16452  		if !(rc < 32) {
 16453  			break
 16454  		}
 16455  		v.reset(OpARM64UBFX)
 16456  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 32-rc))
 16457  		v.AddArg(x)
 16458  		return true
 16459  	}
 16460  	// match: (SRLconst [rc] (MOVHUreg x))
 16461  	// cond: rc < 16
 16462  	// result: (UBFX [armBFAuxInt(rc, 16-rc)] x)
 16463  	for {
 16464  		rc := auxIntToInt64(v.AuxInt)
 16465  		if v_0.Op != OpARM64MOVHUreg {
 16466  			break
 16467  		}
 16468  		x := v_0.Args[0]
 16469  		if !(rc < 16) {
 16470  			break
 16471  		}
 16472  		v.reset(OpARM64UBFX)
 16473  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 16-rc))
 16474  		v.AddArg(x)
 16475  		return true
 16476  	}
 16477  	// match: (SRLconst [rc] (MOVBUreg x))
 16478  	// cond: rc < 8
 16479  	// result: (UBFX [armBFAuxInt(rc, 8-rc)] x)
 16480  	for {
 16481  		rc := auxIntToInt64(v.AuxInt)
 16482  		if v_0.Op != OpARM64MOVBUreg {
 16483  			break
 16484  		}
 16485  		x := v_0.Args[0]
 16486  		if !(rc < 8) {
 16487  			break
 16488  		}
 16489  		v.reset(OpARM64UBFX)
 16490  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 8-rc))
 16491  		v.AddArg(x)
 16492  		return true
 16493  	}
 16494  	// match: (SRLconst [sc] (ANDconst [ac] x))
 16495  	// cond: isARM64BFMask(sc, ac, sc)
 16496  	// result: (UBFX [armBFAuxInt(sc, arm64BFWidth(ac, sc))] x)
 16497  	for {
 16498  		sc := auxIntToInt64(v.AuxInt)
 16499  		if v_0.Op != OpARM64ANDconst {
 16500  			break
 16501  		}
 16502  		ac := auxIntToInt64(v_0.AuxInt)
 16503  		x := v_0.Args[0]
 16504  		if !(isARM64BFMask(sc, ac, sc)) {
 16505  			break
 16506  		}
 16507  		v.reset(OpARM64UBFX)
 16508  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, sc)))
 16509  		v.AddArg(x)
 16510  		return true
 16511  	}
 16512  	// match: (SRLconst [sc] (UBFX [bfc] x))
 16513  	// cond: sc < bfc.width()
 16514  	// result: (UBFX [armBFAuxInt(bfc.lsb()+sc, bfc.width()-sc)] x)
 16515  	for {
 16516  		sc := auxIntToInt64(v.AuxInt)
 16517  		if v_0.Op != OpARM64UBFX {
 16518  			break
 16519  		}
 16520  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 16521  		x := v_0.Args[0]
 16522  		if !(sc < bfc.width()) {
 16523  			break
 16524  		}
 16525  		v.reset(OpARM64UBFX)
 16526  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()-sc))
 16527  		v.AddArg(x)
 16528  		return true
 16529  	}
 16530  	// match: (SRLconst [sc] (UBFIZ [bfc] x))
 16531  	// cond: sc == bfc.lsb()
 16532  	// result: (ANDconst [1<<uint(bfc.width())-1] x)
 16533  	for {
 16534  		sc := auxIntToInt64(v.AuxInt)
 16535  		if v_0.Op != OpARM64UBFIZ {
 16536  			break
 16537  		}
 16538  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 16539  		x := v_0.Args[0]
 16540  		if !(sc == bfc.lsb()) {
 16541  			break
 16542  		}
 16543  		v.reset(OpARM64ANDconst)
 16544  		v.AuxInt = int64ToAuxInt(1<<uint(bfc.width()) - 1)
 16545  		v.AddArg(x)
 16546  		return true
 16547  	}
 16548  	// match: (SRLconst [sc] (UBFIZ [bfc] x))
 16549  	// cond: sc < bfc.lsb()
 16550  	// result: (UBFIZ [armBFAuxInt(bfc.lsb()-sc, bfc.width())] x)
 16551  	for {
 16552  		sc := auxIntToInt64(v.AuxInt)
 16553  		if v_0.Op != OpARM64UBFIZ {
 16554  			break
 16555  		}
 16556  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 16557  		x := v_0.Args[0]
 16558  		if !(sc < bfc.lsb()) {
 16559  			break
 16560  		}
 16561  		v.reset(OpARM64UBFIZ)
 16562  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
 16563  		v.AddArg(x)
 16564  		return true
 16565  	}
 16566  	// match: (SRLconst [sc] (UBFIZ [bfc] x))
 16567  	// cond: sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()
 16568  	// result: (UBFX [armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc)] x)
 16569  	for {
 16570  		sc := auxIntToInt64(v.AuxInt)
 16571  		if v_0.Op != OpARM64UBFIZ {
 16572  			break
 16573  		}
 16574  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 16575  		x := v_0.Args[0]
 16576  		if !(sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()) {
 16577  			break
 16578  		}
 16579  		v.reset(OpARM64UBFX)
 16580  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc))
 16581  		v.AddArg(x)
 16582  		return true
 16583  	}
 16584  	return false
 16585  }
 16586  func rewriteValueARM64_OpARM64STP(v *Value) bool {
 16587  	v_3 := v.Args[3]
 16588  	v_2 := v.Args[2]
 16589  	v_1 := v.Args[1]
 16590  	v_0 := v.Args[0]
 16591  	b := v.Block
 16592  	config := b.Func.Config
 16593  	// match: (STP [off1] {sym} (ADDconst [off2] ptr) val1 val2 mem)
 16594  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 16595  	// result: (STP [off1+int32(off2)] {sym} ptr val1 val2 mem)
 16596  	for {
 16597  		off1 := auxIntToInt32(v.AuxInt)
 16598  		sym := auxToSym(v.Aux)
 16599  		if v_0.Op != OpARM64ADDconst {
 16600  			break
 16601  		}
 16602  		off2 := auxIntToInt64(v_0.AuxInt)
 16603  		ptr := v_0.Args[0]
 16604  		val1 := v_1
 16605  		val2 := v_2
 16606  		mem := v_3
 16607  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 16608  			break
 16609  		}
 16610  		v.reset(OpARM64STP)
 16611  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 16612  		v.Aux = symToAux(sym)
 16613  		v.AddArg4(ptr, val1, val2, mem)
 16614  		return true
 16615  	}
 16616  	// match: (STP [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val1 val2 mem)
 16617  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 16618  	// result: (STP [off1+off2] {mergeSym(sym1,sym2)} ptr val1 val2 mem)
 16619  	for {
 16620  		off1 := auxIntToInt32(v.AuxInt)
 16621  		sym1 := auxToSym(v.Aux)
 16622  		if v_0.Op != OpARM64MOVDaddr {
 16623  			break
 16624  		}
 16625  		off2 := auxIntToInt32(v_0.AuxInt)
 16626  		sym2 := auxToSym(v_0.Aux)
 16627  		ptr := v_0.Args[0]
 16628  		val1 := v_1
 16629  		val2 := v_2
 16630  		mem := v_3
 16631  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 16632  			break
 16633  		}
 16634  		v.reset(OpARM64STP)
 16635  		v.AuxInt = int32ToAuxInt(off1 + off2)
 16636  		v.Aux = symToAux(mergeSym(sym1, sym2))
 16637  		v.AddArg4(ptr, val1, val2, mem)
 16638  		return true
 16639  	}
 16640  	return false
 16641  }
 16642  func rewriteValueARM64_OpARM64SUB(v *Value) bool {
 16643  	v_1 := v.Args[1]
 16644  	v_0 := v.Args[0]
 16645  	b := v.Block
 16646  	// match: (SUB x (MOVDconst [c]))
 16647  	// result: (SUBconst [c] x)
 16648  	for {
 16649  		x := v_0
 16650  		if v_1.Op != OpARM64MOVDconst {
 16651  			break
 16652  		}
 16653  		c := auxIntToInt64(v_1.AuxInt)
 16654  		v.reset(OpARM64SUBconst)
 16655  		v.AuxInt = int64ToAuxInt(c)
 16656  		v.AddArg(x)
 16657  		return true
 16658  	}
 16659  	// match: (SUB a l:(MUL x y))
 16660  	// cond: l.Uses==1 && clobber(l)
 16661  	// result: (MSUB a x y)
 16662  	for {
 16663  		a := v_0
 16664  		l := v_1
 16665  		if l.Op != OpARM64MUL {
 16666  			break
 16667  		}
 16668  		y := l.Args[1]
 16669  		x := l.Args[0]
 16670  		if !(l.Uses == 1 && clobber(l)) {
 16671  			break
 16672  		}
 16673  		v.reset(OpARM64MSUB)
 16674  		v.AddArg3(a, x, y)
 16675  		return true
 16676  	}
 16677  	// match: (SUB a l:(MNEG x y))
 16678  	// cond: l.Uses==1 && clobber(l)
 16679  	// result: (MADD a x y)
 16680  	for {
 16681  		a := v_0
 16682  		l := v_1
 16683  		if l.Op != OpARM64MNEG {
 16684  			break
 16685  		}
 16686  		y := l.Args[1]
 16687  		x := l.Args[0]
 16688  		if !(l.Uses == 1 && clobber(l)) {
 16689  			break
 16690  		}
 16691  		v.reset(OpARM64MADD)
 16692  		v.AddArg3(a, x, y)
 16693  		return true
 16694  	}
 16695  	// match: (SUB a l:(MULW x y))
 16696  	// cond: v.Type.Size() <= 4 && l.Uses==1 && clobber(l)
 16697  	// result: (MSUBW a x y)
 16698  	for {
 16699  		a := v_0
 16700  		l := v_1
 16701  		if l.Op != OpARM64MULW {
 16702  			break
 16703  		}
 16704  		y := l.Args[1]
 16705  		x := l.Args[0]
 16706  		if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
 16707  			break
 16708  		}
 16709  		v.reset(OpARM64MSUBW)
 16710  		v.AddArg3(a, x, y)
 16711  		return true
 16712  	}
 16713  	// match: (SUB a l:(MNEGW x y))
 16714  	// cond: v.Type.Size() <= 4 && l.Uses==1 && clobber(l)
 16715  	// result: (MADDW a x y)
 16716  	for {
 16717  		a := v_0
 16718  		l := v_1
 16719  		if l.Op != OpARM64MNEGW {
 16720  			break
 16721  		}
 16722  		y := l.Args[1]
 16723  		x := l.Args[0]
 16724  		if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
 16725  			break
 16726  		}
 16727  		v.reset(OpARM64MADDW)
 16728  		v.AddArg3(a, x, y)
 16729  		return true
 16730  	}
 16731  	// match: (SUB <t> a p:(ADDconst [c] m:(MUL _ _)))
 16732  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 16733  	// result: (SUBconst [c] (SUB <v.Type> a m))
 16734  	for {
 16735  		t := v.Type
 16736  		a := v_0
 16737  		p := v_1
 16738  		if p.Op != OpARM64ADDconst {
 16739  			break
 16740  		}
 16741  		c := auxIntToInt64(p.AuxInt)
 16742  		m := p.Args[0]
 16743  		if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 16744  			break
 16745  		}
 16746  		v.reset(OpARM64SUBconst)
 16747  		v.AuxInt = int64ToAuxInt(c)
 16748  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 16749  		v0.AddArg2(a, m)
 16750  		v.AddArg(v0)
 16751  		return true
 16752  	}
 16753  	// match: (SUB <t> a p:(ADDconst [c] m:(MULW _ _)))
 16754  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 16755  	// result: (SUBconst [c] (SUB <v.Type> a m))
 16756  	for {
 16757  		t := v.Type
 16758  		a := v_0
 16759  		p := v_1
 16760  		if p.Op != OpARM64ADDconst {
 16761  			break
 16762  		}
 16763  		c := auxIntToInt64(p.AuxInt)
 16764  		m := p.Args[0]
 16765  		if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 16766  			break
 16767  		}
 16768  		v.reset(OpARM64SUBconst)
 16769  		v.AuxInt = int64ToAuxInt(c)
 16770  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 16771  		v0.AddArg2(a, m)
 16772  		v.AddArg(v0)
 16773  		return true
 16774  	}
 16775  	// match: (SUB <t> a p:(ADDconst [c] m:(MNEG _ _)))
 16776  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 16777  	// result: (SUBconst [c] (SUB <v.Type> a m))
 16778  	for {
 16779  		t := v.Type
 16780  		a := v_0
 16781  		p := v_1
 16782  		if p.Op != OpARM64ADDconst {
 16783  			break
 16784  		}
 16785  		c := auxIntToInt64(p.AuxInt)
 16786  		m := p.Args[0]
 16787  		if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 16788  			break
 16789  		}
 16790  		v.reset(OpARM64SUBconst)
 16791  		v.AuxInt = int64ToAuxInt(c)
 16792  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 16793  		v0.AddArg2(a, m)
 16794  		v.AddArg(v0)
 16795  		return true
 16796  	}
 16797  	// match: (SUB <t> a p:(ADDconst [c] m:(MNEGW _ _)))
 16798  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 16799  	// result: (SUBconst [c] (SUB <v.Type> a m))
 16800  	for {
 16801  		t := v.Type
 16802  		a := v_0
 16803  		p := v_1
 16804  		if p.Op != OpARM64ADDconst {
 16805  			break
 16806  		}
 16807  		c := auxIntToInt64(p.AuxInt)
 16808  		m := p.Args[0]
 16809  		if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 16810  			break
 16811  		}
 16812  		v.reset(OpARM64SUBconst)
 16813  		v.AuxInt = int64ToAuxInt(c)
 16814  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 16815  		v0.AddArg2(a, m)
 16816  		v.AddArg(v0)
 16817  		return true
 16818  	}
 16819  	// match: (SUB <t> a p:(SUBconst [c] m:(MUL _ _)))
 16820  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 16821  	// result: (ADDconst [c] (SUB <v.Type> a m))
 16822  	for {
 16823  		t := v.Type
 16824  		a := v_0
 16825  		p := v_1
 16826  		if p.Op != OpARM64SUBconst {
 16827  			break
 16828  		}
 16829  		c := auxIntToInt64(p.AuxInt)
 16830  		m := p.Args[0]
 16831  		if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 16832  			break
 16833  		}
 16834  		v.reset(OpARM64ADDconst)
 16835  		v.AuxInt = int64ToAuxInt(c)
 16836  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 16837  		v0.AddArg2(a, m)
 16838  		v.AddArg(v0)
 16839  		return true
 16840  	}
 16841  	// match: (SUB <t> a p:(SUBconst [c] m:(MULW _ _)))
 16842  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 16843  	// result: (ADDconst [c] (SUB <v.Type> a m))
 16844  	for {
 16845  		t := v.Type
 16846  		a := v_0
 16847  		p := v_1
 16848  		if p.Op != OpARM64SUBconst {
 16849  			break
 16850  		}
 16851  		c := auxIntToInt64(p.AuxInt)
 16852  		m := p.Args[0]
 16853  		if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 16854  			break
 16855  		}
 16856  		v.reset(OpARM64ADDconst)
 16857  		v.AuxInt = int64ToAuxInt(c)
 16858  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 16859  		v0.AddArg2(a, m)
 16860  		v.AddArg(v0)
 16861  		return true
 16862  	}
 16863  	// match: (SUB <t> a p:(SUBconst [c] m:(MNEG _ _)))
 16864  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 16865  	// result: (ADDconst [c] (SUB <v.Type> a m))
 16866  	for {
 16867  		t := v.Type
 16868  		a := v_0
 16869  		p := v_1
 16870  		if p.Op != OpARM64SUBconst {
 16871  			break
 16872  		}
 16873  		c := auxIntToInt64(p.AuxInt)
 16874  		m := p.Args[0]
 16875  		if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 16876  			break
 16877  		}
 16878  		v.reset(OpARM64ADDconst)
 16879  		v.AuxInt = int64ToAuxInt(c)
 16880  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 16881  		v0.AddArg2(a, m)
 16882  		v.AddArg(v0)
 16883  		return true
 16884  	}
 16885  	// match: (SUB <t> a p:(SUBconst [c] m:(MNEGW _ _)))
 16886  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 16887  	// result: (ADDconst [c] (SUB <v.Type> a m))
 16888  	for {
 16889  		t := v.Type
 16890  		a := v_0
 16891  		p := v_1
 16892  		if p.Op != OpARM64SUBconst {
 16893  			break
 16894  		}
 16895  		c := auxIntToInt64(p.AuxInt)
 16896  		m := p.Args[0]
 16897  		if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 16898  			break
 16899  		}
 16900  		v.reset(OpARM64ADDconst)
 16901  		v.AuxInt = int64ToAuxInt(c)
 16902  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 16903  		v0.AddArg2(a, m)
 16904  		v.AddArg(v0)
 16905  		return true
 16906  	}
 16907  	// match: (SUB x (NEG y))
 16908  	// result: (ADD x y)
 16909  	for {
 16910  		x := v_0
 16911  		if v_1.Op != OpARM64NEG {
 16912  			break
 16913  		}
 16914  		y := v_1.Args[0]
 16915  		v.reset(OpARM64ADD)
 16916  		v.AddArg2(x, y)
 16917  		return true
 16918  	}
 16919  	// match: (SUB x x)
 16920  	// result: (MOVDconst [0])
 16921  	for {
 16922  		x := v_0
 16923  		if x != v_1 {
 16924  			break
 16925  		}
 16926  		v.reset(OpARM64MOVDconst)
 16927  		v.AuxInt = int64ToAuxInt(0)
 16928  		return true
 16929  	}
 16930  	// match: (SUB x (SUB y z))
 16931  	// result: (SUB (ADD <v.Type> x z) y)
 16932  	for {
 16933  		x := v_0
 16934  		if v_1.Op != OpARM64SUB {
 16935  			break
 16936  		}
 16937  		z := v_1.Args[1]
 16938  		y := v_1.Args[0]
 16939  		v.reset(OpARM64SUB)
 16940  		v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
 16941  		v0.AddArg2(x, z)
 16942  		v.AddArg2(v0, y)
 16943  		return true
 16944  	}
 16945  	// match: (SUB (SUB x y) z)
 16946  	// result: (SUB x (ADD <y.Type> y z))
 16947  	for {
 16948  		if v_0.Op != OpARM64SUB {
 16949  			break
 16950  		}
 16951  		y := v_0.Args[1]
 16952  		x := v_0.Args[0]
 16953  		z := v_1
 16954  		v.reset(OpARM64SUB)
 16955  		v0 := b.NewValue0(v.Pos, OpARM64ADD, y.Type)
 16956  		v0.AddArg2(y, z)
 16957  		v.AddArg2(x, v0)
 16958  		return true
 16959  	}
 16960  	// match: (SUB x0 x1:(SLLconst [c] y))
 16961  	// cond: clobberIfDead(x1)
 16962  	// result: (SUBshiftLL x0 y [c])
 16963  	for {
 16964  		x0 := v_0
 16965  		x1 := v_1
 16966  		if x1.Op != OpARM64SLLconst {
 16967  			break
 16968  		}
 16969  		c := auxIntToInt64(x1.AuxInt)
 16970  		y := x1.Args[0]
 16971  		if !(clobberIfDead(x1)) {
 16972  			break
 16973  		}
 16974  		v.reset(OpARM64SUBshiftLL)
 16975  		v.AuxInt = int64ToAuxInt(c)
 16976  		v.AddArg2(x0, y)
 16977  		return true
 16978  	}
 16979  	// match: (SUB x0 x1:(SRLconst [c] y))
 16980  	// cond: clobberIfDead(x1)
 16981  	// result: (SUBshiftRL x0 y [c])
 16982  	for {
 16983  		x0 := v_0
 16984  		x1 := v_1
 16985  		if x1.Op != OpARM64SRLconst {
 16986  			break
 16987  		}
 16988  		c := auxIntToInt64(x1.AuxInt)
 16989  		y := x1.Args[0]
 16990  		if !(clobberIfDead(x1)) {
 16991  			break
 16992  		}
 16993  		v.reset(OpARM64SUBshiftRL)
 16994  		v.AuxInt = int64ToAuxInt(c)
 16995  		v.AddArg2(x0, y)
 16996  		return true
 16997  	}
 16998  	// match: (SUB x0 x1:(SRAconst [c] y))
 16999  	// cond: clobberIfDead(x1)
 17000  	// result: (SUBshiftRA x0 y [c])
 17001  	for {
 17002  		x0 := v_0
 17003  		x1 := v_1
 17004  		if x1.Op != OpARM64SRAconst {
 17005  			break
 17006  		}
 17007  		c := auxIntToInt64(x1.AuxInt)
 17008  		y := x1.Args[0]
 17009  		if !(clobberIfDead(x1)) {
 17010  			break
 17011  		}
 17012  		v.reset(OpARM64SUBshiftRA)
 17013  		v.AuxInt = int64ToAuxInt(c)
 17014  		v.AddArg2(x0, y)
 17015  		return true
 17016  	}
 17017  	return false
 17018  }
 17019  func rewriteValueARM64_OpARM64SUBconst(v *Value) bool {
 17020  	v_0 := v.Args[0]
 17021  	// match: (SUBconst [0] x)
 17022  	// result: x
 17023  	for {
 17024  		if auxIntToInt64(v.AuxInt) != 0 {
 17025  			break
 17026  		}
 17027  		x := v_0
 17028  		v.copyOf(x)
 17029  		return true
 17030  	}
 17031  	// match: (SUBconst [c] (MOVDconst [d]))
 17032  	// result: (MOVDconst [d-c])
 17033  	for {
 17034  		c := auxIntToInt64(v.AuxInt)
 17035  		if v_0.Op != OpARM64MOVDconst {
 17036  			break
 17037  		}
 17038  		d := auxIntToInt64(v_0.AuxInt)
 17039  		v.reset(OpARM64MOVDconst)
 17040  		v.AuxInt = int64ToAuxInt(d - c)
 17041  		return true
 17042  	}
 17043  	// match: (SUBconst [c] (SUBconst [d] x))
 17044  	// result: (ADDconst [-c-d] x)
 17045  	for {
 17046  		c := auxIntToInt64(v.AuxInt)
 17047  		if v_0.Op != OpARM64SUBconst {
 17048  			break
 17049  		}
 17050  		d := auxIntToInt64(v_0.AuxInt)
 17051  		x := v_0.Args[0]
 17052  		v.reset(OpARM64ADDconst)
 17053  		v.AuxInt = int64ToAuxInt(-c - d)
 17054  		v.AddArg(x)
 17055  		return true
 17056  	}
 17057  	// match: (SUBconst [c] (ADDconst [d] x))
 17058  	// result: (ADDconst [-c+d] x)
 17059  	for {
 17060  		c := auxIntToInt64(v.AuxInt)
 17061  		if v_0.Op != OpARM64ADDconst {
 17062  			break
 17063  		}
 17064  		d := auxIntToInt64(v_0.AuxInt)
 17065  		x := v_0.Args[0]
 17066  		v.reset(OpARM64ADDconst)
 17067  		v.AuxInt = int64ToAuxInt(-c + d)
 17068  		v.AddArg(x)
 17069  		return true
 17070  	}
 17071  	return false
 17072  }
 17073  func rewriteValueARM64_OpARM64SUBshiftLL(v *Value) bool {
 17074  	v_1 := v.Args[1]
 17075  	v_0 := v.Args[0]
 17076  	// match: (SUBshiftLL x (MOVDconst [c]) [d])
 17077  	// result: (SUBconst x [int64(uint64(c)<<uint64(d))])
 17078  	for {
 17079  		d := auxIntToInt64(v.AuxInt)
 17080  		x := v_0
 17081  		if v_1.Op != OpARM64MOVDconst {
 17082  			break
 17083  		}
 17084  		c := auxIntToInt64(v_1.AuxInt)
 17085  		v.reset(OpARM64SUBconst)
 17086  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
 17087  		v.AddArg(x)
 17088  		return true
 17089  	}
 17090  	// match: (SUBshiftLL (SLLconst x [c]) x [c])
 17091  	// result: (MOVDconst [0])
 17092  	for {
 17093  		c := auxIntToInt64(v.AuxInt)
 17094  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
 17095  			break
 17096  		}
 17097  		x := v_0.Args[0]
 17098  		if x != v_1 {
 17099  			break
 17100  		}
 17101  		v.reset(OpARM64MOVDconst)
 17102  		v.AuxInt = int64ToAuxInt(0)
 17103  		return true
 17104  	}
 17105  	return false
 17106  }
 17107  func rewriteValueARM64_OpARM64SUBshiftRA(v *Value) bool {
 17108  	v_1 := v.Args[1]
 17109  	v_0 := v.Args[0]
 17110  	// match: (SUBshiftRA x (MOVDconst [c]) [d])
 17111  	// result: (SUBconst x [c>>uint64(d)])
 17112  	for {
 17113  		d := auxIntToInt64(v.AuxInt)
 17114  		x := v_0
 17115  		if v_1.Op != OpARM64MOVDconst {
 17116  			break
 17117  		}
 17118  		c := auxIntToInt64(v_1.AuxInt)
 17119  		v.reset(OpARM64SUBconst)
 17120  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
 17121  		v.AddArg(x)
 17122  		return true
 17123  	}
 17124  	// match: (SUBshiftRA (SRAconst x [c]) x [c])
 17125  	// result: (MOVDconst [0])
 17126  	for {
 17127  		c := auxIntToInt64(v.AuxInt)
 17128  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
 17129  			break
 17130  		}
 17131  		x := v_0.Args[0]
 17132  		if x != v_1 {
 17133  			break
 17134  		}
 17135  		v.reset(OpARM64MOVDconst)
 17136  		v.AuxInt = int64ToAuxInt(0)
 17137  		return true
 17138  	}
 17139  	return false
 17140  }
 17141  func rewriteValueARM64_OpARM64SUBshiftRL(v *Value) bool {
 17142  	v_1 := v.Args[1]
 17143  	v_0 := v.Args[0]
 17144  	// match: (SUBshiftRL x (MOVDconst [c]) [d])
 17145  	// result: (SUBconst x [int64(uint64(c)>>uint64(d))])
 17146  	for {
 17147  		d := auxIntToInt64(v.AuxInt)
 17148  		x := v_0
 17149  		if v_1.Op != OpARM64MOVDconst {
 17150  			break
 17151  		}
 17152  		c := auxIntToInt64(v_1.AuxInt)
 17153  		v.reset(OpARM64SUBconst)
 17154  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
 17155  		v.AddArg(x)
 17156  		return true
 17157  	}
 17158  	// match: (SUBshiftRL (SRLconst x [c]) x [c])
 17159  	// result: (MOVDconst [0])
 17160  	for {
 17161  		c := auxIntToInt64(v.AuxInt)
 17162  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
 17163  			break
 17164  		}
 17165  		x := v_0.Args[0]
 17166  		if x != v_1 {
 17167  			break
 17168  		}
 17169  		v.reset(OpARM64MOVDconst)
 17170  		v.AuxInt = int64ToAuxInt(0)
 17171  		return true
 17172  	}
 17173  	return false
 17174  }
 17175  func rewriteValueARM64_OpARM64TST(v *Value) bool {
 17176  	v_1 := v.Args[1]
 17177  	v_0 := v.Args[0]
 17178  	// match: (TST x (MOVDconst [c]))
 17179  	// result: (TSTconst [c] x)
 17180  	for {
 17181  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 17182  			x := v_0
 17183  			if v_1.Op != OpARM64MOVDconst {
 17184  				continue
 17185  			}
 17186  			c := auxIntToInt64(v_1.AuxInt)
 17187  			v.reset(OpARM64TSTconst)
 17188  			v.AuxInt = int64ToAuxInt(c)
 17189  			v.AddArg(x)
 17190  			return true
 17191  		}
 17192  		break
 17193  	}
 17194  	// match: (TST x0 x1:(SLLconst [c] y))
 17195  	// cond: clobberIfDead(x1)
 17196  	// result: (TSTshiftLL x0 y [c])
 17197  	for {
 17198  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 17199  			x0 := v_0
 17200  			x1 := v_1
 17201  			if x1.Op != OpARM64SLLconst {
 17202  				continue
 17203  			}
 17204  			c := auxIntToInt64(x1.AuxInt)
 17205  			y := x1.Args[0]
 17206  			if !(clobberIfDead(x1)) {
 17207  				continue
 17208  			}
 17209  			v.reset(OpARM64TSTshiftLL)
 17210  			v.AuxInt = int64ToAuxInt(c)
 17211  			v.AddArg2(x0, y)
 17212  			return true
 17213  		}
 17214  		break
 17215  	}
 17216  	// match: (TST x0 x1:(SRLconst [c] y))
 17217  	// cond: clobberIfDead(x1)
 17218  	// result: (TSTshiftRL x0 y [c])
 17219  	for {
 17220  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 17221  			x0 := v_0
 17222  			x1 := v_1
 17223  			if x1.Op != OpARM64SRLconst {
 17224  				continue
 17225  			}
 17226  			c := auxIntToInt64(x1.AuxInt)
 17227  			y := x1.Args[0]
 17228  			if !(clobberIfDead(x1)) {
 17229  				continue
 17230  			}
 17231  			v.reset(OpARM64TSTshiftRL)
 17232  			v.AuxInt = int64ToAuxInt(c)
 17233  			v.AddArg2(x0, y)
 17234  			return true
 17235  		}
 17236  		break
 17237  	}
 17238  	// match: (TST x0 x1:(SRAconst [c] y))
 17239  	// cond: clobberIfDead(x1)
 17240  	// result: (TSTshiftRA x0 y [c])
 17241  	for {
 17242  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 17243  			x0 := v_0
 17244  			x1 := v_1
 17245  			if x1.Op != OpARM64SRAconst {
 17246  				continue
 17247  			}
 17248  			c := auxIntToInt64(x1.AuxInt)
 17249  			y := x1.Args[0]
 17250  			if !(clobberIfDead(x1)) {
 17251  				continue
 17252  			}
 17253  			v.reset(OpARM64TSTshiftRA)
 17254  			v.AuxInt = int64ToAuxInt(c)
 17255  			v.AddArg2(x0, y)
 17256  			return true
 17257  		}
 17258  		break
 17259  	}
 17260  	// match: (TST x0 x1:(RORconst [c] y))
 17261  	// cond: clobberIfDead(x1)
 17262  	// result: (TSTshiftRO x0 y [c])
 17263  	for {
 17264  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 17265  			x0 := v_0
 17266  			x1 := v_1
 17267  			if x1.Op != OpARM64RORconst {
 17268  				continue
 17269  			}
 17270  			c := auxIntToInt64(x1.AuxInt)
 17271  			y := x1.Args[0]
 17272  			if !(clobberIfDead(x1)) {
 17273  				continue
 17274  			}
 17275  			v.reset(OpARM64TSTshiftRO)
 17276  			v.AuxInt = int64ToAuxInt(c)
 17277  			v.AddArg2(x0, y)
 17278  			return true
 17279  		}
 17280  		break
 17281  	}
 17282  	return false
 17283  }
 17284  func rewriteValueARM64_OpARM64TSTW(v *Value) bool {
 17285  	v_1 := v.Args[1]
 17286  	v_0 := v.Args[0]
 17287  	// match: (TSTW x (MOVDconst [c]))
 17288  	// result: (TSTWconst [int32(c)] x)
 17289  	for {
 17290  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 17291  			x := v_0
 17292  			if v_1.Op != OpARM64MOVDconst {
 17293  				continue
 17294  			}
 17295  			c := auxIntToInt64(v_1.AuxInt)
 17296  			v.reset(OpARM64TSTWconst)
 17297  			v.AuxInt = int32ToAuxInt(int32(c))
 17298  			v.AddArg(x)
 17299  			return true
 17300  		}
 17301  		break
 17302  	}
 17303  	return false
 17304  }
 17305  func rewriteValueARM64_OpARM64TSTWconst(v *Value) bool {
 17306  	v_0 := v.Args[0]
 17307  	// match: (TSTWconst (MOVDconst [x]) [y])
 17308  	// result: (FlagConstant [logicFlags32(int32(x)&y)])
 17309  	for {
 17310  		y := auxIntToInt32(v.AuxInt)
 17311  		if v_0.Op != OpARM64MOVDconst {
 17312  			break
 17313  		}
 17314  		x := auxIntToInt64(v_0.AuxInt)
 17315  		v.reset(OpARM64FlagConstant)
 17316  		v.AuxInt = flagConstantToAuxInt(logicFlags32(int32(x) & y))
 17317  		return true
 17318  	}
 17319  	return false
 17320  }
 17321  func rewriteValueARM64_OpARM64TSTconst(v *Value) bool {
 17322  	v_0 := v.Args[0]
 17323  	// match: (TSTconst (MOVDconst [x]) [y])
 17324  	// result: (FlagConstant [logicFlags64(x&y)])
 17325  	for {
 17326  		y := auxIntToInt64(v.AuxInt)
 17327  		if v_0.Op != OpARM64MOVDconst {
 17328  			break
 17329  		}
 17330  		x := auxIntToInt64(v_0.AuxInt)
 17331  		v.reset(OpARM64FlagConstant)
 17332  		v.AuxInt = flagConstantToAuxInt(logicFlags64(x & y))
 17333  		return true
 17334  	}
 17335  	return false
 17336  }
 17337  func rewriteValueARM64_OpARM64TSTshiftLL(v *Value) bool {
 17338  	v_1 := v.Args[1]
 17339  	v_0 := v.Args[0]
 17340  	b := v.Block
 17341  	// match: (TSTshiftLL (MOVDconst [c]) x [d])
 17342  	// result: (TSTconst [c] (SLLconst <x.Type> x [d]))
 17343  	for {
 17344  		d := auxIntToInt64(v.AuxInt)
 17345  		if v_0.Op != OpARM64MOVDconst {
 17346  			break
 17347  		}
 17348  		c := auxIntToInt64(v_0.AuxInt)
 17349  		x := v_1
 17350  		v.reset(OpARM64TSTconst)
 17351  		v.AuxInt = int64ToAuxInt(c)
 17352  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 17353  		v0.AuxInt = int64ToAuxInt(d)
 17354  		v0.AddArg(x)
 17355  		v.AddArg(v0)
 17356  		return true
 17357  	}
 17358  	// match: (TSTshiftLL x (MOVDconst [c]) [d])
 17359  	// result: (TSTconst x [int64(uint64(c)<<uint64(d))])
 17360  	for {
 17361  		d := auxIntToInt64(v.AuxInt)
 17362  		x := v_0
 17363  		if v_1.Op != OpARM64MOVDconst {
 17364  			break
 17365  		}
 17366  		c := auxIntToInt64(v_1.AuxInt)
 17367  		v.reset(OpARM64TSTconst)
 17368  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
 17369  		v.AddArg(x)
 17370  		return true
 17371  	}
 17372  	return false
 17373  }
 17374  func rewriteValueARM64_OpARM64TSTshiftRA(v *Value) bool {
 17375  	v_1 := v.Args[1]
 17376  	v_0 := v.Args[0]
 17377  	b := v.Block
 17378  	// match: (TSTshiftRA (MOVDconst [c]) x [d])
 17379  	// result: (TSTconst [c] (SRAconst <x.Type> x [d]))
 17380  	for {
 17381  		d := auxIntToInt64(v.AuxInt)
 17382  		if v_0.Op != OpARM64MOVDconst {
 17383  			break
 17384  		}
 17385  		c := auxIntToInt64(v_0.AuxInt)
 17386  		x := v_1
 17387  		v.reset(OpARM64TSTconst)
 17388  		v.AuxInt = int64ToAuxInt(c)
 17389  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
 17390  		v0.AuxInt = int64ToAuxInt(d)
 17391  		v0.AddArg(x)
 17392  		v.AddArg(v0)
 17393  		return true
 17394  	}
 17395  	// match: (TSTshiftRA x (MOVDconst [c]) [d])
 17396  	// result: (TSTconst x [c>>uint64(d)])
 17397  	for {
 17398  		d := auxIntToInt64(v.AuxInt)
 17399  		x := v_0
 17400  		if v_1.Op != OpARM64MOVDconst {
 17401  			break
 17402  		}
 17403  		c := auxIntToInt64(v_1.AuxInt)
 17404  		v.reset(OpARM64TSTconst)
 17405  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
 17406  		v.AddArg(x)
 17407  		return true
 17408  	}
 17409  	return false
 17410  }
 17411  func rewriteValueARM64_OpARM64TSTshiftRL(v *Value) bool {
 17412  	v_1 := v.Args[1]
 17413  	v_0 := v.Args[0]
 17414  	b := v.Block
 17415  	// match: (TSTshiftRL (MOVDconst [c]) x [d])
 17416  	// result: (TSTconst [c] (SRLconst <x.Type> x [d]))
 17417  	for {
 17418  		d := auxIntToInt64(v.AuxInt)
 17419  		if v_0.Op != OpARM64MOVDconst {
 17420  			break
 17421  		}
 17422  		c := auxIntToInt64(v_0.AuxInt)
 17423  		x := v_1
 17424  		v.reset(OpARM64TSTconst)
 17425  		v.AuxInt = int64ToAuxInt(c)
 17426  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
 17427  		v0.AuxInt = int64ToAuxInt(d)
 17428  		v0.AddArg(x)
 17429  		v.AddArg(v0)
 17430  		return true
 17431  	}
 17432  	// match: (TSTshiftRL x (MOVDconst [c]) [d])
 17433  	// result: (TSTconst x [int64(uint64(c)>>uint64(d))])
 17434  	for {
 17435  		d := auxIntToInt64(v.AuxInt)
 17436  		x := v_0
 17437  		if v_1.Op != OpARM64MOVDconst {
 17438  			break
 17439  		}
 17440  		c := auxIntToInt64(v_1.AuxInt)
 17441  		v.reset(OpARM64TSTconst)
 17442  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
 17443  		v.AddArg(x)
 17444  		return true
 17445  	}
 17446  	return false
 17447  }
 17448  func rewriteValueARM64_OpARM64TSTshiftRO(v *Value) bool {
 17449  	v_1 := v.Args[1]
 17450  	v_0 := v.Args[0]
 17451  	b := v.Block
 17452  	// match: (TSTshiftRO (MOVDconst [c]) x [d])
 17453  	// result: (TSTconst [c] (RORconst <x.Type> x [d]))
 17454  	for {
 17455  		d := auxIntToInt64(v.AuxInt)
 17456  		if v_0.Op != OpARM64MOVDconst {
 17457  			break
 17458  		}
 17459  		c := auxIntToInt64(v_0.AuxInt)
 17460  		x := v_1
 17461  		v.reset(OpARM64TSTconst)
 17462  		v.AuxInt = int64ToAuxInt(c)
 17463  		v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
 17464  		v0.AuxInt = int64ToAuxInt(d)
 17465  		v0.AddArg(x)
 17466  		v.AddArg(v0)
 17467  		return true
 17468  	}
 17469  	// match: (TSTshiftRO x (MOVDconst [c]) [d])
 17470  	// result: (TSTconst x [rotateRight64(c, d)])
 17471  	for {
 17472  		d := auxIntToInt64(v.AuxInt)
 17473  		x := v_0
 17474  		if v_1.Op != OpARM64MOVDconst {
 17475  			break
 17476  		}
 17477  		c := auxIntToInt64(v_1.AuxInt)
 17478  		v.reset(OpARM64TSTconst)
 17479  		v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
 17480  		v.AddArg(x)
 17481  		return true
 17482  	}
 17483  	return false
 17484  }
 17485  func rewriteValueARM64_OpARM64UBFIZ(v *Value) bool {
 17486  	v_0 := v.Args[0]
 17487  	// match: (UBFIZ [bfc] (SLLconst [sc] x))
 17488  	// cond: sc < bfc.width()
 17489  	// result: (UBFIZ [armBFAuxInt(bfc.lsb()+sc, bfc.width()-sc)] x)
 17490  	for {
 17491  		bfc := auxIntToArm64BitField(v.AuxInt)
 17492  		if v_0.Op != OpARM64SLLconst {
 17493  			break
 17494  		}
 17495  		sc := auxIntToInt64(v_0.AuxInt)
 17496  		x := v_0.Args[0]
 17497  		if !(sc < bfc.width()) {
 17498  			break
 17499  		}
 17500  		v.reset(OpARM64UBFIZ)
 17501  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()-sc))
 17502  		v.AddArg(x)
 17503  		return true
 17504  	}
 17505  	return false
 17506  }
 17507  func rewriteValueARM64_OpARM64UBFX(v *Value) bool {
 17508  	v_0 := v.Args[0]
 17509  	// match: (UBFX [bfc] (ANDconst [c] x))
 17510  	// cond: isARM64BFMask(0, c, 0) && bfc.lsb() + bfc.width() <= arm64BFWidth(c, 0)
 17511  	// result: (UBFX [bfc] x)
 17512  	for {
 17513  		bfc := auxIntToArm64BitField(v.AuxInt)
 17514  		if v_0.Op != OpARM64ANDconst {
 17515  			break
 17516  		}
 17517  		c := auxIntToInt64(v_0.AuxInt)
 17518  		x := v_0.Args[0]
 17519  		if !(isARM64BFMask(0, c, 0) && bfc.lsb()+bfc.width() <= arm64BFWidth(c, 0)) {
 17520  			break
 17521  		}
 17522  		v.reset(OpARM64UBFX)
 17523  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 17524  		v.AddArg(x)
 17525  		return true
 17526  	}
 17527  	// match: (UBFX [bfc] e:(MOVWUreg x))
 17528  	// cond: e.Uses == 1 && bfc.lsb() < 32
 17529  	// result: (UBFX [armBFAuxInt(bfc.lsb(), min(bfc.width(), 32-bfc.lsb()))] x)
 17530  	for {
 17531  		bfc := auxIntToArm64BitField(v.AuxInt)
 17532  		e := v_0
 17533  		if e.Op != OpARM64MOVWUreg {
 17534  			break
 17535  		}
 17536  		x := e.Args[0]
 17537  		if !(e.Uses == 1 && bfc.lsb() < 32) {
 17538  			break
 17539  		}
 17540  		v.reset(OpARM64UBFX)
 17541  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), 32-bfc.lsb())))
 17542  		v.AddArg(x)
 17543  		return true
 17544  	}
 17545  	// match: (UBFX [bfc] e:(MOVHUreg x))
 17546  	// cond: e.Uses == 1 && bfc.lsb() < 16
 17547  	// result: (UBFX [armBFAuxInt(bfc.lsb(), min(bfc.width(), 16-bfc.lsb()))] x)
 17548  	for {
 17549  		bfc := auxIntToArm64BitField(v.AuxInt)
 17550  		e := v_0
 17551  		if e.Op != OpARM64MOVHUreg {
 17552  			break
 17553  		}
 17554  		x := e.Args[0]
 17555  		if !(e.Uses == 1 && bfc.lsb() < 16) {
 17556  			break
 17557  		}
 17558  		v.reset(OpARM64UBFX)
 17559  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), 16-bfc.lsb())))
 17560  		v.AddArg(x)
 17561  		return true
 17562  	}
 17563  	// match: (UBFX [bfc] e:(MOVBUreg x))
 17564  	// cond: e.Uses == 1 && bfc.lsb() < 8
 17565  	// result: (UBFX [armBFAuxInt(bfc.lsb(), min(bfc.width(), 8-bfc.lsb()))] x)
 17566  	for {
 17567  		bfc := auxIntToArm64BitField(v.AuxInt)
 17568  		e := v_0
 17569  		if e.Op != OpARM64MOVBUreg {
 17570  			break
 17571  		}
 17572  		x := e.Args[0]
 17573  		if !(e.Uses == 1 && bfc.lsb() < 8) {
 17574  			break
 17575  		}
 17576  		v.reset(OpARM64UBFX)
 17577  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), 8-bfc.lsb())))
 17578  		v.AddArg(x)
 17579  		return true
 17580  	}
 17581  	// match: (UBFX [bfc] (SRLconst [sc] x))
 17582  	// cond: sc+bfc.width()+bfc.lsb() < 64
 17583  	// result: (UBFX [armBFAuxInt(bfc.lsb()+sc, bfc.width())] x)
 17584  	for {
 17585  		bfc := auxIntToArm64BitField(v.AuxInt)
 17586  		if v_0.Op != OpARM64SRLconst {
 17587  			break
 17588  		}
 17589  		sc := auxIntToInt64(v_0.AuxInt)
 17590  		x := v_0.Args[0]
 17591  		if !(sc+bfc.width()+bfc.lsb() < 64) {
 17592  			break
 17593  		}
 17594  		v.reset(OpARM64UBFX)
 17595  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()))
 17596  		v.AddArg(x)
 17597  		return true
 17598  	}
 17599  	// match: (UBFX [bfc] (SLLconst [sc] x))
 17600  	// cond: sc == bfc.lsb()
 17601  	// result: (ANDconst [1<<uint(bfc.width())-1] x)
 17602  	for {
 17603  		bfc := auxIntToArm64BitField(v.AuxInt)
 17604  		if v_0.Op != OpARM64SLLconst {
 17605  			break
 17606  		}
 17607  		sc := auxIntToInt64(v_0.AuxInt)
 17608  		x := v_0.Args[0]
 17609  		if !(sc == bfc.lsb()) {
 17610  			break
 17611  		}
 17612  		v.reset(OpARM64ANDconst)
 17613  		v.AuxInt = int64ToAuxInt(1<<uint(bfc.width()) - 1)
 17614  		v.AddArg(x)
 17615  		return true
 17616  	}
 17617  	// match: (UBFX [bfc] (SLLconst [sc] x))
 17618  	// cond: sc < bfc.lsb()
 17619  	// result: (UBFX [armBFAuxInt(bfc.lsb()-sc, bfc.width())] x)
 17620  	for {
 17621  		bfc := auxIntToArm64BitField(v.AuxInt)
 17622  		if v_0.Op != OpARM64SLLconst {
 17623  			break
 17624  		}
 17625  		sc := auxIntToInt64(v_0.AuxInt)
 17626  		x := v_0.Args[0]
 17627  		if !(sc < bfc.lsb()) {
 17628  			break
 17629  		}
 17630  		v.reset(OpARM64UBFX)
 17631  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
 17632  		v.AddArg(x)
 17633  		return true
 17634  	}
 17635  	// match: (UBFX [bfc] (SLLconst [sc] x))
 17636  	// cond: sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()
 17637  	// result: (UBFIZ [armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc)] x)
 17638  	for {
 17639  		bfc := auxIntToArm64BitField(v.AuxInt)
 17640  		if v_0.Op != OpARM64SLLconst {
 17641  			break
 17642  		}
 17643  		sc := auxIntToInt64(v_0.AuxInt)
 17644  		x := v_0.Args[0]
 17645  		if !(sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()) {
 17646  			break
 17647  		}
 17648  		v.reset(OpARM64UBFIZ)
 17649  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc))
 17650  		v.AddArg(x)
 17651  		return true
 17652  	}
 17653  	return false
 17654  }
 17655  func rewriteValueARM64_OpARM64UDIV(v *Value) bool {
 17656  	v_1 := v.Args[1]
 17657  	v_0 := v.Args[0]
 17658  	// match: (UDIV x (MOVDconst [1]))
 17659  	// result: x
 17660  	for {
 17661  		x := v_0
 17662  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 17663  			break
 17664  		}
 17665  		v.copyOf(x)
 17666  		return true
 17667  	}
 17668  	// match: (UDIV x (MOVDconst [c]))
 17669  	// cond: isPowerOfTwo(c)
 17670  	// result: (SRLconst [log64(c)] x)
 17671  	for {
 17672  		x := v_0
 17673  		if v_1.Op != OpARM64MOVDconst {
 17674  			break
 17675  		}
 17676  		c := auxIntToInt64(v_1.AuxInt)
 17677  		if !(isPowerOfTwo(c)) {
 17678  			break
 17679  		}
 17680  		v.reset(OpARM64SRLconst)
 17681  		v.AuxInt = int64ToAuxInt(log64(c))
 17682  		v.AddArg(x)
 17683  		return true
 17684  	}
 17685  	// match: (UDIV (MOVDconst [c]) (MOVDconst [d]))
 17686  	// cond: d != 0
 17687  	// result: (MOVDconst [int64(uint64(c)/uint64(d))])
 17688  	for {
 17689  		if v_0.Op != OpARM64MOVDconst {
 17690  			break
 17691  		}
 17692  		c := auxIntToInt64(v_0.AuxInt)
 17693  		if v_1.Op != OpARM64MOVDconst {
 17694  			break
 17695  		}
 17696  		d := auxIntToInt64(v_1.AuxInt)
 17697  		if !(d != 0) {
 17698  			break
 17699  		}
 17700  		v.reset(OpARM64MOVDconst)
 17701  		v.AuxInt = int64ToAuxInt(int64(uint64(c) / uint64(d)))
 17702  		return true
 17703  	}
 17704  	return false
 17705  }
 17706  func rewriteValueARM64_OpARM64UDIVW(v *Value) bool {
 17707  	v_1 := v.Args[1]
 17708  	v_0 := v.Args[0]
 17709  	b := v.Block
 17710  	// match: (UDIVW x (MOVDconst [c]))
 17711  	// cond: uint32(c)==1
 17712  	// result: (MOVWUreg x)
 17713  	for {
 17714  		x := v_0
 17715  		if v_1.Op != OpARM64MOVDconst {
 17716  			break
 17717  		}
 17718  		c := auxIntToInt64(v_1.AuxInt)
 17719  		if !(uint32(c) == 1) {
 17720  			break
 17721  		}
 17722  		v.reset(OpARM64MOVWUreg)
 17723  		v.AddArg(x)
 17724  		return true
 17725  	}
 17726  	// match: (UDIVW x (MOVDconst [c]))
 17727  	// cond: isPowerOfTwo(c) && is32Bit(c)
 17728  	// result: (SRLconst [log64(c)] (MOVWUreg <v.Type> x))
 17729  	for {
 17730  		x := v_0
 17731  		if v_1.Op != OpARM64MOVDconst {
 17732  			break
 17733  		}
 17734  		c := auxIntToInt64(v_1.AuxInt)
 17735  		if !(isPowerOfTwo(c) && is32Bit(c)) {
 17736  			break
 17737  		}
 17738  		v.reset(OpARM64SRLconst)
 17739  		v.AuxInt = int64ToAuxInt(log64(c))
 17740  		v0 := b.NewValue0(v.Pos, OpARM64MOVWUreg, v.Type)
 17741  		v0.AddArg(x)
 17742  		v.AddArg(v0)
 17743  		return true
 17744  	}
 17745  	// match: (UDIVW (MOVDconst [c]) (MOVDconst [d]))
 17746  	// cond: d != 0
 17747  	// result: (MOVDconst [int64(uint32(c)/uint32(d))])
 17748  	for {
 17749  		if v_0.Op != OpARM64MOVDconst {
 17750  			break
 17751  		}
 17752  		c := auxIntToInt64(v_0.AuxInt)
 17753  		if v_1.Op != OpARM64MOVDconst {
 17754  			break
 17755  		}
 17756  		d := auxIntToInt64(v_1.AuxInt)
 17757  		if !(d != 0) {
 17758  			break
 17759  		}
 17760  		v.reset(OpARM64MOVDconst)
 17761  		v.AuxInt = int64ToAuxInt(int64(uint32(c) / uint32(d)))
 17762  		return true
 17763  	}
 17764  	return false
 17765  }
 17766  func rewriteValueARM64_OpARM64UMOD(v *Value) bool {
 17767  	v_1 := v.Args[1]
 17768  	v_0 := v.Args[0]
 17769  	b := v.Block
 17770  	typ := &b.Func.Config.Types
 17771  	// match: (UMOD <typ.UInt64> x y)
 17772  	// result: (MSUB <typ.UInt64> x y (UDIV <typ.UInt64> x y))
 17773  	for {
 17774  		if v.Type != typ.UInt64 {
 17775  			break
 17776  		}
 17777  		x := v_0
 17778  		y := v_1
 17779  		v.reset(OpARM64MSUB)
 17780  		v.Type = typ.UInt64
 17781  		v0 := b.NewValue0(v.Pos, OpARM64UDIV, typ.UInt64)
 17782  		v0.AddArg2(x, y)
 17783  		v.AddArg3(x, y, v0)
 17784  		return true
 17785  	}
 17786  	// match: (UMOD _ (MOVDconst [1]))
 17787  	// result: (MOVDconst [0])
 17788  	for {
 17789  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 17790  			break
 17791  		}
 17792  		v.reset(OpARM64MOVDconst)
 17793  		v.AuxInt = int64ToAuxInt(0)
 17794  		return true
 17795  	}
 17796  	// match: (UMOD x (MOVDconst [c]))
 17797  	// cond: isPowerOfTwo(c)
 17798  	// result: (ANDconst [c-1] x)
 17799  	for {
 17800  		x := v_0
 17801  		if v_1.Op != OpARM64MOVDconst {
 17802  			break
 17803  		}
 17804  		c := auxIntToInt64(v_1.AuxInt)
 17805  		if !(isPowerOfTwo(c)) {
 17806  			break
 17807  		}
 17808  		v.reset(OpARM64ANDconst)
 17809  		v.AuxInt = int64ToAuxInt(c - 1)
 17810  		v.AddArg(x)
 17811  		return true
 17812  	}
 17813  	// match: (UMOD (MOVDconst [c]) (MOVDconst [d]))
 17814  	// cond: d != 0
 17815  	// result: (MOVDconst [int64(uint64(c)%uint64(d))])
 17816  	for {
 17817  		if v_0.Op != OpARM64MOVDconst {
 17818  			break
 17819  		}
 17820  		c := auxIntToInt64(v_0.AuxInt)
 17821  		if v_1.Op != OpARM64MOVDconst {
 17822  			break
 17823  		}
 17824  		d := auxIntToInt64(v_1.AuxInt)
 17825  		if !(d != 0) {
 17826  			break
 17827  		}
 17828  		v.reset(OpARM64MOVDconst)
 17829  		v.AuxInt = int64ToAuxInt(int64(uint64(c) % uint64(d)))
 17830  		return true
 17831  	}
 17832  	return false
 17833  }
 17834  func rewriteValueARM64_OpARM64UMODW(v *Value) bool {
 17835  	v_1 := v.Args[1]
 17836  	v_0 := v.Args[0]
 17837  	b := v.Block
 17838  	typ := &b.Func.Config.Types
 17839  	// match: (UMODW <typ.UInt32> x y)
 17840  	// result: (MSUBW <typ.UInt32> x y (UDIVW <typ.UInt32> x y))
 17841  	for {
 17842  		if v.Type != typ.UInt32 {
 17843  			break
 17844  		}
 17845  		x := v_0
 17846  		y := v_1
 17847  		v.reset(OpARM64MSUBW)
 17848  		v.Type = typ.UInt32
 17849  		v0 := b.NewValue0(v.Pos, OpARM64UDIVW, typ.UInt32)
 17850  		v0.AddArg2(x, y)
 17851  		v.AddArg3(x, y, v0)
 17852  		return true
 17853  	}
 17854  	// match: (UMODW _ (MOVDconst [c]))
 17855  	// cond: uint32(c)==1
 17856  	// result: (MOVDconst [0])
 17857  	for {
 17858  		if v_1.Op != OpARM64MOVDconst {
 17859  			break
 17860  		}
 17861  		c := auxIntToInt64(v_1.AuxInt)
 17862  		if !(uint32(c) == 1) {
 17863  			break
 17864  		}
 17865  		v.reset(OpARM64MOVDconst)
 17866  		v.AuxInt = int64ToAuxInt(0)
 17867  		return true
 17868  	}
 17869  	// match: (UMODW x (MOVDconst [c]))
 17870  	// cond: isPowerOfTwo(c) && is32Bit(c)
 17871  	// result: (ANDconst [c-1] x)
 17872  	for {
 17873  		x := v_0
 17874  		if v_1.Op != OpARM64MOVDconst {
 17875  			break
 17876  		}
 17877  		c := auxIntToInt64(v_1.AuxInt)
 17878  		if !(isPowerOfTwo(c) && is32Bit(c)) {
 17879  			break
 17880  		}
 17881  		v.reset(OpARM64ANDconst)
 17882  		v.AuxInt = int64ToAuxInt(c - 1)
 17883  		v.AddArg(x)
 17884  		return true
 17885  	}
 17886  	// match: (UMODW (MOVDconst [c]) (MOVDconst [d]))
 17887  	// cond: d != 0
 17888  	// result: (MOVDconst [int64(uint32(c)%uint32(d))])
 17889  	for {
 17890  		if v_0.Op != OpARM64MOVDconst {
 17891  			break
 17892  		}
 17893  		c := auxIntToInt64(v_0.AuxInt)
 17894  		if v_1.Op != OpARM64MOVDconst {
 17895  			break
 17896  		}
 17897  		d := auxIntToInt64(v_1.AuxInt)
 17898  		if !(d != 0) {
 17899  			break
 17900  		}
 17901  		v.reset(OpARM64MOVDconst)
 17902  		v.AuxInt = int64ToAuxInt(int64(uint32(c) % uint32(d)))
 17903  		return true
 17904  	}
 17905  	return false
 17906  }
 17907  func rewriteValueARM64_OpARM64VBIF16B(v *Value) bool {
 17908  	v_2 := v.Args[2]
 17909  	v_1 := v.Args[1]
 17910  	v_0 := v.Args[0]
 17911  	// match: (VBIF16B x y (VNOT16B mask))
 17912  	// result: (VBIT16B x y mask)
 17913  	for {
 17914  		x := v_0
 17915  		y := v_1
 17916  		if v_2.Op != OpARM64VNOT16B {
 17917  			break
 17918  		}
 17919  		mask := v_2.Args[0]
 17920  		v.reset(OpARM64VBIT16B)
 17921  		v.AddArg3(x, y, mask)
 17922  		return true
 17923  	}
 17924  	return false
 17925  }
 17926  func rewriteValueARM64_OpARM64VBIT16B(v *Value) bool {
 17927  	v_2 := v.Args[2]
 17928  	v_1 := v.Args[1]
 17929  	v_0 := v.Args[0]
 17930  	// match: (VBIT16B x y (VNOT16B mask))
 17931  	// result: (VBIF16B x y mask)
 17932  	for {
 17933  		x := v_0
 17934  		y := v_1
 17935  		if v_2.Op != OpARM64VNOT16B {
 17936  			break
 17937  		}
 17938  		mask := v_2.Args[0]
 17939  		v.reset(OpARM64VBIF16B)
 17940  		v.AddArg3(x, y, mask)
 17941  		return true
 17942  	}
 17943  	return false
 17944  }
 17945  func rewriteValueARM64_OpARM64VDUPBbcast(v *Value) bool {
 17946  	v_0 := v.Args[0]
 17947  	// match: (VDUPBbcast [i] (VMOVBins [j] _ (MOVDconst [c])))
 17948  	// cond: i == j && c>=-128 && c<=255
 17949  	// result: (VMOVI16B [uint8(c)])
 17950  	for {
 17951  		i := auxIntToUint8(v.AuxInt)
 17952  		if v_0.Op != OpARM64VMOVBins {
 17953  			break
 17954  		}
 17955  		j := auxIntToUint8(v_0.AuxInt)
 17956  		_ = v_0.Args[1]
 17957  		v_0_1 := v_0.Args[1]
 17958  		if v_0_1.Op != OpARM64MOVDconst {
 17959  			break
 17960  		}
 17961  		c := auxIntToInt64(v_0_1.AuxInt)
 17962  		if !(i == j && c >= -128 && c <= 255) {
 17963  			break
 17964  		}
 17965  		v.reset(OpARM64VMOVI16B)
 17966  		v.AuxInt = uint8ToAuxInt(uint8(c))
 17967  		return true
 17968  	}
 17969  	return false
 17970  }
 17971  func rewriteValueARM64_OpARM64VFCVTL4S(v *Value) bool {
 17972  	v_0 := v.Args[0]
 17973  	// match: (VFCVTL4S (VDUPDextr [1] x))
 17974  	// result: (VFCVTL2_4S x)
 17975  	for {
 17976  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 17977  			break
 17978  		}
 17979  		x := v_0.Args[0]
 17980  		v.reset(OpARM64VFCVTL2_4S)
 17981  		v.AddArg(x)
 17982  		return true
 17983  	}
 17984  	return false
 17985  }
 17986  func rewriteValueARM64_OpARM64VMOVDins0(v *Value) bool {
 17987  	v_1 := v.Args[1]
 17988  	v_0 := v.Args[0]
 17989  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VFCVTN2D y)))
 17990  	// result: (VFCVTN2_2D dst y)
 17991  	for {
 17992  		if auxIntToUint8(v.AuxInt) != 1 {
 17993  			break
 17994  		}
 17995  		dst := v_0
 17996  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 17997  			break
 17998  		}
 17999  		v_1_0 := v_1.Args[0]
 18000  		if v_1_0.Op != OpARM64VFCVTN2D {
 18001  			break
 18002  		}
 18003  		y := v_1_0.Args[0]
 18004  		v.reset(OpARM64VFCVTN2_2D)
 18005  		v.AddArg2(dst, y)
 18006  		return true
 18007  	}
 18008  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VSHRN2D [c] y)))
 18009  	// result: (VSHRN2_2D dst [c] y)
 18010  	for {
 18011  		if auxIntToUint8(v.AuxInt) != 1 {
 18012  			break
 18013  		}
 18014  		dst := v_0
 18015  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18016  			break
 18017  		}
 18018  		v_1_0 := v_1.Args[0]
 18019  		if v_1_0.Op != OpARM64VSHRN2D {
 18020  			break
 18021  		}
 18022  		c := auxIntToUint8(v_1_0.AuxInt)
 18023  		y := v_1_0.Args[0]
 18024  		v.reset(OpARM64VSHRN2_2D)
 18025  		v.AuxInt = uint8ToAuxInt(c)
 18026  		v.AddArg2(dst, y)
 18027  		return true
 18028  	}
 18029  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VSHRN4S [c] y)))
 18030  	// result: (VSHRN2_4S dst [c] y)
 18031  	for {
 18032  		if auxIntToUint8(v.AuxInt) != 1 {
 18033  			break
 18034  		}
 18035  		dst := v_0
 18036  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18037  			break
 18038  		}
 18039  		v_1_0 := v_1.Args[0]
 18040  		if v_1_0.Op != OpARM64VSHRN4S {
 18041  			break
 18042  		}
 18043  		c := auxIntToUint8(v_1_0.AuxInt)
 18044  		y := v_1_0.Args[0]
 18045  		v.reset(OpARM64VSHRN2_4S)
 18046  		v.AuxInt = uint8ToAuxInt(c)
 18047  		v.AddArg2(dst, y)
 18048  		return true
 18049  	}
 18050  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VSHRN8H [c] y)))
 18051  	// result: (VSHRN2_8H dst [c] y)
 18052  	for {
 18053  		if auxIntToUint8(v.AuxInt) != 1 {
 18054  			break
 18055  		}
 18056  		dst := v_0
 18057  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18058  			break
 18059  		}
 18060  		v_1_0 := v_1.Args[0]
 18061  		if v_1_0.Op != OpARM64VSHRN8H {
 18062  			break
 18063  		}
 18064  		c := auxIntToUint8(v_1_0.AuxInt)
 18065  		y := v_1_0.Args[0]
 18066  		v.reset(OpARM64VSHRN2_8H)
 18067  		v.AuxInt = uint8ToAuxInt(c)
 18068  		v.AddArg2(dst, y)
 18069  		return true
 18070  	}
 18071  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VSQXTN2D y)))
 18072  	// result: (VSQXTN2_2D dst y)
 18073  	for {
 18074  		if auxIntToUint8(v.AuxInt) != 1 {
 18075  			break
 18076  		}
 18077  		dst := v_0
 18078  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18079  			break
 18080  		}
 18081  		v_1_0 := v_1.Args[0]
 18082  		if v_1_0.Op != OpARM64VSQXTN2D {
 18083  			break
 18084  		}
 18085  		y := v_1_0.Args[0]
 18086  		v.reset(OpARM64VSQXTN2_2D)
 18087  		v.AddArg2(dst, y)
 18088  		return true
 18089  	}
 18090  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VSQXTN4S y)))
 18091  	// result: (VSQXTN2_4S dst y)
 18092  	for {
 18093  		if auxIntToUint8(v.AuxInt) != 1 {
 18094  			break
 18095  		}
 18096  		dst := v_0
 18097  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18098  			break
 18099  		}
 18100  		v_1_0 := v_1.Args[0]
 18101  		if v_1_0.Op != OpARM64VSQXTN4S {
 18102  			break
 18103  		}
 18104  		y := v_1_0.Args[0]
 18105  		v.reset(OpARM64VSQXTN2_4S)
 18106  		v.AddArg2(dst, y)
 18107  		return true
 18108  	}
 18109  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VSQXTN8H y)))
 18110  	// result: (VSQXTN2_8H dst y)
 18111  	for {
 18112  		if auxIntToUint8(v.AuxInt) != 1 {
 18113  			break
 18114  		}
 18115  		dst := v_0
 18116  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18117  			break
 18118  		}
 18119  		v_1_0 := v_1.Args[0]
 18120  		if v_1_0.Op != OpARM64VSQXTN8H {
 18121  			break
 18122  		}
 18123  		y := v_1_0.Args[0]
 18124  		v.reset(OpARM64VSQXTN2_8H)
 18125  		v.AddArg2(dst, y)
 18126  		return true
 18127  	}
 18128  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VSQXTUN2D y)))
 18129  	// result: (VSQXTUN2_2D dst y)
 18130  	for {
 18131  		if auxIntToUint8(v.AuxInt) != 1 {
 18132  			break
 18133  		}
 18134  		dst := v_0
 18135  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18136  			break
 18137  		}
 18138  		v_1_0 := v_1.Args[0]
 18139  		if v_1_0.Op != OpARM64VSQXTUN2D {
 18140  			break
 18141  		}
 18142  		y := v_1_0.Args[0]
 18143  		v.reset(OpARM64VSQXTUN2_2D)
 18144  		v.AddArg2(dst, y)
 18145  		return true
 18146  	}
 18147  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VSQXTUN4S y)))
 18148  	// result: (VSQXTUN2_4S dst y)
 18149  	for {
 18150  		if auxIntToUint8(v.AuxInt) != 1 {
 18151  			break
 18152  		}
 18153  		dst := v_0
 18154  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18155  			break
 18156  		}
 18157  		v_1_0 := v_1.Args[0]
 18158  		if v_1_0.Op != OpARM64VSQXTUN4S {
 18159  			break
 18160  		}
 18161  		y := v_1_0.Args[0]
 18162  		v.reset(OpARM64VSQXTUN2_4S)
 18163  		v.AddArg2(dst, y)
 18164  		return true
 18165  	}
 18166  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VSQXTUN8H y)))
 18167  	// result: (VSQXTUN2_8H dst y)
 18168  	for {
 18169  		if auxIntToUint8(v.AuxInt) != 1 {
 18170  			break
 18171  		}
 18172  		dst := v_0
 18173  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18174  			break
 18175  		}
 18176  		v_1_0 := v_1.Args[0]
 18177  		if v_1_0.Op != OpARM64VSQXTUN8H {
 18178  			break
 18179  		}
 18180  		y := v_1_0.Args[0]
 18181  		v.reset(OpARM64VSQXTUN2_8H)
 18182  		v.AddArg2(dst, y)
 18183  		return true
 18184  	}
 18185  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VUQXTN2D y)))
 18186  	// result: (VUQXTN2_2D dst y)
 18187  	for {
 18188  		if auxIntToUint8(v.AuxInt) != 1 {
 18189  			break
 18190  		}
 18191  		dst := v_0
 18192  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18193  			break
 18194  		}
 18195  		v_1_0 := v_1.Args[0]
 18196  		if v_1_0.Op != OpARM64VUQXTN2D {
 18197  			break
 18198  		}
 18199  		y := v_1_0.Args[0]
 18200  		v.reset(OpARM64VUQXTN2_2D)
 18201  		v.AddArg2(dst, y)
 18202  		return true
 18203  	}
 18204  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VUQXTN4S y)))
 18205  	// result: (VUQXTN2_4S dst y)
 18206  	for {
 18207  		if auxIntToUint8(v.AuxInt) != 1 {
 18208  			break
 18209  		}
 18210  		dst := v_0
 18211  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18212  			break
 18213  		}
 18214  		v_1_0 := v_1.Args[0]
 18215  		if v_1_0.Op != OpARM64VUQXTN4S {
 18216  			break
 18217  		}
 18218  		y := v_1_0.Args[0]
 18219  		v.reset(OpARM64VUQXTN2_4S)
 18220  		v.AddArg2(dst, y)
 18221  		return true
 18222  	}
 18223  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VUQXTN8H y)))
 18224  	// result: (VUQXTN2_8H dst y)
 18225  	for {
 18226  		if auxIntToUint8(v.AuxInt) != 1 {
 18227  			break
 18228  		}
 18229  		dst := v_0
 18230  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18231  			break
 18232  		}
 18233  		v_1_0 := v_1.Args[0]
 18234  		if v_1_0.Op != OpARM64VUQXTN8H {
 18235  			break
 18236  		}
 18237  		y := v_1_0.Args[0]
 18238  		v.reset(OpARM64VUQXTN2_8H)
 18239  		v.AddArg2(dst, y)
 18240  		return true
 18241  	}
 18242  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VXTN2D y)))
 18243  	// result: (VXTN2_2D dst y)
 18244  	for {
 18245  		if auxIntToUint8(v.AuxInt) != 1 {
 18246  			break
 18247  		}
 18248  		dst := v_0
 18249  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18250  			break
 18251  		}
 18252  		v_1_0 := v_1.Args[0]
 18253  		if v_1_0.Op != OpARM64VXTN2D {
 18254  			break
 18255  		}
 18256  		y := v_1_0.Args[0]
 18257  		v.reset(OpARM64VXTN2_2D)
 18258  		v.AddArg2(dst, y)
 18259  		return true
 18260  	}
 18261  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VXTN4S y)))
 18262  	// result: (VXTN2_4S dst y)
 18263  	for {
 18264  		if auxIntToUint8(v.AuxInt) != 1 {
 18265  			break
 18266  		}
 18267  		dst := v_0
 18268  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18269  			break
 18270  		}
 18271  		v_1_0 := v_1.Args[0]
 18272  		if v_1_0.Op != OpARM64VXTN4S {
 18273  			break
 18274  		}
 18275  		y := v_1_0.Args[0]
 18276  		v.reset(OpARM64VXTN2_4S)
 18277  		v.AddArg2(dst, y)
 18278  		return true
 18279  	}
 18280  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VXTN8H y)))
 18281  	// result: (VXTN2_8H dst y)
 18282  	for {
 18283  		if auxIntToUint8(v.AuxInt) != 1 {
 18284  			break
 18285  		}
 18286  		dst := v_0
 18287  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18288  			break
 18289  		}
 18290  		v_1_0 := v_1.Args[0]
 18291  		if v_1_0.Op != OpARM64VXTN8H {
 18292  			break
 18293  		}
 18294  		y := v_1_0.Args[0]
 18295  		v.reset(OpARM64VXTN2_8H)
 18296  		v.AddArg2(dst, y)
 18297  		return true
 18298  	}
 18299  	// match: (VMOVDins0 [0] (VMOVI16B [0]) y:(VDUPDextr [i] _))
 18300  	// result: y
 18301  	for {
 18302  		if auxIntToUint8(v.AuxInt) != 0 || v_0.Op != OpARM64VMOVI16B || auxIntToUint8(v_0.AuxInt) != 0 {
 18303  			break
 18304  		}
 18305  		y := v_1
 18306  		if y.Op != OpARM64VDUPDextr {
 18307  			break
 18308  		}
 18309  		v.copyOf(y)
 18310  		return true
 18311  	}
 18312  	return false
 18313  }
 18314  func rewriteValueARM64_OpARM64VMOVSins0(v *Value) bool {
 18315  	v_1 := v.Args[1]
 18316  	v_0 := v.Args[0]
 18317  	// match: (VMOVSins0 [0] (VMOVI16B [0]) y:(VDUPSextr [i] _))
 18318  	// result: y
 18319  	for {
 18320  		if auxIntToUint8(v.AuxInt) != 0 || v_0.Op != OpARM64VMOVI16B || auxIntToUint8(v_0.AuxInt) != 0 {
 18321  			break
 18322  		}
 18323  		y := v_1
 18324  		if y.Op != OpARM64VDUPSextr {
 18325  			break
 18326  		}
 18327  		v.copyOf(y)
 18328  		return true
 18329  	}
 18330  	return false
 18331  }
 18332  func rewriteValueARM64_OpARM64VPMULL2D(v *Value) bool {
 18333  	v_1 := v.Args[1]
 18334  	v_0 := v.Args[0]
 18335  	// match: (VPMULL2D (VDUPDextr [1] x) (VDUPDextr [1] y))
 18336  	// result: (VPMULL2_2D x y)
 18337  	for {
 18338  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 18339  			if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18340  				continue
 18341  			}
 18342  			x := v_0.Args[0]
 18343  			if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 1 {
 18344  				continue
 18345  			}
 18346  			y := v_1.Args[0]
 18347  			v.reset(OpARM64VPMULL2_2D)
 18348  			v.AddArg2(x, y)
 18349  			return true
 18350  		}
 18351  		break
 18352  	}
 18353  	return false
 18354  }
 18355  func rewriteValueARM64_OpARM64VSHL16B(v *Value) bool {
 18356  	v_0 := v.Args[0]
 18357  	// match: (VSHL16B [a] x)
 18358  	// cond: a==0
 18359  	// result: x
 18360  	for {
 18361  		a := auxIntToUint8(v.AuxInt)
 18362  		x := v_0
 18363  		if !(a == 0) {
 18364  			break
 18365  		}
 18366  		v.copyOf(x)
 18367  		return true
 18368  	}
 18369  	return false
 18370  }
 18371  func rewriteValueARM64_OpARM64VSHL2D(v *Value) bool {
 18372  	v_0 := v.Args[0]
 18373  	// match: (VSHL2D [a] x)
 18374  	// cond: a==0
 18375  	// result: x
 18376  	for {
 18377  		a := auxIntToUint8(v.AuxInt)
 18378  		x := v_0
 18379  		if !(a == 0) {
 18380  			break
 18381  		}
 18382  		v.copyOf(x)
 18383  		return true
 18384  	}
 18385  	return false
 18386  }
 18387  func rewriteValueARM64_OpARM64VSHL4S(v *Value) bool {
 18388  	v_0 := v.Args[0]
 18389  	// match: (VSHL4S [a] x)
 18390  	// cond: a==0
 18391  	// result: x
 18392  	for {
 18393  		a := auxIntToUint8(v.AuxInt)
 18394  		x := v_0
 18395  		if !(a == 0) {
 18396  			break
 18397  		}
 18398  		v.copyOf(x)
 18399  		return true
 18400  	}
 18401  	return false
 18402  }
 18403  func rewriteValueARM64_OpARM64VSHL8H(v *Value) bool {
 18404  	v_0 := v.Args[0]
 18405  	// match: (VSHL8H [a] x)
 18406  	// cond: a==0
 18407  	// result: x
 18408  	for {
 18409  		a := auxIntToUint8(v.AuxInt)
 18410  		x := v_0
 18411  		if !(a == 0) {
 18412  			break
 18413  		}
 18414  		v.copyOf(x)
 18415  		return true
 18416  	}
 18417  	return false
 18418  }
 18419  func rewriteValueARM64_OpARM64VSHRN2D(v *Value) bool {
 18420  	v_0 := v.Args[0]
 18421  	// match: (VSHRN2D [0] x)
 18422  	// result: (VXTN2D x)
 18423  	for {
 18424  		if auxIntToUint8(v.AuxInt) != 0 {
 18425  			break
 18426  		}
 18427  		x := v_0
 18428  		v.reset(OpARM64VXTN2D)
 18429  		v.AddArg(x)
 18430  		return true
 18431  	}
 18432  	return false
 18433  }
 18434  func rewriteValueARM64_OpARM64VSHRN4S(v *Value) bool {
 18435  	v_0 := v.Args[0]
 18436  	// match: (VSHRN4S [0] x)
 18437  	// result: (VXTN4S x)
 18438  	for {
 18439  		if auxIntToUint8(v.AuxInt) != 0 {
 18440  			break
 18441  		}
 18442  		x := v_0
 18443  		v.reset(OpARM64VXTN4S)
 18444  		v.AddArg(x)
 18445  		return true
 18446  	}
 18447  	return false
 18448  }
 18449  func rewriteValueARM64_OpARM64VSHRN8H(v *Value) bool {
 18450  	v_0 := v.Args[0]
 18451  	// match: (VSHRN8H [0] x)
 18452  	// result: (VXTN8H x)
 18453  	for {
 18454  		if auxIntToUint8(v.AuxInt) != 0 {
 18455  			break
 18456  		}
 18457  		x := v_0
 18458  		v.reset(OpARM64VXTN8H)
 18459  		v.AddArg(x)
 18460  		return true
 18461  	}
 18462  	return false
 18463  }
 18464  func rewriteValueARM64_OpARM64VSMULL16B(v *Value) bool {
 18465  	v_1 := v.Args[1]
 18466  	v_0 := v.Args[0]
 18467  	// match: (VSMULL16B (VDUPDextr [1] x) (VDUPDextr [1] y))
 18468  	// result: (VSMULL2_16B x y)
 18469  	for {
 18470  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 18471  			if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18472  				continue
 18473  			}
 18474  			x := v_0.Args[0]
 18475  			if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 1 {
 18476  				continue
 18477  			}
 18478  			y := v_1.Args[0]
 18479  			v.reset(OpARM64VSMULL2_16B)
 18480  			v.AddArg2(x, y)
 18481  			return true
 18482  		}
 18483  		break
 18484  	}
 18485  	return false
 18486  }
 18487  func rewriteValueARM64_OpARM64VSMULL4S(v *Value) bool {
 18488  	v_1 := v.Args[1]
 18489  	v_0 := v.Args[0]
 18490  	// match: (VSMULL4S (VDUPDextr [1] x) (VDUPDextr [1] y))
 18491  	// result: (VSMULL2_4S x y)
 18492  	for {
 18493  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 18494  			if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18495  				continue
 18496  			}
 18497  			x := v_0.Args[0]
 18498  			if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 1 {
 18499  				continue
 18500  			}
 18501  			y := v_1.Args[0]
 18502  			v.reset(OpARM64VSMULL2_4S)
 18503  			v.AddArg2(x, y)
 18504  			return true
 18505  		}
 18506  		break
 18507  	}
 18508  	return false
 18509  }
 18510  func rewriteValueARM64_OpARM64VSMULL8H(v *Value) bool {
 18511  	v_1 := v.Args[1]
 18512  	v_0 := v.Args[0]
 18513  	// match: (VSMULL8H (VDUPDextr [1] x) (VDUPDextr [1] y))
 18514  	// result: (VSMULL2_8H x y)
 18515  	for {
 18516  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 18517  			if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18518  				continue
 18519  			}
 18520  			x := v_0.Args[0]
 18521  			if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 1 {
 18522  				continue
 18523  			}
 18524  			y := v_1.Args[0]
 18525  			v.reset(OpARM64VSMULL2_8H)
 18526  			v.AddArg2(x, y)
 18527  			return true
 18528  		}
 18529  		break
 18530  	}
 18531  	return false
 18532  }
 18533  func rewriteValueARM64_OpARM64VSQSHL16Bconst(v *Value) bool {
 18534  	v_0 := v.Args[0]
 18535  	// match: (VSQSHL16Bconst [a] x)
 18536  	// cond: a==0
 18537  	// result: x
 18538  	for {
 18539  		a := auxIntToUint8(v.AuxInt)
 18540  		x := v_0
 18541  		if !(a == 0) {
 18542  			break
 18543  		}
 18544  		v.copyOf(x)
 18545  		return true
 18546  	}
 18547  	return false
 18548  }
 18549  func rewriteValueARM64_OpARM64VSQSHL2Dconst(v *Value) bool {
 18550  	v_0 := v.Args[0]
 18551  	// match: (VSQSHL2Dconst [a] x)
 18552  	// cond: a==0
 18553  	// result: x
 18554  	for {
 18555  		a := auxIntToUint8(v.AuxInt)
 18556  		x := v_0
 18557  		if !(a == 0) {
 18558  			break
 18559  		}
 18560  		v.copyOf(x)
 18561  		return true
 18562  	}
 18563  	return false
 18564  }
 18565  func rewriteValueARM64_OpARM64VSQSHL4Sconst(v *Value) bool {
 18566  	v_0 := v.Args[0]
 18567  	// match: (VSQSHL4Sconst [a] x)
 18568  	// cond: a==0
 18569  	// result: x
 18570  	for {
 18571  		a := auxIntToUint8(v.AuxInt)
 18572  		x := v_0
 18573  		if !(a == 0) {
 18574  			break
 18575  		}
 18576  		v.copyOf(x)
 18577  		return true
 18578  	}
 18579  	return false
 18580  }
 18581  func rewriteValueARM64_OpARM64VSQSHL8Hconst(v *Value) bool {
 18582  	v_0 := v.Args[0]
 18583  	// match: (VSQSHL8Hconst [a] x)
 18584  	// cond: a==0
 18585  	// result: x
 18586  	for {
 18587  		a := auxIntToUint8(v.AuxInt)
 18588  		x := v_0
 18589  		if !(a == 0) {
 18590  			break
 18591  		}
 18592  		v.copyOf(x)
 18593  		return true
 18594  	}
 18595  	return false
 18596  }
 18597  func rewriteValueARM64_OpARM64VSSHLL16B(v *Value) bool {
 18598  	v_0 := v.Args[0]
 18599  	// match: (VSSHLL16B [a] (VDUPDextr [1] x))
 18600  	// result: (VSSHLL2_16B [a] x)
 18601  	for {
 18602  		a := auxIntToUint8(v.AuxInt)
 18603  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18604  			break
 18605  		}
 18606  		x := v_0.Args[0]
 18607  		v.reset(OpARM64VSSHLL2_16B)
 18608  		v.AuxInt = uint8ToAuxInt(a)
 18609  		v.AddArg(x)
 18610  		return true
 18611  	}
 18612  	return false
 18613  }
 18614  func rewriteValueARM64_OpARM64VSSHLL4S(v *Value) bool {
 18615  	v_0 := v.Args[0]
 18616  	// match: (VSSHLL4S [a] (VDUPDextr [1] x))
 18617  	// result: (VSSHLL2_4S [a] x)
 18618  	for {
 18619  		a := auxIntToUint8(v.AuxInt)
 18620  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18621  			break
 18622  		}
 18623  		x := v_0.Args[0]
 18624  		v.reset(OpARM64VSSHLL2_4S)
 18625  		v.AuxInt = uint8ToAuxInt(a)
 18626  		v.AddArg(x)
 18627  		return true
 18628  	}
 18629  	return false
 18630  }
 18631  func rewriteValueARM64_OpARM64VSSHLL8H(v *Value) bool {
 18632  	v_0 := v.Args[0]
 18633  	// match: (VSSHLL8H [a] (VDUPDextr [1] x))
 18634  	// result: (VSSHLL2_8H [a] x)
 18635  	for {
 18636  		a := auxIntToUint8(v.AuxInt)
 18637  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18638  			break
 18639  		}
 18640  		x := v_0.Args[0]
 18641  		v.reset(OpARM64VSSHLL2_8H)
 18642  		v.AuxInt = uint8ToAuxInt(a)
 18643  		v.AddArg(x)
 18644  		return true
 18645  	}
 18646  	return false
 18647  }
 18648  func rewriteValueARM64_OpARM64VSSHR16B(v *Value) bool {
 18649  	v_0 := v.Args[0]
 18650  	// match: (VSSHR16B [a] x)
 18651  	// cond: a==0
 18652  	// result: x
 18653  	for {
 18654  		a := auxIntToUint8(v.AuxInt)
 18655  		x := v_0
 18656  		if !(a == 0) {
 18657  			break
 18658  		}
 18659  		v.copyOf(x)
 18660  		return true
 18661  	}
 18662  	return false
 18663  }
 18664  func rewriteValueARM64_OpARM64VSSHR2D(v *Value) bool {
 18665  	v_0 := v.Args[0]
 18666  	// match: (VSSHR2D [a] x)
 18667  	// cond: a==0
 18668  	// result: x
 18669  	for {
 18670  		a := auxIntToUint8(v.AuxInt)
 18671  		x := v_0
 18672  		if !(a == 0) {
 18673  			break
 18674  		}
 18675  		v.copyOf(x)
 18676  		return true
 18677  	}
 18678  	return false
 18679  }
 18680  func rewriteValueARM64_OpARM64VSSHR4S(v *Value) bool {
 18681  	v_0 := v.Args[0]
 18682  	// match: (VSSHR4S [a] x)
 18683  	// cond: a==0
 18684  	// result: x
 18685  	for {
 18686  		a := auxIntToUint8(v.AuxInt)
 18687  		x := v_0
 18688  		if !(a == 0) {
 18689  			break
 18690  		}
 18691  		v.copyOf(x)
 18692  		return true
 18693  	}
 18694  	return false
 18695  }
 18696  func rewriteValueARM64_OpARM64VSSHR8H(v *Value) bool {
 18697  	v_0 := v.Args[0]
 18698  	// match: (VSSHR8H [a] x)
 18699  	// cond: a==0
 18700  	// result: x
 18701  	for {
 18702  		a := auxIntToUint8(v.AuxInt)
 18703  		x := v_0
 18704  		if !(a == 0) {
 18705  			break
 18706  		}
 18707  		v.copyOf(x)
 18708  		return true
 18709  	}
 18710  	return false
 18711  }
 18712  func rewriteValueARM64_OpARM64VSXTL16B(v *Value) bool {
 18713  	v_0 := v.Args[0]
 18714  	// match: (VSXTL16B (VDUPDextr [1] x))
 18715  	// result: (VSXTL2_16B x)
 18716  	for {
 18717  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18718  			break
 18719  		}
 18720  		x := v_0.Args[0]
 18721  		v.reset(OpARM64VSXTL2_16B)
 18722  		v.AddArg(x)
 18723  		return true
 18724  	}
 18725  	return false
 18726  }
 18727  func rewriteValueARM64_OpARM64VSXTL4S(v *Value) bool {
 18728  	v_0 := v.Args[0]
 18729  	// match: (VSXTL4S (VDUPDextr [1] x))
 18730  	// result: (VSXTL2_4S x)
 18731  	for {
 18732  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18733  			break
 18734  		}
 18735  		x := v_0.Args[0]
 18736  		v.reset(OpARM64VSXTL2_4S)
 18737  		v.AddArg(x)
 18738  		return true
 18739  	}
 18740  	return false
 18741  }
 18742  func rewriteValueARM64_OpARM64VSXTL8H(v *Value) bool {
 18743  	v_0 := v.Args[0]
 18744  	// match: (VSXTL8H (VDUPDextr [1] x))
 18745  	// result: (VSXTL2_8H x)
 18746  	for {
 18747  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18748  			break
 18749  		}
 18750  		x := v_0.Args[0]
 18751  		v.reset(OpARM64VSXTL2_8H)
 18752  		v.AddArg(x)
 18753  		return true
 18754  	}
 18755  	return false
 18756  }
 18757  func rewriteValueARM64_OpARM64VUMULL16B(v *Value) bool {
 18758  	v_1 := v.Args[1]
 18759  	v_0 := v.Args[0]
 18760  	// match: (VUMULL16B (VDUPDextr [1] x) (VDUPDextr [1] y))
 18761  	// result: (VUMULL2_16B x y)
 18762  	for {
 18763  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 18764  			if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18765  				continue
 18766  			}
 18767  			x := v_0.Args[0]
 18768  			if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 1 {
 18769  				continue
 18770  			}
 18771  			y := v_1.Args[0]
 18772  			v.reset(OpARM64VUMULL2_16B)
 18773  			v.AddArg2(x, y)
 18774  			return true
 18775  		}
 18776  		break
 18777  	}
 18778  	return false
 18779  }
 18780  func rewriteValueARM64_OpARM64VUMULL4S(v *Value) bool {
 18781  	v_1 := v.Args[1]
 18782  	v_0 := v.Args[0]
 18783  	// match: (VUMULL4S (VDUPDextr [1] x) (VDUPDextr [1] y))
 18784  	// result: (VUMULL2_4S x y)
 18785  	for {
 18786  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 18787  			if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18788  				continue
 18789  			}
 18790  			x := v_0.Args[0]
 18791  			if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 1 {
 18792  				continue
 18793  			}
 18794  			y := v_1.Args[0]
 18795  			v.reset(OpARM64VUMULL2_4S)
 18796  			v.AddArg2(x, y)
 18797  			return true
 18798  		}
 18799  		break
 18800  	}
 18801  	return false
 18802  }
 18803  func rewriteValueARM64_OpARM64VUMULL8H(v *Value) bool {
 18804  	v_1 := v.Args[1]
 18805  	v_0 := v.Args[0]
 18806  	// match: (VUMULL8H (VDUPDextr [1] x) (VDUPDextr [1] y))
 18807  	// result: (VUMULL2_8H x y)
 18808  	for {
 18809  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 18810  			if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18811  				continue
 18812  			}
 18813  			x := v_0.Args[0]
 18814  			if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 1 {
 18815  				continue
 18816  			}
 18817  			y := v_1.Args[0]
 18818  			v.reset(OpARM64VUMULL2_8H)
 18819  			v.AddArg2(x, y)
 18820  			return true
 18821  		}
 18822  		break
 18823  	}
 18824  	return false
 18825  }
 18826  func rewriteValueARM64_OpARM64VUQSHL16Bconst(v *Value) bool {
 18827  	v_0 := v.Args[0]
 18828  	// match: (VUQSHL16Bconst [a] x)
 18829  	// cond: a==0
 18830  	// result: x
 18831  	for {
 18832  		a := auxIntToUint8(v.AuxInt)
 18833  		x := v_0
 18834  		if !(a == 0) {
 18835  			break
 18836  		}
 18837  		v.copyOf(x)
 18838  		return true
 18839  	}
 18840  	return false
 18841  }
 18842  func rewriteValueARM64_OpARM64VUQSHL2Dconst(v *Value) bool {
 18843  	v_0 := v.Args[0]
 18844  	// match: (VUQSHL2Dconst [a] x)
 18845  	// cond: a==0
 18846  	// result: x
 18847  	for {
 18848  		a := auxIntToUint8(v.AuxInt)
 18849  		x := v_0
 18850  		if !(a == 0) {
 18851  			break
 18852  		}
 18853  		v.copyOf(x)
 18854  		return true
 18855  	}
 18856  	return false
 18857  }
 18858  func rewriteValueARM64_OpARM64VUQSHL4Sconst(v *Value) bool {
 18859  	v_0 := v.Args[0]
 18860  	// match: (VUQSHL4Sconst [a] x)
 18861  	// cond: a==0
 18862  	// result: x
 18863  	for {
 18864  		a := auxIntToUint8(v.AuxInt)
 18865  		x := v_0
 18866  		if !(a == 0) {
 18867  			break
 18868  		}
 18869  		v.copyOf(x)
 18870  		return true
 18871  	}
 18872  	return false
 18873  }
 18874  func rewriteValueARM64_OpARM64VUQSHL8Hconst(v *Value) bool {
 18875  	v_0 := v.Args[0]
 18876  	// match: (VUQSHL8Hconst [a] x)
 18877  	// cond: a==0
 18878  	// result: x
 18879  	for {
 18880  		a := auxIntToUint8(v.AuxInt)
 18881  		x := v_0
 18882  		if !(a == 0) {
 18883  			break
 18884  		}
 18885  		v.copyOf(x)
 18886  		return true
 18887  	}
 18888  	return false
 18889  }
 18890  func rewriteValueARM64_OpARM64VUSHLL16B(v *Value) bool {
 18891  	v_0 := v.Args[0]
 18892  	// match: (VUSHLL16B [a] (VDUPDextr [1] x))
 18893  	// result: (VUSHLL2_16B [a] x)
 18894  	for {
 18895  		a := auxIntToUint8(v.AuxInt)
 18896  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18897  			break
 18898  		}
 18899  		x := v_0.Args[0]
 18900  		v.reset(OpARM64VUSHLL2_16B)
 18901  		v.AuxInt = uint8ToAuxInt(a)
 18902  		v.AddArg(x)
 18903  		return true
 18904  	}
 18905  	return false
 18906  }
 18907  func rewriteValueARM64_OpARM64VUSHLL4S(v *Value) bool {
 18908  	v_0 := v.Args[0]
 18909  	// match: (VUSHLL4S [a] (VDUPDextr [1] x))
 18910  	// result: (VUSHLL2_4S [a] x)
 18911  	for {
 18912  		a := auxIntToUint8(v.AuxInt)
 18913  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18914  			break
 18915  		}
 18916  		x := v_0.Args[0]
 18917  		v.reset(OpARM64VUSHLL2_4S)
 18918  		v.AuxInt = uint8ToAuxInt(a)
 18919  		v.AddArg(x)
 18920  		return true
 18921  	}
 18922  	return false
 18923  }
 18924  func rewriteValueARM64_OpARM64VUSHLL8H(v *Value) bool {
 18925  	v_0 := v.Args[0]
 18926  	// match: (VUSHLL8H [a] (VDUPDextr [1] x))
 18927  	// result: (VUSHLL2_8H [a] x)
 18928  	for {
 18929  		a := auxIntToUint8(v.AuxInt)
 18930  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18931  			break
 18932  		}
 18933  		x := v_0.Args[0]
 18934  		v.reset(OpARM64VUSHLL2_8H)
 18935  		v.AuxInt = uint8ToAuxInt(a)
 18936  		v.AddArg(x)
 18937  		return true
 18938  	}
 18939  	return false
 18940  }
 18941  func rewriteValueARM64_OpARM64VUSHR16B(v *Value) bool {
 18942  	v_0 := v.Args[0]
 18943  	// match: (VUSHR16B [a] x)
 18944  	// cond: a==0
 18945  	// result: x
 18946  	for {
 18947  		a := auxIntToUint8(v.AuxInt)
 18948  		x := v_0
 18949  		if !(a == 0) {
 18950  			break
 18951  		}
 18952  		v.copyOf(x)
 18953  		return true
 18954  	}
 18955  	return false
 18956  }
 18957  func rewriteValueARM64_OpARM64VUSHR2D(v *Value) bool {
 18958  	v_0 := v.Args[0]
 18959  	// match: (VUSHR2D [a] x)
 18960  	// cond: a==0
 18961  	// result: x
 18962  	for {
 18963  		a := auxIntToUint8(v.AuxInt)
 18964  		x := v_0
 18965  		if !(a == 0) {
 18966  			break
 18967  		}
 18968  		v.copyOf(x)
 18969  		return true
 18970  	}
 18971  	return false
 18972  }
 18973  func rewriteValueARM64_OpARM64VUSHR4S(v *Value) bool {
 18974  	v_0 := v.Args[0]
 18975  	// match: (VUSHR4S [a] x)
 18976  	// cond: a==0
 18977  	// result: x
 18978  	for {
 18979  		a := auxIntToUint8(v.AuxInt)
 18980  		x := v_0
 18981  		if !(a == 0) {
 18982  			break
 18983  		}
 18984  		v.copyOf(x)
 18985  		return true
 18986  	}
 18987  	return false
 18988  }
 18989  func rewriteValueARM64_OpARM64VUSHR8H(v *Value) bool {
 18990  	v_0 := v.Args[0]
 18991  	// match: (VUSHR8H [a] x)
 18992  	// cond: a==0
 18993  	// result: x
 18994  	for {
 18995  		a := auxIntToUint8(v.AuxInt)
 18996  		x := v_0
 18997  		if !(a == 0) {
 18998  			break
 18999  		}
 19000  		v.copyOf(x)
 19001  		return true
 19002  	}
 19003  	return false
 19004  }
 19005  func rewriteValueARM64_OpARM64VUXTL16B(v *Value) bool {
 19006  	v_0 := v.Args[0]
 19007  	// match: (VUXTL16B (VDUPDextr [1] x))
 19008  	// result: (VUXTL2_16B x)
 19009  	for {
 19010  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 19011  			break
 19012  		}
 19013  		x := v_0.Args[0]
 19014  		v.reset(OpARM64VUXTL2_16B)
 19015  		v.AddArg(x)
 19016  		return true
 19017  	}
 19018  	return false
 19019  }
 19020  func rewriteValueARM64_OpARM64VUXTL4S(v *Value) bool {
 19021  	v_0 := v.Args[0]
 19022  	// match: (VUXTL4S (VDUPDextr [1] x))
 19023  	// result: (VUXTL2_4S x)
 19024  	for {
 19025  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 19026  			break
 19027  		}
 19028  		x := v_0.Args[0]
 19029  		v.reset(OpARM64VUXTL2_4S)
 19030  		v.AddArg(x)
 19031  		return true
 19032  	}
 19033  	return false
 19034  }
 19035  func rewriteValueARM64_OpARM64VUXTL8H(v *Value) bool {
 19036  	v_0 := v.Args[0]
 19037  	// match: (VUXTL8H (VDUPDextr [1] x))
 19038  	// result: (VUXTL2_8H x)
 19039  	for {
 19040  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 19041  			break
 19042  		}
 19043  		x := v_0.Args[0]
 19044  		v.reset(OpARM64VUXTL2_8H)
 19045  		v.AddArg(x)
 19046  		return true
 19047  	}
 19048  	return false
 19049  }
 19050  func rewriteValueARM64_OpARM64XOR(v *Value) bool {
 19051  	v_1 := v.Args[1]
 19052  	v_0 := v.Args[0]
 19053  	// match: (XOR x (MOVDconst [c]))
 19054  	// result: (XORconst [c] x)
 19055  	for {
 19056  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 19057  			x := v_0
 19058  			if v_1.Op != OpARM64MOVDconst {
 19059  				continue
 19060  			}
 19061  			c := auxIntToInt64(v_1.AuxInt)
 19062  			v.reset(OpARM64XORconst)
 19063  			v.AuxInt = int64ToAuxInt(c)
 19064  			v.AddArg(x)
 19065  			return true
 19066  		}
 19067  		break
 19068  	}
 19069  	// match: (XOR x x)
 19070  	// result: (MOVDconst [0])
 19071  	for {
 19072  		x := v_0
 19073  		if x != v_1 {
 19074  			break
 19075  		}
 19076  		v.reset(OpARM64MOVDconst)
 19077  		v.AuxInt = int64ToAuxInt(0)
 19078  		return true
 19079  	}
 19080  	// match: (XOR x (MVN y))
 19081  	// result: (EON x y)
 19082  	for {
 19083  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 19084  			x := v_0
 19085  			if v_1.Op != OpARM64MVN {
 19086  				continue
 19087  			}
 19088  			y := v_1.Args[0]
 19089  			v.reset(OpARM64EON)
 19090  			v.AddArg2(x, y)
 19091  			return true
 19092  		}
 19093  		break
 19094  	}
 19095  	// match: (XOR x0 x1:(SLLconst [c] y))
 19096  	// cond: clobberIfDead(x1)
 19097  	// result: (XORshiftLL x0 y [c])
 19098  	for {
 19099  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 19100  			x0 := v_0
 19101  			x1 := v_1
 19102  			if x1.Op != OpARM64SLLconst {
 19103  				continue
 19104  			}
 19105  			c := auxIntToInt64(x1.AuxInt)
 19106  			y := x1.Args[0]
 19107  			if !(clobberIfDead(x1)) {
 19108  				continue
 19109  			}
 19110  			v.reset(OpARM64XORshiftLL)
 19111  			v.AuxInt = int64ToAuxInt(c)
 19112  			v.AddArg2(x0, y)
 19113  			return true
 19114  		}
 19115  		break
 19116  	}
 19117  	// match: (XOR x0 x1:(SRLconst [c] y))
 19118  	// cond: clobberIfDead(x1)
 19119  	// result: (XORshiftRL x0 y [c])
 19120  	for {
 19121  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 19122  			x0 := v_0
 19123  			x1 := v_1
 19124  			if x1.Op != OpARM64SRLconst {
 19125  				continue
 19126  			}
 19127  			c := auxIntToInt64(x1.AuxInt)
 19128  			y := x1.Args[0]
 19129  			if !(clobberIfDead(x1)) {
 19130  				continue
 19131  			}
 19132  			v.reset(OpARM64XORshiftRL)
 19133  			v.AuxInt = int64ToAuxInt(c)
 19134  			v.AddArg2(x0, y)
 19135  			return true
 19136  		}
 19137  		break
 19138  	}
 19139  	// match: (XOR x0 x1:(SRAconst [c] y))
 19140  	// cond: clobberIfDead(x1)
 19141  	// result: (XORshiftRA x0 y [c])
 19142  	for {
 19143  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 19144  			x0 := v_0
 19145  			x1 := v_1
 19146  			if x1.Op != OpARM64SRAconst {
 19147  				continue
 19148  			}
 19149  			c := auxIntToInt64(x1.AuxInt)
 19150  			y := x1.Args[0]
 19151  			if !(clobberIfDead(x1)) {
 19152  				continue
 19153  			}
 19154  			v.reset(OpARM64XORshiftRA)
 19155  			v.AuxInt = int64ToAuxInt(c)
 19156  			v.AddArg2(x0, y)
 19157  			return true
 19158  		}
 19159  		break
 19160  	}
 19161  	// match: (XOR x0 x1:(RORconst [c] y))
 19162  	// cond: clobberIfDead(x1)
 19163  	// result: (XORshiftRO x0 y [c])
 19164  	for {
 19165  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 19166  			x0 := v_0
 19167  			x1 := v_1
 19168  			if x1.Op != OpARM64RORconst {
 19169  				continue
 19170  			}
 19171  			c := auxIntToInt64(x1.AuxInt)
 19172  			y := x1.Args[0]
 19173  			if !(clobberIfDead(x1)) {
 19174  				continue
 19175  			}
 19176  			v.reset(OpARM64XORshiftRO)
 19177  			v.AuxInt = int64ToAuxInt(c)
 19178  			v.AddArg2(x0, y)
 19179  			return true
 19180  		}
 19181  		break
 19182  	}
 19183  	return false
 19184  }
 19185  func rewriteValueARM64_OpARM64XORconst(v *Value) bool {
 19186  	v_0 := v.Args[0]
 19187  	// match: (XORconst [0] x)
 19188  	// result: x
 19189  	for {
 19190  		if auxIntToInt64(v.AuxInt) != 0 {
 19191  			break
 19192  		}
 19193  		x := v_0
 19194  		v.copyOf(x)
 19195  		return true
 19196  	}
 19197  	// match: (XORconst [-1] x)
 19198  	// result: (MVN x)
 19199  	for {
 19200  		if auxIntToInt64(v.AuxInt) != -1 {
 19201  			break
 19202  		}
 19203  		x := v_0
 19204  		v.reset(OpARM64MVN)
 19205  		v.AddArg(x)
 19206  		return true
 19207  	}
 19208  	// match: (XORconst [c] (MOVDconst [d]))
 19209  	// result: (MOVDconst [c^d])
 19210  	for {
 19211  		c := auxIntToInt64(v.AuxInt)
 19212  		if v_0.Op != OpARM64MOVDconst {
 19213  			break
 19214  		}
 19215  		d := auxIntToInt64(v_0.AuxInt)
 19216  		v.reset(OpARM64MOVDconst)
 19217  		v.AuxInt = int64ToAuxInt(c ^ d)
 19218  		return true
 19219  	}
 19220  	// match: (XORconst [c] (XORconst [d] x))
 19221  	// result: (XORconst [c^d] x)
 19222  	for {
 19223  		c := auxIntToInt64(v.AuxInt)
 19224  		if v_0.Op != OpARM64XORconst {
 19225  			break
 19226  		}
 19227  		d := auxIntToInt64(v_0.AuxInt)
 19228  		x := v_0.Args[0]
 19229  		v.reset(OpARM64XORconst)
 19230  		v.AuxInt = int64ToAuxInt(c ^ d)
 19231  		v.AddArg(x)
 19232  		return true
 19233  	}
 19234  	return false
 19235  }
 19236  func rewriteValueARM64_OpARM64XORshiftLL(v *Value) bool {
 19237  	v_1 := v.Args[1]
 19238  	v_0 := v.Args[0]
 19239  	b := v.Block
 19240  	typ := &b.Func.Config.Types
 19241  	// match: (XORshiftLL (MOVDconst [c]) x [d])
 19242  	// result: (XORconst [c] (SLLconst <x.Type> x [d]))
 19243  	for {
 19244  		d := auxIntToInt64(v.AuxInt)
 19245  		if v_0.Op != OpARM64MOVDconst {
 19246  			break
 19247  		}
 19248  		c := auxIntToInt64(v_0.AuxInt)
 19249  		x := v_1
 19250  		v.reset(OpARM64XORconst)
 19251  		v.AuxInt = int64ToAuxInt(c)
 19252  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 19253  		v0.AuxInt = int64ToAuxInt(d)
 19254  		v0.AddArg(x)
 19255  		v.AddArg(v0)
 19256  		return true
 19257  	}
 19258  	// match: (XORshiftLL x (MOVDconst [c]) [d])
 19259  	// result: (XORconst x [int64(uint64(c)<<uint64(d))])
 19260  	for {
 19261  		d := auxIntToInt64(v.AuxInt)
 19262  		x := v_0
 19263  		if v_1.Op != OpARM64MOVDconst {
 19264  			break
 19265  		}
 19266  		c := auxIntToInt64(v_1.AuxInt)
 19267  		v.reset(OpARM64XORconst)
 19268  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
 19269  		v.AddArg(x)
 19270  		return true
 19271  	}
 19272  	// match: (XORshiftLL (SLLconst x [c]) x [c])
 19273  	// result: (MOVDconst [0])
 19274  	for {
 19275  		c := auxIntToInt64(v.AuxInt)
 19276  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
 19277  			break
 19278  		}
 19279  		x := v_0.Args[0]
 19280  		if x != v_1 {
 19281  			break
 19282  		}
 19283  		v.reset(OpARM64MOVDconst)
 19284  		v.AuxInt = int64ToAuxInt(0)
 19285  		return true
 19286  	}
 19287  	// match: (XORshiftLL <typ.UInt16> [8] (UBFX <typ.UInt16> [armBFAuxInt(8, 8)] x) x)
 19288  	// result: (REV16W x)
 19289  	for {
 19290  		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) {
 19291  			break
 19292  		}
 19293  		x := v_0.Args[0]
 19294  		if x != v_1 {
 19295  			break
 19296  		}
 19297  		v.reset(OpARM64REV16W)
 19298  		v.AddArg(x)
 19299  		return true
 19300  	}
 19301  	// match: (XORshiftLL [8] (UBFX [armBFAuxInt(8, 24)] (ANDconst [c1] x)) (ANDconst [c2] x))
 19302  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
 19303  	// result: (REV16W x)
 19304  	for {
 19305  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64UBFX || auxIntToArm64BitField(v_0.AuxInt) != armBFAuxInt(8, 24) {
 19306  			break
 19307  		}
 19308  		v_0_0 := v_0.Args[0]
 19309  		if v_0_0.Op != OpARM64ANDconst {
 19310  			break
 19311  		}
 19312  		c1 := auxIntToInt64(v_0_0.AuxInt)
 19313  		x := v_0_0.Args[0]
 19314  		if v_1.Op != OpARM64ANDconst {
 19315  			break
 19316  		}
 19317  		c2 := auxIntToInt64(v_1.AuxInt)
 19318  		if x != v_1.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
 19319  			break
 19320  		}
 19321  		v.reset(OpARM64REV16W)
 19322  		v.AddArg(x)
 19323  		return true
 19324  	}
 19325  	// match: (XORshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
 19326  	// cond: (uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff)
 19327  	// result: (REV16 x)
 19328  	for {
 19329  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
 19330  			break
 19331  		}
 19332  		v_0_0 := v_0.Args[0]
 19333  		if v_0_0.Op != OpARM64ANDconst {
 19334  			break
 19335  		}
 19336  		c1 := auxIntToInt64(v_0_0.AuxInt)
 19337  		x := v_0_0.Args[0]
 19338  		if v_1.Op != OpARM64ANDconst {
 19339  			break
 19340  		}
 19341  		c2 := auxIntToInt64(v_1.AuxInt)
 19342  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
 19343  			break
 19344  		}
 19345  		v.reset(OpARM64REV16)
 19346  		v.AddArg(x)
 19347  		return true
 19348  	}
 19349  	// match: (XORshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
 19350  	// cond: (uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff)
 19351  	// result: (REV16 (ANDconst <x.Type> [0xffffffff] x))
 19352  	for {
 19353  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
 19354  			break
 19355  		}
 19356  		v_0_0 := v_0.Args[0]
 19357  		if v_0_0.Op != OpARM64ANDconst {
 19358  			break
 19359  		}
 19360  		c1 := auxIntToInt64(v_0_0.AuxInt)
 19361  		x := v_0_0.Args[0]
 19362  		if v_1.Op != OpARM64ANDconst {
 19363  			break
 19364  		}
 19365  		c2 := auxIntToInt64(v_1.AuxInt)
 19366  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
 19367  			break
 19368  		}
 19369  		v.reset(OpARM64REV16)
 19370  		v0 := b.NewValue0(v.Pos, OpARM64ANDconst, x.Type)
 19371  		v0.AuxInt = int64ToAuxInt(0xffffffff)
 19372  		v0.AddArg(x)
 19373  		v.AddArg(v0)
 19374  		return true
 19375  	}
 19376  	// match: (XORshiftLL [c] (SRLconst x [64-c]) x2)
 19377  	// result: (EXTRconst [64-c] x2 x)
 19378  	for {
 19379  		c := auxIntToInt64(v.AuxInt)
 19380  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 64-c {
 19381  			break
 19382  		}
 19383  		x := v_0.Args[0]
 19384  		x2 := v_1
 19385  		v.reset(OpARM64EXTRconst)
 19386  		v.AuxInt = int64ToAuxInt(64 - c)
 19387  		v.AddArg2(x2, x)
 19388  		return true
 19389  	}
 19390  	// match: (XORshiftLL <t> [c] (UBFX [bfc] x) x2)
 19391  	// cond: c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)
 19392  	// result: (EXTRWconst [32-c] x2 x)
 19393  	for {
 19394  		t := v.Type
 19395  		c := auxIntToInt64(v.AuxInt)
 19396  		if v_0.Op != OpARM64UBFX {
 19397  			break
 19398  		}
 19399  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 19400  		x := v_0.Args[0]
 19401  		x2 := v_1
 19402  		if !(c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)) {
 19403  			break
 19404  		}
 19405  		v.reset(OpARM64EXTRWconst)
 19406  		v.AuxInt = int64ToAuxInt(32 - c)
 19407  		v.AddArg2(x2, x)
 19408  		return true
 19409  	}
 19410  	return false
 19411  }
 19412  func rewriteValueARM64_OpARM64XORshiftRA(v *Value) bool {
 19413  	v_1 := v.Args[1]
 19414  	v_0 := v.Args[0]
 19415  	b := v.Block
 19416  	// match: (XORshiftRA (MOVDconst [c]) x [d])
 19417  	// result: (XORconst [c] (SRAconst <x.Type> x [d]))
 19418  	for {
 19419  		d := auxIntToInt64(v.AuxInt)
 19420  		if v_0.Op != OpARM64MOVDconst {
 19421  			break
 19422  		}
 19423  		c := auxIntToInt64(v_0.AuxInt)
 19424  		x := v_1
 19425  		v.reset(OpARM64XORconst)
 19426  		v.AuxInt = int64ToAuxInt(c)
 19427  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
 19428  		v0.AuxInt = int64ToAuxInt(d)
 19429  		v0.AddArg(x)
 19430  		v.AddArg(v0)
 19431  		return true
 19432  	}
 19433  	// match: (XORshiftRA x (MOVDconst [c]) [d])
 19434  	// result: (XORconst x [c>>uint64(d)])
 19435  	for {
 19436  		d := auxIntToInt64(v.AuxInt)
 19437  		x := v_0
 19438  		if v_1.Op != OpARM64MOVDconst {
 19439  			break
 19440  		}
 19441  		c := auxIntToInt64(v_1.AuxInt)
 19442  		v.reset(OpARM64XORconst)
 19443  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
 19444  		v.AddArg(x)
 19445  		return true
 19446  	}
 19447  	// match: (XORshiftRA (SRAconst x [c]) x [c])
 19448  	// result: (MOVDconst [0])
 19449  	for {
 19450  		c := auxIntToInt64(v.AuxInt)
 19451  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
 19452  			break
 19453  		}
 19454  		x := v_0.Args[0]
 19455  		if x != v_1 {
 19456  			break
 19457  		}
 19458  		v.reset(OpARM64MOVDconst)
 19459  		v.AuxInt = int64ToAuxInt(0)
 19460  		return true
 19461  	}
 19462  	return false
 19463  }
 19464  func rewriteValueARM64_OpARM64XORshiftRL(v *Value) bool {
 19465  	v_1 := v.Args[1]
 19466  	v_0 := v.Args[0]
 19467  	b := v.Block
 19468  	// match: (XORshiftRL (MOVDconst [c]) x [d])
 19469  	// result: (XORconst [c] (SRLconst <x.Type> x [d]))
 19470  	for {
 19471  		d := auxIntToInt64(v.AuxInt)
 19472  		if v_0.Op != OpARM64MOVDconst {
 19473  			break
 19474  		}
 19475  		c := auxIntToInt64(v_0.AuxInt)
 19476  		x := v_1
 19477  		v.reset(OpARM64XORconst)
 19478  		v.AuxInt = int64ToAuxInt(c)
 19479  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
 19480  		v0.AuxInt = int64ToAuxInt(d)
 19481  		v0.AddArg(x)
 19482  		v.AddArg(v0)
 19483  		return true
 19484  	}
 19485  	// match: (XORshiftRL x (MOVDconst [c]) [d])
 19486  	// result: (XORconst x [int64(uint64(c)>>uint64(d))])
 19487  	for {
 19488  		d := auxIntToInt64(v.AuxInt)
 19489  		x := v_0
 19490  		if v_1.Op != OpARM64MOVDconst {
 19491  			break
 19492  		}
 19493  		c := auxIntToInt64(v_1.AuxInt)
 19494  		v.reset(OpARM64XORconst)
 19495  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
 19496  		v.AddArg(x)
 19497  		return true
 19498  	}
 19499  	// match: (XORshiftRL (SRLconst x [c]) x [c])
 19500  	// result: (MOVDconst [0])
 19501  	for {
 19502  		c := auxIntToInt64(v.AuxInt)
 19503  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
 19504  			break
 19505  		}
 19506  		x := v_0.Args[0]
 19507  		if x != v_1 {
 19508  			break
 19509  		}
 19510  		v.reset(OpARM64MOVDconst)
 19511  		v.AuxInt = int64ToAuxInt(0)
 19512  		return true
 19513  	}
 19514  	return false
 19515  }
 19516  func rewriteValueARM64_OpARM64XORshiftRO(v *Value) bool {
 19517  	v_1 := v.Args[1]
 19518  	v_0 := v.Args[0]
 19519  	b := v.Block
 19520  	// match: (XORshiftRO (MOVDconst [c]) x [d])
 19521  	// result: (XORconst [c] (RORconst <x.Type> x [d]))
 19522  	for {
 19523  		d := auxIntToInt64(v.AuxInt)
 19524  		if v_0.Op != OpARM64MOVDconst {
 19525  			break
 19526  		}
 19527  		c := auxIntToInt64(v_0.AuxInt)
 19528  		x := v_1
 19529  		v.reset(OpARM64XORconst)
 19530  		v.AuxInt = int64ToAuxInt(c)
 19531  		v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
 19532  		v0.AuxInt = int64ToAuxInt(d)
 19533  		v0.AddArg(x)
 19534  		v.AddArg(v0)
 19535  		return true
 19536  	}
 19537  	// match: (XORshiftRO x (MOVDconst [c]) [d])
 19538  	// result: (XORconst x [rotateRight64(c, d)])
 19539  	for {
 19540  		d := auxIntToInt64(v.AuxInt)
 19541  		x := v_0
 19542  		if v_1.Op != OpARM64MOVDconst {
 19543  			break
 19544  		}
 19545  		c := auxIntToInt64(v_1.AuxInt)
 19546  		v.reset(OpARM64XORconst)
 19547  		v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
 19548  		v.AddArg(x)
 19549  		return true
 19550  	}
 19551  	// match: (XORshiftRO (RORconst x [c]) x [c])
 19552  	// result: (MOVDconst [0])
 19553  	for {
 19554  		c := auxIntToInt64(v.AuxInt)
 19555  		if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
 19556  			break
 19557  		}
 19558  		x := v_0.Args[0]
 19559  		if x != v_1 {
 19560  			break
 19561  		}
 19562  		v.reset(OpARM64MOVDconst)
 19563  		v.AuxInt = int64ToAuxInt(0)
 19564  		return true
 19565  	}
 19566  	return false
 19567  }
 19568  func rewriteValueARM64_OpAddr(v *Value) bool {
 19569  	v_0 := v.Args[0]
 19570  	// match: (Addr {sym} base)
 19571  	// result: (MOVDaddr {sym} base)
 19572  	for {
 19573  		sym := auxToSym(v.Aux)
 19574  		base := v_0
 19575  		v.reset(OpARM64MOVDaddr)
 19576  		v.Aux = symToAux(sym)
 19577  		v.AddArg(base)
 19578  		return true
 19579  	}
 19580  }
 19581  func rewriteValueARM64_OpAvg64u(v *Value) bool {
 19582  	v_1 := v.Args[1]
 19583  	v_0 := v.Args[0]
 19584  	b := v.Block
 19585  	// match: (Avg64u <t> x y)
 19586  	// result: (ADD (SRLconst <t> (SUB <t> x y) [1]) y)
 19587  	for {
 19588  		t := v.Type
 19589  		x := v_0
 19590  		y := v_1
 19591  		v.reset(OpARM64ADD)
 19592  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, t)
 19593  		v0.AuxInt = int64ToAuxInt(1)
 19594  		v1 := b.NewValue0(v.Pos, OpARM64SUB, t)
 19595  		v1.AddArg2(x, y)
 19596  		v0.AddArg(v1)
 19597  		v.AddArg2(v0, y)
 19598  		return true
 19599  	}
 19600  }
 19601  func rewriteValueARM64_OpBitLen16(v *Value) bool {
 19602  	v_0 := v.Args[0]
 19603  	b := v.Block
 19604  	typ := &b.Func.Config.Types
 19605  	// match: (BitLen16 x)
 19606  	// result: (BitLen64 (ZeroExt16to64 x))
 19607  	for {
 19608  		x := v_0
 19609  		v.reset(OpBitLen64)
 19610  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 19611  		v0.AddArg(x)
 19612  		v.AddArg(v0)
 19613  		return true
 19614  	}
 19615  }
 19616  func rewriteValueARM64_OpBitLen32(v *Value) bool {
 19617  	v_0 := v.Args[0]
 19618  	b := v.Block
 19619  	typ := &b.Func.Config.Types
 19620  	// match: (BitLen32 x)
 19621  	// result: (SUB (MOVDconst [32]) (CLZW <typ.Int> x))
 19622  	for {
 19623  		x := v_0
 19624  		v.reset(OpARM64SUB)
 19625  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 19626  		v0.AuxInt = int64ToAuxInt(32)
 19627  		v1 := b.NewValue0(v.Pos, OpARM64CLZW, typ.Int)
 19628  		v1.AddArg(x)
 19629  		v.AddArg2(v0, v1)
 19630  		return true
 19631  	}
 19632  }
 19633  func rewriteValueARM64_OpBitLen64(v *Value) bool {
 19634  	v_0 := v.Args[0]
 19635  	b := v.Block
 19636  	typ := &b.Func.Config.Types
 19637  	// match: (BitLen64 x)
 19638  	// result: (SUB (MOVDconst [64]) (CLZ <typ.Int> x))
 19639  	for {
 19640  		x := v_0
 19641  		v.reset(OpARM64SUB)
 19642  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 19643  		v0.AuxInt = int64ToAuxInt(64)
 19644  		v1 := b.NewValue0(v.Pos, OpARM64CLZ, typ.Int)
 19645  		v1.AddArg(x)
 19646  		v.AddArg2(v0, v1)
 19647  		return true
 19648  	}
 19649  }
 19650  func rewriteValueARM64_OpBitLen8(v *Value) bool {
 19651  	v_0 := v.Args[0]
 19652  	b := v.Block
 19653  	typ := &b.Func.Config.Types
 19654  	// match: (BitLen8 x)
 19655  	// result: (BitLen64 (ZeroExt8to64 x))
 19656  	for {
 19657  		x := v_0
 19658  		v.reset(OpBitLen64)
 19659  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 19660  		v0.AddArg(x)
 19661  		v.AddArg(v0)
 19662  		return true
 19663  	}
 19664  }
 19665  func rewriteValueARM64_OpBitRev16(v *Value) bool {
 19666  	v_0 := v.Args[0]
 19667  	b := v.Block
 19668  	typ := &b.Func.Config.Types
 19669  	// match: (BitRev16 x)
 19670  	// result: (SRLconst [48] (RBIT <typ.UInt64> x))
 19671  	for {
 19672  		x := v_0
 19673  		v.reset(OpARM64SRLconst)
 19674  		v.AuxInt = int64ToAuxInt(48)
 19675  		v0 := b.NewValue0(v.Pos, OpARM64RBIT, typ.UInt64)
 19676  		v0.AddArg(x)
 19677  		v.AddArg(v0)
 19678  		return true
 19679  	}
 19680  }
 19681  func rewriteValueARM64_OpBitRev8(v *Value) bool {
 19682  	v_0 := v.Args[0]
 19683  	b := v.Block
 19684  	typ := &b.Func.Config.Types
 19685  	// match: (BitRev8 x)
 19686  	// result: (SRLconst [56] (RBIT <typ.UInt64> x))
 19687  	for {
 19688  		x := v_0
 19689  		v.reset(OpARM64SRLconst)
 19690  		v.AuxInt = int64ToAuxInt(56)
 19691  		v0 := b.NewValue0(v.Pos, OpARM64RBIT, typ.UInt64)
 19692  		v0.AddArg(x)
 19693  		v.AddArg(v0)
 19694  		return true
 19695  	}
 19696  }
 19697  func rewriteValueARM64_OpCondSelect(v *Value) bool {
 19698  	v_2 := v.Args[2]
 19699  	v_1 := v.Args[1]
 19700  	v_0 := v.Args[0]
 19701  	b := v.Block
 19702  	// match: (CondSelect x y boolval)
 19703  	// cond: flagArg(boolval) != nil
 19704  	// result: (CSEL [boolval.Op] x y flagArg(boolval))
 19705  	for {
 19706  		x := v_0
 19707  		y := v_1
 19708  		boolval := v_2
 19709  		if !(flagArg(boolval) != nil) {
 19710  			break
 19711  		}
 19712  		v.reset(OpARM64CSEL)
 19713  		v.AuxInt = opToAuxInt(boolval.Op)
 19714  		v.AddArg3(x, y, flagArg(boolval))
 19715  		return true
 19716  	}
 19717  	// match: (CondSelect x y boolval)
 19718  	// cond: flagArg(boolval) == nil
 19719  	// result: (CSEL [OpARM64NotEqual] x y (TSTWconst [1] boolval))
 19720  	for {
 19721  		x := v_0
 19722  		y := v_1
 19723  		boolval := v_2
 19724  		if !(flagArg(boolval) == nil) {
 19725  			break
 19726  		}
 19727  		v.reset(OpARM64CSEL)
 19728  		v.AuxInt = opToAuxInt(OpARM64NotEqual)
 19729  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
 19730  		v0.AuxInt = int32ToAuxInt(1)
 19731  		v0.AddArg(boolval)
 19732  		v.AddArg3(x, y, v0)
 19733  		return true
 19734  	}
 19735  	return false
 19736  }
 19737  func rewriteValueARM64_OpConst16(v *Value) bool {
 19738  	// match: (Const16 [val])
 19739  	// result: (MOVDconst [int64(val)])
 19740  	for {
 19741  		val := auxIntToInt16(v.AuxInt)
 19742  		v.reset(OpARM64MOVDconst)
 19743  		v.AuxInt = int64ToAuxInt(int64(val))
 19744  		return true
 19745  	}
 19746  }
 19747  func rewriteValueARM64_OpConst32(v *Value) bool {
 19748  	// match: (Const32 [val])
 19749  	// result: (MOVDconst [int64(val)])
 19750  	for {
 19751  		val := auxIntToInt32(v.AuxInt)
 19752  		v.reset(OpARM64MOVDconst)
 19753  		v.AuxInt = int64ToAuxInt(int64(val))
 19754  		return true
 19755  	}
 19756  }
 19757  func rewriteValueARM64_OpConst32F(v *Value) bool {
 19758  	// match: (Const32F [val])
 19759  	// result: (FMOVSconst [float64(val)])
 19760  	for {
 19761  		val := auxIntToFloat32(v.AuxInt)
 19762  		v.reset(OpARM64FMOVSconst)
 19763  		v.AuxInt = float64ToAuxInt(float64(val))
 19764  		return true
 19765  	}
 19766  }
 19767  func rewriteValueARM64_OpConst64(v *Value) bool {
 19768  	// match: (Const64 [val])
 19769  	// result: (MOVDconst [int64(val)])
 19770  	for {
 19771  		val := auxIntToInt64(v.AuxInt)
 19772  		v.reset(OpARM64MOVDconst)
 19773  		v.AuxInt = int64ToAuxInt(int64(val))
 19774  		return true
 19775  	}
 19776  }
 19777  func rewriteValueARM64_OpConst64F(v *Value) bool {
 19778  	// match: (Const64F [val])
 19779  	// result: (FMOVDconst [float64(val)])
 19780  	for {
 19781  		val := auxIntToFloat64(v.AuxInt)
 19782  		v.reset(OpARM64FMOVDconst)
 19783  		v.AuxInt = float64ToAuxInt(float64(val))
 19784  		return true
 19785  	}
 19786  }
 19787  func rewriteValueARM64_OpConst8(v *Value) bool {
 19788  	// match: (Const8 [val])
 19789  	// result: (MOVDconst [int64(val)])
 19790  	for {
 19791  		val := auxIntToInt8(v.AuxInt)
 19792  		v.reset(OpARM64MOVDconst)
 19793  		v.AuxInt = int64ToAuxInt(int64(val))
 19794  		return true
 19795  	}
 19796  }
 19797  func rewriteValueARM64_OpConstBool(v *Value) bool {
 19798  	// match: (ConstBool [t])
 19799  	// result: (MOVDconst [b2i(t)])
 19800  	for {
 19801  		t := auxIntToBool(v.AuxInt)
 19802  		v.reset(OpARM64MOVDconst)
 19803  		v.AuxInt = int64ToAuxInt(b2i(t))
 19804  		return true
 19805  	}
 19806  }
 19807  func rewriteValueARM64_OpConstNil(v *Value) bool {
 19808  	// match: (ConstNil)
 19809  	// result: (MOVDconst [0])
 19810  	for {
 19811  		v.reset(OpARM64MOVDconst)
 19812  		v.AuxInt = int64ToAuxInt(0)
 19813  		return true
 19814  	}
 19815  }
 19816  func rewriteValueARM64_OpCtz16(v *Value) bool {
 19817  	v_0 := v.Args[0]
 19818  	b := v.Block
 19819  	typ := &b.Func.Config.Types
 19820  	// match: (Ctz16 <t> x)
 19821  	// result: (CLZW <t> (RBITW <typ.UInt32> (ORconst <typ.UInt32> [0x10000] x)))
 19822  	for {
 19823  		t := v.Type
 19824  		x := v_0
 19825  		v.reset(OpARM64CLZW)
 19826  		v.Type = t
 19827  		v0 := b.NewValue0(v.Pos, OpARM64RBITW, typ.UInt32)
 19828  		v1 := b.NewValue0(v.Pos, OpARM64ORconst, typ.UInt32)
 19829  		v1.AuxInt = int64ToAuxInt(0x10000)
 19830  		v1.AddArg(x)
 19831  		v0.AddArg(v1)
 19832  		v.AddArg(v0)
 19833  		return true
 19834  	}
 19835  }
 19836  func rewriteValueARM64_OpCtz32(v *Value) bool {
 19837  	v_0 := v.Args[0]
 19838  	b := v.Block
 19839  	// match: (Ctz32 <t> x)
 19840  	// result: (CLZW (RBITW <t> x))
 19841  	for {
 19842  		t := v.Type
 19843  		x := v_0
 19844  		v.reset(OpARM64CLZW)
 19845  		v0 := b.NewValue0(v.Pos, OpARM64RBITW, t)
 19846  		v0.AddArg(x)
 19847  		v.AddArg(v0)
 19848  		return true
 19849  	}
 19850  }
 19851  func rewriteValueARM64_OpCtz64(v *Value) bool {
 19852  	v_0 := v.Args[0]
 19853  	b := v.Block
 19854  	// match: (Ctz64 <t> x)
 19855  	// result: (CLZ (RBIT <t> x))
 19856  	for {
 19857  		t := v.Type
 19858  		x := v_0
 19859  		v.reset(OpARM64CLZ)
 19860  		v0 := b.NewValue0(v.Pos, OpARM64RBIT, t)
 19861  		v0.AddArg(x)
 19862  		v.AddArg(v0)
 19863  		return true
 19864  	}
 19865  }
 19866  func rewriteValueARM64_OpCtz8(v *Value) bool {
 19867  	v_0 := v.Args[0]
 19868  	b := v.Block
 19869  	typ := &b.Func.Config.Types
 19870  	// match: (Ctz8 <t> x)
 19871  	// result: (CLZW <t> (RBITW <typ.UInt32> (ORconst <typ.UInt32> [0x100] x)))
 19872  	for {
 19873  		t := v.Type
 19874  		x := v_0
 19875  		v.reset(OpARM64CLZW)
 19876  		v.Type = t
 19877  		v0 := b.NewValue0(v.Pos, OpARM64RBITW, typ.UInt32)
 19878  		v1 := b.NewValue0(v.Pos, OpARM64ORconst, typ.UInt32)
 19879  		v1.AuxInt = int64ToAuxInt(0x100)
 19880  		v1.AddArg(x)
 19881  		v0.AddArg(v1)
 19882  		v.AddArg(v0)
 19883  		return true
 19884  	}
 19885  }
 19886  func rewriteValueARM64_OpDiv16(v *Value) bool {
 19887  	v_1 := v.Args[1]
 19888  	v_0 := v.Args[0]
 19889  	b := v.Block
 19890  	typ := &b.Func.Config.Types
 19891  	// match: (Div16 [false] x y)
 19892  	// result: (DIVW (SignExt16to32 x) (SignExt16to32 y))
 19893  	for {
 19894  		if auxIntToBool(v.AuxInt) != false {
 19895  			break
 19896  		}
 19897  		x := v_0
 19898  		y := v_1
 19899  		v.reset(OpARM64DIVW)
 19900  		v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 19901  		v0.AddArg(x)
 19902  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 19903  		v1.AddArg(y)
 19904  		v.AddArg2(v0, v1)
 19905  		return true
 19906  	}
 19907  	return false
 19908  }
 19909  func rewriteValueARM64_OpDiv16u(v *Value) bool {
 19910  	v_1 := v.Args[1]
 19911  	v_0 := v.Args[0]
 19912  	b := v.Block
 19913  	typ := &b.Func.Config.Types
 19914  	// match: (Div16u x y)
 19915  	// result: (UDIVW (ZeroExt16to32 x) (ZeroExt16to32 y))
 19916  	for {
 19917  		x := v_0
 19918  		y := v_1
 19919  		v.reset(OpARM64UDIVW)
 19920  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 19921  		v0.AddArg(x)
 19922  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 19923  		v1.AddArg(y)
 19924  		v.AddArg2(v0, v1)
 19925  		return true
 19926  	}
 19927  }
 19928  func rewriteValueARM64_OpDiv32(v *Value) bool {
 19929  	v_1 := v.Args[1]
 19930  	v_0 := v.Args[0]
 19931  	// match: (Div32 [false] x y)
 19932  	// result: (DIVW x y)
 19933  	for {
 19934  		if auxIntToBool(v.AuxInt) != false {
 19935  			break
 19936  		}
 19937  		x := v_0
 19938  		y := v_1
 19939  		v.reset(OpARM64DIVW)
 19940  		v.AddArg2(x, y)
 19941  		return true
 19942  	}
 19943  	return false
 19944  }
 19945  func rewriteValueARM64_OpDiv64(v *Value) bool {
 19946  	v_1 := v.Args[1]
 19947  	v_0 := v.Args[0]
 19948  	// match: (Div64 [false] x y)
 19949  	// result: (DIV x y)
 19950  	for {
 19951  		if auxIntToBool(v.AuxInt) != false {
 19952  			break
 19953  		}
 19954  		x := v_0
 19955  		y := v_1
 19956  		v.reset(OpARM64DIV)
 19957  		v.AddArg2(x, y)
 19958  		return true
 19959  	}
 19960  	return false
 19961  }
 19962  func rewriteValueARM64_OpDiv8(v *Value) bool {
 19963  	v_1 := v.Args[1]
 19964  	v_0 := v.Args[0]
 19965  	b := v.Block
 19966  	typ := &b.Func.Config.Types
 19967  	// match: (Div8 x y)
 19968  	// result: (DIVW (SignExt8to32 x) (SignExt8to32 y))
 19969  	for {
 19970  		x := v_0
 19971  		y := v_1
 19972  		v.reset(OpARM64DIVW)
 19973  		v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 19974  		v0.AddArg(x)
 19975  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 19976  		v1.AddArg(y)
 19977  		v.AddArg2(v0, v1)
 19978  		return true
 19979  	}
 19980  }
 19981  func rewriteValueARM64_OpDiv8u(v *Value) bool {
 19982  	v_1 := v.Args[1]
 19983  	v_0 := v.Args[0]
 19984  	b := v.Block
 19985  	typ := &b.Func.Config.Types
 19986  	// match: (Div8u x y)
 19987  	// result: (UDIVW (ZeroExt8to32 x) (ZeroExt8to32 y))
 19988  	for {
 19989  		x := v_0
 19990  		y := v_1
 19991  		v.reset(OpARM64UDIVW)
 19992  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 19993  		v0.AddArg(x)
 19994  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 19995  		v1.AddArg(y)
 19996  		v.AddArg2(v0, v1)
 19997  		return true
 19998  	}
 19999  }
 20000  func rewriteValueARM64_OpEq16(v *Value) bool {
 20001  	v_1 := v.Args[1]
 20002  	v_0 := v.Args[0]
 20003  	b := v.Block
 20004  	typ := &b.Func.Config.Types
 20005  	// match: (Eq16 x y)
 20006  	// result: (Equal (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
 20007  	for {
 20008  		x := v_0
 20009  		y := v_1
 20010  		v.reset(OpARM64Equal)
 20011  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20012  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 20013  		v1.AddArg(x)
 20014  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 20015  		v2.AddArg(y)
 20016  		v0.AddArg2(v1, v2)
 20017  		v.AddArg(v0)
 20018  		return true
 20019  	}
 20020  }
 20021  func rewriteValueARM64_OpEq32(v *Value) bool {
 20022  	v_1 := v.Args[1]
 20023  	v_0 := v.Args[0]
 20024  	b := v.Block
 20025  	// match: (Eq32 x y)
 20026  	// result: (Equal (CMPW x y))
 20027  	for {
 20028  		x := v_0
 20029  		y := v_1
 20030  		v.reset(OpARM64Equal)
 20031  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20032  		v0.AddArg2(x, y)
 20033  		v.AddArg(v0)
 20034  		return true
 20035  	}
 20036  }
 20037  func rewriteValueARM64_OpEq32F(v *Value) bool {
 20038  	v_1 := v.Args[1]
 20039  	v_0 := v.Args[0]
 20040  	b := v.Block
 20041  	// match: (Eq32F x y)
 20042  	// result: (Equal (FCMPS x y))
 20043  	for {
 20044  		x := v_0
 20045  		y := v_1
 20046  		v.reset(OpARM64Equal)
 20047  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
 20048  		v0.AddArg2(x, y)
 20049  		v.AddArg(v0)
 20050  		return true
 20051  	}
 20052  }
 20053  func rewriteValueARM64_OpEq64(v *Value) bool {
 20054  	v_1 := v.Args[1]
 20055  	v_0 := v.Args[0]
 20056  	b := v.Block
 20057  	// match: (Eq64 x y)
 20058  	// result: (Equal (CMP x y))
 20059  	for {
 20060  		x := v_0
 20061  		y := v_1
 20062  		v.reset(OpARM64Equal)
 20063  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 20064  		v0.AddArg2(x, y)
 20065  		v.AddArg(v0)
 20066  		return true
 20067  	}
 20068  }
 20069  func rewriteValueARM64_OpEq64F(v *Value) bool {
 20070  	v_1 := v.Args[1]
 20071  	v_0 := v.Args[0]
 20072  	b := v.Block
 20073  	// match: (Eq64F x y)
 20074  	// result: (Equal (FCMPD x y))
 20075  	for {
 20076  		x := v_0
 20077  		y := v_1
 20078  		v.reset(OpARM64Equal)
 20079  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
 20080  		v0.AddArg2(x, y)
 20081  		v.AddArg(v0)
 20082  		return true
 20083  	}
 20084  }
 20085  func rewriteValueARM64_OpEq8(v *Value) bool {
 20086  	v_1 := v.Args[1]
 20087  	v_0 := v.Args[0]
 20088  	b := v.Block
 20089  	typ := &b.Func.Config.Types
 20090  	// match: (Eq8 x y)
 20091  	// result: (Equal (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
 20092  	for {
 20093  		x := v_0
 20094  		y := v_1
 20095  		v.reset(OpARM64Equal)
 20096  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20097  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 20098  		v1.AddArg(x)
 20099  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 20100  		v2.AddArg(y)
 20101  		v0.AddArg2(v1, v2)
 20102  		v.AddArg(v0)
 20103  		return true
 20104  	}
 20105  }
 20106  func rewriteValueARM64_OpEqB(v *Value) bool {
 20107  	v_1 := v.Args[1]
 20108  	v_0 := v.Args[0]
 20109  	b := v.Block
 20110  	typ := &b.Func.Config.Types
 20111  	// match: (EqB x y)
 20112  	// result: (XOR (MOVDconst [1]) (XOR <typ.Bool> x y))
 20113  	for {
 20114  		x := v_0
 20115  		y := v_1
 20116  		v.reset(OpARM64XOR)
 20117  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20118  		v0.AuxInt = int64ToAuxInt(1)
 20119  		v1 := b.NewValue0(v.Pos, OpARM64XOR, typ.Bool)
 20120  		v1.AddArg2(x, y)
 20121  		v.AddArg2(v0, v1)
 20122  		return true
 20123  	}
 20124  }
 20125  func rewriteValueARM64_OpEqPtr(v *Value) bool {
 20126  	v_1 := v.Args[1]
 20127  	v_0 := v.Args[0]
 20128  	b := v.Block
 20129  	// match: (EqPtr x y)
 20130  	// result: (Equal (CMP x y))
 20131  	for {
 20132  		x := v_0
 20133  		y := v_1
 20134  		v.reset(OpARM64Equal)
 20135  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 20136  		v0.AddArg2(x, y)
 20137  		v.AddArg(v0)
 20138  		return true
 20139  	}
 20140  }
 20141  func rewriteValueARM64_OpFMA(v *Value) bool {
 20142  	v_2 := v.Args[2]
 20143  	v_1 := v.Args[1]
 20144  	v_0 := v.Args[0]
 20145  	// match: (FMA x y z)
 20146  	// result: (FMADDD z x y)
 20147  	for {
 20148  		x := v_0
 20149  		y := v_1
 20150  		z := v_2
 20151  		v.reset(OpARM64FMADDD)
 20152  		v.AddArg3(z, x, y)
 20153  		return true
 20154  	}
 20155  }
 20156  func rewriteValueARM64_OpHmul32(v *Value) bool {
 20157  	v_1 := v.Args[1]
 20158  	v_0 := v.Args[0]
 20159  	b := v.Block
 20160  	typ := &b.Func.Config.Types
 20161  	// match: (Hmul32 x y)
 20162  	// result: (SRAconst (MULL <typ.Int64> x y) [32])
 20163  	for {
 20164  		x := v_0
 20165  		y := v_1
 20166  		v.reset(OpARM64SRAconst)
 20167  		v.AuxInt = int64ToAuxInt(32)
 20168  		v0 := b.NewValue0(v.Pos, OpARM64MULL, typ.Int64)
 20169  		v0.AddArg2(x, y)
 20170  		v.AddArg(v0)
 20171  		return true
 20172  	}
 20173  }
 20174  func rewriteValueARM64_OpHmul32u(v *Value) bool {
 20175  	v_1 := v.Args[1]
 20176  	v_0 := v.Args[0]
 20177  	b := v.Block
 20178  	typ := &b.Func.Config.Types
 20179  	// match: (Hmul32u x y)
 20180  	// result: (SRAconst (UMULL <typ.UInt64> x y) [32])
 20181  	for {
 20182  		x := v_0
 20183  		y := v_1
 20184  		v.reset(OpARM64SRAconst)
 20185  		v.AuxInt = int64ToAuxInt(32)
 20186  		v0 := b.NewValue0(v.Pos, OpARM64UMULL, typ.UInt64)
 20187  		v0.AddArg2(x, y)
 20188  		v.AddArg(v0)
 20189  		return true
 20190  	}
 20191  }
 20192  func rewriteValueARM64_OpIsInBounds(v *Value) bool {
 20193  	v_1 := v.Args[1]
 20194  	v_0 := v.Args[0]
 20195  	b := v.Block
 20196  	// match: (IsInBounds idx len)
 20197  	// result: (LessThanU (CMP idx len))
 20198  	for {
 20199  		idx := v_0
 20200  		len := v_1
 20201  		v.reset(OpARM64LessThanU)
 20202  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 20203  		v0.AddArg2(idx, len)
 20204  		v.AddArg(v0)
 20205  		return true
 20206  	}
 20207  }
 20208  func rewriteValueARM64_OpIsNonNil(v *Value) bool {
 20209  	v_0 := v.Args[0]
 20210  	b := v.Block
 20211  	// match: (IsNonNil ptr)
 20212  	// result: (NotEqual (CMPconst [0] ptr))
 20213  	for {
 20214  		ptr := v_0
 20215  		v.reset(OpARM64NotEqual)
 20216  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20217  		v0.AuxInt = int64ToAuxInt(0)
 20218  		v0.AddArg(ptr)
 20219  		v.AddArg(v0)
 20220  		return true
 20221  	}
 20222  }
 20223  func rewriteValueARM64_OpIsSliceInBounds(v *Value) bool {
 20224  	v_1 := v.Args[1]
 20225  	v_0 := v.Args[0]
 20226  	b := v.Block
 20227  	// match: (IsSliceInBounds idx len)
 20228  	// result: (LessEqualU (CMP idx len))
 20229  	for {
 20230  		idx := v_0
 20231  		len := v_1
 20232  		v.reset(OpARM64LessEqualU)
 20233  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 20234  		v0.AddArg2(idx, len)
 20235  		v.AddArg(v0)
 20236  		return true
 20237  	}
 20238  }
 20239  func rewriteValueARM64_OpLeq16(v *Value) bool {
 20240  	v_1 := v.Args[1]
 20241  	v_0 := v.Args[0]
 20242  	b := v.Block
 20243  	typ := &b.Func.Config.Types
 20244  	// match: (Leq16 x y)
 20245  	// result: (LessEqual (CMPW (SignExt16to32 x) (SignExt16to32 y)))
 20246  	for {
 20247  		x := v_0
 20248  		y := v_1
 20249  		v.reset(OpARM64LessEqual)
 20250  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20251  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 20252  		v1.AddArg(x)
 20253  		v2 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 20254  		v2.AddArg(y)
 20255  		v0.AddArg2(v1, v2)
 20256  		v.AddArg(v0)
 20257  		return true
 20258  	}
 20259  }
 20260  func rewriteValueARM64_OpLeq16U(v *Value) bool {
 20261  	v_1 := v.Args[1]
 20262  	v_0 := v.Args[0]
 20263  	b := v.Block
 20264  	typ := &b.Func.Config.Types
 20265  	// match: (Leq16U x zero:(MOVDconst [0]))
 20266  	// result: (Eq16 x zero)
 20267  	for {
 20268  		x := v_0
 20269  		zero := v_1
 20270  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 20271  			break
 20272  		}
 20273  		v.reset(OpEq16)
 20274  		v.AddArg2(x, zero)
 20275  		return true
 20276  	}
 20277  	// match: (Leq16U (MOVDconst [1]) x)
 20278  	// result: (Neq16 (MOVDconst [0]) x)
 20279  	for {
 20280  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
 20281  			break
 20282  		}
 20283  		x := v_1
 20284  		v.reset(OpNeq16)
 20285  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20286  		v0.AuxInt = int64ToAuxInt(0)
 20287  		v.AddArg2(v0, x)
 20288  		return true
 20289  	}
 20290  	// match: (Leq16U x y)
 20291  	// result: (LessEqualU (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
 20292  	for {
 20293  		x := v_0
 20294  		y := v_1
 20295  		v.reset(OpARM64LessEqualU)
 20296  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20297  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 20298  		v1.AddArg(x)
 20299  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 20300  		v2.AddArg(y)
 20301  		v0.AddArg2(v1, v2)
 20302  		v.AddArg(v0)
 20303  		return true
 20304  	}
 20305  }
 20306  func rewriteValueARM64_OpLeq32(v *Value) bool {
 20307  	v_1 := v.Args[1]
 20308  	v_0 := v.Args[0]
 20309  	b := v.Block
 20310  	// match: (Leq32 x y)
 20311  	// result: (LessEqual (CMPW x y))
 20312  	for {
 20313  		x := v_0
 20314  		y := v_1
 20315  		v.reset(OpARM64LessEqual)
 20316  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20317  		v0.AddArg2(x, y)
 20318  		v.AddArg(v0)
 20319  		return true
 20320  	}
 20321  }
 20322  func rewriteValueARM64_OpLeq32F(v *Value) bool {
 20323  	v_1 := v.Args[1]
 20324  	v_0 := v.Args[0]
 20325  	b := v.Block
 20326  	// match: (Leq32F x y)
 20327  	// result: (LessEqualF (FCMPS x y))
 20328  	for {
 20329  		x := v_0
 20330  		y := v_1
 20331  		v.reset(OpARM64LessEqualF)
 20332  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
 20333  		v0.AddArg2(x, y)
 20334  		v.AddArg(v0)
 20335  		return true
 20336  	}
 20337  }
 20338  func rewriteValueARM64_OpLeq32U(v *Value) bool {
 20339  	v_1 := v.Args[1]
 20340  	v_0 := v.Args[0]
 20341  	b := v.Block
 20342  	typ := &b.Func.Config.Types
 20343  	// match: (Leq32U x zero:(MOVDconst [0]))
 20344  	// result: (Eq32 x zero)
 20345  	for {
 20346  		x := v_0
 20347  		zero := v_1
 20348  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 20349  			break
 20350  		}
 20351  		v.reset(OpEq32)
 20352  		v.AddArg2(x, zero)
 20353  		return true
 20354  	}
 20355  	// match: (Leq32U (MOVDconst [1]) x)
 20356  	// result: (Neq32 (MOVDconst [0]) x)
 20357  	for {
 20358  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
 20359  			break
 20360  		}
 20361  		x := v_1
 20362  		v.reset(OpNeq32)
 20363  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20364  		v0.AuxInt = int64ToAuxInt(0)
 20365  		v.AddArg2(v0, x)
 20366  		return true
 20367  	}
 20368  	// match: (Leq32U x y)
 20369  	// result: (LessEqualU (CMPW x y))
 20370  	for {
 20371  		x := v_0
 20372  		y := v_1
 20373  		v.reset(OpARM64LessEqualU)
 20374  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20375  		v0.AddArg2(x, y)
 20376  		v.AddArg(v0)
 20377  		return true
 20378  	}
 20379  }
 20380  func rewriteValueARM64_OpLeq64(v *Value) bool {
 20381  	v_1 := v.Args[1]
 20382  	v_0 := v.Args[0]
 20383  	b := v.Block
 20384  	// match: (Leq64 x y)
 20385  	// result: (LessEqual (CMP x y))
 20386  	for {
 20387  		x := v_0
 20388  		y := v_1
 20389  		v.reset(OpARM64LessEqual)
 20390  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 20391  		v0.AddArg2(x, y)
 20392  		v.AddArg(v0)
 20393  		return true
 20394  	}
 20395  }
 20396  func rewriteValueARM64_OpLeq64F(v *Value) bool {
 20397  	v_1 := v.Args[1]
 20398  	v_0 := v.Args[0]
 20399  	b := v.Block
 20400  	// match: (Leq64F x y)
 20401  	// result: (LessEqualF (FCMPD x y))
 20402  	for {
 20403  		x := v_0
 20404  		y := v_1
 20405  		v.reset(OpARM64LessEqualF)
 20406  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
 20407  		v0.AddArg2(x, y)
 20408  		v.AddArg(v0)
 20409  		return true
 20410  	}
 20411  }
 20412  func rewriteValueARM64_OpLeq64U(v *Value) bool {
 20413  	v_1 := v.Args[1]
 20414  	v_0 := v.Args[0]
 20415  	b := v.Block
 20416  	typ := &b.Func.Config.Types
 20417  	// match: (Leq64U x zero:(MOVDconst [0]))
 20418  	// result: (Eq64 x zero)
 20419  	for {
 20420  		x := v_0
 20421  		zero := v_1
 20422  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 20423  			break
 20424  		}
 20425  		v.reset(OpEq64)
 20426  		v.AddArg2(x, zero)
 20427  		return true
 20428  	}
 20429  	// match: (Leq64U (MOVDconst [1]) x)
 20430  	// result: (Neq64 (MOVDconst [0]) x)
 20431  	for {
 20432  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
 20433  			break
 20434  		}
 20435  		x := v_1
 20436  		v.reset(OpNeq64)
 20437  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20438  		v0.AuxInt = int64ToAuxInt(0)
 20439  		v.AddArg2(v0, x)
 20440  		return true
 20441  	}
 20442  	// match: (Leq64U x y)
 20443  	// result: (LessEqualU (CMP x y))
 20444  	for {
 20445  		x := v_0
 20446  		y := v_1
 20447  		v.reset(OpARM64LessEqualU)
 20448  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 20449  		v0.AddArg2(x, y)
 20450  		v.AddArg(v0)
 20451  		return true
 20452  	}
 20453  }
 20454  func rewriteValueARM64_OpLeq8(v *Value) bool {
 20455  	v_1 := v.Args[1]
 20456  	v_0 := v.Args[0]
 20457  	b := v.Block
 20458  	typ := &b.Func.Config.Types
 20459  	// match: (Leq8 x y)
 20460  	// result: (LessEqual (CMPW (SignExt8to32 x) (SignExt8to32 y)))
 20461  	for {
 20462  		x := v_0
 20463  		y := v_1
 20464  		v.reset(OpARM64LessEqual)
 20465  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20466  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 20467  		v1.AddArg(x)
 20468  		v2 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 20469  		v2.AddArg(y)
 20470  		v0.AddArg2(v1, v2)
 20471  		v.AddArg(v0)
 20472  		return true
 20473  	}
 20474  }
 20475  func rewriteValueARM64_OpLeq8U(v *Value) bool {
 20476  	v_1 := v.Args[1]
 20477  	v_0 := v.Args[0]
 20478  	b := v.Block
 20479  	typ := &b.Func.Config.Types
 20480  	// match: (Leq8U x zero:(MOVDconst [0]))
 20481  	// result: (Eq8 x zero)
 20482  	for {
 20483  		x := v_0
 20484  		zero := v_1
 20485  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 20486  			break
 20487  		}
 20488  		v.reset(OpEq8)
 20489  		v.AddArg2(x, zero)
 20490  		return true
 20491  	}
 20492  	// match: (Leq8U (MOVDconst [1]) x)
 20493  	// result: (Neq8 (MOVDconst [0]) x)
 20494  	for {
 20495  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
 20496  			break
 20497  		}
 20498  		x := v_1
 20499  		v.reset(OpNeq8)
 20500  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20501  		v0.AuxInt = int64ToAuxInt(0)
 20502  		v.AddArg2(v0, x)
 20503  		return true
 20504  	}
 20505  	// match: (Leq8U x y)
 20506  	// result: (LessEqualU (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
 20507  	for {
 20508  		x := v_0
 20509  		y := v_1
 20510  		v.reset(OpARM64LessEqualU)
 20511  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20512  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 20513  		v1.AddArg(x)
 20514  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 20515  		v2.AddArg(y)
 20516  		v0.AddArg2(v1, v2)
 20517  		v.AddArg(v0)
 20518  		return true
 20519  	}
 20520  }
 20521  func rewriteValueARM64_OpLess16(v *Value) bool {
 20522  	v_1 := v.Args[1]
 20523  	v_0 := v.Args[0]
 20524  	b := v.Block
 20525  	typ := &b.Func.Config.Types
 20526  	// match: (Less16 x y)
 20527  	// result: (LessThan (CMPW (SignExt16to32 x) (SignExt16to32 y)))
 20528  	for {
 20529  		x := v_0
 20530  		y := v_1
 20531  		v.reset(OpARM64LessThan)
 20532  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20533  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 20534  		v1.AddArg(x)
 20535  		v2 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 20536  		v2.AddArg(y)
 20537  		v0.AddArg2(v1, v2)
 20538  		v.AddArg(v0)
 20539  		return true
 20540  	}
 20541  }
 20542  func rewriteValueARM64_OpLess16U(v *Value) bool {
 20543  	v_1 := v.Args[1]
 20544  	v_0 := v.Args[0]
 20545  	b := v.Block
 20546  	typ := &b.Func.Config.Types
 20547  	// match: (Less16U zero:(MOVDconst [0]) x)
 20548  	// result: (Neq16 zero x)
 20549  	for {
 20550  		zero := v_0
 20551  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 20552  			break
 20553  		}
 20554  		x := v_1
 20555  		v.reset(OpNeq16)
 20556  		v.AddArg2(zero, x)
 20557  		return true
 20558  	}
 20559  	// match: (Less16U x (MOVDconst [1]))
 20560  	// result: (Eq16 x (MOVDconst [0]))
 20561  	for {
 20562  		x := v_0
 20563  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 20564  			break
 20565  		}
 20566  		v.reset(OpEq16)
 20567  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20568  		v0.AuxInt = int64ToAuxInt(0)
 20569  		v.AddArg2(x, v0)
 20570  		return true
 20571  	}
 20572  	// match: (Less16U x y)
 20573  	// result: (LessThanU (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
 20574  	for {
 20575  		x := v_0
 20576  		y := v_1
 20577  		v.reset(OpARM64LessThanU)
 20578  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20579  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 20580  		v1.AddArg(x)
 20581  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 20582  		v2.AddArg(y)
 20583  		v0.AddArg2(v1, v2)
 20584  		v.AddArg(v0)
 20585  		return true
 20586  	}
 20587  }
 20588  func rewriteValueARM64_OpLess32(v *Value) bool {
 20589  	v_1 := v.Args[1]
 20590  	v_0 := v.Args[0]
 20591  	b := v.Block
 20592  	// match: (Less32 x y)
 20593  	// result: (LessThan (CMPW x y))
 20594  	for {
 20595  		x := v_0
 20596  		y := v_1
 20597  		v.reset(OpARM64LessThan)
 20598  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20599  		v0.AddArg2(x, y)
 20600  		v.AddArg(v0)
 20601  		return true
 20602  	}
 20603  }
 20604  func rewriteValueARM64_OpLess32F(v *Value) bool {
 20605  	v_1 := v.Args[1]
 20606  	v_0 := v.Args[0]
 20607  	b := v.Block
 20608  	// match: (Less32F x y)
 20609  	// result: (LessThanF (FCMPS x y))
 20610  	for {
 20611  		x := v_0
 20612  		y := v_1
 20613  		v.reset(OpARM64LessThanF)
 20614  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
 20615  		v0.AddArg2(x, y)
 20616  		v.AddArg(v0)
 20617  		return true
 20618  	}
 20619  }
 20620  func rewriteValueARM64_OpLess32U(v *Value) bool {
 20621  	v_1 := v.Args[1]
 20622  	v_0 := v.Args[0]
 20623  	b := v.Block
 20624  	typ := &b.Func.Config.Types
 20625  	// match: (Less32U zero:(MOVDconst [0]) x)
 20626  	// result: (Neq32 zero x)
 20627  	for {
 20628  		zero := v_0
 20629  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 20630  			break
 20631  		}
 20632  		x := v_1
 20633  		v.reset(OpNeq32)
 20634  		v.AddArg2(zero, x)
 20635  		return true
 20636  	}
 20637  	// match: (Less32U x (MOVDconst [1]))
 20638  	// result: (Eq32 x (MOVDconst [0]))
 20639  	for {
 20640  		x := v_0
 20641  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 20642  			break
 20643  		}
 20644  		v.reset(OpEq32)
 20645  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20646  		v0.AuxInt = int64ToAuxInt(0)
 20647  		v.AddArg2(x, v0)
 20648  		return true
 20649  	}
 20650  	// match: (Less32U x y)
 20651  	// result: (LessThanU (CMPW x y))
 20652  	for {
 20653  		x := v_0
 20654  		y := v_1
 20655  		v.reset(OpARM64LessThanU)
 20656  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20657  		v0.AddArg2(x, y)
 20658  		v.AddArg(v0)
 20659  		return true
 20660  	}
 20661  }
 20662  func rewriteValueARM64_OpLess64(v *Value) bool {
 20663  	v_1 := v.Args[1]
 20664  	v_0 := v.Args[0]
 20665  	b := v.Block
 20666  	// match: (Less64 x y)
 20667  	// result: (LessThan (CMP x y))
 20668  	for {
 20669  		x := v_0
 20670  		y := v_1
 20671  		v.reset(OpARM64LessThan)
 20672  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 20673  		v0.AddArg2(x, y)
 20674  		v.AddArg(v0)
 20675  		return true
 20676  	}
 20677  }
 20678  func rewriteValueARM64_OpLess64F(v *Value) bool {
 20679  	v_1 := v.Args[1]
 20680  	v_0 := v.Args[0]
 20681  	b := v.Block
 20682  	// match: (Less64F x y)
 20683  	// result: (LessThanF (FCMPD x y))
 20684  	for {
 20685  		x := v_0
 20686  		y := v_1
 20687  		v.reset(OpARM64LessThanF)
 20688  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
 20689  		v0.AddArg2(x, y)
 20690  		v.AddArg(v0)
 20691  		return true
 20692  	}
 20693  }
 20694  func rewriteValueARM64_OpLess64U(v *Value) bool {
 20695  	v_1 := v.Args[1]
 20696  	v_0 := v.Args[0]
 20697  	b := v.Block
 20698  	typ := &b.Func.Config.Types
 20699  	// match: (Less64U zero:(MOVDconst [0]) x)
 20700  	// result: (Neq64 zero x)
 20701  	for {
 20702  		zero := v_0
 20703  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 20704  			break
 20705  		}
 20706  		x := v_1
 20707  		v.reset(OpNeq64)
 20708  		v.AddArg2(zero, x)
 20709  		return true
 20710  	}
 20711  	// match: (Less64U x (MOVDconst [1]))
 20712  	// result: (Eq64 x (MOVDconst [0]))
 20713  	for {
 20714  		x := v_0
 20715  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 20716  			break
 20717  		}
 20718  		v.reset(OpEq64)
 20719  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20720  		v0.AuxInt = int64ToAuxInt(0)
 20721  		v.AddArg2(x, v0)
 20722  		return true
 20723  	}
 20724  	// match: (Less64U x y)
 20725  	// result: (LessThanU (CMP x y))
 20726  	for {
 20727  		x := v_0
 20728  		y := v_1
 20729  		v.reset(OpARM64LessThanU)
 20730  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 20731  		v0.AddArg2(x, y)
 20732  		v.AddArg(v0)
 20733  		return true
 20734  	}
 20735  }
 20736  func rewriteValueARM64_OpLess8(v *Value) bool {
 20737  	v_1 := v.Args[1]
 20738  	v_0 := v.Args[0]
 20739  	b := v.Block
 20740  	typ := &b.Func.Config.Types
 20741  	// match: (Less8 x y)
 20742  	// result: (LessThan (CMPW (SignExt8to32 x) (SignExt8to32 y)))
 20743  	for {
 20744  		x := v_0
 20745  		y := v_1
 20746  		v.reset(OpARM64LessThan)
 20747  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20748  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 20749  		v1.AddArg(x)
 20750  		v2 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 20751  		v2.AddArg(y)
 20752  		v0.AddArg2(v1, v2)
 20753  		v.AddArg(v0)
 20754  		return true
 20755  	}
 20756  }
 20757  func rewriteValueARM64_OpLess8U(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: (Less8U zero:(MOVDconst [0]) x)
 20763  	// result: (Neq8 zero x)
 20764  	for {
 20765  		zero := v_0
 20766  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 20767  			break
 20768  		}
 20769  		x := v_1
 20770  		v.reset(OpNeq8)
 20771  		v.AddArg2(zero, x)
 20772  		return true
 20773  	}
 20774  	// match: (Less8U x (MOVDconst [1]))
 20775  	// result: (Eq8 x (MOVDconst [0]))
 20776  	for {
 20777  		x := v_0
 20778  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 20779  			break
 20780  		}
 20781  		v.reset(OpEq8)
 20782  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20783  		v0.AuxInt = int64ToAuxInt(0)
 20784  		v.AddArg2(x, v0)
 20785  		return true
 20786  	}
 20787  	// match: (Less8U x y)
 20788  	// result: (LessThanU (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
 20789  	for {
 20790  		x := v_0
 20791  		y := v_1
 20792  		v.reset(OpARM64LessThanU)
 20793  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20794  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 20795  		v1.AddArg(x)
 20796  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 20797  		v2.AddArg(y)
 20798  		v0.AddArg2(v1, v2)
 20799  		v.AddArg(v0)
 20800  		return true
 20801  	}
 20802  }
 20803  func rewriteValueARM64_OpLoad(v *Value) bool {
 20804  	v_1 := v.Args[1]
 20805  	v_0 := v.Args[0]
 20806  	// match: (Load <t> ptr mem)
 20807  	// cond: t.IsBoolean()
 20808  	// result: (MOVBUload ptr mem)
 20809  	for {
 20810  		t := v.Type
 20811  		ptr := v_0
 20812  		mem := v_1
 20813  		if !(t.IsBoolean()) {
 20814  			break
 20815  		}
 20816  		v.reset(OpARM64MOVBUload)
 20817  		v.AddArg2(ptr, mem)
 20818  		return true
 20819  	}
 20820  	// match: (Load <t> ptr mem)
 20821  	// cond: (is8BitInt(t) && t.IsSigned())
 20822  	// result: (MOVBload ptr mem)
 20823  	for {
 20824  		t := v.Type
 20825  		ptr := v_0
 20826  		mem := v_1
 20827  		if !(is8BitInt(t) && t.IsSigned()) {
 20828  			break
 20829  		}
 20830  		v.reset(OpARM64MOVBload)
 20831  		v.AddArg2(ptr, mem)
 20832  		return true
 20833  	}
 20834  	// match: (Load <t> ptr mem)
 20835  	// cond: (is8BitInt(t) && !t.IsSigned())
 20836  	// result: (MOVBUload ptr mem)
 20837  	for {
 20838  		t := v.Type
 20839  		ptr := v_0
 20840  		mem := v_1
 20841  		if !(is8BitInt(t) && !t.IsSigned()) {
 20842  			break
 20843  		}
 20844  		v.reset(OpARM64MOVBUload)
 20845  		v.AddArg2(ptr, mem)
 20846  		return true
 20847  	}
 20848  	// match: (Load <t> ptr mem)
 20849  	// cond: (is16BitInt(t) && t.IsSigned())
 20850  	// result: (MOVHload ptr mem)
 20851  	for {
 20852  		t := v.Type
 20853  		ptr := v_0
 20854  		mem := v_1
 20855  		if !(is16BitInt(t) && t.IsSigned()) {
 20856  			break
 20857  		}
 20858  		v.reset(OpARM64MOVHload)
 20859  		v.AddArg2(ptr, mem)
 20860  		return true
 20861  	}
 20862  	// match: (Load <t> ptr mem)
 20863  	// cond: (is16BitInt(t) && !t.IsSigned())
 20864  	// result: (MOVHUload ptr mem)
 20865  	for {
 20866  		t := v.Type
 20867  		ptr := v_0
 20868  		mem := v_1
 20869  		if !(is16BitInt(t) && !t.IsSigned()) {
 20870  			break
 20871  		}
 20872  		v.reset(OpARM64MOVHUload)
 20873  		v.AddArg2(ptr, mem)
 20874  		return true
 20875  	}
 20876  	// match: (Load <t> ptr mem)
 20877  	// cond: (is32BitInt(t) && t.IsSigned())
 20878  	// result: (MOVWload ptr mem)
 20879  	for {
 20880  		t := v.Type
 20881  		ptr := v_0
 20882  		mem := v_1
 20883  		if !(is32BitInt(t) && t.IsSigned()) {
 20884  			break
 20885  		}
 20886  		v.reset(OpARM64MOVWload)
 20887  		v.AddArg2(ptr, mem)
 20888  		return true
 20889  	}
 20890  	// match: (Load <t> ptr mem)
 20891  	// cond: (is32BitInt(t) && !t.IsSigned())
 20892  	// result: (MOVWUload ptr mem)
 20893  	for {
 20894  		t := v.Type
 20895  		ptr := v_0
 20896  		mem := v_1
 20897  		if !(is32BitInt(t) && !t.IsSigned()) {
 20898  			break
 20899  		}
 20900  		v.reset(OpARM64MOVWUload)
 20901  		v.AddArg2(ptr, mem)
 20902  		return true
 20903  	}
 20904  	// match: (Load <t> ptr mem)
 20905  	// cond: (is64BitInt(t) || isPtr(t))
 20906  	// result: (MOVDload ptr mem)
 20907  	for {
 20908  		t := v.Type
 20909  		ptr := v_0
 20910  		mem := v_1
 20911  		if !(is64BitInt(t) || isPtr(t)) {
 20912  			break
 20913  		}
 20914  		v.reset(OpARM64MOVDload)
 20915  		v.AddArg2(ptr, mem)
 20916  		return true
 20917  	}
 20918  	// match: (Load <t> ptr mem)
 20919  	// cond: is32BitFloat(t)
 20920  	// result: (FMOVSload ptr mem)
 20921  	for {
 20922  		t := v.Type
 20923  		ptr := v_0
 20924  		mem := v_1
 20925  		if !(is32BitFloat(t)) {
 20926  			break
 20927  		}
 20928  		v.reset(OpARM64FMOVSload)
 20929  		v.AddArg2(ptr, mem)
 20930  		return true
 20931  	}
 20932  	// match: (Load <t> ptr mem)
 20933  	// cond: is64BitFloat(t)
 20934  	// result: (FMOVDload ptr mem)
 20935  	for {
 20936  		t := v.Type
 20937  		ptr := v_0
 20938  		mem := v_1
 20939  		if !(is64BitFloat(t)) {
 20940  			break
 20941  		}
 20942  		v.reset(OpARM64FMOVDload)
 20943  		v.AddArg2(ptr, mem)
 20944  		return true
 20945  	}
 20946  	// match: (Load <t> ptr mem)
 20947  	// cond: t.Size() == 16
 20948  	// result: (FMOVQload ptr mem)
 20949  	for {
 20950  		t := v.Type
 20951  		ptr := v_0
 20952  		mem := v_1
 20953  		if !(t.Size() == 16) {
 20954  			break
 20955  		}
 20956  		v.reset(OpARM64FMOVQload)
 20957  		v.AddArg2(ptr, mem)
 20958  		return true
 20959  	}
 20960  	return false
 20961  }
 20962  func rewriteValueARM64_OpLocalAddr(v *Value) bool {
 20963  	v_1 := v.Args[1]
 20964  	v_0 := v.Args[0]
 20965  	b := v.Block
 20966  	typ := &b.Func.Config.Types
 20967  	// match: (LocalAddr <t> {sym} base mem)
 20968  	// cond: t.Elem().HasPointers()
 20969  	// result: (MOVDaddr {sym} (SPanchored base mem))
 20970  	for {
 20971  		t := v.Type
 20972  		sym := auxToSym(v.Aux)
 20973  		base := v_0
 20974  		mem := v_1
 20975  		if !(t.Elem().HasPointers()) {
 20976  			break
 20977  		}
 20978  		v.reset(OpARM64MOVDaddr)
 20979  		v.Aux = symToAux(sym)
 20980  		v0 := b.NewValue0(v.Pos, OpSPanchored, typ.Uintptr)
 20981  		v0.AddArg2(base, mem)
 20982  		v.AddArg(v0)
 20983  		return true
 20984  	}
 20985  	// match: (LocalAddr <t> {sym} base _)
 20986  	// cond: !t.Elem().HasPointers()
 20987  	// result: (MOVDaddr {sym} base)
 20988  	for {
 20989  		t := v.Type
 20990  		sym := auxToSym(v.Aux)
 20991  		base := v_0
 20992  		if !(!t.Elem().HasPointers()) {
 20993  			break
 20994  		}
 20995  		v.reset(OpARM64MOVDaddr)
 20996  		v.Aux = symToAux(sym)
 20997  		v.AddArg(base)
 20998  		return true
 20999  	}
 21000  	return false
 21001  }
 21002  func rewriteValueARM64_OpLsh64x16(v *Value) bool {
 21003  	v_1 := v.Args[1]
 21004  	v_0 := v.Args[0]
 21005  	b := v.Block
 21006  	typ := &b.Func.Config.Types
 21007  	// match: (Lsh64x16 <t> x y)
 21008  	// cond: shiftIsBounded(v)
 21009  	// result: (SLL <t> x y)
 21010  	for {
 21011  		t := v.Type
 21012  		x := v_0
 21013  		y := v_1
 21014  		if !(shiftIsBounded(v)) {
 21015  			break
 21016  		}
 21017  		v.reset(OpARM64SLL)
 21018  		v.Type = t
 21019  		v.AddArg2(x, y)
 21020  		return true
 21021  	}
 21022  	// match: (Lsh64x16 <t> [bounded] x y)
 21023  	// cond: !shiftIsBounded(v)
 21024  	// result: (Lsh64x32 <t> [bounded] x (ZeroExt16to32 y))
 21025  	for {
 21026  		t := v.Type
 21027  		bounded := auxIntToBool(v.AuxInt)
 21028  		x := v_0
 21029  		y := v_1
 21030  		if !(!shiftIsBounded(v)) {
 21031  			break
 21032  		}
 21033  		v.reset(OpLsh64x32)
 21034  		v.Type = t
 21035  		v.AuxInt = boolToAuxInt(bounded)
 21036  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 21037  		v0.AddArg(y)
 21038  		v.AddArg2(x, v0)
 21039  		return true
 21040  	}
 21041  	return false
 21042  }
 21043  func rewriteValueARM64_OpLsh64x32(v *Value) bool {
 21044  	v_1 := v.Args[1]
 21045  	v_0 := v.Args[0]
 21046  	b := v.Block
 21047  	// match: (Lsh64x32 <t> x y)
 21048  	// cond: shiftIsBounded(v)
 21049  	// result: (SLL <t> x y)
 21050  	for {
 21051  		t := v.Type
 21052  		x := v_0
 21053  		y := v_1
 21054  		if !(shiftIsBounded(v)) {
 21055  			break
 21056  		}
 21057  		v.reset(OpARM64SLL)
 21058  		v.Type = t
 21059  		v.AddArg2(x, y)
 21060  		return true
 21061  	}
 21062  	// match: (Lsh64x32 <t> x y)
 21063  	// cond: !shiftIsBounded(v)
 21064  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPWconst [64] y))
 21065  	for {
 21066  		t := v.Type
 21067  		x := v_0
 21068  		y := v_1
 21069  		if !(!shiftIsBounded(v)) {
 21070  			break
 21071  		}
 21072  		v.reset(OpARM64CSEL)
 21073  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21074  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 21075  		v0.AddArg2(x, y)
 21076  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 21077  		v1.AuxInt = int64ToAuxInt(0)
 21078  		v2 := b.NewValue0(v.Pos, OpARM64CMPWconst, types.TypeFlags)
 21079  		v2.AuxInt = int32ToAuxInt(64)
 21080  		v2.AddArg(y)
 21081  		v.AddArg3(v0, v1, v2)
 21082  		return true
 21083  	}
 21084  	return false
 21085  }
 21086  func rewriteValueARM64_OpLsh64x64(v *Value) bool {
 21087  	v_1 := v.Args[1]
 21088  	v_0 := v.Args[0]
 21089  	b := v.Block
 21090  	// match: (Lsh64x64 <t> x y)
 21091  	// cond: shiftIsBounded(v)
 21092  	// result: (SLL <t> x y)
 21093  	for {
 21094  		t := v.Type
 21095  		x := v_0
 21096  		y := v_1
 21097  		if !(shiftIsBounded(v)) {
 21098  			break
 21099  		}
 21100  		v.reset(OpARM64SLL)
 21101  		v.Type = t
 21102  		v.AddArg2(x, y)
 21103  		return true
 21104  	}
 21105  	// match: (Lsh64x64 <t> x y)
 21106  	// cond: !shiftIsBounded(v)
 21107  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] y))
 21108  	for {
 21109  		t := v.Type
 21110  		x := v_0
 21111  		y := v_1
 21112  		if !(!shiftIsBounded(v)) {
 21113  			break
 21114  		}
 21115  		v.reset(OpARM64CSEL)
 21116  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21117  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 21118  		v0.AddArg2(x, y)
 21119  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 21120  		v1.AuxInt = int64ToAuxInt(0)
 21121  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21122  		v2.AuxInt = int64ToAuxInt(64)
 21123  		v2.AddArg(y)
 21124  		v.AddArg3(v0, v1, v2)
 21125  		return true
 21126  	}
 21127  	return false
 21128  }
 21129  func rewriteValueARM64_OpLsh64x8(v *Value) bool {
 21130  	v_1 := v.Args[1]
 21131  	v_0 := v.Args[0]
 21132  	b := v.Block
 21133  	typ := &b.Func.Config.Types
 21134  	// match: (Lsh64x8 <t> x y)
 21135  	// cond: shiftIsBounded(v)
 21136  	// result: (SLL <t> x y)
 21137  	for {
 21138  		t := v.Type
 21139  		x := v_0
 21140  		y := v_1
 21141  		if !(shiftIsBounded(v)) {
 21142  			break
 21143  		}
 21144  		v.reset(OpARM64SLL)
 21145  		v.Type = t
 21146  		v.AddArg2(x, y)
 21147  		return true
 21148  	}
 21149  	// match: (Lsh64x8 <t> [bounded] x y)
 21150  	// cond: !shiftIsBounded(v)
 21151  	// result: (Lsh64x32 <t> [bounded] x (ZeroExt8to32 y))
 21152  	for {
 21153  		t := v.Type
 21154  		bounded := auxIntToBool(v.AuxInt)
 21155  		x := v_0
 21156  		y := v_1
 21157  		if !(!shiftIsBounded(v)) {
 21158  			break
 21159  		}
 21160  		v.reset(OpLsh64x32)
 21161  		v.Type = t
 21162  		v.AuxInt = boolToAuxInt(bounded)
 21163  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 21164  		v0.AddArg(y)
 21165  		v.AddArg2(x, v0)
 21166  		return true
 21167  	}
 21168  	return false
 21169  }
 21170  func rewriteValueARM64_OpMod16(v *Value) bool {
 21171  	v_1 := v.Args[1]
 21172  	v_0 := v.Args[0]
 21173  	b := v.Block
 21174  	typ := &b.Func.Config.Types
 21175  	// match: (Mod16 x y)
 21176  	// result: (MODW (SignExt16to32 x) (SignExt16to32 y))
 21177  	for {
 21178  		x := v_0
 21179  		y := v_1
 21180  		v.reset(OpARM64MODW)
 21181  		v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 21182  		v0.AddArg(x)
 21183  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 21184  		v1.AddArg(y)
 21185  		v.AddArg2(v0, v1)
 21186  		return true
 21187  	}
 21188  }
 21189  func rewriteValueARM64_OpMod16u(v *Value) bool {
 21190  	v_1 := v.Args[1]
 21191  	v_0 := v.Args[0]
 21192  	b := v.Block
 21193  	typ := &b.Func.Config.Types
 21194  	// match: (Mod16u x y)
 21195  	// result: (UMODW (ZeroExt16to32 x) (ZeroExt16to32 y))
 21196  	for {
 21197  		x := v_0
 21198  		y := v_1
 21199  		v.reset(OpARM64UMODW)
 21200  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 21201  		v0.AddArg(x)
 21202  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 21203  		v1.AddArg(y)
 21204  		v.AddArg2(v0, v1)
 21205  		return true
 21206  	}
 21207  }
 21208  func rewriteValueARM64_OpMod32(v *Value) bool {
 21209  	v_1 := v.Args[1]
 21210  	v_0 := v.Args[0]
 21211  	// match: (Mod32 x y)
 21212  	// result: (MODW x y)
 21213  	for {
 21214  		x := v_0
 21215  		y := v_1
 21216  		v.reset(OpARM64MODW)
 21217  		v.AddArg2(x, y)
 21218  		return true
 21219  	}
 21220  }
 21221  func rewriteValueARM64_OpMod64(v *Value) bool {
 21222  	v_1 := v.Args[1]
 21223  	v_0 := v.Args[0]
 21224  	// match: (Mod64 x y)
 21225  	// result: (MOD x y)
 21226  	for {
 21227  		x := v_0
 21228  		y := v_1
 21229  		v.reset(OpARM64MOD)
 21230  		v.AddArg2(x, y)
 21231  		return true
 21232  	}
 21233  }
 21234  func rewriteValueARM64_OpMod8(v *Value) bool {
 21235  	v_1 := v.Args[1]
 21236  	v_0 := v.Args[0]
 21237  	b := v.Block
 21238  	typ := &b.Func.Config.Types
 21239  	// match: (Mod8 x y)
 21240  	// result: (MODW (SignExt8to32 x) (SignExt8to32 y))
 21241  	for {
 21242  		x := v_0
 21243  		y := v_1
 21244  		v.reset(OpARM64MODW)
 21245  		v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 21246  		v0.AddArg(x)
 21247  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 21248  		v1.AddArg(y)
 21249  		v.AddArg2(v0, v1)
 21250  		return true
 21251  	}
 21252  }
 21253  func rewriteValueARM64_OpMod8u(v *Value) bool {
 21254  	v_1 := v.Args[1]
 21255  	v_0 := v.Args[0]
 21256  	b := v.Block
 21257  	typ := &b.Func.Config.Types
 21258  	// match: (Mod8u x y)
 21259  	// result: (UMODW (ZeroExt8to32 x) (ZeroExt8to32 y))
 21260  	for {
 21261  		x := v_0
 21262  		y := v_1
 21263  		v.reset(OpARM64UMODW)
 21264  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 21265  		v0.AddArg(x)
 21266  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 21267  		v1.AddArg(y)
 21268  		v.AddArg2(v0, v1)
 21269  		return true
 21270  	}
 21271  }
 21272  func rewriteValueARM64_OpMove(v *Value) bool {
 21273  	v_2 := v.Args[2]
 21274  	v_1 := v.Args[1]
 21275  	v_0 := v.Args[0]
 21276  	b := v.Block
 21277  	typ := &b.Func.Config.Types
 21278  	// match: (Move [0] _ _ mem)
 21279  	// result: mem
 21280  	for {
 21281  		if auxIntToInt64(v.AuxInt) != 0 {
 21282  			break
 21283  		}
 21284  		mem := v_2
 21285  		v.copyOf(mem)
 21286  		return true
 21287  	}
 21288  	// match: (Move [1] dst src mem)
 21289  	// result: (MOVBstore dst (MOVBUload src mem) mem)
 21290  	for {
 21291  		if auxIntToInt64(v.AuxInt) != 1 {
 21292  			break
 21293  		}
 21294  		dst := v_0
 21295  		src := v_1
 21296  		mem := v_2
 21297  		v.reset(OpARM64MOVBstore)
 21298  		v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
 21299  		v0.AddArg2(src, mem)
 21300  		v.AddArg3(dst, v0, mem)
 21301  		return true
 21302  	}
 21303  	// match: (Move [2] dst src mem)
 21304  	// result: (MOVHstore dst (MOVHUload src mem) mem)
 21305  	for {
 21306  		if auxIntToInt64(v.AuxInt) != 2 {
 21307  			break
 21308  		}
 21309  		dst := v_0
 21310  		src := v_1
 21311  		mem := v_2
 21312  		v.reset(OpARM64MOVHstore)
 21313  		v0 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
 21314  		v0.AddArg2(src, mem)
 21315  		v.AddArg3(dst, v0, mem)
 21316  		return true
 21317  	}
 21318  	// match: (Move [3] dst src mem)
 21319  	// result: (MOVBstore [2] dst (MOVBUload [2] src mem) (MOVHstore dst (MOVHUload src mem) mem))
 21320  	for {
 21321  		if auxIntToInt64(v.AuxInt) != 3 {
 21322  			break
 21323  		}
 21324  		dst := v_0
 21325  		src := v_1
 21326  		mem := v_2
 21327  		v.reset(OpARM64MOVBstore)
 21328  		v.AuxInt = int32ToAuxInt(2)
 21329  		v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
 21330  		v0.AuxInt = int32ToAuxInt(2)
 21331  		v0.AddArg2(src, mem)
 21332  		v1 := b.NewValue0(v.Pos, OpARM64MOVHstore, types.TypeMem)
 21333  		v2 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
 21334  		v2.AddArg2(src, mem)
 21335  		v1.AddArg3(dst, v2, mem)
 21336  		v.AddArg3(dst, v0, v1)
 21337  		return true
 21338  	}
 21339  	// match: (Move [4] dst src mem)
 21340  	// result: (MOVWstore dst (MOVWUload src mem) mem)
 21341  	for {
 21342  		if auxIntToInt64(v.AuxInt) != 4 {
 21343  			break
 21344  		}
 21345  		dst := v_0
 21346  		src := v_1
 21347  		mem := v_2
 21348  		v.reset(OpARM64MOVWstore)
 21349  		v0 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 21350  		v0.AddArg2(src, mem)
 21351  		v.AddArg3(dst, v0, mem)
 21352  		return true
 21353  	}
 21354  	// match: (Move [5] dst src mem)
 21355  	// result: (MOVBstore [4] dst (MOVBUload [4] src mem) (MOVWstore dst (MOVWUload src mem) mem))
 21356  	for {
 21357  		if auxIntToInt64(v.AuxInt) != 5 {
 21358  			break
 21359  		}
 21360  		dst := v_0
 21361  		src := v_1
 21362  		mem := v_2
 21363  		v.reset(OpARM64MOVBstore)
 21364  		v.AuxInt = int32ToAuxInt(4)
 21365  		v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
 21366  		v0.AuxInt = int32ToAuxInt(4)
 21367  		v0.AddArg2(src, mem)
 21368  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 21369  		v2 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 21370  		v2.AddArg2(src, mem)
 21371  		v1.AddArg3(dst, v2, mem)
 21372  		v.AddArg3(dst, v0, v1)
 21373  		return true
 21374  	}
 21375  	// match: (Move [6] dst src mem)
 21376  	// result: (MOVHstore [4] dst (MOVHUload [4] src mem) (MOVWstore dst (MOVWUload src mem) mem))
 21377  	for {
 21378  		if auxIntToInt64(v.AuxInt) != 6 {
 21379  			break
 21380  		}
 21381  		dst := v_0
 21382  		src := v_1
 21383  		mem := v_2
 21384  		v.reset(OpARM64MOVHstore)
 21385  		v.AuxInt = int32ToAuxInt(4)
 21386  		v0 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
 21387  		v0.AuxInt = int32ToAuxInt(4)
 21388  		v0.AddArg2(src, mem)
 21389  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 21390  		v2 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 21391  		v2.AddArg2(src, mem)
 21392  		v1.AddArg3(dst, v2, mem)
 21393  		v.AddArg3(dst, v0, v1)
 21394  		return true
 21395  	}
 21396  	// match: (Move [7] dst src mem)
 21397  	// result: (MOVWstore [3] dst (MOVWUload [3] src mem) (MOVWstore dst (MOVWUload src mem) mem))
 21398  	for {
 21399  		if auxIntToInt64(v.AuxInt) != 7 {
 21400  			break
 21401  		}
 21402  		dst := v_0
 21403  		src := v_1
 21404  		mem := v_2
 21405  		v.reset(OpARM64MOVWstore)
 21406  		v.AuxInt = int32ToAuxInt(3)
 21407  		v0 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 21408  		v0.AuxInt = int32ToAuxInt(3)
 21409  		v0.AddArg2(src, mem)
 21410  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 21411  		v2 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 21412  		v2.AddArg2(src, mem)
 21413  		v1.AddArg3(dst, v2, mem)
 21414  		v.AddArg3(dst, v0, v1)
 21415  		return true
 21416  	}
 21417  	// match: (Move [8] dst src mem)
 21418  	// result: (MOVDstore dst (MOVDload src mem) mem)
 21419  	for {
 21420  		if auxIntToInt64(v.AuxInt) != 8 {
 21421  			break
 21422  		}
 21423  		dst := v_0
 21424  		src := v_1
 21425  		mem := v_2
 21426  		v.reset(OpARM64MOVDstore)
 21427  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21428  		v0.AddArg2(src, mem)
 21429  		v.AddArg3(dst, v0, mem)
 21430  		return true
 21431  	}
 21432  	// match: (Move [9] dst src mem)
 21433  	// result: (MOVBstore [8] dst (MOVBUload [8] src mem) (MOVDstore dst (MOVDload src mem) mem))
 21434  	for {
 21435  		if auxIntToInt64(v.AuxInt) != 9 {
 21436  			break
 21437  		}
 21438  		dst := v_0
 21439  		src := v_1
 21440  		mem := v_2
 21441  		v.reset(OpARM64MOVBstore)
 21442  		v.AuxInt = int32ToAuxInt(8)
 21443  		v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
 21444  		v0.AuxInt = int32ToAuxInt(8)
 21445  		v0.AddArg2(src, mem)
 21446  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 21447  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21448  		v2.AddArg2(src, mem)
 21449  		v1.AddArg3(dst, v2, mem)
 21450  		v.AddArg3(dst, v0, v1)
 21451  		return true
 21452  	}
 21453  	// match: (Move [10] dst src mem)
 21454  	// result: (MOVHstore [8] dst (MOVHUload [8] src mem) (MOVDstore dst (MOVDload src mem) mem))
 21455  	for {
 21456  		if auxIntToInt64(v.AuxInt) != 10 {
 21457  			break
 21458  		}
 21459  		dst := v_0
 21460  		src := v_1
 21461  		mem := v_2
 21462  		v.reset(OpARM64MOVHstore)
 21463  		v.AuxInt = int32ToAuxInt(8)
 21464  		v0 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
 21465  		v0.AuxInt = int32ToAuxInt(8)
 21466  		v0.AddArg2(src, mem)
 21467  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 21468  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21469  		v2.AddArg2(src, mem)
 21470  		v1.AddArg3(dst, v2, mem)
 21471  		v.AddArg3(dst, v0, v1)
 21472  		return true
 21473  	}
 21474  	// match: (Move [11] dst src mem)
 21475  	// result: (MOVDstore [3] dst (MOVDload [3] src mem) (MOVDstore dst (MOVDload src mem) mem))
 21476  	for {
 21477  		if auxIntToInt64(v.AuxInt) != 11 {
 21478  			break
 21479  		}
 21480  		dst := v_0
 21481  		src := v_1
 21482  		mem := v_2
 21483  		v.reset(OpARM64MOVDstore)
 21484  		v.AuxInt = int32ToAuxInt(3)
 21485  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21486  		v0.AuxInt = int32ToAuxInt(3)
 21487  		v0.AddArg2(src, mem)
 21488  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 21489  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21490  		v2.AddArg2(src, mem)
 21491  		v1.AddArg3(dst, v2, mem)
 21492  		v.AddArg3(dst, v0, v1)
 21493  		return true
 21494  	}
 21495  	// match: (Move [12] dst src mem)
 21496  	// result: (MOVWstore [8] dst (MOVWUload [8] src mem) (MOVDstore dst (MOVDload src mem) mem))
 21497  	for {
 21498  		if auxIntToInt64(v.AuxInt) != 12 {
 21499  			break
 21500  		}
 21501  		dst := v_0
 21502  		src := v_1
 21503  		mem := v_2
 21504  		v.reset(OpARM64MOVWstore)
 21505  		v.AuxInt = int32ToAuxInt(8)
 21506  		v0 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 21507  		v0.AuxInt = int32ToAuxInt(8)
 21508  		v0.AddArg2(src, mem)
 21509  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 21510  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21511  		v2.AddArg2(src, mem)
 21512  		v1.AddArg3(dst, v2, mem)
 21513  		v.AddArg3(dst, v0, v1)
 21514  		return true
 21515  	}
 21516  	// match: (Move [13] dst src mem)
 21517  	// result: (MOVDstore [5] dst (MOVDload [5] src mem) (MOVDstore dst (MOVDload src mem) mem))
 21518  	for {
 21519  		if auxIntToInt64(v.AuxInt) != 13 {
 21520  			break
 21521  		}
 21522  		dst := v_0
 21523  		src := v_1
 21524  		mem := v_2
 21525  		v.reset(OpARM64MOVDstore)
 21526  		v.AuxInt = int32ToAuxInt(5)
 21527  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21528  		v0.AuxInt = int32ToAuxInt(5)
 21529  		v0.AddArg2(src, mem)
 21530  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 21531  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21532  		v2.AddArg2(src, mem)
 21533  		v1.AddArg3(dst, v2, mem)
 21534  		v.AddArg3(dst, v0, v1)
 21535  		return true
 21536  	}
 21537  	// match: (Move [14] dst src mem)
 21538  	// result: (MOVDstore [6] dst (MOVDload [6] src mem) (MOVDstore dst (MOVDload src mem) mem))
 21539  	for {
 21540  		if auxIntToInt64(v.AuxInt) != 14 {
 21541  			break
 21542  		}
 21543  		dst := v_0
 21544  		src := v_1
 21545  		mem := v_2
 21546  		v.reset(OpARM64MOVDstore)
 21547  		v.AuxInt = int32ToAuxInt(6)
 21548  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21549  		v0.AuxInt = int32ToAuxInt(6)
 21550  		v0.AddArg2(src, mem)
 21551  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 21552  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21553  		v2.AddArg2(src, mem)
 21554  		v1.AddArg3(dst, v2, mem)
 21555  		v.AddArg3(dst, v0, v1)
 21556  		return true
 21557  	}
 21558  	// match: (Move [15] dst src mem)
 21559  	// result: (MOVDstore [7] dst (MOVDload [7] src mem) (MOVDstore dst (MOVDload src mem) mem))
 21560  	for {
 21561  		if auxIntToInt64(v.AuxInt) != 15 {
 21562  			break
 21563  		}
 21564  		dst := v_0
 21565  		src := v_1
 21566  		mem := v_2
 21567  		v.reset(OpARM64MOVDstore)
 21568  		v.AuxInt = int32ToAuxInt(7)
 21569  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21570  		v0.AuxInt = int32ToAuxInt(7)
 21571  		v0.AddArg2(src, mem)
 21572  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 21573  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21574  		v2.AddArg2(src, mem)
 21575  		v1.AddArg3(dst, v2, mem)
 21576  		v.AddArg3(dst, v0, v1)
 21577  		return true
 21578  	}
 21579  	// match: (Move [16] dst src mem)
 21580  	// result: (FMOVQstore dst (FMOVQload src mem) mem)
 21581  	for {
 21582  		if auxIntToInt64(v.AuxInt) != 16 {
 21583  			break
 21584  		}
 21585  		dst := v_0
 21586  		src := v_1
 21587  		mem := v_2
 21588  		v.reset(OpARM64FMOVQstore)
 21589  		v0 := b.NewValue0(v.Pos, OpARM64FMOVQload, typ.Vec128)
 21590  		v0.AddArg2(src, mem)
 21591  		v.AddArg3(dst, v0, mem)
 21592  		return true
 21593  	}
 21594  	// match: (Move [s] dst src mem)
 21595  	// cond: s > 16 && s <= 24
 21596  	// result: (MOVDstore [int32(s-8)] dst (MOVDload [int32(s-8)] src mem) (FMOVQstore dst (FMOVQload src mem) mem))
 21597  	for {
 21598  		s := auxIntToInt64(v.AuxInt)
 21599  		dst := v_0
 21600  		src := v_1
 21601  		mem := v_2
 21602  		if !(s > 16 && s <= 24) {
 21603  			break
 21604  		}
 21605  		v.reset(OpARM64MOVDstore)
 21606  		v.AuxInt = int32ToAuxInt(int32(s - 8))
 21607  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21608  		v0.AuxInt = int32ToAuxInt(int32(s - 8))
 21609  		v0.AddArg2(src, mem)
 21610  		v1 := b.NewValue0(v.Pos, OpARM64FMOVQstore, types.TypeMem)
 21611  		v2 := b.NewValue0(v.Pos, OpARM64FMOVQload, typ.Vec128)
 21612  		v2.AddArg2(src, mem)
 21613  		v1.AddArg3(dst, v2, mem)
 21614  		v.AddArg3(dst, v0, v1)
 21615  		return true
 21616  	}
 21617  	// match: (Move [s] dst src mem)
 21618  	// cond: s > 24 && s < 32
 21619  	// result: (FMOVQstore [int32(s-16)] dst (FMOVQload [int32(s-16)] src mem) (FMOVQstore dst (FMOVQload src mem) mem))
 21620  	for {
 21621  		s := auxIntToInt64(v.AuxInt)
 21622  		dst := v_0
 21623  		src := v_1
 21624  		mem := v_2
 21625  		if !(s > 24 && s < 32) {
 21626  			break
 21627  		}
 21628  		v.reset(OpARM64FMOVQstore)
 21629  		v.AuxInt = int32ToAuxInt(int32(s - 16))
 21630  		v0 := b.NewValue0(v.Pos, OpARM64FMOVQload, typ.Vec128)
 21631  		v0.AuxInt = int32ToAuxInt(int32(s - 16))
 21632  		v0.AddArg2(src, mem)
 21633  		v1 := b.NewValue0(v.Pos, OpARM64FMOVQstore, types.TypeMem)
 21634  		v2 := b.NewValue0(v.Pos, OpARM64FMOVQload, typ.Vec128)
 21635  		v2.AddArg2(src, mem)
 21636  		v1.AddArg3(dst, v2, mem)
 21637  		v.AddArg3(dst, v0, v1)
 21638  		return true
 21639  	}
 21640  	// match: (Move [32] dst src mem)
 21641  	// result: (FSTPQ dst (Select0 <typ.Vec128> (FLDPQ src mem)) (Select1 <typ.Vec128> (FLDPQ src mem)) mem)
 21642  	for {
 21643  		if auxIntToInt64(v.AuxInt) != 32 {
 21644  			break
 21645  		}
 21646  		dst := v_0
 21647  		src := v_1
 21648  		mem := v_2
 21649  		v.reset(OpARM64FSTPQ)
 21650  		v0 := b.NewValue0(v.Pos, OpSelect0, typ.Vec128)
 21651  		v1 := b.NewValue0(v.Pos, OpARM64FLDPQ, types.NewTuple(typ.Vec128, typ.Vec128))
 21652  		v1.AddArg2(src, mem)
 21653  		v0.AddArg(v1)
 21654  		v2 := b.NewValue0(v.Pos, OpSelect1, typ.Vec128)
 21655  		v2.AddArg(v1)
 21656  		v.AddArg4(dst, v0, v2, mem)
 21657  		return true
 21658  	}
 21659  	// match: (Move [s] dst src mem)
 21660  	// cond: s > 32 && s <= 40
 21661  	// result: (MOVDstore [int32(s-8)] dst (MOVDload [int32(s-8)] src mem) (FSTPQ dst (Select0 <typ.Vec128> (FLDPQ src mem)) (Select1 <typ.Vec128> (FLDPQ src mem)) mem))
 21662  	for {
 21663  		s := auxIntToInt64(v.AuxInt)
 21664  		dst := v_0
 21665  		src := v_1
 21666  		mem := v_2
 21667  		if !(s > 32 && s <= 40) {
 21668  			break
 21669  		}
 21670  		v.reset(OpARM64MOVDstore)
 21671  		v.AuxInt = int32ToAuxInt(int32(s - 8))
 21672  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21673  		v0.AuxInt = int32ToAuxInt(int32(s - 8))
 21674  		v0.AddArg2(src, mem)
 21675  		v1 := b.NewValue0(v.Pos, OpARM64FSTPQ, types.TypeMem)
 21676  		v2 := b.NewValue0(v.Pos, OpSelect0, typ.Vec128)
 21677  		v3 := b.NewValue0(v.Pos, OpARM64FLDPQ, types.NewTuple(typ.Vec128, typ.Vec128))
 21678  		v3.AddArg2(src, mem)
 21679  		v2.AddArg(v3)
 21680  		v4 := b.NewValue0(v.Pos, OpSelect1, typ.Vec128)
 21681  		v4.AddArg(v3)
 21682  		v1.AddArg4(dst, v2, v4, mem)
 21683  		v.AddArg3(dst, v0, v1)
 21684  		return true
 21685  	}
 21686  	// match: (Move [s] dst src mem)
 21687  	// cond: s > 40 && s <= 48
 21688  	// result: (FMOVQstore [int32(s-16)] dst (FMOVQload [int32(s-16)] src mem) (FSTPQ dst (Select0 <typ.Vec128> (FLDPQ src mem)) (Select1 <typ.Vec128> (FLDPQ src mem)) mem))
 21689  	for {
 21690  		s := auxIntToInt64(v.AuxInt)
 21691  		dst := v_0
 21692  		src := v_1
 21693  		mem := v_2
 21694  		if !(s > 40 && s <= 48) {
 21695  			break
 21696  		}
 21697  		v.reset(OpARM64FMOVQstore)
 21698  		v.AuxInt = int32ToAuxInt(int32(s - 16))
 21699  		v0 := b.NewValue0(v.Pos, OpARM64FMOVQload, typ.Vec128)
 21700  		v0.AuxInt = int32ToAuxInt(int32(s - 16))
 21701  		v0.AddArg2(src, mem)
 21702  		v1 := b.NewValue0(v.Pos, OpARM64FSTPQ, types.TypeMem)
 21703  		v2 := b.NewValue0(v.Pos, OpSelect0, typ.Vec128)
 21704  		v3 := b.NewValue0(v.Pos, OpARM64FLDPQ, types.NewTuple(typ.Vec128, typ.Vec128))
 21705  		v3.AddArg2(src, mem)
 21706  		v2.AddArg(v3)
 21707  		v4 := b.NewValue0(v.Pos, OpSelect1, typ.Vec128)
 21708  		v4.AddArg(v3)
 21709  		v1.AddArg4(dst, v2, v4, mem)
 21710  		v.AddArg3(dst, v0, v1)
 21711  		return true
 21712  	}
 21713  	// match: (Move [s] dst src mem)
 21714  	// cond: s > 48 && s <= 64
 21715  	// result: (FSTPQ [int32(s-32)] dst (Select0 <typ.Vec128> (FLDPQ [int32(s-32)] src mem)) (Select1 <typ.Vec128> (FLDPQ [int32(s-32)] src mem)) (FSTPQ dst (Select0 <typ.Vec128> (FLDPQ src mem)) (Select1 <typ.Vec128> (FLDPQ src mem)) mem))
 21716  	for {
 21717  		s := auxIntToInt64(v.AuxInt)
 21718  		dst := v_0
 21719  		src := v_1
 21720  		mem := v_2
 21721  		if !(s > 48 && s <= 64) {
 21722  			break
 21723  		}
 21724  		v.reset(OpARM64FSTPQ)
 21725  		v.AuxInt = int32ToAuxInt(int32(s - 32))
 21726  		v0 := b.NewValue0(v.Pos, OpSelect0, typ.Vec128)
 21727  		v1 := b.NewValue0(v.Pos, OpARM64FLDPQ, types.NewTuple(typ.Vec128, typ.Vec128))
 21728  		v1.AuxInt = int32ToAuxInt(int32(s - 32))
 21729  		v1.AddArg2(src, mem)
 21730  		v0.AddArg(v1)
 21731  		v2 := b.NewValue0(v.Pos, OpSelect1, typ.Vec128)
 21732  		v2.AddArg(v1)
 21733  		v3 := b.NewValue0(v.Pos, OpARM64FSTPQ, types.TypeMem)
 21734  		v4 := b.NewValue0(v.Pos, OpSelect0, typ.Vec128)
 21735  		v5 := b.NewValue0(v.Pos, OpARM64FLDPQ, types.NewTuple(typ.Vec128, typ.Vec128))
 21736  		v5.AddArg2(src, mem)
 21737  		v4.AddArg(v5)
 21738  		v6 := b.NewValue0(v.Pos, OpSelect1, typ.Vec128)
 21739  		v6.AddArg(v5)
 21740  		v3.AddArg4(dst, v4, v6, mem)
 21741  		v.AddArg4(dst, v0, v2, v3)
 21742  		return true
 21743  	}
 21744  	// match: (Move [s] dst src mem)
 21745  	// cond: s > 64 && s < 192 && logLargeCopy(v, s)
 21746  	// result: (LoweredMove [s] dst src mem)
 21747  	for {
 21748  		s := auxIntToInt64(v.AuxInt)
 21749  		dst := v_0
 21750  		src := v_1
 21751  		mem := v_2
 21752  		if !(s > 64 && s < 192 && logLargeCopy(v, s)) {
 21753  			break
 21754  		}
 21755  		v.reset(OpARM64LoweredMove)
 21756  		v.AuxInt = int64ToAuxInt(s)
 21757  		v.AddArg3(dst, src, mem)
 21758  		return true
 21759  	}
 21760  	// match: (Move [s] dst src mem)
 21761  	// cond: s >= 192 && logLargeCopy(v, s)
 21762  	// result: (LoweredMoveLoop [s] dst src mem)
 21763  	for {
 21764  		s := auxIntToInt64(v.AuxInt)
 21765  		dst := v_0
 21766  		src := v_1
 21767  		mem := v_2
 21768  		if !(s >= 192 && logLargeCopy(v, s)) {
 21769  			break
 21770  		}
 21771  		v.reset(OpARM64LoweredMoveLoop)
 21772  		v.AuxInt = int64ToAuxInt(s)
 21773  		v.AddArg3(dst, src, mem)
 21774  		return true
 21775  	}
 21776  	return false
 21777  }
 21778  func rewriteValueARM64_OpMulAddFloat32x4(v *Value) bool {
 21779  	v_2 := v.Args[2]
 21780  	v_1 := v.Args[1]
 21781  	v_0 := v.Args[0]
 21782  	// match: (MulAddFloat32x4 x y z)
 21783  	// result: (VFMLA4S z x y)
 21784  	for {
 21785  		x := v_0
 21786  		y := v_1
 21787  		z := v_2
 21788  		v.reset(OpARM64VFMLA4S)
 21789  		v.AddArg3(z, x, y)
 21790  		return true
 21791  	}
 21792  }
 21793  func rewriteValueARM64_OpMulAddFloat64x2(v *Value) bool {
 21794  	v_2 := v.Args[2]
 21795  	v_1 := v.Args[1]
 21796  	v_0 := v.Args[0]
 21797  	// match: (MulAddFloat64x2 x y z)
 21798  	// result: (VFMLA2D z x y)
 21799  	for {
 21800  		x := v_0
 21801  		y := v_1
 21802  		z := v_2
 21803  		v.reset(OpARM64VFMLA2D)
 21804  		v.AddArg3(z, x, y)
 21805  		return true
 21806  	}
 21807  }
 21808  func rewriteValueARM64_OpMulAddInt16x8(v *Value) bool {
 21809  	v_2 := v.Args[2]
 21810  	v_1 := v.Args[1]
 21811  	v_0 := v.Args[0]
 21812  	// match: (MulAddInt16x8 x y z)
 21813  	// result: (VMLA8H z x y)
 21814  	for {
 21815  		x := v_0
 21816  		y := v_1
 21817  		z := v_2
 21818  		v.reset(OpARM64VMLA8H)
 21819  		v.AddArg3(z, x, y)
 21820  		return true
 21821  	}
 21822  }
 21823  func rewriteValueARM64_OpMulAddInt32x4(v *Value) bool {
 21824  	v_2 := v.Args[2]
 21825  	v_1 := v.Args[1]
 21826  	v_0 := v.Args[0]
 21827  	// match: (MulAddInt32x4 x y z)
 21828  	// result: (VMLA4S z x y)
 21829  	for {
 21830  		x := v_0
 21831  		y := v_1
 21832  		z := v_2
 21833  		v.reset(OpARM64VMLA4S)
 21834  		v.AddArg3(z, x, y)
 21835  		return true
 21836  	}
 21837  }
 21838  func rewriteValueARM64_OpMulAddInt8x16(v *Value) bool {
 21839  	v_2 := v.Args[2]
 21840  	v_1 := v.Args[1]
 21841  	v_0 := v.Args[0]
 21842  	// match: (MulAddInt8x16 x y z)
 21843  	// result: (VMLA16B z x y)
 21844  	for {
 21845  		x := v_0
 21846  		y := v_1
 21847  		z := v_2
 21848  		v.reset(OpARM64VMLA16B)
 21849  		v.AddArg3(z, x, y)
 21850  		return true
 21851  	}
 21852  }
 21853  func rewriteValueARM64_OpMulAddUint16x8(v *Value) bool {
 21854  	v_2 := v.Args[2]
 21855  	v_1 := v.Args[1]
 21856  	v_0 := v.Args[0]
 21857  	// match: (MulAddUint16x8 x y z)
 21858  	// result: (VMLA8H z x y)
 21859  	for {
 21860  		x := v_0
 21861  		y := v_1
 21862  		z := v_2
 21863  		v.reset(OpARM64VMLA8H)
 21864  		v.AddArg3(z, x, y)
 21865  		return true
 21866  	}
 21867  }
 21868  func rewriteValueARM64_OpMulAddUint32x4(v *Value) bool {
 21869  	v_2 := v.Args[2]
 21870  	v_1 := v.Args[1]
 21871  	v_0 := v.Args[0]
 21872  	// match: (MulAddUint32x4 x y z)
 21873  	// result: (VMLA4S z x y)
 21874  	for {
 21875  		x := v_0
 21876  		y := v_1
 21877  		z := v_2
 21878  		v.reset(OpARM64VMLA4S)
 21879  		v.AddArg3(z, x, y)
 21880  		return true
 21881  	}
 21882  }
 21883  func rewriteValueARM64_OpMulAddUint8x16(v *Value) bool {
 21884  	v_2 := v.Args[2]
 21885  	v_1 := v.Args[1]
 21886  	v_0 := v.Args[0]
 21887  	// match: (MulAddUint8x16 x y z)
 21888  	// result: (VMLA16B z x y)
 21889  	for {
 21890  		x := v_0
 21891  		y := v_1
 21892  		z := v_2
 21893  		v.reset(OpARM64VMLA16B)
 21894  		v.AddArg3(z, x, y)
 21895  		return true
 21896  	}
 21897  }
 21898  func rewriteValueARM64_OpNeq16(v *Value) bool {
 21899  	v_1 := v.Args[1]
 21900  	v_0 := v.Args[0]
 21901  	b := v.Block
 21902  	typ := &b.Func.Config.Types
 21903  	// match: (Neq16 x y)
 21904  	// result: (NotEqual (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
 21905  	for {
 21906  		x := v_0
 21907  		y := v_1
 21908  		v.reset(OpARM64NotEqual)
 21909  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 21910  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 21911  		v1.AddArg(x)
 21912  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 21913  		v2.AddArg(y)
 21914  		v0.AddArg2(v1, v2)
 21915  		v.AddArg(v0)
 21916  		return true
 21917  	}
 21918  }
 21919  func rewriteValueARM64_OpNeq32(v *Value) bool {
 21920  	v_1 := v.Args[1]
 21921  	v_0 := v.Args[0]
 21922  	b := v.Block
 21923  	// match: (Neq32 x y)
 21924  	// result: (NotEqual (CMPW x y))
 21925  	for {
 21926  		x := v_0
 21927  		y := v_1
 21928  		v.reset(OpARM64NotEqual)
 21929  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 21930  		v0.AddArg2(x, y)
 21931  		v.AddArg(v0)
 21932  		return true
 21933  	}
 21934  }
 21935  func rewriteValueARM64_OpNeq32F(v *Value) bool {
 21936  	v_1 := v.Args[1]
 21937  	v_0 := v.Args[0]
 21938  	b := v.Block
 21939  	// match: (Neq32F x y)
 21940  	// result: (NotEqual (FCMPS x y))
 21941  	for {
 21942  		x := v_0
 21943  		y := v_1
 21944  		v.reset(OpARM64NotEqual)
 21945  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
 21946  		v0.AddArg2(x, y)
 21947  		v.AddArg(v0)
 21948  		return true
 21949  	}
 21950  }
 21951  func rewriteValueARM64_OpNeq64(v *Value) bool {
 21952  	v_1 := v.Args[1]
 21953  	v_0 := v.Args[0]
 21954  	b := v.Block
 21955  	// match: (Neq64 x y)
 21956  	// result: (NotEqual (CMP x y))
 21957  	for {
 21958  		x := v_0
 21959  		y := v_1
 21960  		v.reset(OpARM64NotEqual)
 21961  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 21962  		v0.AddArg2(x, y)
 21963  		v.AddArg(v0)
 21964  		return true
 21965  	}
 21966  }
 21967  func rewriteValueARM64_OpNeq64F(v *Value) bool {
 21968  	v_1 := v.Args[1]
 21969  	v_0 := v.Args[0]
 21970  	b := v.Block
 21971  	// match: (Neq64F x y)
 21972  	// result: (NotEqual (FCMPD x y))
 21973  	for {
 21974  		x := v_0
 21975  		y := v_1
 21976  		v.reset(OpARM64NotEqual)
 21977  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
 21978  		v0.AddArg2(x, y)
 21979  		v.AddArg(v0)
 21980  		return true
 21981  	}
 21982  }
 21983  func rewriteValueARM64_OpNeq8(v *Value) bool {
 21984  	v_1 := v.Args[1]
 21985  	v_0 := v.Args[0]
 21986  	b := v.Block
 21987  	typ := &b.Func.Config.Types
 21988  	// match: (Neq8 x y)
 21989  	// result: (NotEqual (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
 21990  	for {
 21991  		x := v_0
 21992  		y := v_1
 21993  		v.reset(OpARM64NotEqual)
 21994  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 21995  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 21996  		v1.AddArg(x)
 21997  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 21998  		v2.AddArg(y)
 21999  		v0.AddArg2(v1, v2)
 22000  		v.AddArg(v0)
 22001  		return true
 22002  	}
 22003  }
 22004  func rewriteValueARM64_OpNeqPtr(v *Value) bool {
 22005  	v_1 := v.Args[1]
 22006  	v_0 := v.Args[0]
 22007  	b := v.Block
 22008  	// match: (NeqPtr x y)
 22009  	// result: (NotEqual (CMP x y))
 22010  	for {
 22011  		x := v_0
 22012  		y := v_1
 22013  		v.reset(OpARM64NotEqual)
 22014  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 22015  		v0.AddArg2(x, y)
 22016  		v.AddArg(v0)
 22017  		return true
 22018  	}
 22019  }
 22020  func rewriteValueARM64_OpNot(v *Value) bool {
 22021  	v_0 := v.Args[0]
 22022  	b := v.Block
 22023  	typ := &b.Func.Config.Types
 22024  	// match: (Not x)
 22025  	// result: (XOR (MOVDconst [1]) x)
 22026  	for {
 22027  		x := v_0
 22028  		v.reset(OpARM64XOR)
 22029  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22030  		v0.AuxInt = int64ToAuxInt(1)
 22031  		v.AddArg2(v0, x)
 22032  		return true
 22033  	}
 22034  }
 22035  func rewriteValueARM64_OpOffPtr(v *Value) bool {
 22036  	v_0 := v.Args[0]
 22037  	// match: (OffPtr [off] ptr:(SP))
 22038  	// cond: is32Bit(off)
 22039  	// result: (MOVDaddr [int32(off)] ptr)
 22040  	for {
 22041  		off := auxIntToInt64(v.AuxInt)
 22042  		ptr := v_0
 22043  		if ptr.Op != OpSP || !(is32Bit(off)) {
 22044  			break
 22045  		}
 22046  		v.reset(OpARM64MOVDaddr)
 22047  		v.AuxInt = int32ToAuxInt(int32(off))
 22048  		v.AddArg(ptr)
 22049  		return true
 22050  	}
 22051  	// match: (OffPtr [off] ptr)
 22052  	// result: (ADDconst [off] ptr)
 22053  	for {
 22054  		off := auxIntToInt64(v.AuxInt)
 22055  		ptr := v_0
 22056  		v.reset(OpARM64ADDconst)
 22057  		v.AuxInt = int64ToAuxInt(off)
 22058  		v.AddArg(ptr)
 22059  		return true
 22060  	}
 22061  }
 22062  func rewriteValueARM64_OpPopCount16(v *Value) bool {
 22063  	v_0 := v.Args[0]
 22064  	b := v.Block
 22065  	typ := &b.Func.Config.Types
 22066  	// match: (PopCount16 <t> x)
 22067  	// result: (FMOVDfpgp <t> (VUADDLV <typ.Float64> (VCNT <typ.Float64> (FMOVDgpfp <typ.Float64> (ZeroExt16to64 x)))))
 22068  	for {
 22069  		t := v.Type
 22070  		x := v_0
 22071  		v.reset(OpARM64FMOVDfpgp)
 22072  		v.Type = t
 22073  		v0 := b.NewValue0(v.Pos, OpARM64VUADDLV, typ.Float64)
 22074  		v1 := b.NewValue0(v.Pos, OpARM64VCNT, typ.Float64)
 22075  		v2 := b.NewValue0(v.Pos, OpARM64FMOVDgpfp, typ.Float64)
 22076  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 22077  		v3.AddArg(x)
 22078  		v2.AddArg(v3)
 22079  		v1.AddArg(v2)
 22080  		v0.AddArg(v1)
 22081  		v.AddArg(v0)
 22082  		return true
 22083  	}
 22084  }
 22085  func rewriteValueARM64_OpPopCount32(v *Value) bool {
 22086  	v_0 := v.Args[0]
 22087  	b := v.Block
 22088  	typ := &b.Func.Config.Types
 22089  	// match: (PopCount32 <t> x)
 22090  	// result: (FMOVDfpgp <t> (VUADDLV <typ.Float64> (VCNT <typ.Float64> (FMOVDgpfp <typ.Float64> (ZeroExt32to64 x)))))
 22091  	for {
 22092  		t := v.Type
 22093  		x := v_0
 22094  		v.reset(OpARM64FMOVDfpgp)
 22095  		v.Type = t
 22096  		v0 := b.NewValue0(v.Pos, OpARM64VUADDLV, typ.Float64)
 22097  		v1 := b.NewValue0(v.Pos, OpARM64VCNT, typ.Float64)
 22098  		v2 := b.NewValue0(v.Pos, OpARM64FMOVDgpfp, typ.Float64)
 22099  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 22100  		v3.AddArg(x)
 22101  		v2.AddArg(v3)
 22102  		v1.AddArg(v2)
 22103  		v0.AddArg(v1)
 22104  		v.AddArg(v0)
 22105  		return true
 22106  	}
 22107  }
 22108  func rewriteValueARM64_OpPopCount64(v *Value) bool {
 22109  	v_0 := v.Args[0]
 22110  	b := v.Block
 22111  	typ := &b.Func.Config.Types
 22112  	// match: (PopCount64 <t> x)
 22113  	// result: (FMOVDfpgp <t> (VUADDLV <typ.Float64> (VCNT <typ.Float64> (FMOVDgpfp <typ.Float64> x))))
 22114  	for {
 22115  		t := v.Type
 22116  		x := v_0
 22117  		v.reset(OpARM64FMOVDfpgp)
 22118  		v.Type = t
 22119  		v0 := b.NewValue0(v.Pos, OpARM64VUADDLV, typ.Float64)
 22120  		v1 := b.NewValue0(v.Pos, OpARM64VCNT, typ.Float64)
 22121  		v2 := b.NewValue0(v.Pos, OpARM64FMOVDgpfp, typ.Float64)
 22122  		v2.AddArg(x)
 22123  		v1.AddArg(v2)
 22124  		v0.AddArg(v1)
 22125  		v.AddArg(v0)
 22126  		return true
 22127  	}
 22128  }
 22129  func rewriteValueARM64_OpPrefetchCache(v *Value) bool {
 22130  	v_1 := v.Args[1]
 22131  	v_0 := v.Args[0]
 22132  	// match: (PrefetchCache addr mem)
 22133  	// result: (PRFM [0] addr mem)
 22134  	for {
 22135  		addr := v_0
 22136  		mem := v_1
 22137  		v.reset(OpARM64PRFM)
 22138  		v.AuxInt = int64ToAuxInt(0)
 22139  		v.AddArg2(addr, mem)
 22140  		return true
 22141  	}
 22142  }
 22143  func rewriteValueARM64_OpPrefetchCacheStreamed(v *Value) bool {
 22144  	v_1 := v.Args[1]
 22145  	v_0 := v.Args[0]
 22146  	// match: (PrefetchCacheStreamed addr mem)
 22147  	// result: (PRFM [1] addr mem)
 22148  	for {
 22149  		addr := v_0
 22150  		mem := v_1
 22151  		v.reset(OpARM64PRFM)
 22152  		v.AuxInt = int64ToAuxInt(1)
 22153  		v.AddArg2(addr, mem)
 22154  		return true
 22155  	}
 22156  }
 22157  func rewriteValueARM64_OpPubBarrier(v *Value) bool {
 22158  	v_0 := v.Args[0]
 22159  	// match: (PubBarrier mem)
 22160  	// result: (DMB [0xe] mem)
 22161  	for {
 22162  		mem := v_0
 22163  		v.reset(OpARM64DMB)
 22164  		v.AuxInt = int64ToAuxInt(0xe)
 22165  		v.AddArg(mem)
 22166  		return true
 22167  	}
 22168  }
 22169  func rewriteValueARM64_OpRotateLeft16(v *Value) bool {
 22170  	v_1 := v.Args[1]
 22171  	v_0 := v.Args[0]
 22172  	b := v.Block
 22173  	typ := &b.Func.Config.Types
 22174  	// match: (RotateLeft16 <t> x (MOVDconst [c]))
 22175  	// result: (Or16 (Lsh16x64 <t> x (MOVDconst [c&15])) (Rsh16Ux64 <t> x (MOVDconst [-c&15])))
 22176  	for {
 22177  		t := v.Type
 22178  		x := v_0
 22179  		if v_1.Op != OpARM64MOVDconst {
 22180  			break
 22181  		}
 22182  		c := auxIntToInt64(v_1.AuxInt)
 22183  		v.reset(OpOr16)
 22184  		v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
 22185  		v1 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22186  		v1.AuxInt = int64ToAuxInt(c & 15)
 22187  		v0.AddArg2(x, v1)
 22188  		v2 := b.NewValue0(v.Pos, OpRsh16Ux64, t)
 22189  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22190  		v3.AuxInt = int64ToAuxInt(-c & 15)
 22191  		v2.AddArg2(x, v3)
 22192  		v.AddArg2(v0, v2)
 22193  		return true
 22194  	}
 22195  	// match: (RotateLeft16 <t> x y)
 22196  	// result: (RORW <t> (ORshiftLL <typ.UInt32> (ZeroExt16to32 x) (ZeroExt16to32 x) [16]) (NEG <typ.Int64> y))
 22197  	for {
 22198  		t := v.Type
 22199  		x := v_0
 22200  		y := v_1
 22201  		v.reset(OpARM64RORW)
 22202  		v.Type = t
 22203  		v0 := b.NewValue0(v.Pos, OpARM64ORshiftLL, typ.UInt32)
 22204  		v0.AuxInt = int64ToAuxInt(16)
 22205  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 22206  		v1.AddArg(x)
 22207  		v0.AddArg2(v1, v1)
 22208  		v2 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 22209  		v2.AddArg(y)
 22210  		v.AddArg2(v0, v2)
 22211  		return true
 22212  	}
 22213  }
 22214  func rewriteValueARM64_OpRotateLeft32(v *Value) bool {
 22215  	v_1 := v.Args[1]
 22216  	v_0 := v.Args[0]
 22217  	b := v.Block
 22218  	// match: (RotateLeft32 x y)
 22219  	// result: (RORW x (NEG <y.Type> y))
 22220  	for {
 22221  		x := v_0
 22222  		y := v_1
 22223  		v.reset(OpARM64RORW)
 22224  		v0 := b.NewValue0(v.Pos, OpARM64NEG, y.Type)
 22225  		v0.AddArg(y)
 22226  		v.AddArg2(x, v0)
 22227  		return true
 22228  	}
 22229  }
 22230  func rewriteValueARM64_OpRotateLeft64(v *Value) bool {
 22231  	v_1 := v.Args[1]
 22232  	v_0 := v.Args[0]
 22233  	b := v.Block
 22234  	// match: (RotateLeft64 x y)
 22235  	// result: (ROR x (NEG <y.Type> y))
 22236  	for {
 22237  		x := v_0
 22238  		y := v_1
 22239  		v.reset(OpARM64ROR)
 22240  		v0 := b.NewValue0(v.Pos, OpARM64NEG, y.Type)
 22241  		v0.AddArg(y)
 22242  		v.AddArg2(x, v0)
 22243  		return true
 22244  	}
 22245  }
 22246  func rewriteValueARM64_OpRotateLeft8(v *Value) bool {
 22247  	v_1 := v.Args[1]
 22248  	v_0 := v.Args[0]
 22249  	b := v.Block
 22250  	typ := &b.Func.Config.Types
 22251  	// match: (RotateLeft8 <t> x (MOVDconst [c]))
 22252  	// result: (Or8 (Lsh8x64 <t> x (MOVDconst [c&7])) (Rsh8Ux64 <t> x (MOVDconst [-c&7])))
 22253  	for {
 22254  		t := v.Type
 22255  		x := v_0
 22256  		if v_1.Op != OpARM64MOVDconst {
 22257  			break
 22258  		}
 22259  		c := auxIntToInt64(v_1.AuxInt)
 22260  		v.reset(OpOr8)
 22261  		v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
 22262  		v1 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22263  		v1.AuxInt = int64ToAuxInt(c & 7)
 22264  		v0.AddArg2(x, v1)
 22265  		v2 := b.NewValue0(v.Pos, OpRsh8Ux64, t)
 22266  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22267  		v3.AuxInt = int64ToAuxInt(-c & 7)
 22268  		v2.AddArg2(x, v3)
 22269  		v.AddArg2(v0, v2)
 22270  		return true
 22271  	}
 22272  	// match: (RotateLeft8 <t> x y)
 22273  	// result: (OR <t> (SLL <t> x (ANDconst <typ.Int64> [7] y)) (SRL <t> (ZeroExt8to64 x) (ANDconst <typ.Int64> [7] (NEG <typ.Int64> y))))
 22274  	for {
 22275  		t := v.Type
 22276  		x := v_0
 22277  		y := v_1
 22278  		v.reset(OpARM64OR)
 22279  		v.Type = t
 22280  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 22281  		v1 := b.NewValue0(v.Pos, OpARM64ANDconst, typ.Int64)
 22282  		v1.AuxInt = int64ToAuxInt(7)
 22283  		v1.AddArg(y)
 22284  		v0.AddArg2(x, v1)
 22285  		v2 := b.NewValue0(v.Pos, OpARM64SRL, t)
 22286  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 22287  		v3.AddArg(x)
 22288  		v4 := b.NewValue0(v.Pos, OpARM64ANDconst, typ.Int64)
 22289  		v4.AuxInt = int64ToAuxInt(7)
 22290  		v5 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 22291  		v5.AddArg(y)
 22292  		v4.AddArg(v5)
 22293  		v2.AddArg2(v3, v4)
 22294  		v.AddArg2(v0, v2)
 22295  		return true
 22296  	}
 22297  }
 22298  func rewriteValueARM64_OpRsh16Ux16(v *Value) bool {
 22299  	v_1 := v.Args[1]
 22300  	v_0 := v.Args[0]
 22301  	b := v.Block
 22302  	typ := &b.Func.Config.Types
 22303  	// match: (Rsh16Ux16 <t> [bounded] x y)
 22304  	// result: (Rsh64Ux16 <t> [bounded] (ZeroExt16to64 x) y)
 22305  	for {
 22306  		t := v.Type
 22307  		bounded := auxIntToBool(v.AuxInt)
 22308  		x := v_0
 22309  		y := v_1
 22310  		v.reset(OpRsh64Ux16)
 22311  		v.Type = t
 22312  		v.AuxInt = boolToAuxInt(bounded)
 22313  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 22314  		v0.AddArg(x)
 22315  		v.AddArg2(v0, y)
 22316  		return true
 22317  	}
 22318  }
 22319  func rewriteValueARM64_OpRsh16Ux32(v *Value) bool {
 22320  	v_1 := v.Args[1]
 22321  	v_0 := v.Args[0]
 22322  	b := v.Block
 22323  	typ := &b.Func.Config.Types
 22324  	// match: (Rsh16Ux32 <t> [bounded] x y)
 22325  	// result: (Rsh64Ux32 <t> [bounded] (ZeroExt16to64 x) y)
 22326  	for {
 22327  		t := v.Type
 22328  		bounded := auxIntToBool(v.AuxInt)
 22329  		x := v_0
 22330  		y := v_1
 22331  		v.reset(OpRsh64Ux32)
 22332  		v.Type = t
 22333  		v.AuxInt = boolToAuxInt(bounded)
 22334  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 22335  		v0.AddArg(x)
 22336  		v.AddArg2(v0, y)
 22337  		return true
 22338  	}
 22339  }
 22340  func rewriteValueARM64_OpRsh16Ux64(v *Value) bool {
 22341  	v_1 := v.Args[1]
 22342  	v_0 := v.Args[0]
 22343  	b := v.Block
 22344  	typ := &b.Func.Config.Types
 22345  	// match: (Rsh16Ux64 <t> [bounded] x y)
 22346  	// result: (Rsh64Ux64 <t> [bounded] (ZeroExt16to64 x) y)
 22347  	for {
 22348  		t := v.Type
 22349  		bounded := auxIntToBool(v.AuxInt)
 22350  		x := v_0
 22351  		y := v_1
 22352  		v.reset(OpRsh64Ux64)
 22353  		v.Type = t
 22354  		v.AuxInt = boolToAuxInt(bounded)
 22355  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 22356  		v0.AddArg(x)
 22357  		v.AddArg2(v0, y)
 22358  		return true
 22359  	}
 22360  }
 22361  func rewriteValueARM64_OpRsh16Ux8(v *Value) bool {
 22362  	v_1 := v.Args[1]
 22363  	v_0 := v.Args[0]
 22364  	b := v.Block
 22365  	typ := &b.Func.Config.Types
 22366  	// match: (Rsh16Ux8 <t> [bounded] x y)
 22367  	// result: (Rsh64Ux8 <t> [bounded] (ZeroExt16to64 x) y)
 22368  	for {
 22369  		t := v.Type
 22370  		bounded := auxIntToBool(v.AuxInt)
 22371  		x := v_0
 22372  		y := v_1
 22373  		v.reset(OpRsh64Ux8)
 22374  		v.Type = t
 22375  		v.AuxInt = boolToAuxInt(bounded)
 22376  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 22377  		v0.AddArg(x)
 22378  		v.AddArg2(v0, y)
 22379  		return true
 22380  	}
 22381  }
 22382  func rewriteValueARM64_OpRsh16x16(v *Value) bool {
 22383  	v_1 := v.Args[1]
 22384  	v_0 := v.Args[0]
 22385  	b := v.Block
 22386  	typ := &b.Func.Config.Types
 22387  	// match: (Rsh16x16 <t> [bounded] x y)
 22388  	// result: (Rsh64x16 <t> [bounded] (SignExt16to64 x) y)
 22389  	for {
 22390  		t := v.Type
 22391  		bounded := auxIntToBool(v.AuxInt)
 22392  		x := v_0
 22393  		y := v_1
 22394  		v.reset(OpRsh64x16)
 22395  		v.Type = t
 22396  		v.AuxInt = boolToAuxInt(bounded)
 22397  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 22398  		v0.AddArg(x)
 22399  		v.AddArg2(v0, y)
 22400  		return true
 22401  	}
 22402  }
 22403  func rewriteValueARM64_OpRsh16x32(v *Value) bool {
 22404  	v_1 := v.Args[1]
 22405  	v_0 := v.Args[0]
 22406  	b := v.Block
 22407  	typ := &b.Func.Config.Types
 22408  	// match: (Rsh16x32 <t> [bounded] x y)
 22409  	// result: (Rsh64x32 <t> [bounded] (SignExt16to64 x) y)
 22410  	for {
 22411  		t := v.Type
 22412  		bounded := auxIntToBool(v.AuxInt)
 22413  		x := v_0
 22414  		y := v_1
 22415  		v.reset(OpRsh64x32)
 22416  		v.Type = t
 22417  		v.AuxInt = boolToAuxInt(bounded)
 22418  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 22419  		v0.AddArg(x)
 22420  		v.AddArg2(v0, y)
 22421  		return true
 22422  	}
 22423  }
 22424  func rewriteValueARM64_OpRsh16x64(v *Value) bool {
 22425  	v_1 := v.Args[1]
 22426  	v_0 := v.Args[0]
 22427  	b := v.Block
 22428  	typ := &b.Func.Config.Types
 22429  	// match: (Rsh16x64 <t> [bounded] x y)
 22430  	// result: (Rsh64x64 <t> [bounded] (SignExt16to64 x) y)
 22431  	for {
 22432  		t := v.Type
 22433  		bounded := auxIntToBool(v.AuxInt)
 22434  		x := v_0
 22435  		y := v_1
 22436  		v.reset(OpRsh64x64)
 22437  		v.Type = t
 22438  		v.AuxInt = boolToAuxInt(bounded)
 22439  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 22440  		v0.AddArg(x)
 22441  		v.AddArg2(v0, y)
 22442  		return true
 22443  	}
 22444  }
 22445  func rewriteValueARM64_OpRsh16x8(v *Value) bool {
 22446  	v_1 := v.Args[1]
 22447  	v_0 := v.Args[0]
 22448  	b := v.Block
 22449  	typ := &b.Func.Config.Types
 22450  	// match: (Rsh16x8 <t> [bounded] x y)
 22451  	// result: (Rsh64x8 <t> [bounded] (SignExt16to64 x) y)
 22452  	for {
 22453  		t := v.Type
 22454  		bounded := auxIntToBool(v.AuxInt)
 22455  		x := v_0
 22456  		y := v_1
 22457  		v.reset(OpRsh64x8)
 22458  		v.Type = t
 22459  		v.AuxInt = boolToAuxInt(bounded)
 22460  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 22461  		v0.AddArg(x)
 22462  		v.AddArg2(v0, y)
 22463  		return true
 22464  	}
 22465  }
 22466  func rewriteValueARM64_OpRsh32Ux16(v *Value) bool {
 22467  	v_1 := v.Args[1]
 22468  	v_0 := v.Args[0]
 22469  	b := v.Block
 22470  	typ := &b.Func.Config.Types
 22471  	// match: (Rsh32Ux16 <t> [bounded] x y)
 22472  	// result: (Rsh64Ux16 <t> [bounded] (ZeroExt32to64 x) y)
 22473  	for {
 22474  		t := v.Type
 22475  		bounded := auxIntToBool(v.AuxInt)
 22476  		x := v_0
 22477  		y := v_1
 22478  		v.reset(OpRsh64Ux16)
 22479  		v.Type = t
 22480  		v.AuxInt = boolToAuxInt(bounded)
 22481  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 22482  		v0.AddArg(x)
 22483  		v.AddArg2(v0, y)
 22484  		return true
 22485  	}
 22486  }
 22487  func rewriteValueARM64_OpRsh32Ux32(v *Value) bool {
 22488  	v_1 := v.Args[1]
 22489  	v_0 := v.Args[0]
 22490  	b := v.Block
 22491  	typ := &b.Func.Config.Types
 22492  	// match: (Rsh32Ux32 <t> [bounded] x y)
 22493  	// result: (Rsh64Ux32 <t> [bounded] (ZeroExt32to64 x) y)
 22494  	for {
 22495  		t := v.Type
 22496  		bounded := auxIntToBool(v.AuxInt)
 22497  		x := v_0
 22498  		y := v_1
 22499  		v.reset(OpRsh64Ux32)
 22500  		v.Type = t
 22501  		v.AuxInt = boolToAuxInt(bounded)
 22502  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 22503  		v0.AddArg(x)
 22504  		v.AddArg2(v0, y)
 22505  		return true
 22506  	}
 22507  }
 22508  func rewriteValueARM64_OpRsh32Ux64(v *Value) bool {
 22509  	v_1 := v.Args[1]
 22510  	v_0 := v.Args[0]
 22511  	b := v.Block
 22512  	typ := &b.Func.Config.Types
 22513  	// match: (Rsh32Ux64 <t> [bounded] x y)
 22514  	// result: (Rsh64Ux64 <t> [bounded] (ZeroExt32to64 x) y)
 22515  	for {
 22516  		t := v.Type
 22517  		bounded := auxIntToBool(v.AuxInt)
 22518  		x := v_0
 22519  		y := v_1
 22520  		v.reset(OpRsh64Ux64)
 22521  		v.Type = t
 22522  		v.AuxInt = boolToAuxInt(bounded)
 22523  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 22524  		v0.AddArg(x)
 22525  		v.AddArg2(v0, y)
 22526  		return true
 22527  	}
 22528  }
 22529  func rewriteValueARM64_OpRsh32Ux8(v *Value) bool {
 22530  	v_1 := v.Args[1]
 22531  	v_0 := v.Args[0]
 22532  	b := v.Block
 22533  	typ := &b.Func.Config.Types
 22534  	// match: (Rsh32Ux8 <t> [bounded] x y)
 22535  	// result: (Rsh64Ux8 <t> [bounded] (ZeroExt32to64 x) y)
 22536  	for {
 22537  		t := v.Type
 22538  		bounded := auxIntToBool(v.AuxInt)
 22539  		x := v_0
 22540  		y := v_1
 22541  		v.reset(OpRsh64Ux8)
 22542  		v.Type = t
 22543  		v.AuxInt = boolToAuxInt(bounded)
 22544  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 22545  		v0.AddArg(x)
 22546  		v.AddArg2(v0, y)
 22547  		return true
 22548  	}
 22549  }
 22550  func rewriteValueARM64_OpRsh32x16(v *Value) bool {
 22551  	v_1 := v.Args[1]
 22552  	v_0 := v.Args[0]
 22553  	b := v.Block
 22554  	typ := &b.Func.Config.Types
 22555  	// match: (Rsh32x16 <t> [bounded] x y)
 22556  	// result: (Rsh64x16 <t> [bounded] (SignExt32to64 x) y)
 22557  	for {
 22558  		t := v.Type
 22559  		bounded := auxIntToBool(v.AuxInt)
 22560  		x := v_0
 22561  		y := v_1
 22562  		v.reset(OpRsh64x16)
 22563  		v.Type = t
 22564  		v.AuxInt = boolToAuxInt(bounded)
 22565  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 22566  		v0.AddArg(x)
 22567  		v.AddArg2(v0, y)
 22568  		return true
 22569  	}
 22570  }
 22571  func rewriteValueARM64_OpRsh32x32(v *Value) bool {
 22572  	v_1 := v.Args[1]
 22573  	v_0 := v.Args[0]
 22574  	b := v.Block
 22575  	typ := &b.Func.Config.Types
 22576  	// match: (Rsh32x32 <t> [bounded] x y)
 22577  	// result: (Rsh64x32 <t> [bounded] (SignExt32to64 x) y)
 22578  	for {
 22579  		t := v.Type
 22580  		bounded := auxIntToBool(v.AuxInt)
 22581  		x := v_0
 22582  		y := v_1
 22583  		v.reset(OpRsh64x32)
 22584  		v.Type = t
 22585  		v.AuxInt = boolToAuxInt(bounded)
 22586  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 22587  		v0.AddArg(x)
 22588  		v.AddArg2(v0, y)
 22589  		return true
 22590  	}
 22591  }
 22592  func rewriteValueARM64_OpRsh32x64(v *Value) bool {
 22593  	v_1 := v.Args[1]
 22594  	v_0 := v.Args[0]
 22595  	b := v.Block
 22596  	typ := &b.Func.Config.Types
 22597  	// match: (Rsh32x64 <t> [bounded] x y)
 22598  	// result: (Rsh64x64 <t> [bounded] (SignExt32to64 x) y)
 22599  	for {
 22600  		t := v.Type
 22601  		bounded := auxIntToBool(v.AuxInt)
 22602  		x := v_0
 22603  		y := v_1
 22604  		v.reset(OpRsh64x64)
 22605  		v.Type = t
 22606  		v.AuxInt = boolToAuxInt(bounded)
 22607  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 22608  		v0.AddArg(x)
 22609  		v.AddArg2(v0, y)
 22610  		return true
 22611  	}
 22612  }
 22613  func rewriteValueARM64_OpRsh32x8(v *Value) bool {
 22614  	v_1 := v.Args[1]
 22615  	v_0 := v.Args[0]
 22616  	b := v.Block
 22617  	typ := &b.Func.Config.Types
 22618  	// match: (Rsh32x8 <t> [bounded] x y)
 22619  	// result: (Rsh64x8 <t> [bounded] (SignExt32to64 x) y)
 22620  	for {
 22621  		t := v.Type
 22622  		bounded := auxIntToBool(v.AuxInt)
 22623  		x := v_0
 22624  		y := v_1
 22625  		v.reset(OpRsh64x8)
 22626  		v.Type = t
 22627  		v.AuxInt = boolToAuxInt(bounded)
 22628  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 22629  		v0.AddArg(x)
 22630  		v.AddArg2(v0, y)
 22631  		return true
 22632  	}
 22633  }
 22634  func rewriteValueARM64_OpRsh64Ux16(v *Value) bool {
 22635  	v_1 := v.Args[1]
 22636  	v_0 := v.Args[0]
 22637  	b := v.Block
 22638  	typ := &b.Func.Config.Types
 22639  	// match: (Rsh64Ux16 <t> x y)
 22640  	// cond: shiftIsBounded(v)
 22641  	// result: (SRL <t> x y)
 22642  	for {
 22643  		t := v.Type
 22644  		x := v_0
 22645  		y := v_1
 22646  		if !(shiftIsBounded(v)) {
 22647  			break
 22648  		}
 22649  		v.reset(OpARM64SRL)
 22650  		v.Type = t
 22651  		v.AddArg2(x, y)
 22652  		return true
 22653  	}
 22654  	// match: (Rsh64Ux16 <t> [bounded] x y)
 22655  	// cond: !shiftIsBounded(v)
 22656  	// result: (Rsh64Ux32 <t> [bounded] x (ZeroExt16to32 y))
 22657  	for {
 22658  		t := v.Type
 22659  		bounded := auxIntToBool(v.AuxInt)
 22660  		x := v_0
 22661  		y := v_1
 22662  		if !(!shiftIsBounded(v)) {
 22663  			break
 22664  		}
 22665  		v.reset(OpRsh64Ux32)
 22666  		v.Type = t
 22667  		v.AuxInt = boolToAuxInt(bounded)
 22668  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 22669  		v0.AddArg(y)
 22670  		v.AddArg2(x, v0)
 22671  		return true
 22672  	}
 22673  	return false
 22674  }
 22675  func rewriteValueARM64_OpRsh64Ux32(v *Value) bool {
 22676  	v_1 := v.Args[1]
 22677  	v_0 := v.Args[0]
 22678  	b := v.Block
 22679  	// match: (Rsh64Ux32 <t> x y)
 22680  	// cond: shiftIsBounded(v)
 22681  	// result: (SRL <t> x y)
 22682  	for {
 22683  		t := v.Type
 22684  		x := v_0
 22685  		y := v_1
 22686  		if !(shiftIsBounded(v)) {
 22687  			break
 22688  		}
 22689  		v.reset(OpARM64SRL)
 22690  		v.Type = t
 22691  		v.AddArg2(x, y)
 22692  		return true
 22693  	}
 22694  	// match: (Rsh64Ux32 <t> x y)
 22695  	// cond: !shiftIsBounded(v)
 22696  	// result: (CSEL [OpARM64LessThanU] (SRL <t> x y) (Const64 <t> [0]) (CMPWconst [64] y))
 22697  	for {
 22698  		t := v.Type
 22699  		x := v_0
 22700  		y := v_1
 22701  		if !(!shiftIsBounded(v)) {
 22702  			break
 22703  		}
 22704  		v.reset(OpARM64CSEL)
 22705  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 22706  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 22707  		v0.AddArg2(x, y)
 22708  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 22709  		v1.AuxInt = int64ToAuxInt(0)
 22710  		v2 := b.NewValue0(v.Pos, OpARM64CMPWconst, types.TypeFlags)
 22711  		v2.AuxInt = int32ToAuxInt(64)
 22712  		v2.AddArg(y)
 22713  		v.AddArg3(v0, v1, v2)
 22714  		return true
 22715  	}
 22716  	return false
 22717  }
 22718  func rewriteValueARM64_OpRsh64Ux64(v *Value) bool {
 22719  	v_1 := v.Args[1]
 22720  	v_0 := v.Args[0]
 22721  	b := v.Block
 22722  	// match: (Rsh64Ux64 <t> x y)
 22723  	// cond: shiftIsBounded(v)
 22724  	// result: (SRL <t> x y)
 22725  	for {
 22726  		t := v.Type
 22727  		x := v_0
 22728  		y := v_1
 22729  		if !(shiftIsBounded(v)) {
 22730  			break
 22731  		}
 22732  		v.reset(OpARM64SRL)
 22733  		v.Type = t
 22734  		v.AddArg2(x, y)
 22735  		return true
 22736  	}
 22737  	// match: (Rsh64Ux64 <t> x y)
 22738  	// cond: !shiftIsBounded(v)
 22739  	// result: (CSEL [OpARM64LessThanU] (SRL <t> x y) (Const64 <t> [0]) (CMPconst [64] y))
 22740  	for {
 22741  		t := v.Type
 22742  		x := v_0
 22743  		y := v_1
 22744  		if !(!shiftIsBounded(v)) {
 22745  			break
 22746  		}
 22747  		v.reset(OpARM64CSEL)
 22748  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 22749  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 22750  		v0.AddArg2(x, y)
 22751  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 22752  		v1.AuxInt = int64ToAuxInt(0)
 22753  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 22754  		v2.AuxInt = int64ToAuxInt(64)
 22755  		v2.AddArg(y)
 22756  		v.AddArg3(v0, v1, v2)
 22757  		return true
 22758  	}
 22759  	return false
 22760  }
 22761  func rewriteValueARM64_OpRsh64Ux8(v *Value) bool {
 22762  	v_1 := v.Args[1]
 22763  	v_0 := v.Args[0]
 22764  	b := v.Block
 22765  	typ := &b.Func.Config.Types
 22766  	// match: (Rsh64Ux8 <t> x y)
 22767  	// cond: shiftIsBounded(v)
 22768  	// result: (SRL <t> x y)
 22769  	for {
 22770  		t := v.Type
 22771  		x := v_0
 22772  		y := v_1
 22773  		if !(shiftIsBounded(v)) {
 22774  			break
 22775  		}
 22776  		v.reset(OpARM64SRL)
 22777  		v.Type = t
 22778  		v.AddArg2(x, y)
 22779  		return true
 22780  	}
 22781  	// match: (Rsh64Ux8 <t> [bounded] x y)
 22782  	// cond: !shiftIsBounded(v)
 22783  	// result: (Rsh64Ux32 <t> [bounded] x (ZeroExt8to32 y))
 22784  	for {
 22785  		t := v.Type
 22786  		bounded := auxIntToBool(v.AuxInt)
 22787  		x := v_0
 22788  		y := v_1
 22789  		if !(!shiftIsBounded(v)) {
 22790  			break
 22791  		}
 22792  		v.reset(OpRsh64Ux32)
 22793  		v.Type = t
 22794  		v.AuxInt = boolToAuxInt(bounded)
 22795  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 22796  		v0.AddArg(y)
 22797  		v.AddArg2(x, v0)
 22798  		return true
 22799  	}
 22800  	return false
 22801  }
 22802  func rewriteValueARM64_OpRsh64x16(v *Value) bool {
 22803  	v_1 := v.Args[1]
 22804  	v_0 := v.Args[0]
 22805  	b := v.Block
 22806  	typ := &b.Func.Config.Types
 22807  	// match: (Rsh64x16 <t> x y)
 22808  	// cond: shiftIsBounded(v)
 22809  	// result: (SRA <t> x y)
 22810  	for {
 22811  		t := v.Type
 22812  		x := v_0
 22813  		y := v_1
 22814  		if !(shiftIsBounded(v)) {
 22815  			break
 22816  		}
 22817  		v.reset(OpARM64SRA)
 22818  		v.Type = t
 22819  		v.AddArg2(x, y)
 22820  		return true
 22821  	}
 22822  	// match: (Rsh64x16 <t> [bounded] x y)
 22823  	// cond: !shiftIsBounded(v)
 22824  	// result: (Rsh64x32 <t> [bounded] x (ZeroExt16to32 y))
 22825  	for {
 22826  		t := v.Type
 22827  		bounded := auxIntToBool(v.AuxInt)
 22828  		x := v_0
 22829  		y := v_1
 22830  		if !(!shiftIsBounded(v)) {
 22831  			break
 22832  		}
 22833  		v.reset(OpRsh64x32)
 22834  		v.Type = t
 22835  		v.AuxInt = boolToAuxInt(bounded)
 22836  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 22837  		v0.AddArg(y)
 22838  		v.AddArg2(x, v0)
 22839  		return true
 22840  	}
 22841  	return false
 22842  }
 22843  func rewriteValueARM64_OpRsh64x32(v *Value) bool {
 22844  	v_1 := v.Args[1]
 22845  	v_0 := v.Args[0]
 22846  	b := v.Block
 22847  	// match: (Rsh64x32 <t> x y)
 22848  	// cond: shiftIsBounded(v)
 22849  	// result: (SRA <t> x y)
 22850  	for {
 22851  		t := v.Type
 22852  		x := v_0
 22853  		y := v_1
 22854  		if !(shiftIsBounded(v)) {
 22855  			break
 22856  		}
 22857  		v.reset(OpARM64SRA)
 22858  		v.Type = t
 22859  		v.AddArg2(x, y)
 22860  		return true
 22861  	}
 22862  	// match: (Rsh64x32 <t> x y)
 22863  	// cond: !shiftIsBounded(v)
 22864  	// result: (SRA x (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPWconst [64] y)))
 22865  	for {
 22866  		x := v_0
 22867  		y := v_1
 22868  		if !(!shiftIsBounded(v)) {
 22869  			break
 22870  		}
 22871  		v.reset(OpARM64SRA)
 22872  		v0 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 22873  		v0.AuxInt = opToAuxInt(OpARM64LessThanU)
 22874  		v1 := b.NewValue0(v.Pos, OpConst64, y.Type)
 22875  		v1.AuxInt = int64ToAuxInt(63)
 22876  		v2 := b.NewValue0(v.Pos, OpARM64CMPWconst, types.TypeFlags)
 22877  		v2.AuxInt = int32ToAuxInt(64)
 22878  		v2.AddArg(y)
 22879  		v0.AddArg3(y, v1, v2)
 22880  		v.AddArg2(x, v0)
 22881  		return true
 22882  	}
 22883  	return false
 22884  }
 22885  func rewriteValueARM64_OpRsh64x64(v *Value) bool {
 22886  	v_1 := v.Args[1]
 22887  	v_0 := v.Args[0]
 22888  	b := v.Block
 22889  	// match: (Rsh64x64 <t> x y)
 22890  	// cond: shiftIsBounded(v)
 22891  	// result: (SRA <t> x y)
 22892  	for {
 22893  		t := v.Type
 22894  		x := v_0
 22895  		y := v_1
 22896  		if !(shiftIsBounded(v)) {
 22897  			break
 22898  		}
 22899  		v.reset(OpARM64SRA)
 22900  		v.Type = t
 22901  		v.AddArg2(x, y)
 22902  		return true
 22903  	}
 22904  	// match: (Rsh64x64 <t> x y)
 22905  	// cond: !shiftIsBounded(v)
 22906  	// result: (SRA x (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] y)))
 22907  	for {
 22908  		x := v_0
 22909  		y := v_1
 22910  		if !(!shiftIsBounded(v)) {
 22911  			break
 22912  		}
 22913  		v.reset(OpARM64SRA)
 22914  		v0 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 22915  		v0.AuxInt = opToAuxInt(OpARM64LessThanU)
 22916  		v1 := b.NewValue0(v.Pos, OpConst64, y.Type)
 22917  		v1.AuxInt = int64ToAuxInt(63)
 22918  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 22919  		v2.AuxInt = int64ToAuxInt(64)
 22920  		v2.AddArg(y)
 22921  		v0.AddArg3(y, v1, v2)
 22922  		v.AddArg2(x, v0)
 22923  		return true
 22924  	}
 22925  	return false
 22926  }
 22927  func rewriteValueARM64_OpRsh64x8(v *Value) bool {
 22928  	v_1 := v.Args[1]
 22929  	v_0 := v.Args[0]
 22930  	b := v.Block
 22931  	typ := &b.Func.Config.Types
 22932  	// match: (Rsh64x8 <t> x y)
 22933  	// cond: shiftIsBounded(v)
 22934  	// result: (SRA <t> x y)
 22935  	for {
 22936  		t := v.Type
 22937  		x := v_0
 22938  		y := v_1
 22939  		if !(shiftIsBounded(v)) {
 22940  			break
 22941  		}
 22942  		v.reset(OpARM64SRA)
 22943  		v.Type = t
 22944  		v.AddArg2(x, y)
 22945  		return true
 22946  	}
 22947  	// match: (Rsh64x8 <t> [bounded] x y)
 22948  	// cond: !shiftIsBounded(v)
 22949  	// result: (Rsh64x32 <t> [bounded] x (ZeroExt8to32 y))
 22950  	for {
 22951  		t := v.Type
 22952  		bounded := auxIntToBool(v.AuxInt)
 22953  		x := v_0
 22954  		y := v_1
 22955  		if !(!shiftIsBounded(v)) {
 22956  			break
 22957  		}
 22958  		v.reset(OpRsh64x32)
 22959  		v.Type = t
 22960  		v.AuxInt = boolToAuxInt(bounded)
 22961  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 22962  		v0.AddArg(y)
 22963  		v.AddArg2(x, v0)
 22964  		return true
 22965  	}
 22966  	return false
 22967  }
 22968  func rewriteValueARM64_OpRsh8Ux16(v *Value) bool {
 22969  	v_1 := v.Args[1]
 22970  	v_0 := v.Args[0]
 22971  	b := v.Block
 22972  	typ := &b.Func.Config.Types
 22973  	// match: (Rsh8Ux16 <t> [bounded] x y)
 22974  	// result: (Rsh64Ux16 <t> [bounded] (ZeroExt8to64 x) y)
 22975  	for {
 22976  		t := v.Type
 22977  		bounded := auxIntToBool(v.AuxInt)
 22978  		x := v_0
 22979  		y := v_1
 22980  		v.reset(OpRsh64Ux16)
 22981  		v.Type = t
 22982  		v.AuxInt = boolToAuxInt(bounded)
 22983  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 22984  		v0.AddArg(x)
 22985  		v.AddArg2(v0, y)
 22986  		return true
 22987  	}
 22988  }
 22989  func rewriteValueARM64_OpRsh8Ux32(v *Value) bool {
 22990  	v_1 := v.Args[1]
 22991  	v_0 := v.Args[0]
 22992  	b := v.Block
 22993  	typ := &b.Func.Config.Types
 22994  	// match: (Rsh8Ux32 <t> [bounded] x y)
 22995  	// result: (Rsh64Ux32 <t> [bounded] (ZeroExt8to64 x) y)
 22996  	for {
 22997  		t := v.Type
 22998  		bounded := auxIntToBool(v.AuxInt)
 22999  		x := v_0
 23000  		y := v_1
 23001  		v.reset(OpRsh64Ux32)
 23002  		v.Type = t
 23003  		v.AuxInt = boolToAuxInt(bounded)
 23004  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 23005  		v0.AddArg(x)
 23006  		v.AddArg2(v0, y)
 23007  		return true
 23008  	}
 23009  }
 23010  func rewriteValueARM64_OpRsh8Ux64(v *Value) bool {
 23011  	v_1 := v.Args[1]
 23012  	v_0 := v.Args[0]
 23013  	b := v.Block
 23014  	typ := &b.Func.Config.Types
 23015  	// match: (Rsh8Ux64 <t> [bounded] x y)
 23016  	// result: (Rsh64Ux64 <t> [bounded] (ZeroExt8to64 x) y)
 23017  	for {
 23018  		t := v.Type
 23019  		bounded := auxIntToBool(v.AuxInt)
 23020  		x := v_0
 23021  		y := v_1
 23022  		v.reset(OpRsh64Ux64)
 23023  		v.Type = t
 23024  		v.AuxInt = boolToAuxInt(bounded)
 23025  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 23026  		v0.AddArg(x)
 23027  		v.AddArg2(v0, y)
 23028  		return true
 23029  	}
 23030  }
 23031  func rewriteValueARM64_OpRsh8Ux8(v *Value) bool {
 23032  	v_1 := v.Args[1]
 23033  	v_0 := v.Args[0]
 23034  	b := v.Block
 23035  	typ := &b.Func.Config.Types
 23036  	// match: (Rsh8Ux8 <t> [bounded] x y)
 23037  	// result: (Rsh64Ux8 <t> [bounded] (ZeroExt8to64 x) y)
 23038  	for {
 23039  		t := v.Type
 23040  		bounded := auxIntToBool(v.AuxInt)
 23041  		x := v_0
 23042  		y := v_1
 23043  		v.reset(OpRsh64Ux8)
 23044  		v.Type = t
 23045  		v.AuxInt = boolToAuxInt(bounded)
 23046  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 23047  		v0.AddArg(x)
 23048  		v.AddArg2(v0, y)
 23049  		return true
 23050  	}
 23051  }
 23052  func rewriteValueARM64_OpRsh8x16(v *Value) bool {
 23053  	v_1 := v.Args[1]
 23054  	v_0 := v.Args[0]
 23055  	b := v.Block
 23056  	typ := &b.Func.Config.Types
 23057  	// match: (Rsh8x16 <t> [bounded] x y)
 23058  	// result: (Rsh64x16 <t> [bounded] (SignExt8to64 x) y)
 23059  	for {
 23060  		t := v.Type
 23061  		bounded := auxIntToBool(v.AuxInt)
 23062  		x := v_0
 23063  		y := v_1
 23064  		v.reset(OpRsh64x16)
 23065  		v.Type = t
 23066  		v.AuxInt = boolToAuxInt(bounded)
 23067  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 23068  		v0.AddArg(x)
 23069  		v.AddArg2(v0, y)
 23070  		return true
 23071  	}
 23072  }
 23073  func rewriteValueARM64_OpRsh8x32(v *Value) bool {
 23074  	v_1 := v.Args[1]
 23075  	v_0 := v.Args[0]
 23076  	b := v.Block
 23077  	typ := &b.Func.Config.Types
 23078  	// match: (Rsh8x32 <t> [bounded] x y)
 23079  	// result: (Rsh64x32 <t> [bounded] (SignExt8to64 x) y)
 23080  	for {
 23081  		t := v.Type
 23082  		bounded := auxIntToBool(v.AuxInt)
 23083  		x := v_0
 23084  		y := v_1
 23085  		v.reset(OpRsh64x32)
 23086  		v.Type = t
 23087  		v.AuxInt = boolToAuxInt(bounded)
 23088  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 23089  		v0.AddArg(x)
 23090  		v.AddArg2(v0, y)
 23091  		return true
 23092  	}
 23093  }
 23094  func rewriteValueARM64_OpRsh8x64(v *Value) bool {
 23095  	v_1 := v.Args[1]
 23096  	v_0 := v.Args[0]
 23097  	b := v.Block
 23098  	typ := &b.Func.Config.Types
 23099  	// match: (Rsh8x64 <t> [bounded] x y)
 23100  	// result: (Rsh64x64 <t> [bounded] (SignExt8to64 x) y)
 23101  	for {
 23102  		t := v.Type
 23103  		bounded := auxIntToBool(v.AuxInt)
 23104  		x := v_0
 23105  		y := v_1
 23106  		v.reset(OpRsh64x64)
 23107  		v.Type = t
 23108  		v.AuxInt = boolToAuxInt(bounded)
 23109  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 23110  		v0.AddArg(x)
 23111  		v.AddArg2(v0, y)
 23112  		return true
 23113  	}
 23114  }
 23115  func rewriteValueARM64_OpRsh8x8(v *Value) bool {
 23116  	v_1 := v.Args[1]
 23117  	v_0 := v.Args[0]
 23118  	b := v.Block
 23119  	typ := &b.Func.Config.Types
 23120  	// match: (Rsh8x8 <t> [bounded] x y)
 23121  	// result: (Rsh64x8 <t> [bounded] (SignExt8to64 x) y)
 23122  	for {
 23123  		t := v.Type
 23124  		bounded := auxIntToBool(v.AuxInt)
 23125  		x := v_0
 23126  		y := v_1
 23127  		v.reset(OpRsh64x8)
 23128  		v.Type = t
 23129  		v.AuxInt = boolToAuxInt(bounded)
 23130  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 23131  		v0.AddArg(x)
 23132  		v.AddArg2(v0, y)
 23133  		return true
 23134  	}
 23135  }
 23136  func rewriteValueARM64_OpSelect0(v *Value) bool {
 23137  	v_0 := v.Args[0]
 23138  	b := v.Block
 23139  	typ := &b.Func.Config.Types
 23140  	// match: (Select0 (Mul64uhilo x y))
 23141  	// result: (UMULH x y)
 23142  	for {
 23143  		if v_0.Op != OpMul64uhilo {
 23144  			break
 23145  		}
 23146  		y := v_0.Args[1]
 23147  		x := v_0.Args[0]
 23148  		v.reset(OpARM64UMULH)
 23149  		v.AddArg2(x, y)
 23150  		return true
 23151  	}
 23152  	// match: (Select0 (Add64carry x y c))
 23153  	// result: (Select0 <typ.UInt64> (ADCSflags x y (Select1 <types.TypeFlags> (ADDSconstflags [-1] c))))
 23154  	for {
 23155  		if v_0.Op != OpAdd64carry {
 23156  			break
 23157  		}
 23158  		c := v_0.Args[2]
 23159  		x := v_0.Args[0]
 23160  		y := v_0.Args[1]
 23161  		v.reset(OpSelect0)
 23162  		v.Type = typ.UInt64
 23163  		v0 := b.NewValue0(v.Pos, OpARM64ADCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 23164  		v1 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 23165  		v2 := b.NewValue0(v.Pos, OpARM64ADDSconstflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 23166  		v2.AuxInt = int64ToAuxInt(-1)
 23167  		v2.AddArg(c)
 23168  		v1.AddArg(v2)
 23169  		v0.AddArg3(x, y, v1)
 23170  		v.AddArg(v0)
 23171  		return true
 23172  	}
 23173  	// match: (Select0 (Sub64borrow x y bo))
 23174  	// result: (Select0 <typ.UInt64> (SBCSflags x y (Select1 <types.TypeFlags> (NEGSflags bo))))
 23175  	for {
 23176  		if v_0.Op != OpSub64borrow {
 23177  			break
 23178  		}
 23179  		bo := v_0.Args[2]
 23180  		x := v_0.Args[0]
 23181  		y := v_0.Args[1]
 23182  		v.reset(OpSelect0)
 23183  		v.Type = typ.UInt64
 23184  		v0 := b.NewValue0(v.Pos, OpARM64SBCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 23185  		v1 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 23186  		v2 := b.NewValue0(v.Pos, OpARM64NEGSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 23187  		v2.AddArg(bo)
 23188  		v1.AddArg(v2)
 23189  		v0.AddArg3(x, y, v1)
 23190  		v.AddArg(v0)
 23191  		return true
 23192  	}
 23193  	// match: (Select0 (Mul64uover x y))
 23194  	// result: (MUL x y)
 23195  	for {
 23196  		if v_0.Op != OpMul64uover {
 23197  			break
 23198  		}
 23199  		y := v_0.Args[1]
 23200  		x := v_0.Args[0]
 23201  		v.reset(OpARM64MUL)
 23202  		v.AddArg2(x, y)
 23203  		return true
 23204  	}
 23205  	return false
 23206  }
 23207  func rewriteValueARM64_OpSelect1(v *Value) bool {
 23208  	v_0 := v.Args[0]
 23209  	b := v.Block
 23210  	typ := &b.Func.Config.Types
 23211  	// match: (Select1 (Mul64uhilo x y))
 23212  	// result: (MUL x y)
 23213  	for {
 23214  		if v_0.Op != OpMul64uhilo {
 23215  			break
 23216  		}
 23217  		y := v_0.Args[1]
 23218  		x := v_0.Args[0]
 23219  		v.reset(OpARM64MUL)
 23220  		v.AddArg2(x, y)
 23221  		return true
 23222  	}
 23223  	// match: (Select1 (Add64carry x y c))
 23224  	// result: (ADCzerocarry <typ.UInt64> (Select1 <types.TypeFlags> (ADCSflags x y (Select1 <types.TypeFlags> (ADDSconstflags [-1] c)))))
 23225  	for {
 23226  		if v_0.Op != OpAdd64carry {
 23227  			break
 23228  		}
 23229  		c := v_0.Args[2]
 23230  		x := v_0.Args[0]
 23231  		y := v_0.Args[1]
 23232  		v.reset(OpARM64ADCzerocarry)
 23233  		v.Type = typ.UInt64
 23234  		v0 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 23235  		v1 := b.NewValue0(v.Pos, OpARM64ADCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 23236  		v2 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 23237  		v3 := b.NewValue0(v.Pos, OpARM64ADDSconstflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 23238  		v3.AuxInt = int64ToAuxInt(-1)
 23239  		v3.AddArg(c)
 23240  		v2.AddArg(v3)
 23241  		v1.AddArg3(x, y, v2)
 23242  		v0.AddArg(v1)
 23243  		v.AddArg(v0)
 23244  		return true
 23245  	}
 23246  	// match: (Select1 (Sub64borrow x y bo))
 23247  	// result: (NEG <typ.UInt64> (NGCzerocarry <typ.UInt64> (Select1 <types.TypeFlags> (SBCSflags x y (Select1 <types.TypeFlags> (NEGSflags bo))))))
 23248  	for {
 23249  		if v_0.Op != OpSub64borrow {
 23250  			break
 23251  		}
 23252  		bo := v_0.Args[2]
 23253  		x := v_0.Args[0]
 23254  		y := v_0.Args[1]
 23255  		v.reset(OpARM64NEG)
 23256  		v.Type = typ.UInt64
 23257  		v0 := b.NewValue0(v.Pos, OpARM64NGCzerocarry, typ.UInt64)
 23258  		v1 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 23259  		v2 := b.NewValue0(v.Pos, OpARM64SBCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 23260  		v3 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 23261  		v4 := b.NewValue0(v.Pos, OpARM64NEGSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 23262  		v4.AddArg(bo)
 23263  		v3.AddArg(v4)
 23264  		v2.AddArg3(x, y, v3)
 23265  		v1.AddArg(v2)
 23266  		v0.AddArg(v1)
 23267  		v.AddArg(v0)
 23268  		return true
 23269  	}
 23270  	// match: (Select1 (Mul64uover x y))
 23271  	// result: (NotEqual (CMPconst (UMULH <typ.UInt64> x y) [0]))
 23272  	for {
 23273  		if v_0.Op != OpMul64uover {
 23274  			break
 23275  		}
 23276  		y := v_0.Args[1]
 23277  		x := v_0.Args[0]
 23278  		v.reset(OpARM64NotEqual)
 23279  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23280  		v0.AuxInt = int64ToAuxInt(0)
 23281  		v1 := b.NewValue0(v.Pos, OpARM64UMULH, typ.UInt64)
 23282  		v1.AddArg2(x, y)
 23283  		v0.AddArg(v1)
 23284  		v.AddArg(v0)
 23285  		return true
 23286  	}
 23287  	return false
 23288  }
 23289  func rewriteValueARM64_OpSelectN(v *Value) bool {
 23290  	v_0 := v.Args[0]
 23291  	b := v.Block
 23292  	config := b.Func.Config
 23293  	// match: (SelectN [0] call:(CALLstatic {sym} s1:(MOVDstore _ (MOVDconst [sz]) s2:(MOVDstore _ src s3:(MOVDstore {t} _ dst mem)))))
 23294  	// 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)
 23295  	// result: (Move [sz] dst src mem)
 23296  	for {
 23297  		if auxIntToInt64(v.AuxInt) != 0 {
 23298  			break
 23299  		}
 23300  		call := v_0
 23301  		if call.Op != OpARM64CALLstatic || len(call.Args) != 1 {
 23302  			break
 23303  		}
 23304  		sym := auxToCall(call.Aux)
 23305  		s1 := call.Args[0]
 23306  		if s1.Op != OpARM64MOVDstore {
 23307  			break
 23308  		}
 23309  		_ = s1.Args[2]
 23310  		s1_1 := s1.Args[1]
 23311  		if s1_1.Op != OpARM64MOVDconst {
 23312  			break
 23313  		}
 23314  		sz := auxIntToInt64(s1_1.AuxInt)
 23315  		s2 := s1.Args[2]
 23316  		if s2.Op != OpARM64MOVDstore {
 23317  			break
 23318  		}
 23319  		_ = s2.Args[2]
 23320  		src := s2.Args[1]
 23321  		s3 := s2.Args[2]
 23322  		if s3.Op != OpARM64MOVDstore {
 23323  			break
 23324  		}
 23325  		mem := s3.Args[2]
 23326  		dst := s3.Args[1]
 23327  		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)) {
 23328  			break
 23329  		}
 23330  		v.reset(OpMove)
 23331  		v.AuxInt = int64ToAuxInt(sz)
 23332  		v.AddArg3(dst, src, mem)
 23333  		return true
 23334  	}
 23335  	// match: (SelectN [0] call:(CALLstatic {sym} dst src (MOVDconst [sz]) mem))
 23336  	// cond: sz >= 0 && isSameCall(sym, "runtime.memmove") && call.Uses == 1 && isInlinableMemmove(dst, src, sz, config) && clobber(call)
 23337  	// result: (Move [sz] dst src mem)
 23338  	for {
 23339  		if auxIntToInt64(v.AuxInt) != 0 {
 23340  			break
 23341  		}
 23342  		call := v_0
 23343  		if call.Op != OpARM64CALLstatic || len(call.Args) != 4 {
 23344  			break
 23345  		}
 23346  		sym := auxToCall(call.Aux)
 23347  		mem := call.Args[3]
 23348  		dst := call.Args[0]
 23349  		src := call.Args[1]
 23350  		call_2 := call.Args[2]
 23351  		if call_2.Op != OpARM64MOVDconst {
 23352  			break
 23353  		}
 23354  		sz := auxIntToInt64(call_2.AuxInt)
 23355  		if !(sz >= 0 && isSameCall(sym, "runtime.memmove") && call.Uses == 1 && isInlinableMemmove(dst, src, sz, config) && clobber(call)) {
 23356  			break
 23357  		}
 23358  		v.reset(OpMove)
 23359  		v.AuxInt = int64ToAuxInt(sz)
 23360  		v.AddArg3(dst, src, mem)
 23361  		return true
 23362  	}
 23363  	return false
 23364  }
 23365  func rewriteValueARM64_OpShiftAllLeftInt16x8(v *Value) bool {
 23366  	v_1 := v.Args[1]
 23367  	v_0 := v.Args[0]
 23368  	b := v.Block
 23369  	typ := &b.Func.Config.Types
 23370  	// match: (ShiftAllLeftInt16x8 x y)
 23371  	// result: (VSSHL8H x (VDUPHbcast [0] (VMOVHins [0] x (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y)))))
 23372  	for {
 23373  		x := v_0
 23374  		y := v_1
 23375  		v.reset(OpARM64VSSHL8H)
 23376  		v0 := b.NewValue0(v.Pos, OpARM64VDUPHbcast, typ.Vec128)
 23377  		v0.AuxInt = uint8ToAuxInt(0)
 23378  		v1 := b.NewValue0(v.Pos, OpARM64VMOVHins, typ.Vec128)
 23379  		v1.AuxInt = uint8ToAuxInt(0)
 23380  		v2 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23381  		v2.AuxInt = opToAuxInt(OpARM64LessThanU)
 23382  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23383  		v3.AuxInt = int64ToAuxInt(127)
 23384  		v4 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23385  		v4.AuxInt = int64ToAuxInt(127)
 23386  		v4.AddArg(y)
 23387  		v2.AddArg3(y, v3, v4)
 23388  		v1.AddArg2(x, v2)
 23389  		v0.AddArg(v1)
 23390  		v.AddArg2(x, v0)
 23391  		return true
 23392  	}
 23393  }
 23394  func rewriteValueARM64_OpShiftAllLeftInt32x4(v *Value) bool {
 23395  	v_1 := v.Args[1]
 23396  	v_0 := v.Args[0]
 23397  	b := v.Block
 23398  	typ := &b.Func.Config.Types
 23399  	// match: (ShiftAllLeftInt32x4 x y)
 23400  	// result: (VSSHL4S x (VDUPSbcast [0] (VMOVSins [0] x (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y)))))
 23401  	for {
 23402  		x := v_0
 23403  		y := v_1
 23404  		v.reset(OpARM64VSSHL4S)
 23405  		v0 := b.NewValue0(v.Pos, OpARM64VDUPSbcast, typ.Vec128)
 23406  		v0.AuxInt = uint8ToAuxInt(0)
 23407  		v1 := b.NewValue0(v.Pos, OpARM64VMOVSins, typ.Vec128)
 23408  		v1.AuxInt = uint8ToAuxInt(0)
 23409  		v2 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23410  		v2.AuxInt = opToAuxInt(OpARM64LessThanU)
 23411  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23412  		v3.AuxInt = int64ToAuxInt(127)
 23413  		v4 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23414  		v4.AuxInt = int64ToAuxInt(127)
 23415  		v4.AddArg(y)
 23416  		v2.AddArg3(y, v3, v4)
 23417  		v1.AddArg2(x, v2)
 23418  		v0.AddArg(v1)
 23419  		v.AddArg2(x, v0)
 23420  		return true
 23421  	}
 23422  }
 23423  func rewriteValueARM64_OpShiftAllLeftInt64x2(v *Value) bool {
 23424  	v_1 := v.Args[1]
 23425  	v_0 := v.Args[0]
 23426  	b := v.Block
 23427  	typ := &b.Func.Config.Types
 23428  	// match: (ShiftAllLeftInt64x2 x y)
 23429  	// result: (VSSHL2D x (VDUPDbcast [0] (VMOVDins [0] x (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y)))))
 23430  	for {
 23431  		x := v_0
 23432  		y := v_1
 23433  		v.reset(OpARM64VSSHL2D)
 23434  		v0 := b.NewValue0(v.Pos, OpARM64VDUPDbcast, typ.Vec128)
 23435  		v0.AuxInt = uint8ToAuxInt(0)
 23436  		v1 := b.NewValue0(v.Pos, OpARM64VMOVDins, typ.Vec128)
 23437  		v1.AuxInt = uint8ToAuxInt(0)
 23438  		v2 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23439  		v2.AuxInt = opToAuxInt(OpARM64LessThanU)
 23440  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23441  		v3.AuxInt = int64ToAuxInt(127)
 23442  		v4 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23443  		v4.AuxInt = int64ToAuxInt(127)
 23444  		v4.AddArg(y)
 23445  		v2.AddArg3(y, v3, v4)
 23446  		v1.AddArg2(x, v2)
 23447  		v0.AddArg(v1)
 23448  		v.AddArg2(x, v0)
 23449  		return true
 23450  	}
 23451  }
 23452  func rewriteValueARM64_OpShiftAllLeftInt8x16(v *Value) bool {
 23453  	v_1 := v.Args[1]
 23454  	v_0 := v.Args[0]
 23455  	b := v.Block
 23456  	typ := &b.Func.Config.Types
 23457  	// match: (ShiftAllLeftInt8x16 x y)
 23458  	// result: (VSSHL16B x (VDUPBbcast [0] (VMOVBins [0] x (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y)))))
 23459  	for {
 23460  		x := v_0
 23461  		y := v_1
 23462  		v.reset(OpARM64VSSHL16B)
 23463  		v0 := b.NewValue0(v.Pos, OpARM64VDUPBbcast, typ.Vec128)
 23464  		v0.AuxInt = uint8ToAuxInt(0)
 23465  		v1 := b.NewValue0(v.Pos, OpARM64VMOVBins, typ.Vec128)
 23466  		v1.AuxInt = uint8ToAuxInt(0)
 23467  		v2 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23468  		v2.AuxInt = opToAuxInt(OpARM64LessThanU)
 23469  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23470  		v3.AuxInt = int64ToAuxInt(127)
 23471  		v4 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23472  		v4.AuxInt = int64ToAuxInt(127)
 23473  		v4.AddArg(y)
 23474  		v2.AddArg3(y, v3, v4)
 23475  		v1.AddArg2(x, v2)
 23476  		v0.AddArg(v1)
 23477  		v.AddArg2(x, v0)
 23478  		return true
 23479  	}
 23480  }
 23481  func rewriteValueARM64_OpShiftAllLeftUint16x8(v *Value) bool {
 23482  	v_1 := v.Args[1]
 23483  	v_0 := v.Args[0]
 23484  	b := v.Block
 23485  	typ := &b.Func.Config.Types
 23486  	// match: (ShiftAllLeftUint16x8 x y)
 23487  	// result: (VUSHL8H x (VDUPHbcast [0] (VMOVHins [0] x (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y)))))
 23488  	for {
 23489  		x := v_0
 23490  		y := v_1
 23491  		v.reset(OpARM64VUSHL8H)
 23492  		v0 := b.NewValue0(v.Pos, OpARM64VDUPHbcast, typ.Vec128)
 23493  		v0.AuxInt = uint8ToAuxInt(0)
 23494  		v1 := b.NewValue0(v.Pos, OpARM64VMOVHins, typ.Vec128)
 23495  		v1.AuxInt = uint8ToAuxInt(0)
 23496  		v2 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23497  		v2.AuxInt = opToAuxInt(OpARM64LessThanU)
 23498  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23499  		v3.AuxInt = int64ToAuxInt(127)
 23500  		v4 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23501  		v4.AuxInt = int64ToAuxInt(127)
 23502  		v4.AddArg(y)
 23503  		v2.AddArg3(y, v3, v4)
 23504  		v1.AddArg2(x, v2)
 23505  		v0.AddArg(v1)
 23506  		v.AddArg2(x, v0)
 23507  		return true
 23508  	}
 23509  }
 23510  func rewriteValueARM64_OpShiftAllLeftUint32x4(v *Value) bool {
 23511  	v_1 := v.Args[1]
 23512  	v_0 := v.Args[0]
 23513  	b := v.Block
 23514  	typ := &b.Func.Config.Types
 23515  	// match: (ShiftAllLeftUint32x4 x y)
 23516  	// result: (VUSHL4S x (VDUPSbcast [0] (VMOVSins [0] x (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y)))))
 23517  	for {
 23518  		x := v_0
 23519  		y := v_1
 23520  		v.reset(OpARM64VUSHL4S)
 23521  		v0 := b.NewValue0(v.Pos, OpARM64VDUPSbcast, typ.Vec128)
 23522  		v0.AuxInt = uint8ToAuxInt(0)
 23523  		v1 := b.NewValue0(v.Pos, OpARM64VMOVSins, typ.Vec128)
 23524  		v1.AuxInt = uint8ToAuxInt(0)
 23525  		v2 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23526  		v2.AuxInt = opToAuxInt(OpARM64LessThanU)
 23527  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23528  		v3.AuxInt = int64ToAuxInt(127)
 23529  		v4 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23530  		v4.AuxInt = int64ToAuxInt(127)
 23531  		v4.AddArg(y)
 23532  		v2.AddArg3(y, v3, v4)
 23533  		v1.AddArg2(x, v2)
 23534  		v0.AddArg(v1)
 23535  		v.AddArg2(x, v0)
 23536  		return true
 23537  	}
 23538  }
 23539  func rewriteValueARM64_OpShiftAllLeftUint64x2(v *Value) bool {
 23540  	v_1 := v.Args[1]
 23541  	v_0 := v.Args[0]
 23542  	b := v.Block
 23543  	typ := &b.Func.Config.Types
 23544  	// match: (ShiftAllLeftUint64x2 x y)
 23545  	// result: (VUSHL2D x (VDUPDbcast [0] (VMOVDins [0] x (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y)))))
 23546  	for {
 23547  		x := v_0
 23548  		y := v_1
 23549  		v.reset(OpARM64VUSHL2D)
 23550  		v0 := b.NewValue0(v.Pos, OpARM64VDUPDbcast, typ.Vec128)
 23551  		v0.AuxInt = uint8ToAuxInt(0)
 23552  		v1 := b.NewValue0(v.Pos, OpARM64VMOVDins, typ.Vec128)
 23553  		v1.AuxInt = uint8ToAuxInt(0)
 23554  		v2 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23555  		v2.AuxInt = opToAuxInt(OpARM64LessThanU)
 23556  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23557  		v3.AuxInt = int64ToAuxInt(127)
 23558  		v4 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23559  		v4.AuxInt = int64ToAuxInt(127)
 23560  		v4.AddArg(y)
 23561  		v2.AddArg3(y, v3, v4)
 23562  		v1.AddArg2(x, v2)
 23563  		v0.AddArg(v1)
 23564  		v.AddArg2(x, v0)
 23565  		return true
 23566  	}
 23567  }
 23568  func rewriteValueARM64_OpShiftAllLeftUint8x16(v *Value) bool {
 23569  	v_1 := v.Args[1]
 23570  	v_0 := v.Args[0]
 23571  	b := v.Block
 23572  	typ := &b.Func.Config.Types
 23573  	// match: (ShiftAllLeftUint8x16 x y)
 23574  	// result: (VUSHL16B x (VDUPBbcast [0] (VMOVBins [0] x (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y)))))
 23575  	for {
 23576  		x := v_0
 23577  		y := v_1
 23578  		v.reset(OpARM64VUSHL16B)
 23579  		v0 := b.NewValue0(v.Pos, OpARM64VDUPBbcast, typ.Vec128)
 23580  		v0.AuxInt = uint8ToAuxInt(0)
 23581  		v1 := b.NewValue0(v.Pos, OpARM64VMOVBins, typ.Vec128)
 23582  		v1.AuxInt = uint8ToAuxInt(0)
 23583  		v2 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23584  		v2.AuxInt = opToAuxInt(OpARM64LessThanU)
 23585  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23586  		v3.AuxInt = int64ToAuxInt(127)
 23587  		v4 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23588  		v4.AuxInt = int64ToAuxInt(127)
 23589  		v4.AddArg(y)
 23590  		v2.AddArg3(y, v3, v4)
 23591  		v1.AddArg2(x, v2)
 23592  		v0.AddArg(v1)
 23593  		v.AddArg2(x, v0)
 23594  		return true
 23595  	}
 23596  }
 23597  func rewriteValueARM64_OpShiftAllRightInt16x8(v *Value) bool {
 23598  	v_1 := v.Args[1]
 23599  	v_0 := v.Args[0]
 23600  	b := v.Block
 23601  	typ := &b.Func.Config.Types
 23602  	// match: (ShiftAllRightInt16x8 x y)
 23603  	// result: (VSSHL8H x (VDUPHbcast [0] (VMOVHins [0] x (NEG <typ.Int64> (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y))))))
 23604  	for {
 23605  		x := v_0
 23606  		y := v_1
 23607  		v.reset(OpARM64VSSHL8H)
 23608  		v0 := b.NewValue0(v.Pos, OpARM64VDUPHbcast, typ.Vec128)
 23609  		v0.AuxInt = uint8ToAuxInt(0)
 23610  		v1 := b.NewValue0(v.Pos, OpARM64VMOVHins, typ.Vec128)
 23611  		v1.AuxInt = uint8ToAuxInt(0)
 23612  		v2 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 23613  		v3 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23614  		v3.AuxInt = opToAuxInt(OpARM64LessThanU)
 23615  		v4 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23616  		v4.AuxInt = int64ToAuxInt(127)
 23617  		v5 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23618  		v5.AuxInt = int64ToAuxInt(127)
 23619  		v5.AddArg(y)
 23620  		v3.AddArg3(y, v4, v5)
 23621  		v2.AddArg(v3)
 23622  		v1.AddArg2(x, v2)
 23623  		v0.AddArg(v1)
 23624  		v.AddArg2(x, v0)
 23625  		return true
 23626  	}
 23627  }
 23628  func rewriteValueARM64_OpShiftAllRightInt32x4(v *Value) bool {
 23629  	v_1 := v.Args[1]
 23630  	v_0 := v.Args[0]
 23631  	b := v.Block
 23632  	typ := &b.Func.Config.Types
 23633  	// match: (ShiftAllRightInt32x4 x y)
 23634  	// result: (VSSHL4S x (VDUPSbcast [0] (VMOVSins [0] x (NEG <typ.Int64> (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y))))))
 23635  	for {
 23636  		x := v_0
 23637  		y := v_1
 23638  		v.reset(OpARM64VSSHL4S)
 23639  		v0 := b.NewValue0(v.Pos, OpARM64VDUPSbcast, typ.Vec128)
 23640  		v0.AuxInt = uint8ToAuxInt(0)
 23641  		v1 := b.NewValue0(v.Pos, OpARM64VMOVSins, typ.Vec128)
 23642  		v1.AuxInt = uint8ToAuxInt(0)
 23643  		v2 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 23644  		v3 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23645  		v3.AuxInt = opToAuxInt(OpARM64LessThanU)
 23646  		v4 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23647  		v4.AuxInt = int64ToAuxInt(127)
 23648  		v5 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23649  		v5.AuxInt = int64ToAuxInt(127)
 23650  		v5.AddArg(y)
 23651  		v3.AddArg3(y, v4, v5)
 23652  		v2.AddArg(v3)
 23653  		v1.AddArg2(x, v2)
 23654  		v0.AddArg(v1)
 23655  		v.AddArg2(x, v0)
 23656  		return true
 23657  	}
 23658  }
 23659  func rewriteValueARM64_OpShiftAllRightInt64x2(v *Value) bool {
 23660  	v_1 := v.Args[1]
 23661  	v_0 := v.Args[0]
 23662  	b := v.Block
 23663  	typ := &b.Func.Config.Types
 23664  	// match: (ShiftAllRightInt64x2 x y)
 23665  	// result: (VSSHL2D x (VDUPDbcast [0] (VMOVDins [0] x (NEG <typ.Int64> (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y))))))
 23666  	for {
 23667  		x := v_0
 23668  		y := v_1
 23669  		v.reset(OpARM64VSSHL2D)
 23670  		v0 := b.NewValue0(v.Pos, OpARM64VDUPDbcast, typ.Vec128)
 23671  		v0.AuxInt = uint8ToAuxInt(0)
 23672  		v1 := b.NewValue0(v.Pos, OpARM64VMOVDins, typ.Vec128)
 23673  		v1.AuxInt = uint8ToAuxInt(0)
 23674  		v2 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 23675  		v3 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23676  		v3.AuxInt = opToAuxInt(OpARM64LessThanU)
 23677  		v4 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23678  		v4.AuxInt = int64ToAuxInt(127)
 23679  		v5 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23680  		v5.AuxInt = int64ToAuxInt(127)
 23681  		v5.AddArg(y)
 23682  		v3.AddArg3(y, v4, v5)
 23683  		v2.AddArg(v3)
 23684  		v1.AddArg2(x, v2)
 23685  		v0.AddArg(v1)
 23686  		v.AddArg2(x, v0)
 23687  		return true
 23688  	}
 23689  }
 23690  func rewriteValueARM64_OpShiftAllRightInt8x16(v *Value) bool {
 23691  	v_1 := v.Args[1]
 23692  	v_0 := v.Args[0]
 23693  	b := v.Block
 23694  	typ := &b.Func.Config.Types
 23695  	// match: (ShiftAllRightInt8x16 x y)
 23696  	// result: (VSSHL16B x (VDUPBbcast [0] (VMOVBins [0] x (NEG <typ.Int64> (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y))))))
 23697  	for {
 23698  		x := v_0
 23699  		y := v_1
 23700  		v.reset(OpARM64VSSHL16B)
 23701  		v0 := b.NewValue0(v.Pos, OpARM64VDUPBbcast, typ.Vec128)
 23702  		v0.AuxInt = uint8ToAuxInt(0)
 23703  		v1 := b.NewValue0(v.Pos, OpARM64VMOVBins, typ.Vec128)
 23704  		v1.AuxInt = uint8ToAuxInt(0)
 23705  		v2 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 23706  		v3 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23707  		v3.AuxInt = opToAuxInt(OpARM64LessThanU)
 23708  		v4 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23709  		v4.AuxInt = int64ToAuxInt(127)
 23710  		v5 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23711  		v5.AuxInt = int64ToAuxInt(127)
 23712  		v5.AddArg(y)
 23713  		v3.AddArg3(y, v4, v5)
 23714  		v2.AddArg(v3)
 23715  		v1.AddArg2(x, v2)
 23716  		v0.AddArg(v1)
 23717  		v.AddArg2(x, v0)
 23718  		return true
 23719  	}
 23720  }
 23721  func rewriteValueARM64_OpShiftAllRightUint16x8(v *Value) bool {
 23722  	v_1 := v.Args[1]
 23723  	v_0 := v.Args[0]
 23724  	b := v.Block
 23725  	typ := &b.Func.Config.Types
 23726  	// match: (ShiftAllRightUint16x8 x y)
 23727  	// result: (VUSHL8H x (VDUPHbcast [0] (VMOVHins [0] x (NEG <typ.Int64> (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y))))))
 23728  	for {
 23729  		x := v_0
 23730  		y := v_1
 23731  		v.reset(OpARM64VUSHL8H)
 23732  		v0 := b.NewValue0(v.Pos, OpARM64VDUPHbcast, typ.Vec128)
 23733  		v0.AuxInt = uint8ToAuxInt(0)
 23734  		v1 := b.NewValue0(v.Pos, OpARM64VMOVHins, typ.Vec128)
 23735  		v1.AuxInt = uint8ToAuxInt(0)
 23736  		v2 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 23737  		v3 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23738  		v3.AuxInt = opToAuxInt(OpARM64LessThanU)
 23739  		v4 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23740  		v4.AuxInt = int64ToAuxInt(127)
 23741  		v5 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23742  		v5.AuxInt = int64ToAuxInt(127)
 23743  		v5.AddArg(y)
 23744  		v3.AddArg3(y, v4, v5)
 23745  		v2.AddArg(v3)
 23746  		v1.AddArg2(x, v2)
 23747  		v0.AddArg(v1)
 23748  		v.AddArg2(x, v0)
 23749  		return true
 23750  	}
 23751  }
 23752  func rewriteValueARM64_OpShiftAllRightUint32x4(v *Value) bool {
 23753  	v_1 := v.Args[1]
 23754  	v_0 := v.Args[0]
 23755  	b := v.Block
 23756  	typ := &b.Func.Config.Types
 23757  	// match: (ShiftAllRightUint32x4 x y)
 23758  	// result: (VUSHL4S x (VDUPSbcast [0] (VMOVSins [0] x (NEG <typ.Int64> (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y))))))
 23759  	for {
 23760  		x := v_0
 23761  		y := v_1
 23762  		v.reset(OpARM64VUSHL4S)
 23763  		v0 := b.NewValue0(v.Pos, OpARM64VDUPSbcast, typ.Vec128)
 23764  		v0.AuxInt = uint8ToAuxInt(0)
 23765  		v1 := b.NewValue0(v.Pos, OpARM64VMOVSins, typ.Vec128)
 23766  		v1.AuxInt = uint8ToAuxInt(0)
 23767  		v2 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 23768  		v3 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23769  		v3.AuxInt = opToAuxInt(OpARM64LessThanU)
 23770  		v4 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23771  		v4.AuxInt = int64ToAuxInt(127)
 23772  		v5 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23773  		v5.AuxInt = int64ToAuxInt(127)
 23774  		v5.AddArg(y)
 23775  		v3.AddArg3(y, v4, v5)
 23776  		v2.AddArg(v3)
 23777  		v1.AddArg2(x, v2)
 23778  		v0.AddArg(v1)
 23779  		v.AddArg2(x, v0)
 23780  		return true
 23781  	}
 23782  }
 23783  func rewriteValueARM64_OpShiftAllRightUint64x2(v *Value) bool {
 23784  	v_1 := v.Args[1]
 23785  	v_0 := v.Args[0]
 23786  	b := v.Block
 23787  	typ := &b.Func.Config.Types
 23788  	// match: (ShiftAllRightUint64x2 x y)
 23789  	// result: (VUSHL2D x (VDUPDbcast [0] (VMOVDins [0] x (NEG <typ.Int64> (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y))))))
 23790  	for {
 23791  		x := v_0
 23792  		y := v_1
 23793  		v.reset(OpARM64VUSHL2D)
 23794  		v0 := b.NewValue0(v.Pos, OpARM64VDUPDbcast, typ.Vec128)
 23795  		v0.AuxInt = uint8ToAuxInt(0)
 23796  		v1 := b.NewValue0(v.Pos, OpARM64VMOVDins, typ.Vec128)
 23797  		v1.AuxInt = uint8ToAuxInt(0)
 23798  		v2 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 23799  		v3 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23800  		v3.AuxInt = opToAuxInt(OpARM64LessThanU)
 23801  		v4 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23802  		v4.AuxInt = int64ToAuxInt(127)
 23803  		v5 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23804  		v5.AuxInt = int64ToAuxInt(127)
 23805  		v5.AddArg(y)
 23806  		v3.AddArg3(y, v4, v5)
 23807  		v2.AddArg(v3)
 23808  		v1.AddArg2(x, v2)
 23809  		v0.AddArg(v1)
 23810  		v.AddArg2(x, v0)
 23811  		return true
 23812  	}
 23813  }
 23814  func rewriteValueARM64_OpShiftAllRightUint8x16(v *Value) bool {
 23815  	v_1 := v.Args[1]
 23816  	v_0 := v.Args[0]
 23817  	b := v.Block
 23818  	typ := &b.Func.Config.Types
 23819  	// match: (ShiftAllRightUint8x16 x y)
 23820  	// result: (VUSHL16B x (VDUPBbcast [0] (VMOVBins [0] x (NEG <typ.Int64> (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y))))))
 23821  	for {
 23822  		x := v_0
 23823  		y := v_1
 23824  		v.reset(OpARM64VUSHL16B)
 23825  		v0 := b.NewValue0(v.Pos, OpARM64VDUPBbcast, typ.Vec128)
 23826  		v0.AuxInt = uint8ToAuxInt(0)
 23827  		v1 := b.NewValue0(v.Pos, OpARM64VMOVBins, typ.Vec128)
 23828  		v1.AuxInt = uint8ToAuxInt(0)
 23829  		v2 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 23830  		v3 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23831  		v3.AuxInt = opToAuxInt(OpARM64LessThanU)
 23832  		v4 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23833  		v4.AuxInt = int64ToAuxInt(127)
 23834  		v5 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23835  		v5.AuxInt = int64ToAuxInt(127)
 23836  		v5.AddArg(y)
 23837  		v3.AddArg3(y, v4, v5)
 23838  		v2.AddArg(v3)
 23839  		v1.AddArg2(x, v2)
 23840  		v0.AddArg(v1)
 23841  		v.AddArg2(x, v0)
 23842  		return true
 23843  	}
 23844  }
 23845  func rewriteValueARM64_OpSlicemask(v *Value) bool {
 23846  	v_0 := v.Args[0]
 23847  	b := v.Block
 23848  	// match: (Slicemask <t> x)
 23849  	// result: (SRAconst (NEG <t> x) [63])
 23850  	for {
 23851  		t := v.Type
 23852  		x := v_0
 23853  		v.reset(OpARM64SRAconst)
 23854  		v.AuxInt = int64ToAuxInt(63)
 23855  		v0 := b.NewValue0(v.Pos, OpARM64NEG, t)
 23856  		v0.AddArg(x)
 23857  		v.AddArg(v0)
 23858  		return true
 23859  	}
 23860  }
 23861  func rewriteValueARM64_OpStore(v *Value) bool {
 23862  	v_2 := v.Args[2]
 23863  	v_1 := v.Args[1]
 23864  	v_0 := v.Args[0]
 23865  	// match: (Store {t} ptr val mem)
 23866  	// cond: t.Size() == 1
 23867  	// result: (MOVBstore ptr val mem)
 23868  	for {
 23869  		t := auxToType(v.Aux)
 23870  		ptr := v_0
 23871  		val := v_1
 23872  		mem := v_2
 23873  		if !(t.Size() == 1) {
 23874  			break
 23875  		}
 23876  		v.reset(OpARM64MOVBstore)
 23877  		v.AddArg3(ptr, val, mem)
 23878  		return true
 23879  	}
 23880  	// match: (Store {t} ptr val mem)
 23881  	// cond: t.Size() == 2
 23882  	// result: (MOVHstore ptr val mem)
 23883  	for {
 23884  		t := auxToType(v.Aux)
 23885  		ptr := v_0
 23886  		val := v_1
 23887  		mem := v_2
 23888  		if !(t.Size() == 2) {
 23889  			break
 23890  		}
 23891  		v.reset(OpARM64MOVHstore)
 23892  		v.AddArg3(ptr, val, mem)
 23893  		return true
 23894  	}
 23895  	// match: (Store {t} ptr val mem)
 23896  	// cond: t.Size() == 4 && !t.IsFloat()
 23897  	// result: (MOVWstore ptr val mem)
 23898  	for {
 23899  		t := auxToType(v.Aux)
 23900  		ptr := v_0
 23901  		val := v_1
 23902  		mem := v_2
 23903  		if !(t.Size() == 4 && !t.IsFloat()) {
 23904  			break
 23905  		}
 23906  		v.reset(OpARM64MOVWstore)
 23907  		v.AddArg3(ptr, val, mem)
 23908  		return true
 23909  	}
 23910  	// match: (Store {t} ptr val mem)
 23911  	// cond: t.Size() == 8 && !t.IsFloat()
 23912  	// result: (MOVDstore ptr val mem)
 23913  	for {
 23914  		t := auxToType(v.Aux)
 23915  		ptr := v_0
 23916  		val := v_1
 23917  		mem := v_2
 23918  		if !(t.Size() == 8 && !t.IsFloat()) {
 23919  			break
 23920  		}
 23921  		v.reset(OpARM64MOVDstore)
 23922  		v.AddArg3(ptr, val, mem)
 23923  		return true
 23924  	}
 23925  	// match: (Store {t} ptr val mem)
 23926  	// cond: t.Size() == 4 && t.IsFloat()
 23927  	// result: (FMOVSstore ptr val mem)
 23928  	for {
 23929  		t := auxToType(v.Aux)
 23930  		ptr := v_0
 23931  		val := v_1
 23932  		mem := v_2
 23933  		if !(t.Size() == 4 && t.IsFloat()) {
 23934  			break
 23935  		}
 23936  		v.reset(OpARM64FMOVSstore)
 23937  		v.AddArg3(ptr, val, mem)
 23938  		return true
 23939  	}
 23940  	// match: (Store {t} ptr val mem)
 23941  	// cond: t.Size() == 8 && t.IsFloat()
 23942  	// result: (FMOVDstore ptr val mem)
 23943  	for {
 23944  		t := auxToType(v.Aux)
 23945  		ptr := v_0
 23946  		val := v_1
 23947  		mem := v_2
 23948  		if !(t.Size() == 8 && t.IsFloat()) {
 23949  			break
 23950  		}
 23951  		v.reset(OpARM64FMOVDstore)
 23952  		v.AddArg3(ptr, val, mem)
 23953  		return true
 23954  	}
 23955  	// match: (Store {t} ptr val mem)
 23956  	// cond: t.Size() == 16
 23957  	// result: (FMOVQstore ptr val mem)
 23958  	for {
 23959  		t := auxToType(v.Aux)
 23960  		ptr := v_0
 23961  		val := v_1
 23962  		mem := v_2
 23963  		if !(t.Size() == 16) {
 23964  			break
 23965  		}
 23966  		v.reset(OpARM64FMOVQstore)
 23967  		v.AddArg3(ptr, val, mem)
 23968  		return true
 23969  	}
 23970  	return false
 23971  }
 23972  func rewriteValueARM64_OpZero(v *Value) bool {
 23973  	v_1 := v.Args[1]
 23974  	v_0 := v.Args[0]
 23975  	b := v.Block
 23976  	typ := &b.Func.Config.Types
 23977  	// match: (Zero [0] _ mem)
 23978  	// result: mem
 23979  	for {
 23980  		if auxIntToInt64(v.AuxInt) != 0 {
 23981  			break
 23982  		}
 23983  		mem := v_1
 23984  		v.copyOf(mem)
 23985  		return true
 23986  	}
 23987  	// match: (Zero [1] ptr mem)
 23988  	// result: (MOVBstore ptr (MOVDconst [0]) mem)
 23989  	for {
 23990  		if auxIntToInt64(v.AuxInt) != 1 {
 23991  			break
 23992  		}
 23993  		ptr := v_0
 23994  		mem := v_1
 23995  		v.reset(OpARM64MOVBstore)
 23996  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23997  		v0.AuxInt = int64ToAuxInt(0)
 23998  		v.AddArg3(ptr, v0, mem)
 23999  		return true
 24000  	}
 24001  	// match: (Zero [2] ptr mem)
 24002  	// result: (MOVHstore ptr (MOVDconst [0]) mem)
 24003  	for {
 24004  		if auxIntToInt64(v.AuxInt) != 2 {
 24005  			break
 24006  		}
 24007  		ptr := v_0
 24008  		mem := v_1
 24009  		v.reset(OpARM64MOVHstore)
 24010  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24011  		v0.AuxInt = int64ToAuxInt(0)
 24012  		v.AddArg3(ptr, v0, mem)
 24013  		return true
 24014  	}
 24015  	// match: (Zero [4] ptr mem)
 24016  	// result: (MOVWstore ptr (MOVDconst [0]) mem)
 24017  	for {
 24018  		if auxIntToInt64(v.AuxInt) != 4 {
 24019  			break
 24020  		}
 24021  		ptr := v_0
 24022  		mem := v_1
 24023  		v.reset(OpARM64MOVWstore)
 24024  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24025  		v0.AuxInt = int64ToAuxInt(0)
 24026  		v.AddArg3(ptr, v0, mem)
 24027  		return true
 24028  	}
 24029  	// match: (Zero [3] ptr mem)
 24030  	// result: (MOVBstore [2] ptr (MOVDconst [0]) (MOVHstore ptr (MOVDconst [0]) mem))
 24031  	for {
 24032  		if auxIntToInt64(v.AuxInt) != 3 {
 24033  			break
 24034  		}
 24035  		ptr := v_0
 24036  		mem := v_1
 24037  		v.reset(OpARM64MOVBstore)
 24038  		v.AuxInt = int32ToAuxInt(2)
 24039  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24040  		v0.AuxInt = int64ToAuxInt(0)
 24041  		v1 := b.NewValue0(v.Pos, OpARM64MOVHstore, types.TypeMem)
 24042  		v1.AddArg3(ptr, v0, mem)
 24043  		v.AddArg3(ptr, v0, v1)
 24044  		return true
 24045  	}
 24046  	// match: (Zero [5] ptr mem)
 24047  	// result: (MOVBstore [4] ptr (MOVDconst [0]) (MOVWstore ptr (MOVDconst [0]) mem))
 24048  	for {
 24049  		if auxIntToInt64(v.AuxInt) != 5 {
 24050  			break
 24051  		}
 24052  		ptr := v_0
 24053  		mem := v_1
 24054  		v.reset(OpARM64MOVBstore)
 24055  		v.AuxInt = int32ToAuxInt(4)
 24056  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24057  		v0.AuxInt = int64ToAuxInt(0)
 24058  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 24059  		v1.AddArg3(ptr, v0, mem)
 24060  		v.AddArg3(ptr, v0, v1)
 24061  		return true
 24062  	}
 24063  	// match: (Zero [6] ptr mem)
 24064  	// result: (MOVHstore [4] ptr (MOVDconst [0]) (MOVWstore ptr (MOVDconst [0]) mem))
 24065  	for {
 24066  		if auxIntToInt64(v.AuxInt) != 6 {
 24067  			break
 24068  		}
 24069  		ptr := v_0
 24070  		mem := v_1
 24071  		v.reset(OpARM64MOVHstore)
 24072  		v.AuxInt = int32ToAuxInt(4)
 24073  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24074  		v0.AuxInt = int64ToAuxInt(0)
 24075  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 24076  		v1.AddArg3(ptr, v0, mem)
 24077  		v.AddArg3(ptr, v0, v1)
 24078  		return true
 24079  	}
 24080  	// match: (Zero [7] ptr mem)
 24081  	// result: (MOVWstore [3] ptr (MOVDconst [0]) (MOVWstore ptr (MOVDconst [0]) mem))
 24082  	for {
 24083  		if auxIntToInt64(v.AuxInt) != 7 {
 24084  			break
 24085  		}
 24086  		ptr := v_0
 24087  		mem := v_1
 24088  		v.reset(OpARM64MOVWstore)
 24089  		v.AuxInt = int32ToAuxInt(3)
 24090  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24091  		v0.AuxInt = int64ToAuxInt(0)
 24092  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 24093  		v1.AddArg3(ptr, v0, mem)
 24094  		v.AddArg3(ptr, v0, v1)
 24095  		return true
 24096  	}
 24097  	// match: (Zero [8] ptr mem)
 24098  	// result: (MOVDstore ptr (MOVDconst [0]) mem)
 24099  	for {
 24100  		if auxIntToInt64(v.AuxInt) != 8 {
 24101  			break
 24102  		}
 24103  		ptr := v_0
 24104  		mem := v_1
 24105  		v.reset(OpARM64MOVDstore)
 24106  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24107  		v0.AuxInt = int64ToAuxInt(0)
 24108  		v.AddArg3(ptr, v0, mem)
 24109  		return true
 24110  	}
 24111  	// match: (Zero [9] ptr mem)
 24112  	// result: (MOVBstore [8] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 24113  	for {
 24114  		if auxIntToInt64(v.AuxInt) != 9 {
 24115  			break
 24116  		}
 24117  		ptr := v_0
 24118  		mem := v_1
 24119  		v.reset(OpARM64MOVBstore)
 24120  		v.AuxInt = int32ToAuxInt(8)
 24121  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24122  		v0.AuxInt = int64ToAuxInt(0)
 24123  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 24124  		v1.AddArg3(ptr, v0, mem)
 24125  		v.AddArg3(ptr, v0, v1)
 24126  		return true
 24127  	}
 24128  	// match: (Zero [10] ptr mem)
 24129  	// result: (MOVHstore [8] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 24130  	for {
 24131  		if auxIntToInt64(v.AuxInt) != 10 {
 24132  			break
 24133  		}
 24134  		ptr := v_0
 24135  		mem := v_1
 24136  		v.reset(OpARM64MOVHstore)
 24137  		v.AuxInt = int32ToAuxInt(8)
 24138  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24139  		v0.AuxInt = int64ToAuxInt(0)
 24140  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 24141  		v1.AddArg3(ptr, v0, mem)
 24142  		v.AddArg3(ptr, v0, v1)
 24143  		return true
 24144  	}
 24145  	// match: (Zero [11] ptr mem)
 24146  	// result: (MOVDstore [3] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 24147  	for {
 24148  		if auxIntToInt64(v.AuxInt) != 11 {
 24149  			break
 24150  		}
 24151  		ptr := v_0
 24152  		mem := v_1
 24153  		v.reset(OpARM64MOVDstore)
 24154  		v.AuxInt = int32ToAuxInt(3)
 24155  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24156  		v0.AuxInt = int64ToAuxInt(0)
 24157  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 24158  		v1.AddArg3(ptr, v0, mem)
 24159  		v.AddArg3(ptr, v0, v1)
 24160  		return true
 24161  	}
 24162  	// match: (Zero [12] ptr mem)
 24163  	// result: (MOVWstore [8] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 24164  	for {
 24165  		if auxIntToInt64(v.AuxInt) != 12 {
 24166  			break
 24167  		}
 24168  		ptr := v_0
 24169  		mem := v_1
 24170  		v.reset(OpARM64MOVWstore)
 24171  		v.AuxInt = int32ToAuxInt(8)
 24172  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24173  		v0.AuxInt = int64ToAuxInt(0)
 24174  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 24175  		v1.AddArg3(ptr, v0, mem)
 24176  		v.AddArg3(ptr, v0, v1)
 24177  		return true
 24178  	}
 24179  	// match: (Zero [13] ptr mem)
 24180  	// result: (MOVDstore [5] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 24181  	for {
 24182  		if auxIntToInt64(v.AuxInt) != 13 {
 24183  			break
 24184  		}
 24185  		ptr := v_0
 24186  		mem := v_1
 24187  		v.reset(OpARM64MOVDstore)
 24188  		v.AuxInt = int32ToAuxInt(5)
 24189  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24190  		v0.AuxInt = int64ToAuxInt(0)
 24191  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 24192  		v1.AddArg3(ptr, v0, mem)
 24193  		v.AddArg3(ptr, v0, v1)
 24194  		return true
 24195  	}
 24196  	// match: (Zero [14] ptr mem)
 24197  	// result: (MOVDstore [6] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 24198  	for {
 24199  		if auxIntToInt64(v.AuxInt) != 14 {
 24200  			break
 24201  		}
 24202  		ptr := v_0
 24203  		mem := v_1
 24204  		v.reset(OpARM64MOVDstore)
 24205  		v.AuxInt = int32ToAuxInt(6)
 24206  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24207  		v0.AuxInt = int64ToAuxInt(0)
 24208  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 24209  		v1.AddArg3(ptr, v0, mem)
 24210  		v.AddArg3(ptr, v0, v1)
 24211  		return true
 24212  	}
 24213  	// match: (Zero [15] ptr mem)
 24214  	// result: (MOVDstore [7] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 24215  	for {
 24216  		if auxIntToInt64(v.AuxInt) != 15 {
 24217  			break
 24218  		}
 24219  		ptr := v_0
 24220  		mem := v_1
 24221  		v.reset(OpARM64MOVDstore)
 24222  		v.AuxInt = int32ToAuxInt(7)
 24223  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24224  		v0.AuxInt = int64ToAuxInt(0)
 24225  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 24226  		v1.AddArg3(ptr, v0, mem)
 24227  		v.AddArg3(ptr, v0, v1)
 24228  		return true
 24229  	}
 24230  	// match: (Zero [16] ptr mem)
 24231  	// result: (STP [0] ptr (MOVDconst [0]) (MOVDconst [0]) mem)
 24232  	for {
 24233  		if auxIntToInt64(v.AuxInt) != 16 {
 24234  			break
 24235  		}
 24236  		ptr := v_0
 24237  		mem := v_1
 24238  		v.reset(OpARM64STP)
 24239  		v.AuxInt = int32ToAuxInt(0)
 24240  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24241  		v0.AuxInt = int64ToAuxInt(0)
 24242  		v.AddArg4(ptr, v0, v0, mem)
 24243  		return true
 24244  	}
 24245  	// match: (Zero [s] ptr mem)
 24246  	// cond: s > 16 && s < 192
 24247  	// result: (LoweredZero [s] ptr mem)
 24248  	for {
 24249  		s := auxIntToInt64(v.AuxInt)
 24250  		ptr := v_0
 24251  		mem := v_1
 24252  		if !(s > 16 && s < 192) {
 24253  			break
 24254  		}
 24255  		v.reset(OpARM64LoweredZero)
 24256  		v.AuxInt = int64ToAuxInt(s)
 24257  		v.AddArg2(ptr, mem)
 24258  		return true
 24259  	}
 24260  	// match: (Zero [s] ptr mem)
 24261  	// cond: s >= 192
 24262  	// result: (LoweredZeroLoop [s] ptr mem)
 24263  	for {
 24264  		s := auxIntToInt64(v.AuxInt)
 24265  		ptr := v_0
 24266  		mem := v_1
 24267  		if !(s >= 192) {
 24268  			break
 24269  		}
 24270  		v.reset(OpARM64LoweredZeroLoop)
 24271  		v.AuxInt = int64ToAuxInt(s)
 24272  		v.AddArg2(ptr, mem)
 24273  		return true
 24274  	}
 24275  	return false
 24276  }
 24277  func rewriteValueARM64_OpZeroSIMD(v *Value) bool {
 24278  	// match: (ZeroSIMD <t>)
 24279  	// cond: t.Size() == 16
 24280  	// result: (VMOVI16B [0] <t>)
 24281  	for {
 24282  		t := v.Type
 24283  		if !(t.Size() == 16) {
 24284  			break
 24285  		}
 24286  		v.reset(OpARM64VMOVI16B)
 24287  		v.Type = t
 24288  		v.AuxInt = uint8ToAuxInt(0)
 24289  		return true
 24290  	}
 24291  	return false
 24292  }
 24293  func rewriteValueARM64_Opbroadcast1To16Int8x16(v *Value) bool {
 24294  	v_0 := v.Args[0]
 24295  	// match: (broadcast1To16Int8x16 x)
 24296  	// result: (VDUPBbcast [0] x)
 24297  	for {
 24298  		x := v_0
 24299  		v.reset(OpARM64VDUPBbcast)
 24300  		v.AuxInt = uint8ToAuxInt(0)
 24301  		v.AddArg(x)
 24302  		return true
 24303  	}
 24304  }
 24305  func rewriteValueARM64_Opbroadcast1To16Uint8x16(v *Value) bool {
 24306  	v_0 := v.Args[0]
 24307  	// match: (broadcast1To16Uint8x16 x)
 24308  	// result: (VDUPBbcast [0] x)
 24309  	for {
 24310  		x := v_0
 24311  		v.reset(OpARM64VDUPBbcast)
 24312  		v.AuxInt = uint8ToAuxInt(0)
 24313  		v.AddArg(x)
 24314  		return true
 24315  	}
 24316  }
 24317  func rewriteValueARM64_Opbroadcast1To2Float64x2(v *Value) bool {
 24318  	v_0 := v.Args[0]
 24319  	// match: (broadcast1To2Float64x2 x)
 24320  	// result: (VDUPDbcast [0] x)
 24321  	for {
 24322  		x := v_0
 24323  		v.reset(OpARM64VDUPDbcast)
 24324  		v.AuxInt = uint8ToAuxInt(0)
 24325  		v.AddArg(x)
 24326  		return true
 24327  	}
 24328  }
 24329  func rewriteValueARM64_Opbroadcast1To2Int64x2(v *Value) bool {
 24330  	v_0 := v.Args[0]
 24331  	// match: (broadcast1To2Int64x2 x)
 24332  	// result: (VDUPDbcast [0] x)
 24333  	for {
 24334  		x := v_0
 24335  		v.reset(OpARM64VDUPDbcast)
 24336  		v.AuxInt = uint8ToAuxInt(0)
 24337  		v.AddArg(x)
 24338  		return true
 24339  	}
 24340  }
 24341  func rewriteValueARM64_Opbroadcast1To2Uint64x2(v *Value) bool {
 24342  	v_0 := v.Args[0]
 24343  	// match: (broadcast1To2Uint64x2 x)
 24344  	// result: (VDUPDbcast [0] x)
 24345  	for {
 24346  		x := v_0
 24347  		v.reset(OpARM64VDUPDbcast)
 24348  		v.AuxInt = uint8ToAuxInt(0)
 24349  		v.AddArg(x)
 24350  		return true
 24351  	}
 24352  }
 24353  func rewriteValueARM64_Opbroadcast1To4Float32x4(v *Value) bool {
 24354  	v_0 := v.Args[0]
 24355  	// match: (broadcast1To4Float32x4 x)
 24356  	// result: (VDUPSbcast [0] x)
 24357  	for {
 24358  		x := v_0
 24359  		v.reset(OpARM64VDUPSbcast)
 24360  		v.AuxInt = uint8ToAuxInt(0)
 24361  		v.AddArg(x)
 24362  		return true
 24363  	}
 24364  }
 24365  func rewriteValueARM64_Opbroadcast1To4Int32x4(v *Value) bool {
 24366  	v_0 := v.Args[0]
 24367  	// match: (broadcast1To4Int32x4 x)
 24368  	// result: (VDUPSbcast [0] x)
 24369  	for {
 24370  		x := v_0
 24371  		v.reset(OpARM64VDUPSbcast)
 24372  		v.AuxInt = uint8ToAuxInt(0)
 24373  		v.AddArg(x)
 24374  		return true
 24375  	}
 24376  }
 24377  func rewriteValueARM64_Opbroadcast1To4Uint32x4(v *Value) bool {
 24378  	v_0 := v.Args[0]
 24379  	// match: (broadcast1To4Uint32x4 x)
 24380  	// result: (VDUPSbcast [0] x)
 24381  	for {
 24382  		x := v_0
 24383  		v.reset(OpARM64VDUPSbcast)
 24384  		v.AuxInt = uint8ToAuxInt(0)
 24385  		v.AddArg(x)
 24386  		return true
 24387  	}
 24388  }
 24389  func rewriteValueARM64_Opbroadcast1To8Int16x8(v *Value) bool {
 24390  	v_0 := v.Args[0]
 24391  	// match: (broadcast1To8Int16x8 x)
 24392  	// result: (VDUPHbcast [0] x)
 24393  	for {
 24394  		x := v_0
 24395  		v.reset(OpARM64VDUPHbcast)
 24396  		v.AuxInt = uint8ToAuxInt(0)
 24397  		v.AddArg(x)
 24398  		return true
 24399  	}
 24400  }
 24401  func rewriteValueARM64_Opbroadcast1To8Uint16x8(v *Value) bool {
 24402  	v_0 := v.Args[0]
 24403  	// match: (broadcast1To8Uint16x8 x)
 24404  	// result: (VDUPHbcast [0] x)
 24405  	for {
 24406  		x := v_0
 24407  		v.reset(OpARM64VDUPHbcast)
 24408  		v.AuxInt = uint8ToAuxInt(0)
 24409  		v.AddArg(x)
 24410  		return true
 24411  	}
 24412  }
 24413  func rewriteBlockARM64(b *Block) bool {
 24414  	typ := &b.Func.Config.Types
 24415  	switch b.Kind {
 24416  	case BlockARM64EQ:
 24417  		// match: (EQ (CMPconst [0] z:(AND x y)) yes no)
 24418  		// cond: z.Uses == 1
 24419  		// result: (EQ (TST x y) yes no)
 24420  		for b.Controls[0].Op == OpARM64CMPconst {
 24421  			v_0 := b.Controls[0]
 24422  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24423  				break
 24424  			}
 24425  			z := v_0.Args[0]
 24426  			if z.Op != OpARM64AND {
 24427  				break
 24428  			}
 24429  			_ = z.Args[1]
 24430  			z_0 := z.Args[0]
 24431  			z_1 := z.Args[1]
 24432  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24433  				x := z_0
 24434  				y := z_1
 24435  				if !(z.Uses == 1) {
 24436  					continue
 24437  				}
 24438  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 24439  				v0.AddArg2(x, y)
 24440  				b.resetWithControl(BlockARM64EQ, v0)
 24441  				return true
 24442  			}
 24443  			break
 24444  		}
 24445  		// match: (EQ (CMPconst [0] x:(ANDconst [c] y)) yes no)
 24446  		// cond: x.Uses == 1
 24447  		// result: (EQ (TSTconst [c] y) yes no)
 24448  		for b.Controls[0].Op == OpARM64CMPconst {
 24449  			v_0 := b.Controls[0]
 24450  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24451  				break
 24452  			}
 24453  			x := v_0.Args[0]
 24454  			if x.Op != OpARM64ANDconst {
 24455  				break
 24456  			}
 24457  			c := auxIntToInt64(x.AuxInt)
 24458  			y := x.Args[0]
 24459  			if !(x.Uses == 1) {
 24460  				break
 24461  			}
 24462  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 24463  			v0.AuxInt = int64ToAuxInt(c)
 24464  			v0.AddArg(y)
 24465  			b.resetWithControl(BlockARM64EQ, v0)
 24466  			return true
 24467  		}
 24468  		// match: (EQ (CMPWconst [0] z:(AND x y)) yes no)
 24469  		// cond: z.Uses == 1
 24470  		// result: (EQ (TSTW x y) yes no)
 24471  		for b.Controls[0].Op == OpARM64CMPWconst {
 24472  			v_0 := b.Controls[0]
 24473  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24474  				break
 24475  			}
 24476  			z := v_0.Args[0]
 24477  			if z.Op != OpARM64AND {
 24478  				break
 24479  			}
 24480  			_ = z.Args[1]
 24481  			z_0 := z.Args[0]
 24482  			z_1 := z.Args[1]
 24483  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24484  				x := z_0
 24485  				y := z_1
 24486  				if !(z.Uses == 1) {
 24487  					continue
 24488  				}
 24489  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 24490  				v0.AddArg2(x, y)
 24491  				b.resetWithControl(BlockARM64EQ, v0)
 24492  				return true
 24493  			}
 24494  			break
 24495  		}
 24496  		// match: (EQ (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 24497  		// cond: x.Uses == 1
 24498  		// result: (EQ (TSTWconst [int32(c)] y) yes no)
 24499  		for b.Controls[0].Op == OpARM64CMPWconst {
 24500  			v_0 := b.Controls[0]
 24501  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24502  				break
 24503  			}
 24504  			x := v_0.Args[0]
 24505  			if x.Op != OpARM64ANDconst {
 24506  				break
 24507  			}
 24508  			c := auxIntToInt64(x.AuxInt)
 24509  			y := x.Args[0]
 24510  			if !(x.Uses == 1) {
 24511  				break
 24512  			}
 24513  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 24514  			v0.AuxInt = int32ToAuxInt(int32(c))
 24515  			v0.AddArg(y)
 24516  			b.resetWithControl(BlockARM64EQ, v0)
 24517  			return true
 24518  		}
 24519  		// match: (EQ (CMPconst [0] x:(ADDconst [c] y)) yes no)
 24520  		// cond: x.Uses == 1
 24521  		// result: (EQ (CMNconst [c] y) yes no)
 24522  		for b.Controls[0].Op == OpARM64CMPconst {
 24523  			v_0 := b.Controls[0]
 24524  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24525  				break
 24526  			}
 24527  			x := v_0.Args[0]
 24528  			if x.Op != OpARM64ADDconst {
 24529  				break
 24530  			}
 24531  			c := auxIntToInt64(x.AuxInt)
 24532  			y := x.Args[0]
 24533  			if !(x.Uses == 1) {
 24534  				break
 24535  			}
 24536  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 24537  			v0.AuxInt = int64ToAuxInt(c)
 24538  			v0.AddArg(y)
 24539  			b.resetWithControl(BlockARM64EQ, v0)
 24540  			return true
 24541  		}
 24542  		// match: (EQ (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 24543  		// cond: x.Uses == 1
 24544  		// result: (EQ (CMNWconst [int32(c)] y) yes no)
 24545  		for b.Controls[0].Op == OpARM64CMPWconst {
 24546  			v_0 := b.Controls[0]
 24547  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24548  				break
 24549  			}
 24550  			x := v_0.Args[0]
 24551  			if x.Op != OpARM64ADDconst {
 24552  				break
 24553  			}
 24554  			c := auxIntToInt64(x.AuxInt)
 24555  			y := x.Args[0]
 24556  			if !(x.Uses == 1) {
 24557  				break
 24558  			}
 24559  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 24560  			v0.AuxInt = int32ToAuxInt(int32(c))
 24561  			v0.AddArg(y)
 24562  			b.resetWithControl(BlockARM64EQ, v0)
 24563  			return true
 24564  		}
 24565  		// match: (EQ (CMPconst [0] z:(ADD x y)) yes no)
 24566  		// cond: z.Uses == 1
 24567  		// result: (EQ (CMN x y) yes no)
 24568  		for b.Controls[0].Op == OpARM64CMPconst {
 24569  			v_0 := b.Controls[0]
 24570  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24571  				break
 24572  			}
 24573  			z := v_0.Args[0]
 24574  			if z.Op != OpARM64ADD {
 24575  				break
 24576  			}
 24577  			_ = z.Args[1]
 24578  			z_0 := z.Args[0]
 24579  			z_1 := z.Args[1]
 24580  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24581  				x := z_0
 24582  				y := z_1
 24583  				if !(z.Uses == 1) {
 24584  					continue
 24585  				}
 24586  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24587  				v0.AddArg2(x, y)
 24588  				b.resetWithControl(BlockARM64EQ, v0)
 24589  				return true
 24590  			}
 24591  			break
 24592  		}
 24593  		// match: (EQ (CMPWconst [0] z:(ADD x y)) yes no)
 24594  		// cond: z.Uses == 1
 24595  		// result: (EQ (CMNW x y) yes no)
 24596  		for b.Controls[0].Op == OpARM64CMPWconst {
 24597  			v_0 := b.Controls[0]
 24598  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24599  				break
 24600  			}
 24601  			z := v_0.Args[0]
 24602  			if z.Op != OpARM64ADD {
 24603  				break
 24604  			}
 24605  			_ = z.Args[1]
 24606  			z_0 := z.Args[0]
 24607  			z_1 := z.Args[1]
 24608  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24609  				x := z_0
 24610  				y := z_1
 24611  				if !(z.Uses == 1) {
 24612  					continue
 24613  				}
 24614  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24615  				v0.AddArg2(x, y)
 24616  				b.resetWithControl(BlockARM64EQ, v0)
 24617  				return true
 24618  			}
 24619  			break
 24620  		}
 24621  		// match: (EQ (CMP x z:(NEG y)) yes no)
 24622  		// cond: z.Uses == 1
 24623  		// result: (EQ (CMN x y) yes no)
 24624  		for b.Controls[0].Op == OpARM64CMP {
 24625  			v_0 := b.Controls[0]
 24626  			_ = v_0.Args[1]
 24627  			x := v_0.Args[0]
 24628  			z := v_0.Args[1]
 24629  			if z.Op != OpARM64NEG {
 24630  				break
 24631  			}
 24632  			y := z.Args[0]
 24633  			if !(z.Uses == 1) {
 24634  				break
 24635  			}
 24636  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24637  			v0.AddArg2(x, y)
 24638  			b.resetWithControl(BlockARM64EQ, v0)
 24639  			return true
 24640  		}
 24641  		// match: (EQ (CMPW x z:(NEG y)) yes no)
 24642  		// cond: z.Uses == 1
 24643  		// result: (EQ (CMNW x y) yes no)
 24644  		for b.Controls[0].Op == OpARM64CMPW {
 24645  			v_0 := b.Controls[0]
 24646  			_ = v_0.Args[1]
 24647  			x := v_0.Args[0]
 24648  			z := v_0.Args[1]
 24649  			if z.Op != OpARM64NEG {
 24650  				break
 24651  			}
 24652  			y := z.Args[0]
 24653  			if !(z.Uses == 1) {
 24654  				break
 24655  			}
 24656  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24657  			v0.AddArg2(x, y)
 24658  			b.resetWithControl(BlockARM64EQ, v0)
 24659  			return true
 24660  		}
 24661  		// match: (EQ (CMPconst [0] x) yes no)
 24662  		// result: (Z x yes no)
 24663  		for b.Controls[0].Op == OpARM64CMPconst {
 24664  			v_0 := b.Controls[0]
 24665  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24666  				break
 24667  			}
 24668  			x := v_0.Args[0]
 24669  			b.resetWithControl(BlockARM64Z, x)
 24670  			return true
 24671  		}
 24672  		// match: (EQ (CMPWconst [0] x) yes no)
 24673  		// result: (ZW x yes no)
 24674  		for b.Controls[0].Op == OpARM64CMPWconst {
 24675  			v_0 := b.Controls[0]
 24676  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24677  				break
 24678  			}
 24679  			x := v_0.Args[0]
 24680  			b.resetWithControl(BlockARM64ZW, x)
 24681  			return true
 24682  		}
 24683  		// match: (EQ (CMPconst [0] z:(MADD a x y)) yes no)
 24684  		// cond: z.Uses==1
 24685  		// result: (EQ (CMN a (MUL <x.Type> x y)) yes no)
 24686  		for b.Controls[0].Op == OpARM64CMPconst {
 24687  			v_0 := b.Controls[0]
 24688  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24689  				break
 24690  			}
 24691  			z := v_0.Args[0]
 24692  			if z.Op != OpARM64MADD {
 24693  				break
 24694  			}
 24695  			y := z.Args[2]
 24696  			a := z.Args[0]
 24697  			x := z.Args[1]
 24698  			if !(z.Uses == 1) {
 24699  				break
 24700  			}
 24701  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24702  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 24703  			v1.AddArg2(x, y)
 24704  			v0.AddArg2(a, v1)
 24705  			b.resetWithControl(BlockARM64EQ, v0)
 24706  			return true
 24707  		}
 24708  		// match: (EQ (CMPWconst [0] z:(MADDW a x y)) yes no)
 24709  		// cond: z.Uses==1
 24710  		// result: (EQ (CMNW a (MULW <x.Type> x y)) yes no)
 24711  		for b.Controls[0].Op == OpARM64CMPWconst {
 24712  			v_0 := b.Controls[0]
 24713  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24714  				break
 24715  			}
 24716  			z := v_0.Args[0]
 24717  			if z.Op != OpARM64MADDW {
 24718  				break
 24719  			}
 24720  			y := z.Args[2]
 24721  			a := z.Args[0]
 24722  			x := z.Args[1]
 24723  			if !(z.Uses == 1) {
 24724  				break
 24725  			}
 24726  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24727  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 24728  			v1.AddArg2(x, y)
 24729  			v0.AddArg2(a, v1)
 24730  			b.resetWithControl(BlockARM64EQ, v0)
 24731  			return true
 24732  		}
 24733  		// match: (EQ (CMPconst [0] z:(MSUB a x y)) yes no)
 24734  		// cond: z.Uses==1
 24735  		// result: (EQ (CMP a (MUL <x.Type> x y)) yes no)
 24736  		for b.Controls[0].Op == OpARM64CMPconst {
 24737  			v_0 := b.Controls[0]
 24738  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24739  				break
 24740  			}
 24741  			z := v_0.Args[0]
 24742  			if z.Op != OpARM64MSUB {
 24743  				break
 24744  			}
 24745  			y := z.Args[2]
 24746  			a := z.Args[0]
 24747  			x := z.Args[1]
 24748  			if !(z.Uses == 1) {
 24749  				break
 24750  			}
 24751  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 24752  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 24753  			v1.AddArg2(x, y)
 24754  			v0.AddArg2(a, v1)
 24755  			b.resetWithControl(BlockARM64EQ, v0)
 24756  			return true
 24757  		}
 24758  		// match: (EQ (CMPWconst [0] z:(MSUBW a x y)) yes no)
 24759  		// cond: z.Uses==1
 24760  		// result: (EQ (CMPW a (MULW <x.Type> x y)) yes no)
 24761  		for b.Controls[0].Op == OpARM64CMPWconst {
 24762  			v_0 := b.Controls[0]
 24763  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24764  				break
 24765  			}
 24766  			z := v_0.Args[0]
 24767  			if z.Op != OpARM64MSUBW {
 24768  				break
 24769  			}
 24770  			y := z.Args[2]
 24771  			a := z.Args[0]
 24772  			x := z.Args[1]
 24773  			if !(z.Uses == 1) {
 24774  				break
 24775  			}
 24776  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 24777  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 24778  			v1.AddArg2(x, y)
 24779  			v0.AddArg2(a, v1)
 24780  			b.resetWithControl(BlockARM64EQ, v0)
 24781  			return true
 24782  		}
 24783  		// match: (EQ (TSTconst [c] x) yes no)
 24784  		// cond: oneBit(c)
 24785  		// result: (TBZ [int64(ntz64(c))] x yes no)
 24786  		for b.Controls[0].Op == OpARM64TSTconst {
 24787  			v_0 := b.Controls[0]
 24788  			c := auxIntToInt64(v_0.AuxInt)
 24789  			x := v_0.Args[0]
 24790  			if !(oneBit(c)) {
 24791  				break
 24792  			}
 24793  			b.resetWithControl(BlockARM64TBZ, x)
 24794  			b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
 24795  			return true
 24796  		}
 24797  		// match: (EQ (TSTWconst [c] x) yes no)
 24798  		// cond: oneBit(int64(uint32(c)))
 24799  		// result: (TBZ [int64(ntz64(int64(uint32(c))))] x yes no)
 24800  		for b.Controls[0].Op == OpARM64TSTWconst {
 24801  			v_0 := b.Controls[0]
 24802  			c := auxIntToInt32(v_0.AuxInt)
 24803  			x := v_0.Args[0]
 24804  			if !(oneBit(int64(uint32(c)))) {
 24805  				break
 24806  			}
 24807  			b.resetWithControl(BlockARM64TBZ, x)
 24808  			b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
 24809  			return true
 24810  		}
 24811  		// match: (EQ (FlagConstant [fc]) yes no)
 24812  		// cond: fc.eq()
 24813  		// result: (First yes no)
 24814  		for b.Controls[0].Op == OpARM64FlagConstant {
 24815  			v_0 := b.Controls[0]
 24816  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24817  			if !(fc.eq()) {
 24818  				break
 24819  			}
 24820  			b.Reset(BlockFirst)
 24821  			return true
 24822  		}
 24823  		// match: (EQ (FlagConstant [fc]) yes no)
 24824  		// cond: !fc.eq()
 24825  		// result: (First no yes)
 24826  		for b.Controls[0].Op == OpARM64FlagConstant {
 24827  			v_0 := b.Controls[0]
 24828  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24829  			if !(!fc.eq()) {
 24830  				break
 24831  			}
 24832  			b.Reset(BlockFirst)
 24833  			b.swapSuccessors()
 24834  			return true
 24835  		}
 24836  		// match: (EQ (InvertFlags cmp) yes no)
 24837  		// result: (EQ cmp yes no)
 24838  		for b.Controls[0].Op == OpARM64InvertFlags {
 24839  			v_0 := b.Controls[0]
 24840  			cmp := v_0.Args[0]
 24841  			b.resetWithControl(BlockARM64EQ, cmp)
 24842  			return true
 24843  		}
 24844  	case BlockARM64FGE:
 24845  		// match: (FGE (InvertFlags cmp) yes no)
 24846  		// result: (FLE cmp yes no)
 24847  		for b.Controls[0].Op == OpARM64InvertFlags {
 24848  			v_0 := b.Controls[0]
 24849  			cmp := v_0.Args[0]
 24850  			b.resetWithControl(BlockARM64FLE, cmp)
 24851  			return true
 24852  		}
 24853  	case BlockARM64FGT:
 24854  		// match: (FGT (InvertFlags cmp) yes no)
 24855  		// result: (FLT cmp yes no)
 24856  		for b.Controls[0].Op == OpARM64InvertFlags {
 24857  			v_0 := b.Controls[0]
 24858  			cmp := v_0.Args[0]
 24859  			b.resetWithControl(BlockARM64FLT, cmp)
 24860  			return true
 24861  		}
 24862  	case BlockARM64FLE:
 24863  		// match: (FLE (InvertFlags cmp) yes no)
 24864  		// result: (FGE cmp yes no)
 24865  		for b.Controls[0].Op == OpARM64InvertFlags {
 24866  			v_0 := b.Controls[0]
 24867  			cmp := v_0.Args[0]
 24868  			b.resetWithControl(BlockARM64FGE, cmp)
 24869  			return true
 24870  		}
 24871  	case BlockARM64FLT:
 24872  		// match: (FLT (InvertFlags cmp) yes no)
 24873  		// result: (FGT cmp yes no)
 24874  		for b.Controls[0].Op == OpARM64InvertFlags {
 24875  			v_0 := b.Controls[0]
 24876  			cmp := v_0.Args[0]
 24877  			b.resetWithControl(BlockARM64FGT, cmp)
 24878  			return true
 24879  		}
 24880  	case BlockARM64GE:
 24881  		// match: (GE (CMPconst [0] z:(AND x y)) yes no)
 24882  		// cond: z.Uses == 1
 24883  		// result: (GE (TST x y) yes no)
 24884  		for b.Controls[0].Op == OpARM64CMPconst {
 24885  			v_0 := b.Controls[0]
 24886  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24887  				break
 24888  			}
 24889  			z := v_0.Args[0]
 24890  			if z.Op != OpARM64AND {
 24891  				break
 24892  			}
 24893  			_ = z.Args[1]
 24894  			z_0 := z.Args[0]
 24895  			z_1 := z.Args[1]
 24896  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24897  				x := z_0
 24898  				y := z_1
 24899  				if !(z.Uses == 1) {
 24900  					continue
 24901  				}
 24902  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 24903  				v0.AddArg2(x, y)
 24904  				b.resetWithControl(BlockARM64GE, v0)
 24905  				return true
 24906  			}
 24907  			break
 24908  		}
 24909  		// match: (GE (CMPconst [0] x:(ANDconst [c] y)) yes no)
 24910  		// cond: x.Uses == 1
 24911  		// result: (GE (TSTconst [c] y) yes no)
 24912  		for b.Controls[0].Op == OpARM64CMPconst {
 24913  			v_0 := b.Controls[0]
 24914  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24915  				break
 24916  			}
 24917  			x := v_0.Args[0]
 24918  			if x.Op != OpARM64ANDconst {
 24919  				break
 24920  			}
 24921  			c := auxIntToInt64(x.AuxInt)
 24922  			y := x.Args[0]
 24923  			if !(x.Uses == 1) {
 24924  				break
 24925  			}
 24926  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 24927  			v0.AuxInt = int64ToAuxInt(c)
 24928  			v0.AddArg(y)
 24929  			b.resetWithControl(BlockARM64GE, v0)
 24930  			return true
 24931  		}
 24932  		// match: (GE (CMPWconst [0] z:(AND x y)) yes no)
 24933  		// cond: z.Uses == 1
 24934  		// result: (GE (TSTW x y) yes no)
 24935  		for b.Controls[0].Op == OpARM64CMPWconst {
 24936  			v_0 := b.Controls[0]
 24937  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24938  				break
 24939  			}
 24940  			z := v_0.Args[0]
 24941  			if z.Op != OpARM64AND {
 24942  				break
 24943  			}
 24944  			_ = z.Args[1]
 24945  			z_0 := z.Args[0]
 24946  			z_1 := z.Args[1]
 24947  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24948  				x := z_0
 24949  				y := z_1
 24950  				if !(z.Uses == 1) {
 24951  					continue
 24952  				}
 24953  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 24954  				v0.AddArg2(x, y)
 24955  				b.resetWithControl(BlockARM64GE, v0)
 24956  				return true
 24957  			}
 24958  			break
 24959  		}
 24960  		// match: (GE (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 24961  		// cond: x.Uses == 1
 24962  		// result: (GE (TSTWconst [int32(c)] y) yes no)
 24963  		for b.Controls[0].Op == OpARM64CMPWconst {
 24964  			v_0 := b.Controls[0]
 24965  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24966  				break
 24967  			}
 24968  			x := v_0.Args[0]
 24969  			if x.Op != OpARM64ANDconst {
 24970  				break
 24971  			}
 24972  			c := auxIntToInt64(x.AuxInt)
 24973  			y := x.Args[0]
 24974  			if !(x.Uses == 1) {
 24975  				break
 24976  			}
 24977  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 24978  			v0.AuxInt = int32ToAuxInt(int32(c))
 24979  			v0.AddArg(y)
 24980  			b.resetWithControl(BlockARM64GE, v0)
 24981  			return true
 24982  		}
 24983  		// match: (GE (CMPconst [0] x:(ADDconst [c] y)) yes no)
 24984  		// cond: x.Uses == 1
 24985  		// result: (GEnoov (CMNconst [c] y) yes no)
 24986  		for b.Controls[0].Op == OpARM64CMPconst {
 24987  			v_0 := b.Controls[0]
 24988  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24989  				break
 24990  			}
 24991  			x := v_0.Args[0]
 24992  			if x.Op != OpARM64ADDconst {
 24993  				break
 24994  			}
 24995  			c := auxIntToInt64(x.AuxInt)
 24996  			y := x.Args[0]
 24997  			if !(x.Uses == 1) {
 24998  				break
 24999  			}
 25000  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 25001  			v0.AuxInt = int64ToAuxInt(c)
 25002  			v0.AddArg(y)
 25003  			b.resetWithControl(BlockARM64GEnoov, v0)
 25004  			return true
 25005  		}
 25006  		// match: (GE (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 25007  		// cond: x.Uses == 1
 25008  		// result: (GEnoov (CMNWconst [int32(c)] 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  			x := v_0.Args[0]
 25015  			if x.Op != OpARM64ADDconst {
 25016  				break
 25017  			}
 25018  			c := auxIntToInt64(x.AuxInt)
 25019  			y := x.Args[0]
 25020  			if !(x.Uses == 1) {
 25021  				break
 25022  			}
 25023  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 25024  			v0.AuxInt = int32ToAuxInt(int32(c))
 25025  			v0.AddArg(y)
 25026  			b.resetWithControl(BlockARM64GEnoov, v0)
 25027  			return true
 25028  		}
 25029  		// match: (GE (CMPconst [0] z:(ADD x y)) yes no)
 25030  		// cond: z.Uses == 1
 25031  		// result: (GEnoov (CMN x y) yes no)
 25032  		for b.Controls[0].Op == OpARM64CMPconst {
 25033  			v_0 := b.Controls[0]
 25034  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25035  				break
 25036  			}
 25037  			z := v_0.Args[0]
 25038  			if z.Op != OpARM64ADD {
 25039  				break
 25040  			}
 25041  			_ = z.Args[1]
 25042  			z_0 := z.Args[0]
 25043  			z_1 := z.Args[1]
 25044  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25045  				x := z_0
 25046  				y := z_1
 25047  				if !(z.Uses == 1) {
 25048  					continue
 25049  				}
 25050  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 25051  				v0.AddArg2(x, y)
 25052  				b.resetWithControl(BlockARM64GEnoov, v0)
 25053  				return true
 25054  			}
 25055  			break
 25056  		}
 25057  		// match: (GE (CMPWconst [0] z:(ADD x y)) yes no)
 25058  		// cond: z.Uses == 1
 25059  		// result: (GEnoov (CMNW x y) yes no)
 25060  		for b.Controls[0].Op == OpARM64CMPWconst {
 25061  			v_0 := b.Controls[0]
 25062  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25063  				break
 25064  			}
 25065  			z := v_0.Args[0]
 25066  			if z.Op != OpARM64ADD {
 25067  				break
 25068  			}
 25069  			_ = z.Args[1]
 25070  			z_0 := z.Args[0]
 25071  			z_1 := z.Args[1]
 25072  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25073  				x := z_0
 25074  				y := z_1
 25075  				if !(z.Uses == 1) {
 25076  					continue
 25077  				}
 25078  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 25079  				v0.AddArg2(x, y)
 25080  				b.resetWithControl(BlockARM64GEnoov, v0)
 25081  				return true
 25082  			}
 25083  			break
 25084  		}
 25085  		// match: (GE (CMPconst [0] z:(MADD a x y)) yes no)
 25086  		// cond: z.Uses==1
 25087  		// result: (GEnoov (CMN a (MUL <x.Type> x y)) yes no)
 25088  		for b.Controls[0].Op == OpARM64CMPconst {
 25089  			v_0 := b.Controls[0]
 25090  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25091  				break
 25092  			}
 25093  			z := v_0.Args[0]
 25094  			if z.Op != OpARM64MADD {
 25095  				break
 25096  			}
 25097  			y := z.Args[2]
 25098  			a := z.Args[0]
 25099  			x := z.Args[1]
 25100  			if !(z.Uses == 1) {
 25101  				break
 25102  			}
 25103  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 25104  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 25105  			v1.AddArg2(x, y)
 25106  			v0.AddArg2(a, v1)
 25107  			b.resetWithControl(BlockARM64GEnoov, v0)
 25108  			return true
 25109  		}
 25110  		// match: (GE (CMPWconst [0] z:(MADDW a x y)) yes no)
 25111  		// cond: z.Uses==1
 25112  		// result: (GEnoov (CMNW a (MULW <x.Type> x y)) yes no)
 25113  		for b.Controls[0].Op == OpARM64CMPWconst {
 25114  			v_0 := b.Controls[0]
 25115  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25116  				break
 25117  			}
 25118  			z := v_0.Args[0]
 25119  			if z.Op != OpARM64MADDW {
 25120  				break
 25121  			}
 25122  			y := z.Args[2]
 25123  			a := z.Args[0]
 25124  			x := z.Args[1]
 25125  			if !(z.Uses == 1) {
 25126  				break
 25127  			}
 25128  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 25129  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 25130  			v1.AddArg2(x, y)
 25131  			v0.AddArg2(a, v1)
 25132  			b.resetWithControl(BlockARM64GEnoov, v0)
 25133  			return true
 25134  		}
 25135  		// match: (GE (CMPWconst [0] x) yes no)
 25136  		// result: (TBZ [31] x yes no)
 25137  		for b.Controls[0].Op == OpARM64CMPWconst {
 25138  			v_0 := b.Controls[0]
 25139  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25140  				break
 25141  			}
 25142  			x := v_0.Args[0]
 25143  			b.resetWithControl(BlockARM64TBZ, x)
 25144  			b.AuxInt = int64ToAuxInt(31)
 25145  			return true
 25146  		}
 25147  		// match: (GE (CMPconst [0] x) yes no)
 25148  		// result: (TBZ [63] x yes no)
 25149  		for b.Controls[0].Op == OpARM64CMPconst {
 25150  			v_0 := b.Controls[0]
 25151  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25152  				break
 25153  			}
 25154  			x := v_0.Args[0]
 25155  			b.resetWithControl(BlockARM64TBZ, x)
 25156  			b.AuxInt = int64ToAuxInt(63)
 25157  			return true
 25158  		}
 25159  		// match: (GE (FlagConstant [fc]) yes no)
 25160  		// cond: fc.ge()
 25161  		// result: (First yes no)
 25162  		for b.Controls[0].Op == OpARM64FlagConstant {
 25163  			v_0 := b.Controls[0]
 25164  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25165  			if !(fc.ge()) {
 25166  				break
 25167  			}
 25168  			b.Reset(BlockFirst)
 25169  			return true
 25170  		}
 25171  		// match: (GE (FlagConstant [fc]) yes no)
 25172  		// cond: !fc.ge()
 25173  		// result: (First no yes)
 25174  		for b.Controls[0].Op == OpARM64FlagConstant {
 25175  			v_0 := b.Controls[0]
 25176  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25177  			if !(!fc.ge()) {
 25178  				break
 25179  			}
 25180  			b.Reset(BlockFirst)
 25181  			b.swapSuccessors()
 25182  			return true
 25183  		}
 25184  		// match: (GE (InvertFlags cmp) yes no)
 25185  		// result: (LE cmp yes no)
 25186  		for b.Controls[0].Op == OpARM64InvertFlags {
 25187  			v_0 := b.Controls[0]
 25188  			cmp := v_0.Args[0]
 25189  			b.resetWithControl(BlockARM64LE, cmp)
 25190  			return true
 25191  		}
 25192  	case BlockARM64GEnoov:
 25193  		// match: (GEnoov (FlagConstant [fc]) yes no)
 25194  		// cond: fc.geNoov()
 25195  		// result: (First yes no)
 25196  		for b.Controls[0].Op == OpARM64FlagConstant {
 25197  			v_0 := b.Controls[0]
 25198  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25199  			if !(fc.geNoov()) {
 25200  				break
 25201  			}
 25202  			b.Reset(BlockFirst)
 25203  			return true
 25204  		}
 25205  		// match: (GEnoov (FlagConstant [fc]) yes no)
 25206  		// cond: !fc.geNoov()
 25207  		// result: (First no yes)
 25208  		for b.Controls[0].Op == OpARM64FlagConstant {
 25209  			v_0 := b.Controls[0]
 25210  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25211  			if !(!fc.geNoov()) {
 25212  				break
 25213  			}
 25214  			b.Reset(BlockFirst)
 25215  			b.swapSuccessors()
 25216  			return true
 25217  		}
 25218  	case BlockARM64GT:
 25219  		// match: (GT (CMPconst [0] z:(AND x y)) yes no)
 25220  		// cond: z.Uses == 1
 25221  		// result: (GT (TST x y) yes no)
 25222  		for b.Controls[0].Op == OpARM64CMPconst {
 25223  			v_0 := b.Controls[0]
 25224  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25225  				break
 25226  			}
 25227  			z := v_0.Args[0]
 25228  			if z.Op != OpARM64AND {
 25229  				break
 25230  			}
 25231  			_ = z.Args[1]
 25232  			z_0 := z.Args[0]
 25233  			z_1 := z.Args[1]
 25234  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25235  				x := z_0
 25236  				y := z_1
 25237  				if !(z.Uses == 1) {
 25238  					continue
 25239  				}
 25240  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 25241  				v0.AddArg2(x, y)
 25242  				b.resetWithControl(BlockARM64GT, v0)
 25243  				return true
 25244  			}
 25245  			break
 25246  		}
 25247  		// match: (GT (CMPconst [0] x:(ANDconst [c] y)) yes no)
 25248  		// cond: x.Uses == 1
 25249  		// result: (GT (TSTconst [c] y) yes no)
 25250  		for b.Controls[0].Op == OpARM64CMPconst {
 25251  			v_0 := b.Controls[0]
 25252  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25253  				break
 25254  			}
 25255  			x := v_0.Args[0]
 25256  			if x.Op != OpARM64ANDconst {
 25257  				break
 25258  			}
 25259  			c := auxIntToInt64(x.AuxInt)
 25260  			y := x.Args[0]
 25261  			if !(x.Uses == 1) {
 25262  				break
 25263  			}
 25264  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 25265  			v0.AuxInt = int64ToAuxInt(c)
 25266  			v0.AddArg(y)
 25267  			b.resetWithControl(BlockARM64GT, v0)
 25268  			return true
 25269  		}
 25270  		// match: (GT (CMPWconst [0] z:(AND x y)) yes no)
 25271  		// cond: z.Uses == 1
 25272  		// result: (GT (TSTW x y) yes no)
 25273  		for b.Controls[0].Op == OpARM64CMPWconst {
 25274  			v_0 := b.Controls[0]
 25275  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25276  				break
 25277  			}
 25278  			z := v_0.Args[0]
 25279  			if z.Op != OpARM64AND {
 25280  				break
 25281  			}
 25282  			_ = z.Args[1]
 25283  			z_0 := z.Args[0]
 25284  			z_1 := z.Args[1]
 25285  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25286  				x := z_0
 25287  				y := z_1
 25288  				if !(z.Uses == 1) {
 25289  					continue
 25290  				}
 25291  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 25292  				v0.AddArg2(x, y)
 25293  				b.resetWithControl(BlockARM64GT, v0)
 25294  				return true
 25295  			}
 25296  			break
 25297  		}
 25298  		// match: (GT (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 25299  		// cond: x.Uses == 1
 25300  		// result: (GT (TSTWconst [int32(c)] y) yes no)
 25301  		for b.Controls[0].Op == OpARM64CMPWconst {
 25302  			v_0 := b.Controls[0]
 25303  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25304  				break
 25305  			}
 25306  			x := v_0.Args[0]
 25307  			if x.Op != OpARM64ANDconst {
 25308  				break
 25309  			}
 25310  			c := auxIntToInt64(x.AuxInt)
 25311  			y := x.Args[0]
 25312  			if !(x.Uses == 1) {
 25313  				break
 25314  			}
 25315  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 25316  			v0.AuxInt = int32ToAuxInt(int32(c))
 25317  			v0.AddArg(y)
 25318  			b.resetWithControl(BlockARM64GT, v0)
 25319  			return true
 25320  		}
 25321  		// match: (GT (CMPconst [0] x:(ADDconst [c] y)) yes no)
 25322  		// cond: x.Uses == 1
 25323  		// result: (GTnoov (CMNconst [c] y) yes no)
 25324  		for b.Controls[0].Op == OpARM64CMPconst {
 25325  			v_0 := b.Controls[0]
 25326  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25327  				break
 25328  			}
 25329  			x := v_0.Args[0]
 25330  			if x.Op != OpARM64ADDconst {
 25331  				break
 25332  			}
 25333  			c := auxIntToInt64(x.AuxInt)
 25334  			y := x.Args[0]
 25335  			if !(x.Uses == 1) {
 25336  				break
 25337  			}
 25338  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 25339  			v0.AuxInt = int64ToAuxInt(c)
 25340  			v0.AddArg(y)
 25341  			b.resetWithControl(BlockARM64GTnoov, v0)
 25342  			return true
 25343  		}
 25344  		// match: (GT (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 25345  		// cond: x.Uses == 1
 25346  		// result: (GTnoov (CMNWconst [int32(c)] y) yes no)
 25347  		for b.Controls[0].Op == OpARM64CMPWconst {
 25348  			v_0 := b.Controls[0]
 25349  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25350  				break
 25351  			}
 25352  			x := v_0.Args[0]
 25353  			if x.Op != OpARM64ADDconst {
 25354  				break
 25355  			}
 25356  			c := auxIntToInt64(x.AuxInt)
 25357  			y := x.Args[0]
 25358  			if !(x.Uses == 1) {
 25359  				break
 25360  			}
 25361  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 25362  			v0.AuxInt = int32ToAuxInt(int32(c))
 25363  			v0.AddArg(y)
 25364  			b.resetWithControl(BlockARM64GTnoov, v0)
 25365  			return true
 25366  		}
 25367  		// match: (GT (CMPconst [0] z:(ADD x y)) yes no)
 25368  		// cond: z.Uses == 1
 25369  		// result: (GTnoov (CMN x y) yes no)
 25370  		for b.Controls[0].Op == OpARM64CMPconst {
 25371  			v_0 := b.Controls[0]
 25372  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25373  				break
 25374  			}
 25375  			z := v_0.Args[0]
 25376  			if z.Op != OpARM64ADD {
 25377  				break
 25378  			}
 25379  			_ = z.Args[1]
 25380  			z_0 := z.Args[0]
 25381  			z_1 := z.Args[1]
 25382  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25383  				x := z_0
 25384  				y := z_1
 25385  				if !(z.Uses == 1) {
 25386  					continue
 25387  				}
 25388  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 25389  				v0.AddArg2(x, y)
 25390  				b.resetWithControl(BlockARM64GTnoov, v0)
 25391  				return true
 25392  			}
 25393  			break
 25394  		}
 25395  		// match: (GT (CMPWconst [0] z:(ADD x y)) yes no)
 25396  		// cond: z.Uses == 1
 25397  		// result: (GTnoov (CMNW x y) yes no)
 25398  		for b.Controls[0].Op == OpARM64CMPWconst {
 25399  			v_0 := b.Controls[0]
 25400  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25401  				break
 25402  			}
 25403  			z := v_0.Args[0]
 25404  			if z.Op != OpARM64ADD {
 25405  				break
 25406  			}
 25407  			_ = z.Args[1]
 25408  			z_0 := z.Args[0]
 25409  			z_1 := z.Args[1]
 25410  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25411  				x := z_0
 25412  				y := z_1
 25413  				if !(z.Uses == 1) {
 25414  					continue
 25415  				}
 25416  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 25417  				v0.AddArg2(x, y)
 25418  				b.resetWithControl(BlockARM64GTnoov, v0)
 25419  				return true
 25420  			}
 25421  			break
 25422  		}
 25423  		// match: (GT (CMPconst [0] z:(MADD a x y)) yes no)
 25424  		// cond: z.Uses==1
 25425  		// result: (GTnoov (CMN a (MUL <x.Type> x y)) yes no)
 25426  		for b.Controls[0].Op == OpARM64CMPconst {
 25427  			v_0 := b.Controls[0]
 25428  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25429  				break
 25430  			}
 25431  			z := v_0.Args[0]
 25432  			if z.Op != OpARM64MADD {
 25433  				break
 25434  			}
 25435  			y := z.Args[2]
 25436  			a := z.Args[0]
 25437  			x := z.Args[1]
 25438  			if !(z.Uses == 1) {
 25439  				break
 25440  			}
 25441  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 25442  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 25443  			v1.AddArg2(x, y)
 25444  			v0.AddArg2(a, v1)
 25445  			b.resetWithControl(BlockARM64GTnoov, v0)
 25446  			return true
 25447  		}
 25448  		// match: (GT (CMPWconst [0] z:(MADDW a x y)) yes no)
 25449  		// cond: z.Uses==1
 25450  		// result: (GTnoov (CMNW a (MULW <x.Type> x y)) yes no)
 25451  		for b.Controls[0].Op == OpARM64CMPWconst {
 25452  			v_0 := b.Controls[0]
 25453  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25454  				break
 25455  			}
 25456  			z := v_0.Args[0]
 25457  			if z.Op != OpARM64MADDW {
 25458  				break
 25459  			}
 25460  			y := z.Args[2]
 25461  			a := z.Args[0]
 25462  			x := z.Args[1]
 25463  			if !(z.Uses == 1) {
 25464  				break
 25465  			}
 25466  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 25467  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 25468  			v1.AddArg2(x, y)
 25469  			v0.AddArg2(a, v1)
 25470  			b.resetWithControl(BlockARM64GTnoov, v0)
 25471  			return true
 25472  		}
 25473  		// match: (GT (FlagConstant [fc]) yes no)
 25474  		// cond: fc.gt()
 25475  		// result: (First yes no)
 25476  		for b.Controls[0].Op == OpARM64FlagConstant {
 25477  			v_0 := b.Controls[0]
 25478  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25479  			if !(fc.gt()) {
 25480  				break
 25481  			}
 25482  			b.Reset(BlockFirst)
 25483  			return true
 25484  		}
 25485  		// match: (GT (FlagConstant [fc]) yes no)
 25486  		// cond: !fc.gt()
 25487  		// result: (First no yes)
 25488  		for b.Controls[0].Op == OpARM64FlagConstant {
 25489  			v_0 := b.Controls[0]
 25490  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25491  			if !(!fc.gt()) {
 25492  				break
 25493  			}
 25494  			b.Reset(BlockFirst)
 25495  			b.swapSuccessors()
 25496  			return true
 25497  		}
 25498  		// match: (GT (InvertFlags cmp) yes no)
 25499  		// result: (LT cmp yes no)
 25500  		for b.Controls[0].Op == OpARM64InvertFlags {
 25501  			v_0 := b.Controls[0]
 25502  			cmp := v_0.Args[0]
 25503  			b.resetWithControl(BlockARM64LT, cmp)
 25504  			return true
 25505  		}
 25506  	case BlockARM64GTnoov:
 25507  		// match: (GTnoov (FlagConstant [fc]) yes no)
 25508  		// cond: fc.gtNoov()
 25509  		// result: (First yes no)
 25510  		for b.Controls[0].Op == OpARM64FlagConstant {
 25511  			v_0 := b.Controls[0]
 25512  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25513  			if !(fc.gtNoov()) {
 25514  				break
 25515  			}
 25516  			b.Reset(BlockFirst)
 25517  			return true
 25518  		}
 25519  		// match: (GTnoov (FlagConstant [fc]) yes no)
 25520  		// cond: !fc.gtNoov()
 25521  		// result: (First no yes)
 25522  		for b.Controls[0].Op == OpARM64FlagConstant {
 25523  			v_0 := b.Controls[0]
 25524  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25525  			if !(!fc.gtNoov()) {
 25526  				break
 25527  			}
 25528  			b.Reset(BlockFirst)
 25529  			b.swapSuccessors()
 25530  			return true
 25531  		}
 25532  	case BlockIf:
 25533  		// match: (If (Equal cc) yes no)
 25534  		// result: (EQ cc yes no)
 25535  		for b.Controls[0].Op == OpARM64Equal {
 25536  			v_0 := b.Controls[0]
 25537  			cc := v_0.Args[0]
 25538  			b.resetWithControl(BlockARM64EQ, cc)
 25539  			return true
 25540  		}
 25541  		// match: (If (NotEqual cc) yes no)
 25542  		// result: (NE cc yes no)
 25543  		for b.Controls[0].Op == OpARM64NotEqual {
 25544  			v_0 := b.Controls[0]
 25545  			cc := v_0.Args[0]
 25546  			b.resetWithControl(BlockARM64NE, cc)
 25547  			return true
 25548  		}
 25549  		// match: (If (LessThan cc) yes no)
 25550  		// result: (LT cc yes no)
 25551  		for b.Controls[0].Op == OpARM64LessThan {
 25552  			v_0 := b.Controls[0]
 25553  			cc := v_0.Args[0]
 25554  			b.resetWithControl(BlockARM64LT, cc)
 25555  			return true
 25556  		}
 25557  		// match: (If (LessThanU cc) yes no)
 25558  		// result: (ULT cc yes no)
 25559  		for b.Controls[0].Op == OpARM64LessThanU {
 25560  			v_0 := b.Controls[0]
 25561  			cc := v_0.Args[0]
 25562  			b.resetWithControl(BlockARM64ULT, cc)
 25563  			return true
 25564  		}
 25565  		// match: (If (LessEqual cc) yes no)
 25566  		// result: (LE cc yes no)
 25567  		for b.Controls[0].Op == OpARM64LessEqual {
 25568  			v_0 := b.Controls[0]
 25569  			cc := v_0.Args[0]
 25570  			b.resetWithControl(BlockARM64LE, cc)
 25571  			return true
 25572  		}
 25573  		// match: (If (LessEqualU cc) yes no)
 25574  		// result: (ULE cc yes no)
 25575  		for b.Controls[0].Op == OpARM64LessEqualU {
 25576  			v_0 := b.Controls[0]
 25577  			cc := v_0.Args[0]
 25578  			b.resetWithControl(BlockARM64ULE, cc)
 25579  			return true
 25580  		}
 25581  		// match: (If (GreaterThan cc) yes no)
 25582  		// result: (GT cc yes no)
 25583  		for b.Controls[0].Op == OpARM64GreaterThan {
 25584  			v_0 := b.Controls[0]
 25585  			cc := v_0.Args[0]
 25586  			b.resetWithControl(BlockARM64GT, cc)
 25587  			return true
 25588  		}
 25589  		// match: (If (GreaterThanU cc) yes no)
 25590  		// result: (UGT cc yes no)
 25591  		for b.Controls[0].Op == OpARM64GreaterThanU {
 25592  			v_0 := b.Controls[0]
 25593  			cc := v_0.Args[0]
 25594  			b.resetWithControl(BlockARM64UGT, cc)
 25595  			return true
 25596  		}
 25597  		// match: (If (GreaterEqual cc) yes no)
 25598  		// result: (GE cc yes no)
 25599  		for b.Controls[0].Op == OpARM64GreaterEqual {
 25600  			v_0 := b.Controls[0]
 25601  			cc := v_0.Args[0]
 25602  			b.resetWithControl(BlockARM64GE, cc)
 25603  			return true
 25604  		}
 25605  		// match: (If (GreaterEqualU cc) yes no)
 25606  		// result: (UGE cc yes no)
 25607  		for b.Controls[0].Op == OpARM64GreaterEqualU {
 25608  			v_0 := b.Controls[0]
 25609  			cc := v_0.Args[0]
 25610  			b.resetWithControl(BlockARM64UGE, cc)
 25611  			return true
 25612  		}
 25613  		// match: (If (LessThanF cc) yes no)
 25614  		// result: (FLT cc yes no)
 25615  		for b.Controls[0].Op == OpARM64LessThanF {
 25616  			v_0 := b.Controls[0]
 25617  			cc := v_0.Args[0]
 25618  			b.resetWithControl(BlockARM64FLT, cc)
 25619  			return true
 25620  		}
 25621  		// match: (If (LessEqualF cc) yes no)
 25622  		// result: (FLE cc yes no)
 25623  		for b.Controls[0].Op == OpARM64LessEqualF {
 25624  			v_0 := b.Controls[0]
 25625  			cc := v_0.Args[0]
 25626  			b.resetWithControl(BlockARM64FLE, cc)
 25627  			return true
 25628  		}
 25629  		// match: (If (GreaterThanF cc) yes no)
 25630  		// result: (FGT cc yes no)
 25631  		for b.Controls[0].Op == OpARM64GreaterThanF {
 25632  			v_0 := b.Controls[0]
 25633  			cc := v_0.Args[0]
 25634  			b.resetWithControl(BlockARM64FGT, cc)
 25635  			return true
 25636  		}
 25637  		// match: (If (GreaterEqualF cc) yes no)
 25638  		// result: (FGE cc yes no)
 25639  		for b.Controls[0].Op == OpARM64GreaterEqualF {
 25640  			v_0 := b.Controls[0]
 25641  			cc := v_0.Args[0]
 25642  			b.resetWithControl(BlockARM64FGE, cc)
 25643  			return true
 25644  		}
 25645  		// match: (If cond yes no)
 25646  		// result: (TBNZ [0] cond yes no)
 25647  		for {
 25648  			cond := b.Controls[0]
 25649  			b.resetWithControl(BlockARM64TBNZ, cond)
 25650  			b.AuxInt = int64ToAuxInt(0)
 25651  			return true
 25652  		}
 25653  	case BlockJumpTable:
 25654  		// match: (JumpTable idx)
 25655  		// result: (JUMPTABLE {makeJumpTableSym(b)} idx (MOVDaddr <typ.Uintptr> {makeJumpTableSym(b)} (SB)))
 25656  		for {
 25657  			idx := b.Controls[0]
 25658  			v0 := b.NewValue0(b.Pos, OpARM64MOVDaddr, typ.Uintptr)
 25659  			v0.Aux = symToAux(makeJumpTableSym(b))
 25660  			v1 := b.NewValue0(b.Pos, OpSB, typ.Uintptr)
 25661  			v0.AddArg(v1)
 25662  			b.resetWithControl2(BlockARM64JUMPTABLE, idx, v0)
 25663  			b.Aux = symToAux(makeJumpTableSym(b))
 25664  			return true
 25665  		}
 25666  	case BlockARM64LE:
 25667  		// match: (LE (CMPconst [0] z:(AND x y)) yes no)
 25668  		// cond: z.Uses == 1
 25669  		// result: (LE (TST x y) yes no)
 25670  		for b.Controls[0].Op == OpARM64CMPconst {
 25671  			v_0 := b.Controls[0]
 25672  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25673  				break
 25674  			}
 25675  			z := v_0.Args[0]
 25676  			if z.Op != OpARM64AND {
 25677  				break
 25678  			}
 25679  			_ = z.Args[1]
 25680  			z_0 := z.Args[0]
 25681  			z_1 := z.Args[1]
 25682  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25683  				x := z_0
 25684  				y := z_1
 25685  				if !(z.Uses == 1) {
 25686  					continue
 25687  				}
 25688  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 25689  				v0.AddArg2(x, y)
 25690  				b.resetWithControl(BlockARM64LE, v0)
 25691  				return true
 25692  			}
 25693  			break
 25694  		}
 25695  		// match: (LE (CMPconst [0] x:(ANDconst [c] y)) yes no)
 25696  		// cond: x.Uses == 1
 25697  		// result: (LE (TSTconst [c] y) yes no)
 25698  		for b.Controls[0].Op == OpARM64CMPconst {
 25699  			v_0 := b.Controls[0]
 25700  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25701  				break
 25702  			}
 25703  			x := v_0.Args[0]
 25704  			if x.Op != OpARM64ANDconst {
 25705  				break
 25706  			}
 25707  			c := auxIntToInt64(x.AuxInt)
 25708  			y := x.Args[0]
 25709  			if !(x.Uses == 1) {
 25710  				break
 25711  			}
 25712  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 25713  			v0.AuxInt = int64ToAuxInt(c)
 25714  			v0.AddArg(y)
 25715  			b.resetWithControl(BlockARM64LE, v0)
 25716  			return true
 25717  		}
 25718  		// match: (LE (CMPWconst [0] z:(AND x y)) yes no)
 25719  		// cond: z.Uses == 1
 25720  		// result: (LE (TSTW x y) yes no)
 25721  		for b.Controls[0].Op == OpARM64CMPWconst {
 25722  			v_0 := b.Controls[0]
 25723  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25724  				break
 25725  			}
 25726  			z := v_0.Args[0]
 25727  			if z.Op != OpARM64AND {
 25728  				break
 25729  			}
 25730  			_ = z.Args[1]
 25731  			z_0 := z.Args[0]
 25732  			z_1 := z.Args[1]
 25733  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25734  				x := z_0
 25735  				y := z_1
 25736  				if !(z.Uses == 1) {
 25737  					continue
 25738  				}
 25739  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 25740  				v0.AddArg2(x, y)
 25741  				b.resetWithControl(BlockARM64LE, v0)
 25742  				return true
 25743  			}
 25744  			break
 25745  		}
 25746  		// match: (LE (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 25747  		// cond: x.Uses == 1
 25748  		// result: (LE (TSTWconst [int32(c)] y) yes no)
 25749  		for b.Controls[0].Op == OpARM64CMPWconst {
 25750  			v_0 := b.Controls[0]
 25751  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25752  				break
 25753  			}
 25754  			x := v_0.Args[0]
 25755  			if x.Op != OpARM64ANDconst {
 25756  				break
 25757  			}
 25758  			c := auxIntToInt64(x.AuxInt)
 25759  			y := x.Args[0]
 25760  			if !(x.Uses == 1) {
 25761  				break
 25762  			}
 25763  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 25764  			v0.AuxInt = int32ToAuxInt(int32(c))
 25765  			v0.AddArg(y)
 25766  			b.resetWithControl(BlockARM64LE, v0)
 25767  			return true
 25768  		}
 25769  		// match: (LE (CMPconst [0] x:(ADDconst [c] y)) yes no)
 25770  		// cond: x.Uses == 1
 25771  		// result: (LEnoov (CMNconst [c] y) yes no)
 25772  		for b.Controls[0].Op == OpARM64CMPconst {
 25773  			v_0 := b.Controls[0]
 25774  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25775  				break
 25776  			}
 25777  			x := v_0.Args[0]
 25778  			if x.Op != OpARM64ADDconst {
 25779  				break
 25780  			}
 25781  			c := auxIntToInt64(x.AuxInt)
 25782  			y := x.Args[0]
 25783  			if !(x.Uses == 1) {
 25784  				break
 25785  			}
 25786  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 25787  			v0.AuxInt = int64ToAuxInt(c)
 25788  			v0.AddArg(y)
 25789  			b.resetWithControl(BlockARM64LEnoov, v0)
 25790  			return true
 25791  		}
 25792  		// match: (LE (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 25793  		// cond: x.Uses == 1
 25794  		// result: (LEnoov (CMNWconst [int32(c)] y) yes no)
 25795  		for b.Controls[0].Op == OpARM64CMPWconst {
 25796  			v_0 := b.Controls[0]
 25797  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25798  				break
 25799  			}
 25800  			x := v_0.Args[0]
 25801  			if x.Op != OpARM64ADDconst {
 25802  				break
 25803  			}
 25804  			c := auxIntToInt64(x.AuxInt)
 25805  			y := x.Args[0]
 25806  			if !(x.Uses == 1) {
 25807  				break
 25808  			}
 25809  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 25810  			v0.AuxInt = int32ToAuxInt(int32(c))
 25811  			v0.AddArg(y)
 25812  			b.resetWithControl(BlockARM64LEnoov, v0)
 25813  			return true
 25814  		}
 25815  		// match: (LE (CMPconst [0] z:(ADD x y)) yes no)
 25816  		// cond: z.Uses == 1
 25817  		// result: (LEnoov (CMN x y) yes no)
 25818  		for b.Controls[0].Op == OpARM64CMPconst {
 25819  			v_0 := b.Controls[0]
 25820  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25821  				break
 25822  			}
 25823  			z := v_0.Args[0]
 25824  			if z.Op != OpARM64ADD {
 25825  				break
 25826  			}
 25827  			_ = z.Args[1]
 25828  			z_0 := z.Args[0]
 25829  			z_1 := z.Args[1]
 25830  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25831  				x := z_0
 25832  				y := z_1
 25833  				if !(z.Uses == 1) {
 25834  					continue
 25835  				}
 25836  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 25837  				v0.AddArg2(x, y)
 25838  				b.resetWithControl(BlockARM64LEnoov, v0)
 25839  				return true
 25840  			}
 25841  			break
 25842  		}
 25843  		// match: (LE (CMPWconst [0] z:(ADD x y)) yes no)
 25844  		// cond: z.Uses == 1
 25845  		// result: (LEnoov (CMNW x y) yes no)
 25846  		for b.Controls[0].Op == OpARM64CMPWconst {
 25847  			v_0 := b.Controls[0]
 25848  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25849  				break
 25850  			}
 25851  			z := v_0.Args[0]
 25852  			if z.Op != OpARM64ADD {
 25853  				break
 25854  			}
 25855  			_ = z.Args[1]
 25856  			z_0 := z.Args[0]
 25857  			z_1 := z.Args[1]
 25858  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25859  				x := z_0
 25860  				y := z_1
 25861  				if !(z.Uses == 1) {
 25862  					continue
 25863  				}
 25864  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 25865  				v0.AddArg2(x, y)
 25866  				b.resetWithControl(BlockARM64LEnoov, v0)
 25867  				return true
 25868  			}
 25869  			break
 25870  		}
 25871  		// match: (LE (CMPconst [0] z:(MADD a x y)) yes no)
 25872  		// cond: z.Uses==1
 25873  		// result: (LEnoov (CMN a (MUL <x.Type> x y)) yes no)
 25874  		for b.Controls[0].Op == OpARM64CMPconst {
 25875  			v_0 := b.Controls[0]
 25876  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25877  				break
 25878  			}
 25879  			z := v_0.Args[0]
 25880  			if z.Op != OpARM64MADD {
 25881  				break
 25882  			}
 25883  			y := z.Args[2]
 25884  			a := z.Args[0]
 25885  			x := z.Args[1]
 25886  			if !(z.Uses == 1) {
 25887  				break
 25888  			}
 25889  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 25890  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 25891  			v1.AddArg2(x, y)
 25892  			v0.AddArg2(a, v1)
 25893  			b.resetWithControl(BlockARM64LEnoov, v0)
 25894  			return true
 25895  		}
 25896  		// match: (LE (CMPWconst [0] z:(MADDW a x y)) yes no)
 25897  		// cond: z.Uses==1
 25898  		// result: (LEnoov (CMNW a (MULW <x.Type> x y)) yes no)
 25899  		for b.Controls[0].Op == OpARM64CMPWconst {
 25900  			v_0 := b.Controls[0]
 25901  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25902  				break
 25903  			}
 25904  			z := v_0.Args[0]
 25905  			if z.Op != OpARM64MADDW {
 25906  				break
 25907  			}
 25908  			y := z.Args[2]
 25909  			a := z.Args[0]
 25910  			x := z.Args[1]
 25911  			if !(z.Uses == 1) {
 25912  				break
 25913  			}
 25914  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 25915  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 25916  			v1.AddArg2(x, y)
 25917  			v0.AddArg2(a, v1)
 25918  			b.resetWithControl(BlockARM64LEnoov, v0)
 25919  			return true
 25920  		}
 25921  		// match: (LE (FlagConstant [fc]) yes no)
 25922  		// cond: fc.le()
 25923  		// result: (First yes no)
 25924  		for b.Controls[0].Op == OpARM64FlagConstant {
 25925  			v_0 := b.Controls[0]
 25926  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25927  			if !(fc.le()) {
 25928  				break
 25929  			}
 25930  			b.Reset(BlockFirst)
 25931  			return true
 25932  		}
 25933  		// match: (LE (FlagConstant [fc]) yes no)
 25934  		// cond: !fc.le()
 25935  		// result: (First no yes)
 25936  		for b.Controls[0].Op == OpARM64FlagConstant {
 25937  			v_0 := b.Controls[0]
 25938  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25939  			if !(!fc.le()) {
 25940  				break
 25941  			}
 25942  			b.Reset(BlockFirst)
 25943  			b.swapSuccessors()
 25944  			return true
 25945  		}
 25946  		// match: (LE (InvertFlags cmp) yes no)
 25947  		// result: (GE cmp yes no)
 25948  		for b.Controls[0].Op == OpARM64InvertFlags {
 25949  			v_0 := b.Controls[0]
 25950  			cmp := v_0.Args[0]
 25951  			b.resetWithControl(BlockARM64GE, cmp)
 25952  			return true
 25953  		}
 25954  	case BlockARM64LEnoov:
 25955  		// match: (LEnoov (FlagConstant [fc]) yes no)
 25956  		// cond: fc.leNoov()
 25957  		// result: (First yes no)
 25958  		for b.Controls[0].Op == OpARM64FlagConstant {
 25959  			v_0 := b.Controls[0]
 25960  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25961  			if !(fc.leNoov()) {
 25962  				break
 25963  			}
 25964  			b.Reset(BlockFirst)
 25965  			return true
 25966  		}
 25967  		// match: (LEnoov (FlagConstant [fc]) yes no)
 25968  		// cond: !fc.leNoov()
 25969  		// result: (First no yes)
 25970  		for b.Controls[0].Op == OpARM64FlagConstant {
 25971  			v_0 := b.Controls[0]
 25972  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25973  			if !(!fc.leNoov()) {
 25974  				break
 25975  			}
 25976  			b.Reset(BlockFirst)
 25977  			b.swapSuccessors()
 25978  			return true
 25979  		}
 25980  	case BlockARM64LT:
 25981  		// match: (LT (CMPconst [0] z:(AND x y)) yes no)
 25982  		// cond: z.Uses == 1
 25983  		// result: (LT (TST x y) yes no)
 25984  		for b.Controls[0].Op == OpARM64CMPconst {
 25985  			v_0 := b.Controls[0]
 25986  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25987  				break
 25988  			}
 25989  			z := v_0.Args[0]
 25990  			if z.Op != OpARM64AND {
 25991  				break
 25992  			}
 25993  			_ = z.Args[1]
 25994  			z_0 := z.Args[0]
 25995  			z_1 := z.Args[1]
 25996  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25997  				x := z_0
 25998  				y := z_1
 25999  				if !(z.Uses == 1) {
 26000  					continue
 26001  				}
 26002  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 26003  				v0.AddArg2(x, y)
 26004  				b.resetWithControl(BlockARM64LT, v0)
 26005  				return true
 26006  			}
 26007  			break
 26008  		}
 26009  		// match: (LT (CMPconst [0] x:(ANDconst [c] y)) yes no)
 26010  		// cond: x.Uses == 1
 26011  		// result: (LT (TSTconst [c] y) yes no)
 26012  		for b.Controls[0].Op == OpARM64CMPconst {
 26013  			v_0 := b.Controls[0]
 26014  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26015  				break
 26016  			}
 26017  			x := v_0.Args[0]
 26018  			if x.Op != OpARM64ANDconst {
 26019  				break
 26020  			}
 26021  			c := auxIntToInt64(x.AuxInt)
 26022  			y := x.Args[0]
 26023  			if !(x.Uses == 1) {
 26024  				break
 26025  			}
 26026  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 26027  			v0.AuxInt = int64ToAuxInt(c)
 26028  			v0.AddArg(y)
 26029  			b.resetWithControl(BlockARM64LT, v0)
 26030  			return true
 26031  		}
 26032  		// match: (LT (CMPWconst [0] z:(AND x y)) yes no)
 26033  		// cond: z.Uses == 1
 26034  		// result: (LT (TSTW x y) yes no)
 26035  		for b.Controls[0].Op == OpARM64CMPWconst {
 26036  			v_0 := b.Controls[0]
 26037  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26038  				break
 26039  			}
 26040  			z := v_0.Args[0]
 26041  			if z.Op != OpARM64AND {
 26042  				break
 26043  			}
 26044  			_ = z.Args[1]
 26045  			z_0 := z.Args[0]
 26046  			z_1 := z.Args[1]
 26047  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 26048  				x := z_0
 26049  				y := z_1
 26050  				if !(z.Uses == 1) {
 26051  					continue
 26052  				}
 26053  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 26054  				v0.AddArg2(x, y)
 26055  				b.resetWithControl(BlockARM64LT, v0)
 26056  				return true
 26057  			}
 26058  			break
 26059  		}
 26060  		// match: (LT (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 26061  		// cond: x.Uses == 1
 26062  		// result: (LT (TSTWconst [int32(c)] y) yes no)
 26063  		for b.Controls[0].Op == OpARM64CMPWconst {
 26064  			v_0 := b.Controls[0]
 26065  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26066  				break
 26067  			}
 26068  			x := v_0.Args[0]
 26069  			if x.Op != OpARM64ANDconst {
 26070  				break
 26071  			}
 26072  			c := auxIntToInt64(x.AuxInt)
 26073  			y := x.Args[0]
 26074  			if !(x.Uses == 1) {
 26075  				break
 26076  			}
 26077  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 26078  			v0.AuxInt = int32ToAuxInt(int32(c))
 26079  			v0.AddArg(y)
 26080  			b.resetWithControl(BlockARM64LT, v0)
 26081  			return true
 26082  		}
 26083  		// match: (LT (CMPconst [0] x:(ADDconst [c] y)) yes no)
 26084  		// cond: x.Uses == 1
 26085  		// result: (LTnoov (CMNconst [c] y) yes no)
 26086  		for b.Controls[0].Op == OpARM64CMPconst {
 26087  			v_0 := b.Controls[0]
 26088  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26089  				break
 26090  			}
 26091  			x := v_0.Args[0]
 26092  			if x.Op != OpARM64ADDconst {
 26093  				break
 26094  			}
 26095  			c := auxIntToInt64(x.AuxInt)
 26096  			y := x.Args[0]
 26097  			if !(x.Uses == 1) {
 26098  				break
 26099  			}
 26100  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 26101  			v0.AuxInt = int64ToAuxInt(c)
 26102  			v0.AddArg(y)
 26103  			b.resetWithControl(BlockARM64LTnoov, v0)
 26104  			return true
 26105  		}
 26106  		// match: (LT (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 26107  		// cond: x.Uses == 1
 26108  		// result: (LTnoov (CMNWconst [int32(c)] y) yes no)
 26109  		for b.Controls[0].Op == OpARM64CMPWconst {
 26110  			v_0 := b.Controls[0]
 26111  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26112  				break
 26113  			}
 26114  			x := v_0.Args[0]
 26115  			if x.Op != OpARM64ADDconst {
 26116  				break
 26117  			}
 26118  			c := auxIntToInt64(x.AuxInt)
 26119  			y := x.Args[0]
 26120  			if !(x.Uses == 1) {
 26121  				break
 26122  			}
 26123  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 26124  			v0.AuxInt = int32ToAuxInt(int32(c))
 26125  			v0.AddArg(y)
 26126  			b.resetWithControl(BlockARM64LTnoov, v0)
 26127  			return true
 26128  		}
 26129  		// match: (LT (CMPconst [0] z:(ADD x y)) yes no)
 26130  		// cond: z.Uses == 1
 26131  		// result: (LTnoov (CMN x y) yes no)
 26132  		for b.Controls[0].Op == OpARM64CMPconst {
 26133  			v_0 := b.Controls[0]
 26134  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26135  				break
 26136  			}
 26137  			z := v_0.Args[0]
 26138  			if z.Op != OpARM64ADD {
 26139  				break
 26140  			}
 26141  			_ = z.Args[1]
 26142  			z_0 := z.Args[0]
 26143  			z_1 := z.Args[1]
 26144  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 26145  				x := z_0
 26146  				y := z_1
 26147  				if !(z.Uses == 1) {
 26148  					continue
 26149  				}
 26150  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 26151  				v0.AddArg2(x, y)
 26152  				b.resetWithControl(BlockARM64LTnoov, v0)
 26153  				return true
 26154  			}
 26155  			break
 26156  		}
 26157  		// match: (LT (CMPWconst [0] z:(ADD x y)) yes no)
 26158  		// cond: z.Uses == 1
 26159  		// result: (LTnoov (CMNW x y) yes no)
 26160  		for b.Controls[0].Op == OpARM64CMPWconst {
 26161  			v_0 := b.Controls[0]
 26162  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26163  				break
 26164  			}
 26165  			z := v_0.Args[0]
 26166  			if z.Op != OpARM64ADD {
 26167  				break
 26168  			}
 26169  			_ = z.Args[1]
 26170  			z_0 := z.Args[0]
 26171  			z_1 := z.Args[1]
 26172  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 26173  				x := z_0
 26174  				y := z_1
 26175  				if !(z.Uses == 1) {
 26176  					continue
 26177  				}
 26178  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 26179  				v0.AddArg2(x, y)
 26180  				b.resetWithControl(BlockARM64LTnoov, v0)
 26181  				return true
 26182  			}
 26183  			break
 26184  		}
 26185  		// match: (LT (CMPconst [0] z:(MADD a x y)) yes no)
 26186  		// cond: z.Uses==1
 26187  		// result: (LTnoov (CMN a (MUL <x.Type> x y)) yes no)
 26188  		for b.Controls[0].Op == OpARM64CMPconst {
 26189  			v_0 := b.Controls[0]
 26190  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26191  				break
 26192  			}
 26193  			z := v_0.Args[0]
 26194  			if z.Op != OpARM64MADD {
 26195  				break
 26196  			}
 26197  			y := z.Args[2]
 26198  			a := z.Args[0]
 26199  			x := z.Args[1]
 26200  			if !(z.Uses == 1) {
 26201  				break
 26202  			}
 26203  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 26204  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 26205  			v1.AddArg2(x, y)
 26206  			v0.AddArg2(a, v1)
 26207  			b.resetWithControl(BlockARM64LTnoov, v0)
 26208  			return true
 26209  		}
 26210  		// match: (LT (CMPWconst [0] z:(MADDW a x y)) yes no)
 26211  		// cond: z.Uses==1
 26212  		// result: (LTnoov (CMNW a (MULW <x.Type> x y)) yes no)
 26213  		for b.Controls[0].Op == OpARM64CMPWconst {
 26214  			v_0 := b.Controls[0]
 26215  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26216  				break
 26217  			}
 26218  			z := v_0.Args[0]
 26219  			if z.Op != OpARM64MADDW {
 26220  				break
 26221  			}
 26222  			y := z.Args[2]
 26223  			a := z.Args[0]
 26224  			x := z.Args[1]
 26225  			if !(z.Uses == 1) {
 26226  				break
 26227  			}
 26228  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 26229  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 26230  			v1.AddArg2(x, y)
 26231  			v0.AddArg2(a, v1)
 26232  			b.resetWithControl(BlockARM64LTnoov, v0)
 26233  			return true
 26234  		}
 26235  		// match: (LT (CMPWconst [0] x) yes no)
 26236  		// result: (TBNZ [31] x yes no)
 26237  		for b.Controls[0].Op == OpARM64CMPWconst {
 26238  			v_0 := b.Controls[0]
 26239  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26240  				break
 26241  			}
 26242  			x := v_0.Args[0]
 26243  			b.resetWithControl(BlockARM64TBNZ, x)
 26244  			b.AuxInt = int64ToAuxInt(31)
 26245  			return true
 26246  		}
 26247  		// match: (LT (CMPconst [0] x) yes no)
 26248  		// result: (TBNZ [63] x yes no)
 26249  		for b.Controls[0].Op == OpARM64CMPconst {
 26250  			v_0 := b.Controls[0]
 26251  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26252  				break
 26253  			}
 26254  			x := v_0.Args[0]
 26255  			b.resetWithControl(BlockARM64TBNZ, x)
 26256  			b.AuxInt = int64ToAuxInt(63)
 26257  			return true
 26258  		}
 26259  		// match: (LT (FlagConstant [fc]) yes no)
 26260  		// cond: fc.lt()
 26261  		// result: (First yes no)
 26262  		for b.Controls[0].Op == OpARM64FlagConstant {
 26263  			v_0 := b.Controls[0]
 26264  			fc := auxIntToFlagConstant(v_0.AuxInt)
 26265  			if !(fc.lt()) {
 26266  				break
 26267  			}
 26268  			b.Reset(BlockFirst)
 26269  			return true
 26270  		}
 26271  		// match: (LT (FlagConstant [fc]) yes no)
 26272  		// cond: !fc.lt()
 26273  		// result: (First no yes)
 26274  		for b.Controls[0].Op == OpARM64FlagConstant {
 26275  			v_0 := b.Controls[0]
 26276  			fc := auxIntToFlagConstant(v_0.AuxInt)
 26277  			if !(!fc.lt()) {
 26278  				break
 26279  			}
 26280  			b.Reset(BlockFirst)
 26281  			b.swapSuccessors()
 26282  			return true
 26283  		}
 26284  		// match: (LT (InvertFlags cmp) yes no)
 26285  		// result: (GT cmp yes no)
 26286  		for b.Controls[0].Op == OpARM64InvertFlags {
 26287  			v_0 := b.Controls[0]
 26288  			cmp := v_0.Args[0]
 26289  			b.resetWithControl(BlockARM64GT, cmp)
 26290  			return true
 26291  		}
 26292  	case BlockARM64LTnoov:
 26293  		// match: (LTnoov (FlagConstant [fc]) yes no)
 26294  		// cond: fc.ltNoov()
 26295  		// result: (First yes no)
 26296  		for b.Controls[0].Op == OpARM64FlagConstant {
 26297  			v_0 := b.Controls[0]
 26298  			fc := auxIntToFlagConstant(v_0.AuxInt)
 26299  			if !(fc.ltNoov()) {
 26300  				break
 26301  			}
 26302  			b.Reset(BlockFirst)
 26303  			return true
 26304  		}
 26305  		// match: (LTnoov (FlagConstant [fc]) yes no)
 26306  		// cond: !fc.ltNoov()
 26307  		// result: (First no yes)
 26308  		for b.Controls[0].Op == OpARM64FlagConstant {
 26309  			v_0 := b.Controls[0]
 26310  			fc := auxIntToFlagConstant(v_0.AuxInt)
 26311  			if !(!fc.ltNoov()) {
 26312  				break
 26313  			}
 26314  			b.Reset(BlockFirst)
 26315  			b.swapSuccessors()
 26316  			return true
 26317  		}
 26318  	case BlockARM64NE:
 26319  		// match: (NE (CMPconst [0] z:(AND x y)) yes no)
 26320  		// cond: z.Uses == 1
 26321  		// result: (NE (TST x y) yes no)
 26322  		for b.Controls[0].Op == OpARM64CMPconst {
 26323  			v_0 := b.Controls[0]
 26324  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26325  				break
 26326  			}
 26327  			z := v_0.Args[0]
 26328  			if z.Op != OpARM64AND {
 26329  				break
 26330  			}
 26331  			_ = z.Args[1]
 26332  			z_0 := z.Args[0]
 26333  			z_1 := z.Args[1]
 26334  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 26335  				x := z_0
 26336  				y := z_1
 26337  				if !(z.Uses == 1) {
 26338  					continue
 26339  				}
 26340  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 26341  				v0.AddArg2(x, y)
 26342  				b.resetWithControl(BlockARM64NE, v0)
 26343  				return true
 26344  			}
 26345  			break
 26346  		}
 26347  		// match: (NE (CMPconst [0] x:(ANDconst [c] y)) yes no)
 26348  		// cond: x.Uses == 1
 26349  		// result: (NE (TSTconst [c] y) yes no)
 26350  		for b.Controls[0].Op == OpARM64CMPconst {
 26351  			v_0 := b.Controls[0]
 26352  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26353  				break
 26354  			}
 26355  			x := v_0.Args[0]
 26356  			if x.Op != OpARM64ANDconst {
 26357  				break
 26358  			}
 26359  			c := auxIntToInt64(x.AuxInt)
 26360  			y := x.Args[0]
 26361  			if !(x.Uses == 1) {
 26362  				break
 26363  			}
 26364  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 26365  			v0.AuxInt = int64ToAuxInt(c)
 26366  			v0.AddArg(y)
 26367  			b.resetWithControl(BlockARM64NE, v0)
 26368  			return true
 26369  		}
 26370  		// match: (NE (CMPWconst [0] z:(AND x y)) yes no)
 26371  		// cond: z.Uses == 1
 26372  		// result: (NE (TSTW x y) yes no)
 26373  		for b.Controls[0].Op == OpARM64CMPWconst {
 26374  			v_0 := b.Controls[0]
 26375  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26376  				break
 26377  			}
 26378  			z := v_0.Args[0]
 26379  			if z.Op != OpARM64AND {
 26380  				break
 26381  			}
 26382  			_ = z.Args[1]
 26383  			z_0 := z.Args[0]
 26384  			z_1 := z.Args[1]
 26385  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 26386  				x := z_0
 26387  				y := z_1
 26388  				if !(z.Uses == 1) {
 26389  					continue
 26390  				}
 26391  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 26392  				v0.AddArg2(x, y)
 26393  				b.resetWithControl(BlockARM64NE, v0)
 26394  				return true
 26395  			}
 26396  			break
 26397  		}
 26398  		// match: (NE (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 26399  		// cond: x.Uses == 1
 26400  		// result: (NE (TSTWconst [int32(c)] y) yes no)
 26401  		for b.Controls[0].Op == OpARM64CMPWconst {
 26402  			v_0 := b.Controls[0]
 26403  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26404  				break
 26405  			}
 26406  			x := v_0.Args[0]
 26407  			if x.Op != OpARM64ANDconst {
 26408  				break
 26409  			}
 26410  			c := auxIntToInt64(x.AuxInt)
 26411  			y := x.Args[0]
 26412  			if !(x.Uses == 1) {
 26413  				break
 26414  			}
 26415  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 26416  			v0.AuxInt = int32ToAuxInt(int32(c))
 26417  			v0.AddArg(y)
 26418  			b.resetWithControl(BlockARM64NE, v0)
 26419  			return true
 26420  		}
 26421  		// match: (NE (CMPconst [0] x:(ADDconst [c] y)) yes no)
 26422  		// cond: x.Uses == 1
 26423  		// result: (NE (CMNconst [c] y) yes no)
 26424  		for b.Controls[0].Op == OpARM64CMPconst {
 26425  			v_0 := b.Controls[0]
 26426  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26427  				break
 26428  			}
 26429  			x := v_0.Args[0]
 26430  			if x.Op != OpARM64ADDconst {
 26431  				break
 26432  			}
 26433  			c := auxIntToInt64(x.AuxInt)
 26434  			y := x.Args[0]
 26435  			if !(x.Uses == 1) {
 26436  				break
 26437  			}
 26438  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 26439  			v0.AuxInt = int64ToAuxInt(c)
 26440  			v0.AddArg(y)
 26441  			b.resetWithControl(BlockARM64NE, v0)
 26442  			return true
 26443  		}
 26444  		// match: (NE (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 26445  		// cond: x.Uses == 1
 26446  		// result: (NE (CMNWconst [int32(c)] y) yes no)
 26447  		for b.Controls[0].Op == OpARM64CMPWconst {
 26448  			v_0 := b.Controls[0]
 26449  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26450  				break
 26451  			}
 26452  			x := v_0.Args[0]
 26453  			if x.Op != OpARM64ADDconst {
 26454  				break
 26455  			}
 26456  			c := auxIntToInt64(x.AuxInt)
 26457  			y := x.Args[0]
 26458  			if !(x.Uses == 1) {
 26459  				break
 26460  			}
 26461  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 26462  			v0.AuxInt = int32ToAuxInt(int32(c))
 26463  			v0.AddArg(y)
 26464  			b.resetWithControl(BlockARM64NE, v0)
 26465  			return true
 26466  		}
 26467  		// match: (NE (CMPconst [0] z:(ADD x y)) yes no)
 26468  		// cond: z.Uses == 1
 26469  		// result: (NE (CMN x y) yes no)
 26470  		for b.Controls[0].Op == OpARM64CMPconst {
 26471  			v_0 := b.Controls[0]
 26472  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26473  				break
 26474  			}
 26475  			z := v_0.Args[0]
 26476  			if z.Op != OpARM64ADD {
 26477  				break
 26478  			}
 26479  			_ = z.Args[1]
 26480  			z_0 := z.Args[0]
 26481  			z_1 := z.Args[1]
 26482  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 26483  				x := z_0
 26484  				y := z_1
 26485  				if !(z.Uses == 1) {
 26486  					continue
 26487  				}
 26488  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 26489  				v0.AddArg2(x, y)
 26490  				b.resetWithControl(BlockARM64NE, v0)
 26491  				return true
 26492  			}
 26493  			break
 26494  		}
 26495  		// match: (NE (CMPWconst [0] z:(ADD x y)) yes no)
 26496  		// cond: z.Uses == 1
 26497  		// result: (NE (CMNW x y) yes no)
 26498  		for b.Controls[0].Op == OpARM64CMPWconst {
 26499  			v_0 := b.Controls[0]
 26500  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26501  				break
 26502  			}
 26503  			z := v_0.Args[0]
 26504  			if z.Op != OpARM64ADD {
 26505  				break
 26506  			}
 26507  			_ = z.Args[1]
 26508  			z_0 := z.Args[0]
 26509  			z_1 := z.Args[1]
 26510  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 26511  				x := z_0
 26512  				y := z_1
 26513  				if !(z.Uses == 1) {
 26514  					continue
 26515  				}
 26516  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 26517  				v0.AddArg2(x, y)
 26518  				b.resetWithControl(BlockARM64NE, v0)
 26519  				return true
 26520  			}
 26521  			break
 26522  		}
 26523  		// match: (NE (CMP x z:(NEG y)) yes no)
 26524  		// cond: z.Uses == 1
 26525  		// result: (NE (CMN x y) yes no)
 26526  		for b.Controls[0].Op == OpARM64CMP {
 26527  			v_0 := b.Controls[0]
 26528  			_ = v_0.Args[1]
 26529  			x := v_0.Args[0]
 26530  			z := v_0.Args[1]
 26531  			if z.Op != OpARM64NEG {
 26532  				break
 26533  			}
 26534  			y := z.Args[0]
 26535  			if !(z.Uses == 1) {
 26536  				break
 26537  			}
 26538  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 26539  			v0.AddArg2(x, y)
 26540  			b.resetWithControl(BlockARM64NE, v0)
 26541  			return true
 26542  		}
 26543  		// match: (NE (CMPW x z:(NEG y)) yes no)
 26544  		// cond: z.Uses == 1
 26545  		// result: (NE (CMNW x y) yes no)
 26546  		for b.Controls[0].Op == OpARM64CMPW {
 26547  			v_0 := b.Controls[0]
 26548  			_ = v_0.Args[1]
 26549  			x := v_0.Args[0]
 26550  			z := v_0.Args[1]
 26551  			if z.Op != OpARM64NEG {
 26552  				break
 26553  			}
 26554  			y := z.Args[0]
 26555  			if !(z.Uses == 1) {
 26556  				break
 26557  			}
 26558  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 26559  			v0.AddArg2(x, y)
 26560  			b.resetWithControl(BlockARM64NE, v0)
 26561  			return true
 26562  		}
 26563  		// match: (NE (CMPconst [0] x) yes no)
 26564  		// result: (NZ x yes no)
 26565  		for b.Controls[0].Op == OpARM64CMPconst {
 26566  			v_0 := b.Controls[0]
 26567  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26568  				break
 26569  			}
 26570  			x := v_0.Args[0]
 26571  			b.resetWithControl(BlockARM64NZ, x)
 26572  			return true
 26573  		}
 26574  		// match: (NE (CMPWconst [0] x) yes no)
 26575  		// result: (NZW x yes no)
 26576  		for b.Controls[0].Op == OpARM64CMPWconst {
 26577  			v_0 := b.Controls[0]
 26578  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26579  				break
 26580  			}
 26581  			x := v_0.Args[0]
 26582  			b.resetWithControl(BlockARM64NZW, x)
 26583  			return true
 26584  		}
 26585  		// match: (NE (CMPconst [0] z:(MADD a x y)) yes no)
 26586  		// cond: z.Uses==1
 26587  		// result: (NE (CMN a (MUL <x.Type> x y)) yes no)
 26588  		for b.Controls[0].Op == OpARM64CMPconst {
 26589  			v_0 := b.Controls[0]
 26590  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26591  				break
 26592  			}
 26593  			z := v_0.Args[0]
 26594  			if z.Op != OpARM64MADD {
 26595  				break
 26596  			}
 26597  			y := z.Args[2]
 26598  			a := z.Args[0]
 26599  			x := z.Args[1]
 26600  			if !(z.Uses == 1) {
 26601  				break
 26602  			}
 26603  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 26604  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 26605  			v1.AddArg2(x, y)
 26606  			v0.AddArg2(a, v1)
 26607  			b.resetWithControl(BlockARM64NE, v0)
 26608  			return true
 26609  		}
 26610  		// match: (NE (CMPWconst [0] z:(MADDW a x y)) yes no)
 26611  		// cond: z.Uses==1
 26612  		// result: (NE (CMNW a (MULW <x.Type> x y)) yes no)
 26613  		for b.Controls[0].Op == OpARM64CMPWconst {
 26614  			v_0 := b.Controls[0]
 26615  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26616  				break
 26617  			}
 26618  			z := v_0.Args[0]
 26619  			if z.Op != OpARM64MADDW {
 26620  				break
 26621  			}
 26622  			y := z.Args[2]
 26623  			a := z.Args[0]
 26624  			x := z.Args[1]
 26625  			if !(z.Uses == 1) {
 26626  				break
 26627  			}
 26628  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 26629  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 26630  			v1.AddArg2(x, y)
 26631  			v0.AddArg2(a, v1)
 26632  			b.resetWithControl(BlockARM64NE, v0)
 26633  			return true
 26634  		}
 26635  		// match: (NE (CMPconst [0] z:(MSUB a x y)) yes no)
 26636  		// cond: z.Uses==1
 26637  		// result: (NE (CMP a (MUL <x.Type> x y)) yes no)
 26638  		for b.Controls[0].Op == OpARM64CMPconst {
 26639  			v_0 := b.Controls[0]
 26640  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26641  				break
 26642  			}
 26643  			z := v_0.Args[0]
 26644  			if z.Op != OpARM64MSUB {
 26645  				break
 26646  			}
 26647  			y := z.Args[2]
 26648  			a := z.Args[0]
 26649  			x := z.Args[1]
 26650  			if !(z.Uses == 1) {
 26651  				break
 26652  			}
 26653  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 26654  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 26655  			v1.AddArg2(x, y)
 26656  			v0.AddArg2(a, v1)
 26657  			b.resetWithControl(BlockARM64NE, v0)
 26658  			return true
 26659  		}
 26660  		// match: (NE (CMPWconst [0] z:(MSUBW a x y)) yes no)
 26661  		// cond: z.Uses==1
 26662  		// result: (NE (CMPW a (MULW <x.Type> x y)) yes no)
 26663  		for b.Controls[0].Op == OpARM64CMPWconst {
 26664  			v_0 := b.Controls[0]
 26665  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26666  				break
 26667  			}
 26668  			z := v_0.Args[0]
 26669  			if z.Op != OpARM64MSUBW {
 26670  				break
 26671  			}
 26672  			y := z.Args[2]
 26673  			a := z.Args[0]
 26674  			x := z.Args[1]
 26675  			if !(z.Uses == 1) {
 26676  				break
 26677  			}
 26678  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 26679  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 26680  			v1.AddArg2(x, y)
 26681  			v0.AddArg2(a, v1)
 26682  			b.resetWithControl(BlockARM64NE, v0)
 26683  			return true
 26684  		}
 26685  		// match: (NE (TSTconst [c] x) yes no)
 26686  		// cond: oneBit(c)
 26687  		// result: (TBNZ [int64(ntz64(c))] x yes no)
 26688  		for b.Controls[0].Op == OpARM64TSTconst {
 26689  			v_0 := b.Controls[0]
 26690  			c := auxIntToInt64(v_0.AuxInt)
 26691  			x := v_0.Args[0]
 26692  			if !(oneBit(c)) {
 26693  				break
 26694  			}
 26695  			b.resetWithControl(BlockARM64TBNZ, x)
 26696  			b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
 26697  			return true
 26698  		}
 26699  		// match: (NE (TSTWconst [c] x) yes no)
 26700  		// cond: oneBit(int64(uint32(c)))
 26701  		// result: (TBNZ [int64(ntz64(int64(uint32(c))))] x yes no)
 26702  		for b.Controls[0].Op == OpARM64TSTWconst {
 26703  			v_0 := b.Controls[0]
 26704  			c := auxIntToInt32(v_0.AuxInt)
 26705  			x := v_0.Args[0]
 26706  			if !(oneBit(int64(uint32(c)))) {
 26707  				break
 26708  			}
 26709  			b.resetWithControl(BlockARM64TBNZ, x)
 26710  			b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
 26711  			return true
 26712  		}
 26713  		// match: (NE (FlagConstant [fc]) yes no)
 26714  		// cond: fc.ne()
 26715  		// result: (First yes no)
 26716  		for b.Controls[0].Op == OpARM64FlagConstant {
 26717  			v_0 := b.Controls[0]
 26718  			fc := auxIntToFlagConstant(v_0.AuxInt)
 26719  			if !(fc.ne()) {
 26720  				break
 26721  			}
 26722  			b.Reset(BlockFirst)
 26723  			return true
 26724  		}
 26725  		// match: (NE (FlagConstant [fc]) yes no)
 26726  		// cond: !fc.ne()
 26727  		// result: (First no yes)
 26728  		for b.Controls[0].Op == OpARM64FlagConstant {
 26729  			v_0 := b.Controls[0]
 26730  			fc := auxIntToFlagConstant(v_0.AuxInt)
 26731  			if !(!fc.ne()) {
 26732  				break
 26733  			}
 26734  			b.Reset(BlockFirst)
 26735  			b.swapSuccessors()
 26736  			return true
 26737  		}
 26738  		// match: (NE (InvertFlags cmp) yes no)
 26739  		// result: (NE cmp yes no)
 26740  		for b.Controls[0].Op == OpARM64InvertFlags {
 26741  			v_0 := b.Controls[0]
 26742  			cmp := v_0.Args[0]
 26743  			b.resetWithControl(BlockARM64NE, cmp)
 26744  			return true
 26745  		}
 26746  	case BlockARM64NZ:
 26747  		// match: (NZ (Equal cc) yes no)
 26748  		// result: (EQ cc yes no)
 26749  		for b.Controls[0].Op == OpARM64Equal {
 26750  			v_0 := b.Controls[0]
 26751  			cc := v_0.Args[0]
 26752  			b.resetWithControl(BlockARM64EQ, cc)
 26753  			return true
 26754  		}
 26755  		// match: (NZ (NotEqual cc) yes no)
 26756  		// result: (NE cc yes no)
 26757  		for b.Controls[0].Op == OpARM64NotEqual {
 26758  			v_0 := b.Controls[0]
 26759  			cc := v_0.Args[0]
 26760  			b.resetWithControl(BlockARM64NE, cc)
 26761  			return true
 26762  		}
 26763  		// match: (NZ (LessThan cc) yes no)
 26764  		// result: (LT cc yes no)
 26765  		for b.Controls[0].Op == OpARM64LessThan {
 26766  			v_0 := b.Controls[0]
 26767  			cc := v_0.Args[0]
 26768  			b.resetWithControl(BlockARM64LT, cc)
 26769  			return true
 26770  		}
 26771  		// match: (NZ (LessThanU cc) yes no)
 26772  		// result: (ULT cc yes no)
 26773  		for b.Controls[0].Op == OpARM64LessThanU {
 26774  			v_0 := b.Controls[0]
 26775  			cc := v_0.Args[0]
 26776  			b.resetWithControl(BlockARM64ULT, cc)
 26777  			return true
 26778  		}
 26779  		// match: (NZ (LessEqual cc) yes no)
 26780  		// result: (LE cc yes no)
 26781  		for b.Controls[0].Op == OpARM64LessEqual {
 26782  			v_0 := b.Controls[0]
 26783  			cc := v_0.Args[0]
 26784  			b.resetWithControl(BlockARM64LE, cc)
 26785  			return true
 26786  		}
 26787  		// match: (NZ (LessEqualU cc) yes no)
 26788  		// result: (ULE cc yes no)
 26789  		for b.Controls[0].Op == OpARM64LessEqualU {
 26790  			v_0 := b.Controls[0]
 26791  			cc := v_0.Args[0]
 26792  			b.resetWithControl(BlockARM64ULE, cc)
 26793  			return true
 26794  		}
 26795  		// match: (NZ (GreaterThan cc) yes no)
 26796  		// result: (GT cc yes no)
 26797  		for b.Controls[0].Op == OpARM64GreaterThan {
 26798  			v_0 := b.Controls[0]
 26799  			cc := v_0.Args[0]
 26800  			b.resetWithControl(BlockARM64GT, cc)
 26801  			return true
 26802  		}
 26803  		// match: (NZ (GreaterThanU cc) yes no)
 26804  		// result: (UGT cc yes no)
 26805  		for b.Controls[0].Op == OpARM64GreaterThanU {
 26806  			v_0 := b.Controls[0]
 26807  			cc := v_0.Args[0]
 26808  			b.resetWithControl(BlockARM64UGT, cc)
 26809  			return true
 26810  		}
 26811  		// match: (NZ (GreaterEqual cc) yes no)
 26812  		// result: (GE cc yes no)
 26813  		for b.Controls[0].Op == OpARM64GreaterEqual {
 26814  			v_0 := b.Controls[0]
 26815  			cc := v_0.Args[0]
 26816  			b.resetWithControl(BlockARM64GE, cc)
 26817  			return true
 26818  		}
 26819  		// match: (NZ (GreaterEqualU cc) yes no)
 26820  		// result: (UGE cc yes no)
 26821  		for b.Controls[0].Op == OpARM64GreaterEqualU {
 26822  			v_0 := b.Controls[0]
 26823  			cc := v_0.Args[0]
 26824  			b.resetWithControl(BlockARM64UGE, cc)
 26825  			return true
 26826  		}
 26827  		// match: (NZ (LessThanF cc) yes no)
 26828  		// result: (FLT cc yes no)
 26829  		for b.Controls[0].Op == OpARM64LessThanF {
 26830  			v_0 := b.Controls[0]
 26831  			cc := v_0.Args[0]
 26832  			b.resetWithControl(BlockARM64FLT, cc)
 26833  			return true
 26834  		}
 26835  		// match: (NZ (LessEqualF cc) yes no)
 26836  		// result: (FLE cc yes no)
 26837  		for b.Controls[0].Op == OpARM64LessEqualF {
 26838  			v_0 := b.Controls[0]
 26839  			cc := v_0.Args[0]
 26840  			b.resetWithControl(BlockARM64FLE, cc)
 26841  			return true
 26842  		}
 26843  		// match: (NZ (GreaterThanF cc) yes no)
 26844  		// result: (FGT cc yes no)
 26845  		for b.Controls[0].Op == OpARM64GreaterThanF {
 26846  			v_0 := b.Controls[0]
 26847  			cc := v_0.Args[0]
 26848  			b.resetWithControl(BlockARM64FGT, cc)
 26849  			return true
 26850  		}
 26851  		// match: (NZ (GreaterEqualF cc) yes no)
 26852  		// result: (FGE cc yes no)
 26853  		for b.Controls[0].Op == OpARM64GreaterEqualF {
 26854  			v_0 := b.Controls[0]
 26855  			cc := v_0.Args[0]
 26856  			b.resetWithControl(BlockARM64FGE, cc)
 26857  			return true
 26858  		}
 26859  		// match: (NZ sub:(SUB x y))
 26860  		// cond: sub.Uses == 1
 26861  		// result: (NE (CMP x y))
 26862  		for b.Controls[0].Op == OpARM64SUB {
 26863  			sub := b.Controls[0]
 26864  			y := sub.Args[1]
 26865  			x := sub.Args[0]
 26866  			if !(sub.Uses == 1) {
 26867  				break
 26868  			}
 26869  			v0 := b.NewValue0(sub.Pos, OpARM64CMP, types.TypeFlags)
 26870  			v0.AddArg2(x, y)
 26871  			b.resetWithControl(BlockARM64NE, v0)
 26872  			return true
 26873  		}
 26874  		// match: (NZ sub:(SUBconst [c] y))
 26875  		// cond: sub.Uses == 1
 26876  		// result: (NE (CMPconst [c] y))
 26877  		for b.Controls[0].Op == OpARM64SUBconst {
 26878  			sub := b.Controls[0]
 26879  			c := auxIntToInt64(sub.AuxInt)
 26880  			y := sub.Args[0]
 26881  			if !(sub.Uses == 1) {
 26882  				break
 26883  			}
 26884  			v0 := b.NewValue0(sub.Pos, OpARM64CMPconst, types.TypeFlags)
 26885  			v0.AuxInt = int64ToAuxInt(c)
 26886  			v0.AddArg(y)
 26887  			b.resetWithControl(BlockARM64NE, v0)
 26888  			return true
 26889  		}
 26890  		// match: (NZ (ANDconst [c] x) yes no)
 26891  		// cond: oneBit(c)
 26892  		// result: (TBNZ [int64(ntz64(c))] x yes no)
 26893  		for b.Controls[0].Op == OpARM64ANDconst {
 26894  			v_0 := b.Controls[0]
 26895  			c := auxIntToInt64(v_0.AuxInt)
 26896  			x := v_0.Args[0]
 26897  			if !(oneBit(c)) {
 26898  				break
 26899  			}
 26900  			b.resetWithControl(BlockARM64TBNZ, x)
 26901  			b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
 26902  			return true
 26903  		}
 26904  		// match: (NZ s:(SRLconst [63] x) yes no)
 26905  		// cond: s.Uses == 1
 26906  		// result: (TBNZ [63] x yes no)
 26907  		for b.Controls[0].Op == OpARM64SRLconst {
 26908  			s := b.Controls[0]
 26909  			if auxIntToInt64(s.AuxInt) != 63 {
 26910  				break
 26911  			}
 26912  			x := s.Args[0]
 26913  			if !(s.Uses == 1) {
 26914  				break
 26915  			}
 26916  			b.resetWithControl(BlockARM64TBNZ, x)
 26917  			b.AuxInt = int64ToAuxInt(63)
 26918  			return true
 26919  		}
 26920  		// match: (NZ s:(SRAconst [63] x) yes no)
 26921  		// cond: s.Uses == 1
 26922  		// result: (TBNZ [63] x yes no)
 26923  		for b.Controls[0].Op == OpARM64SRAconst {
 26924  			s := b.Controls[0]
 26925  			if auxIntToInt64(s.AuxInt) != 63 {
 26926  				break
 26927  			}
 26928  			x := s.Args[0]
 26929  			if !(s.Uses == 1) {
 26930  				break
 26931  			}
 26932  			b.resetWithControl(BlockARM64TBNZ, x)
 26933  			b.AuxInt = int64ToAuxInt(63)
 26934  			return true
 26935  		}
 26936  		// match: (NZ (MOVDconst [0]) yes no)
 26937  		// result: (First no yes)
 26938  		for b.Controls[0].Op == OpARM64MOVDconst {
 26939  			v_0 := b.Controls[0]
 26940  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26941  				break
 26942  			}
 26943  			b.Reset(BlockFirst)
 26944  			b.swapSuccessors()
 26945  			return true
 26946  		}
 26947  		// match: (NZ (MOVDconst [c]) yes no)
 26948  		// cond: c != 0
 26949  		// result: (First yes no)
 26950  		for b.Controls[0].Op == OpARM64MOVDconst {
 26951  			v_0 := b.Controls[0]
 26952  			c := auxIntToInt64(v_0.AuxInt)
 26953  			if !(c != 0) {
 26954  				break
 26955  			}
 26956  			b.Reset(BlockFirst)
 26957  			return true
 26958  		}
 26959  	case BlockARM64NZW:
 26960  		// match: (NZW sub:(SUB x y))
 26961  		// cond: sub.Uses == 1
 26962  		// result: (NE (CMPW x y))
 26963  		for b.Controls[0].Op == OpARM64SUB {
 26964  			sub := b.Controls[0]
 26965  			y := sub.Args[1]
 26966  			x := sub.Args[0]
 26967  			if !(sub.Uses == 1) {
 26968  				break
 26969  			}
 26970  			v0 := b.NewValue0(sub.Pos, OpARM64CMPW, types.TypeFlags)
 26971  			v0.AddArg2(x, y)
 26972  			b.resetWithControl(BlockARM64NE, v0)
 26973  			return true
 26974  		}
 26975  		// match: (NZW sub:(SUBconst [c] y))
 26976  		// cond: sub.Uses == 1
 26977  		// result: (NE (CMPWconst [int32(c)] y))
 26978  		for b.Controls[0].Op == OpARM64SUBconst {
 26979  			sub := b.Controls[0]
 26980  			c := auxIntToInt64(sub.AuxInt)
 26981  			y := sub.Args[0]
 26982  			if !(sub.Uses == 1) {
 26983  				break
 26984  			}
 26985  			v0 := b.NewValue0(sub.Pos, OpARM64CMPWconst, types.TypeFlags)
 26986  			v0.AuxInt = int32ToAuxInt(int32(c))
 26987  			v0.AddArg(y)
 26988  			b.resetWithControl(BlockARM64NE, v0)
 26989  			return true
 26990  		}
 26991  		// match: (NZW (ANDconst [c] x) yes no)
 26992  		// cond: oneBit(int64(uint32(c)))
 26993  		// result: (TBNZ [int64(ntz64(int64(uint32(c))))] x yes no)
 26994  		for b.Controls[0].Op == OpARM64ANDconst {
 26995  			v_0 := b.Controls[0]
 26996  			c := auxIntToInt64(v_0.AuxInt)
 26997  			x := v_0.Args[0]
 26998  			if !(oneBit(int64(uint32(c)))) {
 26999  				break
 27000  			}
 27001  			b.resetWithControl(BlockARM64TBNZ, x)
 27002  			b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
 27003  			return true
 27004  		}
 27005  		// match: (NZW (MOVDconst [c]) yes no)
 27006  		// cond: int32(c) == 0
 27007  		// result: (First no yes)
 27008  		for b.Controls[0].Op == OpARM64MOVDconst {
 27009  			v_0 := b.Controls[0]
 27010  			c := auxIntToInt64(v_0.AuxInt)
 27011  			if !(int32(c) == 0) {
 27012  				break
 27013  			}
 27014  			b.Reset(BlockFirst)
 27015  			b.swapSuccessors()
 27016  			return true
 27017  		}
 27018  		// match: (NZW (MOVDconst [c]) yes no)
 27019  		// cond: int32(c) != 0
 27020  		// result: (First yes no)
 27021  		for b.Controls[0].Op == OpARM64MOVDconst {
 27022  			v_0 := b.Controls[0]
 27023  			c := auxIntToInt64(v_0.AuxInt)
 27024  			if !(int32(c) != 0) {
 27025  				break
 27026  			}
 27027  			b.Reset(BlockFirst)
 27028  			return true
 27029  		}
 27030  	case BlockARM64TBNZ:
 27031  		// match: (TBNZ [0] (Equal cc) yes no)
 27032  		// result: (EQ cc yes no)
 27033  		for b.Controls[0].Op == OpARM64Equal {
 27034  			v_0 := b.Controls[0]
 27035  			cc := v_0.Args[0]
 27036  			if auxIntToInt64(b.AuxInt) != 0 {
 27037  				break
 27038  			}
 27039  			b.resetWithControl(BlockARM64EQ, cc)
 27040  			return true
 27041  		}
 27042  		// match: (TBNZ [0] (NotEqual cc) yes no)
 27043  		// result: (NE cc yes no)
 27044  		for b.Controls[0].Op == OpARM64NotEqual {
 27045  			v_0 := b.Controls[0]
 27046  			cc := v_0.Args[0]
 27047  			if auxIntToInt64(b.AuxInt) != 0 {
 27048  				break
 27049  			}
 27050  			b.resetWithControl(BlockARM64NE, cc)
 27051  			return true
 27052  		}
 27053  		// match: (TBNZ [0] (LessThan cc) yes no)
 27054  		// result: (LT cc yes no)
 27055  		for b.Controls[0].Op == OpARM64LessThan {
 27056  			v_0 := b.Controls[0]
 27057  			cc := v_0.Args[0]
 27058  			if auxIntToInt64(b.AuxInt) != 0 {
 27059  				break
 27060  			}
 27061  			b.resetWithControl(BlockARM64LT, cc)
 27062  			return true
 27063  		}
 27064  		// match: (TBNZ [0] (LessThanU cc) yes no)
 27065  		// result: (ULT cc yes no)
 27066  		for b.Controls[0].Op == OpARM64LessThanU {
 27067  			v_0 := b.Controls[0]
 27068  			cc := v_0.Args[0]
 27069  			if auxIntToInt64(b.AuxInt) != 0 {
 27070  				break
 27071  			}
 27072  			b.resetWithControl(BlockARM64ULT, cc)
 27073  			return true
 27074  		}
 27075  		// match: (TBNZ [0] (LessEqual cc) yes no)
 27076  		// result: (LE cc yes no)
 27077  		for b.Controls[0].Op == OpARM64LessEqual {
 27078  			v_0 := b.Controls[0]
 27079  			cc := v_0.Args[0]
 27080  			if auxIntToInt64(b.AuxInt) != 0 {
 27081  				break
 27082  			}
 27083  			b.resetWithControl(BlockARM64LE, cc)
 27084  			return true
 27085  		}
 27086  		// match: (TBNZ [0] (LessEqualU cc) yes no)
 27087  		// result: (ULE cc yes no)
 27088  		for b.Controls[0].Op == OpARM64LessEqualU {
 27089  			v_0 := b.Controls[0]
 27090  			cc := v_0.Args[0]
 27091  			if auxIntToInt64(b.AuxInt) != 0 {
 27092  				break
 27093  			}
 27094  			b.resetWithControl(BlockARM64ULE, cc)
 27095  			return true
 27096  		}
 27097  		// match: (TBNZ [0] (GreaterThan cc) yes no)
 27098  		// result: (GT cc yes no)
 27099  		for b.Controls[0].Op == OpARM64GreaterThan {
 27100  			v_0 := b.Controls[0]
 27101  			cc := v_0.Args[0]
 27102  			if auxIntToInt64(b.AuxInt) != 0 {
 27103  				break
 27104  			}
 27105  			b.resetWithControl(BlockARM64GT, cc)
 27106  			return true
 27107  		}
 27108  		// match: (TBNZ [0] (GreaterThanU cc) yes no)
 27109  		// result: (UGT cc yes no)
 27110  		for b.Controls[0].Op == OpARM64GreaterThanU {
 27111  			v_0 := b.Controls[0]
 27112  			cc := v_0.Args[0]
 27113  			if auxIntToInt64(b.AuxInt) != 0 {
 27114  				break
 27115  			}
 27116  			b.resetWithControl(BlockARM64UGT, cc)
 27117  			return true
 27118  		}
 27119  		// match: (TBNZ [0] (GreaterEqual cc) yes no)
 27120  		// result: (GE cc yes no)
 27121  		for b.Controls[0].Op == OpARM64GreaterEqual {
 27122  			v_0 := b.Controls[0]
 27123  			cc := v_0.Args[0]
 27124  			if auxIntToInt64(b.AuxInt) != 0 {
 27125  				break
 27126  			}
 27127  			b.resetWithControl(BlockARM64GE, cc)
 27128  			return true
 27129  		}
 27130  		// match: (TBNZ [0] (GreaterEqualU cc) yes no)
 27131  		// result: (UGE cc yes no)
 27132  		for b.Controls[0].Op == OpARM64GreaterEqualU {
 27133  			v_0 := b.Controls[0]
 27134  			cc := v_0.Args[0]
 27135  			if auxIntToInt64(b.AuxInt) != 0 {
 27136  				break
 27137  			}
 27138  			b.resetWithControl(BlockARM64UGE, cc)
 27139  			return true
 27140  		}
 27141  		// match: (TBNZ [0] (LessThanF cc) yes no)
 27142  		// result: (FLT cc yes no)
 27143  		for b.Controls[0].Op == OpARM64LessThanF {
 27144  			v_0 := b.Controls[0]
 27145  			cc := v_0.Args[0]
 27146  			if auxIntToInt64(b.AuxInt) != 0 {
 27147  				break
 27148  			}
 27149  			b.resetWithControl(BlockARM64FLT, cc)
 27150  			return true
 27151  		}
 27152  		// match: (TBNZ [0] (LessEqualF cc) yes no)
 27153  		// result: (FLE cc yes no)
 27154  		for b.Controls[0].Op == OpARM64LessEqualF {
 27155  			v_0 := b.Controls[0]
 27156  			cc := v_0.Args[0]
 27157  			if auxIntToInt64(b.AuxInt) != 0 {
 27158  				break
 27159  			}
 27160  			b.resetWithControl(BlockARM64FLE, cc)
 27161  			return true
 27162  		}
 27163  		// match: (TBNZ [0] (GreaterThanF cc) yes no)
 27164  		// result: (FGT cc yes no)
 27165  		for b.Controls[0].Op == OpARM64GreaterThanF {
 27166  			v_0 := b.Controls[0]
 27167  			cc := v_0.Args[0]
 27168  			if auxIntToInt64(b.AuxInt) != 0 {
 27169  				break
 27170  			}
 27171  			b.resetWithControl(BlockARM64FGT, cc)
 27172  			return true
 27173  		}
 27174  		// match: (TBNZ [0] (GreaterEqualF cc) yes no)
 27175  		// result: (FGE cc yes no)
 27176  		for b.Controls[0].Op == OpARM64GreaterEqualF {
 27177  			v_0 := b.Controls[0]
 27178  			cc := v_0.Args[0]
 27179  			if auxIntToInt64(b.AuxInt) != 0 {
 27180  				break
 27181  			}
 27182  			b.resetWithControl(BlockARM64FGE, cc)
 27183  			return true
 27184  		}
 27185  		// match: (TBNZ [0] (XORconst [1] x) yes no)
 27186  		// result: (TBZ [0] x yes no)
 27187  		for b.Controls[0].Op == OpARM64XORconst {
 27188  			v_0 := b.Controls[0]
 27189  			if auxIntToInt64(v_0.AuxInt) != 1 {
 27190  				break
 27191  			}
 27192  			x := v_0.Args[0]
 27193  			if auxIntToInt64(b.AuxInt) != 0 {
 27194  				break
 27195  			}
 27196  			b.resetWithControl(BlockARM64TBZ, x)
 27197  			b.AuxInt = int64ToAuxInt(0)
 27198  			return true
 27199  		}
 27200  		// match: (TBNZ [t] sv:(SRLconst [s] x) yes no)
 27201  		// cond: t+s < 64 && sv.Uses == 1
 27202  		// result: (TBNZ [t+s] x yes no )
 27203  		for b.Controls[0].Op == OpARM64SRLconst {
 27204  			sv := b.Controls[0]
 27205  			s := auxIntToInt64(sv.AuxInt)
 27206  			x := sv.Args[0]
 27207  			t := auxIntToInt64(b.AuxInt)
 27208  			if !(t+s < 64 && sv.Uses == 1) {
 27209  				break
 27210  			}
 27211  			b.resetWithControl(BlockARM64TBNZ, x)
 27212  			b.AuxInt = int64ToAuxInt(t + s)
 27213  			return true
 27214  		}
 27215  		// match: (TBNZ [t] (SRLconst [s] x) yes no)
 27216  		// cond: t+s >= 64
 27217  		// result: (First no yes)
 27218  		for b.Controls[0].Op == OpARM64SRLconst {
 27219  			v_0 := b.Controls[0]
 27220  			s := auxIntToInt64(v_0.AuxInt)
 27221  			t := auxIntToInt64(b.AuxInt)
 27222  			if !(t+s >= 64) {
 27223  				break
 27224  			}
 27225  			b.Reset(BlockFirst)
 27226  			b.swapSuccessors()
 27227  			return true
 27228  		}
 27229  		// match: (TBNZ [t] sv:(SLLconst [s] x) yes no)
 27230  		// cond: t-s >= 0 && sv.Uses == 1
 27231  		// result: (TBNZ [t-s] x yes no )
 27232  		for b.Controls[0].Op == OpARM64SLLconst {
 27233  			sv := b.Controls[0]
 27234  			s := auxIntToInt64(sv.AuxInt)
 27235  			x := sv.Args[0]
 27236  			t := auxIntToInt64(b.AuxInt)
 27237  			if !(t-s >= 0 && sv.Uses == 1) {
 27238  				break
 27239  			}
 27240  			b.resetWithControl(BlockARM64TBNZ, x)
 27241  			b.AuxInt = int64ToAuxInt(t - s)
 27242  			return true
 27243  		}
 27244  		// match: (TBNZ [t] (SLLconst [s] x) yes no)
 27245  		// cond: t-s < 0
 27246  		// result: (First no yes)
 27247  		for b.Controls[0].Op == OpARM64SLLconst {
 27248  			v_0 := b.Controls[0]
 27249  			s := auxIntToInt64(v_0.AuxInt)
 27250  			t := auxIntToInt64(b.AuxInt)
 27251  			if !(t-s < 0) {
 27252  				break
 27253  			}
 27254  			b.Reset(BlockFirst)
 27255  			b.swapSuccessors()
 27256  			return true
 27257  		}
 27258  		// match: (TBNZ [t] rv:(RORconst [r] x) yes no)
 27259  		// cond: rv.Uses == 1
 27260  		// result: (TBNZ [int64(uint64(t+r)%64)] x yes no)
 27261  		for b.Controls[0].Op == OpARM64RORconst {
 27262  			rv := b.Controls[0]
 27263  			r := auxIntToInt64(rv.AuxInt)
 27264  			x := rv.Args[0]
 27265  			t := auxIntToInt64(b.AuxInt)
 27266  			if !(rv.Uses == 1) {
 27267  				break
 27268  			}
 27269  			b.resetWithControl(BlockARM64TBNZ, x)
 27270  			b.AuxInt = int64ToAuxInt(int64(uint64(t+r) % 64))
 27271  			return true
 27272  		}
 27273  		// match: (TBNZ [t] sv:(SRAconst [s] x) yes no)
 27274  		// cond: t+s < 64 && sv.Uses == 1
 27275  		// result: (TBNZ [t+s] x yes no)
 27276  		for b.Controls[0].Op == OpARM64SRAconst {
 27277  			sv := b.Controls[0]
 27278  			s := auxIntToInt64(sv.AuxInt)
 27279  			x := sv.Args[0]
 27280  			t := auxIntToInt64(b.AuxInt)
 27281  			if !(t+s < 64 && sv.Uses == 1) {
 27282  				break
 27283  			}
 27284  			b.resetWithControl(BlockARM64TBNZ, x)
 27285  			b.AuxInt = int64ToAuxInt(t + s)
 27286  			return true
 27287  		}
 27288  		// match: (TBNZ [t] sv:(SRAconst [s] x) yes no)
 27289  		// cond: t+s >= 64 && sv.Uses == 1
 27290  		// result: (TBNZ [63 ] x yes no)
 27291  		for b.Controls[0].Op == OpARM64SRAconst {
 27292  			sv := b.Controls[0]
 27293  			s := auxIntToInt64(sv.AuxInt)
 27294  			x := sv.Args[0]
 27295  			t := auxIntToInt64(b.AuxInt)
 27296  			if !(t+s >= 64 && sv.Uses == 1) {
 27297  				break
 27298  			}
 27299  			b.resetWithControl(BlockARM64TBNZ, x)
 27300  			b.AuxInt = int64ToAuxInt(63)
 27301  			return true
 27302  		}
 27303  	case BlockARM64TBZ:
 27304  		// match: (TBZ [0] (XORconst [1] x) yes no)
 27305  		// result: (TBNZ [0] x yes no)
 27306  		for b.Controls[0].Op == OpARM64XORconst {
 27307  			v_0 := b.Controls[0]
 27308  			if auxIntToInt64(v_0.AuxInt) != 1 {
 27309  				break
 27310  			}
 27311  			x := v_0.Args[0]
 27312  			if auxIntToInt64(b.AuxInt) != 0 {
 27313  				break
 27314  			}
 27315  			b.resetWithControl(BlockARM64TBNZ, x)
 27316  			b.AuxInt = int64ToAuxInt(0)
 27317  			return true
 27318  		}
 27319  		// match: (TBZ [t] sv:(SRLconst [s] x) yes no)
 27320  		// cond: t+s < 64 && sv.Uses == 1
 27321  		// result: (TBZ [t+s] x yes no )
 27322  		for b.Controls[0].Op == OpARM64SRLconst {
 27323  			sv := b.Controls[0]
 27324  			s := auxIntToInt64(sv.AuxInt)
 27325  			x := sv.Args[0]
 27326  			t := auxIntToInt64(b.AuxInt)
 27327  			if !(t+s < 64 && sv.Uses == 1) {
 27328  				break
 27329  			}
 27330  			b.resetWithControl(BlockARM64TBZ, x)
 27331  			b.AuxInt = int64ToAuxInt(t + s)
 27332  			return true
 27333  		}
 27334  		// match: (TBZ [t] (SRLconst [s] x) yes no)
 27335  		// cond: t+s >= 64
 27336  		// result: (First yes no )
 27337  		for b.Controls[0].Op == OpARM64SRLconst {
 27338  			v_0 := b.Controls[0]
 27339  			s := auxIntToInt64(v_0.AuxInt)
 27340  			t := auxIntToInt64(b.AuxInt)
 27341  			if !(t+s >= 64) {
 27342  				break
 27343  			}
 27344  			b.Reset(BlockFirst)
 27345  			return true
 27346  		}
 27347  		// match: (TBZ [t] sv:(SLLconst [s] x) yes no)
 27348  		// cond: t-s >= 0 && sv.Uses == 1
 27349  		// result: (TBZ [t-s] x yes no )
 27350  		for b.Controls[0].Op == OpARM64SLLconst {
 27351  			sv := b.Controls[0]
 27352  			s := auxIntToInt64(sv.AuxInt)
 27353  			x := sv.Args[0]
 27354  			t := auxIntToInt64(b.AuxInt)
 27355  			if !(t-s >= 0 && sv.Uses == 1) {
 27356  				break
 27357  			}
 27358  			b.resetWithControl(BlockARM64TBZ, x)
 27359  			b.AuxInt = int64ToAuxInt(t - s)
 27360  			return true
 27361  		}
 27362  		// match: (TBZ [t] (SLLconst [s] x) yes no)
 27363  		// cond: t-s < 0
 27364  		// result: (First yes no )
 27365  		for b.Controls[0].Op == OpARM64SLLconst {
 27366  			v_0 := b.Controls[0]
 27367  			s := auxIntToInt64(v_0.AuxInt)
 27368  			t := auxIntToInt64(b.AuxInt)
 27369  			if !(t-s < 0) {
 27370  				break
 27371  			}
 27372  			b.Reset(BlockFirst)
 27373  			return true
 27374  		}
 27375  		// match: (TBZ [t] rv:(RORconst [r] x) yes no)
 27376  		// cond: rv.Uses == 1
 27377  		// result: (TBZ [int64(uint64(t+r)%64)] x yes no)
 27378  		for b.Controls[0].Op == OpARM64RORconst {
 27379  			rv := b.Controls[0]
 27380  			r := auxIntToInt64(rv.AuxInt)
 27381  			x := rv.Args[0]
 27382  			t := auxIntToInt64(b.AuxInt)
 27383  			if !(rv.Uses == 1) {
 27384  				break
 27385  			}
 27386  			b.resetWithControl(BlockARM64TBZ, x)
 27387  			b.AuxInt = int64ToAuxInt(int64(uint64(t+r) % 64))
 27388  			return true
 27389  		}
 27390  		// match: (TBZ [t] sv:(SRAconst [s] x) yes no)
 27391  		// cond: t+s < 64 && sv.Uses == 1
 27392  		// result: (TBZ [t+s] x yes no)
 27393  		for b.Controls[0].Op == OpARM64SRAconst {
 27394  			sv := b.Controls[0]
 27395  			s := auxIntToInt64(sv.AuxInt)
 27396  			x := sv.Args[0]
 27397  			t := auxIntToInt64(b.AuxInt)
 27398  			if !(t+s < 64 && sv.Uses == 1) {
 27399  				break
 27400  			}
 27401  			b.resetWithControl(BlockARM64TBZ, x)
 27402  			b.AuxInt = int64ToAuxInt(t + s)
 27403  			return true
 27404  		}
 27405  		// match: (TBZ [t] sv:(SRAconst [s] x) yes no)
 27406  		// cond: t+s >= 64 && sv.Uses == 1
 27407  		// result: (TBZ [63 ] x yes no)
 27408  		for b.Controls[0].Op == OpARM64SRAconst {
 27409  			sv := b.Controls[0]
 27410  			s := auxIntToInt64(sv.AuxInt)
 27411  			x := sv.Args[0]
 27412  			t := auxIntToInt64(b.AuxInt)
 27413  			if !(t+s >= 64 && sv.Uses == 1) {
 27414  				break
 27415  			}
 27416  			b.resetWithControl(BlockARM64TBZ, x)
 27417  			b.AuxInt = int64ToAuxInt(63)
 27418  			return true
 27419  		}
 27420  	case BlockARM64UGE:
 27421  		// match: (UGE (FlagConstant [fc]) yes no)
 27422  		// cond: fc.uge()
 27423  		// result: (First yes no)
 27424  		for b.Controls[0].Op == OpARM64FlagConstant {
 27425  			v_0 := b.Controls[0]
 27426  			fc := auxIntToFlagConstant(v_0.AuxInt)
 27427  			if !(fc.uge()) {
 27428  				break
 27429  			}
 27430  			b.Reset(BlockFirst)
 27431  			return true
 27432  		}
 27433  		// match: (UGE (FlagConstant [fc]) yes no)
 27434  		// cond: !fc.uge()
 27435  		// result: (First no yes)
 27436  		for b.Controls[0].Op == OpARM64FlagConstant {
 27437  			v_0 := b.Controls[0]
 27438  			fc := auxIntToFlagConstant(v_0.AuxInt)
 27439  			if !(!fc.uge()) {
 27440  				break
 27441  			}
 27442  			b.Reset(BlockFirst)
 27443  			b.swapSuccessors()
 27444  			return true
 27445  		}
 27446  		// match: (UGE (InvertFlags cmp) yes no)
 27447  		// result: (ULE cmp yes no)
 27448  		for b.Controls[0].Op == OpARM64InvertFlags {
 27449  			v_0 := b.Controls[0]
 27450  			cmp := v_0.Args[0]
 27451  			b.resetWithControl(BlockARM64ULE, cmp)
 27452  			return true
 27453  		}
 27454  	case BlockARM64UGT:
 27455  		// match: (UGT (CMPconst [0] x))
 27456  		// result: (NE (CMPconst [0] x))
 27457  		for b.Controls[0].Op == OpARM64CMPconst {
 27458  			v_0 := b.Controls[0]
 27459  			if auxIntToInt64(v_0.AuxInt) != 0 {
 27460  				break
 27461  			}
 27462  			x := v_0.Args[0]
 27463  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPconst, types.TypeFlags)
 27464  			v0.AuxInt = int64ToAuxInt(0)
 27465  			v0.AddArg(x)
 27466  			b.resetWithControl(BlockARM64NE, v0)
 27467  			return true
 27468  		}
 27469  		// match: (UGT (CMPWconst [0] x))
 27470  		// result: (NE (CMPWconst [0] x))
 27471  		for b.Controls[0].Op == OpARM64CMPWconst {
 27472  			v_0 := b.Controls[0]
 27473  			if auxIntToInt32(v_0.AuxInt) != 0 {
 27474  				break
 27475  			}
 27476  			x := v_0.Args[0]
 27477  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPWconst, types.TypeFlags)
 27478  			v0.AuxInt = int32ToAuxInt(0)
 27479  			v0.AddArg(x)
 27480  			b.resetWithControl(BlockARM64NE, v0)
 27481  			return true
 27482  		}
 27483  		// match: (UGT (FlagConstant [fc]) yes no)
 27484  		// cond: fc.ugt()
 27485  		// result: (First yes no)
 27486  		for b.Controls[0].Op == OpARM64FlagConstant {
 27487  			v_0 := b.Controls[0]
 27488  			fc := auxIntToFlagConstant(v_0.AuxInt)
 27489  			if !(fc.ugt()) {
 27490  				break
 27491  			}
 27492  			b.Reset(BlockFirst)
 27493  			return true
 27494  		}
 27495  		// match: (UGT (FlagConstant [fc]) yes no)
 27496  		// cond: !fc.ugt()
 27497  		// result: (First no yes)
 27498  		for b.Controls[0].Op == OpARM64FlagConstant {
 27499  			v_0 := b.Controls[0]
 27500  			fc := auxIntToFlagConstant(v_0.AuxInt)
 27501  			if !(!fc.ugt()) {
 27502  				break
 27503  			}
 27504  			b.Reset(BlockFirst)
 27505  			b.swapSuccessors()
 27506  			return true
 27507  		}
 27508  		// match: (UGT (InvertFlags cmp) yes no)
 27509  		// result: (ULT cmp yes no)
 27510  		for b.Controls[0].Op == OpARM64InvertFlags {
 27511  			v_0 := b.Controls[0]
 27512  			cmp := v_0.Args[0]
 27513  			b.resetWithControl(BlockARM64ULT, cmp)
 27514  			return true
 27515  		}
 27516  	case BlockARM64ULE:
 27517  		// match: (ULE (CMPconst [0] x))
 27518  		// result: (EQ (CMPconst [0] x))
 27519  		for b.Controls[0].Op == OpARM64CMPconst {
 27520  			v_0 := b.Controls[0]
 27521  			if auxIntToInt64(v_0.AuxInt) != 0 {
 27522  				break
 27523  			}
 27524  			x := v_0.Args[0]
 27525  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPconst, types.TypeFlags)
 27526  			v0.AuxInt = int64ToAuxInt(0)
 27527  			v0.AddArg(x)
 27528  			b.resetWithControl(BlockARM64EQ, v0)
 27529  			return true
 27530  		}
 27531  		// match: (ULE (CMPWconst [0] x))
 27532  		// result: (EQ (CMPWconst [0] x))
 27533  		for b.Controls[0].Op == OpARM64CMPWconst {
 27534  			v_0 := b.Controls[0]
 27535  			if auxIntToInt32(v_0.AuxInt) != 0 {
 27536  				break
 27537  			}
 27538  			x := v_0.Args[0]
 27539  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPWconst, types.TypeFlags)
 27540  			v0.AuxInt = int32ToAuxInt(0)
 27541  			v0.AddArg(x)
 27542  			b.resetWithControl(BlockARM64EQ, v0)
 27543  			return true
 27544  		}
 27545  		// match: (ULE (FlagConstant [fc]) yes no)
 27546  		// cond: fc.ule()
 27547  		// result: (First yes no)
 27548  		for b.Controls[0].Op == OpARM64FlagConstant {
 27549  			v_0 := b.Controls[0]
 27550  			fc := auxIntToFlagConstant(v_0.AuxInt)
 27551  			if !(fc.ule()) {
 27552  				break
 27553  			}
 27554  			b.Reset(BlockFirst)
 27555  			return true
 27556  		}
 27557  		// match: (ULE (FlagConstant [fc]) yes no)
 27558  		// cond: !fc.ule()
 27559  		// result: (First no yes)
 27560  		for b.Controls[0].Op == OpARM64FlagConstant {
 27561  			v_0 := b.Controls[0]
 27562  			fc := auxIntToFlagConstant(v_0.AuxInt)
 27563  			if !(!fc.ule()) {
 27564  				break
 27565  			}
 27566  			b.Reset(BlockFirst)
 27567  			b.swapSuccessors()
 27568  			return true
 27569  		}
 27570  		// match: (ULE (InvertFlags cmp) yes no)
 27571  		// result: (UGE cmp yes no)
 27572  		for b.Controls[0].Op == OpARM64InvertFlags {
 27573  			v_0 := b.Controls[0]
 27574  			cmp := v_0.Args[0]
 27575  			b.resetWithControl(BlockARM64UGE, cmp)
 27576  			return true
 27577  		}
 27578  	case BlockARM64ULT:
 27579  		// match: (ULT (FlagConstant [fc]) yes no)
 27580  		// cond: fc.ult()
 27581  		// result: (First yes no)
 27582  		for b.Controls[0].Op == OpARM64FlagConstant {
 27583  			v_0 := b.Controls[0]
 27584  			fc := auxIntToFlagConstant(v_0.AuxInt)
 27585  			if !(fc.ult()) {
 27586  				break
 27587  			}
 27588  			b.Reset(BlockFirst)
 27589  			return true
 27590  		}
 27591  		// match: (ULT (FlagConstant [fc]) yes no)
 27592  		// cond: !fc.ult()
 27593  		// result: (First no yes)
 27594  		for b.Controls[0].Op == OpARM64FlagConstant {
 27595  			v_0 := b.Controls[0]
 27596  			fc := auxIntToFlagConstant(v_0.AuxInt)
 27597  			if !(!fc.ult()) {
 27598  				break
 27599  			}
 27600  			b.Reset(BlockFirst)
 27601  			b.swapSuccessors()
 27602  			return true
 27603  		}
 27604  		// match: (ULT (InvertFlags cmp) yes no)
 27605  		// result: (UGT cmp yes no)
 27606  		for b.Controls[0].Op == OpARM64InvertFlags {
 27607  			v_0 := b.Controls[0]
 27608  			cmp := v_0.Args[0]
 27609  			b.resetWithControl(BlockARM64UGT, cmp)
 27610  			return true
 27611  		}
 27612  	case BlockARM64Z:
 27613  		// match: (Z sub:(SUB x y))
 27614  		// cond: sub.Uses == 1
 27615  		// result: (EQ (CMP x y))
 27616  		for b.Controls[0].Op == OpARM64SUB {
 27617  			sub := b.Controls[0]
 27618  			y := sub.Args[1]
 27619  			x := sub.Args[0]
 27620  			if !(sub.Uses == 1) {
 27621  				break
 27622  			}
 27623  			v0 := b.NewValue0(sub.Pos, OpARM64CMP, types.TypeFlags)
 27624  			v0.AddArg2(x, y)
 27625  			b.resetWithControl(BlockARM64EQ, v0)
 27626  			return true
 27627  		}
 27628  		// match: (Z sub:(SUBconst [c] y))
 27629  		// cond: sub.Uses == 1
 27630  		// result: (EQ (CMPconst [c] y))
 27631  		for b.Controls[0].Op == OpARM64SUBconst {
 27632  			sub := b.Controls[0]
 27633  			c := auxIntToInt64(sub.AuxInt)
 27634  			y := sub.Args[0]
 27635  			if !(sub.Uses == 1) {
 27636  				break
 27637  			}
 27638  			v0 := b.NewValue0(sub.Pos, OpARM64CMPconst, types.TypeFlags)
 27639  			v0.AuxInt = int64ToAuxInt(c)
 27640  			v0.AddArg(y)
 27641  			b.resetWithControl(BlockARM64EQ, v0)
 27642  			return true
 27643  		}
 27644  		// match: (Z (ANDconst [c] x) yes no)
 27645  		// cond: oneBit(c)
 27646  		// result: (TBZ [int64(ntz64(c))] x yes no)
 27647  		for b.Controls[0].Op == OpARM64ANDconst {
 27648  			v_0 := b.Controls[0]
 27649  			c := auxIntToInt64(v_0.AuxInt)
 27650  			x := v_0.Args[0]
 27651  			if !(oneBit(c)) {
 27652  				break
 27653  			}
 27654  			b.resetWithControl(BlockARM64TBZ, x)
 27655  			b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
 27656  			return true
 27657  		}
 27658  		// match: (Z s:(SRLconst [63] x) yes no)
 27659  		// cond: s.Uses == 1
 27660  		// result: (TBZ [63] x yes no)
 27661  		for b.Controls[0].Op == OpARM64SRLconst {
 27662  			s := b.Controls[0]
 27663  			if auxIntToInt64(s.AuxInt) != 63 {
 27664  				break
 27665  			}
 27666  			x := s.Args[0]
 27667  			if !(s.Uses == 1) {
 27668  				break
 27669  			}
 27670  			b.resetWithControl(BlockARM64TBZ, x)
 27671  			b.AuxInt = int64ToAuxInt(63)
 27672  			return true
 27673  		}
 27674  		// match: (Z s:(SRAconst [63] x) yes no)
 27675  		// cond: s.Uses == 1
 27676  		// result: (TBZ [63] x yes no)
 27677  		for b.Controls[0].Op == OpARM64SRAconst {
 27678  			s := b.Controls[0]
 27679  			if auxIntToInt64(s.AuxInt) != 63 {
 27680  				break
 27681  			}
 27682  			x := s.Args[0]
 27683  			if !(s.Uses == 1) {
 27684  				break
 27685  			}
 27686  			b.resetWithControl(BlockARM64TBZ, x)
 27687  			b.AuxInt = int64ToAuxInt(63)
 27688  			return true
 27689  		}
 27690  		// match: (Z (MOVDconst [0]) yes no)
 27691  		// result: (First yes no)
 27692  		for b.Controls[0].Op == OpARM64MOVDconst {
 27693  			v_0 := b.Controls[0]
 27694  			if auxIntToInt64(v_0.AuxInt) != 0 {
 27695  				break
 27696  			}
 27697  			b.Reset(BlockFirst)
 27698  			return true
 27699  		}
 27700  		// match: (Z (MOVDconst [c]) yes no)
 27701  		// cond: c != 0
 27702  		// result: (First no yes)
 27703  		for b.Controls[0].Op == OpARM64MOVDconst {
 27704  			v_0 := b.Controls[0]
 27705  			c := auxIntToInt64(v_0.AuxInt)
 27706  			if !(c != 0) {
 27707  				break
 27708  			}
 27709  			b.Reset(BlockFirst)
 27710  			b.swapSuccessors()
 27711  			return true
 27712  		}
 27713  	case BlockARM64ZW:
 27714  		// match: (ZW sub:(SUB x y))
 27715  		// cond: sub.Uses == 1
 27716  		// result: (EQ (CMPW x y))
 27717  		for b.Controls[0].Op == OpARM64SUB {
 27718  			sub := b.Controls[0]
 27719  			y := sub.Args[1]
 27720  			x := sub.Args[0]
 27721  			if !(sub.Uses == 1) {
 27722  				break
 27723  			}
 27724  			v0 := b.NewValue0(sub.Pos, OpARM64CMPW, types.TypeFlags)
 27725  			v0.AddArg2(x, y)
 27726  			b.resetWithControl(BlockARM64EQ, v0)
 27727  			return true
 27728  		}
 27729  		// match: (ZW sub:(SUBconst [c] y))
 27730  		// cond: sub.Uses == 1
 27731  		// result: (EQ (CMPWconst [int32(c)] y))
 27732  		for b.Controls[0].Op == OpARM64SUBconst {
 27733  			sub := b.Controls[0]
 27734  			c := auxIntToInt64(sub.AuxInt)
 27735  			y := sub.Args[0]
 27736  			if !(sub.Uses == 1) {
 27737  				break
 27738  			}
 27739  			v0 := b.NewValue0(sub.Pos, OpARM64CMPWconst, types.TypeFlags)
 27740  			v0.AuxInt = int32ToAuxInt(int32(c))
 27741  			v0.AddArg(y)
 27742  			b.resetWithControl(BlockARM64EQ, v0)
 27743  			return true
 27744  		}
 27745  		// match: (ZW (ANDconst [c] x) yes no)
 27746  		// cond: oneBit(int64(uint32(c)))
 27747  		// result: (TBZ [int64(ntz64(int64(uint32(c))))] x yes no)
 27748  		for b.Controls[0].Op == OpARM64ANDconst {
 27749  			v_0 := b.Controls[0]
 27750  			c := auxIntToInt64(v_0.AuxInt)
 27751  			x := v_0.Args[0]
 27752  			if !(oneBit(int64(uint32(c)))) {
 27753  				break
 27754  			}
 27755  			b.resetWithControl(BlockARM64TBZ, x)
 27756  			b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
 27757  			return true
 27758  		}
 27759  		// match: (ZW (MOVDconst [c]) yes no)
 27760  		// cond: int32(c) == 0
 27761  		// result: (First yes no)
 27762  		for b.Controls[0].Op == OpARM64MOVDconst {
 27763  			v_0 := b.Controls[0]
 27764  			c := auxIntToInt64(v_0.AuxInt)
 27765  			if !(int32(c) == 0) {
 27766  				break
 27767  			}
 27768  			b.Reset(BlockFirst)
 27769  			return true
 27770  		}
 27771  		// match: (ZW (MOVDconst [c]) yes no)
 27772  		// cond: int32(c) != 0
 27773  		// result: (First no yes)
 27774  		for b.Controls[0].Op == OpARM64MOVDconst {
 27775  			v_0 := b.Controls[0]
 27776  			c := auxIntToInt64(v_0.AuxInt)
 27777  			if !(int32(c) != 0) {
 27778  				break
 27779  			}
 27780  			b.Reset(BlockFirst)
 27781  			b.swapSuccessors()
 27782  			return true
 27783  		}
 27784  	}
 27785  	return false
 27786  }
 27787  

View as plain text