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  import "cmd/compile/internal/ssa/block"
     7  
     8  func rewriteValueARM64(v *Value) bool {
     9  	switch v.Op {
    10  	case OpARM64ADCSflags:
    11  		return rewriteValueARM64_OpARM64ADCSflags(v)
    12  	case OpARM64ADD:
    13  		return rewriteValueARM64_OpARM64ADD(v)
    14  	case OpARM64ADDSflags:
    15  		return rewriteValueARM64_OpARM64ADDSflags(v)
    16  	case OpARM64ADDconst:
    17  		return rewriteValueARM64_OpARM64ADDconst(v)
    18  	case OpARM64ADDshiftLL:
    19  		return rewriteValueARM64_OpARM64ADDshiftLL(v)
    20  	case OpARM64ADDshiftRA:
    21  		return rewriteValueARM64_OpARM64ADDshiftRA(v)
    22  	case OpARM64ADDshiftRL:
    23  		return rewriteValueARM64_OpARM64ADDshiftRL(v)
    24  	case OpARM64AND:
    25  		return rewriteValueARM64_OpARM64AND(v)
    26  	case OpARM64ANDconst:
    27  		return rewriteValueARM64_OpARM64ANDconst(v)
    28  	case OpARM64ANDshiftLL:
    29  		return rewriteValueARM64_OpARM64ANDshiftLL(v)
    30  	case OpARM64ANDshiftRA:
    31  		return rewriteValueARM64_OpARM64ANDshiftRA(v)
    32  	case OpARM64ANDshiftRL:
    33  		return rewriteValueARM64_OpARM64ANDshiftRL(v)
    34  	case OpARM64ANDshiftRO:
    35  		return rewriteValueARM64_OpARM64ANDshiftRO(v)
    36  	case OpARM64BIC:
    37  		return rewriteValueARM64_OpARM64BIC(v)
    38  	case OpARM64BICshiftLL:
    39  		return rewriteValueARM64_OpARM64BICshiftLL(v)
    40  	case OpARM64BICshiftRA:
    41  		return rewriteValueARM64_OpARM64BICshiftRA(v)
    42  	case OpARM64BICshiftRL:
    43  		return rewriteValueARM64_OpARM64BICshiftRL(v)
    44  	case OpARM64BICshiftRO:
    45  		return rewriteValueARM64_OpARM64BICshiftRO(v)
    46  	case OpARM64CMN:
    47  		return rewriteValueARM64_OpARM64CMN(v)
    48  	case OpARM64CMNW:
    49  		return rewriteValueARM64_OpARM64CMNW(v)
    50  	case OpARM64CMNWconst:
    51  		return rewriteValueARM64_OpARM64CMNWconst(v)
    52  	case OpARM64CMNconst:
    53  		return rewriteValueARM64_OpARM64CMNconst(v)
    54  	case OpARM64CMNshiftLL:
    55  		return rewriteValueARM64_OpARM64CMNshiftLL(v)
    56  	case OpARM64CMNshiftRA:
    57  		return rewriteValueARM64_OpARM64CMNshiftRA(v)
    58  	case OpARM64CMNshiftRL:
    59  		return rewriteValueARM64_OpARM64CMNshiftRL(v)
    60  	case OpARM64CMP:
    61  		return rewriteValueARM64_OpARM64CMP(v)
    62  	case OpARM64CMPW:
    63  		return rewriteValueARM64_OpARM64CMPW(v)
    64  	case OpARM64CMPWconst:
    65  		return rewriteValueARM64_OpARM64CMPWconst(v)
    66  	case OpARM64CMPconst:
    67  		return rewriteValueARM64_OpARM64CMPconst(v)
    68  	case OpARM64CMPshiftLL:
    69  		return rewriteValueARM64_OpARM64CMPshiftLL(v)
    70  	case OpARM64CMPshiftRA:
    71  		return rewriteValueARM64_OpARM64CMPshiftRA(v)
    72  	case OpARM64CMPshiftRL:
    73  		return rewriteValueARM64_OpARM64CMPshiftRL(v)
    74  	case OpARM64CSEL:
    75  		return rewriteValueARM64_OpARM64CSEL(v)
    76  	case OpARM64CSEL0:
    77  		return rewriteValueARM64_OpARM64CSEL0(v)
    78  	case OpARM64CSETM:
    79  		return rewriteValueARM64_OpARM64CSETM(v)
    80  	case OpARM64CSINC:
    81  		return rewriteValueARM64_OpARM64CSINC(v)
    82  	case OpARM64CSINV:
    83  		return rewriteValueARM64_OpARM64CSINV(v)
    84  	case OpARM64CSNEG:
    85  		return rewriteValueARM64_OpARM64CSNEG(v)
    86  	case OpARM64DIV:
    87  		return rewriteValueARM64_OpARM64DIV(v)
    88  	case OpARM64DIVW:
    89  		return rewriteValueARM64_OpARM64DIVW(v)
    90  	case OpARM64EON:
    91  		return rewriteValueARM64_OpARM64EON(v)
    92  	case OpARM64EONshiftLL:
    93  		return rewriteValueARM64_OpARM64EONshiftLL(v)
    94  	case OpARM64EONshiftRA:
    95  		return rewriteValueARM64_OpARM64EONshiftRA(v)
    96  	case OpARM64EONshiftRL:
    97  		return rewriteValueARM64_OpARM64EONshiftRL(v)
    98  	case OpARM64EONshiftRO:
    99  		return rewriteValueARM64_OpARM64EONshiftRO(v)
   100  	case OpARM64Equal:
   101  		return rewriteValueARM64_OpARM64Equal(v)
   102  	case OpARM64FADDD:
   103  		return rewriteValueARM64_OpARM64FADDD(v)
   104  	case OpARM64FADDS:
   105  		return rewriteValueARM64_OpARM64FADDS(v)
   106  	case OpARM64FCMPD:
   107  		return rewriteValueARM64_OpARM64FCMPD(v)
   108  	case OpARM64FCMPS:
   109  		return rewriteValueARM64_OpARM64FCMPS(v)
   110  	case OpARM64FCVTDS:
   111  		return rewriteValueARM64_OpARM64FCVTDS(v)
   112  	case OpARM64FLDPQ:
   113  		return rewriteValueARM64_OpARM64FLDPQ(v)
   114  	case OpARM64FMOVDfpgp:
   115  		return rewriteValueARM64_OpARM64FMOVDfpgp(v)
   116  	case OpARM64FMOVDgpfp:
   117  		return rewriteValueARM64_OpARM64FMOVDgpfp(v)
   118  	case OpARM64FMOVDload:
   119  		return rewriteValueARM64_OpARM64FMOVDload(v)
   120  	case OpARM64FMOVDloadidx:
   121  		return rewriteValueARM64_OpARM64FMOVDloadidx(v)
   122  	case OpARM64FMOVDloadidx8:
   123  		return rewriteValueARM64_OpARM64FMOVDloadidx8(v)
   124  	case OpARM64FMOVDstore:
   125  		return rewriteValueARM64_OpARM64FMOVDstore(v)
   126  	case OpARM64FMOVDstoreidx:
   127  		return rewriteValueARM64_OpARM64FMOVDstoreidx(v)
   128  	case OpARM64FMOVDstoreidx8:
   129  		return rewriteValueARM64_OpARM64FMOVDstoreidx8(v)
   130  	case OpARM64FMOVQload:
   131  		return rewriteValueARM64_OpARM64FMOVQload(v)
   132  	case OpARM64FMOVQstore:
   133  		return rewriteValueARM64_OpARM64FMOVQstore(v)
   134  	case OpARM64FMOVSload:
   135  		return rewriteValueARM64_OpARM64FMOVSload(v)
   136  	case OpARM64FMOVSloadidx:
   137  		return rewriteValueARM64_OpARM64FMOVSloadidx(v)
   138  	case OpARM64FMOVSloadidx4:
   139  		return rewriteValueARM64_OpARM64FMOVSloadidx4(v)
   140  	case OpARM64FMOVSstore:
   141  		return rewriteValueARM64_OpARM64FMOVSstore(v)
   142  	case OpARM64FMOVSstoreidx:
   143  		return rewriteValueARM64_OpARM64FMOVSstoreidx(v)
   144  	case OpARM64FMOVSstoreidx4:
   145  		return rewriteValueARM64_OpARM64FMOVSstoreidx4(v)
   146  	case OpARM64FMULD:
   147  		return rewriteValueARM64_OpARM64FMULD(v)
   148  	case OpARM64FMULS:
   149  		return rewriteValueARM64_OpARM64FMULS(v)
   150  	case OpARM64FNEGD:
   151  		return rewriteValueARM64_OpARM64FNEGD(v)
   152  	case OpARM64FNEGS:
   153  		return rewriteValueARM64_OpARM64FNEGS(v)
   154  	case OpARM64FNMULD:
   155  		return rewriteValueARM64_OpARM64FNMULD(v)
   156  	case OpARM64FNMULS:
   157  		return rewriteValueARM64_OpARM64FNMULS(v)
   158  	case OpARM64FSTPQ:
   159  		return rewriteValueARM64_OpARM64FSTPQ(v)
   160  	case OpARM64FSUBD:
   161  		return rewriteValueARM64_OpARM64FSUBD(v)
   162  	case OpARM64FSUBS:
   163  		return rewriteValueARM64_OpARM64FSUBS(v)
   164  	case OpARM64GreaterEqual:
   165  		return rewriteValueARM64_OpARM64GreaterEqual(v)
   166  	case OpARM64GreaterEqualF:
   167  		return rewriteValueARM64_OpARM64GreaterEqualF(v)
   168  	case OpARM64GreaterEqualNoov:
   169  		return rewriteValueARM64_OpARM64GreaterEqualNoov(v)
   170  	case OpARM64GreaterEqualU:
   171  		return rewriteValueARM64_OpARM64GreaterEqualU(v)
   172  	case OpARM64GreaterThan:
   173  		return rewriteValueARM64_OpARM64GreaterThan(v)
   174  	case OpARM64GreaterThanF:
   175  		return rewriteValueARM64_OpARM64GreaterThanF(v)
   176  	case OpARM64GreaterThanU:
   177  		return rewriteValueARM64_OpARM64GreaterThanU(v)
   178  	case OpARM64LDP:
   179  		return rewriteValueARM64_OpARM64LDP(v)
   180  	case OpARM64LessEqual:
   181  		return rewriteValueARM64_OpARM64LessEqual(v)
   182  	case OpARM64LessEqualF:
   183  		return rewriteValueARM64_OpARM64LessEqualF(v)
   184  	case OpARM64LessEqualU:
   185  		return rewriteValueARM64_OpARM64LessEqualU(v)
   186  	case OpARM64LessThan:
   187  		return rewriteValueARM64_OpARM64LessThan(v)
   188  	case OpARM64LessThanF:
   189  		return rewriteValueARM64_OpARM64LessThanF(v)
   190  	case OpARM64LessThanNoov:
   191  		return rewriteValueARM64_OpARM64LessThanNoov(v)
   192  	case OpARM64LessThanU:
   193  		return rewriteValueARM64_OpARM64LessThanU(v)
   194  	case OpARM64LoweredPanicBoundsCR:
   195  		return rewriteValueARM64_OpARM64LoweredPanicBoundsCR(v)
   196  	case OpARM64LoweredPanicBoundsRC:
   197  		return rewriteValueARM64_OpARM64LoweredPanicBoundsRC(v)
   198  	case OpARM64LoweredPanicBoundsRR:
   199  		return rewriteValueARM64_OpARM64LoweredPanicBoundsRR(v)
   200  	case OpARM64MADD:
   201  		return rewriteValueARM64_OpARM64MADD(v)
   202  	case OpARM64MADDW:
   203  		return rewriteValueARM64_OpARM64MADDW(v)
   204  	case OpARM64MNEG:
   205  		return rewriteValueARM64_OpARM64MNEG(v)
   206  	case OpARM64MNEGW:
   207  		return rewriteValueARM64_OpARM64MNEGW(v)
   208  	case OpARM64MOD:
   209  		return rewriteValueARM64_OpARM64MOD(v)
   210  	case OpARM64MODW:
   211  		return rewriteValueARM64_OpARM64MODW(v)
   212  	case OpARM64MOVBUload:
   213  		return rewriteValueARM64_OpARM64MOVBUload(v)
   214  	case OpARM64MOVBUloadidx:
   215  		return rewriteValueARM64_OpARM64MOVBUloadidx(v)
   216  	case OpARM64MOVBUreg:
   217  		return rewriteValueARM64_OpARM64MOVBUreg(v)
   218  	case OpARM64MOVBload:
   219  		return rewriteValueARM64_OpARM64MOVBload(v)
   220  	case OpARM64MOVBloadidx:
   221  		return rewriteValueARM64_OpARM64MOVBloadidx(v)
   222  	case OpARM64MOVBreg:
   223  		return rewriteValueARM64_OpARM64MOVBreg(v)
   224  	case OpARM64MOVBstore:
   225  		return rewriteValueARM64_OpARM64MOVBstore(v)
   226  	case OpARM64MOVBstoreidx:
   227  		return rewriteValueARM64_OpARM64MOVBstoreidx(v)
   228  	case OpARM64MOVDload:
   229  		return rewriteValueARM64_OpARM64MOVDload(v)
   230  	case OpARM64MOVDloadidx:
   231  		return rewriteValueARM64_OpARM64MOVDloadidx(v)
   232  	case OpARM64MOVDloadidx8:
   233  		return rewriteValueARM64_OpARM64MOVDloadidx8(v)
   234  	case OpARM64MOVDnop:
   235  		return rewriteValueARM64_OpARM64MOVDnop(v)
   236  	case OpARM64MOVDreg:
   237  		return rewriteValueARM64_OpARM64MOVDreg(v)
   238  	case OpARM64MOVDstore:
   239  		return rewriteValueARM64_OpARM64MOVDstore(v)
   240  	case OpARM64MOVDstoreidx:
   241  		return rewriteValueARM64_OpARM64MOVDstoreidx(v)
   242  	case OpARM64MOVDstoreidx8:
   243  		return rewriteValueARM64_OpARM64MOVDstoreidx8(v)
   244  	case OpARM64MOVHUload:
   245  		return rewriteValueARM64_OpARM64MOVHUload(v)
   246  	case OpARM64MOVHUloadidx:
   247  		return rewriteValueARM64_OpARM64MOVHUloadidx(v)
   248  	case OpARM64MOVHUloadidx2:
   249  		return rewriteValueARM64_OpARM64MOVHUloadidx2(v)
   250  	case OpARM64MOVHUreg:
   251  		return rewriteValueARM64_OpARM64MOVHUreg(v)
   252  	case OpARM64MOVHload:
   253  		return rewriteValueARM64_OpARM64MOVHload(v)
   254  	case OpARM64MOVHloadidx:
   255  		return rewriteValueARM64_OpARM64MOVHloadidx(v)
   256  	case OpARM64MOVHloadidx2:
   257  		return rewriteValueARM64_OpARM64MOVHloadidx2(v)
   258  	case OpARM64MOVHreg:
   259  		return rewriteValueARM64_OpARM64MOVHreg(v)
   260  	case OpARM64MOVHstore:
   261  		return rewriteValueARM64_OpARM64MOVHstore(v)
   262  	case OpARM64MOVHstoreidx:
   263  		return rewriteValueARM64_OpARM64MOVHstoreidx(v)
   264  	case OpARM64MOVHstoreidx2:
   265  		return rewriteValueARM64_OpARM64MOVHstoreidx2(v)
   266  	case OpARM64MOVWUload:
   267  		return rewriteValueARM64_OpARM64MOVWUload(v)
   268  	case OpARM64MOVWUloadidx:
   269  		return rewriteValueARM64_OpARM64MOVWUloadidx(v)
   270  	case OpARM64MOVWUloadidx4:
   271  		return rewriteValueARM64_OpARM64MOVWUloadidx4(v)
   272  	case OpARM64MOVWUreg:
   273  		return rewriteValueARM64_OpARM64MOVWUreg(v)
   274  	case OpARM64MOVWload:
   275  		return rewriteValueARM64_OpARM64MOVWload(v)
   276  	case OpARM64MOVWloadidx:
   277  		return rewriteValueARM64_OpARM64MOVWloadidx(v)
   278  	case OpARM64MOVWloadidx4:
   279  		return rewriteValueARM64_OpARM64MOVWloadidx4(v)
   280  	case OpARM64MOVWreg:
   281  		return rewriteValueARM64_OpARM64MOVWreg(v)
   282  	case OpARM64MOVWstore:
   283  		return rewriteValueARM64_OpARM64MOVWstore(v)
   284  	case OpARM64MOVWstoreidx:
   285  		return rewriteValueARM64_OpARM64MOVWstoreidx(v)
   286  	case OpARM64MOVWstoreidx4:
   287  		return rewriteValueARM64_OpARM64MOVWstoreidx4(v)
   288  	case OpARM64MSUB:
   289  		return rewriteValueARM64_OpARM64MSUB(v)
   290  	case OpARM64MSUBW:
   291  		return rewriteValueARM64_OpARM64MSUBW(v)
   292  	case OpARM64MUL:
   293  		return rewriteValueARM64_OpARM64MUL(v)
   294  	case OpARM64MULW:
   295  		return rewriteValueARM64_OpARM64MULW(v)
   296  	case OpARM64MVN:
   297  		return rewriteValueARM64_OpARM64MVN(v)
   298  	case OpARM64MVNshiftLL:
   299  		return rewriteValueARM64_OpARM64MVNshiftLL(v)
   300  	case OpARM64MVNshiftRA:
   301  		return rewriteValueARM64_OpARM64MVNshiftRA(v)
   302  	case OpARM64MVNshiftRL:
   303  		return rewriteValueARM64_OpARM64MVNshiftRL(v)
   304  	case OpARM64MVNshiftRO:
   305  		return rewriteValueARM64_OpARM64MVNshiftRO(v)
   306  	case OpARM64NEG:
   307  		return rewriteValueARM64_OpARM64NEG(v)
   308  	case OpARM64NEGshiftLL:
   309  		return rewriteValueARM64_OpARM64NEGshiftLL(v)
   310  	case OpARM64NEGshiftRA:
   311  		return rewriteValueARM64_OpARM64NEGshiftRA(v)
   312  	case OpARM64NEGshiftRL:
   313  		return rewriteValueARM64_OpARM64NEGshiftRL(v)
   314  	case OpARM64NotEqual:
   315  		return rewriteValueARM64_OpARM64NotEqual(v)
   316  	case OpARM64OR:
   317  		return rewriteValueARM64_OpARM64OR(v)
   318  	case OpARM64ORN:
   319  		return rewriteValueARM64_OpARM64ORN(v)
   320  	case OpARM64ORNshiftLL:
   321  		return rewriteValueARM64_OpARM64ORNshiftLL(v)
   322  	case OpARM64ORNshiftRA:
   323  		return rewriteValueARM64_OpARM64ORNshiftRA(v)
   324  	case OpARM64ORNshiftRL:
   325  		return rewriteValueARM64_OpARM64ORNshiftRL(v)
   326  	case OpARM64ORNshiftRO:
   327  		return rewriteValueARM64_OpARM64ORNshiftRO(v)
   328  	case OpARM64ORconst:
   329  		return rewriteValueARM64_OpARM64ORconst(v)
   330  	case OpARM64ORshiftLL:
   331  		return rewriteValueARM64_OpARM64ORshiftLL(v)
   332  	case OpARM64ORshiftRA:
   333  		return rewriteValueARM64_OpARM64ORshiftRA(v)
   334  	case OpARM64ORshiftRL:
   335  		return rewriteValueARM64_OpARM64ORshiftRL(v)
   336  	case OpARM64ORshiftRO:
   337  		return rewriteValueARM64_OpARM64ORshiftRO(v)
   338  	case OpARM64REV:
   339  		return rewriteValueARM64_OpARM64REV(v)
   340  	case OpARM64REV16:
   341  		return rewriteValueARM64_OpARM64REV16(v)
   342  	case OpARM64REVW:
   343  		return rewriteValueARM64_OpARM64REVW(v)
   344  	case OpARM64ROR:
   345  		return rewriteValueARM64_OpARM64ROR(v)
   346  	case OpARM64RORW:
   347  		return rewriteValueARM64_OpARM64RORW(v)
   348  	case OpARM64SBCSflags:
   349  		return rewriteValueARM64_OpARM64SBCSflags(v)
   350  	case OpARM64SBFX:
   351  		return rewriteValueARM64_OpARM64SBFX(v)
   352  	case OpARM64SLL:
   353  		return rewriteValueARM64_OpARM64SLL(v)
   354  	case OpARM64SLLconst:
   355  		return rewriteValueARM64_OpARM64SLLconst(v)
   356  	case OpARM64SRA:
   357  		return rewriteValueARM64_OpARM64SRA(v)
   358  	case OpARM64SRAconst:
   359  		return rewriteValueARM64_OpARM64SRAconst(v)
   360  	case OpARM64SRL:
   361  		return rewriteValueARM64_OpARM64SRL(v)
   362  	case OpARM64SRLconst:
   363  		return rewriteValueARM64_OpARM64SRLconst(v)
   364  	case OpARM64STP:
   365  		return rewriteValueARM64_OpARM64STP(v)
   366  	case OpARM64SUB:
   367  		return rewriteValueARM64_OpARM64SUB(v)
   368  	case OpARM64SUBconst:
   369  		return rewriteValueARM64_OpARM64SUBconst(v)
   370  	case OpARM64SUBshiftLL:
   371  		return rewriteValueARM64_OpARM64SUBshiftLL(v)
   372  	case OpARM64SUBshiftRA:
   373  		return rewriteValueARM64_OpARM64SUBshiftRA(v)
   374  	case OpARM64SUBshiftRL:
   375  		return rewriteValueARM64_OpARM64SUBshiftRL(v)
   376  	case OpARM64TST:
   377  		return rewriteValueARM64_OpARM64TST(v)
   378  	case OpARM64TSTW:
   379  		return rewriteValueARM64_OpARM64TSTW(v)
   380  	case OpARM64TSTWconst:
   381  		return rewriteValueARM64_OpARM64TSTWconst(v)
   382  	case OpARM64TSTconst:
   383  		return rewriteValueARM64_OpARM64TSTconst(v)
   384  	case OpARM64TSTshiftLL:
   385  		return rewriteValueARM64_OpARM64TSTshiftLL(v)
   386  	case OpARM64TSTshiftRA:
   387  		return rewriteValueARM64_OpARM64TSTshiftRA(v)
   388  	case OpARM64TSTshiftRL:
   389  		return rewriteValueARM64_OpARM64TSTshiftRL(v)
   390  	case OpARM64TSTshiftRO:
   391  		return rewriteValueARM64_OpARM64TSTshiftRO(v)
   392  	case OpARM64UBFIZ:
   393  		return rewriteValueARM64_OpARM64UBFIZ(v)
   394  	case OpARM64UBFX:
   395  		return rewriteValueARM64_OpARM64UBFX(v)
   396  	case OpARM64UDIV:
   397  		return rewriteValueARM64_OpARM64UDIV(v)
   398  	case OpARM64UDIVW:
   399  		return rewriteValueARM64_OpARM64UDIVW(v)
   400  	case OpARM64UMOD:
   401  		return rewriteValueARM64_OpARM64UMOD(v)
   402  	case OpARM64UMODW:
   403  		return rewriteValueARM64_OpARM64UMODW(v)
   404  	case OpARM64VBIF16B:
   405  		return rewriteValueARM64_OpARM64VBIF16B(v)
   406  	case OpARM64VBIT16B:
   407  		return rewriteValueARM64_OpARM64VBIT16B(v)
   408  	case OpARM64VDUPBbcast:
   409  		return rewriteValueARM64_OpARM64VDUPBbcast(v)
   410  	case OpARM64VFCVTL4S:
   411  		return rewriteValueARM64_OpARM64VFCVTL4S(v)
   412  	case OpARM64VMOVDins0:
   413  		return rewriteValueARM64_OpARM64VMOVDins0(v)
   414  	case OpARM64VMOVSins0:
   415  		return rewriteValueARM64_OpARM64VMOVSins0(v)
   416  	case OpARM64VPMULL2D:
   417  		return rewriteValueARM64_OpARM64VPMULL2D(v)
   418  	case OpARM64VSHL16B:
   419  		return rewriteValueARM64_OpARM64VSHL16B(v)
   420  	case OpARM64VSHL2D:
   421  		return rewriteValueARM64_OpARM64VSHL2D(v)
   422  	case OpARM64VSHL4S:
   423  		return rewriteValueARM64_OpARM64VSHL4S(v)
   424  	case OpARM64VSHL8H:
   425  		return rewriteValueARM64_OpARM64VSHL8H(v)
   426  	case OpARM64VSHRN2D:
   427  		return rewriteValueARM64_OpARM64VSHRN2D(v)
   428  	case OpARM64VSHRN4S:
   429  		return rewriteValueARM64_OpARM64VSHRN4S(v)
   430  	case OpARM64VSHRN8H:
   431  		return rewriteValueARM64_OpARM64VSHRN8H(v)
   432  	case OpARM64VSMULL16B:
   433  		return rewriteValueARM64_OpARM64VSMULL16B(v)
   434  	case OpARM64VSMULL4S:
   435  		return rewriteValueARM64_OpARM64VSMULL4S(v)
   436  	case OpARM64VSMULL8H:
   437  		return rewriteValueARM64_OpARM64VSMULL8H(v)
   438  	case OpARM64VSQSHL16Bconst:
   439  		return rewriteValueARM64_OpARM64VSQSHL16Bconst(v)
   440  	case OpARM64VSQSHL2Dconst:
   441  		return rewriteValueARM64_OpARM64VSQSHL2Dconst(v)
   442  	case OpARM64VSQSHL4Sconst:
   443  		return rewriteValueARM64_OpARM64VSQSHL4Sconst(v)
   444  	case OpARM64VSQSHL8Hconst:
   445  		return rewriteValueARM64_OpARM64VSQSHL8Hconst(v)
   446  	case OpARM64VSSHLL16B:
   447  		return rewriteValueARM64_OpARM64VSSHLL16B(v)
   448  	case OpARM64VSSHLL4S:
   449  		return rewriteValueARM64_OpARM64VSSHLL4S(v)
   450  	case OpARM64VSSHLL8H:
   451  		return rewriteValueARM64_OpARM64VSSHLL8H(v)
   452  	case OpARM64VSSHR16B:
   453  		return rewriteValueARM64_OpARM64VSSHR16B(v)
   454  	case OpARM64VSSHR2D:
   455  		return rewriteValueARM64_OpARM64VSSHR2D(v)
   456  	case OpARM64VSSHR4S:
   457  		return rewriteValueARM64_OpARM64VSSHR4S(v)
   458  	case OpARM64VSSHR8H:
   459  		return rewriteValueARM64_OpARM64VSSHR8H(v)
   460  	case OpARM64VSXTL16B:
   461  		return rewriteValueARM64_OpARM64VSXTL16B(v)
   462  	case OpARM64VSXTL4S:
   463  		return rewriteValueARM64_OpARM64VSXTL4S(v)
   464  	case OpARM64VSXTL8H:
   465  		return rewriteValueARM64_OpARM64VSXTL8H(v)
   466  	case OpARM64VUMULL16B:
   467  		return rewriteValueARM64_OpARM64VUMULL16B(v)
   468  	case OpARM64VUMULL4S:
   469  		return rewriteValueARM64_OpARM64VUMULL4S(v)
   470  	case OpARM64VUMULL8H:
   471  		return rewriteValueARM64_OpARM64VUMULL8H(v)
   472  	case OpARM64VUQSHL16Bconst:
   473  		return rewriteValueARM64_OpARM64VUQSHL16Bconst(v)
   474  	case OpARM64VUQSHL2Dconst:
   475  		return rewriteValueARM64_OpARM64VUQSHL2Dconst(v)
   476  	case OpARM64VUQSHL4Sconst:
   477  		return rewriteValueARM64_OpARM64VUQSHL4Sconst(v)
   478  	case OpARM64VUQSHL8Hconst:
   479  		return rewriteValueARM64_OpARM64VUQSHL8Hconst(v)
   480  	case OpARM64VUSHLL16B:
   481  		return rewriteValueARM64_OpARM64VUSHLL16B(v)
   482  	case OpARM64VUSHLL4S:
   483  		return rewriteValueARM64_OpARM64VUSHLL4S(v)
   484  	case OpARM64VUSHLL8H:
   485  		return rewriteValueARM64_OpARM64VUSHLL8H(v)
   486  	case OpARM64VUSHR16B:
   487  		return rewriteValueARM64_OpARM64VUSHR16B(v)
   488  	case OpARM64VUSHR2D:
   489  		return rewriteValueARM64_OpARM64VUSHR2D(v)
   490  	case OpARM64VUSHR4S:
   491  		return rewriteValueARM64_OpARM64VUSHR4S(v)
   492  	case OpARM64VUSHR8H:
   493  		return rewriteValueARM64_OpARM64VUSHR8H(v)
   494  	case OpARM64VUXTL16B:
   495  		return rewriteValueARM64_OpARM64VUXTL16B(v)
   496  	case OpARM64VUXTL4S:
   497  		return rewriteValueARM64_OpARM64VUXTL4S(v)
   498  	case OpARM64VUXTL8H:
   499  		return rewriteValueARM64_OpARM64VUXTL8H(v)
   500  	case OpARM64XOR:
   501  		return rewriteValueARM64_OpARM64XOR(v)
   502  	case OpARM64XORconst:
   503  		return rewriteValueARM64_OpARM64XORconst(v)
   504  	case OpARM64XORshiftLL:
   505  		return rewriteValueARM64_OpARM64XORshiftLL(v)
   506  	case OpARM64XORshiftRA:
   507  		return rewriteValueARM64_OpARM64XORshiftRA(v)
   508  	case OpARM64XORshiftRL:
   509  		return rewriteValueARM64_OpARM64XORshiftRL(v)
   510  	case OpARM64XORshiftRO:
   511  		return rewriteValueARM64_OpARM64XORshiftRO(v)
   512  	case OpAbs:
   513  		v.Op = OpARM64FABSD
   514  		return true
   515  	case OpAbsFloat32x4:
   516  		v.Op = OpARM64VFABS4S
   517  		return true
   518  	case OpAbsFloat64x2:
   519  		v.Op = OpARM64VFABS2D
   520  		return true
   521  	case OpAbsInt16x8:
   522  		v.Op = OpARM64VABS8H
   523  		return true
   524  	case OpAbsInt32x4:
   525  		v.Op = OpARM64VABS4S
   526  		return true
   527  	case OpAbsInt64x2:
   528  		v.Op = OpARM64VABS2D
   529  		return true
   530  	case OpAbsInt8x16:
   531  		v.Op = OpARM64VABS16B
   532  		return true
   533  	case OpAdd16:
   534  		v.Op = OpARM64ADD
   535  		return true
   536  	case OpAdd32:
   537  		v.Op = OpARM64ADD
   538  		return true
   539  	case OpAdd32F:
   540  		v.Op = OpARM64FADDS
   541  		return true
   542  	case OpAdd64:
   543  		v.Op = OpARM64ADD
   544  		return true
   545  	case OpAdd64F:
   546  		v.Op = OpARM64FADDD
   547  		return true
   548  	case OpAdd8:
   549  		v.Op = OpARM64ADD
   550  		return true
   551  	case OpAddFloat32x4:
   552  		v.Op = OpARM64VFADD4S
   553  		return true
   554  	case OpAddFloat64x2:
   555  		v.Op = OpARM64VFADD2D
   556  		return true
   557  	case OpAddInt16x8:
   558  		v.Op = OpARM64VADD8H
   559  		return true
   560  	case OpAddInt32x4:
   561  		v.Op = OpARM64VADD4S
   562  		return true
   563  	case OpAddInt64x2:
   564  		v.Op = OpARM64VADD2D
   565  		return true
   566  	case OpAddInt8x16:
   567  		v.Op = OpARM64VADD16B
   568  		return true
   569  	case OpAddPtr:
   570  		v.Op = OpARM64ADD
   571  		return true
   572  	case OpAddSaturatedInt16x8:
   573  		v.Op = OpARM64VSQADD8H
   574  		return true
   575  	case OpAddSaturatedInt32x4:
   576  		v.Op = OpARM64VSQADD4S
   577  		return true
   578  	case OpAddSaturatedInt64x2:
   579  		v.Op = OpARM64VSQADD2D
   580  		return true
   581  	case OpAddSaturatedInt8x16:
   582  		v.Op = OpARM64VSQADD16B
   583  		return true
   584  	case OpAddSaturatedUint16x8:
   585  		v.Op = OpARM64VUQADD8H
   586  		return true
   587  	case OpAddSaturatedUint32x4:
   588  		v.Op = OpARM64VUQADD4S
   589  		return true
   590  	case OpAddSaturatedUint64x2:
   591  		v.Op = OpARM64VUQADD2D
   592  		return true
   593  	case OpAddSaturatedUint8x16:
   594  		v.Op = OpARM64VUQADD16B
   595  		return true
   596  	case OpAddUint16x8:
   597  		v.Op = OpARM64VADD8H
   598  		return true
   599  	case OpAddUint32x4:
   600  		v.Op = OpARM64VADD4S
   601  		return true
   602  	case OpAddUint64x2:
   603  		v.Op = OpARM64VADD2D
   604  		return true
   605  	case OpAddUint8x16:
   606  		v.Op = OpARM64VADD16B
   607  		return true
   608  	case OpAddr:
   609  		return rewriteValueARM64_OpAddr(v)
   610  	case OpAnd16:
   611  		v.Op = OpARM64AND
   612  		return true
   613  	case OpAnd32:
   614  		v.Op = OpARM64AND
   615  		return true
   616  	case OpAnd64:
   617  		v.Op = OpARM64AND
   618  		return true
   619  	case OpAnd8:
   620  		v.Op = OpARM64AND
   621  		return true
   622  	case OpAndB:
   623  		v.Op = OpARM64AND
   624  		return true
   625  	case OpAndInt16x8:
   626  		v.Op = OpARM64VAND16B
   627  		return true
   628  	case OpAndInt32x4:
   629  		v.Op = OpARM64VAND16B
   630  		return true
   631  	case OpAndInt64x2:
   632  		v.Op = OpARM64VAND16B
   633  		return true
   634  	case OpAndInt8x16:
   635  		v.Op = OpARM64VAND16B
   636  		return true
   637  	case OpAndNotInt16x8:
   638  		v.Op = OpARM64VBIC16B
   639  		return true
   640  	case OpAndNotInt32x4:
   641  		v.Op = OpARM64VBIC16B
   642  		return true
   643  	case OpAndNotInt64x2:
   644  		v.Op = OpARM64VBIC16B
   645  		return true
   646  	case OpAndNotInt8x16:
   647  		v.Op = OpARM64VBIC16B
   648  		return true
   649  	case OpAndNotUint16x8:
   650  		v.Op = OpARM64VBIC16B
   651  		return true
   652  	case OpAndNotUint32x4:
   653  		v.Op = OpARM64VBIC16B
   654  		return true
   655  	case OpAndNotUint64x2:
   656  		v.Op = OpARM64VBIC16B
   657  		return true
   658  	case OpAndNotUint8x16:
   659  		v.Op = OpARM64VBIC16B
   660  		return true
   661  	case OpAndUint16x8:
   662  		v.Op = OpARM64VAND16B
   663  		return true
   664  	case OpAndUint32x4:
   665  		v.Op = OpARM64VAND16B
   666  		return true
   667  	case OpAndUint64x2:
   668  		v.Op = OpARM64VAND16B
   669  		return true
   670  	case OpAndUint8x16:
   671  		v.Op = OpARM64VAND16B
   672  		return true
   673  	case OpAtomicAdd32:
   674  		v.Op = OpARM64LoweredAtomicAdd32
   675  		return true
   676  	case OpAtomicAdd32Variant:
   677  		v.Op = OpARM64LoweredAtomicAdd32Variant
   678  		return true
   679  	case OpAtomicAdd64:
   680  		v.Op = OpARM64LoweredAtomicAdd64
   681  		return true
   682  	case OpAtomicAdd64Variant:
   683  		v.Op = OpARM64LoweredAtomicAdd64Variant
   684  		return true
   685  	case OpAtomicAnd32value:
   686  		v.Op = OpARM64LoweredAtomicAnd32
   687  		return true
   688  	case OpAtomicAnd32valueVariant:
   689  		v.Op = OpARM64LoweredAtomicAnd32Variant
   690  		return true
   691  	case OpAtomicAnd64value:
   692  		v.Op = OpARM64LoweredAtomicAnd64
   693  		return true
   694  	case OpAtomicAnd64valueVariant:
   695  		v.Op = OpARM64LoweredAtomicAnd64Variant
   696  		return true
   697  	case OpAtomicAnd8value:
   698  		v.Op = OpARM64LoweredAtomicAnd8
   699  		return true
   700  	case OpAtomicAnd8valueVariant:
   701  		v.Op = OpARM64LoweredAtomicAnd8Variant
   702  		return true
   703  	case OpAtomicCompareAndSwap32:
   704  		v.Op = OpARM64LoweredAtomicCas32
   705  		return true
   706  	case OpAtomicCompareAndSwap32Variant:
   707  		v.Op = OpARM64LoweredAtomicCas32Variant
   708  		return true
   709  	case OpAtomicCompareAndSwap64:
   710  		v.Op = OpARM64LoweredAtomicCas64
   711  		return true
   712  	case OpAtomicCompareAndSwap64Variant:
   713  		v.Op = OpARM64LoweredAtomicCas64Variant
   714  		return true
   715  	case OpAtomicExchange32:
   716  		v.Op = OpARM64LoweredAtomicExchange32
   717  		return true
   718  	case OpAtomicExchange32Variant:
   719  		v.Op = OpARM64LoweredAtomicExchange32Variant
   720  		return true
   721  	case OpAtomicExchange64:
   722  		v.Op = OpARM64LoweredAtomicExchange64
   723  		return true
   724  	case OpAtomicExchange64Variant:
   725  		v.Op = OpARM64LoweredAtomicExchange64Variant
   726  		return true
   727  	case OpAtomicExchange8:
   728  		v.Op = OpARM64LoweredAtomicExchange8
   729  		return true
   730  	case OpAtomicExchange8Variant:
   731  		v.Op = OpARM64LoweredAtomicExchange8Variant
   732  		return true
   733  	case OpAtomicLoad32:
   734  		v.Op = OpARM64LDARW
   735  		return true
   736  	case OpAtomicLoad64:
   737  		v.Op = OpARM64LDAR
   738  		return true
   739  	case OpAtomicLoad8:
   740  		v.Op = OpARM64LDARB
   741  		return true
   742  	case OpAtomicLoadPtr:
   743  		v.Op = OpARM64LDAR
   744  		return true
   745  	case OpAtomicOr32value:
   746  		v.Op = OpARM64LoweredAtomicOr32
   747  		return true
   748  	case OpAtomicOr32valueVariant:
   749  		v.Op = OpARM64LoweredAtomicOr32Variant
   750  		return true
   751  	case OpAtomicOr64value:
   752  		v.Op = OpARM64LoweredAtomicOr64
   753  		return true
   754  	case OpAtomicOr64valueVariant:
   755  		v.Op = OpARM64LoweredAtomicOr64Variant
   756  		return true
   757  	case OpAtomicOr8value:
   758  		v.Op = OpARM64LoweredAtomicOr8
   759  		return true
   760  	case OpAtomicOr8valueVariant:
   761  		v.Op = OpARM64LoweredAtomicOr8Variant
   762  		return true
   763  	case OpAtomicStore32:
   764  		v.Op = OpARM64STLRW
   765  		return true
   766  	case OpAtomicStore64:
   767  		v.Op = OpARM64STLR
   768  		return true
   769  	case OpAtomicStore8:
   770  		v.Op = OpARM64STLRB
   771  		return true
   772  	case OpAtomicStorePtrNoWB:
   773  		v.Op = OpARM64STLR
   774  		return true
   775  	case OpAverageInt16x8:
   776  		v.Op = OpARM64VSRHADD8H
   777  		return true
   778  	case OpAverageInt32x4:
   779  		v.Op = OpARM64VSRHADD4S
   780  		return true
   781  	case OpAverageInt8x16:
   782  		v.Op = OpARM64VSRHADD16B
   783  		return true
   784  	case OpAverageUint16x8:
   785  		v.Op = OpARM64VURHADD8H
   786  		return true
   787  	case OpAverageUint32x4:
   788  		v.Op = OpARM64VURHADD4S
   789  		return true
   790  	case OpAverageUint8x16:
   791  		v.Op = OpARM64VURHADD16B
   792  		return true
   793  	case OpAvg64u:
   794  		return rewriteValueARM64_OpAvg64u(v)
   795  	case OpBitLen16:
   796  		return rewriteValueARM64_OpBitLen16(v)
   797  	case OpBitLen32:
   798  		return rewriteValueARM64_OpBitLen32(v)
   799  	case OpBitLen64:
   800  		return rewriteValueARM64_OpBitLen64(v)
   801  	case OpBitLen8:
   802  		return rewriteValueARM64_OpBitLen8(v)
   803  	case OpBitRev16:
   804  		return rewriteValueARM64_OpBitRev16(v)
   805  	case OpBitRev32:
   806  		v.Op = OpARM64RBITW
   807  		return true
   808  	case OpBitRev64:
   809  		v.Op = OpARM64RBIT
   810  		return true
   811  	case OpBitRev8:
   812  		return rewriteValueARM64_OpBitRev8(v)
   813  	case OpBswap16:
   814  		v.Op = OpARM64REV16W
   815  		return true
   816  	case OpBswap32:
   817  		v.Op = OpARM64REVW
   818  		return true
   819  	case OpBswap64:
   820  		v.Op = OpARM64REV
   821  		return true
   822  	case OpCeil:
   823  		v.Op = OpARM64FRINTPD
   824  		return true
   825  	case OpCeilFloat32x4:
   826  		v.Op = OpARM64VFRINTP4S
   827  		return true
   828  	case OpCeilFloat64x2:
   829  		v.Op = OpARM64VFRINTP2D
   830  		return true
   831  	case OpClosureCall:
   832  		v.Op = OpARM64CALLclosure
   833  		return true
   834  	case OpCom16:
   835  		v.Op = OpARM64MVN
   836  		return true
   837  	case OpCom32:
   838  		v.Op = OpARM64MVN
   839  		return true
   840  	case OpCom64:
   841  		v.Op = OpARM64MVN
   842  		return true
   843  	case OpCom8:
   844  		v.Op = OpARM64MVN
   845  		return true
   846  	case OpConcatAddPairsFloat32x4:
   847  		v.Op = OpARM64VFADDP4S
   848  		return true
   849  	case OpConcatAddPairsFloat64x2:
   850  		v.Op = OpARM64VFADDP2D
   851  		return true
   852  	case OpConcatAddPairsInt16x8:
   853  		v.Op = OpARM64VADDP8H
   854  		return true
   855  	case OpConcatAddPairsInt32x4:
   856  		v.Op = OpARM64VADDP4S
   857  		return true
   858  	case OpConcatAddPairsInt64x2:
   859  		v.Op = OpARM64VADDP2D
   860  		return true
   861  	case OpConcatAddPairsUint16x8:
   862  		v.Op = OpARM64VADDP8H
   863  		return true
   864  	case OpConcatAddPairsUint32x4:
   865  		v.Op = OpARM64VADDP4S
   866  		return true
   867  	case OpConcatAddPairsUint64x2:
   868  		v.Op = OpARM64VADDP2D
   869  		return true
   870  	case OpConcatEvenInt16x8:
   871  		v.Op = OpARM64VUZP18H
   872  		return true
   873  	case OpConcatEvenInt32x4:
   874  		v.Op = OpARM64VUZP14S
   875  		return true
   876  	case OpConcatEvenInt64x2:
   877  		v.Op = OpARM64VUZP12D
   878  		return true
   879  	case OpConcatEvenInt8x16:
   880  		v.Op = OpARM64VUZP116B
   881  		return true
   882  	case OpConcatEvenUint16x8:
   883  		v.Op = OpARM64VUZP18H
   884  		return true
   885  	case OpConcatEvenUint32x4:
   886  		v.Op = OpARM64VUZP14S
   887  		return true
   888  	case OpConcatEvenUint64x2:
   889  		v.Op = OpARM64VUZP12D
   890  		return true
   891  	case OpConcatEvenUint8x16:
   892  		v.Op = OpARM64VUZP116B
   893  		return true
   894  	case OpConcatOddInt16x8:
   895  		v.Op = OpARM64VUZP28H
   896  		return true
   897  	case OpConcatOddInt32x4:
   898  		v.Op = OpARM64VUZP24S
   899  		return true
   900  	case OpConcatOddInt64x2:
   901  		v.Op = OpARM64VUZP22D
   902  		return true
   903  	case OpConcatOddInt8x16:
   904  		v.Op = OpARM64VUZP216B
   905  		return true
   906  	case OpConcatOddUint16x8:
   907  		v.Op = OpARM64VUZP28H
   908  		return true
   909  	case OpConcatOddUint32x4:
   910  		v.Op = OpARM64VUZP24S
   911  		return true
   912  	case OpConcatOddUint64x2:
   913  		v.Op = OpARM64VUZP22D
   914  		return true
   915  	case OpConcatOddUint8x16:
   916  		v.Op = OpARM64VUZP216B
   917  		return true
   918  	case OpConcatShiftBytesRightUint8x16:
   919  		v.Op = OpARM64VEXT16B
   920  		return true
   921  	case OpCondSelect:
   922  		return rewriteValueARM64_OpCondSelect(v)
   923  	case OpConst16:
   924  		return rewriteValueARM64_OpConst16(v)
   925  	case OpConst32:
   926  		return rewriteValueARM64_OpConst32(v)
   927  	case OpConst32F:
   928  		return rewriteValueARM64_OpConst32F(v)
   929  	case OpConst64:
   930  		return rewriteValueARM64_OpConst64(v)
   931  	case OpConst64F:
   932  		return rewriteValueARM64_OpConst64F(v)
   933  	case OpConst8:
   934  		return rewriteValueARM64_OpConst8(v)
   935  	case OpConstBool:
   936  		return rewriteValueARM64_OpConstBool(v)
   937  	case OpConstNil:
   938  		return rewriteValueARM64_OpConstNil(v)
   939  	case OpConvertLo2ToFloat64Float32x4:
   940  		v.Op = OpARM64VFCVTL4S
   941  		return true
   942  	case OpConvertToFloat32Float64x2:
   943  		v.Op = OpARM64VFCVTN2D
   944  		return true
   945  	case OpConvertToFloat32Int32x4:
   946  		v.Op = OpARM64VSCVTF4S
   947  		return true
   948  	case OpConvertToFloat32Uint32x4:
   949  		v.Op = OpARM64VUCVTF4S
   950  		return true
   951  	case OpConvertToFloat64Int64x2:
   952  		v.Op = OpARM64VSCVTF2D
   953  		return true
   954  	case OpConvertToFloat64Uint64x2:
   955  		v.Op = OpARM64VUCVTF2D
   956  		return true
   957  	case OpConvertToInt32Float32x4:
   958  		v.Op = OpARM64VFCVTZS4S
   959  		return true
   960  	case OpConvertToInt64Float64x2:
   961  		v.Op = OpARM64VFCVTZS2D
   962  		return true
   963  	case OpConvertToUint32Float32x4:
   964  		v.Op = OpARM64VFCVTZU4S
   965  		return true
   966  	case OpConvertToUint64Float64x2:
   967  		v.Op = OpARM64VFCVTZU2D
   968  		return true
   969  	case OpCtz16:
   970  		return rewriteValueARM64_OpCtz16(v)
   971  	case OpCtz16NonZero:
   972  		v.Op = OpCtz32
   973  		return true
   974  	case OpCtz32:
   975  		return rewriteValueARM64_OpCtz32(v)
   976  	case OpCtz32NonZero:
   977  		v.Op = OpCtz32
   978  		return true
   979  	case OpCtz64:
   980  		return rewriteValueARM64_OpCtz64(v)
   981  	case OpCtz64NonZero:
   982  		v.Op = OpCtz64
   983  		return true
   984  	case OpCtz8:
   985  		return rewriteValueARM64_OpCtz8(v)
   986  	case OpCtz8NonZero:
   987  		v.Op = OpCtz32
   988  		return true
   989  	case OpCvt32Fto32:
   990  		v.Op = OpARM64FCVTZSSW
   991  		return true
   992  	case OpCvt32Fto32U:
   993  		v.Op = OpARM64FCVTZUSW
   994  		return true
   995  	case OpCvt32Fto64:
   996  		v.Op = OpARM64FCVTZSS
   997  		return true
   998  	case OpCvt32Fto64F:
   999  		v.Op = OpARM64FCVTSD
  1000  		return true
  1001  	case OpCvt32Fto64U:
  1002  		v.Op = OpARM64FCVTZUS
  1003  		return true
  1004  	case OpCvt32Uto32F:
  1005  		v.Op = OpARM64UCVTFWS
  1006  		return true
  1007  	case OpCvt32Uto64F:
  1008  		v.Op = OpARM64UCVTFWD
  1009  		return true
  1010  	case OpCvt32to32F:
  1011  		v.Op = OpARM64SCVTFWS
  1012  		return true
  1013  	case OpCvt32to64F:
  1014  		v.Op = OpARM64SCVTFWD
  1015  		return true
  1016  	case OpCvt64Fto32:
  1017  		v.Op = OpARM64FCVTZSDW
  1018  		return true
  1019  	case OpCvt64Fto32F:
  1020  		v.Op = OpARM64FCVTDS
  1021  		return true
  1022  	case OpCvt64Fto32U:
  1023  		v.Op = OpARM64FCVTZUDW
  1024  		return true
  1025  	case OpCvt64Fto64:
  1026  		v.Op = OpARM64FCVTZSD
  1027  		return true
  1028  	case OpCvt64Fto64U:
  1029  		v.Op = OpARM64FCVTZUD
  1030  		return true
  1031  	case OpCvt64Uto32F:
  1032  		v.Op = OpARM64UCVTFS
  1033  		return true
  1034  	case OpCvt64Uto64F:
  1035  		v.Op = OpARM64UCVTFD
  1036  		return true
  1037  	case OpCvt64to32F:
  1038  		v.Op = OpARM64SCVTFS
  1039  		return true
  1040  	case OpCvt64to64F:
  1041  		v.Op = OpARM64SCVTFD
  1042  		return true
  1043  	case OpCvtBoolToUint8:
  1044  		v.Op = OpCopy
  1045  		return true
  1046  	case OpDiv16:
  1047  		return rewriteValueARM64_OpDiv16(v)
  1048  	case OpDiv16u:
  1049  		return rewriteValueARM64_OpDiv16u(v)
  1050  	case OpDiv32:
  1051  		return rewriteValueARM64_OpDiv32(v)
  1052  	case OpDiv32F:
  1053  		v.Op = OpARM64FDIVS
  1054  		return true
  1055  	case OpDiv32u:
  1056  		v.Op = OpARM64UDIVW
  1057  		return true
  1058  	case OpDiv64:
  1059  		return rewriteValueARM64_OpDiv64(v)
  1060  	case OpDiv64F:
  1061  		v.Op = OpARM64FDIVD
  1062  		return true
  1063  	case OpDiv64u:
  1064  		v.Op = OpARM64UDIV
  1065  		return true
  1066  	case OpDiv8:
  1067  		return rewriteValueARM64_OpDiv8(v)
  1068  	case OpDiv8u:
  1069  		return rewriteValueARM64_OpDiv8u(v)
  1070  	case OpDivFloat32x4:
  1071  		v.Op = OpARM64VFDIV4S
  1072  		return true
  1073  	case OpDivFloat64x2:
  1074  		v.Op = OpARM64VFDIV2D
  1075  		return true
  1076  	case OpEq16:
  1077  		return rewriteValueARM64_OpEq16(v)
  1078  	case OpEq32:
  1079  		return rewriteValueARM64_OpEq32(v)
  1080  	case OpEq32F:
  1081  		return rewriteValueARM64_OpEq32F(v)
  1082  	case OpEq64:
  1083  		return rewriteValueARM64_OpEq64(v)
  1084  	case OpEq64F:
  1085  		return rewriteValueARM64_OpEq64F(v)
  1086  	case OpEq8:
  1087  		return rewriteValueARM64_OpEq8(v)
  1088  	case OpEqB:
  1089  		return rewriteValueARM64_OpEqB(v)
  1090  	case OpEqPtr:
  1091  		return rewriteValueARM64_OpEqPtr(v)
  1092  	case OpEqualFloat32x4:
  1093  		v.Op = OpARM64VFCMEQ4S
  1094  		return true
  1095  	case OpEqualFloat64x2:
  1096  		v.Op = OpARM64VFCMEQ2D
  1097  		return true
  1098  	case OpEqualInt16x8:
  1099  		v.Op = OpARM64VCMEQ8H
  1100  		return true
  1101  	case OpEqualInt32x4:
  1102  		v.Op = OpARM64VCMEQ4S
  1103  		return true
  1104  	case OpEqualInt64x2:
  1105  		v.Op = OpARM64VCMEQ2D
  1106  		return true
  1107  	case OpEqualInt8x16:
  1108  		v.Op = OpARM64VCMEQ16B
  1109  		return true
  1110  	case OpEqualUint16x8:
  1111  		v.Op = OpARM64VCMEQ8H
  1112  		return true
  1113  	case OpEqualUint32x4:
  1114  		v.Op = OpARM64VCMEQ4S
  1115  		return true
  1116  	case OpEqualUint64x2:
  1117  		v.Op = OpARM64VCMEQ2D
  1118  		return true
  1119  	case OpEqualUint8x16:
  1120  		v.Op = OpARM64VCMEQ16B
  1121  		return true
  1122  	case OpExtendLo2ToInt64Int32x4:
  1123  		v.Op = OpARM64VSXTL4S
  1124  		return true
  1125  	case OpExtendLo2ToUint64Uint32x4:
  1126  		v.Op = OpARM64VUXTL4S
  1127  		return true
  1128  	case OpExtendLo4ToInt32Int16x8:
  1129  		v.Op = OpARM64VSXTL8H
  1130  		return true
  1131  	case OpExtendLo4ToUint32Uint16x8:
  1132  		v.Op = OpARM64VUXTL8H
  1133  		return true
  1134  	case OpExtendLo8ToInt16Int8x16:
  1135  		v.Op = OpARM64VSXTL16B
  1136  		return true
  1137  	case OpExtendLo8ToUint16Uint8x16:
  1138  		v.Op = OpARM64VUXTL16B
  1139  		return true
  1140  	case OpFMA:
  1141  		return rewriteValueARM64_OpFMA(v)
  1142  	case OpFloor:
  1143  		v.Op = OpARM64FRINTMD
  1144  		return true
  1145  	case OpFloorFloat32x4:
  1146  		v.Op = OpARM64VFRINTM4S
  1147  		return true
  1148  	case OpFloorFloat64x2:
  1149  		v.Op = OpARM64VFRINTM2D
  1150  		return true
  1151  	case OpGetCallerPC:
  1152  		v.Op = OpARM64LoweredGetCallerPC
  1153  		return true
  1154  	case OpGetCallerSP:
  1155  		v.Op = OpARM64LoweredGetCallerSP
  1156  		return true
  1157  	case OpGetClosurePtr:
  1158  		v.Op = OpARM64LoweredGetClosurePtr
  1159  		return true
  1160  	case OpGetElemFloat32x4:
  1161  		v.Op = OpARM64VDUPSextr
  1162  		return true
  1163  	case OpGetElemFloat64x2:
  1164  		v.Op = OpARM64VDUPDextr
  1165  		return true
  1166  	case OpGetElemInt16x8:
  1167  		v.Op = OpARM64VMOVHextr
  1168  		return true
  1169  	case OpGetElemInt32x4:
  1170  		v.Op = OpARM64VMOVSextr
  1171  		return true
  1172  	case OpGetElemInt64x2:
  1173  		v.Op = OpARM64VMOVDextr
  1174  		return true
  1175  	case OpGetElemInt8x16:
  1176  		v.Op = OpARM64VMOVBextr
  1177  		return true
  1178  	case OpGetElemUint16x8:
  1179  		v.Op = OpARM64VMOVHextr
  1180  		return true
  1181  	case OpGetElemUint32x4:
  1182  		v.Op = OpARM64VMOVSextr
  1183  		return true
  1184  	case OpGetElemUint64x2:
  1185  		v.Op = OpARM64VMOVDextr
  1186  		return true
  1187  	case OpGetElemUint8x16:
  1188  		v.Op = OpARM64VMOVBextr
  1189  		return true
  1190  	case OpGreaterEqualFloat32x4:
  1191  		v.Op = OpARM64VFCMGE4S
  1192  		return true
  1193  	case OpGreaterEqualFloat64x2:
  1194  		v.Op = OpARM64VFCMGE2D
  1195  		return true
  1196  	case OpGreaterEqualInt16x8:
  1197  		v.Op = OpARM64VCMGE8H
  1198  		return true
  1199  	case OpGreaterEqualInt32x4:
  1200  		v.Op = OpARM64VCMGE4S
  1201  		return true
  1202  	case OpGreaterEqualInt64x2:
  1203  		v.Op = OpARM64VCMGE2D
  1204  		return true
  1205  	case OpGreaterEqualInt8x16:
  1206  		v.Op = OpARM64VCMGE16B
  1207  		return true
  1208  	case OpGreaterEqualUint16x8:
  1209  		v.Op = OpARM64VCMHS8H
  1210  		return true
  1211  	case OpGreaterEqualUint32x4:
  1212  		v.Op = OpARM64VCMHS4S
  1213  		return true
  1214  	case OpGreaterEqualUint64x2:
  1215  		v.Op = OpARM64VCMHS2D
  1216  		return true
  1217  	case OpGreaterEqualUint8x16:
  1218  		v.Op = OpARM64VCMHS16B
  1219  		return true
  1220  	case OpGreaterFloat32x4:
  1221  		v.Op = OpARM64VFCMGT4S
  1222  		return true
  1223  	case OpGreaterFloat64x2:
  1224  		v.Op = OpARM64VFCMGT2D
  1225  		return true
  1226  	case OpGreaterInt16x8:
  1227  		v.Op = OpARM64VCMGT8H
  1228  		return true
  1229  	case OpGreaterInt32x4:
  1230  		v.Op = OpARM64VCMGT4S
  1231  		return true
  1232  	case OpGreaterInt64x2:
  1233  		v.Op = OpARM64VCMGT2D
  1234  		return true
  1235  	case OpGreaterInt8x16:
  1236  		v.Op = OpARM64VCMGT16B
  1237  		return true
  1238  	case OpGreaterUint16x8:
  1239  		v.Op = OpARM64VCMHI8H
  1240  		return true
  1241  	case OpGreaterUint32x4:
  1242  		v.Op = OpARM64VCMHI4S
  1243  		return true
  1244  	case OpGreaterUint64x2:
  1245  		v.Op = OpARM64VCMHI2D
  1246  		return true
  1247  	case OpGreaterUint8x16:
  1248  		v.Op = OpARM64VCMHI16B
  1249  		return true
  1250  	case OpHmul32:
  1251  		return rewriteValueARM64_OpHmul32(v)
  1252  	case OpHmul32u:
  1253  		return rewriteValueARM64_OpHmul32u(v)
  1254  	case OpHmul64:
  1255  		v.Op = OpARM64MULH
  1256  		return true
  1257  	case OpHmul64u:
  1258  		v.Op = OpARM64UMULH
  1259  		return true
  1260  	case OpInterCall:
  1261  		v.Op = OpARM64CALLinter
  1262  		return true
  1263  	case OpInterleaveEvenInt16x8:
  1264  		v.Op = OpARM64VTRN18H
  1265  		return true
  1266  	case OpInterleaveEvenInt32x4:
  1267  		v.Op = OpARM64VTRN14S
  1268  		return true
  1269  	case OpInterleaveEvenInt64x2:
  1270  		v.Op = OpARM64VTRN12D
  1271  		return true
  1272  	case OpInterleaveEvenInt8x16:
  1273  		v.Op = OpARM64VTRN116B
  1274  		return true
  1275  	case OpInterleaveEvenUint16x8:
  1276  		v.Op = OpARM64VTRN18H
  1277  		return true
  1278  	case OpInterleaveEvenUint32x4:
  1279  		v.Op = OpARM64VTRN14S
  1280  		return true
  1281  	case OpInterleaveEvenUint64x2:
  1282  		v.Op = OpARM64VTRN12D
  1283  		return true
  1284  	case OpInterleaveEvenUint8x16:
  1285  		v.Op = OpARM64VTRN116B
  1286  		return true
  1287  	case OpInterleaveHiInt16x8:
  1288  		v.Op = OpARM64VZIP28H
  1289  		return true
  1290  	case OpInterleaveHiInt32x4:
  1291  		v.Op = OpARM64VZIP24S
  1292  		return true
  1293  	case OpInterleaveHiInt64x2:
  1294  		v.Op = OpARM64VZIP22D
  1295  		return true
  1296  	case OpInterleaveHiInt8x16:
  1297  		v.Op = OpARM64VZIP216B
  1298  		return true
  1299  	case OpInterleaveHiUint16x8:
  1300  		v.Op = OpARM64VZIP28H
  1301  		return true
  1302  	case OpInterleaveHiUint32x4:
  1303  		v.Op = OpARM64VZIP24S
  1304  		return true
  1305  	case OpInterleaveHiUint64x2:
  1306  		v.Op = OpARM64VZIP22D
  1307  		return true
  1308  	case OpInterleaveHiUint8x16:
  1309  		v.Op = OpARM64VZIP216B
  1310  		return true
  1311  	case OpInterleaveLoInt16x8:
  1312  		v.Op = OpARM64VZIP18H
  1313  		return true
  1314  	case OpInterleaveLoInt32x4:
  1315  		v.Op = OpARM64VZIP14S
  1316  		return true
  1317  	case OpInterleaveLoInt64x2:
  1318  		v.Op = OpARM64VZIP12D
  1319  		return true
  1320  	case OpInterleaveLoInt8x16:
  1321  		v.Op = OpARM64VZIP116B
  1322  		return true
  1323  	case OpInterleaveLoUint16x8:
  1324  		v.Op = OpARM64VZIP18H
  1325  		return true
  1326  	case OpInterleaveLoUint32x4:
  1327  		v.Op = OpARM64VZIP14S
  1328  		return true
  1329  	case OpInterleaveLoUint64x2:
  1330  		v.Op = OpARM64VZIP12D
  1331  		return true
  1332  	case OpInterleaveLoUint8x16:
  1333  		v.Op = OpARM64VZIP116B
  1334  		return true
  1335  	case OpInterleaveOddInt16x8:
  1336  		v.Op = OpARM64VTRN28H
  1337  		return true
  1338  	case OpInterleaveOddInt32x4:
  1339  		v.Op = OpARM64VTRN24S
  1340  		return true
  1341  	case OpInterleaveOddInt64x2:
  1342  		v.Op = OpARM64VTRN22D
  1343  		return true
  1344  	case OpInterleaveOddInt8x16:
  1345  		v.Op = OpARM64VTRN216B
  1346  		return true
  1347  	case OpInterleaveOddUint16x8:
  1348  		v.Op = OpARM64VTRN28H
  1349  		return true
  1350  	case OpInterleaveOddUint32x4:
  1351  		v.Op = OpARM64VTRN24S
  1352  		return true
  1353  	case OpInterleaveOddUint64x2:
  1354  		v.Op = OpARM64VTRN22D
  1355  		return true
  1356  	case OpInterleaveOddUint8x16:
  1357  		v.Op = OpARM64VTRN216B
  1358  		return true
  1359  	case OpIsInBounds:
  1360  		return rewriteValueARM64_OpIsInBounds(v)
  1361  	case OpIsNonNil:
  1362  		return rewriteValueARM64_OpIsNonNil(v)
  1363  	case OpIsSliceInBounds:
  1364  		return rewriteValueARM64_OpIsSliceInBounds(v)
  1365  	case OpLeadingSignBitsInt16x8:
  1366  		v.Op = OpARM64VCLS8H
  1367  		return true
  1368  	case OpLeadingSignBitsInt32x4:
  1369  		v.Op = OpARM64VCLS4S
  1370  		return true
  1371  	case OpLeadingSignBitsInt8x16:
  1372  		v.Op = OpARM64VCLS16B
  1373  		return true
  1374  	case OpLeadingSignBitsUint16x8:
  1375  		v.Op = OpARM64VCLS8H
  1376  		return true
  1377  	case OpLeadingSignBitsUint32x4:
  1378  		v.Op = OpARM64VCLS4S
  1379  		return true
  1380  	case OpLeadingSignBitsUint8x16:
  1381  		v.Op = OpARM64VCLS16B
  1382  		return true
  1383  	case OpLeadingZerosInt16x8:
  1384  		v.Op = OpARM64VCLZ8H
  1385  		return true
  1386  	case OpLeadingZerosInt32x4:
  1387  		v.Op = OpARM64VCLZ4S
  1388  		return true
  1389  	case OpLeadingZerosInt8x16:
  1390  		v.Op = OpARM64VCLZ16B
  1391  		return true
  1392  	case OpLeadingZerosUint16x8:
  1393  		v.Op = OpARM64VCLZ8H
  1394  		return true
  1395  	case OpLeadingZerosUint32x4:
  1396  		v.Op = OpARM64VCLZ4S
  1397  		return true
  1398  	case OpLeadingZerosUint8x16:
  1399  		v.Op = OpARM64VCLZ16B
  1400  		return true
  1401  	case OpLeq16:
  1402  		return rewriteValueARM64_OpLeq16(v)
  1403  	case OpLeq16U:
  1404  		return rewriteValueARM64_OpLeq16U(v)
  1405  	case OpLeq32:
  1406  		return rewriteValueARM64_OpLeq32(v)
  1407  	case OpLeq32F:
  1408  		return rewriteValueARM64_OpLeq32F(v)
  1409  	case OpLeq32U:
  1410  		return rewriteValueARM64_OpLeq32U(v)
  1411  	case OpLeq64:
  1412  		return rewriteValueARM64_OpLeq64(v)
  1413  	case OpLeq64F:
  1414  		return rewriteValueARM64_OpLeq64F(v)
  1415  	case OpLeq64U:
  1416  		return rewriteValueARM64_OpLeq64U(v)
  1417  	case OpLeq8:
  1418  		return rewriteValueARM64_OpLeq8(v)
  1419  	case OpLeq8U:
  1420  		return rewriteValueARM64_OpLeq8U(v)
  1421  	case OpLess16:
  1422  		return rewriteValueARM64_OpLess16(v)
  1423  	case OpLess16U:
  1424  		return rewriteValueARM64_OpLess16U(v)
  1425  	case OpLess32:
  1426  		return rewriteValueARM64_OpLess32(v)
  1427  	case OpLess32F:
  1428  		return rewriteValueARM64_OpLess32F(v)
  1429  	case OpLess32U:
  1430  		return rewriteValueARM64_OpLess32U(v)
  1431  	case OpLess64:
  1432  		return rewriteValueARM64_OpLess64(v)
  1433  	case OpLess64F:
  1434  		return rewriteValueARM64_OpLess64F(v)
  1435  	case OpLess64U:
  1436  		return rewriteValueARM64_OpLess64U(v)
  1437  	case OpLess8:
  1438  		return rewriteValueARM64_OpLess8(v)
  1439  	case OpLess8U:
  1440  		return rewriteValueARM64_OpLess8U(v)
  1441  	case OpLoad:
  1442  		return rewriteValueARM64_OpLoad(v)
  1443  	case OpLocalAddr:
  1444  		return rewriteValueARM64_OpLocalAddr(v)
  1445  	case OpLookupOrZeroInt8x16:
  1446  		v.Op = OpARM64VTBL16B
  1447  		return true
  1448  	case OpLookupOrZeroUint8x16:
  1449  		v.Op = OpARM64VTBL16B
  1450  		return true
  1451  	case OpLsh16x16:
  1452  		v.Op = OpLsh64x16
  1453  		return true
  1454  	case OpLsh16x32:
  1455  		v.Op = OpLsh64x32
  1456  		return true
  1457  	case OpLsh16x64:
  1458  		v.Op = OpLsh64x64
  1459  		return true
  1460  	case OpLsh16x8:
  1461  		v.Op = OpLsh64x8
  1462  		return true
  1463  	case OpLsh32x16:
  1464  		v.Op = OpLsh64x16
  1465  		return true
  1466  	case OpLsh32x32:
  1467  		v.Op = OpLsh64x32
  1468  		return true
  1469  	case OpLsh32x64:
  1470  		v.Op = OpLsh64x64
  1471  		return true
  1472  	case OpLsh32x8:
  1473  		v.Op = OpLsh64x8
  1474  		return true
  1475  	case OpLsh64x16:
  1476  		return rewriteValueARM64_OpLsh64x16(v)
  1477  	case OpLsh64x32:
  1478  		return rewriteValueARM64_OpLsh64x32(v)
  1479  	case OpLsh64x64:
  1480  		return rewriteValueARM64_OpLsh64x64(v)
  1481  	case OpLsh64x8:
  1482  		return rewriteValueARM64_OpLsh64x8(v)
  1483  	case OpLsh8x16:
  1484  		v.Op = OpLsh64x16
  1485  		return true
  1486  	case OpLsh8x32:
  1487  		v.Op = OpLsh64x32
  1488  		return true
  1489  	case OpLsh8x64:
  1490  		v.Op = OpLsh64x64
  1491  		return true
  1492  	case OpLsh8x8:
  1493  		v.Op = OpLsh64x8
  1494  		return true
  1495  	case OpMax32F:
  1496  		v.Op = OpARM64FMAXS
  1497  		return true
  1498  	case OpMax64F:
  1499  		v.Op = OpARM64FMAXD
  1500  		return true
  1501  	case OpMaxFloat32x4:
  1502  		v.Op = OpARM64VFMAX4S
  1503  		return true
  1504  	case OpMaxFloat64x2:
  1505  		v.Op = OpARM64VFMAX2D
  1506  		return true
  1507  	case OpMaxInt16x8:
  1508  		v.Op = OpARM64VSMAX8H
  1509  		return true
  1510  	case OpMaxInt32x4:
  1511  		v.Op = OpARM64VSMAX4S
  1512  		return true
  1513  	case OpMaxInt8x16:
  1514  		v.Op = OpARM64VSMAX16B
  1515  		return true
  1516  	case OpMaxUint16x8:
  1517  		v.Op = OpARM64VUMAX8H
  1518  		return true
  1519  	case OpMaxUint32x4:
  1520  		v.Op = OpARM64VUMAX4S
  1521  		return true
  1522  	case OpMaxUint8x16:
  1523  		v.Op = OpARM64VUMAX16B
  1524  		return true
  1525  	case OpMemEq:
  1526  		v.Op = OpARM64LoweredMemEq
  1527  		return true
  1528  	case OpMin32F:
  1529  		v.Op = OpARM64FMINS
  1530  		return true
  1531  	case OpMin64F:
  1532  		v.Op = OpARM64FMIND
  1533  		return true
  1534  	case OpMinFloat32x4:
  1535  		v.Op = OpARM64VFMIN4S
  1536  		return true
  1537  	case OpMinFloat64x2:
  1538  		v.Op = OpARM64VFMIN2D
  1539  		return true
  1540  	case OpMinInt16x8:
  1541  		v.Op = OpARM64VSMIN8H
  1542  		return true
  1543  	case OpMinInt32x4:
  1544  		v.Op = OpARM64VSMIN4S
  1545  		return true
  1546  	case OpMinInt8x16:
  1547  		v.Op = OpARM64VSMIN16B
  1548  		return true
  1549  	case OpMinUint16x8:
  1550  		v.Op = OpARM64VUMIN8H
  1551  		return true
  1552  	case OpMinUint32x4:
  1553  		v.Op = OpARM64VUMIN4S
  1554  		return true
  1555  	case OpMinUint8x16:
  1556  		v.Op = OpARM64VUMIN16B
  1557  		return true
  1558  	case OpMod16:
  1559  		return rewriteValueARM64_OpMod16(v)
  1560  	case OpMod16u:
  1561  		return rewriteValueARM64_OpMod16u(v)
  1562  	case OpMod32:
  1563  		return rewriteValueARM64_OpMod32(v)
  1564  	case OpMod32u:
  1565  		v.Op = OpARM64UMODW
  1566  		return true
  1567  	case OpMod64:
  1568  		return rewriteValueARM64_OpMod64(v)
  1569  	case OpMod64u:
  1570  		v.Op = OpARM64UMOD
  1571  		return true
  1572  	case OpMod8:
  1573  		return rewriteValueARM64_OpMod8(v)
  1574  	case OpMod8u:
  1575  		return rewriteValueARM64_OpMod8u(v)
  1576  	case OpMove:
  1577  		return rewriteValueARM64_OpMove(v)
  1578  	case OpMul16:
  1579  		v.Op = OpARM64MULW
  1580  		return true
  1581  	case OpMul32:
  1582  		v.Op = OpARM64MULW
  1583  		return true
  1584  	case OpMul32F:
  1585  		v.Op = OpARM64FMULS
  1586  		return true
  1587  	case OpMul64:
  1588  		v.Op = OpARM64MUL
  1589  		return true
  1590  	case OpMul64F:
  1591  		v.Op = OpARM64FMULD
  1592  		return true
  1593  	case OpMul8:
  1594  		v.Op = OpARM64MULW
  1595  		return true
  1596  	case OpMulAddFloat32x4:
  1597  		return rewriteValueARM64_OpMulAddFloat32x4(v)
  1598  	case OpMulAddFloat64x2:
  1599  		return rewriteValueARM64_OpMulAddFloat64x2(v)
  1600  	case OpMulAddInt16x8:
  1601  		return rewriteValueARM64_OpMulAddInt16x8(v)
  1602  	case OpMulAddInt32x4:
  1603  		return rewriteValueARM64_OpMulAddInt32x4(v)
  1604  	case OpMulAddInt8x16:
  1605  		return rewriteValueARM64_OpMulAddInt8x16(v)
  1606  	case OpMulAddUint16x8:
  1607  		return rewriteValueARM64_OpMulAddUint16x8(v)
  1608  	case OpMulAddUint32x4:
  1609  		return rewriteValueARM64_OpMulAddUint32x4(v)
  1610  	case OpMulAddUint8x16:
  1611  		return rewriteValueARM64_OpMulAddUint8x16(v)
  1612  	case OpMulFloat32x4:
  1613  		v.Op = OpARM64VFMUL4S
  1614  		return true
  1615  	case OpMulFloat64x2:
  1616  		v.Op = OpARM64VFMUL2D
  1617  		return true
  1618  	case OpMulInt16x8:
  1619  		v.Op = OpARM64VMUL8H
  1620  		return true
  1621  	case OpMulInt32x4:
  1622  		v.Op = OpARM64VMUL4S
  1623  		return true
  1624  	case OpMulInt8x16:
  1625  		v.Op = OpARM64VMUL16B
  1626  		return true
  1627  	case OpMulUint16x8:
  1628  		v.Op = OpARM64VMUL8H
  1629  		return true
  1630  	case OpMulUint32x4:
  1631  		v.Op = OpARM64VMUL4S
  1632  		return true
  1633  	case OpMulUint8x16:
  1634  		v.Op = OpARM64VMUL16B
  1635  		return true
  1636  	case OpMulWidenLoInt16x8:
  1637  		v.Op = OpARM64VSMULL8H
  1638  		return true
  1639  	case OpMulWidenLoInt32x4:
  1640  		v.Op = OpARM64VSMULL4S
  1641  		return true
  1642  	case OpMulWidenLoInt8x16:
  1643  		v.Op = OpARM64VSMULL16B
  1644  		return true
  1645  	case OpMulWidenLoUint16x8:
  1646  		v.Op = OpARM64VUMULL8H
  1647  		return true
  1648  	case OpMulWidenLoUint32x4:
  1649  		v.Op = OpARM64VUMULL4S
  1650  		return true
  1651  	case OpMulWidenLoUint8x16:
  1652  		v.Op = OpARM64VUMULL16B
  1653  		return true
  1654  	case OpNeg16:
  1655  		v.Op = OpARM64NEG
  1656  		return true
  1657  	case OpNeg32:
  1658  		v.Op = OpARM64NEG
  1659  		return true
  1660  	case OpNeg32F:
  1661  		v.Op = OpARM64FNEGS
  1662  		return true
  1663  	case OpNeg64:
  1664  		v.Op = OpARM64NEG
  1665  		return true
  1666  	case OpNeg64F:
  1667  		v.Op = OpARM64FNEGD
  1668  		return true
  1669  	case OpNeg8:
  1670  		v.Op = OpARM64NEG
  1671  		return true
  1672  	case OpNegFloat32x4:
  1673  		v.Op = OpARM64VFNEG4S
  1674  		return true
  1675  	case OpNegFloat64x2:
  1676  		v.Op = OpARM64VFNEG2D
  1677  		return true
  1678  	case OpNegInt16x8:
  1679  		v.Op = OpARM64VNEG8H
  1680  		return true
  1681  	case OpNegInt32x4:
  1682  		v.Op = OpARM64VNEG4S
  1683  		return true
  1684  	case OpNegInt64x2:
  1685  		v.Op = OpARM64VNEG2D
  1686  		return true
  1687  	case OpNegInt8x16:
  1688  		v.Op = OpARM64VNEG16B
  1689  		return true
  1690  	case OpNeq16:
  1691  		return rewriteValueARM64_OpNeq16(v)
  1692  	case OpNeq32:
  1693  		return rewriteValueARM64_OpNeq32(v)
  1694  	case OpNeq32F:
  1695  		return rewriteValueARM64_OpNeq32F(v)
  1696  	case OpNeq64:
  1697  		return rewriteValueARM64_OpNeq64(v)
  1698  	case OpNeq64F:
  1699  		return rewriteValueARM64_OpNeq64F(v)
  1700  	case OpNeq8:
  1701  		return rewriteValueARM64_OpNeq8(v)
  1702  	case OpNeqB:
  1703  		v.Op = OpARM64XOR
  1704  		return true
  1705  	case OpNeqPtr:
  1706  		return rewriteValueARM64_OpNeqPtr(v)
  1707  	case OpNilCheck:
  1708  		v.Op = OpARM64LoweredNilCheck
  1709  		return true
  1710  	case OpNot:
  1711  		return rewriteValueARM64_OpNot(v)
  1712  	case OpNotInt16x8:
  1713  		v.Op = OpARM64VNOT16B
  1714  		return true
  1715  	case OpNotInt32x4:
  1716  		v.Op = OpARM64VNOT16B
  1717  		return true
  1718  	case OpNotInt64x2:
  1719  		v.Op = OpARM64VNOT16B
  1720  		return true
  1721  	case OpNotInt8x16:
  1722  		v.Op = OpARM64VNOT16B
  1723  		return true
  1724  	case OpNotUint16x8:
  1725  		v.Op = OpARM64VNOT16B
  1726  		return true
  1727  	case OpNotUint32x4:
  1728  		v.Op = OpARM64VNOT16B
  1729  		return true
  1730  	case OpNotUint64x2:
  1731  		v.Op = OpARM64VNOT16B
  1732  		return true
  1733  	case OpNotUint8x16:
  1734  		v.Op = OpARM64VNOT16B
  1735  		return true
  1736  	case OpOffPtr:
  1737  		return rewriteValueARM64_OpOffPtr(v)
  1738  	case OpOnesCountInt8x16:
  1739  		v.Op = OpARM64VCNT16B
  1740  		return true
  1741  	case OpOnesCountUint8x16:
  1742  		v.Op = OpARM64VCNT16B
  1743  		return true
  1744  	case OpOr16:
  1745  		v.Op = OpARM64OR
  1746  		return true
  1747  	case OpOr32:
  1748  		v.Op = OpARM64OR
  1749  		return true
  1750  	case OpOr64:
  1751  		v.Op = OpARM64OR
  1752  		return true
  1753  	case OpOr8:
  1754  		v.Op = OpARM64OR
  1755  		return true
  1756  	case OpOrB:
  1757  		v.Op = OpARM64OR
  1758  		return true
  1759  	case OpOrInt16x8:
  1760  		v.Op = OpARM64VORR16B
  1761  		return true
  1762  	case OpOrInt32x4:
  1763  		v.Op = OpARM64VORR16B
  1764  		return true
  1765  	case OpOrInt64x2:
  1766  		v.Op = OpARM64VORR16B
  1767  		return true
  1768  	case OpOrInt8x16:
  1769  		v.Op = OpARM64VORR16B
  1770  		return true
  1771  	case OpOrNotInt16x8:
  1772  		v.Op = OpARM64VORN16B
  1773  		return true
  1774  	case OpOrNotInt32x4:
  1775  		v.Op = OpARM64VORN16B
  1776  		return true
  1777  	case OpOrNotInt64x2:
  1778  		v.Op = OpARM64VORN16B
  1779  		return true
  1780  	case OpOrNotInt8x16:
  1781  		v.Op = OpARM64VORN16B
  1782  		return true
  1783  	case OpOrNotUint16x8:
  1784  		v.Op = OpARM64VORN16B
  1785  		return true
  1786  	case OpOrNotUint32x4:
  1787  		v.Op = OpARM64VORN16B
  1788  		return true
  1789  	case OpOrNotUint64x2:
  1790  		v.Op = OpARM64VORN16B
  1791  		return true
  1792  	case OpOrNotUint8x16:
  1793  		v.Op = OpARM64VORN16B
  1794  		return true
  1795  	case OpOrUint16x8:
  1796  		v.Op = OpARM64VORR16B
  1797  		return true
  1798  	case OpOrUint32x4:
  1799  		v.Op = OpARM64VORR16B
  1800  		return true
  1801  	case OpOrUint64x2:
  1802  		v.Op = OpARM64VORR16B
  1803  		return true
  1804  	case OpOrUint8x16:
  1805  		v.Op = OpARM64VORR16B
  1806  		return true
  1807  	case OpPanicBounds:
  1808  		v.Op = OpARM64LoweredPanicBoundsRR
  1809  		return true
  1810  	case OpPopCount16:
  1811  		return rewriteValueARM64_OpPopCount16(v)
  1812  	case OpPopCount32:
  1813  		return rewriteValueARM64_OpPopCount32(v)
  1814  	case OpPopCount64:
  1815  		return rewriteValueARM64_OpPopCount64(v)
  1816  	case OpPrefetchCache:
  1817  		return rewriteValueARM64_OpPrefetchCache(v)
  1818  	case OpPrefetchCacheStreamed:
  1819  		return rewriteValueARM64_OpPrefetchCacheStreamed(v)
  1820  	case OpPubBarrier:
  1821  		return rewriteValueARM64_OpPubBarrier(v)
  1822  	case OpRotateLeft16:
  1823  		return rewriteValueARM64_OpRotateLeft16(v)
  1824  	case OpRotateLeft32:
  1825  		return rewriteValueARM64_OpRotateLeft32(v)
  1826  	case OpRotateLeft64:
  1827  		return rewriteValueARM64_OpRotateLeft64(v)
  1828  	case OpRotateLeft8:
  1829  		return rewriteValueARM64_OpRotateLeft8(v)
  1830  	case OpRound:
  1831  		v.Op = OpARM64FRINTAD
  1832  		return true
  1833  	case OpRound32F:
  1834  		v.Op = OpARM64LoweredRound32F
  1835  		return true
  1836  	case OpRound64F:
  1837  		v.Op = OpARM64LoweredRound64F
  1838  		return true
  1839  	case OpRoundFloat32x4:
  1840  		v.Op = OpARM64VFRINTN4S
  1841  		return true
  1842  	case OpRoundFloat64x2:
  1843  		v.Op = OpARM64VFRINTN2D
  1844  		return true
  1845  	case OpRoundToEven:
  1846  		v.Op = OpARM64FRINTND
  1847  		return true
  1848  	case OpRsh16Ux16:
  1849  		return rewriteValueARM64_OpRsh16Ux16(v)
  1850  	case OpRsh16Ux32:
  1851  		return rewriteValueARM64_OpRsh16Ux32(v)
  1852  	case OpRsh16Ux64:
  1853  		return rewriteValueARM64_OpRsh16Ux64(v)
  1854  	case OpRsh16Ux8:
  1855  		return rewriteValueARM64_OpRsh16Ux8(v)
  1856  	case OpRsh16x16:
  1857  		return rewriteValueARM64_OpRsh16x16(v)
  1858  	case OpRsh16x32:
  1859  		return rewriteValueARM64_OpRsh16x32(v)
  1860  	case OpRsh16x64:
  1861  		return rewriteValueARM64_OpRsh16x64(v)
  1862  	case OpRsh16x8:
  1863  		return rewriteValueARM64_OpRsh16x8(v)
  1864  	case OpRsh32Ux16:
  1865  		return rewriteValueARM64_OpRsh32Ux16(v)
  1866  	case OpRsh32Ux32:
  1867  		return rewriteValueARM64_OpRsh32Ux32(v)
  1868  	case OpRsh32Ux64:
  1869  		return rewriteValueARM64_OpRsh32Ux64(v)
  1870  	case OpRsh32Ux8:
  1871  		return rewriteValueARM64_OpRsh32Ux8(v)
  1872  	case OpRsh32x16:
  1873  		return rewriteValueARM64_OpRsh32x16(v)
  1874  	case OpRsh32x32:
  1875  		return rewriteValueARM64_OpRsh32x32(v)
  1876  	case OpRsh32x64:
  1877  		return rewriteValueARM64_OpRsh32x64(v)
  1878  	case OpRsh32x8:
  1879  		return rewriteValueARM64_OpRsh32x8(v)
  1880  	case OpRsh64Ux16:
  1881  		return rewriteValueARM64_OpRsh64Ux16(v)
  1882  	case OpRsh64Ux32:
  1883  		return rewriteValueARM64_OpRsh64Ux32(v)
  1884  	case OpRsh64Ux64:
  1885  		return rewriteValueARM64_OpRsh64Ux64(v)
  1886  	case OpRsh64Ux8:
  1887  		return rewriteValueARM64_OpRsh64Ux8(v)
  1888  	case OpRsh64x16:
  1889  		return rewriteValueARM64_OpRsh64x16(v)
  1890  	case OpRsh64x32:
  1891  		return rewriteValueARM64_OpRsh64x32(v)
  1892  	case OpRsh64x64:
  1893  		return rewriteValueARM64_OpRsh64x64(v)
  1894  	case OpRsh64x8:
  1895  		return rewriteValueARM64_OpRsh64x8(v)
  1896  	case OpRsh8Ux16:
  1897  		return rewriteValueARM64_OpRsh8Ux16(v)
  1898  	case OpRsh8Ux32:
  1899  		return rewriteValueARM64_OpRsh8Ux32(v)
  1900  	case OpRsh8Ux64:
  1901  		return rewriteValueARM64_OpRsh8Ux64(v)
  1902  	case OpRsh8Ux8:
  1903  		return rewriteValueARM64_OpRsh8Ux8(v)
  1904  	case OpRsh8x16:
  1905  		return rewriteValueARM64_OpRsh8x16(v)
  1906  	case OpRsh8x32:
  1907  		return rewriteValueARM64_OpRsh8x32(v)
  1908  	case OpRsh8x64:
  1909  		return rewriteValueARM64_OpRsh8x64(v)
  1910  	case OpRsh8x8:
  1911  		return rewriteValueARM64_OpRsh8x8(v)
  1912  	case OpSaturateToInt16Int32x4:
  1913  		v.Op = OpARM64VSQXTN4S
  1914  		return true
  1915  	case OpSaturateToInt32Int64x2:
  1916  		v.Op = OpARM64VSQXTN2D
  1917  		return true
  1918  	case OpSaturateToInt8Int16x8:
  1919  		v.Op = OpARM64VSQXTN8H
  1920  		return true
  1921  	case OpSaturateToUint16Int32x4:
  1922  		v.Op = OpARM64VSQXTUN4S
  1923  		return true
  1924  	case OpSaturateToUint16Uint32x4:
  1925  		v.Op = OpARM64VUQXTN4S
  1926  		return true
  1927  	case OpSaturateToUint32Int64x2:
  1928  		v.Op = OpARM64VSQXTUN2D
  1929  		return true
  1930  	case OpSaturateToUint32Uint64x2:
  1931  		v.Op = OpARM64VUQXTN2D
  1932  		return true
  1933  	case OpSaturateToUint8Int16x8:
  1934  		v.Op = OpARM64VSQXTUN8H
  1935  		return true
  1936  	case OpSaturateToUint8Uint16x8:
  1937  		v.Op = OpARM64VUQXTN8H
  1938  		return true
  1939  	case OpSelect0:
  1940  		return rewriteValueARM64_OpSelect0(v)
  1941  	case OpSelect1:
  1942  		return rewriteValueARM64_OpSelect1(v)
  1943  	case OpSelectN:
  1944  		return rewriteValueARM64_OpSelectN(v)
  1945  	case OpSetElemFloat32x4:
  1946  		v.Op = OpARM64VMOVSins0
  1947  		return true
  1948  	case OpSetElemFloat64x2:
  1949  		v.Op = OpARM64VMOVDins0
  1950  		return true
  1951  	case OpSetElemInt16x8:
  1952  		v.Op = OpARM64VMOVHins
  1953  		return true
  1954  	case OpSetElemInt32x4:
  1955  		v.Op = OpARM64VMOVSins
  1956  		return true
  1957  	case OpSetElemInt64x2:
  1958  		v.Op = OpARM64VMOVDins
  1959  		return true
  1960  	case OpSetElemInt8x16:
  1961  		v.Op = OpARM64VMOVBins
  1962  		return true
  1963  	case OpSetElemUint16x8:
  1964  		v.Op = OpARM64VMOVHins
  1965  		return true
  1966  	case OpSetElemUint32x4:
  1967  		v.Op = OpARM64VMOVSins
  1968  		return true
  1969  	case OpSetElemUint64x2:
  1970  		v.Op = OpARM64VMOVDins
  1971  		return true
  1972  	case OpSetElemUint8x16:
  1973  		v.Op = OpARM64VMOVBins
  1974  		return true
  1975  	case OpShiftAllLeftInt16x8:
  1976  		return rewriteValueARM64_OpShiftAllLeftInt16x8(v)
  1977  	case OpShiftAllLeftInt32x4:
  1978  		return rewriteValueARM64_OpShiftAllLeftInt32x4(v)
  1979  	case OpShiftAllLeftInt64x2:
  1980  		return rewriteValueARM64_OpShiftAllLeftInt64x2(v)
  1981  	case OpShiftAllLeftInt8x16:
  1982  		return rewriteValueARM64_OpShiftAllLeftInt8x16(v)
  1983  	case OpShiftAllLeftUint16x8:
  1984  		return rewriteValueARM64_OpShiftAllLeftUint16x8(v)
  1985  	case OpShiftAllLeftUint32x4:
  1986  		return rewriteValueARM64_OpShiftAllLeftUint32x4(v)
  1987  	case OpShiftAllLeftUint64x2:
  1988  		return rewriteValueARM64_OpShiftAllLeftUint64x2(v)
  1989  	case OpShiftAllLeftUint8x16:
  1990  		return rewriteValueARM64_OpShiftAllLeftUint8x16(v)
  1991  	case OpShiftAllRightInt16x8:
  1992  		return rewriteValueARM64_OpShiftAllRightInt16x8(v)
  1993  	case OpShiftAllRightInt32x4:
  1994  		return rewriteValueARM64_OpShiftAllRightInt32x4(v)
  1995  	case OpShiftAllRightInt64x2:
  1996  		return rewriteValueARM64_OpShiftAllRightInt64x2(v)
  1997  	case OpShiftAllRightInt8x16:
  1998  		return rewriteValueARM64_OpShiftAllRightInt8x16(v)
  1999  	case OpShiftAllRightUint16x8:
  2000  		return rewriteValueARM64_OpShiftAllRightUint16x8(v)
  2001  	case OpShiftAllRightUint32x4:
  2002  		return rewriteValueARM64_OpShiftAllRightUint32x4(v)
  2003  	case OpShiftAllRightUint64x2:
  2004  		return rewriteValueARM64_OpShiftAllRightUint64x2(v)
  2005  	case OpShiftAllRightUint8x16:
  2006  		return rewriteValueARM64_OpShiftAllRightUint8x16(v)
  2007  	case OpShiftInt16x8:
  2008  		v.Op = OpARM64VSSHL8H
  2009  		return true
  2010  	case OpShiftInt32x4:
  2011  		v.Op = OpARM64VSSHL4S
  2012  		return true
  2013  	case OpShiftInt64x2:
  2014  		v.Op = OpARM64VSSHL2D
  2015  		return true
  2016  	case OpShiftInt8x16:
  2017  		v.Op = OpARM64VSSHL16B
  2018  		return true
  2019  	case OpShiftSaturatedInt16x8:
  2020  		v.Op = OpARM64VSQSHL8H
  2021  		return true
  2022  	case OpShiftSaturatedInt32x4:
  2023  		v.Op = OpARM64VSQSHL4S
  2024  		return true
  2025  	case OpShiftSaturatedInt64x2:
  2026  		v.Op = OpARM64VSQSHL2D
  2027  		return true
  2028  	case OpShiftSaturatedInt8x16:
  2029  		v.Op = OpARM64VSQSHL16B
  2030  		return true
  2031  	case OpShiftSaturatedUint16x8:
  2032  		v.Op = OpARM64VUQSHL8H
  2033  		return true
  2034  	case OpShiftSaturatedUint32x4:
  2035  		v.Op = OpARM64VUQSHL4S
  2036  		return true
  2037  	case OpShiftSaturatedUint64x2:
  2038  		v.Op = OpARM64VUQSHL2D
  2039  		return true
  2040  	case OpShiftSaturatedUint8x16:
  2041  		v.Op = OpARM64VUQSHL16B
  2042  		return true
  2043  	case OpShiftUint16x8:
  2044  		v.Op = OpARM64VUSHL8H
  2045  		return true
  2046  	case OpShiftUint32x4:
  2047  		v.Op = OpARM64VUSHL4S
  2048  		return true
  2049  	case OpShiftUint64x2:
  2050  		v.Op = OpARM64VUSHL2D
  2051  		return true
  2052  	case OpShiftUint8x16:
  2053  		v.Op = OpARM64VUSHL16B
  2054  		return true
  2055  	case OpSignExt16to32:
  2056  		v.Op = OpARM64MOVHreg
  2057  		return true
  2058  	case OpSignExt16to64:
  2059  		v.Op = OpARM64MOVHreg
  2060  		return true
  2061  	case OpSignExt32to64:
  2062  		v.Op = OpARM64MOVWreg
  2063  		return true
  2064  	case OpSignExt8to16:
  2065  		v.Op = OpARM64MOVBreg
  2066  		return true
  2067  	case OpSignExt8to32:
  2068  		v.Op = OpARM64MOVBreg
  2069  		return true
  2070  	case OpSignExt8to64:
  2071  		v.Op = OpARM64MOVBreg
  2072  		return true
  2073  	case OpSlicemask:
  2074  		return rewriteValueARM64_OpSlicemask(v)
  2075  	case OpSqrt:
  2076  		v.Op = OpARM64FSQRTD
  2077  		return true
  2078  	case OpSqrt32:
  2079  		v.Op = OpARM64FSQRTS
  2080  		return true
  2081  	case OpSqrtFloat32x4:
  2082  		v.Op = OpARM64VFSQRT4S
  2083  		return true
  2084  	case OpSqrtFloat64x2:
  2085  		v.Op = OpARM64VFSQRT2D
  2086  		return true
  2087  	case OpStaticCall:
  2088  		v.Op = OpARM64CALLstatic
  2089  		return true
  2090  	case OpStore:
  2091  		return rewriteValueARM64_OpStore(v)
  2092  	case OpSub16:
  2093  		v.Op = OpARM64SUB
  2094  		return true
  2095  	case OpSub32:
  2096  		v.Op = OpARM64SUB
  2097  		return true
  2098  	case OpSub32F:
  2099  		v.Op = OpARM64FSUBS
  2100  		return true
  2101  	case OpSub64:
  2102  		v.Op = OpARM64SUB
  2103  		return true
  2104  	case OpSub64F:
  2105  		v.Op = OpARM64FSUBD
  2106  		return true
  2107  	case OpSub8:
  2108  		v.Op = OpARM64SUB
  2109  		return true
  2110  	case OpSubFloat32x4:
  2111  		v.Op = OpARM64VFSUB4S
  2112  		return true
  2113  	case OpSubFloat64x2:
  2114  		v.Op = OpARM64VFSUB2D
  2115  		return true
  2116  	case OpSubInt16x8:
  2117  		v.Op = OpARM64VSUB8H
  2118  		return true
  2119  	case OpSubInt32x4:
  2120  		v.Op = OpARM64VSUB4S
  2121  		return true
  2122  	case OpSubInt64x2:
  2123  		v.Op = OpARM64VSUB2D
  2124  		return true
  2125  	case OpSubInt8x16:
  2126  		v.Op = OpARM64VSUB16B
  2127  		return true
  2128  	case OpSubPtr:
  2129  		v.Op = OpARM64SUB
  2130  		return true
  2131  	case OpSubSaturatedInt16x8:
  2132  		v.Op = OpARM64VSQSUB8H
  2133  		return true
  2134  	case OpSubSaturatedInt32x4:
  2135  		v.Op = OpARM64VSQSUB4S
  2136  		return true
  2137  	case OpSubSaturatedInt64x2:
  2138  		v.Op = OpARM64VSQSUB2D
  2139  		return true
  2140  	case OpSubSaturatedInt8x16:
  2141  		v.Op = OpARM64VSQSUB16B
  2142  		return true
  2143  	case OpSubSaturatedUint16x8:
  2144  		v.Op = OpARM64VUQSUB8H
  2145  		return true
  2146  	case OpSubSaturatedUint32x4:
  2147  		v.Op = OpARM64VUQSUB4S
  2148  		return true
  2149  	case OpSubSaturatedUint64x2:
  2150  		v.Op = OpARM64VUQSUB2D
  2151  		return true
  2152  	case OpSubSaturatedUint8x16:
  2153  		v.Op = OpARM64VUQSUB16B
  2154  		return true
  2155  	case OpSubUint16x8:
  2156  		v.Op = OpARM64VSUB8H
  2157  		return true
  2158  	case OpSubUint32x4:
  2159  		v.Op = OpARM64VSUB4S
  2160  		return true
  2161  	case OpSubUint64x2:
  2162  		v.Op = OpARM64VSUB2D
  2163  		return true
  2164  	case OpSubUint8x16:
  2165  		v.Op = OpARM64VSUB16B
  2166  		return true
  2167  	case OpTailCall:
  2168  		v.Op = OpARM64CALLtail
  2169  		return true
  2170  	case OpTailCallInter:
  2171  		v.Op = OpARM64CALLtailinter
  2172  		return true
  2173  	case OpTrunc:
  2174  		v.Op = OpARM64FRINTZD
  2175  		return true
  2176  	case OpTrunc16to8:
  2177  		v.Op = OpCopy
  2178  		return true
  2179  	case OpTrunc32to16:
  2180  		v.Op = OpCopy
  2181  		return true
  2182  	case OpTrunc32to8:
  2183  		v.Op = OpCopy
  2184  		return true
  2185  	case OpTrunc64to16:
  2186  		v.Op = OpCopy
  2187  		return true
  2188  	case OpTrunc64to32:
  2189  		v.Op = OpCopy
  2190  		return true
  2191  	case OpTrunc64to8:
  2192  		v.Op = OpCopy
  2193  		return true
  2194  	case OpTruncFloat32x4:
  2195  		v.Op = OpARM64VFRINTZ4S
  2196  		return true
  2197  	case OpTruncFloat64x2:
  2198  		v.Op = OpARM64VFRINTZ2D
  2199  		return true
  2200  	case OpTruncToInt16Int32x4:
  2201  		v.Op = OpARM64VXTN4S
  2202  		return true
  2203  	case OpTruncToInt32Int64x2:
  2204  		v.Op = OpARM64VXTN2D
  2205  		return true
  2206  	case OpTruncToInt8Int16x8:
  2207  		v.Op = OpARM64VXTN8H
  2208  		return true
  2209  	case OpTruncToUint16Uint32x4:
  2210  		v.Op = OpARM64VXTN4S
  2211  		return true
  2212  	case OpTruncToUint32Uint64x2:
  2213  		v.Op = OpARM64VXTN2D
  2214  		return true
  2215  	case OpTruncToUint8Uint16x8:
  2216  		v.Op = OpARM64VXTN8H
  2217  		return true
  2218  	case OpWB:
  2219  		v.Op = OpARM64LoweredWB
  2220  		return true
  2221  	case OpXor16:
  2222  		v.Op = OpARM64XOR
  2223  		return true
  2224  	case OpXor32:
  2225  		v.Op = OpARM64XOR
  2226  		return true
  2227  	case OpXor64:
  2228  		v.Op = OpARM64XOR
  2229  		return true
  2230  	case OpXor8:
  2231  		v.Op = OpARM64XOR
  2232  		return true
  2233  	case OpXorInt16x8:
  2234  		v.Op = OpARM64VEOR16B
  2235  		return true
  2236  	case OpXorInt32x4:
  2237  		v.Op = OpARM64VEOR16B
  2238  		return true
  2239  	case OpXorInt64x2:
  2240  		v.Op = OpARM64VEOR16B
  2241  		return true
  2242  	case OpXorInt8x16:
  2243  		v.Op = OpARM64VEOR16B
  2244  		return true
  2245  	case OpXorUint16x8:
  2246  		v.Op = OpARM64VEOR16B
  2247  		return true
  2248  	case OpXorUint32x4:
  2249  		v.Op = OpARM64VEOR16B
  2250  		return true
  2251  	case OpXorUint64x2:
  2252  		v.Op = OpARM64VEOR16B
  2253  		return true
  2254  	case OpXorUint8x16:
  2255  		v.Op = OpARM64VEOR16B
  2256  		return true
  2257  	case OpZero:
  2258  		return rewriteValueARM64_OpZero(v)
  2259  	case OpZeroExt16to32:
  2260  		v.Op = OpARM64MOVHUreg
  2261  		return true
  2262  	case OpZeroExt16to64:
  2263  		v.Op = OpARM64MOVHUreg
  2264  		return true
  2265  	case OpZeroExt32to64:
  2266  		v.Op = OpARM64MOVWUreg
  2267  		return true
  2268  	case OpZeroExt8to16:
  2269  		v.Op = OpARM64MOVBUreg
  2270  		return true
  2271  	case OpZeroExt8to32:
  2272  		v.Op = OpARM64MOVBUreg
  2273  		return true
  2274  	case OpZeroExt8to64:
  2275  		v.Op = OpARM64MOVBUreg
  2276  		return true
  2277  	case OpZeroSIMD:
  2278  		return rewriteValueARM64_OpZeroSIMD(v)
  2279  	case OpbitSelectInt8x16:
  2280  		v.Op = OpARM64VBIF16B
  2281  		return true
  2282  	case OpbitSelectNotInt8x16:
  2283  		v.Op = OpARM64VBIT16B
  2284  		return true
  2285  	case Opbroadcast1To16Int8x16:
  2286  		return rewriteValueARM64_Opbroadcast1To16Int8x16(v)
  2287  	case Opbroadcast1To16Uint8x16:
  2288  		return rewriteValueARM64_Opbroadcast1To16Uint8x16(v)
  2289  	case Opbroadcast1To2Float64x2:
  2290  		return rewriteValueARM64_Opbroadcast1To2Float64x2(v)
  2291  	case Opbroadcast1To2Int64x2:
  2292  		return rewriteValueARM64_Opbroadcast1To2Int64x2(v)
  2293  	case Opbroadcast1To2Uint64x2:
  2294  		return rewriteValueARM64_Opbroadcast1To2Uint64x2(v)
  2295  	case Opbroadcast1To4Float32x4:
  2296  		return rewriteValueARM64_Opbroadcast1To4Float32x4(v)
  2297  	case Opbroadcast1To4Int32x4:
  2298  		return rewriteValueARM64_Opbroadcast1To4Int32x4(v)
  2299  	case Opbroadcast1To4Uint32x4:
  2300  		return rewriteValueARM64_Opbroadcast1To4Uint32x4(v)
  2301  	case Opbroadcast1To8Int16x8:
  2302  		return rewriteValueARM64_Opbroadcast1To8Int16x8(v)
  2303  	case Opbroadcast1To8Uint16x8:
  2304  		return rewriteValueARM64_Opbroadcast1To8Uint16x8(v)
  2305  	case OpcarrylessMultiplyWidenLoUint64x2:
  2306  		v.Op = OpARM64VPMULL2D
  2307  		return true
  2308  	case OpreduceMaxFloat32x4:
  2309  		v.Op = OpARM64VFMAXV4S
  2310  		return true
  2311  	case OpreduceMaxInt16x8:
  2312  		v.Op = OpARM64VSMAXV8H
  2313  		return true
  2314  	case OpreduceMaxInt32x4:
  2315  		v.Op = OpARM64VSMAXV4S
  2316  		return true
  2317  	case OpreduceMaxInt8x16:
  2318  		v.Op = OpARM64VSMAXV16B
  2319  		return true
  2320  	case OpreduceMaxUint16x8:
  2321  		v.Op = OpARM64VUMAXV8H
  2322  		return true
  2323  	case OpreduceMaxUint32x4:
  2324  		v.Op = OpARM64VUMAXV4S
  2325  		return true
  2326  	case OpreduceMaxUint8x16:
  2327  		v.Op = OpARM64VUMAXV16B
  2328  		return true
  2329  	case OpreduceMinFloat32x4:
  2330  		v.Op = OpARM64VFMINV4S
  2331  		return true
  2332  	case OpreduceMinInt16x8:
  2333  		v.Op = OpARM64VSMINV8H
  2334  		return true
  2335  	case OpreduceMinInt32x4:
  2336  		v.Op = OpARM64VSMINV4S
  2337  		return true
  2338  	case OpreduceMinInt8x16:
  2339  		v.Op = OpARM64VSMINV16B
  2340  		return true
  2341  	case OpreduceMinUint16x8:
  2342  		v.Op = OpARM64VUMINV8H
  2343  		return true
  2344  	case OpreduceMinUint32x4:
  2345  		v.Op = OpARM64VUMINV4S
  2346  		return true
  2347  	case OpreduceMinUint8x16:
  2348  		v.Op = OpARM64VUMINV16B
  2349  		return true
  2350  	case OpreduceSumInt16x8:
  2351  		v.Op = OpARM64VADDV8H
  2352  		return true
  2353  	case OpreduceSumInt32x4:
  2354  		v.Op = OpARM64VADDV4S
  2355  		return true
  2356  	case OpreduceSumInt8x16:
  2357  		v.Op = OpARM64VADDV16B
  2358  		return true
  2359  	case OpreduceSumUint16x8:
  2360  		v.Op = OpARM64VADDV8H
  2361  		return true
  2362  	case OpreduceSumUint32x4:
  2363  		v.Op = OpARM64VADDV4S
  2364  		return true
  2365  	case OpreduceSumUint8x16:
  2366  		v.Op = OpARM64VADDV16B
  2367  		return true
  2368  	}
  2369  	return false
  2370  }
  2371  func rewriteValueARM64_OpARM64ADCSflags(v *Value) bool {
  2372  	v_2 := v.Args[2]
  2373  	v_1 := v.Args[1]
  2374  	v_0 := v.Args[0]
  2375  	b := v.Block
  2376  	typ := &b.Func.Config.Types
  2377  	// match: (ADCSflags x y (Select1 <types.TypeFlags> (ADDSconstflags [-1] (ADCzerocarry <typ.UInt64> c))))
  2378  	// result: (ADCSflags x y c)
  2379  	for {
  2380  		x := v_0
  2381  		y := v_1
  2382  		if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
  2383  			break
  2384  		}
  2385  		v_2_0 := v_2.Args[0]
  2386  		if v_2_0.Op != OpARM64ADDSconstflags || auxIntToInt64(v_2_0.AuxInt) != -1 {
  2387  			break
  2388  		}
  2389  		v_2_0_0 := v_2_0.Args[0]
  2390  		if v_2_0_0.Op != OpARM64ADCzerocarry || v_2_0_0.Type != typ.UInt64 {
  2391  			break
  2392  		}
  2393  		c := v_2_0_0.Args[0]
  2394  		v.reset(OpARM64ADCSflags)
  2395  		v.AddArg3(x, y, c)
  2396  		return true
  2397  	}
  2398  	// match: (ADCSflags x y (Select1 <types.TypeFlags> (ADDSconstflags [-1] (MOVDconst [0]))))
  2399  	// result: (ADDSflags x y)
  2400  	for {
  2401  		x := v_0
  2402  		y := v_1
  2403  		if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
  2404  			break
  2405  		}
  2406  		v_2_0 := v_2.Args[0]
  2407  		if v_2_0.Op != OpARM64ADDSconstflags || auxIntToInt64(v_2_0.AuxInt) != -1 {
  2408  			break
  2409  		}
  2410  		v_2_0_0 := v_2_0.Args[0]
  2411  		if v_2_0_0.Op != OpARM64MOVDconst || auxIntToInt64(v_2_0_0.AuxInt) != 0 {
  2412  			break
  2413  		}
  2414  		v.reset(OpARM64ADDSflags)
  2415  		v.AddArg2(x, y)
  2416  		return true
  2417  	}
  2418  	return false
  2419  }
  2420  func rewriteValueARM64_OpARM64ADD(v *Value) bool {
  2421  	v_1 := v.Args[1]
  2422  	v_0 := v.Args[0]
  2423  	b := v.Block
  2424  	// match: (ADD x (MOVDconst <t> [c]))
  2425  	// cond: !t.IsPtr()
  2426  	// result: (ADDconst [c] x)
  2427  	for {
  2428  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2429  			x := v_0
  2430  			if v_1.Op != OpARM64MOVDconst {
  2431  				continue
  2432  			}
  2433  			t := v_1.Type
  2434  			c := auxIntToInt64(v_1.AuxInt)
  2435  			if !(!t.IsPtr()) {
  2436  				continue
  2437  			}
  2438  			v.reset(OpARM64ADDconst)
  2439  			v.AuxInt = int64ToAuxInt(c)
  2440  			v.AddArg(x)
  2441  			return true
  2442  		}
  2443  		break
  2444  	}
  2445  	// match: (ADD a l:(MUL x y))
  2446  	// cond: l.Uses==1 && clobber(l)
  2447  	// result: (MADD a x y)
  2448  	for {
  2449  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2450  			a := v_0
  2451  			l := v_1
  2452  			if l.Op != OpARM64MUL {
  2453  				continue
  2454  			}
  2455  			y := l.Args[1]
  2456  			x := l.Args[0]
  2457  			if !(l.Uses == 1 && clobber(l)) {
  2458  				continue
  2459  			}
  2460  			v.reset(OpARM64MADD)
  2461  			v.AddArg3(a, x, y)
  2462  			return true
  2463  		}
  2464  		break
  2465  	}
  2466  	// match: (ADD a l:(MNEG x y))
  2467  	// cond: l.Uses==1 && clobber(l)
  2468  	// result: (MSUB a x y)
  2469  	for {
  2470  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2471  			a := v_0
  2472  			l := v_1
  2473  			if l.Op != OpARM64MNEG {
  2474  				continue
  2475  			}
  2476  			y := l.Args[1]
  2477  			x := l.Args[0]
  2478  			if !(l.Uses == 1 && clobber(l)) {
  2479  				continue
  2480  			}
  2481  			v.reset(OpARM64MSUB)
  2482  			v.AddArg3(a, x, y)
  2483  			return true
  2484  		}
  2485  		break
  2486  	}
  2487  	// match: (ADD a l:(MULW x y))
  2488  	// cond: v.Type.Size() <= 4 && l.Uses==1 && clobber(l)
  2489  	// result: (MADDW a x y)
  2490  	for {
  2491  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2492  			a := v_0
  2493  			l := v_1
  2494  			if l.Op != OpARM64MULW {
  2495  				continue
  2496  			}
  2497  			y := l.Args[1]
  2498  			x := l.Args[0]
  2499  			if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
  2500  				continue
  2501  			}
  2502  			v.reset(OpARM64MADDW)
  2503  			v.AddArg3(a, x, y)
  2504  			return true
  2505  		}
  2506  		break
  2507  	}
  2508  	// match: (ADD a l:(MNEGW x y))
  2509  	// cond: v.Type.Size() <= 4 && l.Uses==1 && clobber(l)
  2510  	// result: (MSUBW a x y)
  2511  	for {
  2512  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2513  			a := v_0
  2514  			l := v_1
  2515  			if l.Op != OpARM64MNEGW {
  2516  				continue
  2517  			}
  2518  			y := l.Args[1]
  2519  			x := l.Args[0]
  2520  			if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
  2521  				continue
  2522  			}
  2523  			v.reset(OpARM64MSUBW)
  2524  			v.AddArg3(a, x, y)
  2525  			return true
  2526  		}
  2527  		break
  2528  	}
  2529  	// match: (ADD <t> a p:(ADDconst [c] m:(MUL _ _)))
  2530  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  2531  	// result: (ADDconst [c] (ADD <v.Type> a m))
  2532  	for {
  2533  		t := v.Type
  2534  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2535  			a := v_0
  2536  			p := v_1
  2537  			if p.Op != OpARM64ADDconst {
  2538  				continue
  2539  			}
  2540  			c := auxIntToInt64(p.AuxInt)
  2541  			m := p.Args[0]
  2542  			if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  2543  				continue
  2544  			}
  2545  			v.reset(OpARM64ADDconst)
  2546  			v.AuxInt = int64ToAuxInt(c)
  2547  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  2548  			v0.AddArg2(a, m)
  2549  			v.AddArg(v0)
  2550  			return true
  2551  		}
  2552  		break
  2553  	}
  2554  	// match: (ADD <t> a p:(ADDconst [c] m:(MULW _ _)))
  2555  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  2556  	// result: (ADDconst [c] (ADD <v.Type> a m))
  2557  	for {
  2558  		t := v.Type
  2559  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2560  			a := v_0
  2561  			p := v_1
  2562  			if p.Op != OpARM64ADDconst {
  2563  				continue
  2564  			}
  2565  			c := auxIntToInt64(p.AuxInt)
  2566  			m := p.Args[0]
  2567  			if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  2568  				continue
  2569  			}
  2570  			v.reset(OpARM64ADDconst)
  2571  			v.AuxInt = int64ToAuxInt(c)
  2572  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  2573  			v0.AddArg2(a, m)
  2574  			v.AddArg(v0)
  2575  			return true
  2576  		}
  2577  		break
  2578  	}
  2579  	// match: (ADD <t> a p:(ADDconst [c] m:(MNEG _ _)))
  2580  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  2581  	// result: (ADDconst [c] (ADD <v.Type> a m))
  2582  	for {
  2583  		t := v.Type
  2584  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2585  			a := v_0
  2586  			p := v_1
  2587  			if p.Op != OpARM64ADDconst {
  2588  				continue
  2589  			}
  2590  			c := auxIntToInt64(p.AuxInt)
  2591  			m := p.Args[0]
  2592  			if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  2593  				continue
  2594  			}
  2595  			v.reset(OpARM64ADDconst)
  2596  			v.AuxInt = int64ToAuxInt(c)
  2597  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  2598  			v0.AddArg2(a, m)
  2599  			v.AddArg(v0)
  2600  			return true
  2601  		}
  2602  		break
  2603  	}
  2604  	// match: (ADD <t> a p:(ADDconst [c] m:(MNEGW _ _)))
  2605  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  2606  	// result: (ADDconst [c] (ADD <v.Type> a m))
  2607  	for {
  2608  		t := v.Type
  2609  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2610  			a := v_0
  2611  			p := v_1
  2612  			if p.Op != OpARM64ADDconst {
  2613  				continue
  2614  			}
  2615  			c := auxIntToInt64(p.AuxInt)
  2616  			m := p.Args[0]
  2617  			if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  2618  				continue
  2619  			}
  2620  			v.reset(OpARM64ADDconst)
  2621  			v.AuxInt = int64ToAuxInt(c)
  2622  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  2623  			v0.AddArg2(a, m)
  2624  			v.AddArg(v0)
  2625  			return true
  2626  		}
  2627  		break
  2628  	}
  2629  	// match: (ADD <t> a p:(SUBconst [c] m:(MUL _ _)))
  2630  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  2631  	// result: (SUBconst [c] (ADD <v.Type> a m))
  2632  	for {
  2633  		t := v.Type
  2634  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2635  			a := v_0
  2636  			p := v_1
  2637  			if p.Op != OpARM64SUBconst {
  2638  				continue
  2639  			}
  2640  			c := auxIntToInt64(p.AuxInt)
  2641  			m := p.Args[0]
  2642  			if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  2643  				continue
  2644  			}
  2645  			v.reset(OpARM64SUBconst)
  2646  			v.AuxInt = int64ToAuxInt(c)
  2647  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  2648  			v0.AddArg2(a, m)
  2649  			v.AddArg(v0)
  2650  			return true
  2651  		}
  2652  		break
  2653  	}
  2654  	// match: (ADD <t> a p:(SUBconst [c] m:(MULW _ _)))
  2655  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  2656  	// result: (SUBconst [c] (ADD <v.Type> a m))
  2657  	for {
  2658  		t := v.Type
  2659  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2660  			a := v_0
  2661  			p := v_1
  2662  			if p.Op != OpARM64SUBconst {
  2663  				continue
  2664  			}
  2665  			c := auxIntToInt64(p.AuxInt)
  2666  			m := p.Args[0]
  2667  			if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  2668  				continue
  2669  			}
  2670  			v.reset(OpARM64SUBconst)
  2671  			v.AuxInt = int64ToAuxInt(c)
  2672  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  2673  			v0.AddArg2(a, m)
  2674  			v.AddArg(v0)
  2675  			return true
  2676  		}
  2677  		break
  2678  	}
  2679  	// match: (ADD <t> a p:(SUBconst [c] m:(MNEG _ _)))
  2680  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  2681  	// result: (SUBconst [c] (ADD <v.Type> a m))
  2682  	for {
  2683  		t := v.Type
  2684  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2685  			a := v_0
  2686  			p := v_1
  2687  			if p.Op != OpARM64SUBconst {
  2688  				continue
  2689  			}
  2690  			c := auxIntToInt64(p.AuxInt)
  2691  			m := p.Args[0]
  2692  			if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  2693  				continue
  2694  			}
  2695  			v.reset(OpARM64SUBconst)
  2696  			v.AuxInt = int64ToAuxInt(c)
  2697  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  2698  			v0.AddArg2(a, m)
  2699  			v.AddArg(v0)
  2700  			return true
  2701  		}
  2702  		break
  2703  	}
  2704  	// match: (ADD <t> a p:(SUBconst [c] m:(MNEGW _ _)))
  2705  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  2706  	// result: (SUBconst [c] (ADD <v.Type> a m))
  2707  	for {
  2708  		t := v.Type
  2709  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2710  			a := v_0
  2711  			p := v_1
  2712  			if p.Op != OpARM64SUBconst {
  2713  				continue
  2714  			}
  2715  			c := auxIntToInt64(p.AuxInt)
  2716  			m := p.Args[0]
  2717  			if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  2718  				continue
  2719  			}
  2720  			v.reset(OpARM64SUBconst)
  2721  			v.AuxInt = int64ToAuxInt(c)
  2722  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  2723  			v0.AddArg2(a, m)
  2724  			v.AddArg(v0)
  2725  			return true
  2726  		}
  2727  		break
  2728  	}
  2729  	// match: (ADD x (NEG y))
  2730  	// result: (SUB x y)
  2731  	for {
  2732  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2733  			x := v_0
  2734  			if v_1.Op != OpARM64NEG {
  2735  				continue
  2736  			}
  2737  			y := v_1.Args[0]
  2738  			v.reset(OpARM64SUB)
  2739  			v.AddArg2(x, y)
  2740  			return true
  2741  		}
  2742  		break
  2743  	}
  2744  	// match: (ADD x0 x1:(SLLconst [c] y))
  2745  	// cond: clobberIfDead(x1)
  2746  	// result: (ADDshiftLL x0 y [c])
  2747  	for {
  2748  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2749  			x0 := v_0
  2750  			x1 := v_1
  2751  			if x1.Op != OpARM64SLLconst {
  2752  				continue
  2753  			}
  2754  			c := auxIntToInt64(x1.AuxInt)
  2755  			y := x1.Args[0]
  2756  			if !(clobberIfDead(x1)) {
  2757  				continue
  2758  			}
  2759  			v.reset(OpARM64ADDshiftLL)
  2760  			v.AuxInt = int64ToAuxInt(c)
  2761  			v.AddArg2(x0, y)
  2762  			return true
  2763  		}
  2764  		break
  2765  	}
  2766  	// match: (ADD x0 x1:(SRLconst [c] y))
  2767  	// cond: clobberIfDead(x1)
  2768  	// result: (ADDshiftRL x0 y [c])
  2769  	for {
  2770  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2771  			x0 := v_0
  2772  			x1 := v_1
  2773  			if x1.Op != OpARM64SRLconst {
  2774  				continue
  2775  			}
  2776  			c := auxIntToInt64(x1.AuxInt)
  2777  			y := x1.Args[0]
  2778  			if !(clobberIfDead(x1)) {
  2779  				continue
  2780  			}
  2781  			v.reset(OpARM64ADDshiftRL)
  2782  			v.AuxInt = int64ToAuxInt(c)
  2783  			v.AddArg2(x0, y)
  2784  			return true
  2785  		}
  2786  		break
  2787  	}
  2788  	// match: (ADD x0 x1:(SRAconst [c] y))
  2789  	// cond: clobberIfDead(x1)
  2790  	// result: (ADDshiftRA x0 y [c])
  2791  	for {
  2792  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2793  			x0 := v_0
  2794  			x1 := v_1
  2795  			if x1.Op != OpARM64SRAconst {
  2796  				continue
  2797  			}
  2798  			c := auxIntToInt64(x1.AuxInt)
  2799  			y := x1.Args[0]
  2800  			if !(clobberIfDead(x1)) {
  2801  				continue
  2802  			}
  2803  			v.reset(OpARM64ADDshiftRA)
  2804  			v.AuxInt = int64ToAuxInt(c)
  2805  			v.AddArg2(x0, y)
  2806  			return true
  2807  		}
  2808  		break
  2809  	}
  2810  	// match: (ADD x0 x1:(ANDshiftRA x2:(SLLconst [sl] y) z [63]))
  2811  	// cond: x1.Uses == 1 && x2.Uses == 1
  2812  	// result: (ADDshiftLL x0 (ANDshiftRA <y.Type> y z [63]) [sl])
  2813  	for {
  2814  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2815  			x0 := v_0
  2816  			x1 := v_1
  2817  			if x1.Op != OpARM64ANDshiftRA || auxIntToInt64(x1.AuxInt) != 63 {
  2818  				continue
  2819  			}
  2820  			z := x1.Args[1]
  2821  			x2 := x1.Args[0]
  2822  			if x2.Op != OpARM64SLLconst {
  2823  				continue
  2824  			}
  2825  			sl := auxIntToInt64(x2.AuxInt)
  2826  			y := x2.Args[0]
  2827  			if !(x1.Uses == 1 && x2.Uses == 1) {
  2828  				continue
  2829  			}
  2830  			v.reset(OpARM64ADDshiftLL)
  2831  			v.AuxInt = int64ToAuxInt(sl)
  2832  			v0 := b.NewValue0(v.Pos, OpARM64ANDshiftRA, y.Type)
  2833  			v0.AuxInt = int64ToAuxInt(63)
  2834  			v0.AddArg2(y, z)
  2835  			v.AddArg2(x0, v0)
  2836  			return true
  2837  		}
  2838  		break
  2839  	}
  2840  	// match: (ADD x0 x1:(ANDshiftLL x2:(SRAconst [63] z) y [sl]))
  2841  	// cond: x1.Uses == 1 && x2.Uses == 1
  2842  	// result: (ADDshiftLL x0 (ANDshiftRA <y.Type> y z [63]) [sl])
  2843  	for {
  2844  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2845  			x0 := v_0
  2846  			x1 := v_1
  2847  			if x1.Op != OpARM64ANDshiftLL {
  2848  				continue
  2849  			}
  2850  			sl := auxIntToInt64(x1.AuxInt)
  2851  			y := x1.Args[1]
  2852  			x2 := x1.Args[0]
  2853  			if x2.Op != OpARM64SRAconst || auxIntToInt64(x2.AuxInt) != 63 {
  2854  				continue
  2855  			}
  2856  			z := x2.Args[0]
  2857  			if !(x1.Uses == 1 && x2.Uses == 1) {
  2858  				continue
  2859  			}
  2860  			v.reset(OpARM64ADDshiftLL)
  2861  			v.AuxInt = int64ToAuxInt(sl)
  2862  			v0 := b.NewValue0(v.Pos, OpARM64ANDshiftRA, y.Type)
  2863  			v0.AuxInt = int64ToAuxInt(63)
  2864  			v0.AddArg2(y, z)
  2865  			v.AddArg2(x0, v0)
  2866  			return true
  2867  		}
  2868  		break
  2869  	}
  2870  	return false
  2871  }
  2872  func rewriteValueARM64_OpARM64ADDSflags(v *Value) bool {
  2873  	v_1 := v.Args[1]
  2874  	v_0 := v.Args[0]
  2875  	// match: (ADDSflags x (MOVDconst [c]))
  2876  	// result: (ADDSconstflags [c] x)
  2877  	for {
  2878  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2879  			x := v_0
  2880  			if v_1.Op != OpARM64MOVDconst {
  2881  				continue
  2882  			}
  2883  			c := auxIntToInt64(v_1.AuxInt)
  2884  			v.reset(OpARM64ADDSconstflags)
  2885  			v.AuxInt = int64ToAuxInt(c)
  2886  			v.AddArg(x)
  2887  			return true
  2888  		}
  2889  		break
  2890  	}
  2891  	return false
  2892  }
  2893  func rewriteValueARM64_OpARM64ADDconst(v *Value) bool {
  2894  	v_0 := v.Args[0]
  2895  	// match: (ADDconst [off1] (MOVDaddr [off2] {sym} ptr))
  2896  	// cond: is32Bit(off1+int64(off2))
  2897  	// result: (MOVDaddr [int32(off1)+off2] {sym} ptr)
  2898  	for {
  2899  		off1 := auxIntToInt64(v.AuxInt)
  2900  		if v_0.Op != OpARM64MOVDaddr {
  2901  			break
  2902  		}
  2903  		off2 := auxIntToInt32(v_0.AuxInt)
  2904  		sym := auxToSym(v_0.Aux)
  2905  		ptr := v_0.Args[0]
  2906  		if !(is32Bit(off1 + int64(off2))) {
  2907  			break
  2908  		}
  2909  		v.reset(OpARM64MOVDaddr)
  2910  		v.AuxInt = int32ToAuxInt(int32(off1) + off2)
  2911  		v.Aux = symToAux(sym)
  2912  		v.AddArg(ptr)
  2913  		return true
  2914  	}
  2915  	// match: (ADDconst [c] y)
  2916  	// cond: c < 0
  2917  	// result: (SUBconst [-c] y)
  2918  	for {
  2919  		c := auxIntToInt64(v.AuxInt)
  2920  		y := v_0
  2921  		if !(c < 0) {
  2922  			break
  2923  		}
  2924  		v.reset(OpARM64SUBconst)
  2925  		v.AuxInt = int64ToAuxInt(-c)
  2926  		v.AddArg(y)
  2927  		return true
  2928  	}
  2929  	// match: (ADDconst [0] x)
  2930  	// result: x
  2931  	for {
  2932  		if auxIntToInt64(v.AuxInt) != 0 {
  2933  			break
  2934  		}
  2935  		x := v_0
  2936  		v.copyOf(x)
  2937  		return true
  2938  	}
  2939  	// match: (ADDconst [c] (MOVDconst [d]))
  2940  	// result: (MOVDconst [c+d])
  2941  	for {
  2942  		c := auxIntToInt64(v.AuxInt)
  2943  		if v_0.Op != OpARM64MOVDconst {
  2944  			break
  2945  		}
  2946  		d := auxIntToInt64(v_0.AuxInt)
  2947  		v.reset(OpARM64MOVDconst)
  2948  		v.AuxInt = int64ToAuxInt(c + d)
  2949  		return true
  2950  	}
  2951  	// match: (ADDconst [c] (ADDconst [d] x))
  2952  	// result: (ADDconst [c+d] x)
  2953  	for {
  2954  		c := auxIntToInt64(v.AuxInt)
  2955  		if v_0.Op != OpARM64ADDconst {
  2956  			break
  2957  		}
  2958  		d := auxIntToInt64(v_0.AuxInt)
  2959  		x := v_0.Args[0]
  2960  		v.reset(OpARM64ADDconst)
  2961  		v.AuxInt = int64ToAuxInt(c + d)
  2962  		v.AddArg(x)
  2963  		return true
  2964  	}
  2965  	// match: (ADDconst [c] (SUBconst [d] x))
  2966  	// result: (ADDconst [c-d] x)
  2967  	for {
  2968  		c := auxIntToInt64(v.AuxInt)
  2969  		if v_0.Op != OpARM64SUBconst {
  2970  			break
  2971  		}
  2972  		d := auxIntToInt64(v_0.AuxInt)
  2973  		x := v_0.Args[0]
  2974  		v.reset(OpARM64ADDconst)
  2975  		v.AuxInt = int64ToAuxInt(c - d)
  2976  		v.AddArg(x)
  2977  		return true
  2978  	}
  2979  	return false
  2980  }
  2981  func rewriteValueARM64_OpARM64ADDshiftLL(v *Value) bool {
  2982  	v_1 := v.Args[1]
  2983  	v_0 := v.Args[0]
  2984  	b := v.Block
  2985  	typ := &b.Func.Config.Types
  2986  	// match: (ADDshiftLL (MOVDconst [c]) x [d])
  2987  	// result: (ADDconst [c] (SLLconst <x.Type> x [d]))
  2988  	for {
  2989  		d := auxIntToInt64(v.AuxInt)
  2990  		if v_0.Op != OpARM64MOVDconst {
  2991  			break
  2992  		}
  2993  		c := auxIntToInt64(v_0.AuxInt)
  2994  		x := v_1
  2995  		v.reset(OpARM64ADDconst)
  2996  		v.AuxInt = int64ToAuxInt(c)
  2997  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  2998  		v0.AuxInt = int64ToAuxInt(d)
  2999  		v0.AddArg(x)
  3000  		v.AddArg(v0)
  3001  		return true
  3002  	}
  3003  	// match: (ADDshiftLL x (MOVDconst [c]) [d])
  3004  	// result: (ADDconst x [int64(uint64(c)<<uint64(d))])
  3005  	for {
  3006  		d := auxIntToInt64(v.AuxInt)
  3007  		x := v_0
  3008  		if v_1.Op != OpARM64MOVDconst {
  3009  			break
  3010  		}
  3011  		c := auxIntToInt64(v_1.AuxInt)
  3012  		v.reset(OpARM64ADDconst)
  3013  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
  3014  		v.AddArg(x)
  3015  		return true
  3016  	}
  3017  	// match: (ADDshiftLL <typ.UInt16> [8] (UBFX <typ.UInt16> [armBFAuxInt(8, 8)] x) x)
  3018  	// result: (REV16W x)
  3019  	for {
  3020  		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) {
  3021  			break
  3022  		}
  3023  		x := v_0.Args[0]
  3024  		if x != v_1 {
  3025  			break
  3026  		}
  3027  		v.reset(OpARM64REV16W)
  3028  		v.AddArg(x)
  3029  		return true
  3030  	}
  3031  	// match: (ADDshiftLL [8] (UBFX [armBFAuxInt(8, 24)] (ANDconst [c1] x)) (ANDconst [c2] x))
  3032  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
  3033  	// result: (REV16W x)
  3034  	for {
  3035  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64UBFX || auxIntToArm64BitField(v_0.AuxInt) != armBFAuxInt(8, 24) {
  3036  			break
  3037  		}
  3038  		v_0_0 := v_0.Args[0]
  3039  		if v_0_0.Op != OpARM64ANDconst {
  3040  			break
  3041  		}
  3042  		c1 := auxIntToInt64(v_0_0.AuxInt)
  3043  		x := v_0_0.Args[0]
  3044  		if v_1.Op != OpARM64ANDconst {
  3045  			break
  3046  		}
  3047  		c2 := auxIntToInt64(v_1.AuxInt)
  3048  		if x != v_1.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
  3049  			break
  3050  		}
  3051  		v.reset(OpARM64REV16W)
  3052  		v.AddArg(x)
  3053  		return true
  3054  	}
  3055  	// match: (ADDshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
  3056  	// cond: (uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff)
  3057  	// result: (REV16 x)
  3058  	for {
  3059  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
  3060  			break
  3061  		}
  3062  		v_0_0 := v_0.Args[0]
  3063  		if v_0_0.Op != OpARM64ANDconst {
  3064  			break
  3065  		}
  3066  		c1 := auxIntToInt64(v_0_0.AuxInt)
  3067  		x := v_0_0.Args[0]
  3068  		if v_1.Op != OpARM64ANDconst {
  3069  			break
  3070  		}
  3071  		c2 := auxIntToInt64(v_1.AuxInt)
  3072  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
  3073  			break
  3074  		}
  3075  		v.reset(OpARM64REV16)
  3076  		v.AddArg(x)
  3077  		return true
  3078  	}
  3079  	// match: (ADDshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
  3080  	// cond: (uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff)
  3081  	// result: (REV16 (ANDconst <x.Type> [0xffffffff] x))
  3082  	for {
  3083  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
  3084  			break
  3085  		}
  3086  		v_0_0 := v_0.Args[0]
  3087  		if v_0_0.Op != OpARM64ANDconst {
  3088  			break
  3089  		}
  3090  		c1 := auxIntToInt64(v_0_0.AuxInt)
  3091  		x := v_0_0.Args[0]
  3092  		if v_1.Op != OpARM64ANDconst {
  3093  			break
  3094  		}
  3095  		c2 := auxIntToInt64(v_1.AuxInt)
  3096  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
  3097  			break
  3098  		}
  3099  		v.reset(OpARM64REV16)
  3100  		v0 := b.NewValue0(v.Pos, OpARM64ANDconst, x.Type)
  3101  		v0.AuxInt = int64ToAuxInt(0xffffffff)
  3102  		v0.AddArg(x)
  3103  		v.AddArg(v0)
  3104  		return true
  3105  	}
  3106  	// match: (ADDshiftLL [c] (SRLconst x [64-c]) x2)
  3107  	// result: (EXTRconst [64-c] x2 x)
  3108  	for {
  3109  		c := auxIntToInt64(v.AuxInt)
  3110  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 64-c {
  3111  			break
  3112  		}
  3113  		x := v_0.Args[0]
  3114  		x2 := v_1
  3115  		v.reset(OpARM64EXTRconst)
  3116  		v.AuxInt = int64ToAuxInt(64 - c)
  3117  		v.AddArg2(x2, x)
  3118  		return true
  3119  	}
  3120  	// match: (ADDshiftLL <t> [c] (UBFX [bfc] x) x2)
  3121  	// cond: c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)
  3122  	// result: (EXTRWconst [32-c] x2 x)
  3123  	for {
  3124  		t := v.Type
  3125  		c := auxIntToInt64(v.AuxInt)
  3126  		if v_0.Op != OpARM64UBFX {
  3127  			break
  3128  		}
  3129  		bfc := auxIntToArm64BitField(v_0.AuxInt)
  3130  		x := v_0.Args[0]
  3131  		x2 := v_1
  3132  		if !(c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)) {
  3133  			break
  3134  		}
  3135  		v.reset(OpARM64EXTRWconst)
  3136  		v.AuxInt = int64ToAuxInt(32 - c)
  3137  		v.AddArg2(x2, x)
  3138  		return true
  3139  	}
  3140  	return false
  3141  }
  3142  func rewriteValueARM64_OpARM64ADDshiftRA(v *Value) bool {
  3143  	v_1 := v.Args[1]
  3144  	v_0 := v.Args[0]
  3145  	b := v.Block
  3146  	// match: (ADDshiftRA (MOVDconst [c]) x [d])
  3147  	// result: (ADDconst [c] (SRAconst <x.Type> x [d]))
  3148  	for {
  3149  		d := auxIntToInt64(v.AuxInt)
  3150  		if v_0.Op != OpARM64MOVDconst {
  3151  			break
  3152  		}
  3153  		c := auxIntToInt64(v_0.AuxInt)
  3154  		x := v_1
  3155  		v.reset(OpARM64ADDconst)
  3156  		v.AuxInt = int64ToAuxInt(c)
  3157  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
  3158  		v0.AuxInt = int64ToAuxInt(d)
  3159  		v0.AddArg(x)
  3160  		v.AddArg(v0)
  3161  		return true
  3162  	}
  3163  	// match: (ADDshiftRA x (MOVDconst [c]) [d])
  3164  	// result: (ADDconst x [c>>uint64(d)])
  3165  	for {
  3166  		d := auxIntToInt64(v.AuxInt)
  3167  		x := v_0
  3168  		if v_1.Op != OpARM64MOVDconst {
  3169  			break
  3170  		}
  3171  		c := auxIntToInt64(v_1.AuxInt)
  3172  		v.reset(OpARM64ADDconst)
  3173  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
  3174  		v.AddArg(x)
  3175  		return true
  3176  	}
  3177  	return false
  3178  }
  3179  func rewriteValueARM64_OpARM64ADDshiftRL(v *Value) bool {
  3180  	v_1 := v.Args[1]
  3181  	v_0 := v.Args[0]
  3182  	b := v.Block
  3183  	// match: (ADDshiftRL (MOVDconst [c]) x [d])
  3184  	// result: (ADDconst [c] (SRLconst <x.Type> x [d]))
  3185  	for {
  3186  		d := auxIntToInt64(v.AuxInt)
  3187  		if v_0.Op != OpARM64MOVDconst {
  3188  			break
  3189  		}
  3190  		c := auxIntToInt64(v_0.AuxInt)
  3191  		x := v_1
  3192  		v.reset(OpARM64ADDconst)
  3193  		v.AuxInt = int64ToAuxInt(c)
  3194  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
  3195  		v0.AuxInt = int64ToAuxInt(d)
  3196  		v0.AddArg(x)
  3197  		v.AddArg(v0)
  3198  		return true
  3199  	}
  3200  	// match: (ADDshiftRL x (MOVDconst [c]) [d])
  3201  	// result: (ADDconst x [int64(uint64(c)>>uint64(d))])
  3202  	for {
  3203  		d := auxIntToInt64(v.AuxInt)
  3204  		x := v_0
  3205  		if v_1.Op != OpARM64MOVDconst {
  3206  			break
  3207  		}
  3208  		c := auxIntToInt64(v_1.AuxInt)
  3209  		v.reset(OpARM64ADDconst)
  3210  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
  3211  		v.AddArg(x)
  3212  		return true
  3213  	}
  3214  	return false
  3215  }
  3216  func rewriteValueARM64_OpARM64AND(v *Value) bool {
  3217  	v_1 := v.Args[1]
  3218  	v_0 := v.Args[0]
  3219  	// match: (AND x (MOVDconst [c]))
  3220  	// result: (ANDconst [c] x)
  3221  	for {
  3222  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3223  			x := v_0
  3224  			if v_1.Op != OpARM64MOVDconst {
  3225  				continue
  3226  			}
  3227  			c := auxIntToInt64(v_1.AuxInt)
  3228  			v.reset(OpARM64ANDconst)
  3229  			v.AuxInt = int64ToAuxInt(c)
  3230  			v.AddArg(x)
  3231  			return true
  3232  		}
  3233  		break
  3234  	}
  3235  	// match: (AND x x)
  3236  	// result: x
  3237  	for {
  3238  		x := v_0
  3239  		if x != v_1 {
  3240  			break
  3241  		}
  3242  		v.copyOf(x)
  3243  		return true
  3244  	}
  3245  	// match: (AND x (MVN y))
  3246  	// result: (BIC x y)
  3247  	for {
  3248  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3249  			x := v_0
  3250  			if v_1.Op != OpARM64MVN {
  3251  				continue
  3252  			}
  3253  			y := v_1.Args[0]
  3254  			v.reset(OpARM64BIC)
  3255  			v.AddArg2(x, y)
  3256  			return true
  3257  		}
  3258  		break
  3259  	}
  3260  	// match: (AND x0 x1:(SLLconst [c] y))
  3261  	// cond: clobberIfDead(x1)
  3262  	// result: (ANDshiftLL x0 y [c])
  3263  	for {
  3264  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3265  			x0 := v_0
  3266  			x1 := v_1
  3267  			if x1.Op != OpARM64SLLconst {
  3268  				continue
  3269  			}
  3270  			c := auxIntToInt64(x1.AuxInt)
  3271  			y := x1.Args[0]
  3272  			if !(clobberIfDead(x1)) {
  3273  				continue
  3274  			}
  3275  			v.reset(OpARM64ANDshiftLL)
  3276  			v.AuxInt = int64ToAuxInt(c)
  3277  			v.AddArg2(x0, y)
  3278  			return true
  3279  		}
  3280  		break
  3281  	}
  3282  	// match: (AND x0 x1:(SRLconst [c] y))
  3283  	// cond: clobberIfDead(x1)
  3284  	// result: (ANDshiftRL x0 y [c])
  3285  	for {
  3286  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3287  			x0 := v_0
  3288  			x1 := v_1
  3289  			if x1.Op != OpARM64SRLconst {
  3290  				continue
  3291  			}
  3292  			c := auxIntToInt64(x1.AuxInt)
  3293  			y := x1.Args[0]
  3294  			if !(clobberIfDead(x1)) {
  3295  				continue
  3296  			}
  3297  			v.reset(OpARM64ANDshiftRL)
  3298  			v.AuxInt = int64ToAuxInt(c)
  3299  			v.AddArg2(x0, y)
  3300  			return true
  3301  		}
  3302  		break
  3303  	}
  3304  	// match: (AND x0 x1:(SRAconst [c] y))
  3305  	// cond: clobberIfDead(x1)
  3306  	// result: (ANDshiftRA x0 y [c])
  3307  	for {
  3308  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3309  			x0 := v_0
  3310  			x1 := v_1
  3311  			if x1.Op != OpARM64SRAconst {
  3312  				continue
  3313  			}
  3314  			c := auxIntToInt64(x1.AuxInt)
  3315  			y := x1.Args[0]
  3316  			if !(clobberIfDead(x1)) {
  3317  				continue
  3318  			}
  3319  			v.reset(OpARM64ANDshiftRA)
  3320  			v.AuxInt = int64ToAuxInt(c)
  3321  			v.AddArg2(x0, y)
  3322  			return true
  3323  		}
  3324  		break
  3325  	}
  3326  	// match: (AND x0 x1:(RORconst [c] y))
  3327  	// cond: clobberIfDead(x1)
  3328  	// result: (ANDshiftRO x0 y [c])
  3329  	for {
  3330  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3331  			x0 := v_0
  3332  			x1 := v_1
  3333  			if x1.Op != OpARM64RORconst {
  3334  				continue
  3335  			}
  3336  			c := auxIntToInt64(x1.AuxInt)
  3337  			y := x1.Args[0]
  3338  			if !(clobberIfDead(x1)) {
  3339  				continue
  3340  			}
  3341  			v.reset(OpARM64ANDshiftRO)
  3342  			v.AuxInt = int64ToAuxInt(c)
  3343  			v.AddArg2(x0, y)
  3344  			return true
  3345  		}
  3346  		break
  3347  	}
  3348  	return false
  3349  }
  3350  func rewriteValueARM64_OpARM64ANDconst(v *Value) bool {
  3351  	v_0 := v.Args[0]
  3352  	// match: (ANDconst [0] _)
  3353  	// result: (MOVDconst [0])
  3354  	for {
  3355  		if auxIntToInt64(v.AuxInt) != 0 {
  3356  			break
  3357  		}
  3358  		v.reset(OpARM64MOVDconst)
  3359  		v.AuxInt = int64ToAuxInt(0)
  3360  		return true
  3361  	}
  3362  	// match: (ANDconst [-1] x)
  3363  	// result: x
  3364  	for {
  3365  		if auxIntToInt64(v.AuxInt) != -1 {
  3366  			break
  3367  		}
  3368  		x := v_0
  3369  		v.copyOf(x)
  3370  		return true
  3371  	}
  3372  	// match: (ANDconst [c] (MOVDconst [d]))
  3373  	// result: (MOVDconst [c&d])
  3374  	for {
  3375  		c := auxIntToInt64(v.AuxInt)
  3376  		if v_0.Op != OpARM64MOVDconst {
  3377  			break
  3378  		}
  3379  		d := auxIntToInt64(v_0.AuxInt)
  3380  		v.reset(OpARM64MOVDconst)
  3381  		v.AuxInt = int64ToAuxInt(c & d)
  3382  		return true
  3383  	}
  3384  	// match: (ANDconst [c] (ANDconst [d] x))
  3385  	// result: (ANDconst [c&d] x)
  3386  	for {
  3387  		c := auxIntToInt64(v.AuxInt)
  3388  		if v_0.Op != OpARM64ANDconst {
  3389  			break
  3390  		}
  3391  		d := auxIntToInt64(v_0.AuxInt)
  3392  		x := v_0.Args[0]
  3393  		v.reset(OpARM64ANDconst)
  3394  		v.AuxInt = int64ToAuxInt(c & d)
  3395  		v.AddArg(x)
  3396  		return true
  3397  	}
  3398  	// match: (ANDconst [c] (MOVWUreg x))
  3399  	// result: (ANDconst [c&(1<<32-1)] x)
  3400  	for {
  3401  		c := auxIntToInt64(v.AuxInt)
  3402  		if v_0.Op != OpARM64MOVWUreg {
  3403  			break
  3404  		}
  3405  		x := v_0.Args[0]
  3406  		v.reset(OpARM64ANDconst)
  3407  		v.AuxInt = int64ToAuxInt(c & (1<<32 - 1))
  3408  		v.AddArg(x)
  3409  		return true
  3410  	}
  3411  	// match: (ANDconst [c] (MOVHUreg x))
  3412  	// result: (ANDconst [c&(1<<16-1)] x)
  3413  	for {
  3414  		c := auxIntToInt64(v.AuxInt)
  3415  		if v_0.Op != OpARM64MOVHUreg {
  3416  			break
  3417  		}
  3418  		x := v_0.Args[0]
  3419  		v.reset(OpARM64ANDconst)
  3420  		v.AuxInt = int64ToAuxInt(c & (1<<16 - 1))
  3421  		v.AddArg(x)
  3422  		return true
  3423  	}
  3424  	// match: (ANDconst [c] (MOVBUreg x))
  3425  	// result: (ANDconst [c&(1<<8-1)] x)
  3426  	for {
  3427  		c := auxIntToInt64(v.AuxInt)
  3428  		if v_0.Op != OpARM64MOVBUreg {
  3429  			break
  3430  		}
  3431  		x := v_0.Args[0]
  3432  		v.reset(OpARM64ANDconst)
  3433  		v.AuxInt = int64ToAuxInt(c & (1<<8 - 1))
  3434  		v.AddArg(x)
  3435  		return true
  3436  	}
  3437  	// match: (ANDconst [ac] (SLLconst [sc] x))
  3438  	// cond: isARM64BFMask(sc, ac, sc)
  3439  	// result: (UBFIZ [armBFAuxInt(sc, arm64BFWidth(ac, sc))] x)
  3440  	for {
  3441  		ac := auxIntToInt64(v.AuxInt)
  3442  		if v_0.Op != OpARM64SLLconst {
  3443  			break
  3444  		}
  3445  		sc := auxIntToInt64(v_0.AuxInt)
  3446  		x := v_0.Args[0]
  3447  		if !(isARM64BFMask(sc, ac, sc)) {
  3448  			break
  3449  		}
  3450  		v.reset(OpARM64UBFIZ)
  3451  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, sc)))
  3452  		v.AddArg(x)
  3453  		return true
  3454  	}
  3455  	// match: (ANDconst [ac] (SRLconst [sc] x))
  3456  	// cond: isARM64BFMask(sc, ac, 0)
  3457  	// result: (UBFX [armBFAuxInt(sc, arm64BFWidth(ac, 0))] x)
  3458  	for {
  3459  		ac := auxIntToInt64(v.AuxInt)
  3460  		if v_0.Op != OpARM64SRLconst {
  3461  			break
  3462  		}
  3463  		sc := auxIntToInt64(v_0.AuxInt)
  3464  		x := v_0.Args[0]
  3465  		if !(isARM64BFMask(sc, ac, 0)) {
  3466  			break
  3467  		}
  3468  		v.reset(OpARM64UBFX)
  3469  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, 0)))
  3470  		v.AddArg(x)
  3471  		return true
  3472  	}
  3473  	// match: (ANDconst [c] (UBFX [bfc] x))
  3474  	// cond: isARM64BFMask(0, c, 0)
  3475  	// result: (UBFX [armBFAuxInt(bfc.lsb(), min(bfc.width(), arm64BFWidth(c, 0)))] x)
  3476  	for {
  3477  		c := auxIntToInt64(v.AuxInt)
  3478  		if v_0.Op != OpARM64UBFX {
  3479  			break
  3480  		}
  3481  		bfc := auxIntToArm64BitField(v_0.AuxInt)
  3482  		x := v_0.Args[0]
  3483  		if !(isARM64BFMask(0, c, 0)) {
  3484  			break
  3485  		}
  3486  		v.reset(OpARM64UBFX)
  3487  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), arm64BFWidth(c, 0))))
  3488  		v.AddArg(x)
  3489  		return true
  3490  	}
  3491  	// match: (ANDconst [0xffffffff] x)
  3492  	// result: (MOVWUreg x)
  3493  	for {
  3494  		if auxIntToInt64(v.AuxInt) != 0xffffffff {
  3495  			break
  3496  		}
  3497  		x := v_0
  3498  		v.reset(OpARM64MOVWUreg)
  3499  		v.AddArg(x)
  3500  		return true
  3501  	}
  3502  	// match: (ANDconst [0xffff ] x)
  3503  	// result: (MOVHUreg x)
  3504  	for {
  3505  		if auxIntToInt64(v.AuxInt) != 0xffff {
  3506  			break
  3507  		}
  3508  		x := v_0
  3509  		v.reset(OpARM64MOVHUreg)
  3510  		v.AddArg(x)
  3511  		return true
  3512  	}
  3513  	// match: (ANDconst [0xff ] x)
  3514  	// result: (MOVBUreg x)
  3515  	for {
  3516  		if auxIntToInt64(v.AuxInt) != 0xff {
  3517  			break
  3518  		}
  3519  		x := v_0
  3520  		v.reset(OpARM64MOVBUreg)
  3521  		v.AddArg(x)
  3522  		return true
  3523  	}
  3524  	return false
  3525  }
  3526  func rewriteValueARM64_OpARM64ANDshiftLL(v *Value) bool {
  3527  	v_1 := v.Args[1]
  3528  	v_0 := v.Args[0]
  3529  	b := v.Block
  3530  	// match: (ANDshiftLL (MOVDconst [c]) x [d])
  3531  	// result: (ANDconst [c] (SLLconst <x.Type> x [d]))
  3532  	for {
  3533  		d := auxIntToInt64(v.AuxInt)
  3534  		if v_0.Op != OpARM64MOVDconst {
  3535  			break
  3536  		}
  3537  		c := auxIntToInt64(v_0.AuxInt)
  3538  		x := v_1
  3539  		v.reset(OpARM64ANDconst)
  3540  		v.AuxInt = int64ToAuxInt(c)
  3541  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  3542  		v0.AuxInt = int64ToAuxInt(d)
  3543  		v0.AddArg(x)
  3544  		v.AddArg(v0)
  3545  		return true
  3546  	}
  3547  	// match: (ANDshiftLL x (MOVDconst [c]) [d])
  3548  	// result: (ANDconst x [int64(uint64(c)<<uint64(d))])
  3549  	for {
  3550  		d := auxIntToInt64(v.AuxInt)
  3551  		x := v_0
  3552  		if v_1.Op != OpARM64MOVDconst {
  3553  			break
  3554  		}
  3555  		c := auxIntToInt64(v_1.AuxInt)
  3556  		v.reset(OpARM64ANDconst)
  3557  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
  3558  		v.AddArg(x)
  3559  		return true
  3560  	}
  3561  	// match: (ANDshiftLL y:(SLLconst x [c]) x [c])
  3562  	// result: y
  3563  	for {
  3564  		c := auxIntToInt64(v.AuxInt)
  3565  		y := v_0
  3566  		if y.Op != OpARM64SLLconst || auxIntToInt64(y.AuxInt) != c {
  3567  			break
  3568  		}
  3569  		x := y.Args[0]
  3570  		if x != v_1 {
  3571  			break
  3572  		}
  3573  		v.copyOf(y)
  3574  		return true
  3575  	}
  3576  	return false
  3577  }
  3578  func rewriteValueARM64_OpARM64ANDshiftRA(v *Value) bool {
  3579  	v_1 := v.Args[1]
  3580  	v_0 := v.Args[0]
  3581  	b := v.Block
  3582  	// match: (ANDshiftRA (MOVDconst [c]) x [d])
  3583  	// result: (ANDconst [c] (SRAconst <x.Type> x [d]))
  3584  	for {
  3585  		d := auxIntToInt64(v.AuxInt)
  3586  		if v_0.Op != OpARM64MOVDconst {
  3587  			break
  3588  		}
  3589  		c := auxIntToInt64(v_0.AuxInt)
  3590  		x := v_1
  3591  		v.reset(OpARM64ANDconst)
  3592  		v.AuxInt = int64ToAuxInt(c)
  3593  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
  3594  		v0.AuxInt = int64ToAuxInt(d)
  3595  		v0.AddArg(x)
  3596  		v.AddArg(v0)
  3597  		return true
  3598  	}
  3599  	// match: (ANDshiftRA x (MOVDconst [c]) [d])
  3600  	// result: (ANDconst x [c>>uint64(d)])
  3601  	for {
  3602  		d := auxIntToInt64(v.AuxInt)
  3603  		x := v_0
  3604  		if v_1.Op != OpARM64MOVDconst {
  3605  			break
  3606  		}
  3607  		c := auxIntToInt64(v_1.AuxInt)
  3608  		v.reset(OpARM64ANDconst)
  3609  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
  3610  		v.AddArg(x)
  3611  		return true
  3612  	}
  3613  	// match: (ANDshiftRA y:(SRAconst x [c]) x [c])
  3614  	// result: y
  3615  	for {
  3616  		c := auxIntToInt64(v.AuxInt)
  3617  		y := v_0
  3618  		if y.Op != OpARM64SRAconst || auxIntToInt64(y.AuxInt) != c {
  3619  			break
  3620  		}
  3621  		x := y.Args[0]
  3622  		if x != v_1 {
  3623  			break
  3624  		}
  3625  		v.copyOf(y)
  3626  		return true
  3627  	}
  3628  	return false
  3629  }
  3630  func rewriteValueARM64_OpARM64ANDshiftRL(v *Value) bool {
  3631  	v_1 := v.Args[1]
  3632  	v_0 := v.Args[0]
  3633  	b := v.Block
  3634  	// match: (ANDshiftRL (MOVDconst [c]) x [d])
  3635  	// result: (ANDconst [c] (SRLconst <x.Type> x [d]))
  3636  	for {
  3637  		d := auxIntToInt64(v.AuxInt)
  3638  		if v_0.Op != OpARM64MOVDconst {
  3639  			break
  3640  		}
  3641  		c := auxIntToInt64(v_0.AuxInt)
  3642  		x := v_1
  3643  		v.reset(OpARM64ANDconst)
  3644  		v.AuxInt = int64ToAuxInt(c)
  3645  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
  3646  		v0.AuxInt = int64ToAuxInt(d)
  3647  		v0.AddArg(x)
  3648  		v.AddArg(v0)
  3649  		return true
  3650  	}
  3651  	// match: (ANDshiftRL x (MOVDconst [c]) [d])
  3652  	// result: (ANDconst x [int64(uint64(c)>>uint64(d))])
  3653  	for {
  3654  		d := auxIntToInt64(v.AuxInt)
  3655  		x := v_0
  3656  		if v_1.Op != OpARM64MOVDconst {
  3657  			break
  3658  		}
  3659  		c := auxIntToInt64(v_1.AuxInt)
  3660  		v.reset(OpARM64ANDconst)
  3661  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
  3662  		v.AddArg(x)
  3663  		return true
  3664  	}
  3665  	// match: (ANDshiftRL y:(SRLconst x [c]) x [c])
  3666  	// result: y
  3667  	for {
  3668  		c := auxIntToInt64(v.AuxInt)
  3669  		y := v_0
  3670  		if y.Op != OpARM64SRLconst || auxIntToInt64(y.AuxInt) != c {
  3671  			break
  3672  		}
  3673  		x := y.Args[0]
  3674  		if x != v_1 {
  3675  			break
  3676  		}
  3677  		v.copyOf(y)
  3678  		return true
  3679  	}
  3680  	return false
  3681  }
  3682  func rewriteValueARM64_OpARM64ANDshiftRO(v *Value) bool {
  3683  	v_1 := v.Args[1]
  3684  	v_0 := v.Args[0]
  3685  	b := v.Block
  3686  	// match: (ANDshiftRO (MOVDconst [c]) x [d])
  3687  	// result: (ANDconst [c] (RORconst <x.Type> x [d]))
  3688  	for {
  3689  		d := auxIntToInt64(v.AuxInt)
  3690  		if v_0.Op != OpARM64MOVDconst {
  3691  			break
  3692  		}
  3693  		c := auxIntToInt64(v_0.AuxInt)
  3694  		x := v_1
  3695  		v.reset(OpARM64ANDconst)
  3696  		v.AuxInt = int64ToAuxInt(c)
  3697  		v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
  3698  		v0.AuxInt = int64ToAuxInt(d)
  3699  		v0.AddArg(x)
  3700  		v.AddArg(v0)
  3701  		return true
  3702  	}
  3703  	// match: (ANDshiftRO x (MOVDconst [c]) [d])
  3704  	// result: (ANDconst x [rotateRight64(c, d)])
  3705  	for {
  3706  		d := auxIntToInt64(v.AuxInt)
  3707  		x := v_0
  3708  		if v_1.Op != OpARM64MOVDconst {
  3709  			break
  3710  		}
  3711  		c := auxIntToInt64(v_1.AuxInt)
  3712  		v.reset(OpARM64ANDconst)
  3713  		v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
  3714  		v.AddArg(x)
  3715  		return true
  3716  	}
  3717  	// match: (ANDshiftRO y:(RORconst x [c]) x [c])
  3718  	// result: y
  3719  	for {
  3720  		c := auxIntToInt64(v.AuxInt)
  3721  		y := v_0
  3722  		if y.Op != OpARM64RORconst || auxIntToInt64(y.AuxInt) != c {
  3723  			break
  3724  		}
  3725  		x := y.Args[0]
  3726  		if x != v_1 {
  3727  			break
  3728  		}
  3729  		v.copyOf(y)
  3730  		return true
  3731  	}
  3732  	return false
  3733  }
  3734  func rewriteValueARM64_OpARM64BIC(v *Value) bool {
  3735  	v_1 := v.Args[1]
  3736  	v_0 := v.Args[0]
  3737  	// match: (BIC x (MOVDconst [c]))
  3738  	// result: (ANDconst [^c] x)
  3739  	for {
  3740  		x := v_0
  3741  		if v_1.Op != OpARM64MOVDconst {
  3742  			break
  3743  		}
  3744  		c := auxIntToInt64(v_1.AuxInt)
  3745  		v.reset(OpARM64ANDconst)
  3746  		v.AuxInt = int64ToAuxInt(^c)
  3747  		v.AddArg(x)
  3748  		return true
  3749  	}
  3750  	// match: (BIC x x)
  3751  	// result: (MOVDconst [0])
  3752  	for {
  3753  		x := v_0
  3754  		if x != v_1 {
  3755  			break
  3756  		}
  3757  		v.reset(OpARM64MOVDconst)
  3758  		v.AuxInt = int64ToAuxInt(0)
  3759  		return true
  3760  	}
  3761  	// match: (BIC x0 x1:(SLLconst [c] y))
  3762  	// cond: clobberIfDead(x1)
  3763  	// result: (BICshiftLL x0 y [c])
  3764  	for {
  3765  		x0 := v_0
  3766  		x1 := v_1
  3767  		if x1.Op != OpARM64SLLconst {
  3768  			break
  3769  		}
  3770  		c := auxIntToInt64(x1.AuxInt)
  3771  		y := x1.Args[0]
  3772  		if !(clobberIfDead(x1)) {
  3773  			break
  3774  		}
  3775  		v.reset(OpARM64BICshiftLL)
  3776  		v.AuxInt = int64ToAuxInt(c)
  3777  		v.AddArg2(x0, y)
  3778  		return true
  3779  	}
  3780  	// match: (BIC x0 x1:(SRLconst [c] y))
  3781  	// cond: clobberIfDead(x1)
  3782  	// result: (BICshiftRL x0 y [c])
  3783  	for {
  3784  		x0 := v_0
  3785  		x1 := v_1
  3786  		if x1.Op != OpARM64SRLconst {
  3787  			break
  3788  		}
  3789  		c := auxIntToInt64(x1.AuxInt)
  3790  		y := x1.Args[0]
  3791  		if !(clobberIfDead(x1)) {
  3792  			break
  3793  		}
  3794  		v.reset(OpARM64BICshiftRL)
  3795  		v.AuxInt = int64ToAuxInt(c)
  3796  		v.AddArg2(x0, y)
  3797  		return true
  3798  	}
  3799  	// match: (BIC x0 x1:(SRAconst [c] y))
  3800  	// cond: clobberIfDead(x1)
  3801  	// result: (BICshiftRA x0 y [c])
  3802  	for {
  3803  		x0 := v_0
  3804  		x1 := v_1
  3805  		if x1.Op != OpARM64SRAconst {
  3806  			break
  3807  		}
  3808  		c := auxIntToInt64(x1.AuxInt)
  3809  		y := x1.Args[0]
  3810  		if !(clobberIfDead(x1)) {
  3811  			break
  3812  		}
  3813  		v.reset(OpARM64BICshiftRA)
  3814  		v.AuxInt = int64ToAuxInt(c)
  3815  		v.AddArg2(x0, y)
  3816  		return true
  3817  	}
  3818  	// match: (BIC x0 x1:(RORconst [c] y))
  3819  	// cond: clobberIfDead(x1)
  3820  	// result: (BICshiftRO x0 y [c])
  3821  	for {
  3822  		x0 := v_0
  3823  		x1 := v_1
  3824  		if x1.Op != OpARM64RORconst {
  3825  			break
  3826  		}
  3827  		c := auxIntToInt64(x1.AuxInt)
  3828  		y := x1.Args[0]
  3829  		if !(clobberIfDead(x1)) {
  3830  			break
  3831  		}
  3832  		v.reset(OpARM64BICshiftRO)
  3833  		v.AuxInt = int64ToAuxInt(c)
  3834  		v.AddArg2(x0, y)
  3835  		return true
  3836  	}
  3837  	return false
  3838  }
  3839  func rewriteValueARM64_OpARM64BICshiftLL(v *Value) bool {
  3840  	v_1 := v.Args[1]
  3841  	v_0 := v.Args[0]
  3842  	// match: (BICshiftLL x (MOVDconst [c]) [d])
  3843  	// result: (ANDconst x [^int64(uint64(c)<<uint64(d))])
  3844  	for {
  3845  		d := auxIntToInt64(v.AuxInt)
  3846  		x := v_0
  3847  		if v_1.Op != OpARM64MOVDconst {
  3848  			break
  3849  		}
  3850  		c := auxIntToInt64(v_1.AuxInt)
  3851  		v.reset(OpARM64ANDconst)
  3852  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
  3853  		v.AddArg(x)
  3854  		return true
  3855  	}
  3856  	// match: (BICshiftLL (SLLconst x [c]) x [c])
  3857  	// result: (MOVDconst [0])
  3858  	for {
  3859  		c := auxIntToInt64(v.AuxInt)
  3860  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
  3861  			break
  3862  		}
  3863  		x := v_0.Args[0]
  3864  		if x != v_1 {
  3865  			break
  3866  		}
  3867  		v.reset(OpARM64MOVDconst)
  3868  		v.AuxInt = int64ToAuxInt(0)
  3869  		return true
  3870  	}
  3871  	return false
  3872  }
  3873  func rewriteValueARM64_OpARM64BICshiftRA(v *Value) bool {
  3874  	v_1 := v.Args[1]
  3875  	v_0 := v.Args[0]
  3876  	// match: (BICshiftRA x (MOVDconst [c]) [d])
  3877  	// result: (ANDconst x [^(c>>uint64(d))])
  3878  	for {
  3879  		d := auxIntToInt64(v.AuxInt)
  3880  		x := v_0
  3881  		if v_1.Op != OpARM64MOVDconst {
  3882  			break
  3883  		}
  3884  		c := auxIntToInt64(v_1.AuxInt)
  3885  		v.reset(OpARM64ANDconst)
  3886  		v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
  3887  		v.AddArg(x)
  3888  		return true
  3889  	}
  3890  	// match: (BICshiftRA (SRAconst x [c]) x [c])
  3891  	// result: (MOVDconst [0])
  3892  	for {
  3893  		c := auxIntToInt64(v.AuxInt)
  3894  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
  3895  			break
  3896  		}
  3897  		x := v_0.Args[0]
  3898  		if x != v_1 {
  3899  			break
  3900  		}
  3901  		v.reset(OpARM64MOVDconst)
  3902  		v.AuxInt = int64ToAuxInt(0)
  3903  		return true
  3904  	}
  3905  	return false
  3906  }
  3907  func rewriteValueARM64_OpARM64BICshiftRL(v *Value) bool {
  3908  	v_1 := v.Args[1]
  3909  	v_0 := v.Args[0]
  3910  	// match: (BICshiftRL x (MOVDconst [c]) [d])
  3911  	// result: (ANDconst x [^int64(uint64(c)>>uint64(d))])
  3912  	for {
  3913  		d := auxIntToInt64(v.AuxInt)
  3914  		x := v_0
  3915  		if v_1.Op != OpARM64MOVDconst {
  3916  			break
  3917  		}
  3918  		c := auxIntToInt64(v_1.AuxInt)
  3919  		v.reset(OpARM64ANDconst)
  3920  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
  3921  		v.AddArg(x)
  3922  		return true
  3923  	}
  3924  	// match: (BICshiftRL (SRLconst x [c]) x [c])
  3925  	// result: (MOVDconst [0])
  3926  	for {
  3927  		c := auxIntToInt64(v.AuxInt)
  3928  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
  3929  			break
  3930  		}
  3931  		x := v_0.Args[0]
  3932  		if x != v_1 {
  3933  			break
  3934  		}
  3935  		v.reset(OpARM64MOVDconst)
  3936  		v.AuxInt = int64ToAuxInt(0)
  3937  		return true
  3938  	}
  3939  	return false
  3940  }
  3941  func rewriteValueARM64_OpARM64BICshiftRO(v *Value) bool {
  3942  	v_1 := v.Args[1]
  3943  	v_0 := v.Args[0]
  3944  	// match: (BICshiftRO x (MOVDconst [c]) [d])
  3945  	// result: (ANDconst x [^rotateRight64(c, d)])
  3946  	for {
  3947  		d := auxIntToInt64(v.AuxInt)
  3948  		x := v_0
  3949  		if v_1.Op != OpARM64MOVDconst {
  3950  			break
  3951  		}
  3952  		c := auxIntToInt64(v_1.AuxInt)
  3953  		v.reset(OpARM64ANDconst)
  3954  		v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
  3955  		v.AddArg(x)
  3956  		return true
  3957  	}
  3958  	// match: (BICshiftRO (RORconst x [c]) x [c])
  3959  	// result: (MOVDconst [0])
  3960  	for {
  3961  		c := auxIntToInt64(v.AuxInt)
  3962  		if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
  3963  			break
  3964  		}
  3965  		x := v_0.Args[0]
  3966  		if x != v_1 {
  3967  			break
  3968  		}
  3969  		v.reset(OpARM64MOVDconst)
  3970  		v.AuxInt = int64ToAuxInt(0)
  3971  		return true
  3972  	}
  3973  	return false
  3974  }
  3975  func rewriteValueARM64_OpARM64CMN(v *Value) bool {
  3976  	v_1 := v.Args[1]
  3977  	v_0 := v.Args[0]
  3978  	// match: (CMN x (MOVDconst [c]))
  3979  	// result: (CMNconst [c] x)
  3980  	for {
  3981  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3982  			x := v_0
  3983  			if v_1.Op != OpARM64MOVDconst {
  3984  				continue
  3985  			}
  3986  			c := auxIntToInt64(v_1.AuxInt)
  3987  			v.reset(OpARM64CMNconst)
  3988  			v.AuxInt = int64ToAuxInt(c)
  3989  			v.AddArg(x)
  3990  			return true
  3991  		}
  3992  		break
  3993  	}
  3994  	// match: (CMN x0 x1:(SLLconst [c] y))
  3995  	// cond: clobberIfDead(x1)
  3996  	// result: (CMNshiftLL x0 y [c])
  3997  	for {
  3998  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3999  			x0 := v_0
  4000  			x1 := v_1
  4001  			if x1.Op != OpARM64SLLconst {
  4002  				continue
  4003  			}
  4004  			c := auxIntToInt64(x1.AuxInt)
  4005  			y := x1.Args[0]
  4006  			if !(clobberIfDead(x1)) {
  4007  				continue
  4008  			}
  4009  			v.reset(OpARM64CMNshiftLL)
  4010  			v.AuxInt = int64ToAuxInt(c)
  4011  			v.AddArg2(x0, y)
  4012  			return true
  4013  		}
  4014  		break
  4015  	}
  4016  	// match: (CMN x0 x1:(SRLconst [c] y))
  4017  	// cond: clobberIfDead(x1)
  4018  	// result: (CMNshiftRL x0 y [c])
  4019  	for {
  4020  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4021  			x0 := v_0
  4022  			x1 := v_1
  4023  			if x1.Op != OpARM64SRLconst {
  4024  				continue
  4025  			}
  4026  			c := auxIntToInt64(x1.AuxInt)
  4027  			y := x1.Args[0]
  4028  			if !(clobberIfDead(x1)) {
  4029  				continue
  4030  			}
  4031  			v.reset(OpARM64CMNshiftRL)
  4032  			v.AuxInt = int64ToAuxInt(c)
  4033  			v.AddArg2(x0, y)
  4034  			return true
  4035  		}
  4036  		break
  4037  	}
  4038  	// match: (CMN x0 x1:(SRAconst [c] y))
  4039  	// cond: clobberIfDead(x1)
  4040  	// result: (CMNshiftRA x0 y [c])
  4041  	for {
  4042  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4043  			x0 := v_0
  4044  			x1 := v_1
  4045  			if x1.Op != OpARM64SRAconst {
  4046  				continue
  4047  			}
  4048  			c := auxIntToInt64(x1.AuxInt)
  4049  			y := x1.Args[0]
  4050  			if !(clobberIfDead(x1)) {
  4051  				continue
  4052  			}
  4053  			v.reset(OpARM64CMNshiftRA)
  4054  			v.AuxInt = int64ToAuxInt(c)
  4055  			v.AddArg2(x0, y)
  4056  			return true
  4057  		}
  4058  		break
  4059  	}
  4060  	return false
  4061  }
  4062  func rewriteValueARM64_OpARM64CMNW(v *Value) bool {
  4063  	v_1 := v.Args[1]
  4064  	v_0 := v.Args[0]
  4065  	// match: (CMNW x (MOVDconst [c]))
  4066  	// result: (CMNWconst [int32(c)] x)
  4067  	for {
  4068  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4069  			x := v_0
  4070  			if v_1.Op != OpARM64MOVDconst {
  4071  				continue
  4072  			}
  4073  			c := auxIntToInt64(v_1.AuxInt)
  4074  			v.reset(OpARM64CMNWconst)
  4075  			v.AuxInt = int32ToAuxInt(int32(c))
  4076  			v.AddArg(x)
  4077  			return true
  4078  		}
  4079  		break
  4080  	}
  4081  	return false
  4082  }
  4083  func rewriteValueARM64_OpARM64CMNWconst(v *Value) bool {
  4084  	v_0 := v.Args[0]
  4085  	// match: (CMNWconst [c] y)
  4086  	// cond: c < 0 && c != -1<<31
  4087  	// result: (CMPWconst [-c] y)
  4088  	for {
  4089  		c := auxIntToInt32(v.AuxInt)
  4090  		y := v_0
  4091  		if !(c < 0 && c != -1<<31) {
  4092  			break
  4093  		}
  4094  		v.reset(OpARM64CMPWconst)
  4095  		v.AuxInt = int32ToAuxInt(-c)
  4096  		v.AddArg(y)
  4097  		return true
  4098  	}
  4099  	// match: (CMNWconst (MOVDconst [x]) [y])
  4100  	// result: (FlagConstant [addFlags32(int32(x),y)])
  4101  	for {
  4102  		y := auxIntToInt32(v.AuxInt)
  4103  		if v_0.Op != OpARM64MOVDconst {
  4104  			break
  4105  		}
  4106  		x := auxIntToInt64(v_0.AuxInt)
  4107  		v.reset(OpARM64FlagConstant)
  4108  		v.AuxInt = flagConstantToAuxInt(addFlags32(int32(x), y))
  4109  		return true
  4110  	}
  4111  	return false
  4112  }
  4113  func rewriteValueARM64_OpARM64CMNconst(v *Value) bool {
  4114  	v_0 := v.Args[0]
  4115  	// match: (CMNconst [c] y)
  4116  	// cond: c < 0 && c != -1<<63
  4117  	// result: (CMPconst [-c] y)
  4118  	for {
  4119  		c := auxIntToInt64(v.AuxInt)
  4120  		y := v_0
  4121  		if !(c < 0 && c != -1<<63) {
  4122  			break
  4123  		}
  4124  		v.reset(OpARM64CMPconst)
  4125  		v.AuxInt = int64ToAuxInt(-c)
  4126  		v.AddArg(y)
  4127  		return true
  4128  	}
  4129  	// match: (CMNconst (MOVDconst [x]) [y])
  4130  	// result: (FlagConstant [addFlags64(x,y)])
  4131  	for {
  4132  		y := auxIntToInt64(v.AuxInt)
  4133  		if v_0.Op != OpARM64MOVDconst {
  4134  			break
  4135  		}
  4136  		x := auxIntToInt64(v_0.AuxInt)
  4137  		v.reset(OpARM64FlagConstant)
  4138  		v.AuxInt = flagConstantToAuxInt(addFlags64(x, y))
  4139  		return true
  4140  	}
  4141  	return false
  4142  }
  4143  func rewriteValueARM64_OpARM64CMNshiftLL(v *Value) bool {
  4144  	v_1 := v.Args[1]
  4145  	v_0 := v.Args[0]
  4146  	b := v.Block
  4147  	// match: (CMNshiftLL (MOVDconst [c]) x [d])
  4148  	// result: (CMNconst [c] (SLLconst <x.Type> x [d]))
  4149  	for {
  4150  		d := auxIntToInt64(v.AuxInt)
  4151  		if v_0.Op != OpARM64MOVDconst {
  4152  			break
  4153  		}
  4154  		c := auxIntToInt64(v_0.AuxInt)
  4155  		x := v_1
  4156  		v.reset(OpARM64CMNconst)
  4157  		v.AuxInt = int64ToAuxInt(c)
  4158  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  4159  		v0.AuxInt = int64ToAuxInt(d)
  4160  		v0.AddArg(x)
  4161  		v.AddArg(v0)
  4162  		return true
  4163  	}
  4164  	// match: (CMNshiftLL x (MOVDconst [c]) [d])
  4165  	// result: (CMNconst x [int64(uint64(c)<<uint64(d))])
  4166  	for {
  4167  		d := auxIntToInt64(v.AuxInt)
  4168  		x := v_0
  4169  		if v_1.Op != OpARM64MOVDconst {
  4170  			break
  4171  		}
  4172  		c := auxIntToInt64(v_1.AuxInt)
  4173  		v.reset(OpARM64CMNconst)
  4174  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
  4175  		v.AddArg(x)
  4176  		return true
  4177  	}
  4178  	return false
  4179  }
  4180  func rewriteValueARM64_OpARM64CMNshiftRA(v *Value) bool {
  4181  	v_1 := v.Args[1]
  4182  	v_0 := v.Args[0]
  4183  	b := v.Block
  4184  	// match: (CMNshiftRA (MOVDconst [c]) x [d])
  4185  	// result: (CMNconst [c] (SRAconst <x.Type> x [d]))
  4186  	for {
  4187  		d := auxIntToInt64(v.AuxInt)
  4188  		if v_0.Op != OpARM64MOVDconst {
  4189  			break
  4190  		}
  4191  		c := auxIntToInt64(v_0.AuxInt)
  4192  		x := v_1
  4193  		v.reset(OpARM64CMNconst)
  4194  		v.AuxInt = int64ToAuxInt(c)
  4195  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
  4196  		v0.AuxInt = int64ToAuxInt(d)
  4197  		v0.AddArg(x)
  4198  		v.AddArg(v0)
  4199  		return true
  4200  	}
  4201  	// match: (CMNshiftRA x (MOVDconst [c]) [d])
  4202  	// result: (CMNconst x [c>>uint64(d)])
  4203  	for {
  4204  		d := auxIntToInt64(v.AuxInt)
  4205  		x := v_0
  4206  		if v_1.Op != OpARM64MOVDconst {
  4207  			break
  4208  		}
  4209  		c := auxIntToInt64(v_1.AuxInt)
  4210  		v.reset(OpARM64CMNconst)
  4211  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
  4212  		v.AddArg(x)
  4213  		return true
  4214  	}
  4215  	return false
  4216  }
  4217  func rewriteValueARM64_OpARM64CMNshiftRL(v *Value) bool {
  4218  	v_1 := v.Args[1]
  4219  	v_0 := v.Args[0]
  4220  	b := v.Block
  4221  	// match: (CMNshiftRL (MOVDconst [c]) x [d])
  4222  	// result: (CMNconst [c] (SRLconst <x.Type> x [d]))
  4223  	for {
  4224  		d := auxIntToInt64(v.AuxInt)
  4225  		if v_0.Op != OpARM64MOVDconst {
  4226  			break
  4227  		}
  4228  		c := auxIntToInt64(v_0.AuxInt)
  4229  		x := v_1
  4230  		v.reset(OpARM64CMNconst)
  4231  		v.AuxInt = int64ToAuxInt(c)
  4232  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
  4233  		v0.AuxInt = int64ToAuxInt(d)
  4234  		v0.AddArg(x)
  4235  		v.AddArg(v0)
  4236  		return true
  4237  	}
  4238  	// match: (CMNshiftRL x (MOVDconst [c]) [d])
  4239  	// result: (CMNconst x [int64(uint64(c)>>uint64(d))])
  4240  	for {
  4241  		d := auxIntToInt64(v.AuxInt)
  4242  		x := v_0
  4243  		if v_1.Op != OpARM64MOVDconst {
  4244  			break
  4245  		}
  4246  		c := auxIntToInt64(v_1.AuxInt)
  4247  		v.reset(OpARM64CMNconst)
  4248  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
  4249  		v.AddArg(x)
  4250  		return true
  4251  	}
  4252  	return false
  4253  }
  4254  func rewriteValueARM64_OpARM64CMP(v *Value) bool {
  4255  	v_1 := v.Args[1]
  4256  	v_0 := v.Args[0]
  4257  	b := v.Block
  4258  	// match: (CMP x (MOVDconst [c]))
  4259  	// result: (CMPconst [c] x)
  4260  	for {
  4261  		x := v_0
  4262  		if v_1.Op != OpARM64MOVDconst {
  4263  			break
  4264  		}
  4265  		c := auxIntToInt64(v_1.AuxInt)
  4266  		v.reset(OpARM64CMPconst)
  4267  		v.AuxInt = int64ToAuxInt(c)
  4268  		v.AddArg(x)
  4269  		return true
  4270  	}
  4271  	// match: (CMP (MOVDconst [c]) x)
  4272  	// result: (InvertFlags (CMPconst [c] x))
  4273  	for {
  4274  		if v_0.Op != OpARM64MOVDconst {
  4275  			break
  4276  		}
  4277  		c := auxIntToInt64(v_0.AuxInt)
  4278  		x := v_1
  4279  		v.reset(OpARM64InvertFlags)
  4280  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
  4281  		v0.AuxInt = int64ToAuxInt(c)
  4282  		v0.AddArg(x)
  4283  		v.AddArg(v0)
  4284  		return true
  4285  	}
  4286  	// match: (CMP x y)
  4287  	// cond: canonLessThan(x,y)
  4288  	// result: (InvertFlags (CMP y x))
  4289  	for {
  4290  		x := v_0
  4291  		y := v_1
  4292  		if !(canonLessThan(x, y)) {
  4293  			break
  4294  		}
  4295  		v.reset(OpARM64InvertFlags)
  4296  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
  4297  		v0.AddArg2(y, x)
  4298  		v.AddArg(v0)
  4299  		return true
  4300  	}
  4301  	// match: (CMP x0 x1:(SLLconst [c] y))
  4302  	// cond: clobberIfDead(x1)
  4303  	// result: (CMPshiftLL x0 y [c])
  4304  	for {
  4305  		x0 := v_0
  4306  		x1 := v_1
  4307  		if x1.Op != OpARM64SLLconst {
  4308  			break
  4309  		}
  4310  		c := auxIntToInt64(x1.AuxInt)
  4311  		y := x1.Args[0]
  4312  		if !(clobberIfDead(x1)) {
  4313  			break
  4314  		}
  4315  		v.reset(OpARM64CMPshiftLL)
  4316  		v.AuxInt = int64ToAuxInt(c)
  4317  		v.AddArg2(x0, y)
  4318  		return true
  4319  	}
  4320  	// match: (CMP x0:(SLLconst [c] y) x1)
  4321  	// cond: clobberIfDead(x0)
  4322  	// result: (InvertFlags (CMPshiftLL x1 y [c]))
  4323  	for {
  4324  		x0 := v_0
  4325  		if x0.Op != OpARM64SLLconst {
  4326  			break
  4327  		}
  4328  		c := auxIntToInt64(x0.AuxInt)
  4329  		y := x0.Args[0]
  4330  		x1 := v_1
  4331  		if !(clobberIfDead(x0)) {
  4332  			break
  4333  		}
  4334  		v.reset(OpARM64InvertFlags)
  4335  		v0 := b.NewValue0(v.Pos, OpARM64CMPshiftLL, types.TypeFlags)
  4336  		v0.AuxInt = int64ToAuxInt(c)
  4337  		v0.AddArg2(x1, y)
  4338  		v.AddArg(v0)
  4339  		return true
  4340  	}
  4341  	// match: (CMP x0 x1:(SRLconst [c] y))
  4342  	// cond: clobberIfDead(x1)
  4343  	// result: (CMPshiftRL x0 y [c])
  4344  	for {
  4345  		x0 := v_0
  4346  		x1 := v_1
  4347  		if x1.Op != OpARM64SRLconst {
  4348  			break
  4349  		}
  4350  		c := auxIntToInt64(x1.AuxInt)
  4351  		y := x1.Args[0]
  4352  		if !(clobberIfDead(x1)) {
  4353  			break
  4354  		}
  4355  		v.reset(OpARM64CMPshiftRL)
  4356  		v.AuxInt = int64ToAuxInt(c)
  4357  		v.AddArg2(x0, y)
  4358  		return true
  4359  	}
  4360  	// match: (CMP x0:(SRLconst [c] y) x1)
  4361  	// cond: clobberIfDead(x0)
  4362  	// result: (InvertFlags (CMPshiftRL x1 y [c]))
  4363  	for {
  4364  		x0 := v_0
  4365  		if x0.Op != OpARM64SRLconst {
  4366  			break
  4367  		}
  4368  		c := auxIntToInt64(x0.AuxInt)
  4369  		y := x0.Args[0]
  4370  		x1 := v_1
  4371  		if !(clobberIfDead(x0)) {
  4372  			break
  4373  		}
  4374  		v.reset(OpARM64InvertFlags)
  4375  		v0 := b.NewValue0(v.Pos, OpARM64CMPshiftRL, types.TypeFlags)
  4376  		v0.AuxInt = int64ToAuxInt(c)
  4377  		v0.AddArg2(x1, y)
  4378  		v.AddArg(v0)
  4379  		return true
  4380  	}
  4381  	// match: (CMP x0 x1:(SRAconst [c] y))
  4382  	// cond: clobberIfDead(x1)
  4383  	// result: (CMPshiftRA x0 y [c])
  4384  	for {
  4385  		x0 := v_0
  4386  		x1 := v_1
  4387  		if x1.Op != OpARM64SRAconst {
  4388  			break
  4389  		}
  4390  		c := auxIntToInt64(x1.AuxInt)
  4391  		y := x1.Args[0]
  4392  		if !(clobberIfDead(x1)) {
  4393  			break
  4394  		}
  4395  		v.reset(OpARM64CMPshiftRA)
  4396  		v.AuxInt = int64ToAuxInt(c)
  4397  		v.AddArg2(x0, y)
  4398  		return true
  4399  	}
  4400  	// match: (CMP x0:(SRAconst [c] y) x1)
  4401  	// cond: clobberIfDead(x0)
  4402  	// result: (InvertFlags (CMPshiftRA x1 y [c]))
  4403  	for {
  4404  		x0 := v_0
  4405  		if x0.Op != OpARM64SRAconst {
  4406  			break
  4407  		}
  4408  		c := auxIntToInt64(x0.AuxInt)
  4409  		y := x0.Args[0]
  4410  		x1 := v_1
  4411  		if !(clobberIfDead(x0)) {
  4412  			break
  4413  		}
  4414  		v.reset(OpARM64InvertFlags)
  4415  		v0 := b.NewValue0(v.Pos, OpARM64CMPshiftRA, types.TypeFlags)
  4416  		v0.AuxInt = int64ToAuxInt(c)
  4417  		v0.AddArg2(x1, y)
  4418  		v.AddArg(v0)
  4419  		return true
  4420  	}
  4421  	return false
  4422  }
  4423  func rewriteValueARM64_OpARM64CMPW(v *Value) bool {
  4424  	v_1 := v.Args[1]
  4425  	v_0 := v.Args[0]
  4426  	b := v.Block
  4427  	// match: (CMPW x (MOVDconst [c]))
  4428  	// result: (CMPWconst [int32(c)] x)
  4429  	for {
  4430  		x := v_0
  4431  		if v_1.Op != OpARM64MOVDconst {
  4432  			break
  4433  		}
  4434  		c := auxIntToInt64(v_1.AuxInt)
  4435  		v.reset(OpARM64CMPWconst)
  4436  		v.AuxInt = int32ToAuxInt(int32(c))
  4437  		v.AddArg(x)
  4438  		return true
  4439  	}
  4440  	// match: (CMPW (MOVDconst [c]) x)
  4441  	// result: (InvertFlags (CMPWconst [int32(c)] x))
  4442  	for {
  4443  		if v_0.Op != OpARM64MOVDconst {
  4444  			break
  4445  		}
  4446  		c := auxIntToInt64(v_0.AuxInt)
  4447  		x := v_1
  4448  		v.reset(OpARM64InvertFlags)
  4449  		v0 := b.NewValue0(v.Pos, OpARM64CMPWconst, types.TypeFlags)
  4450  		v0.AuxInt = int32ToAuxInt(int32(c))
  4451  		v0.AddArg(x)
  4452  		v.AddArg(v0)
  4453  		return true
  4454  	}
  4455  	// match: (CMPW x y)
  4456  	// cond: canonLessThan(x,y)
  4457  	// result: (InvertFlags (CMPW y x))
  4458  	for {
  4459  		x := v_0
  4460  		y := v_1
  4461  		if !(canonLessThan(x, y)) {
  4462  			break
  4463  		}
  4464  		v.reset(OpARM64InvertFlags)
  4465  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
  4466  		v0.AddArg2(y, x)
  4467  		v.AddArg(v0)
  4468  		return true
  4469  	}
  4470  	return false
  4471  }
  4472  func rewriteValueARM64_OpARM64CMPWconst(v *Value) bool {
  4473  	v_0 := v.Args[0]
  4474  	// match: (CMPWconst [c] y)
  4475  	// cond: c < 0 && c != -1<<31
  4476  	// result: (CMNWconst [-c] y)
  4477  	for {
  4478  		c := auxIntToInt32(v.AuxInt)
  4479  		y := v_0
  4480  		if !(c < 0 && c != -1<<31) {
  4481  			break
  4482  		}
  4483  		v.reset(OpARM64CMNWconst)
  4484  		v.AuxInt = int32ToAuxInt(-c)
  4485  		v.AddArg(y)
  4486  		return true
  4487  	}
  4488  	// match: (CMPWconst (MOVDconst [x]) [y])
  4489  	// result: (FlagConstant [subFlags32(int32(x),y)])
  4490  	for {
  4491  		y := auxIntToInt32(v.AuxInt)
  4492  		if v_0.Op != OpARM64MOVDconst {
  4493  			break
  4494  		}
  4495  		x := auxIntToInt64(v_0.AuxInt)
  4496  		v.reset(OpARM64FlagConstant)
  4497  		v.AuxInt = flagConstantToAuxInt(subFlags32(int32(x), y))
  4498  		return true
  4499  	}
  4500  	// match: (CMPWconst (MOVBUreg _) [c])
  4501  	// cond: 0xff < c
  4502  	// result: (FlagConstant [subFlags64(0,1)])
  4503  	for {
  4504  		c := auxIntToInt32(v.AuxInt)
  4505  		if v_0.Op != OpARM64MOVBUreg || !(0xff < c) {
  4506  			break
  4507  		}
  4508  		v.reset(OpARM64FlagConstant)
  4509  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  4510  		return true
  4511  	}
  4512  	// match: (CMPWconst (MOVHUreg _) [c])
  4513  	// cond: 0xffff < c
  4514  	// result: (FlagConstant [subFlags64(0,1)])
  4515  	for {
  4516  		c := auxIntToInt32(v.AuxInt)
  4517  		if v_0.Op != OpARM64MOVHUreg || !(0xffff < c) {
  4518  			break
  4519  		}
  4520  		v.reset(OpARM64FlagConstant)
  4521  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  4522  		return true
  4523  	}
  4524  	return false
  4525  }
  4526  func rewriteValueARM64_OpARM64CMPconst(v *Value) bool {
  4527  	v_0 := v.Args[0]
  4528  	// match: (CMPconst [c] y)
  4529  	// cond: c < 0 && c != -1<<63
  4530  	// result: (CMNconst [-c] y)
  4531  	for {
  4532  		c := auxIntToInt64(v.AuxInt)
  4533  		y := v_0
  4534  		if !(c < 0 && c != -1<<63) {
  4535  			break
  4536  		}
  4537  		v.reset(OpARM64CMNconst)
  4538  		v.AuxInt = int64ToAuxInt(-c)
  4539  		v.AddArg(y)
  4540  		return true
  4541  	}
  4542  	// match: (CMPconst (MOVDconst [x]) [y])
  4543  	// result: (FlagConstant [subFlags64(x,y)])
  4544  	for {
  4545  		y := auxIntToInt64(v.AuxInt)
  4546  		if v_0.Op != OpARM64MOVDconst {
  4547  			break
  4548  		}
  4549  		x := auxIntToInt64(v_0.AuxInt)
  4550  		v.reset(OpARM64FlagConstant)
  4551  		v.AuxInt = flagConstantToAuxInt(subFlags64(x, y))
  4552  		return true
  4553  	}
  4554  	// match: (CMPconst (MOVBUreg _) [c])
  4555  	// cond: 0xff < c
  4556  	// result: (FlagConstant [subFlags64(0,1)])
  4557  	for {
  4558  		c := auxIntToInt64(v.AuxInt)
  4559  		if v_0.Op != OpARM64MOVBUreg || !(0xff < c) {
  4560  			break
  4561  		}
  4562  		v.reset(OpARM64FlagConstant)
  4563  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  4564  		return true
  4565  	}
  4566  	// match: (CMPconst (MOVHUreg _) [c])
  4567  	// cond: 0xffff < c
  4568  	// result: (FlagConstant [subFlags64(0,1)])
  4569  	for {
  4570  		c := auxIntToInt64(v.AuxInt)
  4571  		if v_0.Op != OpARM64MOVHUreg || !(0xffff < c) {
  4572  			break
  4573  		}
  4574  		v.reset(OpARM64FlagConstant)
  4575  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  4576  		return true
  4577  	}
  4578  	// match: (CMPconst (MOVWUreg _) [c])
  4579  	// cond: 0xffffffff < c
  4580  	// result: (FlagConstant [subFlags64(0,1)])
  4581  	for {
  4582  		c := auxIntToInt64(v.AuxInt)
  4583  		if v_0.Op != OpARM64MOVWUreg || !(0xffffffff < c) {
  4584  			break
  4585  		}
  4586  		v.reset(OpARM64FlagConstant)
  4587  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  4588  		return true
  4589  	}
  4590  	// match: (CMPconst (ANDconst _ [m]) [n])
  4591  	// cond: 0 <= m && m < n
  4592  	// result: (FlagConstant [subFlags64(0,1)])
  4593  	for {
  4594  		n := auxIntToInt64(v.AuxInt)
  4595  		if v_0.Op != OpARM64ANDconst {
  4596  			break
  4597  		}
  4598  		m := auxIntToInt64(v_0.AuxInt)
  4599  		if !(0 <= m && m < n) {
  4600  			break
  4601  		}
  4602  		v.reset(OpARM64FlagConstant)
  4603  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  4604  		return true
  4605  	}
  4606  	// match: (CMPconst (SRLconst _ [c]) [n])
  4607  	// cond: 0 <= n && 0 < c && c <= 63 && (1<<uint64(64-c)) <= uint64(n)
  4608  	// result: (FlagConstant [subFlags64(0,1)])
  4609  	for {
  4610  		n := auxIntToInt64(v.AuxInt)
  4611  		if v_0.Op != OpARM64SRLconst {
  4612  			break
  4613  		}
  4614  		c := auxIntToInt64(v_0.AuxInt)
  4615  		if !(0 <= n && 0 < c && c <= 63 && (1<<uint64(64-c)) <= uint64(n)) {
  4616  			break
  4617  		}
  4618  		v.reset(OpARM64FlagConstant)
  4619  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  4620  		return true
  4621  	}
  4622  	return false
  4623  }
  4624  func rewriteValueARM64_OpARM64CMPshiftLL(v *Value) bool {
  4625  	v_1 := v.Args[1]
  4626  	v_0 := v.Args[0]
  4627  	b := v.Block
  4628  	// match: (CMPshiftLL (MOVDconst [c]) x [d])
  4629  	// result: (InvertFlags (CMPconst [c] (SLLconst <x.Type> x [d])))
  4630  	for {
  4631  		d := auxIntToInt64(v.AuxInt)
  4632  		if v_0.Op != OpARM64MOVDconst {
  4633  			break
  4634  		}
  4635  		c := auxIntToInt64(v_0.AuxInt)
  4636  		x := v_1
  4637  		v.reset(OpARM64InvertFlags)
  4638  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
  4639  		v0.AuxInt = int64ToAuxInt(c)
  4640  		v1 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  4641  		v1.AuxInt = int64ToAuxInt(d)
  4642  		v1.AddArg(x)
  4643  		v0.AddArg(v1)
  4644  		v.AddArg(v0)
  4645  		return true
  4646  	}
  4647  	// match: (CMPshiftLL x (MOVDconst [c]) [d])
  4648  	// result: (CMPconst x [int64(uint64(c)<<uint64(d))])
  4649  	for {
  4650  		d := auxIntToInt64(v.AuxInt)
  4651  		x := v_0
  4652  		if v_1.Op != OpARM64MOVDconst {
  4653  			break
  4654  		}
  4655  		c := auxIntToInt64(v_1.AuxInt)
  4656  		v.reset(OpARM64CMPconst)
  4657  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
  4658  		v.AddArg(x)
  4659  		return true
  4660  	}
  4661  	return false
  4662  }
  4663  func rewriteValueARM64_OpARM64CMPshiftRA(v *Value) bool {
  4664  	v_1 := v.Args[1]
  4665  	v_0 := v.Args[0]
  4666  	b := v.Block
  4667  	// match: (CMPshiftRA (MOVDconst [c]) x [d])
  4668  	// result: (InvertFlags (CMPconst [c] (SRAconst <x.Type> x [d])))
  4669  	for {
  4670  		d := auxIntToInt64(v.AuxInt)
  4671  		if v_0.Op != OpARM64MOVDconst {
  4672  			break
  4673  		}
  4674  		c := auxIntToInt64(v_0.AuxInt)
  4675  		x := v_1
  4676  		v.reset(OpARM64InvertFlags)
  4677  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
  4678  		v0.AuxInt = int64ToAuxInt(c)
  4679  		v1 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
  4680  		v1.AuxInt = int64ToAuxInt(d)
  4681  		v1.AddArg(x)
  4682  		v0.AddArg(v1)
  4683  		v.AddArg(v0)
  4684  		return true
  4685  	}
  4686  	// match: (CMPshiftRA x (MOVDconst [c]) [d])
  4687  	// result: (CMPconst x [c>>uint64(d)])
  4688  	for {
  4689  		d := auxIntToInt64(v.AuxInt)
  4690  		x := v_0
  4691  		if v_1.Op != OpARM64MOVDconst {
  4692  			break
  4693  		}
  4694  		c := auxIntToInt64(v_1.AuxInt)
  4695  		v.reset(OpARM64CMPconst)
  4696  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
  4697  		v.AddArg(x)
  4698  		return true
  4699  	}
  4700  	return false
  4701  }
  4702  func rewriteValueARM64_OpARM64CMPshiftRL(v *Value) bool {
  4703  	v_1 := v.Args[1]
  4704  	v_0 := v.Args[0]
  4705  	b := v.Block
  4706  	// match: (CMPshiftRL (MOVDconst [c]) x [d])
  4707  	// result: (InvertFlags (CMPconst [c] (SRLconst <x.Type> x [d])))
  4708  	for {
  4709  		d := auxIntToInt64(v.AuxInt)
  4710  		if v_0.Op != OpARM64MOVDconst {
  4711  			break
  4712  		}
  4713  		c := auxIntToInt64(v_0.AuxInt)
  4714  		x := v_1
  4715  		v.reset(OpARM64InvertFlags)
  4716  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
  4717  		v0.AuxInt = int64ToAuxInt(c)
  4718  		v1 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
  4719  		v1.AuxInt = int64ToAuxInt(d)
  4720  		v1.AddArg(x)
  4721  		v0.AddArg(v1)
  4722  		v.AddArg(v0)
  4723  		return true
  4724  	}
  4725  	// match: (CMPshiftRL x (MOVDconst [c]) [d])
  4726  	// result: (CMPconst x [int64(uint64(c)>>uint64(d))])
  4727  	for {
  4728  		d := auxIntToInt64(v.AuxInt)
  4729  		x := v_0
  4730  		if v_1.Op != OpARM64MOVDconst {
  4731  			break
  4732  		}
  4733  		c := auxIntToInt64(v_1.AuxInt)
  4734  		v.reset(OpARM64CMPconst)
  4735  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
  4736  		v.AddArg(x)
  4737  		return true
  4738  	}
  4739  	return false
  4740  }
  4741  func rewriteValueARM64_OpARM64CSEL(v *Value) bool {
  4742  	v_2 := v.Args[2]
  4743  	v_1 := v.Args[1]
  4744  	v_0 := v.Args[0]
  4745  	// match: (CSEL [cc] (MOVDconst [-1]) (MOVDconst [0]) flag)
  4746  	// result: (CSETM [cc] flag)
  4747  	for {
  4748  		cc := auxIntToOp(v.AuxInt)
  4749  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != -1 || v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  4750  			break
  4751  		}
  4752  		flag := v_2
  4753  		v.reset(OpARM64CSETM)
  4754  		v.AuxInt = opToAuxInt(cc)
  4755  		v.AddArg(flag)
  4756  		return true
  4757  	}
  4758  	// match: (CSEL [cc] (MOVDconst [0]) (MOVDconst [-1]) flag)
  4759  	// result: (CSETM [arm64Negate(cc)] flag)
  4760  	for {
  4761  		cc := auxIntToOp(v.AuxInt)
  4762  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 0 || v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
  4763  			break
  4764  		}
  4765  		flag := v_2
  4766  		v.reset(OpARM64CSETM)
  4767  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  4768  		v.AddArg(flag)
  4769  		return true
  4770  	}
  4771  	// match: (CSEL [cc] x (MOVDconst [0]) flag)
  4772  	// result: (CSEL0 [cc] x flag)
  4773  	for {
  4774  		cc := auxIntToOp(v.AuxInt)
  4775  		x := v_0
  4776  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  4777  			break
  4778  		}
  4779  		flag := v_2
  4780  		v.reset(OpARM64CSEL0)
  4781  		v.AuxInt = opToAuxInt(cc)
  4782  		v.AddArg2(x, flag)
  4783  		return true
  4784  	}
  4785  	// match: (CSEL [cc] (MOVDconst [0]) y flag)
  4786  	// result: (CSEL0 [arm64Negate(cc)] y flag)
  4787  	for {
  4788  		cc := auxIntToOp(v.AuxInt)
  4789  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 0 {
  4790  			break
  4791  		}
  4792  		y := v_1
  4793  		flag := v_2
  4794  		v.reset(OpARM64CSEL0)
  4795  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  4796  		v.AddArg2(y, flag)
  4797  		return true
  4798  	}
  4799  	// match: (CSEL [cc] x (ADDconst [1] a) flag)
  4800  	// result: (CSINC [cc] x a flag)
  4801  	for {
  4802  		cc := auxIntToOp(v.AuxInt)
  4803  		x := v_0
  4804  		if v_1.Op != OpARM64ADDconst || auxIntToInt64(v_1.AuxInt) != 1 {
  4805  			break
  4806  		}
  4807  		a := v_1.Args[0]
  4808  		flag := v_2
  4809  		v.reset(OpARM64CSINC)
  4810  		v.AuxInt = opToAuxInt(cc)
  4811  		v.AddArg3(x, a, flag)
  4812  		return true
  4813  	}
  4814  	// match: (CSEL [cc] (ADDconst [1] a) x flag)
  4815  	// result: (CSINC [arm64Negate(cc)] x a flag)
  4816  	for {
  4817  		cc := auxIntToOp(v.AuxInt)
  4818  		if v_0.Op != OpARM64ADDconst || auxIntToInt64(v_0.AuxInt) != 1 {
  4819  			break
  4820  		}
  4821  		a := v_0.Args[0]
  4822  		x := v_1
  4823  		flag := v_2
  4824  		v.reset(OpARM64CSINC)
  4825  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  4826  		v.AddArg3(x, a, flag)
  4827  		return true
  4828  	}
  4829  	// match: (CSEL [cc] x (MVN a) flag)
  4830  	// result: (CSINV [cc] x a flag)
  4831  	for {
  4832  		cc := auxIntToOp(v.AuxInt)
  4833  		x := v_0
  4834  		if v_1.Op != OpARM64MVN {
  4835  			break
  4836  		}
  4837  		a := v_1.Args[0]
  4838  		flag := v_2
  4839  		v.reset(OpARM64CSINV)
  4840  		v.AuxInt = opToAuxInt(cc)
  4841  		v.AddArg3(x, a, flag)
  4842  		return true
  4843  	}
  4844  	// match: (CSEL [cc] (MVN a) x flag)
  4845  	// result: (CSINV [arm64Negate(cc)] x a flag)
  4846  	for {
  4847  		cc := auxIntToOp(v.AuxInt)
  4848  		if v_0.Op != OpARM64MVN {
  4849  			break
  4850  		}
  4851  		a := v_0.Args[0]
  4852  		x := v_1
  4853  		flag := v_2
  4854  		v.reset(OpARM64CSINV)
  4855  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  4856  		v.AddArg3(x, a, flag)
  4857  		return true
  4858  	}
  4859  	// match: (CSEL [cc] x (NEG a) flag)
  4860  	// result: (CSNEG [cc] x a flag)
  4861  	for {
  4862  		cc := auxIntToOp(v.AuxInt)
  4863  		x := v_0
  4864  		if v_1.Op != OpARM64NEG {
  4865  			break
  4866  		}
  4867  		a := v_1.Args[0]
  4868  		flag := v_2
  4869  		v.reset(OpARM64CSNEG)
  4870  		v.AuxInt = opToAuxInt(cc)
  4871  		v.AddArg3(x, a, flag)
  4872  		return true
  4873  	}
  4874  	// match: (CSEL [cc] (NEG a) x flag)
  4875  	// result: (CSNEG [arm64Negate(cc)] x a flag)
  4876  	for {
  4877  		cc := auxIntToOp(v.AuxInt)
  4878  		if v_0.Op != OpARM64NEG {
  4879  			break
  4880  		}
  4881  		a := v_0.Args[0]
  4882  		x := v_1
  4883  		flag := v_2
  4884  		v.reset(OpARM64CSNEG)
  4885  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  4886  		v.AddArg3(x, a, flag)
  4887  		return true
  4888  	}
  4889  	// match: (CSEL [cc] x y (InvertFlags cmp))
  4890  	// result: (CSEL [arm64Invert(cc)] x y cmp)
  4891  	for {
  4892  		cc := auxIntToOp(v.AuxInt)
  4893  		x := v_0
  4894  		y := v_1
  4895  		if v_2.Op != OpARM64InvertFlags {
  4896  			break
  4897  		}
  4898  		cmp := v_2.Args[0]
  4899  		v.reset(OpARM64CSEL)
  4900  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  4901  		v.AddArg3(x, y, cmp)
  4902  		return true
  4903  	}
  4904  	// match: (CSEL [cc] x _ flag)
  4905  	// cond: ccARM64Eval(cc, flag) > 0
  4906  	// result: x
  4907  	for {
  4908  		cc := auxIntToOp(v.AuxInt)
  4909  		x := v_0
  4910  		flag := v_2
  4911  		if !(ccARM64Eval(cc, flag) > 0) {
  4912  			break
  4913  		}
  4914  		v.copyOf(x)
  4915  		return true
  4916  	}
  4917  	// match: (CSEL [cc] _ y flag)
  4918  	// cond: ccARM64Eval(cc, flag) < 0
  4919  	// result: y
  4920  	for {
  4921  		cc := auxIntToOp(v.AuxInt)
  4922  		y := v_1
  4923  		flag := v_2
  4924  		if !(ccARM64Eval(cc, flag) < 0) {
  4925  			break
  4926  		}
  4927  		v.copyOf(y)
  4928  		return true
  4929  	}
  4930  	// match: (CSEL [cc] x y (CMPWconst [0] boolval))
  4931  	// cond: cc == OpARM64NotEqual && flagArg(boolval) != nil
  4932  	// result: (CSEL [boolval.Op] x y flagArg(boolval))
  4933  	for {
  4934  		cc := auxIntToOp(v.AuxInt)
  4935  		x := v_0
  4936  		y := v_1
  4937  		if v_2.Op != OpARM64CMPWconst || auxIntToInt32(v_2.AuxInt) != 0 {
  4938  			break
  4939  		}
  4940  		boolval := v_2.Args[0]
  4941  		if !(cc == OpARM64NotEqual && flagArg(boolval) != nil) {
  4942  			break
  4943  		}
  4944  		v.reset(OpARM64CSEL)
  4945  		v.AuxInt = opToAuxInt(boolval.Op)
  4946  		v.AddArg3(x, y, flagArg(boolval))
  4947  		return true
  4948  	}
  4949  	// match: (CSEL [cc] x y (CMPWconst [0] boolval))
  4950  	// cond: cc == OpARM64Equal && flagArg(boolval) != nil
  4951  	// result: (CSEL [arm64Negate(boolval.Op)] x y flagArg(boolval))
  4952  	for {
  4953  		cc := auxIntToOp(v.AuxInt)
  4954  		x := v_0
  4955  		y := v_1
  4956  		if v_2.Op != OpARM64CMPWconst || auxIntToInt32(v_2.AuxInt) != 0 {
  4957  			break
  4958  		}
  4959  		boolval := v_2.Args[0]
  4960  		if !(cc == OpARM64Equal && flagArg(boolval) != nil) {
  4961  			break
  4962  		}
  4963  		v.reset(OpARM64CSEL)
  4964  		v.AuxInt = opToAuxInt(arm64Negate(boolval.Op))
  4965  		v.AddArg3(x, y, flagArg(boolval))
  4966  		return true
  4967  	}
  4968  	return false
  4969  }
  4970  func rewriteValueARM64_OpARM64CSEL0(v *Value) bool {
  4971  	v_1 := v.Args[1]
  4972  	v_0 := v.Args[0]
  4973  	// match: (CSEL0 [cc] x (InvertFlags cmp))
  4974  	// result: (CSEL0 [arm64Invert(cc)] x cmp)
  4975  	for {
  4976  		cc := auxIntToOp(v.AuxInt)
  4977  		x := v_0
  4978  		if v_1.Op != OpARM64InvertFlags {
  4979  			break
  4980  		}
  4981  		cmp := v_1.Args[0]
  4982  		v.reset(OpARM64CSEL0)
  4983  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  4984  		v.AddArg2(x, cmp)
  4985  		return true
  4986  	}
  4987  	// match: (CSEL0 [cc] x flag)
  4988  	// cond: ccARM64Eval(cc, flag) > 0
  4989  	// result: x
  4990  	for {
  4991  		cc := auxIntToOp(v.AuxInt)
  4992  		x := v_0
  4993  		flag := v_1
  4994  		if !(ccARM64Eval(cc, flag) > 0) {
  4995  			break
  4996  		}
  4997  		v.copyOf(x)
  4998  		return true
  4999  	}
  5000  	// match: (CSEL0 [cc] _ flag)
  5001  	// cond: ccARM64Eval(cc, flag) < 0
  5002  	// result: (MOVDconst [0])
  5003  	for {
  5004  		cc := auxIntToOp(v.AuxInt)
  5005  		flag := v_1
  5006  		if !(ccARM64Eval(cc, flag) < 0) {
  5007  			break
  5008  		}
  5009  		v.reset(OpARM64MOVDconst)
  5010  		v.AuxInt = int64ToAuxInt(0)
  5011  		return true
  5012  	}
  5013  	// match: (CSEL0 [cc] x (CMPWconst [0] boolval))
  5014  	// cond: cc == OpARM64NotEqual && flagArg(boolval) != nil
  5015  	// result: (CSEL0 [boolval.Op] x flagArg(boolval))
  5016  	for {
  5017  		cc := auxIntToOp(v.AuxInt)
  5018  		x := v_0
  5019  		if v_1.Op != OpARM64CMPWconst || auxIntToInt32(v_1.AuxInt) != 0 {
  5020  			break
  5021  		}
  5022  		boolval := v_1.Args[0]
  5023  		if !(cc == OpARM64NotEqual && flagArg(boolval) != nil) {
  5024  			break
  5025  		}
  5026  		v.reset(OpARM64CSEL0)
  5027  		v.AuxInt = opToAuxInt(boolval.Op)
  5028  		v.AddArg2(x, flagArg(boolval))
  5029  		return true
  5030  	}
  5031  	// match: (CSEL0 [cc] x (CMPWconst [0] boolval))
  5032  	// cond: cc == OpARM64Equal && flagArg(boolval) != nil
  5033  	// result: (CSEL0 [arm64Negate(boolval.Op)] x flagArg(boolval))
  5034  	for {
  5035  		cc := auxIntToOp(v.AuxInt)
  5036  		x := v_0
  5037  		if v_1.Op != OpARM64CMPWconst || auxIntToInt32(v_1.AuxInt) != 0 {
  5038  			break
  5039  		}
  5040  		boolval := v_1.Args[0]
  5041  		if !(cc == OpARM64Equal && flagArg(boolval) != nil) {
  5042  			break
  5043  		}
  5044  		v.reset(OpARM64CSEL0)
  5045  		v.AuxInt = opToAuxInt(arm64Negate(boolval.Op))
  5046  		v.AddArg2(x, flagArg(boolval))
  5047  		return true
  5048  	}
  5049  	return false
  5050  }
  5051  func rewriteValueARM64_OpARM64CSETM(v *Value) bool {
  5052  	v_0 := v.Args[0]
  5053  	// match: (CSETM [cc] (InvertFlags cmp))
  5054  	// result: (CSETM [arm64Invert(cc)] cmp)
  5055  	for {
  5056  		cc := auxIntToOp(v.AuxInt)
  5057  		if v_0.Op != OpARM64InvertFlags {
  5058  			break
  5059  		}
  5060  		cmp := v_0.Args[0]
  5061  		v.reset(OpARM64CSETM)
  5062  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  5063  		v.AddArg(cmp)
  5064  		return true
  5065  	}
  5066  	// match: (CSETM [cc] flag)
  5067  	// cond: ccARM64Eval(cc, flag) > 0
  5068  	// result: (MOVDconst [-1])
  5069  	for {
  5070  		cc := auxIntToOp(v.AuxInt)
  5071  		flag := v_0
  5072  		if !(ccARM64Eval(cc, flag) > 0) {
  5073  			break
  5074  		}
  5075  		v.reset(OpARM64MOVDconst)
  5076  		v.AuxInt = int64ToAuxInt(-1)
  5077  		return true
  5078  	}
  5079  	// match: (CSETM [cc] flag)
  5080  	// cond: ccARM64Eval(cc, flag) < 0
  5081  	// result: (MOVDconst [0])
  5082  	for {
  5083  		cc := auxIntToOp(v.AuxInt)
  5084  		flag := v_0
  5085  		if !(ccARM64Eval(cc, flag) < 0) {
  5086  			break
  5087  		}
  5088  		v.reset(OpARM64MOVDconst)
  5089  		v.AuxInt = int64ToAuxInt(0)
  5090  		return true
  5091  	}
  5092  	return false
  5093  }
  5094  func rewriteValueARM64_OpARM64CSINC(v *Value) bool {
  5095  	v_2 := v.Args[2]
  5096  	v_1 := v.Args[1]
  5097  	v_0 := v.Args[0]
  5098  	// match: (CSINC [cc] x y (InvertFlags cmp))
  5099  	// result: (CSINC [arm64Invert(cc)] x y cmp)
  5100  	for {
  5101  		cc := auxIntToOp(v.AuxInt)
  5102  		x := v_0
  5103  		y := v_1
  5104  		if v_2.Op != OpARM64InvertFlags {
  5105  			break
  5106  		}
  5107  		cmp := v_2.Args[0]
  5108  		v.reset(OpARM64CSINC)
  5109  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  5110  		v.AddArg3(x, y, cmp)
  5111  		return true
  5112  	}
  5113  	// match: (CSINC [cc] x _ flag)
  5114  	// cond: ccARM64Eval(cc, flag) > 0
  5115  	// result: x
  5116  	for {
  5117  		cc := auxIntToOp(v.AuxInt)
  5118  		x := v_0
  5119  		flag := v_2
  5120  		if !(ccARM64Eval(cc, flag) > 0) {
  5121  			break
  5122  		}
  5123  		v.copyOf(x)
  5124  		return true
  5125  	}
  5126  	// match: (CSINC [cc] _ y flag)
  5127  	// cond: ccARM64Eval(cc, flag) < 0
  5128  	// result: (ADDconst [1] y)
  5129  	for {
  5130  		cc := auxIntToOp(v.AuxInt)
  5131  		y := v_1
  5132  		flag := v_2
  5133  		if !(ccARM64Eval(cc, flag) < 0) {
  5134  			break
  5135  		}
  5136  		v.reset(OpARM64ADDconst)
  5137  		v.AuxInt = int64ToAuxInt(1)
  5138  		v.AddArg(y)
  5139  		return true
  5140  	}
  5141  	return false
  5142  }
  5143  func rewriteValueARM64_OpARM64CSINV(v *Value) bool {
  5144  	v_2 := v.Args[2]
  5145  	v_1 := v.Args[1]
  5146  	v_0 := v.Args[0]
  5147  	// match: (CSINV [cc] x y (InvertFlags cmp))
  5148  	// result: (CSINV [arm64Invert(cc)] x y cmp)
  5149  	for {
  5150  		cc := auxIntToOp(v.AuxInt)
  5151  		x := v_0
  5152  		y := v_1
  5153  		if v_2.Op != OpARM64InvertFlags {
  5154  			break
  5155  		}
  5156  		cmp := v_2.Args[0]
  5157  		v.reset(OpARM64CSINV)
  5158  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  5159  		v.AddArg3(x, y, cmp)
  5160  		return true
  5161  	}
  5162  	// match: (CSINV [cc] x _ flag)
  5163  	// cond: ccARM64Eval(cc, flag) > 0
  5164  	// result: x
  5165  	for {
  5166  		cc := auxIntToOp(v.AuxInt)
  5167  		x := v_0
  5168  		flag := v_2
  5169  		if !(ccARM64Eval(cc, flag) > 0) {
  5170  			break
  5171  		}
  5172  		v.copyOf(x)
  5173  		return true
  5174  	}
  5175  	// match: (CSINV [cc] _ y flag)
  5176  	// cond: ccARM64Eval(cc, flag) < 0
  5177  	// result: (Not y)
  5178  	for {
  5179  		cc := auxIntToOp(v.AuxInt)
  5180  		y := v_1
  5181  		flag := v_2
  5182  		if !(ccARM64Eval(cc, flag) < 0) {
  5183  			break
  5184  		}
  5185  		v.reset(OpNot)
  5186  		v.AddArg(y)
  5187  		return true
  5188  	}
  5189  	return false
  5190  }
  5191  func rewriteValueARM64_OpARM64CSNEG(v *Value) bool {
  5192  	v_2 := v.Args[2]
  5193  	v_1 := v.Args[1]
  5194  	v_0 := v.Args[0]
  5195  	// match: (CSNEG [cc] x y (InvertFlags cmp))
  5196  	// result: (CSNEG [arm64Invert(cc)] x y cmp)
  5197  	for {
  5198  		cc := auxIntToOp(v.AuxInt)
  5199  		x := v_0
  5200  		y := v_1
  5201  		if v_2.Op != OpARM64InvertFlags {
  5202  			break
  5203  		}
  5204  		cmp := v_2.Args[0]
  5205  		v.reset(OpARM64CSNEG)
  5206  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  5207  		v.AddArg3(x, y, cmp)
  5208  		return true
  5209  	}
  5210  	// match: (CSNEG [cc] x _ flag)
  5211  	// cond: ccARM64Eval(cc, flag) > 0
  5212  	// result: x
  5213  	for {
  5214  		cc := auxIntToOp(v.AuxInt)
  5215  		x := v_0
  5216  		flag := v_2
  5217  		if !(ccARM64Eval(cc, flag) > 0) {
  5218  			break
  5219  		}
  5220  		v.copyOf(x)
  5221  		return true
  5222  	}
  5223  	// match: (CSNEG [cc] _ y flag)
  5224  	// cond: ccARM64Eval(cc, flag) < 0
  5225  	// result: (NEG y)
  5226  	for {
  5227  		cc := auxIntToOp(v.AuxInt)
  5228  		y := v_1
  5229  		flag := v_2
  5230  		if !(ccARM64Eval(cc, flag) < 0) {
  5231  			break
  5232  		}
  5233  		v.reset(OpARM64NEG)
  5234  		v.AddArg(y)
  5235  		return true
  5236  	}
  5237  	return false
  5238  }
  5239  func rewriteValueARM64_OpARM64DIV(v *Value) bool {
  5240  	v_1 := v.Args[1]
  5241  	v_0 := v.Args[0]
  5242  	// match: (DIV (MOVDconst [c]) (MOVDconst [d]))
  5243  	// cond: d != 0
  5244  	// result: (MOVDconst [c/d])
  5245  	for {
  5246  		if v_0.Op != OpARM64MOVDconst {
  5247  			break
  5248  		}
  5249  		c := auxIntToInt64(v_0.AuxInt)
  5250  		if v_1.Op != OpARM64MOVDconst {
  5251  			break
  5252  		}
  5253  		d := auxIntToInt64(v_1.AuxInt)
  5254  		if !(d != 0) {
  5255  			break
  5256  		}
  5257  		v.reset(OpARM64MOVDconst)
  5258  		v.AuxInt = int64ToAuxInt(c / d)
  5259  		return true
  5260  	}
  5261  	return false
  5262  }
  5263  func rewriteValueARM64_OpARM64DIVW(v *Value) bool {
  5264  	v_1 := v.Args[1]
  5265  	v_0 := v.Args[0]
  5266  	// match: (DIVW (MOVDconst [c]) (MOVDconst [d]))
  5267  	// cond: d != 0
  5268  	// result: (MOVDconst [int64(uint32(int32(c)/int32(d)))])
  5269  	for {
  5270  		if v_0.Op != OpARM64MOVDconst {
  5271  			break
  5272  		}
  5273  		c := auxIntToInt64(v_0.AuxInt)
  5274  		if v_1.Op != OpARM64MOVDconst {
  5275  			break
  5276  		}
  5277  		d := auxIntToInt64(v_1.AuxInt)
  5278  		if !(d != 0) {
  5279  			break
  5280  		}
  5281  		v.reset(OpARM64MOVDconst)
  5282  		v.AuxInt = int64ToAuxInt(int64(uint32(int32(c) / int32(d))))
  5283  		return true
  5284  	}
  5285  	return false
  5286  }
  5287  func rewriteValueARM64_OpARM64EON(v *Value) bool {
  5288  	v_1 := v.Args[1]
  5289  	v_0 := v.Args[0]
  5290  	// match: (EON x (MOVDconst [c]))
  5291  	// result: (XORconst [^c] x)
  5292  	for {
  5293  		x := v_0
  5294  		if v_1.Op != OpARM64MOVDconst {
  5295  			break
  5296  		}
  5297  		c := auxIntToInt64(v_1.AuxInt)
  5298  		v.reset(OpARM64XORconst)
  5299  		v.AuxInt = int64ToAuxInt(^c)
  5300  		v.AddArg(x)
  5301  		return true
  5302  	}
  5303  	// match: (EON x x)
  5304  	// result: (MOVDconst [-1])
  5305  	for {
  5306  		x := v_0
  5307  		if x != v_1 {
  5308  			break
  5309  		}
  5310  		v.reset(OpARM64MOVDconst)
  5311  		v.AuxInt = int64ToAuxInt(-1)
  5312  		return true
  5313  	}
  5314  	// match: (EON x0 x1:(SLLconst [c] y))
  5315  	// cond: clobberIfDead(x1)
  5316  	// result: (EONshiftLL x0 y [c])
  5317  	for {
  5318  		x0 := v_0
  5319  		x1 := v_1
  5320  		if x1.Op != OpARM64SLLconst {
  5321  			break
  5322  		}
  5323  		c := auxIntToInt64(x1.AuxInt)
  5324  		y := x1.Args[0]
  5325  		if !(clobberIfDead(x1)) {
  5326  			break
  5327  		}
  5328  		v.reset(OpARM64EONshiftLL)
  5329  		v.AuxInt = int64ToAuxInt(c)
  5330  		v.AddArg2(x0, y)
  5331  		return true
  5332  	}
  5333  	// match: (EON x0 x1:(SRLconst [c] y))
  5334  	// cond: clobberIfDead(x1)
  5335  	// result: (EONshiftRL x0 y [c])
  5336  	for {
  5337  		x0 := v_0
  5338  		x1 := v_1
  5339  		if x1.Op != OpARM64SRLconst {
  5340  			break
  5341  		}
  5342  		c := auxIntToInt64(x1.AuxInt)
  5343  		y := x1.Args[0]
  5344  		if !(clobberIfDead(x1)) {
  5345  			break
  5346  		}
  5347  		v.reset(OpARM64EONshiftRL)
  5348  		v.AuxInt = int64ToAuxInt(c)
  5349  		v.AddArg2(x0, y)
  5350  		return true
  5351  	}
  5352  	// match: (EON x0 x1:(SRAconst [c] y))
  5353  	// cond: clobberIfDead(x1)
  5354  	// result: (EONshiftRA x0 y [c])
  5355  	for {
  5356  		x0 := v_0
  5357  		x1 := v_1
  5358  		if x1.Op != OpARM64SRAconst {
  5359  			break
  5360  		}
  5361  		c := auxIntToInt64(x1.AuxInt)
  5362  		y := x1.Args[0]
  5363  		if !(clobberIfDead(x1)) {
  5364  			break
  5365  		}
  5366  		v.reset(OpARM64EONshiftRA)
  5367  		v.AuxInt = int64ToAuxInt(c)
  5368  		v.AddArg2(x0, y)
  5369  		return true
  5370  	}
  5371  	// match: (EON x0 x1:(RORconst [c] y))
  5372  	// cond: clobberIfDead(x1)
  5373  	// result: (EONshiftRO x0 y [c])
  5374  	for {
  5375  		x0 := v_0
  5376  		x1 := v_1
  5377  		if x1.Op != OpARM64RORconst {
  5378  			break
  5379  		}
  5380  		c := auxIntToInt64(x1.AuxInt)
  5381  		y := x1.Args[0]
  5382  		if !(clobberIfDead(x1)) {
  5383  			break
  5384  		}
  5385  		v.reset(OpARM64EONshiftRO)
  5386  		v.AuxInt = int64ToAuxInt(c)
  5387  		v.AddArg2(x0, y)
  5388  		return true
  5389  	}
  5390  	return false
  5391  }
  5392  func rewriteValueARM64_OpARM64EONshiftLL(v *Value) bool {
  5393  	v_1 := v.Args[1]
  5394  	v_0 := v.Args[0]
  5395  	// match: (EONshiftLL x (MOVDconst [c]) [d])
  5396  	// result: (XORconst x [^int64(uint64(c)<<uint64(d))])
  5397  	for {
  5398  		d := auxIntToInt64(v.AuxInt)
  5399  		x := v_0
  5400  		if v_1.Op != OpARM64MOVDconst {
  5401  			break
  5402  		}
  5403  		c := auxIntToInt64(v_1.AuxInt)
  5404  		v.reset(OpARM64XORconst)
  5405  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
  5406  		v.AddArg(x)
  5407  		return true
  5408  	}
  5409  	// match: (EONshiftLL (SLLconst x [c]) x [c])
  5410  	// result: (MOVDconst [-1])
  5411  	for {
  5412  		c := auxIntToInt64(v.AuxInt)
  5413  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
  5414  			break
  5415  		}
  5416  		x := v_0.Args[0]
  5417  		if x != v_1 {
  5418  			break
  5419  		}
  5420  		v.reset(OpARM64MOVDconst)
  5421  		v.AuxInt = int64ToAuxInt(-1)
  5422  		return true
  5423  	}
  5424  	return false
  5425  }
  5426  func rewriteValueARM64_OpARM64EONshiftRA(v *Value) bool {
  5427  	v_1 := v.Args[1]
  5428  	v_0 := v.Args[0]
  5429  	// match: (EONshiftRA x (MOVDconst [c]) [d])
  5430  	// result: (XORconst x [^(c>>uint64(d))])
  5431  	for {
  5432  		d := auxIntToInt64(v.AuxInt)
  5433  		x := v_0
  5434  		if v_1.Op != OpARM64MOVDconst {
  5435  			break
  5436  		}
  5437  		c := auxIntToInt64(v_1.AuxInt)
  5438  		v.reset(OpARM64XORconst)
  5439  		v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
  5440  		v.AddArg(x)
  5441  		return true
  5442  	}
  5443  	// match: (EONshiftRA (SRAconst x [c]) x [c])
  5444  	// result: (MOVDconst [-1])
  5445  	for {
  5446  		c := auxIntToInt64(v.AuxInt)
  5447  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
  5448  			break
  5449  		}
  5450  		x := v_0.Args[0]
  5451  		if x != v_1 {
  5452  			break
  5453  		}
  5454  		v.reset(OpARM64MOVDconst)
  5455  		v.AuxInt = int64ToAuxInt(-1)
  5456  		return true
  5457  	}
  5458  	return false
  5459  }
  5460  func rewriteValueARM64_OpARM64EONshiftRL(v *Value) bool {
  5461  	v_1 := v.Args[1]
  5462  	v_0 := v.Args[0]
  5463  	// match: (EONshiftRL x (MOVDconst [c]) [d])
  5464  	// result: (XORconst x [^int64(uint64(c)>>uint64(d))])
  5465  	for {
  5466  		d := auxIntToInt64(v.AuxInt)
  5467  		x := v_0
  5468  		if v_1.Op != OpARM64MOVDconst {
  5469  			break
  5470  		}
  5471  		c := auxIntToInt64(v_1.AuxInt)
  5472  		v.reset(OpARM64XORconst)
  5473  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
  5474  		v.AddArg(x)
  5475  		return true
  5476  	}
  5477  	// match: (EONshiftRL (SRLconst x [c]) x [c])
  5478  	// result: (MOVDconst [-1])
  5479  	for {
  5480  		c := auxIntToInt64(v.AuxInt)
  5481  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
  5482  			break
  5483  		}
  5484  		x := v_0.Args[0]
  5485  		if x != v_1 {
  5486  			break
  5487  		}
  5488  		v.reset(OpARM64MOVDconst)
  5489  		v.AuxInt = int64ToAuxInt(-1)
  5490  		return true
  5491  	}
  5492  	return false
  5493  }
  5494  func rewriteValueARM64_OpARM64EONshiftRO(v *Value) bool {
  5495  	v_1 := v.Args[1]
  5496  	v_0 := v.Args[0]
  5497  	// match: (EONshiftRO x (MOVDconst [c]) [d])
  5498  	// result: (XORconst x [^rotateRight64(c, d)])
  5499  	for {
  5500  		d := auxIntToInt64(v.AuxInt)
  5501  		x := v_0
  5502  		if v_1.Op != OpARM64MOVDconst {
  5503  			break
  5504  		}
  5505  		c := auxIntToInt64(v_1.AuxInt)
  5506  		v.reset(OpARM64XORconst)
  5507  		v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
  5508  		v.AddArg(x)
  5509  		return true
  5510  	}
  5511  	// match: (EONshiftRO (RORconst x [c]) x [c])
  5512  	// result: (MOVDconst [-1])
  5513  	for {
  5514  		c := auxIntToInt64(v.AuxInt)
  5515  		if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
  5516  			break
  5517  		}
  5518  		x := v_0.Args[0]
  5519  		if x != v_1 {
  5520  			break
  5521  		}
  5522  		v.reset(OpARM64MOVDconst)
  5523  		v.AuxInt = int64ToAuxInt(-1)
  5524  		return true
  5525  	}
  5526  	return false
  5527  }
  5528  func rewriteValueARM64_OpARM64Equal(v *Value) bool {
  5529  	v_0 := v.Args[0]
  5530  	b := v.Block
  5531  	// match: (Equal (CMPconst [0] z:(AND x y)))
  5532  	// cond: z.Uses == 1
  5533  	// result: (Equal (TST x y))
  5534  	for {
  5535  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  5536  			break
  5537  		}
  5538  		z := v_0.Args[0]
  5539  		if z.Op != OpARM64AND {
  5540  			break
  5541  		}
  5542  		y := z.Args[1]
  5543  		x := z.Args[0]
  5544  		if !(z.Uses == 1) {
  5545  			break
  5546  		}
  5547  		v.reset(OpARM64Equal)
  5548  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  5549  		v0.AddArg2(x, y)
  5550  		v.AddArg(v0)
  5551  		return true
  5552  	}
  5553  	// match: (Equal (CMPWconst [0] x:(ANDconst [c] y)))
  5554  	// cond: x.Uses == 1
  5555  	// result: (Equal (TSTWconst [int32(c)] y))
  5556  	for {
  5557  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  5558  			break
  5559  		}
  5560  		x := v_0.Args[0]
  5561  		if x.Op != OpARM64ANDconst {
  5562  			break
  5563  		}
  5564  		c := auxIntToInt64(x.AuxInt)
  5565  		y := x.Args[0]
  5566  		if !(x.Uses == 1) {
  5567  			break
  5568  		}
  5569  		v.reset(OpARM64Equal)
  5570  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  5571  		v0.AuxInt = int32ToAuxInt(int32(c))
  5572  		v0.AddArg(y)
  5573  		v.AddArg(v0)
  5574  		return true
  5575  	}
  5576  	// match: (Equal (CMPWconst [0] z:(AND x y)))
  5577  	// cond: z.Uses == 1
  5578  	// result: (Equal (TSTW x y))
  5579  	for {
  5580  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  5581  			break
  5582  		}
  5583  		z := v_0.Args[0]
  5584  		if z.Op != OpARM64AND {
  5585  			break
  5586  		}
  5587  		y := z.Args[1]
  5588  		x := z.Args[0]
  5589  		if !(z.Uses == 1) {
  5590  			break
  5591  		}
  5592  		v.reset(OpARM64Equal)
  5593  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  5594  		v0.AddArg2(x, y)
  5595  		v.AddArg(v0)
  5596  		return true
  5597  	}
  5598  	// match: (Equal (CMPconst [0] x:(ANDconst [c] y)))
  5599  	// cond: x.Uses == 1
  5600  	// result: (Equal (TSTconst [c] y))
  5601  	for {
  5602  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  5603  			break
  5604  		}
  5605  		x := v_0.Args[0]
  5606  		if x.Op != OpARM64ANDconst {
  5607  			break
  5608  		}
  5609  		c := auxIntToInt64(x.AuxInt)
  5610  		y := x.Args[0]
  5611  		if !(x.Uses == 1) {
  5612  			break
  5613  		}
  5614  		v.reset(OpARM64Equal)
  5615  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  5616  		v0.AuxInt = int64ToAuxInt(c)
  5617  		v0.AddArg(y)
  5618  		v.AddArg(v0)
  5619  		return true
  5620  	}
  5621  	// match: (Equal (CMP x z:(NEG y)))
  5622  	// cond: z.Uses == 1
  5623  	// result: (Equal (CMN x y))
  5624  	for {
  5625  		if v_0.Op != OpARM64CMP {
  5626  			break
  5627  		}
  5628  		_ = v_0.Args[1]
  5629  		x := v_0.Args[0]
  5630  		z := v_0.Args[1]
  5631  		if z.Op != OpARM64NEG {
  5632  			break
  5633  		}
  5634  		y := z.Args[0]
  5635  		if !(z.Uses == 1) {
  5636  			break
  5637  		}
  5638  		v.reset(OpARM64Equal)
  5639  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  5640  		v0.AddArg2(x, y)
  5641  		v.AddArg(v0)
  5642  		return true
  5643  	}
  5644  	// match: (Equal (CMPW x z:(NEG y)))
  5645  	// cond: z.Uses == 1
  5646  	// result: (Equal (CMNW x y))
  5647  	for {
  5648  		if v_0.Op != OpARM64CMPW {
  5649  			break
  5650  		}
  5651  		_ = v_0.Args[1]
  5652  		x := v_0.Args[0]
  5653  		z := v_0.Args[1]
  5654  		if z.Op != OpARM64NEG {
  5655  			break
  5656  		}
  5657  		y := z.Args[0]
  5658  		if !(z.Uses == 1) {
  5659  			break
  5660  		}
  5661  		v.reset(OpARM64Equal)
  5662  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  5663  		v0.AddArg2(x, y)
  5664  		v.AddArg(v0)
  5665  		return true
  5666  	}
  5667  	// match: (Equal (CMPconst [0] x:(ADDconst [c] y)))
  5668  	// cond: x.Uses == 1
  5669  	// result: (Equal (CMNconst [c] y))
  5670  	for {
  5671  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  5672  			break
  5673  		}
  5674  		x := v_0.Args[0]
  5675  		if x.Op != OpARM64ADDconst {
  5676  			break
  5677  		}
  5678  		c := auxIntToInt64(x.AuxInt)
  5679  		y := x.Args[0]
  5680  		if !(x.Uses == 1) {
  5681  			break
  5682  		}
  5683  		v.reset(OpARM64Equal)
  5684  		v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
  5685  		v0.AuxInt = int64ToAuxInt(c)
  5686  		v0.AddArg(y)
  5687  		v.AddArg(v0)
  5688  		return true
  5689  	}
  5690  	// match: (Equal (CMPWconst [0] x:(ADDconst [c] y)))
  5691  	// cond: x.Uses == 1
  5692  	// result: (Equal (CMNWconst [int32(c)] y))
  5693  	for {
  5694  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  5695  			break
  5696  		}
  5697  		x := v_0.Args[0]
  5698  		if x.Op != OpARM64ADDconst {
  5699  			break
  5700  		}
  5701  		c := auxIntToInt64(x.AuxInt)
  5702  		y := x.Args[0]
  5703  		if !(x.Uses == 1) {
  5704  			break
  5705  		}
  5706  		v.reset(OpARM64Equal)
  5707  		v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
  5708  		v0.AuxInt = int32ToAuxInt(int32(c))
  5709  		v0.AddArg(y)
  5710  		v.AddArg(v0)
  5711  		return true
  5712  	}
  5713  	// match: (Equal (CMPconst [0] z:(ADD x y)))
  5714  	// cond: z.Uses == 1
  5715  	// result: (Equal (CMN x y))
  5716  	for {
  5717  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  5718  			break
  5719  		}
  5720  		z := v_0.Args[0]
  5721  		if z.Op != OpARM64ADD {
  5722  			break
  5723  		}
  5724  		y := z.Args[1]
  5725  		x := z.Args[0]
  5726  		if !(z.Uses == 1) {
  5727  			break
  5728  		}
  5729  		v.reset(OpARM64Equal)
  5730  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  5731  		v0.AddArg2(x, y)
  5732  		v.AddArg(v0)
  5733  		return true
  5734  	}
  5735  	// match: (Equal (CMPWconst [0] z:(ADD x y)))
  5736  	// cond: z.Uses == 1
  5737  	// result: (Equal (CMNW x y))
  5738  	for {
  5739  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  5740  			break
  5741  		}
  5742  		z := v_0.Args[0]
  5743  		if z.Op != OpARM64ADD {
  5744  			break
  5745  		}
  5746  		y := z.Args[1]
  5747  		x := z.Args[0]
  5748  		if !(z.Uses == 1) {
  5749  			break
  5750  		}
  5751  		v.reset(OpARM64Equal)
  5752  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  5753  		v0.AddArg2(x, y)
  5754  		v.AddArg(v0)
  5755  		return true
  5756  	}
  5757  	// match: (Equal (CMPconst [0] z:(MADD a x y)))
  5758  	// cond: z.Uses == 1
  5759  	// result: (Equal (CMN a (MUL <x.Type> x y)))
  5760  	for {
  5761  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  5762  			break
  5763  		}
  5764  		z := v_0.Args[0]
  5765  		if z.Op != OpARM64MADD {
  5766  			break
  5767  		}
  5768  		y := z.Args[2]
  5769  		a := z.Args[0]
  5770  		x := z.Args[1]
  5771  		if !(z.Uses == 1) {
  5772  			break
  5773  		}
  5774  		v.reset(OpARM64Equal)
  5775  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  5776  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  5777  		v1.AddArg2(x, y)
  5778  		v0.AddArg2(a, v1)
  5779  		v.AddArg(v0)
  5780  		return true
  5781  	}
  5782  	// match: (Equal (CMPWconst [0] z:(MADDW a x y)))
  5783  	// cond: z.Uses == 1
  5784  	// result: (Equal (CMNW a (MULW <x.Type> x y)))
  5785  	for {
  5786  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  5787  			break
  5788  		}
  5789  		z := v_0.Args[0]
  5790  		if z.Op != OpARM64MADDW {
  5791  			break
  5792  		}
  5793  		y := z.Args[2]
  5794  		a := z.Args[0]
  5795  		x := z.Args[1]
  5796  		if !(z.Uses == 1) {
  5797  			break
  5798  		}
  5799  		v.reset(OpARM64Equal)
  5800  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  5801  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  5802  		v1.AddArg2(x, y)
  5803  		v0.AddArg2(a, v1)
  5804  		v.AddArg(v0)
  5805  		return true
  5806  	}
  5807  	// match: (Equal (CMPconst [0] z:(MSUB a x y)))
  5808  	// cond: z.Uses == 1
  5809  	// result: (Equal (CMP a (MUL <x.Type> x y)))
  5810  	for {
  5811  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  5812  			break
  5813  		}
  5814  		z := v_0.Args[0]
  5815  		if z.Op != OpARM64MSUB {
  5816  			break
  5817  		}
  5818  		y := z.Args[2]
  5819  		a := z.Args[0]
  5820  		x := z.Args[1]
  5821  		if !(z.Uses == 1) {
  5822  			break
  5823  		}
  5824  		v.reset(OpARM64Equal)
  5825  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
  5826  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  5827  		v1.AddArg2(x, y)
  5828  		v0.AddArg2(a, v1)
  5829  		v.AddArg(v0)
  5830  		return true
  5831  	}
  5832  	// match: (Equal (CMPWconst [0] z:(MSUBW a x y)))
  5833  	// cond: z.Uses == 1
  5834  	// result: (Equal (CMPW a (MULW <x.Type> x y)))
  5835  	for {
  5836  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  5837  			break
  5838  		}
  5839  		z := v_0.Args[0]
  5840  		if z.Op != OpARM64MSUBW {
  5841  			break
  5842  		}
  5843  		y := z.Args[2]
  5844  		a := z.Args[0]
  5845  		x := z.Args[1]
  5846  		if !(z.Uses == 1) {
  5847  			break
  5848  		}
  5849  		v.reset(OpARM64Equal)
  5850  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
  5851  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  5852  		v1.AddArg2(x, y)
  5853  		v0.AddArg2(a, v1)
  5854  		v.AddArg(v0)
  5855  		return true
  5856  	}
  5857  	// match: (Equal (FlagConstant [fc]))
  5858  	// result: (MOVDconst [b2i(fc.eq())])
  5859  	for {
  5860  		if v_0.Op != OpARM64FlagConstant {
  5861  			break
  5862  		}
  5863  		fc := auxIntToFlagConstant(v_0.AuxInt)
  5864  		v.reset(OpARM64MOVDconst)
  5865  		v.AuxInt = int64ToAuxInt(b2i(fc.eq()))
  5866  		return true
  5867  	}
  5868  	// match: (Equal (InvertFlags x))
  5869  	// result: (Equal x)
  5870  	for {
  5871  		if v_0.Op != OpARM64InvertFlags {
  5872  			break
  5873  		}
  5874  		x := v_0.Args[0]
  5875  		v.reset(OpARM64Equal)
  5876  		v.AddArg(x)
  5877  		return true
  5878  	}
  5879  	return false
  5880  }
  5881  func rewriteValueARM64_OpARM64FADDD(v *Value) bool {
  5882  	v_1 := v.Args[1]
  5883  	v_0 := v.Args[0]
  5884  	// match: (FADDD a (FMULD x y))
  5885  	// cond: a.Block.Func.useFMA(v)
  5886  	// result: (FMADDD a x y)
  5887  	for {
  5888  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5889  			a := v_0
  5890  			if v_1.Op != OpARM64FMULD {
  5891  				continue
  5892  			}
  5893  			y := v_1.Args[1]
  5894  			x := v_1.Args[0]
  5895  			if !(a.Block.Func.useFMA(v)) {
  5896  				continue
  5897  			}
  5898  			v.reset(OpARM64FMADDD)
  5899  			v.AddArg3(a, x, y)
  5900  			return true
  5901  		}
  5902  		break
  5903  	}
  5904  	// match: (FADDD a (FNMULD x y))
  5905  	// cond: a.Block.Func.useFMA(v)
  5906  	// result: (FMSUBD a x y)
  5907  	for {
  5908  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5909  			a := v_0
  5910  			if v_1.Op != OpARM64FNMULD {
  5911  				continue
  5912  			}
  5913  			y := v_1.Args[1]
  5914  			x := v_1.Args[0]
  5915  			if !(a.Block.Func.useFMA(v)) {
  5916  				continue
  5917  			}
  5918  			v.reset(OpARM64FMSUBD)
  5919  			v.AddArg3(a, x, y)
  5920  			return true
  5921  		}
  5922  		break
  5923  	}
  5924  	return false
  5925  }
  5926  func rewriteValueARM64_OpARM64FADDS(v *Value) bool {
  5927  	v_1 := v.Args[1]
  5928  	v_0 := v.Args[0]
  5929  	// match: (FADDS a (FMULS x y))
  5930  	// cond: a.Block.Func.useFMA(v)
  5931  	// result: (FMADDS a x y)
  5932  	for {
  5933  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5934  			a := v_0
  5935  			if v_1.Op != OpARM64FMULS {
  5936  				continue
  5937  			}
  5938  			y := v_1.Args[1]
  5939  			x := v_1.Args[0]
  5940  			if !(a.Block.Func.useFMA(v)) {
  5941  				continue
  5942  			}
  5943  			v.reset(OpARM64FMADDS)
  5944  			v.AddArg3(a, x, y)
  5945  			return true
  5946  		}
  5947  		break
  5948  	}
  5949  	// match: (FADDS a (FNMULS x y))
  5950  	// cond: a.Block.Func.useFMA(v)
  5951  	// result: (FMSUBS a x y)
  5952  	for {
  5953  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5954  			a := v_0
  5955  			if v_1.Op != OpARM64FNMULS {
  5956  				continue
  5957  			}
  5958  			y := v_1.Args[1]
  5959  			x := v_1.Args[0]
  5960  			if !(a.Block.Func.useFMA(v)) {
  5961  				continue
  5962  			}
  5963  			v.reset(OpARM64FMSUBS)
  5964  			v.AddArg3(a, x, y)
  5965  			return true
  5966  		}
  5967  		break
  5968  	}
  5969  	return false
  5970  }
  5971  func rewriteValueARM64_OpARM64FCMPD(v *Value) bool {
  5972  	v_1 := v.Args[1]
  5973  	v_0 := v.Args[0]
  5974  	b := v.Block
  5975  	// match: (FCMPD x (FMOVDconst [0]))
  5976  	// result: (FCMPD0 x)
  5977  	for {
  5978  		x := v_0
  5979  		if v_1.Op != OpARM64FMOVDconst || auxIntToFloat64(v_1.AuxInt) != 0 {
  5980  			break
  5981  		}
  5982  		v.reset(OpARM64FCMPD0)
  5983  		v.AddArg(x)
  5984  		return true
  5985  	}
  5986  	// match: (FCMPD (FMOVDconst [0]) x)
  5987  	// result: (InvertFlags (FCMPD0 x))
  5988  	for {
  5989  		if v_0.Op != OpARM64FMOVDconst || auxIntToFloat64(v_0.AuxInt) != 0 {
  5990  			break
  5991  		}
  5992  		x := v_1
  5993  		v.reset(OpARM64InvertFlags)
  5994  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD0, types.TypeFlags)
  5995  		v0.AddArg(x)
  5996  		v.AddArg(v0)
  5997  		return true
  5998  	}
  5999  	return false
  6000  }
  6001  func rewriteValueARM64_OpARM64FCMPS(v *Value) bool {
  6002  	v_1 := v.Args[1]
  6003  	v_0 := v.Args[0]
  6004  	b := v.Block
  6005  	// match: (FCMPS x (FMOVSconst [0]))
  6006  	// result: (FCMPS0 x)
  6007  	for {
  6008  		x := v_0
  6009  		if v_1.Op != OpARM64FMOVSconst || auxIntToFloat64(v_1.AuxInt) != 0 {
  6010  			break
  6011  		}
  6012  		v.reset(OpARM64FCMPS0)
  6013  		v.AddArg(x)
  6014  		return true
  6015  	}
  6016  	// match: (FCMPS (FMOVSconst [0]) x)
  6017  	// result: (InvertFlags (FCMPS0 x))
  6018  	for {
  6019  		if v_0.Op != OpARM64FMOVSconst || auxIntToFloat64(v_0.AuxInt) != 0 {
  6020  			break
  6021  		}
  6022  		x := v_1
  6023  		v.reset(OpARM64InvertFlags)
  6024  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS0, types.TypeFlags)
  6025  		v0.AddArg(x)
  6026  		v.AddArg(v0)
  6027  		return true
  6028  	}
  6029  	return false
  6030  }
  6031  func rewriteValueARM64_OpARM64FCVTDS(v *Value) bool {
  6032  	v_0 := v.Args[0]
  6033  	// match: (FCVTDS (FABSD (FCVTSD x)))
  6034  	// result: (FABSS x)
  6035  	for {
  6036  		if v_0.Op != OpARM64FABSD {
  6037  			break
  6038  		}
  6039  		v_0_0 := v_0.Args[0]
  6040  		if v_0_0.Op != OpARM64FCVTSD {
  6041  			break
  6042  		}
  6043  		x := v_0_0.Args[0]
  6044  		v.reset(OpARM64FABSS)
  6045  		v.AddArg(x)
  6046  		return true
  6047  	}
  6048  	// match: (FCVTDS (FSQRTD (FCVTSD x)))
  6049  	// result: (FSQRTS x)
  6050  	for {
  6051  		if v_0.Op != OpARM64FSQRTD {
  6052  			break
  6053  		}
  6054  		v_0_0 := v_0.Args[0]
  6055  		if v_0_0.Op != OpARM64FCVTSD {
  6056  			break
  6057  		}
  6058  		x := v_0_0.Args[0]
  6059  		v.reset(OpARM64FSQRTS)
  6060  		v.AddArg(x)
  6061  		return true
  6062  	}
  6063  	// match: (FCVTDS (FRINTPD (FCVTSD x)))
  6064  	// result: (FRINTPS x)
  6065  	for {
  6066  		if v_0.Op != OpARM64FRINTPD {
  6067  			break
  6068  		}
  6069  		v_0_0 := v_0.Args[0]
  6070  		if v_0_0.Op != OpARM64FCVTSD {
  6071  			break
  6072  		}
  6073  		x := v_0_0.Args[0]
  6074  		v.reset(OpARM64FRINTPS)
  6075  		v.AddArg(x)
  6076  		return true
  6077  	}
  6078  	// match: (FCVTDS (FRINTMD (FCVTSD x)))
  6079  	// result: (FRINTMS x)
  6080  	for {
  6081  		if v_0.Op != OpARM64FRINTMD {
  6082  			break
  6083  		}
  6084  		v_0_0 := v_0.Args[0]
  6085  		if v_0_0.Op != OpARM64FCVTSD {
  6086  			break
  6087  		}
  6088  		x := v_0_0.Args[0]
  6089  		v.reset(OpARM64FRINTMS)
  6090  		v.AddArg(x)
  6091  		return true
  6092  	}
  6093  	// match: (FCVTDS (FRINTAD (FCVTSD x)))
  6094  	// result: (FRINTAS x)
  6095  	for {
  6096  		if v_0.Op != OpARM64FRINTAD {
  6097  			break
  6098  		}
  6099  		v_0_0 := v_0.Args[0]
  6100  		if v_0_0.Op != OpARM64FCVTSD {
  6101  			break
  6102  		}
  6103  		x := v_0_0.Args[0]
  6104  		v.reset(OpARM64FRINTAS)
  6105  		v.AddArg(x)
  6106  		return true
  6107  	}
  6108  	// match: (FCVTDS (FRINTND (FCVTSD x)))
  6109  	// result: (FRINTNS x)
  6110  	for {
  6111  		if v_0.Op != OpARM64FRINTND {
  6112  			break
  6113  		}
  6114  		v_0_0 := v_0.Args[0]
  6115  		if v_0_0.Op != OpARM64FCVTSD {
  6116  			break
  6117  		}
  6118  		x := v_0_0.Args[0]
  6119  		v.reset(OpARM64FRINTNS)
  6120  		v.AddArg(x)
  6121  		return true
  6122  	}
  6123  	// match: (FCVTDS (FRINTZD (FCVTSD x)))
  6124  	// result: (FRINTZS x)
  6125  	for {
  6126  		if v_0.Op != OpARM64FRINTZD {
  6127  			break
  6128  		}
  6129  		v_0_0 := v_0.Args[0]
  6130  		if v_0_0.Op != OpARM64FCVTSD {
  6131  			break
  6132  		}
  6133  		x := v_0_0.Args[0]
  6134  		v.reset(OpARM64FRINTZS)
  6135  		v.AddArg(x)
  6136  		return true
  6137  	}
  6138  	return false
  6139  }
  6140  func rewriteValueARM64_OpARM64FLDPQ(v *Value) bool {
  6141  	v_1 := v.Args[1]
  6142  	v_0 := v.Args[0]
  6143  	b := v.Block
  6144  	config := b.Func.Config
  6145  	// match: (FLDPQ [off1] {sym} (ADDconst [off2] ptr) mem)
  6146  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6147  	// result: (FLDPQ [off1+int32(off2)] {sym} ptr mem)
  6148  	for {
  6149  		off1 := auxIntToInt32(v.AuxInt)
  6150  		sym := auxToSym(v.Aux)
  6151  		if v_0.Op != OpARM64ADDconst {
  6152  			break
  6153  		}
  6154  		off2 := auxIntToInt64(v_0.AuxInt)
  6155  		ptr := v_0.Args[0]
  6156  		mem := v_1
  6157  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6158  			break
  6159  		}
  6160  		v.reset(OpARM64FLDPQ)
  6161  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  6162  		v.Aux = symToAux(sym)
  6163  		v.AddArg2(ptr, mem)
  6164  		return true
  6165  	}
  6166  	// match: (FLDPQ [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  6167  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6168  	// result: (FLDPQ [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  6169  	for {
  6170  		off1 := auxIntToInt32(v.AuxInt)
  6171  		sym1 := auxToSym(v.Aux)
  6172  		if v_0.Op != OpARM64MOVDaddr {
  6173  			break
  6174  		}
  6175  		off2 := auxIntToInt32(v_0.AuxInt)
  6176  		sym2 := auxToSym(v_0.Aux)
  6177  		ptr := v_0.Args[0]
  6178  		mem := v_1
  6179  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6180  			break
  6181  		}
  6182  		v.reset(OpARM64FLDPQ)
  6183  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6184  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6185  		v.AddArg2(ptr, mem)
  6186  		return true
  6187  	}
  6188  	return false
  6189  }
  6190  func rewriteValueARM64_OpARM64FMOVDfpgp(v *Value) bool {
  6191  	v_0 := v.Args[0]
  6192  	b := v.Block
  6193  	// match: (FMOVDfpgp <t> (Arg [off] {sym}))
  6194  	// result: @b.Func.Entry (Arg <t> [off] {sym})
  6195  	for {
  6196  		t := v.Type
  6197  		if v_0.Op != OpArg {
  6198  			break
  6199  		}
  6200  		off := auxIntToInt32(v_0.AuxInt)
  6201  		sym := auxToSym(v_0.Aux)
  6202  		b = b.Func.Entry
  6203  		v0 := b.NewValue0(v.Pos, OpArg, t)
  6204  		v.copyOf(v0)
  6205  		v0.AuxInt = int32ToAuxInt(off)
  6206  		v0.Aux = symToAux(sym)
  6207  		return true
  6208  	}
  6209  	return false
  6210  }
  6211  func rewriteValueARM64_OpARM64FMOVDgpfp(v *Value) bool {
  6212  	v_0 := v.Args[0]
  6213  	b := v.Block
  6214  	// match: (FMOVDgpfp <t> (Arg [off] {sym}))
  6215  	// result: @b.Func.Entry (Arg <t> [off] {sym})
  6216  	for {
  6217  		t := v.Type
  6218  		if v_0.Op != OpArg {
  6219  			break
  6220  		}
  6221  		off := auxIntToInt32(v_0.AuxInt)
  6222  		sym := auxToSym(v_0.Aux)
  6223  		b = b.Func.Entry
  6224  		v0 := b.NewValue0(v.Pos, OpArg, t)
  6225  		v.copyOf(v0)
  6226  		v0.AuxInt = int32ToAuxInt(off)
  6227  		v0.Aux = symToAux(sym)
  6228  		return true
  6229  	}
  6230  	return false
  6231  }
  6232  func rewriteValueARM64_OpARM64FMOVDload(v *Value) bool {
  6233  	v_1 := v.Args[1]
  6234  	v_0 := v.Args[0]
  6235  	b := v.Block
  6236  	config := b.Func.Config
  6237  	// match: (FMOVDload [off] {sym} ptr (MOVDstore [off] {sym} ptr val _))
  6238  	// result: (FMOVDgpfp val)
  6239  	for {
  6240  		off := auxIntToInt32(v.AuxInt)
  6241  		sym := auxToSym(v.Aux)
  6242  		ptr := v_0
  6243  		if v_1.Op != OpARM64MOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  6244  			break
  6245  		}
  6246  		val := v_1.Args[1]
  6247  		if ptr != v_1.Args[0] {
  6248  			break
  6249  		}
  6250  		v.reset(OpARM64FMOVDgpfp)
  6251  		v.AddArg(val)
  6252  		return true
  6253  	}
  6254  	// match: (FMOVDload [off1] {sym} (ADDconst [off2] ptr) mem)
  6255  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6256  	// result: (FMOVDload [off1+int32(off2)] {sym} ptr mem)
  6257  	for {
  6258  		off1 := auxIntToInt32(v.AuxInt)
  6259  		sym := auxToSym(v.Aux)
  6260  		if v_0.Op != OpARM64ADDconst {
  6261  			break
  6262  		}
  6263  		off2 := auxIntToInt64(v_0.AuxInt)
  6264  		ptr := v_0.Args[0]
  6265  		mem := v_1
  6266  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6267  			break
  6268  		}
  6269  		v.reset(OpARM64FMOVDload)
  6270  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  6271  		v.Aux = symToAux(sym)
  6272  		v.AddArg2(ptr, mem)
  6273  		return true
  6274  	}
  6275  	// match: (FMOVDload [off] {sym} (ADD ptr idx) mem)
  6276  	// cond: off == 0 && sym == nil
  6277  	// result: (FMOVDloadidx ptr idx mem)
  6278  	for {
  6279  		off := auxIntToInt32(v.AuxInt)
  6280  		sym := auxToSym(v.Aux)
  6281  		if v_0.Op != OpARM64ADD {
  6282  			break
  6283  		}
  6284  		idx := v_0.Args[1]
  6285  		ptr := v_0.Args[0]
  6286  		mem := v_1
  6287  		if !(off == 0 && sym == nil) {
  6288  			break
  6289  		}
  6290  		v.reset(OpARM64FMOVDloadidx)
  6291  		v.AddArg3(ptr, idx, mem)
  6292  		return true
  6293  	}
  6294  	// match: (FMOVDload [off] {sym} (ADDshiftLL [3] ptr idx) mem)
  6295  	// cond: off == 0 && sym == nil
  6296  	// result: (FMOVDloadidx8 ptr idx mem)
  6297  	for {
  6298  		off := auxIntToInt32(v.AuxInt)
  6299  		sym := auxToSym(v.Aux)
  6300  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
  6301  			break
  6302  		}
  6303  		idx := v_0.Args[1]
  6304  		ptr := v_0.Args[0]
  6305  		mem := v_1
  6306  		if !(off == 0 && sym == nil) {
  6307  			break
  6308  		}
  6309  		v.reset(OpARM64FMOVDloadidx8)
  6310  		v.AddArg3(ptr, idx, mem)
  6311  		return true
  6312  	}
  6313  	// match: (FMOVDload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  6314  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6315  	// result: (FMOVDload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  6316  	for {
  6317  		off1 := auxIntToInt32(v.AuxInt)
  6318  		sym1 := auxToSym(v.Aux)
  6319  		if v_0.Op != OpARM64MOVDaddr {
  6320  			break
  6321  		}
  6322  		off2 := auxIntToInt32(v_0.AuxInt)
  6323  		sym2 := auxToSym(v_0.Aux)
  6324  		ptr := v_0.Args[0]
  6325  		mem := v_1
  6326  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6327  			break
  6328  		}
  6329  		v.reset(OpARM64FMOVDload)
  6330  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6331  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6332  		v.AddArg2(ptr, mem)
  6333  		return true
  6334  	}
  6335  	return false
  6336  }
  6337  func rewriteValueARM64_OpARM64FMOVDloadidx(v *Value) bool {
  6338  	v_2 := v.Args[2]
  6339  	v_1 := v.Args[1]
  6340  	v_0 := v.Args[0]
  6341  	// match: (FMOVDloadidx ptr (MOVDconst [c]) mem)
  6342  	// cond: is32Bit(c)
  6343  	// result: (FMOVDload [int32(c)] ptr mem)
  6344  	for {
  6345  		ptr := v_0
  6346  		if v_1.Op != OpARM64MOVDconst {
  6347  			break
  6348  		}
  6349  		c := auxIntToInt64(v_1.AuxInt)
  6350  		mem := v_2
  6351  		if !(is32Bit(c)) {
  6352  			break
  6353  		}
  6354  		v.reset(OpARM64FMOVDload)
  6355  		v.AuxInt = int32ToAuxInt(int32(c))
  6356  		v.AddArg2(ptr, mem)
  6357  		return true
  6358  	}
  6359  	// match: (FMOVDloadidx (MOVDconst [c]) ptr mem)
  6360  	// cond: is32Bit(c)
  6361  	// result: (FMOVDload [int32(c)] ptr mem)
  6362  	for {
  6363  		if v_0.Op != OpARM64MOVDconst {
  6364  			break
  6365  		}
  6366  		c := auxIntToInt64(v_0.AuxInt)
  6367  		ptr := v_1
  6368  		mem := v_2
  6369  		if !(is32Bit(c)) {
  6370  			break
  6371  		}
  6372  		v.reset(OpARM64FMOVDload)
  6373  		v.AuxInt = int32ToAuxInt(int32(c))
  6374  		v.AddArg2(ptr, mem)
  6375  		return true
  6376  	}
  6377  	// match: (FMOVDloadidx ptr (SLLconst [3] idx) mem)
  6378  	// result: (FMOVDloadidx8 ptr idx mem)
  6379  	for {
  6380  		ptr := v_0
  6381  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
  6382  			break
  6383  		}
  6384  		idx := v_1.Args[0]
  6385  		mem := v_2
  6386  		v.reset(OpARM64FMOVDloadidx8)
  6387  		v.AddArg3(ptr, idx, mem)
  6388  		return true
  6389  	}
  6390  	// match: (FMOVDloadidx (SLLconst [3] idx) ptr mem)
  6391  	// result: (FMOVDloadidx8 ptr idx mem)
  6392  	for {
  6393  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
  6394  			break
  6395  		}
  6396  		idx := v_0.Args[0]
  6397  		ptr := v_1
  6398  		mem := v_2
  6399  		v.reset(OpARM64FMOVDloadidx8)
  6400  		v.AddArg3(ptr, idx, mem)
  6401  		return true
  6402  	}
  6403  	return false
  6404  }
  6405  func rewriteValueARM64_OpARM64FMOVDloadidx8(v *Value) bool {
  6406  	v_2 := v.Args[2]
  6407  	v_1 := v.Args[1]
  6408  	v_0 := v.Args[0]
  6409  	// match: (FMOVDloadidx8 ptr (MOVDconst [c]) mem)
  6410  	// cond: is32Bit(c<<3)
  6411  	// result: (FMOVDload ptr [int32(c)<<3] mem)
  6412  	for {
  6413  		ptr := v_0
  6414  		if v_1.Op != OpARM64MOVDconst {
  6415  			break
  6416  		}
  6417  		c := auxIntToInt64(v_1.AuxInt)
  6418  		mem := v_2
  6419  		if !(is32Bit(c << 3)) {
  6420  			break
  6421  		}
  6422  		v.reset(OpARM64FMOVDload)
  6423  		v.AuxInt = int32ToAuxInt(int32(c) << 3)
  6424  		v.AddArg2(ptr, mem)
  6425  		return true
  6426  	}
  6427  	return false
  6428  }
  6429  func rewriteValueARM64_OpARM64FMOVDstore(v *Value) bool {
  6430  	v_2 := v.Args[2]
  6431  	v_1 := v.Args[1]
  6432  	v_0 := v.Args[0]
  6433  	b := v.Block
  6434  	config := b.Func.Config
  6435  	// match: (FMOVDstore [off] {sym} ptr (FMOVDgpfp val) mem)
  6436  	// result: (MOVDstore [off] {sym} ptr val mem)
  6437  	for {
  6438  		off := auxIntToInt32(v.AuxInt)
  6439  		sym := auxToSym(v.Aux)
  6440  		ptr := v_0
  6441  		if v_1.Op != OpARM64FMOVDgpfp {
  6442  			break
  6443  		}
  6444  		val := v_1.Args[0]
  6445  		mem := v_2
  6446  		v.reset(OpARM64MOVDstore)
  6447  		v.AuxInt = int32ToAuxInt(off)
  6448  		v.Aux = symToAux(sym)
  6449  		v.AddArg3(ptr, val, mem)
  6450  		return true
  6451  	}
  6452  	// match: (FMOVDstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  6453  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6454  	// result: (FMOVDstore [off1+int32(off2)] {sym} ptr val mem)
  6455  	for {
  6456  		off1 := auxIntToInt32(v.AuxInt)
  6457  		sym := auxToSym(v.Aux)
  6458  		if v_0.Op != OpARM64ADDconst {
  6459  			break
  6460  		}
  6461  		off2 := auxIntToInt64(v_0.AuxInt)
  6462  		ptr := v_0.Args[0]
  6463  		val := v_1
  6464  		mem := v_2
  6465  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6466  			break
  6467  		}
  6468  		v.reset(OpARM64FMOVDstore)
  6469  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  6470  		v.Aux = symToAux(sym)
  6471  		v.AddArg3(ptr, val, mem)
  6472  		return true
  6473  	}
  6474  	// match: (FMOVDstore [off] {sym} (ADD ptr idx) val mem)
  6475  	// cond: off == 0 && sym == nil
  6476  	// result: (FMOVDstoreidx ptr idx val mem)
  6477  	for {
  6478  		off := auxIntToInt32(v.AuxInt)
  6479  		sym := auxToSym(v.Aux)
  6480  		if v_0.Op != OpARM64ADD {
  6481  			break
  6482  		}
  6483  		idx := v_0.Args[1]
  6484  		ptr := v_0.Args[0]
  6485  		val := v_1
  6486  		mem := v_2
  6487  		if !(off == 0 && sym == nil) {
  6488  			break
  6489  		}
  6490  		v.reset(OpARM64FMOVDstoreidx)
  6491  		v.AddArg4(ptr, idx, val, mem)
  6492  		return true
  6493  	}
  6494  	// match: (FMOVDstore [off] {sym} (ADDshiftLL [3] ptr idx) val mem)
  6495  	// cond: off == 0 && sym == nil
  6496  	// result: (FMOVDstoreidx8 ptr idx val mem)
  6497  	for {
  6498  		off := auxIntToInt32(v.AuxInt)
  6499  		sym := auxToSym(v.Aux)
  6500  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
  6501  			break
  6502  		}
  6503  		idx := v_0.Args[1]
  6504  		ptr := v_0.Args[0]
  6505  		val := v_1
  6506  		mem := v_2
  6507  		if !(off == 0 && sym == nil) {
  6508  			break
  6509  		}
  6510  		v.reset(OpARM64FMOVDstoreidx8)
  6511  		v.AddArg4(ptr, idx, val, mem)
  6512  		return true
  6513  	}
  6514  	// match: (FMOVDstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
  6515  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6516  	// result: (FMOVDstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  6517  	for {
  6518  		off1 := auxIntToInt32(v.AuxInt)
  6519  		sym1 := auxToSym(v.Aux)
  6520  		if v_0.Op != OpARM64MOVDaddr {
  6521  			break
  6522  		}
  6523  		off2 := auxIntToInt32(v_0.AuxInt)
  6524  		sym2 := auxToSym(v_0.Aux)
  6525  		ptr := v_0.Args[0]
  6526  		val := v_1
  6527  		mem := v_2
  6528  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6529  			break
  6530  		}
  6531  		v.reset(OpARM64FMOVDstore)
  6532  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6533  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6534  		v.AddArg3(ptr, val, mem)
  6535  		return true
  6536  	}
  6537  	return false
  6538  }
  6539  func rewriteValueARM64_OpARM64FMOVDstoreidx(v *Value) bool {
  6540  	v_3 := v.Args[3]
  6541  	v_2 := v.Args[2]
  6542  	v_1 := v.Args[1]
  6543  	v_0 := v.Args[0]
  6544  	// match: (FMOVDstoreidx ptr (MOVDconst [c]) val mem)
  6545  	// cond: is32Bit(c)
  6546  	// result: (FMOVDstore [int32(c)] ptr val mem)
  6547  	for {
  6548  		ptr := v_0
  6549  		if v_1.Op != OpARM64MOVDconst {
  6550  			break
  6551  		}
  6552  		c := auxIntToInt64(v_1.AuxInt)
  6553  		val := v_2
  6554  		mem := v_3
  6555  		if !(is32Bit(c)) {
  6556  			break
  6557  		}
  6558  		v.reset(OpARM64FMOVDstore)
  6559  		v.AuxInt = int32ToAuxInt(int32(c))
  6560  		v.AddArg3(ptr, val, mem)
  6561  		return true
  6562  	}
  6563  	// match: (FMOVDstoreidx (MOVDconst [c]) idx val mem)
  6564  	// cond: is32Bit(c)
  6565  	// result: (FMOVDstore [int32(c)] idx val mem)
  6566  	for {
  6567  		if v_0.Op != OpARM64MOVDconst {
  6568  			break
  6569  		}
  6570  		c := auxIntToInt64(v_0.AuxInt)
  6571  		idx := v_1
  6572  		val := v_2
  6573  		mem := v_3
  6574  		if !(is32Bit(c)) {
  6575  			break
  6576  		}
  6577  		v.reset(OpARM64FMOVDstore)
  6578  		v.AuxInt = int32ToAuxInt(int32(c))
  6579  		v.AddArg3(idx, val, mem)
  6580  		return true
  6581  	}
  6582  	// match: (FMOVDstoreidx ptr (SLLconst [3] idx) val mem)
  6583  	// result: (FMOVDstoreidx8 ptr idx val mem)
  6584  	for {
  6585  		ptr := v_0
  6586  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
  6587  			break
  6588  		}
  6589  		idx := v_1.Args[0]
  6590  		val := v_2
  6591  		mem := v_3
  6592  		v.reset(OpARM64FMOVDstoreidx8)
  6593  		v.AddArg4(ptr, idx, val, mem)
  6594  		return true
  6595  	}
  6596  	// match: (FMOVDstoreidx (SLLconst [3] idx) ptr val mem)
  6597  	// result: (FMOVDstoreidx8 ptr idx val mem)
  6598  	for {
  6599  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
  6600  			break
  6601  		}
  6602  		idx := v_0.Args[0]
  6603  		ptr := v_1
  6604  		val := v_2
  6605  		mem := v_3
  6606  		v.reset(OpARM64FMOVDstoreidx8)
  6607  		v.AddArg4(ptr, idx, val, mem)
  6608  		return true
  6609  	}
  6610  	return false
  6611  }
  6612  func rewriteValueARM64_OpARM64FMOVDstoreidx8(v *Value) bool {
  6613  	v_3 := v.Args[3]
  6614  	v_2 := v.Args[2]
  6615  	v_1 := v.Args[1]
  6616  	v_0 := v.Args[0]
  6617  	// match: (FMOVDstoreidx8 ptr (MOVDconst [c]) val mem)
  6618  	// cond: is32Bit(c<<3)
  6619  	// result: (FMOVDstore [int32(c)<<3] ptr val mem)
  6620  	for {
  6621  		ptr := v_0
  6622  		if v_1.Op != OpARM64MOVDconst {
  6623  			break
  6624  		}
  6625  		c := auxIntToInt64(v_1.AuxInt)
  6626  		val := v_2
  6627  		mem := v_3
  6628  		if !(is32Bit(c << 3)) {
  6629  			break
  6630  		}
  6631  		v.reset(OpARM64FMOVDstore)
  6632  		v.AuxInt = int32ToAuxInt(int32(c) << 3)
  6633  		v.AddArg3(ptr, val, mem)
  6634  		return true
  6635  	}
  6636  	return false
  6637  }
  6638  func rewriteValueARM64_OpARM64FMOVQload(v *Value) bool {
  6639  	v_1 := v.Args[1]
  6640  	v_0 := v.Args[0]
  6641  	b := v.Block
  6642  	config := b.Func.Config
  6643  	// match: (FMOVQload [off1] {sym} (ADDconst [off2] ptr) mem)
  6644  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6645  	// result: (FMOVQload [off1+int32(off2)] {sym} ptr mem)
  6646  	for {
  6647  		off1 := auxIntToInt32(v.AuxInt)
  6648  		sym := auxToSym(v.Aux)
  6649  		if v_0.Op != OpARM64ADDconst {
  6650  			break
  6651  		}
  6652  		off2 := auxIntToInt64(v_0.AuxInt)
  6653  		ptr := v_0.Args[0]
  6654  		mem := v_1
  6655  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6656  			break
  6657  		}
  6658  		v.reset(OpARM64FMOVQload)
  6659  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  6660  		v.Aux = symToAux(sym)
  6661  		v.AddArg2(ptr, mem)
  6662  		return true
  6663  	}
  6664  	// match: (FMOVQload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  6665  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6666  	// result: (FMOVQload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  6667  	for {
  6668  		off1 := auxIntToInt32(v.AuxInt)
  6669  		sym1 := auxToSym(v.Aux)
  6670  		if v_0.Op != OpARM64MOVDaddr {
  6671  			break
  6672  		}
  6673  		off2 := auxIntToInt32(v_0.AuxInt)
  6674  		sym2 := auxToSym(v_0.Aux)
  6675  		ptr := v_0.Args[0]
  6676  		mem := v_1
  6677  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6678  			break
  6679  		}
  6680  		v.reset(OpARM64FMOVQload)
  6681  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6682  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6683  		v.AddArg2(ptr, mem)
  6684  		return true
  6685  	}
  6686  	return false
  6687  }
  6688  func rewriteValueARM64_OpARM64FMOVQstore(v *Value) bool {
  6689  	v_2 := v.Args[2]
  6690  	v_1 := v.Args[1]
  6691  	v_0 := v.Args[0]
  6692  	b := v.Block
  6693  	config := b.Func.Config
  6694  	// match: (FMOVQstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  6695  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6696  	// result: (FMOVQstore [off1+int32(off2)] {sym} ptr val mem)
  6697  	for {
  6698  		off1 := auxIntToInt32(v.AuxInt)
  6699  		sym := auxToSym(v.Aux)
  6700  		if v_0.Op != OpARM64ADDconst {
  6701  			break
  6702  		}
  6703  		off2 := auxIntToInt64(v_0.AuxInt)
  6704  		ptr := v_0.Args[0]
  6705  		val := v_1
  6706  		mem := v_2
  6707  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6708  			break
  6709  		}
  6710  		v.reset(OpARM64FMOVQstore)
  6711  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  6712  		v.Aux = symToAux(sym)
  6713  		v.AddArg3(ptr, val, mem)
  6714  		return true
  6715  	}
  6716  	// match: (FMOVQstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
  6717  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6718  	// result: (FMOVQstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  6719  	for {
  6720  		off1 := auxIntToInt32(v.AuxInt)
  6721  		sym1 := auxToSym(v.Aux)
  6722  		if v_0.Op != OpARM64MOVDaddr {
  6723  			break
  6724  		}
  6725  		off2 := auxIntToInt32(v_0.AuxInt)
  6726  		sym2 := auxToSym(v_0.Aux)
  6727  		ptr := v_0.Args[0]
  6728  		val := v_1
  6729  		mem := v_2
  6730  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6731  			break
  6732  		}
  6733  		v.reset(OpARM64FMOVQstore)
  6734  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6735  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6736  		v.AddArg3(ptr, val, mem)
  6737  		return true
  6738  	}
  6739  	return false
  6740  }
  6741  func rewriteValueARM64_OpARM64FMOVSload(v *Value) bool {
  6742  	v_1 := v.Args[1]
  6743  	v_0 := v.Args[0]
  6744  	b := v.Block
  6745  	config := b.Func.Config
  6746  	// match: (FMOVSload [off] {sym} ptr (MOVWstore [off] {sym} ptr val _))
  6747  	// result: (FMOVSgpfp val)
  6748  	for {
  6749  		off := auxIntToInt32(v.AuxInt)
  6750  		sym := auxToSym(v.Aux)
  6751  		ptr := v_0
  6752  		if v_1.Op != OpARM64MOVWstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  6753  			break
  6754  		}
  6755  		val := v_1.Args[1]
  6756  		if ptr != v_1.Args[0] {
  6757  			break
  6758  		}
  6759  		v.reset(OpARM64FMOVSgpfp)
  6760  		v.AddArg(val)
  6761  		return true
  6762  	}
  6763  	// match: (FMOVSload [off1] {sym} (ADDconst [off2] ptr) mem)
  6764  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6765  	// result: (FMOVSload [off1+int32(off2)] {sym} ptr mem)
  6766  	for {
  6767  		off1 := auxIntToInt32(v.AuxInt)
  6768  		sym := auxToSym(v.Aux)
  6769  		if v_0.Op != OpARM64ADDconst {
  6770  			break
  6771  		}
  6772  		off2 := auxIntToInt64(v_0.AuxInt)
  6773  		ptr := v_0.Args[0]
  6774  		mem := v_1
  6775  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6776  			break
  6777  		}
  6778  		v.reset(OpARM64FMOVSload)
  6779  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  6780  		v.Aux = symToAux(sym)
  6781  		v.AddArg2(ptr, mem)
  6782  		return true
  6783  	}
  6784  	// match: (FMOVSload [off] {sym} (ADD ptr idx) mem)
  6785  	// cond: off == 0 && sym == nil
  6786  	// result: (FMOVSloadidx ptr idx mem)
  6787  	for {
  6788  		off := auxIntToInt32(v.AuxInt)
  6789  		sym := auxToSym(v.Aux)
  6790  		if v_0.Op != OpARM64ADD {
  6791  			break
  6792  		}
  6793  		idx := v_0.Args[1]
  6794  		ptr := v_0.Args[0]
  6795  		mem := v_1
  6796  		if !(off == 0 && sym == nil) {
  6797  			break
  6798  		}
  6799  		v.reset(OpARM64FMOVSloadidx)
  6800  		v.AddArg3(ptr, idx, mem)
  6801  		return true
  6802  	}
  6803  	// match: (FMOVSload [off] {sym} (ADDshiftLL [2] ptr idx) mem)
  6804  	// cond: off == 0 && sym == nil
  6805  	// result: (FMOVSloadidx4 ptr idx mem)
  6806  	for {
  6807  		off := auxIntToInt32(v.AuxInt)
  6808  		sym := auxToSym(v.Aux)
  6809  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
  6810  			break
  6811  		}
  6812  		idx := v_0.Args[1]
  6813  		ptr := v_0.Args[0]
  6814  		mem := v_1
  6815  		if !(off == 0 && sym == nil) {
  6816  			break
  6817  		}
  6818  		v.reset(OpARM64FMOVSloadidx4)
  6819  		v.AddArg3(ptr, idx, mem)
  6820  		return true
  6821  	}
  6822  	// match: (FMOVSload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  6823  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6824  	// result: (FMOVSload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  6825  	for {
  6826  		off1 := auxIntToInt32(v.AuxInt)
  6827  		sym1 := auxToSym(v.Aux)
  6828  		if v_0.Op != OpARM64MOVDaddr {
  6829  			break
  6830  		}
  6831  		off2 := auxIntToInt32(v_0.AuxInt)
  6832  		sym2 := auxToSym(v_0.Aux)
  6833  		ptr := v_0.Args[0]
  6834  		mem := v_1
  6835  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6836  			break
  6837  		}
  6838  		v.reset(OpARM64FMOVSload)
  6839  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6840  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6841  		v.AddArg2(ptr, mem)
  6842  		return true
  6843  	}
  6844  	return false
  6845  }
  6846  func rewriteValueARM64_OpARM64FMOVSloadidx(v *Value) bool {
  6847  	v_2 := v.Args[2]
  6848  	v_1 := v.Args[1]
  6849  	v_0 := v.Args[0]
  6850  	// match: (FMOVSloadidx ptr (MOVDconst [c]) mem)
  6851  	// cond: is32Bit(c)
  6852  	// result: (FMOVSload [int32(c)] ptr mem)
  6853  	for {
  6854  		ptr := v_0
  6855  		if v_1.Op != OpARM64MOVDconst {
  6856  			break
  6857  		}
  6858  		c := auxIntToInt64(v_1.AuxInt)
  6859  		mem := v_2
  6860  		if !(is32Bit(c)) {
  6861  			break
  6862  		}
  6863  		v.reset(OpARM64FMOVSload)
  6864  		v.AuxInt = int32ToAuxInt(int32(c))
  6865  		v.AddArg2(ptr, mem)
  6866  		return true
  6867  	}
  6868  	// match: (FMOVSloadidx (MOVDconst [c]) ptr mem)
  6869  	// cond: is32Bit(c)
  6870  	// result: (FMOVSload [int32(c)] ptr mem)
  6871  	for {
  6872  		if v_0.Op != OpARM64MOVDconst {
  6873  			break
  6874  		}
  6875  		c := auxIntToInt64(v_0.AuxInt)
  6876  		ptr := v_1
  6877  		mem := v_2
  6878  		if !(is32Bit(c)) {
  6879  			break
  6880  		}
  6881  		v.reset(OpARM64FMOVSload)
  6882  		v.AuxInt = int32ToAuxInt(int32(c))
  6883  		v.AddArg2(ptr, mem)
  6884  		return true
  6885  	}
  6886  	// match: (FMOVSloadidx ptr (SLLconst [2] idx) mem)
  6887  	// result: (FMOVSloadidx4 ptr idx mem)
  6888  	for {
  6889  		ptr := v_0
  6890  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
  6891  			break
  6892  		}
  6893  		idx := v_1.Args[0]
  6894  		mem := v_2
  6895  		v.reset(OpARM64FMOVSloadidx4)
  6896  		v.AddArg3(ptr, idx, mem)
  6897  		return true
  6898  	}
  6899  	// match: (FMOVSloadidx (SLLconst [2] idx) ptr mem)
  6900  	// result: (FMOVSloadidx4 ptr idx mem)
  6901  	for {
  6902  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
  6903  			break
  6904  		}
  6905  		idx := v_0.Args[0]
  6906  		ptr := v_1
  6907  		mem := v_2
  6908  		v.reset(OpARM64FMOVSloadidx4)
  6909  		v.AddArg3(ptr, idx, mem)
  6910  		return true
  6911  	}
  6912  	return false
  6913  }
  6914  func rewriteValueARM64_OpARM64FMOVSloadidx4(v *Value) bool {
  6915  	v_2 := v.Args[2]
  6916  	v_1 := v.Args[1]
  6917  	v_0 := v.Args[0]
  6918  	// match: (FMOVSloadidx4 ptr (MOVDconst [c]) mem)
  6919  	// cond: is32Bit(c<<2)
  6920  	// result: (FMOVSload ptr [int32(c)<<2] mem)
  6921  	for {
  6922  		ptr := v_0
  6923  		if v_1.Op != OpARM64MOVDconst {
  6924  			break
  6925  		}
  6926  		c := auxIntToInt64(v_1.AuxInt)
  6927  		mem := v_2
  6928  		if !(is32Bit(c << 2)) {
  6929  			break
  6930  		}
  6931  		v.reset(OpARM64FMOVSload)
  6932  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
  6933  		v.AddArg2(ptr, mem)
  6934  		return true
  6935  	}
  6936  	return false
  6937  }
  6938  func rewriteValueARM64_OpARM64FMOVSstore(v *Value) bool {
  6939  	v_2 := v.Args[2]
  6940  	v_1 := v.Args[1]
  6941  	v_0 := v.Args[0]
  6942  	b := v.Block
  6943  	config := b.Func.Config
  6944  	// match: (FMOVSstore [off] {sym} ptr (FMOVSgpfp val) mem)
  6945  	// result: (MOVWstore [off] {sym} ptr val mem)
  6946  	for {
  6947  		off := auxIntToInt32(v.AuxInt)
  6948  		sym := auxToSym(v.Aux)
  6949  		ptr := v_0
  6950  		if v_1.Op != OpARM64FMOVSgpfp {
  6951  			break
  6952  		}
  6953  		val := v_1.Args[0]
  6954  		mem := v_2
  6955  		v.reset(OpARM64MOVWstore)
  6956  		v.AuxInt = int32ToAuxInt(off)
  6957  		v.Aux = symToAux(sym)
  6958  		v.AddArg3(ptr, val, mem)
  6959  		return true
  6960  	}
  6961  	// match: (FMOVSstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  6962  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6963  	// result: (FMOVSstore [off1+int32(off2)] {sym} ptr val mem)
  6964  	for {
  6965  		off1 := auxIntToInt32(v.AuxInt)
  6966  		sym := auxToSym(v.Aux)
  6967  		if v_0.Op != OpARM64ADDconst {
  6968  			break
  6969  		}
  6970  		off2 := auxIntToInt64(v_0.AuxInt)
  6971  		ptr := v_0.Args[0]
  6972  		val := v_1
  6973  		mem := v_2
  6974  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6975  			break
  6976  		}
  6977  		v.reset(OpARM64FMOVSstore)
  6978  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  6979  		v.Aux = symToAux(sym)
  6980  		v.AddArg3(ptr, val, mem)
  6981  		return true
  6982  	}
  6983  	// match: (FMOVSstore [off] {sym} (ADD ptr idx) val mem)
  6984  	// cond: off == 0 && sym == nil
  6985  	// result: (FMOVSstoreidx ptr idx val mem)
  6986  	for {
  6987  		off := auxIntToInt32(v.AuxInt)
  6988  		sym := auxToSym(v.Aux)
  6989  		if v_0.Op != OpARM64ADD {
  6990  			break
  6991  		}
  6992  		idx := v_0.Args[1]
  6993  		ptr := v_0.Args[0]
  6994  		val := v_1
  6995  		mem := v_2
  6996  		if !(off == 0 && sym == nil) {
  6997  			break
  6998  		}
  6999  		v.reset(OpARM64FMOVSstoreidx)
  7000  		v.AddArg4(ptr, idx, val, mem)
  7001  		return true
  7002  	}
  7003  	// match: (FMOVSstore [off] {sym} (ADDshiftLL [2] ptr idx) val mem)
  7004  	// cond: off == 0 && sym == nil
  7005  	// result: (FMOVSstoreidx4 ptr idx val mem)
  7006  	for {
  7007  		off := auxIntToInt32(v.AuxInt)
  7008  		sym := auxToSym(v.Aux)
  7009  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
  7010  			break
  7011  		}
  7012  		idx := v_0.Args[1]
  7013  		ptr := v_0.Args[0]
  7014  		val := v_1
  7015  		mem := v_2
  7016  		if !(off == 0 && sym == nil) {
  7017  			break
  7018  		}
  7019  		v.reset(OpARM64FMOVSstoreidx4)
  7020  		v.AddArg4(ptr, idx, val, mem)
  7021  		return true
  7022  	}
  7023  	// match: (FMOVSstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
  7024  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  7025  	// result: (FMOVSstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  7026  	for {
  7027  		off1 := auxIntToInt32(v.AuxInt)
  7028  		sym1 := auxToSym(v.Aux)
  7029  		if v_0.Op != OpARM64MOVDaddr {
  7030  			break
  7031  		}
  7032  		off2 := auxIntToInt32(v_0.AuxInt)
  7033  		sym2 := auxToSym(v_0.Aux)
  7034  		ptr := v_0.Args[0]
  7035  		val := v_1
  7036  		mem := v_2
  7037  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  7038  			break
  7039  		}
  7040  		v.reset(OpARM64FMOVSstore)
  7041  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7042  		v.Aux = symToAux(mergeSym(sym1, sym2))
  7043  		v.AddArg3(ptr, val, mem)
  7044  		return true
  7045  	}
  7046  	return false
  7047  }
  7048  func rewriteValueARM64_OpARM64FMOVSstoreidx(v *Value) bool {
  7049  	v_3 := v.Args[3]
  7050  	v_2 := v.Args[2]
  7051  	v_1 := v.Args[1]
  7052  	v_0 := v.Args[0]
  7053  	// match: (FMOVSstoreidx ptr (MOVDconst [c]) val mem)
  7054  	// cond: is32Bit(c)
  7055  	// result: (FMOVSstore [int32(c)] ptr val mem)
  7056  	for {
  7057  		ptr := v_0
  7058  		if v_1.Op != OpARM64MOVDconst {
  7059  			break
  7060  		}
  7061  		c := auxIntToInt64(v_1.AuxInt)
  7062  		val := v_2
  7063  		mem := v_3
  7064  		if !(is32Bit(c)) {
  7065  			break
  7066  		}
  7067  		v.reset(OpARM64FMOVSstore)
  7068  		v.AuxInt = int32ToAuxInt(int32(c))
  7069  		v.AddArg3(ptr, val, mem)
  7070  		return true
  7071  	}
  7072  	// match: (FMOVSstoreidx (MOVDconst [c]) idx val mem)
  7073  	// cond: is32Bit(c)
  7074  	// result: (FMOVSstore [int32(c)] idx val mem)
  7075  	for {
  7076  		if v_0.Op != OpARM64MOVDconst {
  7077  			break
  7078  		}
  7079  		c := auxIntToInt64(v_0.AuxInt)
  7080  		idx := v_1
  7081  		val := v_2
  7082  		mem := v_3
  7083  		if !(is32Bit(c)) {
  7084  			break
  7085  		}
  7086  		v.reset(OpARM64FMOVSstore)
  7087  		v.AuxInt = int32ToAuxInt(int32(c))
  7088  		v.AddArg3(idx, val, mem)
  7089  		return true
  7090  	}
  7091  	// match: (FMOVSstoreidx ptr (SLLconst [2] idx) val mem)
  7092  	// result: (FMOVSstoreidx4 ptr idx val mem)
  7093  	for {
  7094  		ptr := v_0
  7095  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
  7096  			break
  7097  		}
  7098  		idx := v_1.Args[0]
  7099  		val := v_2
  7100  		mem := v_3
  7101  		v.reset(OpARM64FMOVSstoreidx4)
  7102  		v.AddArg4(ptr, idx, val, mem)
  7103  		return true
  7104  	}
  7105  	// match: (FMOVSstoreidx (SLLconst [2] idx) ptr val mem)
  7106  	// result: (FMOVSstoreidx4 ptr idx val mem)
  7107  	for {
  7108  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
  7109  			break
  7110  		}
  7111  		idx := v_0.Args[0]
  7112  		ptr := v_1
  7113  		val := v_2
  7114  		mem := v_3
  7115  		v.reset(OpARM64FMOVSstoreidx4)
  7116  		v.AddArg4(ptr, idx, val, mem)
  7117  		return true
  7118  	}
  7119  	return false
  7120  }
  7121  func rewriteValueARM64_OpARM64FMOVSstoreidx4(v *Value) bool {
  7122  	v_3 := v.Args[3]
  7123  	v_2 := v.Args[2]
  7124  	v_1 := v.Args[1]
  7125  	v_0 := v.Args[0]
  7126  	// match: (FMOVSstoreidx4 ptr (MOVDconst [c]) val mem)
  7127  	// cond: is32Bit(c<<2)
  7128  	// result: (FMOVSstore [int32(c)<<2] ptr val mem)
  7129  	for {
  7130  		ptr := v_0
  7131  		if v_1.Op != OpARM64MOVDconst {
  7132  			break
  7133  		}
  7134  		c := auxIntToInt64(v_1.AuxInt)
  7135  		val := v_2
  7136  		mem := v_3
  7137  		if !(is32Bit(c << 2)) {
  7138  			break
  7139  		}
  7140  		v.reset(OpARM64FMOVSstore)
  7141  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
  7142  		v.AddArg3(ptr, val, mem)
  7143  		return true
  7144  	}
  7145  	return false
  7146  }
  7147  func rewriteValueARM64_OpARM64FMULD(v *Value) bool {
  7148  	v_1 := v.Args[1]
  7149  	v_0 := v.Args[0]
  7150  	// match: (FMULD (FNEGD x) y)
  7151  	// result: (FNMULD x y)
  7152  	for {
  7153  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7154  			if v_0.Op != OpARM64FNEGD {
  7155  				continue
  7156  			}
  7157  			x := v_0.Args[0]
  7158  			y := v_1
  7159  			v.reset(OpARM64FNMULD)
  7160  			v.AddArg2(x, y)
  7161  			return true
  7162  		}
  7163  		break
  7164  	}
  7165  	return false
  7166  }
  7167  func rewriteValueARM64_OpARM64FMULS(v *Value) bool {
  7168  	v_1 := v.Args[1]
  7169  	v_0 := v.Args[0]
  7170  	// match: (FMULS (FNEGS x) y)
  7171  	// result: (FNMULS x y)
  7172  	for {
  7173  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7174  			if v_0.Op != OpARM64FNEGS {
  7175  				continue
  7176  			}
  7177  			x := v_0.Args[0]
  7178  			y := v_1
  7179  			v.reset(OpARM64FNMULS)
  7180  			v.AddArg2(x, y)
  7181  			return true
  7182  		}
  7183  		break
  7184  	}
  7185  	return false
  7186  }
  7187  func rewriteValueARM64_OpARM64FNEGD(v *Value) bool {
  7188  	v_0 := v.Args[0]
  7189  	// match: (FNEGD (FMULD x y))
  7190  	// result: (FNMULD x y)
  7191  	for {
  7192  		if v_0.Op != OpARM64FMULD {
  7193  			break
  7194  		}
  7195  		y := v_0.Args[1]
  7196  		x := v_0.Args[0]
  7197  		v.reset(OpARM64FNMULD)
  7198  		v.AddArg2(x, y)
  7199  		return true
  7200  	}
  7201  	// match: (FNEGD (FNMULD x y))
  7202  	// result: (FMULD x y)
  7203  	for {
  7204  		if v_0.Op != OpARM64FNMULD {
  7205  			break
  7206  		}
  7207  		y := v_0.Args[1]
  7208  		x := v_0.Args[0]
  7209  		v.reset(OpARM64FMULD)
  7210  		v.AddArg2(x, y)
  7211  		return true
  7212  	}
  7213  	return false
  7214  }
  7215  func rewriteValueARM64_OpARM64FNEGS(v *Value) bool {
  7216  	v_0 := v.Args[0]
  7217  	// match: (FNEGS (FMULS x y))
  7218  	// result: (FNMULS x y)
  7219  	for {
  7220  		if v_0.Op != OpARM64FMULS {
  7221  			break
  7222  		}
  7223  		y := v_0.Args[1]
  7224  		x := v_0.Args[0]
  7225  		v.reset(OpARM64FNMULS)
  7226  		v.AddArg2(x, y)
  7227  		return true
  7228  	}
  7229  	// match: (FNEGS (FNMULS x y))
  7230  	// result: (FMULS x y)
  7231  	for {
  7232  		if v_0.Op != OpARM64FNMULS {
  7233  			break
  7234  		}
  7235  		y := v_0.Args[1]
  7236  		x := v_0.Args[0]
  7237  		v.reset(OpARM64FMULS)
  7238  		v.AddArg2(x, y)
  7239  		return true
  7240  	}
  7241  	return false
  7242  }
  7243  func rewriteValueARM64_OpARM64FNMULD(v *Value) bool {
  7244  	v_1 := v.Args[1]
  7245  	v_0 := v.Args[0]
  7246  	// match: (FNMULD (FNEGD x) y)
  7247  	// result: (FMULD x y)
  7248  	for {
  7249  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7250  			if v_0.Op != OpARM64FNEGD {
  7251  				continue
  7252  			}
  7253  			x := v_0.Args[0]
  7254  			y := v_1
  7255  			v.reset(OpARM64FMULD)
  7256  			v.AddArg2(x, y)
  7257  			return true
  7258  		}
  7259  		break
  7260  	}
  7261  	return false
  7262  }
  7263  func rewriteValueARM64_OpARM64FNMULS(v *Value) bool {
  7264  	v_1 := v.Args[1]
  7265  	v_0 := v.Args[0]
  7266  	// match: (FNMULS (FNEGS x) y)
  7267  	// result: (FMULS x y)
  7268  	for {
  7269  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7270  			if v_0.Op != OpARM64FNEGS {
  7271  				continue
  7272  			}
  7273  			x := v_0.Args[0]
  7274  			y := v_1
  7275  			v.reset(OpARM64FMULS)
  7276  			v.AddArg2(x, y)
  7277  			return true
  7278  		}
  7279  		break
  7280  	}
  7281  	return false
  7282  }
  7283  func rewriteValueARM64_OpARM64FSTPQ(v *Value) bool {
  7284  	v_3 := v.Args[3]
  7285  	v_2 := v.Args[2]
  7286  	v_1 := v.Args[1]
  7287  	v_0 := v.Args[0]
  7288  	b := v.Block
  7289  	config := b.Func.Config
  7290  	// match: (FSTPQ [off1] {sym} (ADDconst [off2] ptr) val1 val2 mem)
  7291  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  7292  	// result: (FSTPQ [off1+int32(off2)] {sym} ptr val1 val2 mem)
  7293  	for {
  7294  		off1 := auxIntToInt32(v.AuxInt)
  7295  		sym := auxToSym(v.Aux)
  7296  		if v_0.Op != OpARM64ADDconst {
  7297  			break
  7298  		}
  7299  		off2 := auxIntToInt64(v_0.AuxInt)
  7300  		ptr := v_0.Args[0]
  7301  		val1 := v_1
  7302  		val2 := v_2
  7303  		mem := v_3
  7304  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  7305  			break
  7306  		}
  7307  		v.reset(OpARM64FSTPQ)
  7308  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  7309  		v.Aux = symToAux(sym)
  7310  		v.AddArg4(ptr, val1, val2, mem)
  7311  		return true
  7312  	}
  7313  	// match: (FSTPQ [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val1 val2 mem)
  7314  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  7315  	// result: (FSTPQ [off1+off2] {mergeSym(sym1,sym2)} ptr val1 val2 mem)
  7316  	for {
  7317  		off1 := auxIntToInt32(v.AuxInt)
  7318  		sym1 := auxToSym(v.Aux)
  7319  		if v_0.Op != OpARM64MOVDaddr {
  7320  			break
  7321  		}
  7322  		off2 := auxIntToInt32(v_0.AuxInt)
  7323  		sym2 := auxToSym(v_0.Aux)
  7324  		ptr := v_0.Args[0]
  7325  		val1 := v_1
  7326  		val2 := v_2
  7327  		mem := v_3
  7328  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  7329  			break
  7330  		}
  7331  		v.reset(OpARM64FSTPQ)
  7332  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7333  		v.Aux = symToAux(mergeSym(sym1, sym2))
  7334  		v.AddArg4(ptr, val1, val2, mem)
  7335  		return true
  7336  	}
  7337  	return false
  7338  }
  7339  func rewriteValueARM64_OpARM64FSUBD(v *Value) bool {
  7340  	v_1 := v.Args[1]
  7341  	v_0 := v.Args[0]
  7342  	// match: (FSUBD a (FMULD x y))
  7343  	// cond: a.Block.Func.useFMA(v)
  7344  	// result: (FMSUBD a x y)
  7345  	for {
  7346  		a := v_0
  7347  		if v_1.Op != OpARM64FMULD {
  7348  			break
  7349  		}
  7350  		y := v_1.Args[1]
  7351  		x := v_1.Args[0]
  7352  		if !(a.Block.Func.useFMA(v)) {
  7353  			break
  7354  		}
  7355  		v.reset(OpARM64FMSUBD)
  7356  		v.AddArg3(a, x, y)
  7357  		return true
  7358  	}
  7359  	// match: (FSUBD (FMULD x y) a)
  7360  	// cond: a.Block.Func.useFMA(v)
  7361  	// result: (FNMSUBD a x y)
  7362  	for {
  7363  		if v_0.Op != OpARM64FMULD {
  7364  			break
  7365  		}
  7366  		y := v_0.Args[1]
  7367  		x := v_0.Args[0]
  7368  		a := v_1
  7369  		if !(a.Block.Func.useFMA(v)) {
  7370  			break
  7371  		}
  7372  		v.reset(OpARM64FNMSUBD)
  7373  		v.AddArg3(a, x, y)
  7374  		return true
  7375  	}
  7376  	// match: (FSUBD a (FNMULD x y))
  7377  	// cond: a.Block.Func.useFMA(v)
  7378  	// result: (FMADDD a x y)
  7379  	for {
  7380  		a := v_0
  7381  		if v_1.Op != OpARM64FNMULD {
  7382  			break
  7383  		}
  7384  		y := v_1.Args[1]
  7385  		x := v_1.Args[0]
  7386  		if !(a.Block.Func.useFMA(v)) {
  7387  			break
  7388  		}
  7389  		v.reset(OpARM64FMADDD)
  7390  		v.AddArg3(a, x, y)
  7391  		return true
  7392  	}
  7393  	// match: (FSUBD (FNMULD x y) a)
  7394  	// cond: a.Block.Func.useFMA(v)
  7395  	// result: (FNMADDD a x y)
  7396  	for {
  7397  		if v_0.Op != OpARM64FNMULD {
  7398  			break
  7399  		}
  7400  		y := v_0.Args[1]
  7401  		x := v_0.Args[0]
  7402  		a := v_1
  7403  		if !(a.Block.Func.useFMA(v)) {
  7404  			break
  7405  		}
  7406  		v.reset(OpARM64FNMADDD)
  7407  		v.AddArg3(a, x, y)
  7408  		return true
  7409  	}
  7410  	return false
  7411  }
  7412  func rewriteValueARM64_OpARM64FSUBS(v *Value) bool {
  7413  	v_1 := v.Args[1]
  7414  	v_0 := v.Args[0]
  7415  	// match: (FSUBS a (FMULS x y))
  7416  	// cond: a.Block.Func.useFMA(v)
  7417  	// result: (FMSUBS a x y)
  7418  	for {
  7419  		a := v_0
  7420  		if v_1.Op != OpARM64FMULS {
  7421  			break
  7422  		}
  7423  		y := v_1.Args[1]
  7424  		x := v_1.Args[0]
  7425  		if !(a.Block.Func.useFMA(v)) {
  7426  			break
  7427  		}
  7428  		v.reset(OpARM64FMSUBS)
  7429  		v.AddArg3(a, x, y)
  7430  		return true
  7431  	}
  7432  	// match: (FSUBS (FMULS x y) a)
  7433  	// cond: a.Block.Func.useFMA(v)
  7434  	// result: (FNMSUBS a x y)
  7435  	for {
  7436  		if v_0.Op != OpARM64FMULS {
  7437  			break
  7438  		}
  7439  		y := v_0.Args[1]
  7440  		x := v_0.Args[0]
  7441  		a := v_1
  7442  		if !(a.Block.Func.useFMA(v)) {
  7443  			break
  7444  		}
  7445  		v.reset(OpARM64FNMSUBS)
  7446  		v.AddArg3(a, x, y)
  7447  		return true
  7448  	}
  7449  	// match: (FSUBS a (FNMULS x y))
  7450  	// cond: a.Block.Func.useFMA(v)
  7451  	// result: (FMADDS a x y)
  7452  	for {
  7453  		a := v_0
  7454  		if v_1.Op != OpARM64FNMULS {
  7455  			break
  7456  		}
  7457  		y := v_1.Args[1]
  7458  		x := v_1.Args[0]
  7459  		if !(a.Block.Func.useFMA(v)) {
  7460  			break
  7461  		}
  7462  		v.reset(OpARM64FMADDS)
  7463  		v.AddArg3(a, x, y)
  7464  		return true
  7465  	}
  7466  	// match: (FSUBS (FNMULS x y) a)
  7467  	// cond: a.Block.Func.useFMA(v)
  7468  	// result: (FNMADDS a x y)
  7469  	for {
  7470  		if v_0.Op != OpARM64FNMULS {
  7471  			break
  7472  		}
  7473  		y := v_0.Args[1]
  7474  		x := v_0.Args[0]
  7475  		a := v_1
  7476  		if !(a.Block.Func.useFMA(v)) {
  7477  			break
  7478  		}
  7479  		v.reset(OpARM64FNMADDS)
  7480  		v.AddArg3(a, x, y)
  7481  		return true
  7482  	}
  7483  	return false
  7484  }
  7485  func rewriteValueARM64_OpARM64GreaterEqual(v *Value) bool {
  7486  	v_0 := v.Args[0]
  7487  	b := v.Block
  7488  	// match: (GreaterEqual (CMPconst [0] z:(AND x y)))
  7489  	// cond: z.Uses == 1
  7490  	// result: (GreaterEqual (TST x y))
  7491  	for {
  7492  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  7493  			break
  7494  		}
  7495  		z := v_0.Args[0]
  7496  		if z.Op != OpARM64AND {
  7497  			break
  7498  		}
  7499  		y := z.Args[1]
  7500  		x := z.Args[0]
  7501  		if !(z.Uses == 1) {
  7502  			break
  7503  		}
  7504  		v.reset(OpARM64GreaterEqual)
  7505  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  7506  		v0.AddArg2(x, y)
  7507  		v.AddArg(v0)
  7508  		return true
  7509  	}
  7510  	// match: (GreaterEqual (CMPWconst [0] x:(ANDconst [c] y)))
  7511  	// cond: x.Uses == 1
  7512  	// result: (GreaterEqual (TSTWconst [int32(c)] y))
  7513  	for {
  7514  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  7515  			break
  7516  		}
  7517  		x := v_0.Args[0]
  7518  		if x.Op != OpARM64ANDconst {
  7519  			break
  7520  		}
  7521  		c := auxIntToInt64(x.AuxInt)
  7522  		y := x.Args[0]
  7523  		if !(x.Uses == 1) {
  7524  			break
  7525  		}
  7526  		v.reset(OpARM64GreaterEqual)
  7527  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  7528  		v0.AuxInt = int32ToAuxInt(int32(c))
  7529  		v0.AddArg(y)
  7530  		v.AddArg(v0)
  7531  		return true
  7532  	}
  7533  	// match: (GreaterEqual (CMPWconst [0] z:(AND x y)))
  7534  	// cond: z.Uses == 1
  7535  	// result: (GreaterEqual (TSTW x y))
  7536  	for {
  7537  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  7538  			break
  7539  		}
  7540  		z := v_0.Args[0]
  7541  		if z.Op != OpARM64AND {
  7542  			break
  7543  		}
  7544  		y := z.Args[1]
  7545  		x := z.Args[0]
  7546  		if !(z.Uses == 1) {
  7547  			break
  7548  		}
  7549  		v.reset(OpARM64GreaterEqual)
  7550  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  7551  		v0.AddArg2(x, y)
  7552  		v.AddArg(v0)
  7553  		return true
  7554  	}
  7555  	// match: (GreaterEqual (CMPconst [0] x:(ANDconst [c] y)))
  7556  	// cond: x.Uses == 1
  7557  	// result: (GreaterEqual (TSTconst [c] y))
  7558  	for {
  7559  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  7560  			break
  7561  		}
  7562  		x := v_0.Args[0]
  7563  		if x.Op != OpARM64ANDconst {
  7564  			break
  7565  		}
  7566  		c := auxIntToInt64(x.AuxInt)
  7567  		y := x.Args[0]
  7568  		if !(x.Uses == 1) {
  7569  			break
  7570  		}
  7571  		v.reset(OpARM64GreaterEqual)
  7572  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  7573  		v0.AuxInt = int64ToAuxInt(c)
  7574  		v0.AddArg(y)
  7575  		v.AddArg(v0)
  7576  		return true
  7577  	}
  7578  	// match: (GreaterEqual (CMPconst [0] x:(ADDconst [c] y)))
  7579  	// cond: x.Uses == 1
  7580  	// result: (GreaterEqualNoov (CMNconst [c] y))
  7581  	for {
  7582  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  7583  			break
  7584  		}
  7585  		x := v_0.Args[0]
  7586  		if x.Op != OpARM64ADDconst {
  7587  			break
  7588  		}
  7589  		c := auxIntToInt64(x.AuxInt)
  7590  		y := x.Args[0]
  7591  		if !(x.Uses == 1) {
  7592  			break
  7593  		}
  7594  		v.reset(OpARM64GreaterEqualNoov)
  7595  		v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
  7596  		v0.AuxInt = int64ToAuxInt(c)
  7597  		v0.AddArg(y)
  7598  		v.AddArg(v0)
  7599  		return true
  7600  	}
  7601  	// match: (GreaterEqual (CMPWconst [0] x:(ADDconst [c] y)))
  7602  	// cond: x.Uses == 1
  7603  	// result: (GreaterEqualNoov (CMNWconst [int32(c)] y))
  7604  	for {
  7605  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  7606  			break
  7607  		}
  7608  		x := v_0.Args[0]
  7609  		if x.Op != OpARM64ADDconst {
  7610  			break
  7611  		}
  7612  		c := auxIntToInt64(x.AuxInt)
  7613  		y := x.Args[0]
  7614  		if !(x.Uses == 1) {
  7615  			break
  7616  		}
  7617  		v.reset(OpARM64GreaterEqualNoov)
  7618  		v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
  7619  		v0.AuxInt = int32ToAuxInt(int32(c))
  7620  		v0.AddArg(y)
  7621  		v.AddArg(v0)
  7622  		return true
  7623  	}
  7624  	// match: (GreaterEqual (CMPconst [0] z:(ADD x y)))
  7625  	// cond: z.Uses == 1
  7626  	// result: (GreaterEqualNoov (CMN x y))
  7627  	for {
  7628  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  7629  			break
  7630  		}
  7631  		z := v_0.Args[0]
  7632  		if z.Op != OpARM64ADD {
  7633  			break
  7634  		}
  7635  		y := z.Args[1]
  7636  		x := z.Args[0]
  7637  		if !(z.Uses == 1) {
  7638  			break
  7639  		}
  7640  		v.reset(OpARM64GreaterEqualNoov)
  7641  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  7642  		v0.AddArg2(x, y)
  7643  		v.AddArg(v0)
  7644  		return true
  7645  	}
  7646  	// match: (GreaterEqual (CMPWconst [0] z:(ADD x y)))
  7647  	// cond: z.Uses == 1
  7648  	// result: (GreaterEqualNoov (CMNW x y))
  7649  	for {
  7650  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  7651  			break
  7652  		}
  7653  		z := v_0.Args[0]
  7654  		if z.Op != OpARM64ADD {
  7655  			break
  7656  		}
  7657  		y := z.Args[1]
  7658  		x := z.Args[0]
  7659  		if !(z.Uses == 1) {
  7660  			break
  7661  		}
  7662  		v.reset(OpARM64GreaterEqualNoov)
  7663  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  7664  		v0.AddArg2(x, y)
  7665  		v.AddArg(v0)
  7666  		return true
  7667  	}
  7668  	// match: (GreaterEqual (CMPconst [0] z:(MADD a x y)))
  7669  	// cond: z.Uses == 1
  7670  	// result: (GreaterEqualNoov (CMN a (MUL <x.Type> x y)))
  7671  	for {
  7672  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  7673  			break
  7674  		}
  7675  		z := v_0.Args[0]
  7676  		if z.Op != OpARM64MADD {
  7677  			break
  7678  		}
  7679  		y := z.Args[2]
  7680  		a := z.Args[0]
  7681  		x := z.Args[1]
  7682  		if !(z.Uses == 1) {
  7683  			break
  7684  		}
  7685  		v.reset(OpARM64GreaterEqualNoov)
  7686  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  7687  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  7688  		v1.AddArg2(x, y)
  7689  		v0.AddArg2(a, v1)
  7690  		v.AddArg(v0)
  7691  		return true
  7692  	}
  7693  	// match: (GreaterEqual (CMPWconst [0] z:(MADDW a x y)))
  7694  	// cond: z.Uses == 1
  7695  	// result: (GreaterEqualNoov (CMNW a (MULW <x.Type> x y)))
  7696  	for {
  7697  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  7698  			break
  7699  		}
  7700  		z := v_0.Args[0]
  7701  		if z.Op != OpARM64MADDW {
  7702  			break
  7703  		}
  7704  		y := z.Args[2]
  7705  		a := z.Args[0]
  7706  		x := z.Args[1]
  7707  		if !(z.Uses == 1) {
  7708  			break
  7709  		}
  7710  		v.reset(OpARM64GreaterEqualNoov)
  7711  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  7712  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  7713  		v1.AddArg2(x, y)
  7714  		v0.AddArg2(a, v1)
  7715  		v.AddArg(v0)
  7716  		return true
  7717  	}
  7718  	// match: (GreaterEqual (FlagConstant [fc]))
  7719  	// result: (MOVDconst [b2i(fc.ge())])
  7720  	for {
  7721  		if v_0.Op != OpARM64FlagConstant {
  7722  			break
  7723  		}
  7724  		fc := auxIntToFlagConstant(v_0.AuxInt)
  7725  		v.reset(OpARM64MOVDconst)
  7726  		v.AuxInt = int64ToAuxInt(b2i(fc.ge()))
  7727  		return true
  7728  	}
  7729  	// match: (GreaterEqual (InvertFlags x))
  7730  	// result: (LessEqual x)
  7731  	for {
  7732  		if v_0.Op != OpARM64InvertFlags {
  7733  			break
  7734  		}
  7735  		x := v_0.Args[0]
  7736  		v.reset(OpARM64LessEqual)
  7737  		v.AddArg(x)
  7738  		return true
  7739  	}
  7740  	// match: (GreaterEqual (CMPconst x [0]))
  7741  	// result: (XORconst [1] (SRLconst <v.Type> [63] x))
  7742  	for {
  7743  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  7744  			break
  7745  		}
  7746  		x := v_0.Args[0]
  7747  		v.reset(OpARM64XORconst)
  7748  		v.AuxInt = int64ToAuxInt(1)
  7749  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, v.Type)
  7750  		v0.AuxInt = int64ToAuxInt(63)
  7751  		v0.AddArg(x)
  7752  		v.AddArg(v0)
  7753  		return true
  7754  	}
  7755  	// match: (GreaterEqual (CMPWconst x [0]))
  7756  	// result: (XORconst [1] (UBFX <v.Type> [armBFAuxInt(31,1)] x))
  7757  	for {
  7758  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  7759  			break
  7760  		}
  7761  		x := v_0.Args[0]
  7762  		v.reset(OpARM64XORconst)
  7763  		v.AuxInt = int64ToAuxInt(1)
  7764  		v0 := b.NewValue0(v.Pos, OpARM64UBFX, v.Type)
  7765  		v0.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(31, 1))
  7766  		v0.AddArg(x)
  7767  		v.AddArg(v0)
  7768  		return true
  7769  	}
  7770  	return false
  7771  }
  7772  func rewriteValueARM64_OpARM64GreaterEqualF(v *Value) bool {
  7773  	v_0 := v.Args[0]
  7774  	// match: (GreaterEqualF (InvertFlags x))
  7775  	// result: (LessEqualF x)
  7776  	for {
  7777  		if v_0.Op != OpARM64InvertFlags {
  7778  			break
  7779  		}
  7780  		x := v_0.Args[0]
  7781  		v.reset(OpARM64LessEqualF)
  7782  		v.AddArg(x)
  7783  		return true
  7784  	}
  7785  	return false
  7786  }
  7787  func rewriteValueARM64_OpARM64GreaterEqualNoov(v *Value) bool {
  7788  	v_0 := v.Args[0]
  7789  	// match: (GreaterEqualNoov (FlagConstant [fc]))
  7790  	// result: (MOVDconst [b2i(fc.geNoov())])
  7791  	for {
  7792  		if v_0.Op != OpARM64FlagConstant {
  7793  			break
  7794  		}
  7795  		fc := auxIntToFlagConstant(v_0.AuxInt)
  7796  		v.reset(OpARM64MOVDconst)
  7797  		v.AuxInt = int64ToAuxInt(b2i(fc.geNoov()))
  7798  		return true
  7799  	}
  7800  	return false
  7801  }
  7802  func rewriteValueARM64_OpARM64GreaterEqualU(v *Value) bool {
  7803  	v_0 := v.Args[0]
  7804  	// match: (GreaterEqualU (FlagConstant [fc]))
  7805  	// result: (MOVDconst [b2i(fc.uge())])
  7806  	for {
  7807  		if v_0.Op != OpARM64FlagConstant {
  7808  			break
  7809  		}
  7810  		fc := auxIntToFlagConstant(v_0.AuxInt)
  7811  		v.reset(OpARM64MOVDconst)
  7812  		v.AuxInt = int64ToAuxInt(b2i(fc.uge()))
  7813  		return true
  7814  	}
  7815  	// match: (GreaterEqualU (InvertFlags x))
  7816  	// result: (LessEqualU x)
  7817  	for {
  7818  		if v_0.Op != OpARM64InvertFlags {
  7819  			break
  7820  		}
  7821  		x := v_0.Args[0]
  7822  		v.reset(OpARM64LessEqualU)
  7823  		v.AddArg(x)
  7824  		return true
  7825  	}
  7826  	return false
  7827  }
  7828  func rewriteValueARM64_OpARM64GreaterThan(v *Value) bool {
  7829  	v_0 := v.Args[0]
  7830  	b := v.Block
  7831  	// match: (GreaterThan (CMPconst [0] z:(AND x y)))
  7832  	// cond: z.Uses == 1
  7833  	// result: (GreaterThan (TST x y))
  7834  	for {
  7835  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  7836  			break
  7837  		}
  7838  		z := v_0.Args[0]
  7839  		if z.Op != OpARM64AND {
  7840  			break
  7841  		}
  7842  		y := z.Args[1]
  7843  		x := z.Args[0]
  7844  		if !(z.Uses == 1) {
  7845  			break
  7846  		}
  7847  		v.reset(OpARM64GreaterThan)
  7848  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  7849  		v0.AddArg2(x, y)
  7850  		v.AddArg(v0)
  7851  		return true
  7852  	}
  7853  	// match: (GreaterThan (CMPWconst [0] x:(ANDconst [c] y)))
  7854  	// cond: x.Uses == 1
  7855  	// result: (GreaterThan (TSTWconst [int32(c)] y))
  7856  	for {
  7857  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  7858  			break
  7859  		}
  7860  		x := v_0.Args[0]
  7861  		if x.Op != OpARM64ANDconst {
  7862  			break
  7863  		}
  7864  		c := auxIntToInt64(x.AuxInt)
  7865  		y := x.Args[0]
  7866  		if !(x.Uses == 1) {
  7867  			break
  7868  		}
  7869  		v.reset(OpARM64GreaterThan)
  7870  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  7871  		v0.AuxInt = int32ToAuxInt(int32(c))
  7872  		v0.AddArg(y)
  7873  		v.AddArg(v0)
  7874  		return true
  7875  	}
  7876  	// match: (GreaterThan (CMPWconst [0] z:(AND x y)))
  7877  	// cond: z.Uses == 1
  7878  	// result: (GreaterThan (TSTW x y))
  7879  	for {
  7880  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  7881  			break
  7882  		}
  7883  		z := v_0.Args[0]
  7884  		if z.Op != OpARM64AND {
  7885  			break
  7886  		}
  7887  		y := z.Args[1]
  7888  		x := z.Args[0]
  7889  		if !(z.Uses == 1) {
  7890  			break
  7891  		}
  7892  		v.reset(OpARM64GreaterThan)
  7893  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  7894  		v0.AddArg2(x, y)
  7895  		v.AddArg(v0)
  7896  		return true
  7897  	}
  7898  	// match: (GreaterThan (CMPconst [0] x:(ANDconst [c] y)))
  7899  	// cond: x.Uses == 1
  7900  	// result: (GreaterThan (TSTconst [c] y))
  7901  	for {
  7902  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  7903  			break
  7904  		}
  7905  		x := v_0.Args[0]
  7906  		if x.Op != OpARM64ANDconst {
  7907  			break
  7908  		}
  7909  		c := auxIntToInt64(x.AuxInt)
  7910  		y := x.Args[0]
  7911  		if !(x.Uses == 1) {
  7912  			break
  7913  		}
  7914  		v.reset(OpARM64GreaterThan)
  7915  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  7916  		v0.AuxInt = int64ToAuxInt(c)
  7917  		v0.AddArg(y)
  7918  		v.AddArg(v0)
  7919  		return true
  7920  	}
  7921  	// match: (GreaterThan (FlagConstant [fc]))
  7922  	// result: (MOVDconst [b2i(fc.gt())])
  7923  	for {
  7924  		if v_0.Op != OpARM64FlagConstant {
  7925  			break
  7926  		}
  7927  		fc := auxIntToFlagConstant(v_0.AuxInt)
  7928  		v.reset(OpARM64MOVDconst)
  7929  		v.AuxInt = int64ToAuxInt(b2i(fc.gt()))
  7930  		return true
  7931  	}
  7932  	// match: (GreaterThan (InvertFlags x))
  7933  	// result: (LessThan x)
  7934  	for {
  7935  		if v_0.Op != OpARM64InvertFlags {
  7936  			break
  7937  		}
  7938  		x := v_0.Args[0]
  7939  		v.reset(OpARM64LessThan)
  7940  		v.AddArg(x)
  7941  		return true
  7942  	}
  7943  	return false
  7944  }
  7945  func rewriteValueARM64_OpARM64GreaterThanF(v *Value) bool {
  7946  	v_0 := v.Args[0]
  7947  	// match: (GreaterThanF (InvertFlags x))
  7948  	// result: (LessThanF x)
  7949  	for {
  7950  		if v_0.Op != OpARM64InvertFlags {
  7951  			break
  7952  		}
  7953  		x := v_0.Args[0]
  7954  		v.reset(OpARM64LessThanF)
  7955  		v.AddArg(x)
  7956  		return true
  7957  	}
  7958  	return false
  7959  }
  7960  func rewriteValueARM64_OpARM64GreaterThanU(v *Value) bool {
  7961  	v_0 := v.Args[0]
  7962  	// match: (GreaterThanU (FlagConstant [fc]))
  7963  	// result: (MOVDconst [b2i(fc.ugt())])
  7964  	for {
  7965  		if v_0.Op != OpARM64FlagConstant {
  7966  			break
  7967  		}
  7968  		fc := auxIntToFlagConstant(v_0.AuxInt)
  7969  		v.reset(OpARM64MOVDconst)
  7970  		v.AuxInt = int64ToAuxInt(b2i(fc.ugt()))
  7971  		return true
  7972  	}
  7973  	// match: (GreaterThanU (InvertFlags x))
  7974  	// result: (LessThanU x)
  7975  	for {
  7976  		if v_0.Op != OpARM64InvertFlags {
  7977  			break
  7978  		}
  7979  		x := v_0.Args[0]
  7980  		v.reset(OpARM64LessThanU)
  7981  		v.AddArg(x)
  7982  		return true
  7983  	}
  7984  	return false
  7985  }
  7986  func rewriteValueARM64_OpARM64LDP(v *Value) bool {
  7987  	v_1 := v.Args[1]
  7988  	v_0 := v.Args[0]
  7989  	b := v.Block
  7990  	config := b.Func.Config
  7991  	// match: (LDP [off1] {sym} (ADDconst [off2] ptr) mem)
  7992  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  7993  	// result: (LDP [off1+int32(off2)] {sym} ptr mem)
  7994  	for {
  7995  		off1 := auxIntToInt32(v.AuxInt)
  7996  		sym := auxToSym(v.Aux)
  7997  		if v_0.Op != OpARM64ADDconst {
  7998  			break
  7999  		}
  8000  		off2 := auxIntToInt64(v_0.AuxInt)
  8001  		ptr := v_0.Args[0]
  8002  		mem := v_1
  8003  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  8004  			break
  8005  		}
  8006  		v.reset(OpARM64LDP)
  8007  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  8008  		v.Aux = symToAux(sym)
  8009  		v.AddArg2(ptr, mem)
  8010  		return true
  8011  	}
  8012  	// match: (LDP [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  8013  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  8014  	// result: (LDP [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  8015  	for {
  8016  		off1 := auxIntToInt32(v.AuxInt)
  8017  		sym1 := auxToSym(v.Aux)
  8018  		if v_0.Op != OpARM64MOVDaddr {
  8019  			break
  8020  		}
  8021  		off2 := auxIntToInt32(v_0.AuxInt)
  8022  		sym2 := auxToSym(v_0.Aux)
  8023  		ptr := v_0.Args[0]
  8024  		mem := v_1
  8025  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  8026  			break
  8027  		}
  8028  		v.reset(OpARM64LDP)
  8029  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8030  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8031  		v.AddArg2(ptr, mem)
  8032  		return true
  8033  	}
  8034  	return false
  8035  }
  8036  func rewriteValueARM64_OpARM64LessEqual(v *Value) bool {
  8037  	v_0 := v.Args[0]
  8038  	b := v.Block
  8039  	// match: (LessEqual (CMPconst [0] z:(AND x y)))
  8040  	// cond: z.Uses == 1
  8041  	// result: (LessEqual (TST x y))
  8042  	for {
  8043  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  8044  			break
  8045  		}
  8046  		z := v_0.Args[0]
  8047  		if z.Op != OpARM64AND {
  8048  			break
  8049  		}
  8050  		y := z.Args[1]
  8051  		x := z.Args[0]
  8052  		if !(z.Uses == 1) {
  8053  			break
  8054  		}
  8055  		v.reset(OpARM64LessEqual)
  8056  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  8057  		v0.AddArg2(x, y)
  8058  		v.AddArg(v0)
  8059  		return true
  8060  	}
  8061  	// match: (LessEqual (CMPWconst [0] x:(ANDconst [c] y)))
  8062  	// cond: x.Uses == 1
  8063  	// result: (LessEqual (TSTWconst [int32(c)] y))
  8064  	for {
  8065  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  8066  			break
  8067  		}
  8068  		x := v_0.Args[0]
  8069  		if x.Op != OpARM64ANDconst {
  8070  			break
  8071  		}
  8072  		c := auxIntToInt64(x.AuxInt)
  8073  		y := x.Args[0]
  8074  		if !(x.Uses == 1) {
  8075  			break
  8076  		}
  8077  		v.reset(OpARM64LessEqual)
  8078  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  8079  		v0.AuxInt = int32ToAuxInt(int32(c))
  8080  		v0.AddArg(y)
  8081  		v.AddArg(v0)
  8082  		return true
  8083  	}
  8084  	// match: (LessEqual (CMPWconst [0] z:(AND x y)))
  8085  	// cond: z.Uses == 1
  8086  	// result: (LessEqual (TSTW x y))
  8087  	for {
  8088  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  8089  			break
  8090  		}
  8091  		z := v_0.Args[0]
  8092  		if z.Op != OpARM64AND {
  8093  			break
  8094  		}
  8095  		y := z.Args[1]
  8096  		x := z.Args[0]
  8097  		if !(z.Uses == 1) {
  8098  			break
  8099  		}
  8100  		v.reset(OpARM64LessEqual)
  8101  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  8102  		v0.AddArg2(x, y)
  8103  		v.AddArg(v0)
  8104  		return true
  8105  	}
  8106  	// match: (LessEqual (CMPconst [0] x:(ANDconst [c] y)))
  8107  	// cond: x.Uses == 1
  8108  	// result: (LessEqual (TSTconst [c] y))
  8109  	for {
  8110  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  8111  			break
  8112  		}
  8113  		x := v_0.Args[0]
  8114  		if x.Op != OpARM64ANDconst {
  8115  			break
  8116  		}
  8117  		c := auxIntToInt64(x.AuxInt)
  8118  		y := x.Args[0]
  8119  		if !(x.Uses == 1) {
  8120  			break
  8121  		}
  8122  		v.reset(OpARM64LessEqual)
  8123  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  8124  		v0.AuxInt = int64ToAuxInt(c)
  8125  		v0.AddArg(y)
  8126  		v.AddArg(v0)
  8127  		return true
  8128  	}
  8129  	// match: (LessEqual (FlagConstant [fc]))
  8130  	// result: (MOVDconst [b2i(fc.le())])
  8131  	for {
  8132  		if v_0.Op != OpARM64FlagConstant {
  8133  			break
  8134  		}
  8135  		fc := auxIntToFlagConstant(v_0.AuxInt)
  8136  		v.reset(OpARM64MOVDconst)
  8137  		v.AuxInt = int64ToAuxInt(b2i(fc.le()))
  8138  		return true
  8139  	}
  8140  	// match: (LessEqual (InvertFlags x))
  8141  	// result: (GreaterEqual x)
  8142  	for {
  8143  		if v_0.Op != OpARM64InvertFlags {
  8144  			break
  8145  		}
  8146  		x := v_0.Args[0]
  8147  		v.reset(OpARM64GreaterEqual)
  8148  		v.AddArg(x)
  8149  		return true
  8150  	}
  8151  	return false
  8152  }
  8153  func rewriteValueARM64_OpARM64LessEqualF(v *Value) bool {
  8154  	v_0 := v.Args[0]
  8155  	// match: (LessEqualF (InvertFlags x))
  8156  	// result: (GreaterEqualF x)
  8157  	for {
  8158  		if v_0.Op != OpARM64InvertFlags {
  8159  			break
  8160  		}
  8161  		x := v_0.Args[0]
  8162  		v.reset(OpARM64GreaterEqualF)
  8163  		v.AddArg(x)
  8164  		return true
  8165  	}
  8166  	return false
  8167  }
  8168  func rewriteValueARM64_OpARM64LessEqualU(v *Value) bool {
  8169  	v_0 := v.Args[0]
  8170  	// match: (LessEqualU (FlagConstant [fc]))
  8171  	// result: (MOVDconst [b2i(fc.ule())])
  8172  	for {
  8173  		if v_0.Op != OpARM64FlagConstant {
  8174  			break
  8175  		}
  8176  		fc := auxIntToFlagConstant(v_0.AuxInt)
  8177  		v.reset(OpARM64MOVDconst)
  8178  		v.AuxInt = int64ToAuxInt(b2i(fc.ule()))
  8179  		return true
  8180  	}
  8181  	// match: (LessEqualU (InvertFlags x))
  8182  	// result: (GreaterEqualU x)
  8183  	for {
  8184  		if v_0.Op != OpARM64InvertFlags {
  8185  			break
  8186  		}
  8187  		x := v_0.Args[0]
  8188  		v.reset(OpARM64GreaterEqualU)
  8189  		v.AddArg(x)
  8190  		return true
  8191  	}
  8192  	return false
  8193  }
  8194  func rewriteValueARM64_OpARM64LessThan(v *Value) bool {
  8195  	v_0 := v.Args[0]
  8196  	b := v.Block
  8197  	// match: (LessThan (CMPconst [0] z:(AND x y)))
  8198  	// cond: z.Uses == 1
  8199  	// result: (LessThan (TST x y))
  8200  	for {
  8201  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  8202  			break
  8203  		}
  8204  		z := v_0.Args[0]
  8205  		if z.Op != OpARM64AND {
  8206  			break
  8207  		}
  8208  		y := z.Args[1]
  8209  		x := z.Args[0]
  8210  		if !(z.Uses == 1) {
  8211  			break
  8212  		}
  8213  		v.reset(OpARM64LessThan)
  8214  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  8215  		v0.AddArg2(x, y)
  8216  		v.AddArg(v0)
  8217  		return true
  8218  	}
  8219  	// match: (LessThan (CMPWconst [0] x:(ANDconst [c] y)))
  8220  	// cond: x.Uses == 1
  8221  	// result: (LessThan (TSTWconst [int32(c)] y))
  8222  	for {
  8223  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  8224  			break
  8225  		}
  8226  		x := v_0.Args[0]
  8227  		if x.Op != OpARM64ANDconst {
  8228  			break
  8229  		}
  8230  		c := auxIntToInt64(x.AuxInt)
  8231  		y := x.Args[0]
  8232  		if !(x.Uses == 1) {
  8233  			break
  8234  		}
  8235  		v.reset(OpARM64LessThan)
  8236  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  8237  		v0.AuxInt = int32ToAuxInt(int32(c))
  8238  		v0.AddArg(y)
  8239  		v.AddArg(v0)
  8240  		return true
  8241  	}
  8242  	// match: (LessThan (CMPWconst [0] z:(AND x y)))
  8243  	// cond: z.Uses == 1
  8244  	// result: (LessThan (TSTW x y))
  8245  	for {
  8246  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  8247  			break
  8248  		}
  8249  		z := v_0.Args[0]
  8250  		if z.Op != OpARM64AND {
  8251  			break
  8252  		}
  8253  		y := z.Args[1]
  8254  		x := z.Args[0]
  8255  		if !(z.Uses == 1) {
  8256  			break
  8257  		}
  8258  		v.reset(OpARM64LessThan)
  8259  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  8260  		v0.AddArg2(x, y)
  8261  		v.AddArg(v0)
  8262  		return true
  8263  	}
  8264  	// match: (LessThan (CMPconst [0] x:(ANDconst [c] y)))
  8265  	// cond: x.Uses == 1
  8266  	// result: (LessThan (TSTconst [c] y))
  8267  	for {
  8268  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  8269  			break
  8270  		}
  8271  		x := v_0.Args[0]
  8272  		if x.Op != OpARM64ANDconst {
  8273  			break
  8274  		}
  8275  		c := auxIntToInt64(x.AuxInt)
  8276  		y := x.Args[0]
  8277  		if !(x.Uses == 1) {
  8278  			break
  8279  		}
  8280  		v.reset(OpARM64LessThan)
  8281  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  8282  		v0.AuxInt = int64ToAuxInt(c)
  8283  		v0.AddArg(y)
  8284  		v.AddArg(v0)
  8285  		return true
  8286  	}
  8287  	// match: (LessThan (CMPconst [0] x:(ADDconst [c] y)))
  8288  	// cond: x.Uses == 1
  8289  	// result: (LessThanNoov (CMNconst [c] y))
  8290  	for {
  8291  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  8292  			break
  8293  		}
  8294  		x := v_0.Args[0]
  8295  		if x.Op != OpARM64ADDconst {
  8296  			break
  8297  		}
  8298  		c := auxIntToInt64(x.AuxInt)
  8299  		y := x.Args[0]
  8300  		if !(x.Uses == 1) {
  8301  			break
  8302  		}
  8303  		v.reset(OpARM64LessThanNoov)
  8304  		v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
  8305  		v0.AuxInt = int64ToAuxInt(c)
  8306  		v0.AddArg(y)
  8307  		v.AddArg(v0)
  8308  		return true
  8309  	}
  8310  	// match: (LessThan (CMPWconst [0] x:(ADDconst [c] y)))
  8311  	// cond: x.Uses == 1
  8312  	// result: (LessThanNoov (CMNWconst [int32(c)] y))
  8313  	for {
  8314  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  8315  			break
  8316  		}
  8317  		x := v_0.Args[0]
  8318  		if x.Op != OpARM64ADDconst {
  8319  			break
  8320  		}
  8321  		c := auxIntToInt64(x.AuxInt)
  8322  		y := x.Args[0]
  8323  		if !(x.Uses == 1) {
  8324  			break
  8325  		}
  8326  		v.reset(OpARM64LessThanNoov)
  8327  		v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
  8328  		v0.AuxInt = int32ToAuxInt(int32(c))
  8329  		v0.AddArg(y)
  8330  		v.AddArg(v0)
  8331  		return true
  8332  	}
  8333  	// match: (LessThan (CMPconst [0] z:(ADD x y)))
  8334  	// cond: z.Uses == 1
  8335  	// result: (LessThanNoov (CMN x y))
  8336  	for {
  8337  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  8338  			break
  8339  		}
  8340  		z := v_0.Args[0]
  8341  		if z.Op != OpARM64ADD {
  8342  			break
  8343  		}
  8344  		y := z.Args[1]
  8345  		x := z.Args[0]
  8346  		if !(z.Uses == 1) {
  8347  			break
  8348  		}
  8349  		v.reset(OpARM64LessThanNoov)
  8350  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  8351  		v0.AddArg2(x, y)
  8352  		v.AddArg(v0)
  8353  		return true
  8354  	}
  8355  	// match: (LessThan (CMPWconst [0] z:(ADD x y)))
  8356  	// cond: z.Uses == 1
  8357  	// result: (LessThanNoov (CMNW x y))
  8358  	for {
  8359  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  8360  			break
  8361  		}
  8362  		z := v_0.Args[0]
  8363  		if z.Op != OpARM64ADD {
  8364  			break
  8365  		}
  8366  		y := z.Args[1]
  8367  		x := z.Args[0]
  8368  		if !(z.Uses == 1) {
  8369  			break
  8370  		}
  8371  		v.reset(OpARM64LessThanNoov)
  8372  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  8373  		v0.AddArg2(x, y)
  8374  		v.AddArg(v0)
  8375  		return true
  8376  	}
  8377  	// match: (LessThan (CMPconst [0] z:(MADD a x y)))
  8378  	// cond: z.Uses == 1
  8379  	// result: (LessThanNoov (CMN a (MUL <x.Type> x y)))
  8380  	for {
  8381  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  8382  			break
  8383  		}
  8384  		z := v_0.Args[0]
  8385  		if z.Op != OpARM64MADD {
  8386  			break
  8387  		}
  8388  		y := z.Args[2]
  8389  		a := z.Args[0]
  8390  		x := z.Args[1]
  8391  		if !(z.Uses == 1) {
  8392  			break
  8393  		}
  8394  		v.reset(OpARM64LessThanNoov)
  8395  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  8396  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  8397  		v1.AddArg2(x, y)
  8398  		v0.AddArg2(a, v1)
  8399  		v.AddArg(v0)
  8400  		return true
  8401  	}
  8402  	// match: (LessThan (CMPWconst [0] z:(MADDW a x y)))
  8403  	// cond: z.Uses == 1
  8404  	// result: (LessThanNoov (CMNW a (MULW <x.Type> x y)))
  8405  	for {
  8406  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  8407  			break
  8408  		}
  8409  		z := v_0.Args[0]
  8410  		if z.Op != OpARM64MADDW {
  8411  			break
  8412  		}
  8413  		y := z.Args[2]
  8414  		a := z.Args[0]
  8415  		x := z.Args[1]
  8416  		if !(z.Uses == 1) {
  8417  			break
  8418  		}
  8419  		v.reset(OpARM64LessThanNoov)
  8420  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  8421  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  8422  		v1.AddArg2(x, y)
  8423  		v0.AddArg2(a, v1)
  8424  		v.AddArg(v0)
  8425  		return true
  8426  	}
  8427  	// match: (LessThan (FlagConstant [fc]))
  8428  	// result: (MOVDconst [b2i(fc.lt())])
  8429  	for {
  8430  		if v_0.Op != OpARM64FlagConstant {
  8431  			break
  8432  		}
  8433  		fc := auxIntToFlagConstant(v_0.AuxInt)
  8434  		v.reset(OpARM64MOVDconst)
  8435  		v.AuxInt = int64ToAuxInt(b2i(fc.lt()))
  8436  		return true
  8437  	}
  8438  	// match: (LessThan (InvertFlags x))
  8439  	// result: (GreaterThan x)
  8440  	for {
  8441  		if v_0.Op != OpARM64InvertFlags {
  8442  			break
  8443  		}
  8444  		x := v_0.Args[0]
  8445  		v.reset(OpARM64GreaterThan)
  8446  		v.AddArg(x)
  8447  		return true
  8448  	}
  8449  	// match: (LessThan (CMPconst x [0]))
  8450  	// result: (SRLconst [63] x)
  8451  	for {
  8452  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  8453  			break
  8454  		}
  8455  		x := v_0.Args[0]
  8456  		v.reset(OpARM64SRLconst)
  8457  		v.AuxInt = int64ToAuxInt(63)
  8458  		v.AddArg(x)
  8459  		return true
  8460  	}
  8461  	// match: (LessThan (CMPWconst x [0]))
  8462  	// result: (UBFX [armBFAuxInt(31,1)] x)
  8463  	for {
  8464  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  8465  			break
  8466  		}
  8467  		x := v_0.Args[0]
  8468  		v.reset(OpARM64UBFX)
  8469  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(31, 1))
  8470  		v.AddArg(x)
  8471  		return true
  8472  	}
  8473  	return false
  8474  }
  8475  func rewriteValueARM64_OpARM64LessThanF(v *Value) bool {
  8476  	v_0 := v.Args[0]
  8477  	// match: (LessThanF (InvertFlags x))
  8478  	// result: (GreaterThanF x)
  8479  	for {
  8480  		if v_0.Op != OpARM64InvertFlags {
  8481  			break
  8482  		}
  8483  		x := v_0.Args[0]
  8484  		v.reset(OpARM64GreaterThanF)
  8485  		v.AddArg(x)
  8486  		return true
  8487  	}
  8488  	return false
  8489  }
  8490  func rewriteValueARM64_OpARM64LessThanNoov(v *Value) bool {
  8491  	v_0 := v.Args[0]
  8492  	// match: (LessThanNoov (FlagConstant [fc]))
  8493  	// result: (MOVDconst [b2i(fc.ltNoov())])
  8494  	for {
  8495  		if v_0.Op != OpARM64FlagConstant {
  8496  			break
  8497  		}
  8498  		fc := auxIntToFlagConstant(v_0.AuxInt)
  8499  		v.reset(OpARM64MOVDconst)
  8500  		v.AuxInt = int64ToAuxInt(b2i(fc.ltNoov()))
  8501  		return true
  8502  	}
  8503  	return false
  8504  }
  8505  func rewriteValueARM64_OpARM64LessThanU(v *Value) bool {
  8506  	v_0 := v.Args[0]
  8507  	// match: (LessThanU (FlagConstant [fc]))
  8508  	// result: (MOVDconst [b2i(fc.ult())])
  8509  	for {
  8510  		if v_0.Op != OpARM64FlagConstant {
  8511  			break
  8512  		}
  8513  		fc := auxIntToFlagConstant(v_0.AuxInt)
  8514  		v.reset(OpARM64MOVDconst)
  8515  		v.AuxInt = int64ToAuxInt(b2i(fc.ult()))
  8516  		return true
  8517  	}
  8518  	// match: (LessThanU (InvertFlags x))
  8519  	// result: (GreaterThanU x)
  8520  	for {
  8521  		if v_0.Op != OpARM64InvertFlags {
  8522  			break
  8523  		}
  8524  		x := v_0.Args[0]
  8525  		v.reset(OpARM64GreaterThanU)
  8526  		v.AddArg(x)
  8527  		return true
  8528  	}
  8529  	return false
  8530  }
  8531  func rewriteValueARM64_OpARM64LoweredPanicBoundsCR(v *Value) bool {
  8532  	v_1 := v.Args[1]
  8533  	v_0 := v.Args[0]
  8534  	// match: (LoweredPanicBoundsCR [kind] {p} (MOVDconst [c]) mem)
  8535  	// result: (LoweredPanicBoundsCC [kind] {PanicBoundsCC{Cx:p.C, Cy:c}} mem)
  8536  	for {
  8537  		kind := auxIntToInt64(v.AuxInt)
  8538  		p := auxToPanicBoundsC(v.Aux)
  8539  		if v_0.Op != OpARM64MOVDconst {
  8540  			break
  8541  		}
  8542  		c := auxIntToInt64(v_0.AuxInt)
  8543  		mem := v_1
  8544  		v.reset(OpARM64LoweredPanicBoundsCC)
  8545  		v.AuxInt = int64ToAuxInt(kind)
  8546  		v.Aux = panicBoundsCCToAux(PanicBoundsCC{Cx: p.C, Cy: c})
  8547  		v.AddArg(mem)
  8548  		return true
  8549  	}
  8550  	return false
  8551  }
  8552  func rewriteValueARM64_OpARM64LoweredPanicBoundsRC(v *Value) bool {
  8553  	v_1 := v.Args[1]
  8554  	v_0 := v.Args[0]
  8555  	// match: (LoweredPanicBoundsRC [kind] {p} (MOVDconst [c]) mem)
  8556  	// result: (LoweredPanicBoundsCC [kind] {PanicBoundsCC{Cx:c, Cy:p.C}} mem)
  8557  	for {
  8558  		kind := auxIntToInt64(v.AuxInt)
  8559  		p := auxToPanicBoundsC(v.Aux)
  8560  		if v_0.Op != OpARM64MOVDconst {
  8561  			break
  8562  		}
  8563  		c := auxIntToInt64(v_0.AuxInt)
  8564  		mem := v_1
  8565  		v.reset(OpARM64LoweredPanicBoundsCC)
  8566  		v.AuxInt = int64ToAuxInt(kind)
  8567  		v.Aux = panicBoundsCCToAux(PanicBoundsCC{Cx: c, Cy: p.C})
  8568  		v.AddArg(mem)
  8569  		return true
  8570  	}
  8571  	return false
  8572  }
  8573  func rewriteValueARM64_OpARM64LoweredPanicBoundsRR(v *Value) bool {
  8574  	v_2 := v.Args[2]
  8575  	v_1 := v.Args[1]
  8576  	v_0 := v.Args[0]
  8577  	// match: (LoweredPanicBoundsRR [kind] x (MOVDconst [c]) mem)
  8578  	// result: (LoweredPanicBoundsRC [kind] x {PanicBoundsC{C:c}} mem)
  8579  	for {
  8580  		kind := auxIntToInt64(v.AuxInt)
  8581  		x := v_0
  8582  		if v_1.Op != OpARM64MOVDconst {
  8583  			break
  8584  		}
  8585  		c := auxIntToInt64(v_1.AuxInt)
  8586  		mem := v_2
  8587  		v.reset(OpARM64LoweredPanicBoundsRC)
  8588  		v.AuxInt = int64ToAuxInt(kind)
  8589  		v.Aux = panicBoundsCToAux(PanicBoundsC{C: c})
  8590  		v.AddArg2(x, mem)
  8591  		return true
  8592  	}
  8593  	// match: (LoweredPanicBoundsRR [kind] (MOVDconst [c]) y mem)
  8594  	// result: (LoweredPanicBoundsCR [kind] {PanicBoundsC{C:c}} y mem)
  8595  	for {
  8596  		kind := auxIntToInt64(v.AuxInt)
  8597  		if v_0.Op != OpARM64MOVDconst {
  8598  			break
  8599  		}
  8600  		c := auxIntToInt64(v_0.AuxInt)
  8601  		y := v_1
  8602  		mem := v_2
  8603  		v.reset(OpARM64LoweredPanicBoundsCR)
  8604  		v.AuxInt = int64ToAuxInt(kind)
  8605  		v.Aux = panicBoundsCToAux(PanicBoundsC{C: c})
  8606  		v.AddArg2(y, mem)
  8607  		return true
  8608  	}
  8609  	return false
  8610  }
  8611  func rewriteValueARM64_OpARM64MADD(v *Value) bool {
  8612  	v_2 := v.Args[2]
  8613  	v_1 := v.Args[1]
  8614  	v_0 := v.Args[0]
  8615  	b := v.Block
  8616  	// match: (MADD a x (MOVDconst [-1]))
  8617  	// result: (SUB a x)
  8618  	for {
  8619  		a := v_0
  8620  		x := v_1
  8621  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != -1 {
  8622  			break
  8623  		}
  8624  		v.reset(OpARM64SUB)
  8625  		v.AddArg2(a, x)
  8626  		return true
  8627  	}
  8628  	// match: (MADD a _ (MOVDconst [0]))
  8629  	// result: a
  8630  	for {
  8631  		a := v_0
  8632  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 0 {
  8633  			break
  8634  		}
  8635  		v.copyOf(a)
  8636  		return true
  8637  	}
  8638  	// match: (MADD a x (MOVDconst [1]))
  8639  	// result: (ADD a x)
  8640  	for {
  8641  		a := v_0
  8642  		x := v_1
  8643  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 1 {
  8644  			break
  8645  		}
  8646  		v.reset(OpARM64ADD)
  8647  		v.AddArg2(a, x)
  8648  		return true
  8649  	}
  8650  	// match: (MADD a x (MOVDconst [c]))
  8651  	// cond: isPowerOfTwo(c)
  8652  	// result: (ADDshiftLL a x [log64(c)])
  8653  	for {
  8654  		a := v_0
  8655  		x := v_1
  8656  		if v_2.Op != OpARM64MOVDconst {
  8657  			break
  8658  		}
  8659  		c := auxIntToInt64(v_2.AuxInt)
  8660  		if !(isPowerOfTwo(c)) {
  8661  			break
  8662  		}
  8663  		v.reset(OpARM64ADDshiftLL)
  8664  		v.AuxInt = int64ToAuxInt(log64(c))
  8665  		v.AddArg2(a, x)
  8666  		return true
  8667  	}
  8668  	// match: (MADD a x (MOVDconst [c]))
  8669  	// cond: isPowerOfTwo(c-1) && c>=3
  8670  	// result: (ADD a (ADDshiftLL <x.Type> x x [log64(c-1)]))
  8671  	for {
  8672  		a := v_0
  8673  		x := v_1
  8674  		if v_2.Op != OpARM64MOVDconst {
  8675  			break
  8676  		}
  8677  		c := auxIntToInt64(v_2.AuxInt)
  8678  		if !(isPowerOfTwo(c-1) && c >= 3) {
  8679  			break
  8680  		}
  8681  		v.reset(OpARM64ADD)
  8682  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8683  		v0.AuxInt = int64ToAuxInt(log64(c - 1))
  8684  		v0.AddArg2(x, x)
  8685  		v.AddArg2(a, v0)
  8686  		return true
  8687  	}
  8688  	// match: (MADD a x (MOVDconst [c]))
  8689  	// cond: isPowerOfTwo(c+1) && c>=7
  8690  	// result: (SUB a (SUBshiftLL <x.Type> x x [log64(c+1)]))
  8691  	for {
  8692  		a := v_0
  8693  		x := v_1
  8694  		if v_2.Op != OpARM64MOVDconst {
  8695  			break
  8696  		}
  8697  		c := auxIntToInt64(v_2.AuxInt)
  8698  		if !(isPowerOfTwo(c+1) && c >= 7) {
  8699  			break
  8700  		}
  8701  		v.reset(OpARM64SUB)
  8702  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8703  		v0.AuxInt = int64ToAuxInt(log64(c + 1))
  8704  		v0.AddArg2(x, x)
  8705  		v.AddArg2(a, v0)
  8706  		return true
  8707  	}
  8708  	// match: (MADD a x (MOVDconst [c]))
  8709  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
  8710  	// result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
  8711  	for {
  8712  		a := v_0
  8713  		x := v_1
  8714  		if v_2.Op != OpARM64MOVDconst {
  8715  			break
  8716  		}
  8717  		c := auxIntToInt64(v_2.AuxInt)
  8718  		if !(c%3 == 0 && isPowerOfTwo(c/3)) {
  8719  			break
  8720  		}
  8721  		v.reset(OpARM64SUBshiftLL)
  8722  		v.AuxInt = int64ToAuxInt(log64(c / 3))
  8723  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8724  		v0.AuxInt = int64ToAuxInt(2)
  8725  		v0.AddArg2(x, x)
  8726  		v.AddArg2(a, v0)
  8727  		return true
  8728  	}
  8729  	// match: (MADD a x (MOVDconst [c]))
  8730  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
  8731  	// result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
  8732  	for {
  8733  		a := v_0
  8734  		x := v_1
  8735  		if v_2.Op != OpARM64MOVDconst {
  8736  			break
  8737  		}
  8738  		c := auxIntToInt64(v_2.AuxInt)
  8739  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
  8740  			break
  8741  		}
  8742  		v.reset(OpARM64ADDshiftLL)
  8743  		v.AuxInt = int64ToAuxInt(log64(c / 5))
  8744  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8745  		v0.AuxInt = int64ToAuxInt(2)
  8746  		v0.AddArg2(x, x)
  8747  		v.AddArg2(a, v0)
  8748  		return true
  8749  	}
  8750  	// match: (MADD a x (MOVDconst [c]))
  8751  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
  8752  	// result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
  8753  	for {
  8754  		a := v_0
  8755  		x := v_1
  8756  		if v_2.Op != OpARM64MOVDconst {
  8757  			break
  8758  		}
  8759  		c := auxIntToInt64(v_2.AuxInt)
  8760  		if !(c%7 == 0 && isPowerOfTwo(c/7)) {
  8761  			break
  8762  		}
  8763  		v.reset(OpARM64SUBshiftLL)
  8764  		v.AuxInt = int64ToAuxInt(log64(c / 7))
  8765  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8766  		v0.AuxInt = int64ToAuxInt(3)
  8767  		v0.AddArg2(x, x)
  8768  		v.AddArg2(a, v0)
  8769  		return true
  8770  	}
  8771  	// match: (MADD a x (MOVDconst [c]))
  8772  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
  8773  	// result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
  8774  	for {
  8775  		a := v_0
  8776  		x := v_1
  8777  		if v_2.Op != OpARM64MOVDconst {
  8778  			break
  8779  		}
  8780  		c := auxIntToInt64(v_2.AuxInt)
  8781  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
  8782  			break
  8783  		}
  8784  		v.reset(OpARM64ADDshiftLL)
  8785  		v.AuxInt = int64ToAuxInt(log64(c / 9))
  8786  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8787  		v0.AuxInt = int64ToAuxInt(3)
  8788  		v0.AddArg2(x, x)
  8789  		v.AddArg2(a, v0)
  8790  		return true
  8791  	}
  8792  	// match: (MADD a (MOVDconst [-1]) x)
  8793  	// result: (SUB a x)
  8794  	for {
  8795  		a := v_0
  8796  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
  8797  			break
  8798  		}
  8799  		x := v_2
  8800  		v.reset(OpARM64SUB)
  8801  		v.AddArg2(a, x)
  8802  		return true
  8803  	}
  8804  	// match: (MADD a (MOVDconst [0]) _)
  8805  	// result: a
  8806  	for {
  8807  		a := v_0
  8808  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  8809  			break
  8810  		}
  8811  		v.copyOf(a)
  8812  		return true
  8813  	}
  8814  	// match: (MADD a (MOVDconst [1]) x)
  8815  	// result: (ADD a x)
  8816  	for {
  8817  		a := v_0
  8818  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
  8819  			break
  8820  		}
  8821  		x := v_2
  8822  		v.reset(OpARM64ADD)
  8823  		v.AddArg2(a, x)
  8824  		return true
  8825  	}
  8826  	// match: (MADD a (MOVDconst [c]) x)
  8827  	// cond: isPowerOfTwo(c)
  8828  	// result: (ADDshiftLL a x [log64(c)])
  8829  	for {
  8830  		a := v_0
  8831  		if v_1.Op != OpARM64MOVDconst {
  8832  			break
  8833  		}
  8834  		c := auxIntToInt64(v_1.AuxInt)
  8835  		x := v_2
  8836  		if !(isPowerOfTwo(c)) {
  8837  			break
  8838  		}
  8839  		v.reset(OpARM64ADDshiftLL)
  8840  		v.AuxInt = int64ToAuxInt(log64(c))
  8841  		v.AddArg2(a, x)
  8842  		return true
  8843  	}
  8844  	// match: (MADD a (MOVDconst [c]) x)
  8845  	// cond: isPowerOfTwo(c-1) && c>=3
  8846  	// result: (ADD a (ADDshiftLL <x.Type> x x [log64(c-1)]))
  8847  	for {
  8848  		a := v_0
  8849  		if v_1.Op != OpARM64MOVDconst {
  8850  			break
  8851  		}
  8852  		c := auxIntToInt64(v_1.AuxInt)
  8853  		x := v_2
  8854  		if !(isPowerOfTwo(c-1) && c >= 3) {
  8855  			break
  8856  		}
  8857  		v.reset(OpARM64ADD)
  8858  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8859  		v0.AuxInt = int64ToAuxInt(log64(c - 1))
  8860  		v0.AddArg2(x, x)
  8861  		v.AddArg2(a, v0)
  8862  		return true
  8863  	}
  8864  	// match: (MADD a (MOVDconst [c]) x)
  8865  	// cond: isPowerOfTwo(c+1) && c>=7
  8866  	// result: (SUB a (SUBshiftLL <x.Type> x x [log64(c+1)]))
  8867  	for {
  8868  		a := v_0
  8869  		if v_1.Op != OpARM64MOVDconst {
  8870  			break
  8871  		}
  8872  		c := auxIntToInt64(v_1.AuxInt)
  8873  		x := v_2
  8874  		if !(isPowerOfTwo(c+1) && c >= 7) {
  8875  			break
  8876  		}
  8877  		v.reset(OpARM64SUB)
  8878  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8879  		v0.AuxInt = int64ToAuxInt(log64(c + 1))
  8880  		v0.AddArg2(x, x)
  8881  		v.AddArg2(a, v0)
  8882  		return true
  8883  	}
  8884  	// match: (MADD a (MOVDconst [c]) x)
  8885  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
  8886  	// result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
  8887  	for {
  8888  		a := v_0
  8889  		if v_1.Op != OpARM64MOVDconst {
  8890  			break
  8891  		}
  8892  		c := auxIntToInt64(v_1.AuxInt)
  8893  		x := v_2
  8894  		if !(c%3 == 0 && isPowerOfTwo(c/3)) {
  8895  			break
  8896  		}
  8897  		v.reset(OpARM64SUBshiftLL)
  8898  		v.AuxInt = int64ToAuxInt(log64(c / 3))
  8899  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8900  		v0.AuxInt = int64ToAuxInt(2)
  8901  		v0.AddArg2(x, x)
  8902  		v.AddArg2(a, v0)
  8903  		return true
  8904  	}
  8905  	// match: (MADD a (MOVDconst [c]) x)
  8906  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
  8907  	// result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
  8908  	for {
  8909  		a := v_0
  8910  		if v_1.Op != OpARM64MOVDconst {
  8911  			break
  8912  		}
  8913  		c := auxIntToInt64(v_1.AuxInt)
  8914  		x := v_2
  8915  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
  8916  			break
  8917  		}
  8918  		v.reset(OpARM64ADDshiftLL)
  8919  		v.AuxInt = int64ToAuxInt(log64(c / 5))
  8920  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8921  		v0.AuxInt = int64ToAuxInt(2)
  8922  		v0.AddArg2(x, x)
  8923  		v.AddArg2(a, v0)
  8924  		return true
  8925  	}
  8926  	// match: (MADD a (MOVDconst [c]) x)
  8927  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
  8928  	// result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
  8929  	for {
  8930  		a := v_0
  8931  		if v_1.Op != OpARM64MOVDconst {
  8932  			break
  8933  		}
  8934  		c := auxIntToInt64(v_1.AuxInt)
  8935  		x := v_2
  8936  		if !(c%7 == 0 && isPowerOfTwo(c/7)) {
  8937  			break
  8938  		}
  8939  		v.reset(OpARM64SUBshiftLL)
  8940  		v.AuxInt = int64ToAuxInt(log64(c / 7))
  8941  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8942  		v0.AuxInt = int64ToAuxInt(3)
  8943  		v0.AddArg2(x, x)
  8944  		v.AddArg2(a, v0)
  8945  		return true
  8946  	}
  8947  	// match: (MADD a (MOVDconst [c]) x)
  8948  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
  8949  	// result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
  8950  	for {
  8951  		a := v_0
  8952  		if v_1.Op != OpARM64MOVDconst {
  8953  			break
  8954  		}
  8955  		c := auxIntToInt64(v_1.AuxInt)
  8956  		x := v_2
  8957  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
  8958  			break
  8959  		}
  8960  		v.reset(OpARM64ADDshiftLL)
  8961  		v.AuxInt = int64ToAuxInt(log64(c / 9))
  8962  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8963  		v0.AuxInt = int64ToAuxInt(3)
  8964  		v0.AddArg2(x, x)
  8965  		v.AddArg2(a, v0)
  8966  		return true
  8967  	}
  8968  	// match: (MADD (MOVDconst [c]) x y)
  8969  	// result: (ADDconst [c] (MUL <x.Type> x y))
  8970  	for {
  8971  		if v_0.Op != OpARM64MOVDconst {
  8972  			break
  8973  		}
  8974  		c := auxIntToInt64(v_0.AuxInt)
  8975  		x := v_1
  8976  		y := v_2
  8977  		v.reset(OpARM64ADDconst)
  8978  		v.AuxInt = int64ToAuxInt(c)
  8979  		v0 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  8980  		v0.AddArg2(x, y)
  8981  		v.AddArg(v0)
  8982  		return true
  8983  	}
  8984  	// match: (MADD a (MOVDconst [c]) (MOVDconst [d]))
  8985  	// result: (ADDconst [c*d] a)
  8986  	for {
  8987  		a := v_0
  8988  		if v_1.Op != OpARM64MOVDconst {
  8989  			break
  8990  		}
  8991  		c := auxIntToInt64(v_1.AuxInt)
  8992  		if v_2.Op != OpARM64MOVDconst {
  8993  			break
  8994  		}
  8995  		d := auxIntToInt64(v_2.AuxInt)
  8996  		v.reset(OpARM64ADDconst)
  8997  		v.AuxInt = int64ToAuxInt(c * d)
  8998  		v.AddArg(a)
  8999  		return true
  9000  	}
  9001  	return false
  9002  }
  9003  func rewriteValueARM64_OpARM64MADDW(v *Value) bool {
  9004  	v_2 := v.Args[2]
  9005  	v_1 := v.Args[1]
  9006  	v_0 := v.Args[0]
  9007  	b := v.Block
  9008  	// match: (MADDW a x (MOVDconst [c]))
  9009  	// cond: int32(c)==-1
  9010  	// result: (MOVWUreg (SUB <a.Type> a x))
  9011  	for {
  9012  		a := v_0
  9013  		x := v_1
  9014  		if v_2.Op != OpARM64MOVDconst {
  9015  			break
  9016  		}
  9017  		c := auxIntToInt64(v_2.AuxInt)
  9018  		if !(int32(c) == -1) {
  9019  			break
  9020  		}
  9021  		v.reset(OpARM64MOVWUreg)
  9022  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
  9023  		v0.AddArg2(a, x)
  9024  		v.AddArg(v0)
  9025  		return true
  9026  	}
  9027  	// match: (MADDW a _ (MOVDconst [c]))
  9028  	// cond: int32(c)==0
  9029  	// result: (MOVWUreg a)
  9030  	for {
  9031  		a := v_0
  9032  		if v_2.Op != OpARM64MOVDconst {
  9033  			break
  9034  		}
  9035  		c := auxIntToInt64(v_2.AuxInt)
  9036  		if !(int32(c) == 0) {
  9037  			break
  9038  		}
  9039  		v.reset(OpARM64MOVWUreg)
  9040  		v.AddArg(a)
  9041  		return true
  9042  	}
  9043  	// match: (MADDW a x (MOVDconst [c]))
  9044  	// cond: int32(c)==1
  9045  	// result: (MOVWUreg (ADD <a.Type> a x))
  9046  	for {
  9047  		a := v_0
  9048  		x := v_1
  9049  		if v_2.Op != OpARM64MOVDconst {
  9050  			break
  9051  		}
  9052  		c := auxIntToInt64(v_2.AuxInt)
  9053  		if !(int32(c) == 1) {
  9054  			break
  9055  		}
  9056  		v.reset(OpARM64MOVWUreg)
  9057  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
  9058  		v0.AddArg2(a, x)
  9059  		v.AddArg(v0)
  9060  		return true
  9061  	}
  9062  	// match: (MADDW a x (MOVDconst [c]))
  9063  	// cond: isPowerOfTwo(c)
  9064  	// result: (MOVWUreg (ADDshiftLL <a.Type> a x [log64(c)]))
  9065  	for {
  9066  		a := v_0
  9067  		x := v_1
  9068  		if v_2.Op != OpARM64MOVDconst {
  9069  			break
  9070  		}
  9071  		c := auxIntToInt64(v_2.AuxInt)
  9072  		if !(isPowerOfTwo(c)) {
  9073  			break
  9074  		}
  9075  		v.reset(OpARM64MOVWUreg)
  9076  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  9077  		v0.AuxInt = int64ToAuxInt(log64(c))
  9078  		v0.AddArg2(a, x)
  9079  		v.AddArg(v0)
  9080  		return true
  9081  	}
  9082  	// match: (MADDW a x (MOVDconst [c]))
  9083  	// cond: isPowerOfTwo(c-1) && int32(c)>=3
  9084  	// result: (MOVWUreg (ADD <a.Type> a (ADDshiftLL <x.Type> x x [log64(c-1)])))
  9085  	for {
  9086  		a := v_0
  9087  		x := v_1
  9088  		if v_2.Op != OpARM64MOVDconst {
  9089  			break
  9090  		}
  9091  		c := auxIntToInt64(v_2.AuxInt)
  9092  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
  9093  			break
  9094  		}
  9095  		v.reset(OpARM64MOVWUreg)
  9096  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
  9097  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9098  		v1.AuxInt = int64ToAuxInt(log64(c - 1))
  9099  		v1.AddArg2(x, x)
  9100  		v0.AddArg2(a, v1)
  9101  		v.AddArg(v0)
  9102  		return true
  9103  	}
  9104  	// match: (MADDW a x (MOVDconst [c]))
  9105  	// cond: isPowerOfTwo(c+1) && int32(c)>=7
  9106  	// result: (MOVWUreg (SUB <a.Type> a (SUBshiftLL <x.Type> x x [log64(c+1)])))
  9107  	for {
  9108  		a := v_0
  9109  		x := v_1
  9110  		if v_2.Op != OpARM64MOVDconst {
  9111  			break
  9112  		}
  9113  		c := auxIntToInt64(v_2.AuxInt)
  9114  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
  9115  			break
  9116  		}
  9117  		v.reset(OpARM64MOVWUreg)
  9118  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
  9119  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  9120  		v1.AuxInt = int64ToAuxInt(log64(c + 1))
  9121  		v1.AddArg2(x, x)
  9122  		v0.AddArg2(a, v1)
  9123  		v.AddArg(v0)
  9124  		return true
  9125  	}
  9126  	// match: (MADDW a x (MOVDconst [c]))
  9127  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
  9128  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)]))
  9129  	for {
  9130  		a := v_0
  9131  		x := v_1
  9132  		if v_2.Op != OpARM64MOVDconst {
  9133  			break
  9134  		}
  9135  		c := auxIntToInt64(v_2.AuxInt)
  9136  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
  9137  			break
  9138  		}
  9139  		v.reset(OpARM64MOVWUreg)
  9140  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
  9141  		v0.AuxInt = int64ToAuxInt(log64(c / 3))
  9142  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  9143  		v1.AuxInt = int64ToAuxInt(2)
  9144  		v1.AddArg2(x, x)
  9145  		v0.AddArg2(a, v1)
  9146  		v.AddArg(v0)
  9147  		return true
  9148  	}
  9149  	// match: (MADDW a x (MOVDconst [c]))
  9150  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
  9151  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)]))
  9152  	for {
  9153  		a := v_0
  9154  		x := v_1
  9155  		if v_2.Op != OpARM64MOVDconst {
  9156  			break
  9157  		}
  9158  		c := auxIntToInt64(v_2.AuxInt)
  9159  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
  9160  			break
  9161  		}
  9162  		v.reset(OpARM64MOVWUreg)
  9163  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  9164  		v0.AuxInt = int64ToAuxInt(log64(c / 5))
  9165  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9166  		v1.AuxInt = int64ToAuxInt(2)
  9167  		v1.AddArg2(x, x)
  9168  		v0.AddArg2(a, v1)
  9169  		v.AddArg(v0)
  9170  		return true
  9171  	}
  9172  	// match: (MADDW a x (MOVDconst [c]))
  9173  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
  9174  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)]))
  9175  	for {
  9176  		a := v_0
  9177  		x := v_1
  9178  		if v_2.Op != OpARM64MOVDconst {
  9179  			break
  9180  		}
  9181  		c := auxIntToInt64(v_2.AuxInt)
  9182  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
  9183  			break
  9184  		}
  9185  		v.reset(OpARM64MOVWUreg)
  9186  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
  9187  		v0.AuxInt = int64ToAuxInt(log64(c / 7))
  9188  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  9189  		v1.AuxInt = int64ToAuxInt(3)
  9190  		v1.AddArg2(x, x)
  9191  		v0.AddArg2(a, v1)
  9192  		v.AddArg(v0)
  9193  		return true
  9194  	}
  9195  	// match: (MADDW a x (MOVDconst [c]))
  9196  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
  9197  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)]))
  9198  	for {
  9199  		a := v_0
  9200  		x := v_1
  9201  		if v_2.Op != OpARM64MOVDconst {
  9202  			break
  9203  		}
  9204  		c := auxIntToInt64(v_2.AuxInt)
  9205  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
  9206  			break
  9207  		}
  9208  		v.reset(OpARM64MOVWUreg)
  9209  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  9210  		v0.AuxInt = int64ToAuxInt(log64(c / 9))
  9211  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9212  		v1.AuxInt = int64ToAuxInt(3)
  9213  		v1.AddArg2(x, x)
  9214  		v0.AddArg2(a, v1)
  9215  		v.AddArg(v0)
  9216  		return true
  9217  	}
  9218  	// match: (MADDW a (MOVDconst [c]) x)
  9219  	// cond: int32(c)==-1
  9220  	// result: (MOVWUreg (SUB <a.Type> a x))
  9221  	for {
  9222  		a := v_0
  9223  		if v_1.Op != OpARM64MOVDconst {
  9224  			break
  9225  		}
  9226  		c := auxIntToInt64(v_1.AuxInt)
  9227  		x := v_2
  9228  		if !(int32(c) == -1) {
  9229  			break
  9230  		}
  9231  		v.reset(OpARM64MOVWUreg)
  9232  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
  9233  		v0.AddArg2(a, x)
  9234  		v.AddArg(v0)
  9235  		return true
  9236  	}
  9237  	// match: (MADDW a (MOVDconst [c]) _)
  9238  	// cond: int32(c)==0
  9239  	// result: (MOVWUreg a)
  9240  	for {
  9241  		a := v_0
  9242  		if v_1.Op != OpARM64MOVDconst {
  9243  			break
  9244  		}
  9245  		c := auxIntToInt64(v_1.AuxInt)
  9246  		if !(int32(c) == 0) {
  9247  			break
  9248  		}
  9249  		v.reset(OpARM64MOVWUreg)
  9250  		v.AddArg(a)
  9251  		return true
  9252  	}
  9253  	// match: (MADDW a (MOVDconst [c]) x)
  9254  	// cond: int32(c)==1
  9255  	// result: (MOVWUreg (ADD <a.Type> a x))
  9256  	for {
  9257  		a := v_0
  9258  		if v_1.Op != OpARM64MOVDconst {
  9259  			break
  9260  		}
  9261  		c := auxIntToInt64(v_1.AuxInt)
  9262  		x := v_2
  9263  		if !(int32(c) == 1) {
  9264  			break
  9265  		}
  9266  		v.reset(OpARM64MOVWUreg)
  9267  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
  9268  		v0.AddArg2(a, x)
  9269  		v.AddArg(v0)
  9270  		return true
  9271  	}
  9272  	// match: (MADDW a (MOVDconst [c]) x)
  9273  	// cond: isPowerOfTwo(c)
  9274  	// result: (MOVWUreg (ADDshiftLL <a.Type> a x [log64(c)]))
  9275  	for {
  9276  		a := v_0
  9277  		if v_1.Op != OpARM64MOVDconst {
  9278  			break
  9279  		}
  9280  		c := auxIntToInt64(v_1.AuxInt)
  9281  		x := v_2
  9282  		if !(isPowerOfTwo(c)) {
  9283  			break
  9284  		}
  9285  		v.reset(OpARM64MOVWUreg)
  9286  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  9287  		v0.AuxInt = int64ToAuxInt(log64(c))
  9288  		v0.AddArg2(a, x)
  9289  		v.AddArg(v0)
  9290  		return true
  9291  	}
  9292  	// match: (MADDW a (MOVDconst [c]) x)
  9293  	// cond: isPowerOfTwo(c-1) && int32(c)>=3
  9294  	// result: (MOVWUreg (ADD <a.Type> a (ADDshiftLL <x.Type> x x [log64(c-1)])))
  9295  	for {
  9296  		a := v_0
  9297  		if v_1.Op != OpARM64MOVDconst {
  9298  			break
  9299  		}
  9300  		c := auxIntToInt64(v_1.AuxInt)
  9301  		x := v_2
  9302  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
  9303  			break
  9304  		}
  9305  		v.reset(OpARM64MOVWUreg)
  9306  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
  9307  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9308  		v1.AuxInt = int64ToAuxInt(log64(c - 1))
  9309  		v1.AddArg2(x, x)
  9310  		v0.AddArg2(a, v1)
  9311  		v.AddArg(v0)
  9312  		return true
  9313  	}
  9314  	// match: (MADDW a (MOVDconst [c]) x)
  9315  	// cond: isPowerOfTwo(c+1) && int32(c)>=7
  9316  	// result: (MOVWUreg (SUB <a.Type> a (SUBshiftLL <x.Type> x x [log64(c+1)])))
  9317  	for {
  9318  		a := v_0
  9319  		if v_1.Op != OpARM64MOVDconst {
  9320  			break
  9321  		}
  9322  		c := auxIntToInt64(v_1.AuxInt)
  9323  		x := v_2
  9324  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
  9325  			break
  9326  		}
  9327  		v.reset(OpARM64MOVWUreg)
  9328  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
  9329  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  9330  		v1.AuxInt = int64ToAuxInt(log64(c + 1))
  9331  		v1.AddArg2(x, x)
  9332  		v0.AddArg2(a, v1)
  9333  		v.AddArg(v0)
  9334  		return true
  9335  	}
  9336  	// match: (MADDW a (MOVDconst [c]) x)
  9337  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
  9338  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)]))
  9339  	for {
  9340  		a := v_0
  9341  		if v_1.Op != OpARM64MOVDconst {
  9342  			break
  9343  		}
  9344  		c := auxIntToInt64(v_1.AuxInt)
  9345  		x := v_2
  9346  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
  9347  			break
  9348  		}
  9349  		v.reset(OpARM64MOVWUreg)
  9350  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
  9351  		v0.AuxInt = int64ToAuxInt(log64(c / 3))
  9352  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  9353  		v1.AuxInt = int64ToAuxInt(2)
  9354  		v1.AddArg2(x, x)
  9355  		v0.AddArg2(a, v1)
  9356  		v.AddArg(v0)
  9357  		return true
  9358  	}
  9359  	// match: (MADDW a (MOVDconst [c]) x)
  9360  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
  9361  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)]))
  9362  	for {
  9363  		a := v_0
  9364  		if v_1.Op != OpARM64MOVDconst {
  9365  			break
  9366  		}
  9367  		c := auxIntToInt64(v_1.AuxInt)
  9368  		x := v_2
  9369  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
  9370  			break
  9371  		}
  9372  		v.reset(OpARM64MOVWUreg)
  9373  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  9374  		v0.AuxInt = int64ToAuxInt(log64(c / 5))
  9375  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9376  		v1.AuxInt = int64ToAuxInt(2)
  9377  		v1.AddArg2(x, x)
  9378  		v0.AddArg2(a, v1)
  9379  		v.AddArg(v0)
  9380  		return true
  9381  	}
  9382  	// match: (MADDW a (MOVDconst [c]) x)
  9383  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
  9384  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)]))
  9385  	for {
  9386  		a := v_0
  9387  		if v_1.Op != OpARM64MOVDconst {
  9388  			break
  9389  		}
  9390  		c := auxIntToInt64(v_1.AuxInt)
  9391  		x := v_2
  9392  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
  9393  			break
  9394  		}
  9395  		v.reset(OpARM64MOVWUreg)
  9396  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
  9397  		v0.AuxInt = int64ToAuxInt(log64(c / 7))
  9398  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  9399  		v1.AuxInt = int64ToAuxInt(3)
  9400  		v1.AddArg2(x, x)
  9401  		v0.AddArg2(a, v1)
  9402  		v.AddArg(v0)
  9403  		return true
  9404  	}
  9405  	// match: (MADDW a (MOVDconst [c]) x)
  9406  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
  9407  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)]))
  9408  	for {
  9409  		a := v_0
  9410  		if v_1.Op != OpARM64MOVDconst {
  9411  			break
  9412  		}
  9413  		c := auxIntToInt64(v_1.AuxInt)
  9414  		x := v_2
  9415  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
  9416  			break
  9417  		}
  9418  		v.reset(OpARM64MOVWUreg)
  9419  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  9420  		v0.AuxInt = int64ToAuxInt(log64(c / 9))
  9421  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9422  		v1.AuxInt = int64ToAuxInt(3)
  9423  		v1.AddArg2(x, x)
  9424  		v0.AddArg2(a, v1)
  9425  		v.AddArg(v0)
  9426  		return true
  9427  	}
  9428  	// match: (MADDW (MOVDconst [c]) x y)
  9429  	// result: (MOVWUreg (ADDconst <x.Type> [c] (MULW <x.Type> x y)))
  9430  	for {
  9431  		if v_0.Op != OpARM64MOVDconst {
  9432  			break
  9433  		}
  9434  		c := auxIntToInt64(v_0.AuxInt)
  9435  		x := v_1
  9436  		y := v_2
  9437  		v.reset(OpARM64MOVWUreg)
  9438  		v0 := b.NewValue0(v.Pos, OpARM64ADDconst, x.Type)
  9439  		v0.AuxInt = int64ToAuxInt(c)
  9440  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  9441  		v1.AddArg2(x, y)
  9442  		v0.AddArg(v1)
  9443  		v.AddArg(v0)
  9444  		return true
  9445  	}
  9446  	// match: (MADDW a (MOVDconst [c]) (MOVDconst [d]))
  9447  	// result: (MOVWUreg (ADDconst <a.Type> [c*d] a))
  9448  	for {
  9449  		a := v_0
  9450  		if v_1.Op != OpARM64MOVDconst {
  9451  			break
  9452  		}
  9453  		c := auxIntToInt64(v_1.AuxInt)
  9454  		if v_2.Op != OpARM64MOVDconst {
  9455  			break
  9456  		}
  9457  		d := auxIntToInt64(v_2.AuxInt)
  9458  		v.reset(OpARM64MOVWUreg)
  9459  		v0 := b.NewValue0(v.Pos, OpARM64ADDconst, a.Type)
  9460  		v0.AuxInt = int64ToAuxInt(c * d)
  9461  		v0.AddArg(a)
  9462  		v.AddArg(v0)
  9463  		return true
  9464  	}
  9465  	return false
  9466  }
  9467  func rewriteValueARM64_OpARM64MNEG(v *Value) bool {
  9468  	v_1 := v.Args[1]
  9469  	v_0 := v.Args[0]
  9470  	b := v.Block
  9471  	// match: (MNEG x (MOVDconst [-1]))
  9472  	// result: x
  9473  	for {
  9474  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9475  			x := v_0
  9476  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
  9477  				continue
  9478  			}
  9479  			v.copyOf(x)
  9480  			return true
  9481  		}
  9482  		break
  9483  	}
  9484  	// match: (MNEG _ (MOVDconst [0]))
  9485  	// result: (MOVDconst [0])
  9486  	for {
  9487  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9488  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  9489  				continue
  9490  			}
  9491  			v.reset(OpARM64MOVDconst)
  9492  			v.AuxInt = int64ToAuxInt(0)
  9493  			return true
  9494  		}
  9495  		break
  9496  	}
  9497  	// match: (MNEG x (MOVDconst [1]))
  9498  	// result: (NEG x)
  9499  	for {
  9500  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9501  			x := v_0
  9502  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
  9503  				continue
  9504  			}
  9505  			v.reset(OpARM64NEG)
  9506  			v.AddArg(x)
  9507  			return true
  9508  		}
  9509  		break
  9510  	}
  9511  	// match: (MNEG x (MOVDconst [c]))
  9512  	// cond: isPowerOfTwo(c)
  9513  	// result: (NEG (SLLconst <x.Type> [log64(c)] x))
  9514  	for {
  9515  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9516  			x := v_0
  9517  			if v_1.Op != OpARM64MOVDconst {
  9518  				continue
  9519  			}
  9520  			c := auxIntToInt64(v_1.AuxInt)
  9521  			if !(isPowerOfTwo(c)) {
  9522  				continue
  9523  			}
  9524  			v.reset(OpARM64NEG)
  9525  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  9526  			v0.AuxInt = int64ToAuxInt(log64(c))
  9527  			v0.AddArg(x)
  9528  			v.AddArg(v0)
  9529  			return true
  9530  		}
  9531  		break
  9532  	}
  9533  	// match: (MNEG x (MOVDconst [c]))
  9534  	// cond: isPowerOfTwo(c-1) && c >= 3
  9535  	// result: (NEG (ADDshiftLL <x.Type> x x [log64(c-1)]))
  9536  	for {
  9537  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9538  			x := v_0
  9539  			if v_1.Op != OpARM64MOVDconst {
  9540  				continue
  9541  			}
  9542  			c := auxIntToInt64(v_1.AuxInt)
  9543  			if !(isPowerOfTwo(c-1) && c >= 3) {
  9544  				continue
  9545  			}
  9546  			v.reset(OpARM64NEG)
  9547  			v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9548  			v0.AuxInt = int64ToAuxInt(log64(c - 1))
  9549  			v0.AddArg2(x, x)
  9550  			v.AddArg(v0)
  9551  			return true
  9552  		}
  9553  		break
  9554  	}
  9555  	// match: (MNEG x (MOVDconst [c]))
  9556  	// cond: isPowerOfTwo(c+1) && c >= 7
  9557  	// result: (NEG (ADDshiftLL <x.Type> (NEG <x.Type> x) x [log64(c+1)]))
  9558  	for {
  9559  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9560  			x := v_0
  9561  			if v_1.Op != OpARM64MOVDconst {
  9562  				continue
  9563  			}
  9564  			c := auxIntToInt64(v_1.AuxInt)
  9565  			if !(isPowerOfTwo(c+1) && c >= 7) {
  9566  				continue
  9567  			}
  9568  			v.reset(OpARM64NEG)
  9569  			v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9570  			v0.AuxInt = int64ToAuxInt(log64(c + 1))
  9571  			v1 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  9572  			v1.AddArg(x)
  9573  			v0.AddArg2(v1, x)
  9574  			v.AddArg(v0)
  9575  			return true
  9576  		}
  9577  		break
  9578  	}
  9579  	// match: (MNEG x (MOVDconst [c]))
  9580  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
  9581  	// result: (SLLconst <x.Type> [log64(c/3)] (SUBshiftLL <x.Type> x x [2]))
  9582  	for {
  9583  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9584  			x := v_0
  9585  			if v_1.Op != OpARM64MOVDconst {
  9586  				continue
  9587  			}
  9588  			c := auxIntToInt64(v_1.AuxInt)
  9589  			if !(c%3 == 0 && isPowerOfTwo(c/3)) {
  9590  				continue
  9591  			}
  9592  			v.reset(OpARM64SLLconst)
  9593  			v.Type = x.Type
  9594  			v.AuxInt = int64ToAuxInt(log64(c / 3))
  9595  			v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  9596  			v0.AuxInt = int64ToAuxInt(2)
  9597  			v0.AddArg2(x, x)
  9598  			v.AddArg(v0)
  9599  			return true
  9600  		}
  9601  		break
  9602  	}
  9603  	// match: (MNEG x (MOVDconst [c]))
  9604  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
  9605  	// result: (NEG (SLLconst <x.Type> [log64(c/5)] (ADDshiftLL <x.Type> x x [2])))
  9606  	for {
  9607  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9608  			x := v_0
  9609  			if v_1.Op != OpARM64MOVDconst {
  9610  				continue
  9611  			}
  9612  			c := auxIntToInt64(v_1.AuxInt)
  9613  			if !(c%5 == 0 && isPowerOfTwo(c/5)) {
  9614  				continue
  9615  			}
  9616  			v.reset(OpARM64NEG)
  9617  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  9618  			v0.AuxInt = int64ToAuxInt(log64(c / 5))
  9619  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9620  			v1.AuxInt = int64ToAuxInt(2)
  9621  			v1.AddArg2(x, x)
  9622  			v0.AddArg(v1)
  9623  			v.AddArg(v0)
  9624  			return true
  9625  		}
  9626  		break
  9627  	}
  9628  	// match: (MNEG x (MOVDconst [c]))
  9629  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
  9630  	// result: (SLLconst <x.Type> [log64(c/7)] (SUBshiftLL <x.Type> x x [3]))
  9631  	for {
  9632  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9633  			x := v_0
  9634  			if v_1.Op != OpARM64MOVDconst {
  9635  				continue
  9636  			}
  9637  			c := auxIntToInt64(v_1.AuxInt)
  9638  			if !(c%7 == 0 && isPowerOfTwo(c/7)) {
  9639  				continue
  9640  			}
  9641  			v.reset(OpARM64SLLconst)
  9642  			v.Type = x.Type
  9643  			v.AuxInt = int64ToAuxInt(log64(c / 7))
  9644  			v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  9645  			v0.AuxInt = int64ToAuxInt(3)
  9646  			v0.AddArg2(x, x)
  9647  			v.AddArg(v0)
  9648  			return true
  9649  		}
  9650  		break
  9651  	}
  9652  	// match: (MNEG x (MOVDconst [c]))
  9653  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
  9654  	// result: (NEG (SLLconst <x.Type> [log64(c/9)] (ADDshiftLL <x.Type> x x [3])))
  9655  	for {
  9656  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9657  			x := v_0
  9658  			if v_1.Op != OpARM64MOVDconst {
  9659  				continue
  9660  			}
  9661  			c := auxIntToInt64(v_1.AuxInt)
  9662  			if !(c%9 == 0 && isPowerOfTwo(c/9)) {
  9663  				continue
  9664  			}
  9665  			v.reset(OpARM64NEG)
  9666  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  9667  			v0.AuxInt = int64ToAuxInt(log64(c / 9))
  9668  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9669  			v1.AuxInt = int64ToAuxInt(3)
  9670  			v1.AddArg2(x, x)
  9671  			v0.AddArg(v1)
  9672  			v.AddArg(v0)
  9673  			return true
  9674  		}
  9675  		break
  9676  	}
  9677  	// match: (MNEG (MOVDconst [c]) (MOVDconst [d]))
  9678  	// result: (MOVDconst [-c*d])
  9679  	for {
  9680  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9681  			if v_0.Op != OpARM64MOVDconst {
  9682  				continue
  9683  			}
  9684  			c := auxIntToInt64(v_0.AuxInt)
  9685  			if v_1.Op != OpARM64MOVDconst {
  9686  				continue
  9687  			}
  9688  			d := auxIntToInt64(v_1.AuxInt)
  9689  			v.reset(OpARM64MOVDconst)
  9690  			v.AuxInt = int64ToAuxInt(-c * d)
  9691  			return true
  9692  		}
  9693  		break
  9694  	}
  9695  	return false
  9696  }
  9697  func rewriteValueARM64_OpARM64MNEGW(v *Value) bool {
  9698  	v_1 := v.Args[1]
  9699  	v_0 := v.Args[0]
  9700  	b := v.Block
  9701  	// match: (MNEGW x (MOVDconst [c]))
  9702  	// cond: int32(c)==-1
  9703  	// result: (MOVWUreg x)
  9704  	for {
  9705  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9706  			x := v_0
  9707  			if v_1.Op != OpARM64MOVDconst {
  9708  				continue
  9709  			}
  9710  			c := auxIntToInt64(v_1.AuxInt)
  9711  			if !(int32(c) == -1) {
  9712  				continue
  9713  			}
  9714  			v.reset(OpARM64MOVWUreg)
  9715  			v.AddArg(x)
  9716  			return true
  9717  		}
  9718  		break
  9719  	}
  9720  	// match: (MNEGW _ (MOVDconst [c]))
  9721  	// cond: int32(c)==0
  9722  	// result: (MOVDconst [0])
  9723  	for {
  9724  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9725  			if v_1.Op != OpARM64MOVDconst {
  9726  				continue
  9727  			}
  9728  			c := auxIntToInt64(v_1.AuxInt)
  9729  			if !(int32(c) == 0) {
  9730  				continue
  9731  			}
  9732  			v.reset(OpARM64MOVDconst)
  9733  			v.AuxInt = int64ToAuxInt(0)
  9734  			return true
  9735  		}
  9736  		break
  9737  	}
  9738  	// match: (MNEGW x (MOVDconst [c]))
  9739  	// cond: int32(c)==1
  9740  	// result: (MOVWUreg (NEG <x.Type> x))
  9741  	for {
  9742  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9743  			x := v_0
  9744  			if v_1.Op != OpARM64MOVDconst {
  9745  				continue
  9746  			}
  9747  			c := auxIntToInt64(v_1.AuxInt)
  9748  			if !(int32(c) == 1) {
  9749  				continue
  9750  			}
  9751  			v.reset(OpARM64MOVWUreg)
  9752  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  9753  			v0.AddArg(x)
  9754  			v.AddArg(v0)
  9755  			return true
  9756  		}
  9757  		break
  9758  	}
  9759  	// match: (MNEGW x (MOVDconst [c]))
  9760  	// cond: isPowerOfTwo(c)
  9761  	// result: (NEG (SLLconst <x.Type> [log64(c)] x))
  9762  	for {
  9763  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9764  			x := v_0
  9765  			if v_1.Op != OpARM64MOVDconst {
  9766  				continue
  9767  			}
  9768  			c := auxIntToInt64(v_1.AuxInt)
  9769  			if !(isPowerOfTwo(c)) {
  9770  				continue
  9771  			}
  9772  			v.reset(OpARM64NEG)
  9773  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  9774  			v0.AuxInt = int64ToAuxInt(log64(c))
  9775  			v0.AddArg(x)
  9776  			v.AddArg(v0)
  9777  			return true
  9778  		}
  9779  		break
  9780  	}
  9781  	// match: (MNEGW x (MOVDconst [c]))
  9782  	// cond: isPowerOfTwo(c-1) && int32(c) >= 3
  9783  	// result: (MOVWUreg (NEG <x.Type> (ADDshiftLL <x.Type> x x [log64(c-1)])))
  9784  	for {
  9785  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9786  			x := v_0
  9787  			if v_1.Op != OpARM64MOVDconst {
  9788  				continue
  9789  			}
  9790  			c := auxIntToInt64(v_1.AuxInt)
  9791  			if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
  9792  				continue
  9793  			}
  9794  			v.reset(OpARM64MOVWUreg)
  9795  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  9796  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9797  			v1.AuxInt = int64ToAuxInt(log64(c - 1))
  9798  			v1.AddArg2(x, x)
  9799  			v0.AddArg(v1)
  9800  			v.AddArg(v0)
  9801  			return true
  9802  		}
  9803  		break
  9804  	}
  9805  	// match: (MNEGW x (MOVDconst [c]))
  9806  	// cond: isPowerOfTwo(c+1) && int32(c) >= 7
  9807  	// result: (MOVWUreg (NEG <x.Type> (ADDshiftLL <x.Type> (NEG <x.Type> x) x [log64(c+1)])))
  9808  	for {
  9809  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9810  			x := v_0
  9811  			if v_1.Op != OpARM64MOVDconst {
  9812  				continue
  9813  			}
  9814  			c := auxIntToInt64(v_1.AuxInt)
  9815  			if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
  9816  				continue
  9817  			}
  9818  			v.reset(OpARM64MOVWUreg)
  9819  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  9820  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9821  			v1.AuxInt = int64ToAuxInt(log64(c + 1))
  9822  			v2 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  9823  			v2.AddArg(x)
  9824  			v1.AddArg2(v2, x)
  9825  			v0.AddArg(v1)
  9826  			v.AddArg(v0)
  9827  			return true
  9828  		}
  9829  		break
  9830  	}
  9831  	// match: (MNEGW x (MOVDconst [c]))
  9832  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
  9833  	// result: (MOVWUreg (SLLconst <x.Type> [log64(c/3)] (SUBshiftLL <x.Type> x x [2])))
  9834  	for {
  9835  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9836  			x := v_0
  9837  			if v_1.Op != OpARM64MOVDconst {
  9838  				continue
  9839  			}
  9840  			c := auxIntToInt64(v_1.AuxInt)
  9841  			if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
  9842  				continue
  9843  			}
  9844  			v.reset(OpARM64MOVWUreg)
  9845  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  9846  			v0.AuxInt = int64ToAuxInt(log64(c / 3))
  9847  			v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  9848  			v1.AuxInt = int64ToAuxInt(2)
  9849  			v1.AddArg2(x, x)
  9850  			v0.AddArg(v1)
  9851  			v.AddArg(v0)
  9852  			return true
  9853  		}
  9854  		break
  9855  	}
  9856  	// match: (MNEGW x (MOVDconst [c]))
  9857  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
  9858  	// result: (MOVWUreg (NEG <x.Type> (SLLconst <x.Type> [log64(c/5)] (ADDshiftLL <x.Type> x x [2]))))
  9859  	for {
  9860  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9861  			x := v_0
  9862  			if v_1.Op != OpARM64MOVDconst {
  9863  				continue
  9864  			}
  9865  			c := auxIntToInt64(v_1.AuxInt)
  9866  			if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
  9867  				continue
  9868  			}
  9869  			v.reset(OpARM64MOVWUreg)
  9870  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  9871  			v1 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  9872  			v1.AuxInt = int64ToAuxInt(log64(c / 5))
  9873  			v2 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9874  			v2.AuxInt = int64ToAuxInt(2)
  9875  			v2.AddArg2(x, x)
  9876  			v1.AddArg(v2)
  9877  			v0.AddArg(v1)
  9878  			v.AddArg(v0)
  9879  			return true
  9880  		}
  9881  		break
  9882  	}
  9883  	// match: (MNEGW x (MOVDconst [c]))
  9884  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
  9885  	// result: (MOVWUreg (SLLconst <x.Type> [log64(c/7)] (SUBshiftLL <x.Type> x x [3])))
  9886  	for {
  9887  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9888  			x := v_0
  9889  			if v_1.Op != OpARM64MOVDconst {
  9890  				continue
  9891  			}
  9892  			c := auxIntToInt64(v_1.AuxInt)
  9893  			if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
  9894  				continue
  9895  			}
  9896  			v.reset(OpARM64MOVWUreg)
  9897  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  9898  			v0.AuxInt = int64ToAuxInt(log64(c / 7))
  9899  			v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  9900  			v1.AuxInt = int64ToAuxInt(3)
  9901  			v1.AddArg2(x, x)
  9902  			v0.AddArg(v1)
  9903  			v.AddArg(v0)
  9904  			return true
  9905  		}
  9906  		break
  9907  	}
  9908  	// match: (MNEGW x (MOVDconst [c]))
  9909  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
  9910  	// result: (MOVWUreg (NEG <x.Type> (SLLconst <x.Type> [log64(c/9)] (ADDshiftLL <x.Type> x x [3]))))
  9911  	for {
  9912  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9913  			x := v_0
  9914  			if v_1.Op != OpARM64MOVDconst {
  9915  				continue
  9916  			}
  9917  			c := auxIntToInt64(v_1.AuxInt)
  9918  			if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
  9919  				continue
  9920  			}
  9921  			v.reset(OpARM64MOVWUreg)
  9922  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  9923  			v1 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  9924  			v1.AuxInt = int64ToAuxInt(log64(c / 9))
  9925  			v2 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9926  			v2.AuxInt = int64ToAuxInt(3)
  9927  			v2.AddArg2(x, x)
  9928  			v1.AddArg(v2)
  9929  			v0.AddArg(v1)
  9930  			v.AddArg(v0)
  9931  			return true
  9932  		}
  9933  		break
  9934  	}
  9935  	// match: (MNEGW (MOVDconst [c]) (MOVDconst [d]))
  9936  	// result: (MOVDconst [int64(uint32(-c*d))])
  9937  	for {
  9938  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9939  			if v_0.Op != OpARM64MOVDconst {
  9940  				continue
  9941  			}
  9942  			c := auxIntToInt64(v_0.AuxInt)
  9943  			if v_1.Op != OpARM64MOVDconst {
  9944  				continue
  9945  			}
  9946  			d := auxIntToInt64(v_1.AuxInt)
  9947  			v.reset(OpARM64MOVDconst)
  9948  			v.AuxInt = int64ToAuxInt(int64(uint32(-c * d)))
  9949  			return true
  9950  		}
  9951  		break
  9952  	}
  9953  	return false
  9954  }
  9955  func rewriteValueARM64_OpARM64MOD(v *Value) bool {
  9956  	v_1 := v.Args[1]
  9957  	v_0 := v.Args[0]
  9958  	// match: (MOD (MOVDconst [c]) (MOVDconst [d]))
  9959  	// cond: d != 0
  9960  	// result: (MOVDconst [c%d])
  9961  	for {
  9962  		if v_0.Op != OpARM64MOVDconst {
  9963  			break
  9964  		}
  9965  		c := auxIntToInt64(v_0.AuxInt)
  9966  		if v_1.Op != OpARM64MOVDconst {
  9967  			break
  9968  		}
  9969  		d := auxIntToInt64(v_1.AuxInt)
  9970  		if !(d != 0) {
  9971  			break
  9972  		}
  9973  		v.reset(OpARM64MOVDconst)
  9974  		v.AuxInt = int64ToAuxInt(c % d)
  9975  		return true
  9976  	}
  9977  	return false
  9978  }
  9979  func rewriteValueARM64_OpARM64MODW(v *Value) bool {
  9980  	v_1 := v.Args[1]
  9981  	v_0 := v.Args[0]
  9982  	// match: (MODW (MOVDconst [c]) (MOVDconst [d]))
  9983  	// cond: d != 0
  9984  	// result: (MOVDconst [int64(uint32(int32(c)%int32(d)))])
  9985  	for {
  9986  		if v_0.Op != OpARM64MOVDconst {
  9987  			break
  9988  		}
  9989  		c := auxIntToInt64(v_0.AuxInt)
  9990  		if v_1.Op != OpARM64MOVDconst {
  9991  			break
  9992  		}
  9993  		d := auxIntToInt64(v_1.AuxInt)
  9994  		if !(d != 0) {
  9995  			break
  9996  		}
  9997  		v.reset(OpARM64MOVDconst)
  9998  		v.AuxInt = int64ToAuxInt(int64(uint32(int32(c) % int32(d))))
  9999  		return true
 10000  	}
 10001  	return false
 10002  }
 10003  func rewriteValueARM64_OpARM64MOVBUload(v *Value) bool {
 10004  	v_1 := v.Args[1]
 10005  	v_0 := v.Args[0]
 10006  	b := v.Block
 10007  	config := b.Func.Config
 10008  	// match: (MOVBUload [off1] {sym} (ADDconst [off2] ptr) mem)
 10009  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10010  	// result: (MOVBUload [off1+int32(off2)] {sym} ptr mem)
 10011  	for {
 10012  		off1 := auxIntToInt32(v.AuxInt)
 10013  		sym := auxToSym(v.Aux)
 10014  		if v_0.Op != OpARM64ADDconst {
 10015  			break
 10016  		}
 10017  		off2 := auxIntToInt64(v_0.AuxInt)
 10018  		ptr := v_0.Args[0]
 10019  		mem := v_1
 10020  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10021  			break
 10022  		}
 10023  		v.reset(OpARM64MOVBUload)
 10024  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 10025  		v.Aux = symToAux(sym)
 10026  		v.AddArg2(ptr, mem)
 10027  		return true
 10028  	}
 10029  	// match: (MOVBUload [off] {sym} (ADD ptr idx) mem)
 10030  	// cond: off == 0 && sym == nil
 10031  	// result: (MOVBUloadidx ptr idx mem)
 10032  	for {
 10033  		off := auxIntToInt32(v.AuxInt)
 10034  		sym := auxToSym(v.Aux)
 10035  		if v_0.Op != OpARM64ADD {
 10036  			break
 10037  		}
 10038  		idx := v_0.Args[1]
 10039  		ptr := v_0.Args[0]
 10040  		mem := v_1
 10041  		if !(off == 0 && sym == nil) {
 10042  			break
 10043  		}
 10044  		v.reset(OpARM64MOVBUloadidx)
 10045  		v.AddArg3(ptr, idx, mem)
 10046  		return true
 10047  	}
 10048  	// match: (MOVBUload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 10049  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10050  	// result: (MOVBUload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 10051  	for {
 10052  		off1 := auxIntToInt32(v.AuxInt)
 10053  		sym1 := auxToSym(v.Aux)
 10054  		if v_0.Op != OpARM64MOVDaddr {
 10055  			break
 10056  		}
 10057  		off2 := auxIntToInt32(v_0.AuxInt)
 10058  		sym2 := auxToSym(v_0.Aux)
 10059  		ptr := v_0.Args[0]
 10060  		mem := v_1
 10061  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10062  			break
 10063  		}
 10064  		v.reset(OpARM64MOVBUload)
 10065  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10066  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10067  		v.AddArg2(ptr, mem)
 10068  		return true
 10069  	}
 10070  	// match: (MOVBUload [off] {sym} (SB) _)
 10071  	// cond: symIsRO(sym)
 10072  	// result: (MOVDconst [int64(read8(sym, int64(off)))])
 10073  	for {
 10074  		off := auxIntToInt32(v.AuxInt)
 10075  		sym := auxToSym(v.Aux)
 10076  		if v_0.Op != OpSB || !(symIsRO(sym)) {
 10077  			break
 10078  		}
 10079  		v.reset(OpARM64MOVDconst)
 10080  		v.AuxInt = int64ToAuxInt(int64(read8(sym, int64(off))))
 10081  		return true
 10082  	}
 10083  	return false
 10084  }
 10085  func rewriteValueARM64_OpARM64MOVBUloadidx(v *Value) bool {
 10086  	v_2 := v.Args[2]
 10087  	v_1 := v.Args[1]
 10088  	v_0 := v.Args[0]
 10089  	// match: (MOVBUloadidx ptr (MOVDconst [c]) mem)
 10090  	// cond: is32Bit(c)
 10091  	// result: (MOVBUload [int32(c)] ptr mem)
 10092  	for {
 10093  		ptr := v_0
 10094  		if v_1.Op != OpARM64MOVDconst {
 10095  			break
 10096  		}
 10097  		c := auxIntToInt64(v_1.AuxInt)
 10098  		mem := v_2
 10099  		if !(is32Bit(c)) {
 10100  			break
 10101  		}
 10102  		v.reset(OpARM64MOVBUload)
 10103  		v.AuxInt = int32ToAuxInt(int32(c))
 10104  		v.AddArg2(ptr, mem)
 10105  		return true
 10106  	}
 10107  	// match: (MOVBUloadidx (MOVDconst [c]) ptr mem)
 10108  	// cond: is32Bit(c)
 10109  	// result: (MOVBUload [int32(c)] ptr mem)
 10110  	for {
 10111  		if v_0.Op != OpARM64MOVDconst {
 10112  			break
 10113  		}
 10114  		c := auxIntToInt64(v_0.AuxInt)
 10115  		ptr := v_1
 10116  		mem := v_2
 10117  		if !(is32Bit(c)) {
 10118  			break
 10119  		}
 10120  		v.reset(OpARM64MOVBUload)
 10121  		v.AuxInt = int32ToAuxInt(int32(c))
 10122  		v.AddArg2(ptr, mem)
 10123  		return true
 10124  	}
 10125  	return false
 10126  }
 10127  func rewriteValueARM64_OpARM64MOVBUreg(v *Value) bool {
 10128  	v_0 := v.Args[0]
 10129  	// match: (MOVBUreg (ANDconst [c] x))
 10130  	// result: (ANDconst [c&(1<<8-1)] x)
 10131  	for {
 10132  		if v_0.Op != OpARM64ANDconst {
 10133  			break
 10134  		}
 10135  		c := auxIntToInt64(v_0.AuxInt)
 10136  		x := v_0.Args[0]
 10137  		v.reset(OpARM64ANDconst)
 10138  		v.AuxInt = int64ToAuxInt(c & (1<<8 - 1))
 10139  		v.AddArg(x)
 10140  		return true
 10141  	}
 10142  	// match: (MOVBUreg (MOVDconst [c]))
 10143  	// result: (MOVDconst [int64(uint8(c))])
 10144  	for {
 10145  		if v_0.Op != OpARM64MOVDconst {
 10146  			break
 10147  		}
 10148  		c := auxIntToInt64(v_0.AuxInt)
 10149  		v.reset(OpARM64MOVDconst)
 10150  		v.AuxInt = int64ToAuxInt(int64(uint8(c)))
 10151  		return true
 10152  	}
 10153  	// match: (MOVBUreg x)
 10154  	// cond: v.Type.Size() <= 1
 10155  	// result: x
 10156  	for {
 10157  		x := v_0
 10158  		if !(v.Type.Size() <= 1) {
 10159  			break
 10160  		}
 10161  		v.copyOf(x)
 10162  		return true
 10163  	}
 10164  	// match: (MOVBUreg (SLLconst [lc] x))
 10165  	// cond: lc >= 8
 10166  	// result: (MOVDconst [0])
 10167  	for {
 10168  		if v_0.Op != OpARM64SLLconst {
 10169  			break
 10170  		}
 10171  		lc := auxIntToInt64(v_0.AuxInt)
 10172  		if !(lc >= 8) {
 10173  			break
 10174  		}
 10175  		v.reset(OpARM64MOVDconst)
 10176  		v.AuxInt = int64ToAuxInt(0)
 10177  		return true
 10178  	}
 10179  	// match: (MOVBUreg (SLLconst [lc] x))
 10180  	// cond: lc < 8
 10181  	// result: (UBFIZ [armBFAuxInt(lc, 8-lc)] x)
 10182  	for {
 10183  		if v_0.Op != OpARM64SLLconst {
 10184  			break
 10185  		}
 10186  		lc := auxIntToInt64(v_0.AuxInt)
 10187  		x := v_0.Args[0]
 10188  		if !(lc < 8) {
 10189  			break
 10190  		}
 10191  		v.reset(OpARM64UBFIZ)
 10192  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 8-lc))
 10193  		v.AddArg(x)
 10194  		return true
 10195  	}
 10196  	// match: (MOVBUreg (SRLconst [rc] x))
 10197  	// cond: rc < 8
 10198  	// result: (UBFX [armBFAuxInt(rc, 8)] x)
 10199  	for {
 10200  		if v_0.Op != OpARM64SRLconst {
 10201  			break
 10202  		}
 10203  		rc := auxIntToInt64(v_0.AuxInt)
 10204  		x := v_0.Args[0]
 10205  		if !(rc < 8) {
 10206  			break
 10207  		}
 10208  		v.reset(OpARM64UBFX)
 10209  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 8))
 10210  		v.AddArg(x)
 10211  		return true
 10212  	}
 10213  	// match: (MOVBUreg (UBFX [bfc] x))
 10214  	// cond: bfc.width() <= 8
 10215  	// result: (UBFX [bfc] x)
 10216  	for {
 10217  		if v_0.Op != OpARM64UBFX {
 10218  			break
 10219  		}
 10220  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 10221  		x := v_0.Args[0]
 10222  		if !(bfc.width() <= 8) {
 10223  			break
 10224  		}
 10225  		v.reset(OpARM64UBFX)
 10226  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 10227  		v.AddArg(x)
 10228  		return true
 10229  	}
 10230  	return false
 10231  }
 10232  func rewriteValueARM64_OpARM64MOVBload(v *Value) bool {
 10233  	v_1 := v.Args[1]
 10234  	v_0 := v.Args[0]
 10235  	b := v.Block
 10236  	config := b.Func.Config
 10237  	// match: (MOVBload [off1] {sym} (ADDconst [off2] ptr) mem)
 10238  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10239  	// result: (MOVBload [off1+int32(off2)] {sym} ptr mem)
 10240  	for {
 10241  		off1 := auxIntToInt32(v.AuxInt)
 10242  		sym := auxToSym(v.Aux)
 10243  		if v_0.Op != OpARM64ADDconst {
 10244  			break
 10245  		}
 10246  		off2 := auxIntToInt64(v_0.AuxInt)
 10247  		ptr := v_0.Args[0]
 10248  		mem := v_1
 10249  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10250  			break
 10251  		}
 10252  		v.reset(OpARM64MOVBload)
 10253  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 10254  		v.Aux = symToAux(sym)
 10255  		v.AddArg2(ptr, mem)
 10256  		return true
 10257  	}
 10258  	// match: (MOVBload [off] {sym} (ADD ptr idx) mem)
 10259  	// cond: off == 0 && sym == nil
 10260  	// result: (MOVBloadidx ptr idx mem)
 10261  	for {
 10262  		off := auxIntToInt32(v.AuxInt)
 10263  		sym := auxToSym(v.Aux)
 10264  		if v_0.Op != OpARM64ADD {
 10265  			break
 10266  		}
 10267  		idx := v_0.Args[1]
 10268  		ptr := v_0.Args[0]
 10269  		mem := v_1
 10270  		if !(off == 0 && sym == nil) {
 10271  			break
 10272  		}
 10273  		v.reset(OpARM64MOVBloadidx)
 10274  		v.AddArg3(ptr, idx, mem)
 10275  		return true
 10276  	}
 10277  	// match: (MOVBload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 10278  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10279  	// result: (MOVBload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 10280  	for {
 10281  		off1 := auxIntToInt32(v.AuxInt)
 10282  		sym1 := auxToSym(v.Aux)
 10283  		if v_0.Op != OpARM64MOVDaddr {
 10284  			break
 10285  		}
 10286  		off2 := auxIntToInt32(v_0.AuxInt)
 10287  		sym2 := auxToSym(v_0.Aux)
 10288  		ptr := v_0.Args[0]
 10289  		mem := v_1
 10290  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10291  			break
 10292  		}
 10293  		v.reset(OpARM64MOVBload)
 10294  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10295  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10296  		v.AddArg2(ptr, mem)
 10297  		return true
 10298  	}
 10299  	// match: (MOVBload [off] {sym} (SB) _)
 10300  	// cond: symIsRO(sym)
 10301  	// result: (MOVDconst [int64(int8(read8(sym, int64(off))))])
 10302  	for {
 10303  		off := auxIntToInt32(v.AuxInt)
 10304  		sym := auxToSym(v.Aux)
 10305  		if v_0.Op != OpSB || !(symIsRO(sym)) {
 10306  			break
 10307  		}
 10308  		v.reset(OpARM64MOVDconst)
 10309  		v.AuxInt = int64ToAuxInt(int64(int8(read8(sym, int64(off)))))
 10310  		return true
 10311  	}
 10312  	return false
 10313  }
 10314  func rewriteValueARM64_OpARM64MOVBloadidx(v *Value) bool {
 10315  	v_2 := v.Args[2]
 10316  	v_1 := v.Args[1]
 10317  	v_0 := v.Args[0]
 10318  	// match: (MOVBloadidx ptr (MOVDconst [c]) mem)
 10319  	// cond: is32Bit(c)
 10320  	// result: (MOVBload [int32(c)] ptr mem)
 10321  	for {
 10322  		ptr := v_0
 10323  		if v_1.Op != OpARM64MOVDconst {
 10324  			break
 10325  		}
 10326  		c := auxIntToInt64(v_1.AuxInt)
 10327  		mem := v_2
 10328  		if !(is32Bit(c)) {
 10329  			break
 10330  		}
 10331  		v.reset(OpARM64MOVBload)
 10332  		v.AuxInt = int32ToAuxInt(int32(c))
 10333  		v.AddArg2(ptr, mem)
 10334  		return true
 10335  	}
 10336  	// match: (MOVBloadidx (MOVDconst [c]) ptr mem)
 10337  	// cond: is32Bit(c)
 10338  	// result: (MOVBload [int32(c)] ptr mem)
 10339  	for {
 10340  		if v_0.Op != OpARM64MOVDconst {
 10341  			break
 10342  		}
 10343  		c := auxIntToInt64(v_0.AuxInt)
 10344  		ptr := v_1
 10345  		mem := v_2
 10346  		if !(is32Bit(c)) {
 10347  			break
 10348  		}
 10349  		v.reset(OpARM64MOVBload)
 10350  		v.AuxInt = int32ToAuxInt(int32(c))
 10351  		v.AddArg2(ptr, mem)
 10352  		return true
 10353  	}
 10354  	return false
 10355  }
 10356  func rewriteValueARM64_OpARM64MOVBreg(v *Value) bool {
 10357  	v_0 := v.Args[0]
 10358  	// match: (MOVBreg (MOVDconst [c]))
 10359  	// result: (MOVDconst [int64(int8(c))])
 10360  	for {
 10361  		if v_0.Op != OpARM64MOVDconst {
 10362  			break
 10363  		}
 10364  		c := auxIntToInt64(v_0.AuxInt)
 10365  		v.reset(OpARM64MOVDconst)
 10366  		v.AuxInt = int64ToAuxInt(int64(int8(c)))
 10367  		return true
 10368  	}
 10369  	// match: (MOVBreg x)
 10370  	// cond: v.Type.Size() <= 1
 10371  	// result: x
 10372  	for {
 10373  		x := v_0
 10374  		if !(v.Type.Size() <= 1) {
 10375  			break
 10376  		}
 10377  		v.copyOf(x)
 10378  		return true
 10379  	}
 10380  	// match: (MOVBreg <t> (ANDconst x [c]))
 10381  	// cond: uint64(c) & uint64(0xffffffffffffff80) == 0
 10382  	// result: (ANDconst <t> x [c])
 10383  	for {
 10384  		t := v.Type
 10385  		if v_0.Op != OpARM64ANDconst {
 10386  			break
 10387  		}
 10388  		c := auxIntToInt64(v_0.AuxInt)
 10389  		x := v_0.Args[0]
 10390  		if !(uint64(c)&uint64(0xffffffffffffff80) == 0) {
 10391  			break
 10392  		}
 10393  		v.reset(OpARM64ANDconst)
 10394  		v.Type = t
 10395  		v.AuxInt = int64ToAuxInt(c)
 10396  		v.AddArg(x)
 10397  		return true
 10398  	}
 10399  	// match: (MOVBreg (SLLconst [lc] x))
 10400  	// cond: lc < 8
 10401  	// result: (SBFIZ [armBFAuxInt(lc, 8-lc)] x)
 10402  	for {
 10403  		if v_0.Op != OpARM64SLLconst {
 10404  			break
 10405  		}
 10406  		lc := auxIntToInt64(v_0.AuxInt)
 10407  		x := v_0.Args[0]
 10408  		if !(lc < 8) {
 10409  			break
 10410  		}
 10411  		v.reset(OpARM64SBFIZ)
 10412  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 8-lc))
 10413  		v.AddArg(x)
 10414  		return true
 10415  	}
 10416  	// match: (MOVBreg (SBFX [bfc] x))
 10417  	// cond: bfc.width() <= 8
 10418  	// result: (SBFX [bfc] x)
 10419  	for {
 10420  		if v_0.Op != OpARM64SBFX {
 10421  			break
 10422  		}
 10423  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 10424  		x := v_0.Args[0]
 10425  		if !(bfc.width() <= 8) {
 10426  			break
 10427  		}
 10428  		v.reset(OpARM64SBFX)
 10429  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 10430  		v.AddArg(x)
 10431  		return true
 10432  	}
 10433  	return false
 10434  }
 10435  func rewriteValueARM64_OpARM64MOVBstore(v *Value) bool {
 10436  	v_2 := v.Args[2]
 10437  	v_1 := v.Args[1]
 10438  	v_0 := v.Args[0]
 10439  	b := v.Block
 10440  	config := b.Func.Config
 10441  	// match: (MOVBstore [off1] {sym} (ADDconst [off2] ptr) val mem)
 10442  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10443  	// result: (MOVBstore [off1+int32(off2)] {sym} ptr val mem)
 10444  	for {
 10445  		off1 := auxIntToInt32(v.AuxInt)
 10446  		sym := auxToSym(v.Aux)
 10447  		if v_0.Op != OpARM64ADDconst {
 10448  			break
 10449  		}
 10450  		off2 := auxIntToInt64(v_0.AuxInt)
 10451  		ptr := v_0.Args[0]
 10452  		val := v_1
 10453  		mem := v_2
 10454  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10455  			break
 10456  		}
 10457  		v.reset(OpARM64MOVBstore)
 10458  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 10459  		v.Aux = symToAux(sym)
 10460  		v.AddArg3(ptr, val, mem)
 10461  		return true
 10462  	}
 10463  	// match: (MOVBstore [off] {sym} (ADD ptr idx) val mem)
 10464  	// cond: off == 0 && sym == nil
 10465  	// result: (MOVBstoreidx ptr idx val mem)
 10466  	for {
 10467  		off := auxIntToInt32(v.AuxInt)
 10468  		sym := auxToSym(v.Aux)
 10469  		if v_0.Op != OpARM64ADD {
 10470  			break
 10471  		}
 10472  		idx := v_0.Args[1]
 10473  		ptr := v_0.Args[0]
 10474  		val := v_1
 10475  		mem := v_2
 10476  		if !(off == 0 && sym == nil) {
 10477  			break
 10478  		}
 10479  		v.reset(OpARM64MOVBstoreidx)
 10480  		v.AddArg4(ptr, idx, val, mem)
 10481  		return true
 10482  	}
 10483  	// match: (MOVBstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
 10484  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10485  	// result: (MOVBstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
 10486  	for {
 10487  		off1 := auxIntToInt32(v.AuxInt)
 10488  		sym1 := auxToSym(v.Aux)
 10489  		if v_0.Op != OpARM64MOVDaddr {
 10490  			break
 10491  		}
 10492  		off2 := auxIntToInt32(v_0.AuxInt)
 10493  		sym2 := auxToSym(v_0.Aux)
 10494  		ptr := v_0.Args[0]
 10495  		val := v_1
 10496  		mem := v_2
 10497  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10498  			break
 10499  		}
 10500  		v.reset(OpARM64MOVBstore)
 10501  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10502  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10503  		v.AddArg3(ptr, val, mem)
 10504  		return true
 10505  	}
 10506  	// match: (MOVBstore [off] {sym} ptr (MOVBreg x) mem)
 10507  	// result: (MOVBstore [off] {sym} ptr x mem)
 10508  	for {
 10509  		off := auxIntToInt32(v.AuxInt)
 10510  		sym := auxToSym(v.Aux)
 10511  		ptr := v_0
 10512  		if v_1.Op != OpARM64MOVBreg {
 10513  			break
 10514  		}
 10515  		x := v_1.Args[0]
 10516  		mem := v_2
 10517  		v.reset(OpARM64MOVBstore)
 10518  		v.AuxInt = int32ToAuxInt(off)
 10519  		v.Aux = symToAux(sym)
 10520  		v.AddArg3(ptr, x, mem)
 10521  		return true
 10522  	}
 10523  	// match: (MOVBstore [off] {sym} ptr (MOVBUreg x) mem)
 10524  	// result: (MOVBstore [off] {sym} ptr x mem)
 10525  	for {
 10526  		off := auxIntToInt32(v.AuxInt)
 10527  		sym := auxToSym(v.Aux)
 10528  		ptr := v_0
 10529  		if v_1.Op != OpARM64MOVBUreg {
 10530  			break
 10531  		}
 10532  		x := v_1.Args[0]
 10533  		mem := v_2
 10534  		v.reset(OpARM64MOVBstore)
 10535  		v.AuxInt = int32ToAuxInt(off)
 10536  		v.Aux = symToAux(sym)
 10537  		v.AddArg3(ptr, x, mem)
 10538  		return true
 10539  	}
 10540  	// match: (MOVBstore [off] {sym} ptr (MOVHreg x) mem)
 10541  	// result: (MOVBstore [off] {sym} ptr x mem)
 10542  	for {
 10543  		off := auxIntToInt32(v.AuxInt)
 10544  		sym := auxToSym(v.Aux)
 10545  		ptr := v_0
 10546  		if v_1.Op != OpARM64MOVHreg {
 10547  			break
 10548  		}
 10549  		x := v_1.Args[0]
 10550  		mem := v_2
 10551  		v.reset(OpARM64MOVBstore)
 10552  		v.AuxInt = int32ToAuxInt(off)
 10553  		v.Aux = symToAux(sym)
 10554  		v.AddArg3(ptr, x, mem)
 10555  		return true
 10556  	}
 10557  	// match: (MOVBstore [off] {sym} ptr (MOVHUreg x) mem)
 10558  	// result: (MOVBstore [off] {sym} ptr x mem)
 10559  	for {
 10560  		off := auxIntToInt32(v.AuxInt)
 10561  		sym := auxToSym(v.Aux)
 10562  		ptr := v_0
 10563  		if v_1.Op != OpARM64MOVHUreg {
 10564  			break
 10565  		}
 10566  		x := v_1.Args[0]
 10567  		mem := v_2
 10568  		v.reset(OpARM64MOVBstore)
 10569  		v.AuxInt = int32ToAuxInt(off)
 10570  		v.Aux = symToAux(sym)
 10571  		v.AddArg3(ptr, x, mem)
 10572  		return true
 10573  	}
 10574  	// match: (MOVBstore [off] {sym} ptr (MOVWreg x) mem)
 10575  	// result: (MOVBstore [off] {sym} ptr x mem)
 10576  	for {
 10577  		off := auxIntToInt32(v.AuxInt)
 10578  		sym := auxToSym(v.Aux)
 10579  		ptr := v_0
 10580  		if v_1.Op != OpARM64MOVWreg {
 10581  			break
 10582  		}
 10583  		x := v_1.Args[0]
 10584  		mem := v_2
 10585  		v.reset(OpARM64MOVBstore)
 10586  		v.AuxInt = int32ToAuxInt(off)
 10587  		v.Aux = symToAux(sym)
 10588  		v.AddArg3(ptr, x, mem)
 10589  		return true
 10590  	}
 10591  	// match: (MOVBstore [off] {sym} ptr (MOVWUreg x) mem)
 10592  	// result: (MOVBstore [off] {sym} ptr x mem)
 10593  	for {
 10594  		off := auxIntToInt32(v.AuxInt)
 10595  		sym := auxToSym(v.Aux)
 10596  		ptr := v_0
 10597  		if v_1.Op != OpARM64MOVWUreg {
 10598  			break
 10599  		}
 10600  		x := v_1.Args[0]
 10601  		mem := v_2
 10602  		v.reset(OpARM64MOVBstore)
 10603  		v.AuxInt = int32ToAuxInt(off)
 10604  		v.Aux = symToAux(sym)
 10605  		v.AddArg3(ptr, x, mem)
 10606  		return true
 10607  	}
 10608  	return false
 10609  }
 10610  func rewriteValueARM64_OpARM64MOVBstoreidx(v *Value) bool {
 10611  	v_3 := v.Args[3]
 10612  	v_2 := v.Args[2]
 10613  	v_1 := v.Args[1]
 10614  	v_0 := v.Args[0]
 10615  	// match: (MOVBstoreidx ptr (MOVDconst [c]) val mem)
 10616  	// cond: is32Bit(c)
 10617  	// result: (MOVBstore [int32(c)] ptr val mem)
 10618  	for {
 10619  		ptr := v_0
 10620  		if v_1.Op != OpARM64MOVDconst {
 10621  			break
 10622  		}
 10623  		c := auxIntToInt64(v_1.AuxInt)
 10624  		val := v_2
 10625  		mem := v_3
 10626  		if !(is32Bit(c)) {
 10627  			break
 10628  		}
 10629  		v.reset(OpARM64MOVBstore)
 10630  		v.AuxInt = int32ToAuxInt(int32(c))
 10631  		v.AddArg3(ptr, val, mem)
 10632  		return true
 10633  	}
 10634  	// match: (MOVBstoreidx (MOVDconst [c]) idx val mem)
 10635  	// cond: is32Bit(c)
 10636  	// result: (MOVBstore [int32(c)] idx val mem)
 10637  	for {
 10638  		if v_0.Op != OpARM64MOVDconst {
 10639  			break
 10640  		}
 10641  		c := auxIntToInt64(v_0.AuxInt)
 10642  		idx := v_1
 10643  		val := v_2
 10644  		mem := v_3
 10645  		if !(is32Bit(c)) {
 10646  			break
 10647  		}
 10648  		v.reset(OpARM64MOVBstore)
 10649  		v.AuxInt = int32ToAuxInt(int32(c))
 10650  		v.AddArg3(idx, val, mem)
 10651  		return true
 10652  	}
 10653  	// match: (MOVBstoreidx ptr idx (MOVBreg x) mem)
 10654  	// result: (MOVBstoreidx ptr idx x mem)
 10655  	for {
 10656  		ptr := v_0
 10657  		idx := v_1
 10658  		if v_2.Op != OpARM64MOVBreg {
 10659  			break
 10660  		}
 10661  		x := v_2.Args[0]
 10662  		mem := v_3
 10663  		v.reset(OpARM64MOVBstoreidx)
 10664  		v.AddArg4(ptr, idx, x, mem)
 10665  		return true
 10666  	}
 10667  	// match: (MOVBstoreidx ptr idx (MOVBUreg x) mem)
 10668  	// result: (MOVBstoreidx ptr idx x mem)
 10669  	for {
 10670  		ptr := v_0
 10671  		idx := v_1
 10672  		if v_2.Op != OpARM64MOVBUreg {
 10673  			break
 10674  		}
 10675  		x := v_2.Args[0]
 10676  		mem := v_3
 10677  		v.reset(OpARM64MOVBstoreidx)
 10678  		v.AddArg4(ptr, idx, x, mem)
 10679  		return true
 10680  	}
 10681  	// match: (MOVBstoreidx ptr idx (MOVHreg x) mem)
 10682  	// result: (MOVBstoreidx ptr idx x mem)
 10683  	for {
 10684  		ptr := v_0
 10685  		idx := v_1
 10686  		if v_2.Op != OpARM64MOVHreg {
 10687  			break
 10688  		}
 10689  		x := v_2.Args[0]
 10690  		mem := v_3
 10691  		v.reset(OpARM64MOVBstoreidx)
 10692  		v.AddArg4(ptr, idx, x, mem)
 10693  		return true
 10694  	}
 10695  	// match: (MOVBstoreidx ptr idx (MOVHUreg x) mem)
 10696  	// result: (MOVBstoreidx ptr idx x mem)
 10697  	for {
 10698  		ptr := v_0
 10699  		idx := v_1
 10700  		if v_2.Op != OpARM64MOVHUreg {
 10701  			break
 10702  		}
 10703  		x := v_2.Args[0]
 10704  		mem := v_3
 10705  		v.reset(OpARM64MOVBstoreidx)
 10706  		v.AddArg4(ptr, idx, x, mem)
 10707  		return true
 10708  	}
 10709  	// match: (MOVBstoreidx ptr idx (MOVWreg x) mem)
 10710  	// result: (MOVBstoreidx ptr idx x mem)
 10711  	for {
 10712  		ptr := v_0
 10713  		idx := v_1
 10714  		if v_2.Op != OpARM64MOVWreg {
 10715  			break
 10716  		}
 10717  		x := v_2.Args[0]
 10718  		mem := v_3
 10719  		v.reset(OpARM64MOVBstoreidx)
 10720  		v.AddArg4(ptr, idx, x, mem)
 10721  		return true
 10722  	}
 10723  	// match: (MOVBstoreidx ptr idx (MOVWUreg x) mem)
 10724  	// result: (MOVBstoreidx ptr idx x mem)
 10725  	for {
 10726  		ptr := v_0
 10727  		idx := v_1
 10728  		if v_2.Op != OpARM64MOVWUreg {
 10729  			break
 10730  		}
 10731  		x := v_2.Args[0]
 10732  		mem := v_3
 10733  		v.reset(OpARM64MOVBstoreidx)
 10734  		v.AddArg4(ptr, idx, x, mem)
 10735  		return true
 10736  	}
 10737  	return false
 10738  }
 10739  func rewriteValueARM64_OpARM64MOVDload(v *Value) bool {
 10740  	v_1 := v.Args[1]
 10741  	v_0 := v.Args[0]
 10742  	b := v.Block
 10743  	config := b.Func.Config
 10744  	// match: (MOVDload [off] {sym} ptr (FMOVDstore [off] {sym} ptr val _))
 10745  	// result: (FMOVDfpgp val)
 10746  	for {
 10747  		off := auxIntToInt32(v.AuxInt)
 10748  		sym := auxToSym(v.Aux)
 10749  		ptr := v_0
 10750  		if v_1.Op != OpARM64FMOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
 10751  			break
 10752  		}
 10753  		val := v_1.Args[1]
 10754  		if ptr != v_1.Args[0] {
 10755  			break
 10756  		}
 10757  		v.reset(OpARM64FMOVDfpgp)
 10758  		v.AddArg(val)
 10759  		return true
 10760  	}
 10761  	// match: (MOVDload [off1] {sym} (ADDconst [off2] ptr) mem)
 10762  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10763  	// result: (MOVDload [off1+int32(off2)] {sym} ptr mem)
 10764  	for {
 10765  		off1 := auxIntToInt32(v.AuxInt)
 10766  		sym := auxToSym(v.Aux)
 10767  		if v_0.Op != OpARM64ADDconst {
 10768  			break
 10769  		}
 10770  		off2 := auxIntToInt64(v_0.AuxInt)
 10771  		ptr := v_0.Args[0]
 10772  		mem := v_1
 10773  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10774  			break
 10775  		}
 10776  		v.reset(OpARM64MOVDload)
 10777  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 10778  		v.Aux = symToAux(sym)
 10779  		v.AddArg2(ptr, mem)
 10780  		return true
 10781  	}
 10782  	// match: (MOVDload [off] {sym} (ADD ptr idx) mem)
 10783  	// cond: off == 0 && sym == nil
 10784  	// result: (MOVDloadidx ptr idx mem)
 10785  	for {
 10786  		off := auxIntToInt32(v.AuxInt)
 10787  		sym := auxToSym(v.Aux)
 10788  		if v_0.Op != OpARM64ADD {
 10789  			break
 10790  		}
 10791  		idx := v_0.Args[1]
 10792  		ptr := v_0.Args[0]
 10793  		mem := v_1
 10794  		if !(off == 0 && sym == nil) {
 10795  			break
 10796  		}
 10797  		v.reset(OpARM64MOVDloadidx)
 10798  		v.AddArg3(ptr, idx, mem)
 10799  		return true
 10800  	}
 10801  	// match: (MOVDload [off] {sym} (ADDshiftLL [3] ptr idx) mem)
 10802  	// cond: off == 0 && sym == nil
 10803  	// result: (MOVDloadidx8 ptr idx mem)
 10804  	for {
 10805  		off := auxIntToInt32(v.AuxInt)
 10806  		sym := auxToSym(v.Aux)
 10807  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
 10808  			break
 10809  		}
 10810  		idx := v_0.Args[1]
 10811  		ptr := v_0.Args[0]
 10812  		mem := v_1
 10813  		if !(off == 0 && sym == nil) {
 10814  			break
 10815  		}
 10816  		v.reset(OpARM64MOVDloadidx8)
 10817  		v.AddArg3(ptr, idx, mem)
 10818  		return true
 10819  	}
 10820  	// match: (MOVDload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 10821  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10822  	// result: (MOVDload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 10823  	for {
 10824  		off1 := auxIntToInt32(v.AuxInt)
 10825  		sym1 := auxToSym(v.Aux)
 10826  		if v_0.Op != OpARM64MOVDaddr {
 10827  			break
 10828  		}
 10829  		off2 := auxIntToInt32(v_0.AuxInt)
 10830  		sym2 := auxToSym(v_0.Aux)
 10831  		ptr := v_0.Args[0]
 10832  		mem := v_1
 10833  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10834  			break
 10835  		}
 10836  		v.reset(OpARM64MOVDload)
 10837  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10838  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10839  		v.AddArg2(ptr, mem)
 10840  		return true
 10841  	}
 10842  	// match: (MOVDload [off] {sym} (SB) _)
 10843  	// cond: symIsRO(sym)
 10844  	// result: (MOVDconst [int64(read64(sym, int64(off), config.ctxt.Arch.ByteOrder))])
 10845  	for {
 10846  		off := auxIntToInt32(v.AuxInt)
 10847  		sym := auxToSym(v.Aux)
 10848  		if v_0.Op != OpSB || !(symIsRO(sym)) {
 10849  			break
 10850  		}
 10851  		v.reset(OpARM64MOVDconst)
 10852  		v.AuxInt = int64ToAuxInt(int64(read64(sym, int64(off), config.ctxt.Arch.ByteOrder)))
 10853  		return true
 10854  	}
 10855  	return false
 10856  }
 10857  func rewriteValueARM64_OpARM64MOVDloadidx(v *Value) bool {
 10858  	v_2 := v.Args[2]
 10859  	v_1 := v.Args[1]
 10860  	v_0 := v.Args[0]
 10861  	// match: (MOVDloadidx ptr (MOVDconst [c]) mem)
 10862  	// cond: is32Bit(c)
 10863  	// result: (MOVDload [int32(c)] ptr mem)
 10864  	for {
 10865  		ptr := v_0
 10866  		if v_1.Op != OpARM64MOVDconst {
 10867  			break
 10868  		}
 10869  		c := auxIntToInt64(v_1.AuxInt)
 10870  		mem := v_2
 10871  		if !(is32Bit(c)) {
 10872  			break
 10873  		}
 10874  		v.reset(OpARM64MOVDload)
 10875  		v.AuxInt = int32ToAuxInt(int32(c))
 10876  		v.AddArg2(ptr, mem)
 10877  		return true
 10878  	}
 10879  	// match: (MOVDloadidx (MOVDconst [c]) ptr mem)
 10880  	// cond: is32Bit(c)
 10881  	// result: (MOVDload [int32(c)] ptr mem)
 10882  	for {
 10883  		if v_0.Op != OpARM64MOVDconst {
 10884  			break
 10885  		}
 10886  		c := auxIntToInt64(v_0.AuxInt)
 10887  		ptr := v_1
 10888  		mem := v_2
 10889  		if !(is32Bit(c)) {
 10890  			break
 10891  		}
 10892  		v.reset(OpARM64MOVDload)
 10893  		v.AuxInt = int32ToAuxInt(int32(c))
 10894  		v.AddArg2(ptr, mem)
 10895  		return true
 10896  	}
 10897  	// match: (MOVDloadidx ptr (SLLconst [3] idx) mem)
 10898  	// result: (MOVDloadidx8 ptr idx mem)
 10899  	for {
 10900  		ptr := v_0
 10901  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
 10902  			break
 10903  		}
 10904  		idx := v_1.Args[0]
 10905  		mem := v_2
 10906  		v.reset(OpARM64MOVDloadidx8)
 10907  		v.AddArg3(ptr, idx, mem)
 10908  		return true
 10909  	}
 10910  	// match: (MOVDloadidx (SLLconst [3] idx) ptr mem)
 10911  	// result: (MOVDloadidx8 ptr idx mem)
 10912  	for {
 10913  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
 10914  			break
 10915  		}
 10916  		idx := v_0.Args[0]
 10917  		ptr := v_1
 10918  		mem := v_2
 10919  		v.reset(OpARM64MOVDloadidx8)
 10920  		v.AddArg3(ptr, idx, mem)
 10921  		return true
 10922  	}
 10923  	return false
 10924  }
 10925  func rewriteValueARM64_OpARM64MOVDloadidx8(v *Value) bool {
 10926  	v_2 := v.Args[2]
 10927  	v_1 := v.Args[1]
 10928  	v_0 := v.Args[0]
 10929  	// match: (MOVDloadidx8 ptr (MOVDconst [c]) mem)
 10930  	// cond: is32Bit(c<<3)
 10931  	// result: (MOVDload [int32(c)<<3] ptr mem)
 10932  	for {
 10933  		ptr := v_0
 10934  		if v_1.Op != OpARM64MOVDconst {
 10935  			break
 10936  		}
 10937  		c := auxIntToInt64(v_1.AuxInt)
 10938  		mem := v_2
 10939  		if !(is32Bit(c << 3)) {
 10940  			break
 10941  		}
 10942  		v.reset(OpARM64MOVDload)
 10943  		v.AuxInt = int32ToAuxInt(int32(c) << 3)
 10944  		v.AddArg2(ptr, mem)
 10945  		return true
 10946  	}
 10947  	return false
 10948  }
 10949  func rewriteValueARM64_OpARM64MOVDnop(v *Value) bool {
 10950  	v_0 := v.Args[0]
 10951  	// match: (MOVDnop (MOVDconst [c]))
 10952  	// result: (MOVDconst [c])
 10953  	for {
 10954  		if v_0.Op != OpARM64MOVDconst {
 10955  			break
 10956  		}
 10957  		c := auxIntToInt64(v_0.AuxInt)
 10958  		v.reset(OpARM64MOVDconst)
 10959  		v.AuxInt = int64ToAuxInt(c)
 10960  		return true
 10961  	}
 10962  	return false
 10963  }
 10964  func rewriteValueARM64_OpARM64MOVDreg(v *Value) bool {
 10965  	v_0 := v.Args[0]
 10966  	// match: (MOVDreg x)
 10967  	// cond: x.Uses == 1
 10968  	// result: (MOVDnop x)
 10969  	for {
 10970  		x := v_0
 10971  		if !(x.Uses == 1) {
 10972  			break
 10973  		}
 10974  		v.reset(OpARM64MOVDnop)
 10975  		v.AddArg(x)
 10976  		return true
 10977  	}
 10978  	// match: (MOVDreg (MOVDconst [c]))
 10979  	// result: (MOVDconst [c])
 10980  	for {
 10981  		if v_0.Op != OpARM64MOVDconst {
 10982  			break
 10983  		}
 10984  		c := auxIntToInt64(v_0.AuxInt)
 10985  		v.reset(OpARM64MOVDconst)
 10986  		v.AuxInt = int64ToAuxInt(c)
 10987  		return true
 10988  	}
 10989  	return false
 10990  }
 10991  func rewriteValueARM64_OpARM64MOVDstore(v *Value) bool {
 10992  	v_2 := v.Args[2]
 10993  	v_1 := v.Args[1]
 10994  	v_0 := v.Args[0]
 10995  	b := v.Block
 10996  	config := b.Func.Config
 10997  	// match: (MOVDstore [off] {sym} ptr (FMOVDfpgp val) mem)
 10998  	// result: (FMOVDstore [off] {sym} ptr val mem)
 10999  	for {
 11000  		off := auxIntToInt32(v.AuxInt)
 11001  		sym := auxToSym(v.Aux)
 11002  		ptr := v_0
 11003  		if v_1.Op != OpARM64FMOVDfpgp {
 11004  			break
 11005  		}
 11006  		val := v_1.Args[0]
 11007  		mem := v_2
 11008  		v.reset(OpARM64FMOVDstore)
 11009  		v.AuxInt = int32ToAuxInt(off)
 11010  		v.Aux = symToAux(sym)
 11011  		v.AddArg3(ptr, val, mem)
 11012  		return true
 11013  	}
 11014  	// match: (MOVDstore [off1] {sym} (ADDconst [off2] ptr) val mem)
 11015  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11016  	// result: (MOVDstore [off1+int32(off2)] {sym} ptr val mem)
 11017  	for {
 11018  		off1 := auxIntToInt32(v.AuxInt)
 11019  		sym := auxToSym(v.Aux)
 11020  		if v_0.Op != OpARM64ADDconst {
 11021  			break
 11022  		}
 11023  		off2 := auxIntToInt64(v_0.AuxInt)
 11024  		ptr := v_0.Args[0]
 11025  		val := v_1
 11026  		mem := v_2
 11027  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11028  			break
 11029  		}
 11030  		v.reset(OpARM64MOVDstore)
 11031  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 11032  		v.Aux = symToAux(sym)
 11033  		v.AddArg3(ptr, val, mem)
 11034  		return true
 11035  	}
 11036  	// match: (MOVDstore [off] {sym} (ADD ptr idx) val mem)
 11037  	// cond: off == 0 && sym == nil
 11038  	// result: (MOVDstoreidx ptr idx val mem)
 11039  	for {
 11040  		off := auxIntToInt32(v.AuxInt)
 11041  		sym := auxToSym(v.Aux)
 11042  		if v_0.Op != OpARM64ADD {
 11043  			break
 11044  		}
 11045  		idx := v_0.Args[1]
 11046  		ptr := v_0.Args[0]
 11047  		val := v_1
 11048  		mem := v_2
 11049  		if !(off == 0 && sym == nil) {
 11050  			break
 11051  		}
 11052  		v.reset(OpARM64MOVDstoreidx)
 11053  		v.AddArg4(ptr, idx, val, mem)
 11054  		return true
 11055  	}
 11056  	// match: (MOVDstore [off] {sym} (ADDshiftLL [3] ptr idx) val mem)
 11057  	// cond: off == 0 && sym == nil
 11058  	// result: (MOVDstoreidx8 ptr idx val mem)
 11059  	for {
 11060  		off := auxIntToInt32(v.AuxInt)
 11061  		sym := auxToSym(v.Aux)
 11062  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
 11063  			break
 11064  		}
 11065  		idx := v_0.Args[1]
 11066  		ptr := v_0.Args[0]
 11067  		val := v_1
 11068  		mem := v_2
 11069  		if !(off == 0 && sym == nil) {
 11070  			break
 11071  		}
 11072  		v.reset(OpARM64MOVDstoreidx8)
 11073  		v.AddArg4(ptr, idx, val, mem)
 11074  		return true
 11075  	}
 11076  	// match: (MOVDstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
 11077  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11078  	// result: (MOVDstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
 11079  	for {
 11080  		off1 := auxIntToInt32(v.AuxInt)
 11081  		sym1 := auxToSym(v.Aux)
 11082  		if v_0.Op != OpARM64MOVDaddr {
 11083  			break
 11084  		}
 11085  		off2 := auxIntToInt32(v_0.AuxInt)
 11086  		sym2 := auxToSym(v_0.Aux)
 11087  		ptr := v_0.Args[0]
 11088  		val := v_1
 11089  		mem := v_2
 11090  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11091  			break
 11092  		}
 11093  		v.reset(OpARM64MOVDstore)
 11094  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11095  		v.Aux = symToAux(mergeSym(sym1, sym2))
 11096  		v.AddArg3(ptr, val, mem)
 11097  		return true
 11098  	}
 11099  	return false
 11100  }
 11101  func rewriteValueARM64_OpARM64MOVDstoreidx(v *Value) bool {
 11102  	v_3 := v.Args[3]
 11103  	v_2 := v.Args[2]
 11104  	v_1 := v.Args[1]
 11105  	v_0 := v.Args[0]
 11106  	// match: (MOVDstoreidx ptr (MOVDconst [c]) val mem)
 11107  	// cond: is32Bit(c)
 11108  	// result: (MOVDstore [int32(c)] ptr val mem)
 11109  	for {
 11110  		ptr := v_0
 11111  		if v_1.Op != OpARM64MOVDconst {
 11112  			break
 11113  		}
 11114  		c := auxIntToInt64(v_1.AuxInt)
 11115  		val := v_2
 11116  		mem := v_3
 11117  		if !(is32Bit(c)) {
 11118  			break
 11119  		}
 11120  		v.reset(OpARM64MOVDstore)
 11121  		v.AuxInt = int32ToAuxInt(int32(c))
 11122  		v.AddArg3(ptr, val, mem)
 11123  		return true
 11124  	}
 11125  	// match: (MOVDstoreidx (MOVDconst [c]) idx val mem)
 11126  	// cond: is32Bit(c)
 11127  	// result: (MOVDstore [int32(c)] idx val mem)
 11128  	for {
 11129  		if v_0.Op != OpARM64MOVDconst {
 11130  			break
 11131  		}
 11132  		c := auxIntToInt64(v_0.AuxInt)
 11133  		idx := v_1
 11134  		val := v_2
 11135  		mem := v_3
 11136  		if !(is32Bit(c)) {
 11137  			break
 11138  		}
 11139  		v.reset(OpARM64MOVDstore)
 11140  		v.AuxInt = int32ToAuxInt(int32(c))
 11141  		v.AddArg3(idx, val, mem)
 11142  		return true
 11143  	}
 11144  	// match: (MOVDstoreidx ptr (SLLconst [3] idx) val mem)
 11145  	// result: (MOVDstoreidx8 ptr idx val mem)
 11146  	for {
 11147  		ptr := v_0
 11148  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
 11149  			break
 11150  		}
 11151  		idx := v_1.Args[0]
 11152  		val := v_2
 11153  		mem := v_3
 11154  		v.reset(OpARM64MOVDstoreidx8)
 11155  		v.AddArg4(ptr, idx, val, mem)
 11156  		return true
 11157  	}
 11158  	// match: (MOVDstoreidx (SLLconst [3] idx) ptr val mem)
 11159  	// result: (MOVDstoreidx8 ptr idx val mem)
 11160  	for {
 11161  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
 11162  			break
 11163  		}
 11164  		idx := v_0.Args[0]
 11165  		ptr := v_1
 11166  		val := v_2
 11167  		mem := v_3
 11168  		v.reset(OpARM64MOVDstoreidx8)
 11169  		v.AddArg4(ptr, idx, val, mem)
 11170  		return true
 11171  	}
 11172  	return false
 11173  }
 11174  func rewriteValueARM64_OpARM64MOVDstoreidx8(v *Value) bool {
 11175  	v_3 := v.Args[3]
 11176  	v_2 := v.Args[2]
 11177  	v_1 := v.Args[1]
 11178  	v_0 := v.Args[0]
 11179  	// match: (MOVDstoreidx8 ptr (MOVDconst [c]) val mem)
 11180  	// cond: is32Bit(c<<3)
 11181  	// result: (MOVDstore [int32(c)<<3] ptr val mem)
 11182  	for {
 11183  		ptr := v_0
 11184  		if v_1.Op != OpARM64MOVDconst {
 11185  			break
 11186  		}
 11187  		c := auxIntToInt64(v_1.AuxInt)
 11188  		val := v_2
 11189  		mem := v_3
 11190  		if !(is32Bit(c << 3)) {
 11191  			break
 11192  		}
 11193  		v.reset(OpARM64MOVDstore)
 11194  		v.AuxInt = int32ToAuxInt(int32(c) << 3)
 11195  		v.AddArg3(ptr, val, mem)
 11196  		return true
 11197  	}
 11198  	return false
 11199  }
 11200  func rewriteValueARM64_OpARM64MOVHUload(v *Value) bool {
 11201  	v_1 := v.Args[1]
 11202  	v_0 := v.Args[0]
 11203  	b := v.Block
 11204  	config := b.Func.Config
 11205  	// match: (MOVHUload [off1] {sym} (ADDconst [off2] ptr) mem)
 11206  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11207  	// result: (MOVHUload [off1+int32(off2)] {sym} ptr mem)
 11208  	for {
 11209  		off1 := auxIntToInt32(v.AuxInt)
 11210  		sym := auxToSym(v.Aux)
 11211  		if v_0.Op != OpARM64ADDconst {
 11212  			break
 11213  		}
 11214  		off2 := auxIntToInt64(v_0.AuxInt)
 11215  		ptr := v_0.Args[0]
 11216  		mem := v_1
 11217  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11218  			break
 11219  		}
 11220  		v.reset(OpARM64MOVHUload)
 11221  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 11222  		v.Aux = symToAux(sym)
 11223  		v.AddArg2(ptr, mem)
 11224  		return true
 11225  	}
 11226  	// match: (MOVHUload [off] {sym} (ADD ptr idx) mem)
 11227  	// cond: off == 0 && sym == nil
 11228  	// result: (MOVHUloadidx ptr idx mem)
 11229  	for {
 11230  		off := auxIntToInt32(v.AuxInt)
 11231  		sym := auxToSym(v.Aux)
 11232  		if v_0.Op != OpARM64ADD {
 11233  			break
 11234  		}
 11235  		idx := v_0.Args[1]
 11236  		ptr := v_0.Args[0]
 11237  		mem := v_1
 11238  		if !(off == 0 && sym == nil) {
 11239  			break
 11240  		}
 11241  		v.reset(OpARM64MOVHUloadidx)
 11242  		v.AddArg3(ptr, idx, mem)
 11243  		return true
 11244  	}
 11245  	// match: (MOVHUload [off] {sym} (ADDshiftLL [1] ptr idx) mem)
 11246  	// cond: off == 0 && sym == nil
 11247  	// result: (MOVHUloadidx2 ptr idx mem)
 11248  	for {
 11249  		off := auxIntToInt32(v.AuxInt)
 11250  		sym := auxToSym(v.Aux)
 11251  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 1 {
 11252  			break
 11253  		}
 11254  		idx := v_0.Args[1]
 11255  		ptr := v_0.Args[0]
 11256  		mem := v_1
 11257  		if !(off == 0 && sym == nil) {
 11258  			break
 11259  		}
 11260  		v.reset(OpARM64MOVHUloadidx2)
 11261  		v.AddArg3(ptr, idx, mem)
 11262  		return true
 11263  	}
 11264  	// match: (MOVHUload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 11265  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11266  	// result: (MOVHUload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 11267  	for {
 11268  		off1 := auxIntToInt32(v.AuxInt)
 11269  		sym1 := auxToSym(v.Aux)
 11270  		if v_0.Op != OpARM64MOVDaddr {
 11271  			break
 11272  		}
 11273  		off2 := auxIntToInt32(v_0.AuxInt)
 11274  		sym2 := auxToSym(v_0.Aux)
 11275  		ptr := v_0.Args[0]
 11276  		mem := v_1
 11277  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11278  			break
 11279  		}
 11280  		v.reset(OpARM64MOVHUload)
 11281  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11282  		v.Aux = symToAux(mergeSym(sym1, sym2))
 11283  		v.AddArg2(ptr, mem)
 11284  		return true
 11285  	}
 11286  	// match: (MOVHUload [off] {sym} (SB) _)
 11287  	// cond: symIsRO(sym)
 11288  	// result: (MOVDconst [int64(read16(sym, int64(off), config.ctxt.Arch.ByteOrder))])
 11289  	for {
 11290  		off := auxIntToInt32(v.AuxInt)
 11291  		sym := auxToSym(v.Aux)
 11292  		if v_0.Op != OpSB || !(symIsRO(sym)) {
 11293  			break
 11294  		}
 11295  		v.reset(OpARM64MOVDconst)
 11296  		v.AuxInt = int64ToAuxInt(int64(read16(sym, int64(off), config.ctxt.Arch.ByteOrder)))
 11297  		return true
 11298  	}
 11299  	return false
 11300  }
 11301  func rewriteValueARM64_OpARM64MOVHUloadidx(v *Value) bool {
 11302  	v_2 := v.Args[2]
 11303  	v_1 := v.Args[1]
 11304  	v_0 := v.Args[0]
 11305  	// match: (MOVHUloadidx ptr (MOVDconst [c]) mem)
 11306  	// cond: is32Bit(c)
 11307  	// result: (MOVHUload [int32(c)] ptr mem)
 11308  	for {
 11309  		ptr := v_0
 11310  		if v_1.Op != OpARM64MOVDconst {
 11311  			break
 11312  		}
 11313  		c := auxIntToInt64(v_1.AuxInt)
 11314  		mem := v_2
 11315  		if !(is32Bit(c)) {
 11316  			break
 11317  		}
 11318  		v.reset(OpARM64MOVHUload)
 11319  		v.AuxInt = int32ToAuxInt(int32(c))
 11320  		v.AddArg2(ptr, mem)
 11321  		return true
 11322  	}
 11323  	// match: (MOVHUloadidx (MOVDconst [c]) ptr mem)
 11324  	// cond: is32Bit(c)
 11325  	// result: (MOVHUload [int32(c)] ptr mem)
 11326  	for {
 11327  		if v_0.Op != OpARM64MOVDconst {
 11328  			break
 11329  		}
 11330  		c := auxIntToInt64(v_0.AuxInt)
 11331  		ptr := v_1
 11332  		mem := v_2
 11333  		if !(is32Bit(c)) {
 11334  			break
 11335  		}
 11336  		v.reset(OpARM64MOVHUload)
 11337  		v.AuxInt = int32ToAuxInt(int32(c))
 11338  		v.AddArg2(ptr, mem)
 11339  		return true
 11340  	}
 11341  	// match: (MOVHUloadidx ptr (SLLconst [1] idx) mem)
 11342  	// result: (MOVHUloadidx2 ptr idx mem)
 11343  	for {
 11344  		ptr := v_0
 11345  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 1 {
 11346  			break
 11347  		}
 11348  		idx := v_1.Args[0]
 11349  		mem := v_2
 11350  		v.reset(OpARM64MOVHUloadidx2)
 11351  		v.AddArg3(ptr, idx, mem)
 11352  		return true
 11353  	}
 11354  	// match: (MOVHUloadidx ptr (ADD idx idx) mem)
 11355  	// result: (MOVHUloadidx2 ptr idx mem)
 11356  	for {
 11357  		ptr := v_0
 11358  		if v_1.Op != OpARM64ADD {
 11359  			break
 11360  		}
 11361  		idx := v_1.Args[1]
 11362  		if idx != v_1.Args[0] {
 11363  			break
 11364  		}
 11365  		mem := v_2
 11366  		v.reset(OpARM64MOVHUloadidx2)
 11367  		v.AddArg3(ptr, idx, mem)
 11368  		return true
 11369  	}
 11370  	// match: (MOVHUloadidx (ADD idx idx) ptr mem)
 11371  	// result: (MOVHUloadidx2 ptr idx mem)
 11372  	for {
 11373  		if v_0.Op != OpARM64ADD {
 11374  			break
 11375  		}
 11376  		idx := v_0.Args[1]
 11377  		if idx != v_0.Args[0] {
 11378  			break
 11379  		}
 11380  		ptr := v_1
 11381  		mem := v_2
 11382  		v.reset(OpARM64MOVHUloadidx2)
 11383  		v.AddArg3(ptr, idx, mem)
 11384  		return true
 11385  	}
 11386  	return false
 11387  }
 11388  func rewriteValueARM64_OpARM64MOVHUloadidx2(v *Value) bool {
 11389  	v_2 := v.Args[2]
 11390  	v_1 := v.Args[1]
 11391  	v_0 := v.Args[0]
 11392  	// match: (MOVHUloadidx2 ptr (MOVDconst [c]) mem)
 11393  	// cond: is32Bit(c<<1)
 11394  	// result: (MOVHUload [int32(c)<<1] ptr mem)
 11395  	for {
 11396  		ptr := v_0
 11397  		if v_1.Op != OpARM64MOVDconst {
 11398  			break
 11399  		}
 11400  		c := auxIntToInt64(v_1.AuxInt)
 11401  		mem := v_2
 11402  		if !(is32Bit(c << 1)) {
 11403  			break
 11404  		}
 11405  		v.reset(OpARM64MOVHUload)
 11406  		v.AuxInt = int32ToAuxInt(int32(c) << 1)
 11407  		v.AddArg2(ptr, mem)
 11408  		return true
 11409  	}
 11410  	return false
 11411  }
 11412  func rewriteValueARM64_OpARM64MOVHUreg(v *Value) bool {
 11413  	v_0 := v.Args[0]
 11414  	// match: (MOVHUreg (ANDconst [c] x))
 11415  	// result: (ANDconst [c&(1<<16-1)] x)
 11416  	for {
 11417  		if v_0.Op != OpARM64ANDconst {
 11418  			break
 11419  		}
 11420  		c := auxIntToInt64(v_0.AuxInt)
 11421  		x := v_0.Args[0]
 11422  		v.reset(OpARM64ANDconst)
 11423  		v.AuxInt = int64ToAuxInt(c & (1<<16 - 1))
 11424  		v.AddArg(x)
 11425  		return true
 11426  	}
 11427  	// match: (MOVHUreg (MOVDconst [c]))
 11428  	// result: (MOVDconst [int64(uint16(c))])
 11429  	for {
 11430  		if v_0.Op != OpARM64MOVDconst {
 11431  			break
 11432  		}
 11433  		c := auxIntToInt64(v_0.AuxInt)
 11434  		v.reset(OpARM64MOVDconst)
 11435  		v.AuxInt = int64ToAuxInt(int64(uint16(c)))
 11436  		return true
 11437  	}
 11438  	// match: (MOVHUreg x)
 11439  	// cond: v.Type.Size() <= 2
 11440  	// result: x
 11441  	for {
 11442  		x := v_0
 11443  		if !(v.Type.Size() <= 2) {
 11444  			break
 11445  		}
 11446  		v.copyOf(x)
 11447  		return true
 11448  	}
 11449  	// match: (MOVHUreg (SLLconst [lc] x))
 11450  	// cond: lc >= 16
 11451  	// result: (MOVDconst [0])
 11452  	for {
 11453  		if v_0.Op != OpARM64SLLconst {
 11454  			break
 11455  		}
 11456  		lc := auxIntToInt64(v_0.AuxInt)
 11457  		if !(lc >= 16) {
 11458  			break
 11459  		}
 11460  		v.reset(OpARM64MOVDconst)
 11461  		v.AuxInt = int64ToAuxInt(0)
 11462  		return true
 11463  	}
 11464  	// match: (MOVHUreg (SLLconst [lc] x))
 11465  	// cond: lc < 16
 11466  	// result: (UBFIZ [armBFAuxInt(lc, 16-lc)] x)
 11467  	for {
 11468  		if v_0.Op != OpARM64SLLconst {
 11469  			break
 11470  		}
 11471  		lc := auxIntToInt64(v_0.AuxInt)
 11472  		x := v_0.Args[0]
 11473  		if !(lc < 16) {
 11474  			break
 11475  		}
 11476  		v.reset(OpARM64UBFIZ)
 11477  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 16-lc))
 11478  		v.AddArg(x)
 11479  		return true
 11480  	}
 11481  	// match: (MOVHUreg (SRLconst [rc] x))
 11482  	// cond: rc < 16
 11483  	// result: (UBFX [armBFAuxInt(rc, 16)] x)
 11484  	for {
 11485  		if v_0.Op != OpARM64SRLconst {
 11486  			break
 11487  		}
 11488  		rc := auxIntToInt64(v_0.AuxInt)
 11489  		x := v_0.Args[0]
 11490  		if !(rc < 16) {
 11491  			break
 11492  		}
 11493  		v.reset(OpARM64UBFX)
 11494  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 16))
 11495  		v.AddArg(x)
 11496  		return true
 11497  	}
 11498  	// match: (MOVHUreg (UBFX [bfc] x))
 11499  	// cond: bfc.width() <= 16
 11500  	// result: (UBFX [bfc] x)
 11501  	for {
 11502  		if v_0.Op != OpARM64UBFX {
 11503  			break
 11504  		}
 11505  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 11506  		x := v_0.Args[0]
 11507  		if !(bfc.width() <= 16) {
 11508  			break
 11509  		}
 11510  		v.reset(OpARM64UBFX)
 11511  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 11512  		v.AddArg(x)
 11513  		return true
 11514  	}
 11515  	return false
 11516  }
 11517  func rewriteValueARM64_OpARM64MOVHload(v *Value) bool {
 11518  	v_1 := v.Args[1]
 11519  	v_0 := v.Args[0]
 11520  	b := v.Block
 11521  	config := b.Func.Config
 11522  	// match: (MOVHload [off1] {sym} (ADDconst [off2] ptr) mem)
 11523  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11524  	// result: (MOVHload [off1+int32(off2)] {sym} ptr mem)
 11525  	for {
 11526  		off1 := auxIntToInt32(v.AuxInt)
 11527  		sym := auxToSym(v.Aux)
 11528  		if v_0.Op != OpARM64ADDconst {
 11529  			break
 11530  		}
 11531  		off2 := auxIntToInt64(v_0.AuxInt)
 11532  		ptr := v_0.Args[0]
 11533  		mem := v_1
 11534  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11535  			break
 11536  		}
 11537  		v.reset(OpARM64MOVHload)
 11538  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 11539  		v.Aux = symToAux(sym)
 11540  		v.AddArg2(ptr, mem)
 11541  		return true
 11542  	}
 11543  	// match: (MOVHload [off] {sym} (ADD ptr idx) mem)
 11544  	// cond: off == 0 && sym == nil
 11545  	// result: (MOVHloadidx ptr idx mem)
 11546  	for {
 11547  		off := auxIntToInt32(v.AuxInt)
 11548  		sym := auxToSym(v.Aux)
 11549  		if v_0.Op != OpARM64ADD {
 11550  			break
 11551  		}
 11552  		idx := v_0.Args[1]
 11553  		ptr := v_0.Args[0]
 11554  		mem := v_1
 11555  		if !(off == 0 && sym == nil) {
 11556  			break
 11557  		}
 11558  		v.reset(OpARM64MOVHloadidx)
 11559  		v.AddArg3(ptr, idx, mem)
 11560  		return true
 11561  	}
 11562  	// match: (MOVHload [off] {sym} (ADDshiftLL [1] ptr idx) mem)
 11563  	// cond: off == 0 && sym == nil
 11564  	// result: (MOVHloadidx2 ptr idx mem)
 11565  	for {
 11566  		off := auxIntToInt32(v.AuxInt)
 11567  		sym := auxToSym(v.Aux)
 11568  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 1 {
 11569  			break
 11570  		}
 11571  		idx := v_0.Args[1]
 11572  		ptr := v_0.Args[0]
 11573  		mem := v_1
 11574  		if !(off == 0 && sym == nil) {
 11575  			break
 11576  		}
 11577  		v.reset(OpARM64MOVHloadidx2)
 11578  		v.AddArg3(ptr, idx, mem)
 11579  		return true
 11580  	}
 11581  	// match: (MOVHload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 11582  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11583  	// result: (MOVHload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 11584  	for {
 11585  		off1 := auxIntToInt32(v.AuxInt)
 11586  		sym1 := auxToSym(v.Aux)
 11587  		if v_0.Op != OpARM64MOVDaddr {
 11588  			break
 11589  		}
 11590  		off2 := auxIntToInt32(v_0.AuxInt)
 11591  		sym2 := auxToSym(v_0.Aux)
 11592  		ptr := v_0.Args[0]
 11593  		mem := v_1
 11594  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11595  			break
 11596  		}
 11597  		v.reset(OpARM64MOVHload)
 11598  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11599  		v.Aux = symToAux(mergeSym(sym1, sym2))
 11600  		v.AddArg2(ptr, mem)
 11601  		return true
 11602  	}
 11603  	// match: (MOVHload [off] {sym} (SB) _)
 11604  	// cond: symIsRO(sym)
 11605  	// result: (MOVDconst [int64(int16(read16(sym, int64(off), config.ctxt.Arch.ByteOrder)))])
 11606  	for {
 11607  		off := auxIntToInt32(v.AuxInt)
 11608  		sym := auxToSym(v.Aux)
 11609  		if v_0.Op != OpSB || !(symIsRO(sym)) {
 11610  			break
 11611  		}
 11612  		v.reset(OpARM64MOVDconst)
 11613  		v.AuxInt = int64ToAuxInt(int64(int16(read16(sym, int64(off), config.ctxt.Arch.ByteOrder))))
 11614  		return true
 11615  	}
 11616  	return false
 11617  }
 11618  func rewriteValueARM64_OpARM64MOVHloadidx(v *Value) bool {
 11619  	v_2 := v.Args[2]
 11620  	v_1 := v.Args[1]
 11621  	v_0 := v.Args[0]
 11622  	// match: (MOVHloadidx ptr (MOVDconst [c]) mem)
 11623  	// cond: is32Bit(c)
 11624  	// result: (MOVHload [int32(c)] ptr mem)
 11625  	for {
 11626  		ptr := v_0
 11627  		if v_1.Op != OpARM64MOVDconst {
 11628  			break
 11629  		}
 11630  		c := auxIntToInt64(v_1.AuxInt)
 11631  		mem := v_2
 11632  		if !(is32Bit(c)) {
 11633  			break
 11634  		}
 11635  		v.reset(OpARM64MOVHload)
 11636  		v.AuxInt = int32ToAuxInt(int32(c))
 11637  		v.AddArg2(ptr, mem)
 11638  		return true
 11639  	}
 11640  	// match: (MOVHloadidx (MOVDconst [c]) ptr mem)
 11641  	// cond: is32Bit(c)
 11642  	// result: (MOVHload [int32(c)] ptr mem)
 11643  	for {
 11644  		if v_0.Op != OpARM64MOVDconst {
 11645  			break
 11646  		}
 11647  		c := auxIntToInt64(v_0.AuxInt)
 11648  		ptr := v_1
 11649  		mem := v_2
 11650  		if !(is32Bit(c)) {
 11651  			break
 11652  		}
 11653  		v.reset(OpARM64MOVHload)
 11654  		v.AuxInt = int32ToAuxInt(int32(c))
 11655  		v.AddArg2(ptr, mem)
 11656  		return true
 11657  	}
 11658  	// match: (MOVHloadidx ptr (SLLconst [1] idx) mem)
 11659  	// result: (MOVHloadidx2 ptr idx mem)
 11660  	for {
 11661  		ptr := v_0
 11662  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 1 {
 11663  			break
 11664  		}
 11665  		idx := v_1.Args[0]
 11666  		mem := v_2
 11667  		v.reset(OpARM64MOVHloadidx2)
 11668  		v.AddArg3(ptr, idx, mem)
 11669  		return true
 11670  	}
 11671  	// match: (MOVHloadidx ptr (ADD idx idx) mem)
 11672  	// result: (MOVHloadidx2 ptr idx mem)
 11673  	for {
 11674  		ptr := v_0
 11675  		if v_1.Op != OpARM64ADD {
 11676  			break
 11677  		}
 11678  		idx := v_1.Args[1]
 11679  		if idx != v_1.Args[0] {
 11680  			break
 11681  		}
 11682  		mem := v_2
 11683  		v.reset(OpARM64MOVHloadidx2)
 11684  		v.AddArg3(ptr, idx, mem)
 11685  		return true
 11686  	}
 11687  	// match: (MOVHloadidx (ADD idx idx) ptr mem)
 11688  	// result: (MOVHloadidx2 ptr idx mem)
 11689  	for {
 11690  		if v_0.Op != OpARM64ADD {
 11691  			break
 11692  		}
 11693  		idx := v_0.Args[1]
 11694  		if idx != v_0.Args[0] {
 11695  			break
 11696  		}
 11697  		ptr := v_1
 11698  		mem := v_2
 11699  		v.reset(OpARM64MOVHloadidx2)
 11700  		v.AddArg3(ptr, idx, mem)
 11701  		return true
 11702  	}
 11703  	return false
 11704  }
 11705  func rewriteValueARM64_OpARM64MOVHloadidx2(v *Value) bool {
 11706  	v_2 := v.Args[2]
 11707  	v_1 := v.Args[1]
 11708  	v_0 := v.Args[0]
 11709  	// match: (MOVHloadidx2 ptr (MOVDconst [c]) mem)
 11710  	// cond: is32Bit(c<<1)
 11711  	// result: (MOVHload [int32(c)<<1] ptr mem)
 11712  	for {
 11713  		ptr := v_0
 11714  		if v_1.Op != OpARM64MOVDconst {
 11715  			break
 11716  		}
 11717  		c := auxIntToInt64(v_1.AuxInt)
 11718  		mem := v_2
 11719  		if !(is32Bit(c << 1)) {
 11720  			break
 11721  		}
 11722  		v.reset(OpARM64MOVHload)
 11723  		v.AuxInt = int32ToAuxInt(int32(c) << 1)
 11724  		v.AddArg2(ptr, mem)
 11725  		return true
 11726  	}
 11727  	return false
 11728  }
 11729  func rewriteValueARM64_OpARM64MOVHreg(v *Value) bool {
 11730  	v_0 := v.Args[0]
 11731  	// match: (MOVHreg (MOVDconst [c]))
 11732  	// result: (MOVDconst [int64(int16(c))])
 11733  	for {
 11734  		if v_0.Op != OpARM64MOVDconst {
 11735  			break
 11736  		}
 11737  		c := auxIntToInt64(v_0.AuxInt)
 11738  		v.reset(OpARM64MOVDconst)
 11739  		v.AuxInt = int64ToAuxInt(int64(int16(c)))
 11740  		return true
 11741  	}
 11742  	// match: (MOVHreg x)
 11743  	// cond: v.Type.Size() <= 2
 11744  	// result: x
 11745  	for {
 11746  		x := v_0
 11747  		if !(v.Type.Size() <= 2) {
 11748  			break
 11749  		}
 11750  		v.copyOf(x)
 11751  		return true
 11752  	}
 11753  	// match: (MOVHreg <t> (ANDconst x [c]))
 11754  	// cond: uint64(c) & uint64(0xffffffffffff8000) == 0
 11755  	// result: (ANDconst <t> x [c])
 11756  	for {
 11757  		t := v.Type
 11758  		if v_0.Op != OpARM64ANDconst {
 11759  			break
 11760  		}
 11761  		c := auxIntToInt64(v_0.AuxInt)
 11762  		x := v_0.Args[0]
 11763  		if !(uint64(c)&uint64(0xffffffffffff8000) == 0) {
 11764  			break
 11765  		}
 11766  		v.reset(OpARM64ANDconst)
 11767  		v.Type = t
 11768  		v.AuxInt = int64ToAuxInt(c)
 11769  		v.AddArg(x)
 11770  		return true
 11771  	}
 11772  	// match: (MOVHreg (SLLconst [lc] x))
 11773  	// cond: lc < 16
 11774  	// result: (SBFIZ [armBFAuxInt(lc, 16-lc)] x)
 11775  	for {
 11776  		if v_0.Op != OpARM64SLLconst {
 11777  			break
 11778  		}
 11779  		lc := auxIntToInt64(v_0.AuxInt)
 11780  		x := v_0.Args[0]
 11781  		if !(lc < 16) {
 11782  			break
 11783  		}
 11784  		v.reset(OpARM64SBFIZ)
 11785  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 16-lc))
 11786  		v.AddArg(x)
 11787  		return true
 11788  	}
 11789  	// match: (MOVHreg (SBFX [bfc] x))
 11790  	// cond: bfc.width() <= 16
 11791  	// result: (SBFX [bfc] x)
 11792  	for {
 11793  		if v_0.Op != OpARM64SBFX {
 11794  			break
 11795  		}
 11796  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 11797  		x := v_0.Args[0]
 11798  		if !(bfc.width() <= 16) {
 11799  			break
 11800  		}
 11801  		v.reset(OpARM64SBFX)
 11802  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 11803  		v.AddArg(x)
 11804  		return true
 11805  	}
 11806  	return false
 11807  }
 11808  func rewriteValueARM64_OpARM64MOVHstore(v *Value) bool {
 11809  	v_2 := v.Args[2]
 11810  	v_1 := v.Args[1]
 11811  	v_0 := v.Args[0]
 11812  	b := v.Block
 11813  	config := b.Func.Config
 11814  	// match: (MOVHstore [off1] {sym} (ADDconst [off2] ptr) val mem)
 11815  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11816  	// result: (MOVHstore [off1+int32(off2)] {sym} ptr val mem)
 11817  	for {
 11818  		off1 := auxIntToInt32(v.AuxInt)
 11819  		sym := auxToSym(v.Aux)
 11820  		if v_0.Op != OpARM64ADDconst {
 11821  			break
 11822  		}
 11823  		off2 := auxIntToInt64(v_0.AuxInt)
 11824  		ptr := v_0.Args[0]
 11825  		val := v_1
 11826  		mem := v_2
 11827  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11828  			break
 11829  		}
 11830  		v.reset(OpARM64MOVHstore)
 11831  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 11832  		v.Aux = symToAux(sym)
 11833  		v.AddArg3(ptr, val, mem)
 11834  		return true
 11835  	}
 11836  	// match: (MOVHstore [off] {sym} (ADD ptr idx) val mem)
 11837  	// cond: off == 0 && sym == nil
 11838  	// result: (MOVHstoreidx ptr idx val mem)
 11839  	for {
 11840  		off := auxIntToInt32(v.AuxInt)
 11841  		sym := auxToSym(v.Aux)
 11842  		if v_0.Op != OpARM64ADD {
 11843  			break
 11844  		}
 11845  		idx := v_0.Args[1]
 11846  		ptr := v_0.Args[0]
 11847  		val := v_1
 11848  		mem := v_2
 11849  		if !(off == 0 && sym == nil) {
 11850  			break
 11851  		}
 11852  		v.reset(OpARM64MOVHstoreidx)
 11853  		v.AddArg4(ptr, idx, val, mem)
 11854  		return true
 11855  	}
 11856  	// match: (MOVHstore [off] {sym} (ADDshiftLL [1] ptr idx) val mem)
 11857  	// cond: off == 0 && sym == nil
 11858  	// result: (MOVHstoreidx2 ptr idx val mem)
 11859  	for {
 11860  		off := auxIntToInt32(v.AuxInt)
 11861  		sym := auxToSym(v.Aux)
 11862  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 1 {
 11863  			break
 11864  		}
 11865  		idx := v_0.Args[1]
 11866  		ptr := v_0.Args[0]
 11867  		val := v_1
 11868  		mem := v_2
 11869  		if !(off == 0 && sym == nil) {
 11870  			break
 11871  		}
 11872  		v.reset(OpARM64MOVHstoreidx2)
 11873  		v.AddArg4(ptr, idx, val, mem)
 11874  		return true
 11875  	}
 11876  	// match: (MOVHstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
 11877  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11878  	// result: (MOVHstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
 11879  	for {
 11880  		off1 := auxIntToInt32(v.AuxInt)
 11881  		sym1 := auxToSym(v.Aux)
 11882  		if v_0.Op != OpARM64MOVDaddr {
 11883  			break
 11884  		}
 11885  		off2 := auxIntToInt32(v_0.AuxInt)
 11886  		sym2 := auxToSym(v_0.Aux)
 11887  		ptr := v_0.Args[0]
 11888  		val := v_1
 11889  		mem := v_2
 11890  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11891  			break
 11892  		}
 11893  		v.reset(OpARM64MOVHstore)
 11894  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11895  		v.Aux = symToAux(mergeSym(sym1, sym2))
 11896  		v.AddArg3(ptr, val, mem)
 11897  		return true
 11898  	}
 11899  	// match: (MOVHstore [off] {sym} ptr (MOVHreg x) mem)
 11900  	// result: (MOVHstore [off] {sym} ptr x mem)
 11901  	for {
 11902  		off := auxIntToInt32(v.AuxInt)
 11903  		sym := auxToSym(v.Aux)
 11904  		ptr := v_0
 11905  		if v_1.Op != OpARM64MOVHreg {
 11906  			break
 11907  		}
 11908  		x := v_1.Args[0]
 11909  		mem := v_2
 11910  		v.reset(OpARM64MOVHstore)
 11911  		v.AuxInt = int32ToAuxInt(off)
 11912  		v.Aux = symToAux(sym)
 11913  		v.AddArg3(ptr, x, mem)
 11914  		return true
 11915  	}
 11916  	// match: (MOVHstore [off] {sym} ptr (MOVHUreg x) mem)
 11917  	// result: (MOVHstore [off] {sym} ptr x mem)
 11918  	for {
 11919  		off := auxIntToInt32(v.AuxInt)
 11920  		sym := auxToSym(v.Aux)
 11921  		ptr := v_0
 11922  		if v_1.Op != OpARM64MOVHUreg {
 11923  			break
 11924  		}
 11925  		x := v_1.Args[0]
 11926  		mem := v_2
 11927  		v.reset(OpARM64MOVHstore)
 11928  		v.AuxInt = int32ToAuxInt(off)
 11929  		v.Aux = symToAux(sym)
 11930  		v.AddArg3(ptr, x, mem)
 11931  		return true
 11932  	}
 11933  	// match: (MOVHstore [off] {sym} ptr (MOVWreg x) mem)
 11934  	// result: (MOVHstore [off] {sym} ptr x mem)
 11935  	for {
 11936  		off := auxIntToInt32(v.AuxInt)
 11937  		sym := auxToSym(v.Aux)
 11938  		ptr := v_0
 11939  		if v_1.Op != OpARM64MOVWreg {
 11940  			break
 11941  		}
 11942  		x := v_1.Args[0]
 11943  		mem := v_2
 11944  		v.reset(OpARM64MOVHstore)
 11945  		v.AuxInt = int32ToAuxInt(off)
 11946  		v.Aux = symToAux(sym)
 11947  		v.AddArg3(ptr, x, mem)
 11948  		return true
 11949  	}
 11950  	// match: (MOVHstore [off] {sym} ptr (MOVWUreg x) mem)
 11951  	// result: (MOVHstore [off] {sym} ptr x mem)
 11952  	for {
 11953  		off := auxIntToInt32(v.AuxInt)
 11954  		sym := auxToSym(v.Aux)
 11955  		ptr := v_0
 11956  		if v_1.Op != OpARM64MOVWUreg {
 11957  			break
 11958  		}
 11959  		x := v_1.Args[0]
 11960  		mem := v_2
 11961  		v.reset(OpARM64MOVHstore)
 11962  		v.AuxInt = int32ToAuxInt(off)
 11963  		v.Aux = symToAux(sym)
 11964  		v.AddArg3(ptr, x, mem)
 11965  		return true
 11966  	}
 11967  	return false
 11968  }
 11969  func rewriteValueARM64_OpARM64MOVHstoreidx(v *Value) bool {
 11970  	v_3 := v.Args[3]
 11971  	v_2 := v.Args[2]
 11972  	v_1 := v.Args[1]
 11973  	v_0 := v.Args[0]
 11974  	// match: (MOVHstoreidx ptr (MOVDconst [c]) val mem)
 11975  	// cond: is32Bit(c)
 11976  	// result: (MOVHstore [int32(c)] ptr val mem)
 11977  	for {
 11978  		ptr := v_0
 11979  		if v_1.Op != OpARM64MOVDconst {
 11980  			break
 11981  		}
 11982  		c := auxIntToInt64(v_1.AuxInt)
 11983  		val := v_2
 11984  		mem := v_3
 11985  		if !(is32Bit(c)) {
 11986  			break
 11987  		}
 11988  		v.reset(OpARM64MOVHstore)
 11989  		v.AuxInt = int32ToAuxInt(int32(c))
 11990  		v.AddArg3(ptr, val, mem)
 11991  		return true
 11992  	}
 11993  	// match: (MOVHstoreidx (MOVDconst [c]) idx val mem)
 11994  	// cond: is32Bit(c)
 11995  	// result: (MOVHstore [int32(c)] idx val mem)
 11996  	for {
 11997  		if v_0.Op != OpARM64MOVDconst {
 11998  			break
 11999  		}
 12000  		c := auxIntToInt64(v_0.AuxInt)
 12001  		idx := v_1
 12002  		val := v_2
 12003  		mem := v_3
 12004  		if !(is32Bit(c)) {
 12005  			break
 12006  		}
 12007  		v.reset(OpARM64MOVHstore)
 12008  		v.AuxInt = int32ToAuxInt(int32(c))
 12009  		v.AddArg3(idx, val, mem)
 12010  		return true
 12011  	}
 12012  	// match: (MOVHstoreidx ptr (SLLconst [1] idx) val mem)
 12013  	// result: (MOVHstoreidx2 ptr idx val mem)
 12014  	for {
 12015  		ptr := v_0
 12016  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 1 {
 12017  			break
 12018  		}
 12019  		idx := v_1.Args[0]
 12020  		val := v_2
 12021  		mem := v_3
 12022  		v.reset(OpARM64MOVHstoreidx2)
 12023  		v.AddArg4(ptr, idx, val, mem)
 12024  		return true
 12025  	}
 12026  	// match: (MOVHstoreidx ptr (ADD idx idx) val mem)
 12027  	// result: (MOVHstoreidx2 ptr idx val mem)
 12028  	for {
 12029  		ptr := v_0
 12030  		if v_1.Op != OpARM64ADD {
 12031  			break
 12032  		}
 12033  		idx := v_1.Args[1]
 12034  		if idx != v_1.Args[0] {
 12035  			break
 12036  		}
 12037  		val := v_2
 12038  		mem := v_3
 12039  		v.reset(OpARM64MOVHstoreidx2)
 12040  		v.AddArg4(ptr, idx, val, mem)
 12041  		return true
 12042  	}
 12043  	// match: (MOVHstoreidx (SLLconst [1] idx) ptr val mem)
 12044  	// result: (MOVHstoreidx2 ptr idx val mem)
 12045  	for {
 12046  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 1 {
 12047  			break
 12048  		}
 12049  		idx := v_0.Args[0]
 12050  		ptr := v_1
 12051  		val := v_2
 12052  		mem := v_3
 12053  		v.reset(OpARM64MOVHstoreidx2)
 12054  		v.AddArg4(ptr, idx, val, mem)
 12055  		return true
 12056  	}
 12057  	// match: (MOVHstoreidx (ADD idx idx) ptr val mem)
 12058  	// result: (MOVHstoreidx2 ptr idx val mem)
 12059  	for {
 12060  		if v_0.Op != OpARM64ADD {
 12061  			break
 12062  		}
 12063  		idx := v_0.Args[1]
 12064  		if idx != v_0.Args[0] {
 12065  			break
 12066  		}
 12067  		ptr := v_1
 12068  		val := v_2
 12069  		mem := v_3
 12070  		v.reset(OpARM64MOVHstoreidx2)
 12071  		v.AddArg4(ptr, idx, val, mem)
 12072  		return true
 12073  	}
 12074  	// match: (MOVHstoreidx ptr idx (MOVHreg x) mem)
 12075  	// result: (MOVHstoreidx ptr idx x mem)
 12076  	for {
 12077  		ptr := v_0
 12078  		idx := v_1
 12079  		if v_2.Op != OpARM64MOVHreg {
 12080  			break
 12081  		}
 12082  		x := v_2.Args[0]
 12083  		mem := v_3
 12084  		v.reset(OpARM64MOVHstoreidx)
 12085  		v.AddArg4(ptr, idx, x, mem)
 12086  		return true
 12087  	}
 12088  	// match: (MOVHstoreidx ptr idx (MOVHUreg x) mem)
 12089  	// result: (MOVHstoreidx ptr idx x mem)
 12090  	for {
 12091  		ptr := v_0
 12092  		idx := v_1
 12093  		if v_2.Op != OpARM64MOVHUreg {
 12094  			break
 12095  		}
 12096  		x := v_2.Args[0]
 12097  		mem := v_3
 12098  		v.reset(OpARM64MOVHstoreidx)
 12099  		v.AddArg4(ptr, idx, x, mem)
 12100  		return true
 12101  	}
 12102  	// match: (MOVHstoreidx ptr idx (MOVWreg x) mem)
 12103  	// result: (MOVHstoreidx ptr idx x mem)
 12104  	for {
 12105  		ptr := v_0
 12106  		idx := v_1
 12107  		if v_2.Op != OpARM64MOVWreg {
 12108  			break
 12109  		}
 12110  		x := v_2.Args[0]
 12111  		mem := v_3
 12112  		v.reset(OpARM64MOVHstoreidx)
 12113  		v.AddArg4(ptr, idx, x, mem)
 12114  		return true
 12115  	}
 12116  	// match: (MOVHstoreidx ptr idx (MOVWUreg x) mem)
 12117  	// result: (MOVHstoreidx ptr idx x mem)
 12118  	for {
 12119  		ptr := v_0
 12120  		idx := v_1
 12121  		if v_2.Op != OpARM64MOVWUreg {
 12122  			break
 12123  		}
 12124  		x := v_2.Args[0]
 12125  		mem := v_3
 12126  		v.reset(OpARM64MOVHstoreidx)
 12127  		v.AddArg4(ptr, idx, x, mem)
 12128  		return true
 12129  	}
 12130  	return false
 12131  }
 12132  func rewriteValueARM64_OpARM64MOVHstoreidx2(v *Value) bool {
 12133  	v_3 := v.Args[3]
 12134  	v_2 := v.Args[2]
 12135  	v_1 := v.Args[1]
 12136  	v_0 := v.Args[0]
 12137  	// match: (MOVHstoreidx2 ptr (MOVDconst [c]) val mem)
 12138  	// cond: is32Bit(c<<1)
 12139  	// result: (MOVHstore [int32(c)<<1] ptr val mem)
 12140  	for {
 12141  		ptr := v_0
 12142  		if v_1.Op != OpARM64MOVDconst {
 12143  			break
 12144  		}
 12145  		c := auxIntToInt64(v_1.AuxInt)
 12146  		val := v_2
 12147  		mem := v_3
 12148  		if !(is32Bit(c << 1)) {
 12149  			break
 12150  		}
 12151  		v.reset(OpARM64MOVHstore)
 12152  		v.AuxInt = int32ToAuxInt(int32(c) << 1)
 12153  		v.AddArg3(ptr, val, mem)
 12154  		return true
 12155  	}
 12156  	// match: (MOVHstoreidx2 ptr idx (MOVHreg x) mem)
 12157  	// result: (MOVHstoreidx2 ptr idx x mem)
 12158  	for {
 12159  		ptr := v_0
 12160  		idx := v_1
 12161  		if v_2.Op != OpARM64MOVHreg {
 12162  			break
 12163  		}
 12164  		x := v_2.Args[0]
 12165  		mem := v_3
 12166  		v.reset(OpARM64MOVHstoreidx2)
 12167  		v.AddArg4(ptr, idx, x, mem)
 12168  		return true
 12169  	}
 12170  	// match: (MOVHstoreidx2 ptr idx (MOVHUreg x) mem)
 12171  	// result: (MOVHstoreidx2 ptr idx x mem)
 12172  	for {
 12173  		ptr := v_0
 12174  		idx := v_1
 12175  		if v_2.Op != OpARM64MOVHUreg {
 12176  			break
 12177  		}
 12178  		x := v_2.Args[0]
 12179  		mem := v_3
 12180  		v.reset(OpARM64MOVHstoreidx2)
 12181  		v.AddArg4(ptr, idx, x, mem)
 12182  		return true
 12183  	}
 12184  	// match: (MOVHstoreidx2 ptr idx (MOVWreg x) mem)
 12185  	// result: (MOVHstoreidx2 ptr idx x mem)
 12186  	for {
 12187  		ptr := v_0
 12188  		idx := v_1
 12189  		if v_2.Op != OpARM64MOVWreg {
 12190  			break
 12191  		}
 12192  		x := v_2.Args[0]
 12193  		mem := v_3
 12194  		v.reset(OpARM64MOVHstoreidx2)
 12195  		v.AddArg4(ptr, idx, x, mem)
 12196  		return true
 12197  	}
 12198  	// match: (MOVHstoreidx2 ptr idx (MOVWUreg x) mem)
 12199  	// result: (MOVHstoreidx2 ptr idx x mem)
 12200  	for {
 12201  		ptr := v_0
 12202  		idx := v_1
 12203  		if v_2.Op != OpARM64MOVWUreg {
 12204  			break
 12205  		}
 12206  		x := v_2.Args[0]
 12207  		mem := v_3
 12208  		v.reset(OpARM64MOVHstoreidx2)
 12209  		v.AddArg4(ptr, idx, x, mem)
 12210  		return true
 12211  	}
 12212  	return false
 12213  }
 12214  func rewriteValueARM64_OpARM64MOVWUload(v *Value) bool {
 12215  	v_1 := v.Args[1]
 12216  	v_0 := v.Args[0]
 12217  	b := v.Block
 12218  	config := b.Func.Config
 12219  	// match: (MOVWUload [off] {sym} ptr (FMOVSstore [off] {sym} ptr val _))
 12220  	// result: (FMOVSfpgp val)
 12221  	for {
 12222  		off := auxIntToInt32(v.AuxInt)
 12223  		sym := auxToSym(v.Aux)
 12224  		ptr := v_0
 12225  		if v_1.Op != OpARM64FMOVSstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
 12226  			break
 12227  		}
 12228  		val := v_1.Args[1]
 12229  		if ptr != v_1.Args[0] {
 12230  			break
 12231  		}
 12232  		v.reset(OpARM64FMOVSfpgp)
 12233  		v.AddArg(val)
 12234  		return true
 12235  	}
 12236  	// match: (MOVWUload [off1] {sym} (ADDconst [off2] ptr) mem)
 12237  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 12238  	// result: (MOVWUload [off1+int32(off2)] {sym} ptr mem)
 12239  	for {
 12240  		off1 := auxIntToInt32(v.AuxInt)
 12241  		sym := auxToSym(v.Aux)
 12242  		if v_0.Op != OpARM64ADDconst {
 12243  			break
 12244  		}
 12245  		off2 := auxIntToInt64(v_0.AuxInt)
 12246  		ptr := v_0.Args[0]
 12247  		mem := v_1
 12248  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 12249  			break
 12250  		}
 12251  		v.reset(OpARM64MOVWUload)
 12252  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 12253  		v.Aux = symToAux(sym)
 12254  		v.AddArg2(ptr, mem)
 12255  		return true
 12256  	}
 12257  	// match: (MOVWUload [off] {sym} (ADD ptr idx) mem)
 12258  	// cond: off == 0 && sym == nil
 12259  	// result: (MOVWUloadidx ptr idx mem)
 12260  	for {
 12261  		off := auxIntToInt32(v.AuxInt)
 12262  		sym := auxToSym(v.Aux)
 12263  		if v_0.Op != OpARM64ADD {
 12264  			break
 12265  		}
 12266  		idx := v_0.Args[1]
 12267  		ptr := v_0.Args[0]
 12268  		mem := v_1
 12269  		if !(off == 0 && sym == nil) {
 12270  			break
 12271  		}
 12272  		v.reset(OpARM64MOVWUloadidx)
 12273  		v.AddArg3(ptr, idx, mem)
 12274  		return true
 12275  	}
 12276  	// match: (MOVWUload [off] {sym} (ADDshiftLL [2] ptr idx) mem)
 12277  	// cond: off == 0 && sym == nil
 12278  	// result: (MOVWUloadidx4 ptr idx mem)
 12279  	for {
 12280  		off := auxIntToInt32(v.AuxInt)
 12281  		sym := auxToSym(v.Aux)
 12282  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
 12283  			break
 12284  		}
 12285  		idx := v_0.Args[1]
 12286  		ptr := v_0.Args[0]
 12287  		mem := v_1
 12288  		if !(off == 0 && sym == nil) {
 12289  			break
 12290  		}
 12291  		v.reset(OpARM64MOVWUloadidx4)
 12292  		v.AddArg3(ptr, idx, mem)
 12293  		return true
 12294  	}
 12295  	// match: (MOVWUload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 12296  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 12297  	// result: (MOVWUload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 12298  	for {
 12299  		off1 := auxIntToInt32(v.AuxInt)
 12300  		sym1 := auxToSym(v.Aux)
 12301  		if v_0.Op != OpARM64MOVDaddr {
 12302  			break
 12303  		}
 12304  		off2 := auxIntToInt32(v_0.AuxInt)
 12305  		sym2 := auxToSym(v_0.Aux)
 12306  		ptr := v_0.Args[0]
 12307  		mem := v_1
 12308  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 12309  			break
 12310  		}
 12311  		v.reset(OpARM64MOVWUload)
 12312  		v.AuxInt = int32ToAuxInt(off1 + off2)
 12313  		v.Aux = symToAux(mergeSym(sym1, sym2))
 12314  		v.AddArg2(ptr, mem)
 12315  		return true
 12316  	}
 12317  	// match: (MOVWUload [off] {sym} (SB) _)
 12318  	// cond: symIsRO(sym)
 12319  	// result: (MOVDconst [int64(read32(sym, int64(off), config.ctxt.Arch.ByteOrder))])
 12320  	for {
 12321  		off := auxIntToInt32(v.AuxInt)
 12322  		sym := auxToSym(v.Aux)
 12323  		if v_0.Op != OpSB || !(symIsRO(sym)) {
 12324  			break
 12325  		}
 12326  		v.reset(OpARM64MOVDconst)
 12327  		v.AuxInt = int64ToAuxInt(int64(read32(sym, int64(off), config.ctxt.Arch.ByteOrder)))
 12328  		return true
 12329  	}
 12330  	return false
 12331  }
 12332  func rewriteValueARM64_OpARM64MOVWUloadidx(v *Value) bool {
 12333  	v_2 := v.Args[2]
 12334  	v_1 := v.Args[1]
 12335  	v_0 := v.Args[0]
 12336  	// match: (MOVWUloadidx ptr (MOVDconst [c]) mem)
 12337  	// cond: is32Bit(c)
 12338  	// result: (MOVWUload [int32(c)] ptr mem)
 12339  	for {
 12340  		ptr := v_0
 12341  		if v_1.Op != OpARM64MOVDconst {
 12342  			break
 12343  		}
 12344  		c := auxIntToInt64(v_1.AuxInt)
 12345  		mem := v_2
 12346  		if !(is32Bit(c)) {
 12347  			break
 12348  		}
 12349  		v.reset(OpARM64MOVWUload)
 12350  		v.AuxInt = int32ToAuxInt(int32(c))
 12351  		v.AddArg2(ptr, mem)
 12352  		return true
 12353  	}
 12354  	// match: (MOVWUloadidx (MOVDconst [c]) ptr mem)
 12355  	// cond: is32Bit(c)
 12356  	// result: (MOVWUload [int32(c)] ptr mem)
 12357  	for {
 12358  		if v_0.Op != OpARM64MOVDconst {
 12359  			break
 12360  		}
 12361  		c := auxIntToInt64(v_0.AuxInt)
 12362  		ptr := v_1
 12363  		mem := v_2
 12364  		if !(is32Bit(c)) {
 12365  			break
 12366  		}
 12367  		v.reset(OpARM64MOVWUload)
 12368  		v.AuxInt = int32ToAuxInt(int32(c))
 12369  		v.AddArg2(ptr, mem)
 12370  		return true
 12371  	}
 12372  	// match: (MOVWUloadidx ptr (SLLconst [2] idx) mem)
 12373  	// result: (MOVWUloadidx4 ptr idx mem)
 12374  	for {
 12375  		ptr := v_0
 12376  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
 12377  			break
 12378  		}
 12379  		idx := v_1.Args[0]
 12380  		mem := v_2
 12381  		v.reset(OpARM64MOVWUloadidx4)
 12382  		v.AddArg3(ptr, idx, mem)
 12383  		return true
 12384  	}
 12385  	// match: (MOVWUloadidx (SLLconst [2] idx) ptr mem)
 12386  	// result: (MOVWUloadidx4 ptr idx mem)
 12387  	for {
 12388  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
 12389  			break
 12390  		}
 12391  		idx := v_0.Args[0]
 12392  		ptr := v_1
 12393  		mem := v_2
 12394  		v.reset(OpARM64MOVWUloadidx4)
 12395  		v.AddArg3(ptr, idx, mem)
 12396  		return true
 12397  	}
 12398  	return false
 12399  }
 12400  func rewriteValueARM64_OpARM64MOVWUloadidx4(v *Value) bool {
 12401  	v_2 := v.Args[2]
 12402  	v_1 := v.Args[1]
 12403  	v_0 := v.Args[0]
 12404  	// match: (MOVWUloadidx4 ptr (MOVDconst [c]) mem)
 12405  	// cond: is32Bit(c<<2)
 12406  	// result: (MOVWUload [int32(c)<<2] ptr mem)
 12407  	for {
 12408  		ptr := v_0
 12409  		if v_1.Op != OpARM64MOVDconst {
 12410  			break
 12411  		}
 12412  		c := auxIntToInt64(v_1.AuxInt)
 12413  		mem := v_2
 12414  		if !(is32Bit(c << 2)) {
 12415  			break
 12416  		}
 12417  		v.reset(OpARM64MOVWUload)
 12418  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
 12419  		v.AddArg2(ptr, mem)
 12420  		return true
 12421  	}
 12422  	return false
 12423  }
 12424  func rewriteValueARM64_OpARM64MOVWUreg(v *Value) bool {
 12425  	v_0 := v.Args[0]
 12426  	// match: (MOVWUreg (ANDconst [c] x))
 12427  	// result: (ANDconst [c&(1<<32-1)] x)
 12428  	for {
 12429  		if v_0.Op != OpARM64ANDconst {
 12430  			break
 12431  		}
 12432  		c := auxIntToInt64(v_0.AuxInt)
 12433  		x := v_0.Args[0]
 12434  		v.reset(OpARM64ANDconst)
 12435  		v.AuxInt = int64ToAuxInt(c & (1<<32 - 1))
 12436  		v.AddArg(x)
 12437  		return true
 12438  	}
 12439  	// match: (MOVWUreg (MOVDconst [c]))
 12440  	// result: (MOVDconst [int64(uint32(c))])
 12441  	for {
 12442  		if v_0.Op != OpARM64MOVDconst {
 12443  			break
 12444  		}
 12445  		c := auxIntToInt64(v_0.AuxInt)
 12446  		v.reset(OpARM64MOVDconst)
 12447  		v.AuxInt = int64ToAuxInt(int64(uint32(c)))
 12448  		return true
 12449  	}
 12450  	// match: (MOVWUreg x)
 12451  	// cond: v.Type.Size() <= 4
 12452  	// result: x
 12453  	for {
 12454  		x := v_0
 12455  		if !(v.Type.Size() <= 4) {
 12456  			break
 12457  		}
 12458  		v.copyOf(x)
 12459  		return true
 12460  	}
 12461  	// match: (MOVWUreg (SLLconst [lc] x))
 12462  	// cond: lc >= 32
 12463  	// result: (MOVDconst [0])
 12464  	for {
 12465  		if v_0.Op != OpARM64SLLconst {
 12466  			break
 12467  		}
 12468  		lc := auxIntToInt64(v_0.AuxInt)
 12469  		if !(lc >= 32) {
 12470  			break
 12471  		}
 12472  		v.reset(OpARM64MOVDconst)
 12473  		v.AuxInt = int64ToAuxInt(0)
 12474  		return true
 12475  	}
 12476  	// match: (MOVWUreg (SLLconst [lc] x))
 12477  	// cond: lc < 32
 12478  	// result: (UBFIZ [armBFAuxInt(lc, 32-lc)] x)
 12479  	for {
 12480  		if v_0.Op != OpARM64SLLconst {
 12481  			break
 12482  		}
 12483  		lc := auxIntToInt64(v_0.AuxInt)
 12484  		x := v_0.Args[0]
 12485  		if !(lc < 32) {
 12486  			break
 12487  		}
 12488  		v.reset(OpARM64UBFIZ)
 12489  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 32-lc))
 12490  		v.AddArg(x)
 12491  		return true
 12492  	}
 12493  	// match: (MOVWUreg (SRLconst [rc] x))
 12494  	// cond: rc < 32
 12495  	// result: (UBFX [armBFAuxInt(rc, 32)] x)
 12496  	for {
 12497  		if v_0.Op != OpARM64SRLconst {
 12498  			break
 12499  		}
 12500  		rc := auxIntToInt64(v_0.AuxInt)
 12501  		x := v_0.Args[0]
 12502  		if !(rc < 32) {
 12503  			break
 12504  		}
 12505  		v.reset(OpARM64UBFX)
 12506  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 32))
 12507  		v.AddArg(x)
 12508  		return true
 12509  	}
 12510  	// match: (MOVWUreg (UBFX [bfc] x))
 12511  	// cond: bfc.width() <= 32
 12512  	// result: (UBFX [bfc] x)
 12513  	for {
 12514  		if v_0.Op != OpARM64UBFX {
 12515  			break
 12516  		}
 12517  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 12518  		x := v_0.Args[0]
 12519  		if !(bfc.width() <= 32) {
 12520  			break
 12521  		}
 12522  		v.reset(OpARM64UBFX)
 12523  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 12524  		v.AddArg(x)
 12525  		return true
 12526  	}
 12527  	return false
 12528  }
 12529  func rewriteValueARM64_OpARM64MOVWload(v *Value) bool {
 12530  	v_1 := v.Args[1]
 12531  	v_0 := v.Args[0]
 12532  	b := v.Block
 12533  	config := b.Func.Config
 12534  	// match: (MOVWload [off1] {sym} (ADDconst [off2] ptr) mem)
 12535  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 12536  	// result: (MOVWload [off1+int32(off2)] {sym} ptr mem)
 12537  	for {
 12538  		off1 := auxIntToInt32(v.AuxInt)
 12539  		sym := auxToSym(v.Aux)
 12540  		if v_0.Op != OpARM64ADDconst {
 12541  			break
 12542  		}
 12543  		off2 := auxIntToInt64(v_0.AuxInt)
 12544  		ptr := v_0.Args[0]
 12545  		mem := v_1
 12546  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 12547  			break
 12548  		}
 12549  		v.reset(OpARM64MOVWload)
 12550  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 12551  		v.Aux = symToAux(sym)
 12552  		v.AddArg2(ptr, mem)
 12553  		return true
 12554  	}
 12555  	// match: (MOVWload [off] {sym} (ADD ptr idx) mem)
 12556  	// cond: off == 0 && sym == nil
 12557  	// result: (MOVWloadidx ptr idx mem)
 12558  	for {
 12559  		off := auxIntToInt32(v.AuxInt)
 12560  		sym := auxToSym(v.Aux)
 12561  		if v_0.Op != OpARM64ADD {
 12562  			break
 12563  		}
 12564  		idx := v_0.Args[1]
 12565  		ptr := v_0.Args[0]
 12566  		mem := v_1
 12567  		if !(off == 0 && sym == nil) {
 12568  			break
 12569  		}
 12570  		v.reset(OpARM64MOVWloadidx)
 12571  		v.AddArg3(ptr, idx, mem)
 12572  		return true
 12573  	}
 12574  	// match: (MOVWload [off] {sym} (ADDshiftLL [2] ptr idx) mem)
 12575  	// cond: off == 0 && sym == nil
 12576  	// result: (MOVWloadidx4 ptr idx mem)
 12577  	for {
 12578  		off := auxIntToInt32(v.AuxInt)
 12579  		sym := auxToSym(v.Aux)
 12580  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
 12581  			break
 12582  		}
 12583  		idx := v_0.Args[1]
 12584  		ptr := v_0.Args[0]
 12585  		mem := v_1
 12586  		if !(off == 0 && sym == nil) {
 12587  			break
 12588  		}
 12589  		v.reset(OpARM64MOVWloadidx4)
 12590  		v.AddArg3(ptr, idx, mem)
 12591  		return true
 12592  	}
 12593  	// match: (MOVWload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 12594  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 12595  	// result: (MOVWload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 12596  	for {
 12597  		off1 := auxIntToInt32(v.AuxInt)
 12598  		sym1 := auxToSym(v.Aux)
 12599  		if v_0.Op != OpARM64MOVDaddr {
 12600  			break
 12601  		}
 12602  		off2 := auxIntToInt32(v_0.AuxInt)
 12603  		sym2 := auxToSym(v_0.Aux)
 12604  		ptr := v_0.Args[0]
 12605  		mem := v_1
 12606  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 12607  			break
 12608  		}
 12609  		v.reset(OpARM64MOVWload)
 12610  		v.AuxInt = int32ToAuxInt(off1 + off2)
 12611  		v.Aux = symToAux(mergeSym(sym1, sym2))
 12612  		v.AddArg2(ptr, mem)
 12613  		return true
 12614  	}
 12615  	// match: (MOVWload [off] {sym} (SB) _)
 12616  	// cond: symIsRO(sym)
 12617  	// result: (MOVDconst [int64(int32(read32(sym, int64(off), config.ctxt.Arch.ByteOrder)))])
 12618  	for {
 12619  		off := auxIntToInt32(v.AuxInt)
 12620  		sym := auxToSym(v.Aux)
 12621  		if v_0.Op != OpSB || !(symIsRO(sym)) {
 12622  			break
 12623  		}
 12624  		v.reset(OpARM64MOVDconst)
 12625  		v.AuxInt = int64ToAuxInt(int64(int32(read32(sym, int64(off), config.ctxt.Arch.ByteOrder))))
 12626  		return true
 12627  	}
 12628  	return false
 12629  }
 12630  func rewriteValueARM64_OpARM64MOVWloadidx(v *Value) bool {
 12631  	v_2 := v.Args[2]
 12632  	v_1 := v.Args[1]
 12633  	v_0 := v.Args[0]
 12634  	// match: (MOVWloadidx ptr (MOVDconst [c]) mem)
 12635  	// cond: is32Bit(c)
 12636  	// result: (MOVWload [int32(c)] ptr mem)
 12637  	for {
 12638  		ptr := v_0
 12639  		if v_1.Op != OpARM64MOVDconst {
 12640  			break
 12641  		}
 12642  		c := auxIntToInt64(v_1.AuxInt)
 12643  		mem := v_2
 12644  		if !(is32Bit(c)) {
 12645  			break
 12646  		}
 12647  		v.reset(OpARM64MOVWload)
 12648  		v.AuxInt = int32ToAuxInt(int32(c))
 12649  		v.AddArg2(ptr, mem)
 12650  		return true
 12651  	}
 12652  	// match: (MOVWloadidx (MOVDconst [c]) ptr mem)
 12653  	// cond: is32Bit(c)
 12654  	// result: (MOVWload [int32(c)] ptr mem)
 12655  	for {
 12656  		if v_0.Op != OpARM64MOVDconst {
 12657  			break
 12658  		}
 12659  		c := auxIntToInt64(v_0.AuxInt)
 12660  		ptr := v_1
 12661  		mem := v_2
 12662  		if !(is32Bit(c)) {
 12663  			break
 12664  		}
 12665  		v.reset(OpARM64MOVWload)
 12666  		v.AuxInt = int32ToAuxInt(int32(c))
 12667  		v.AddArg2(ptr, mem)
 12668  		return true
 12669  	}
 12670  	// match: (MOVWloadidx ptr (SLLconst [2] idx) mem)
 12671  	// result: (MOVWloadidx4 ptr idx mem)
 12672  	for {
 12673  		ptr := v_0
 12674  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
 12675  			break
 12676  		}
 12677  		idx := v_1.Args[0]
 12678  		mem := v_2
 12679  		v.reset(OpARM64MOVWloadidx4)
 12680  		v.AddArg3(ptr, idx, mem)
 12681  		return true
 12682  	}
 12683  	// match: (MOVWloadidx (SLLconst [2] idx) ptr mem)
 12684  	// result: (MOVWloadidx4 ptr idx mem)
 12685  	for {
 12686  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
 12687  			break
 12688  		}
 12689  		idx := v_0.Args[0]
 12690  		ptr := v_1
 12691  		mem := v_2
 12692  		v.reset(OpARM64MOVWloadidx4)
 12693  		v.AddArg3(ptr, idx, mem)
 12694  		return true
 12695  	}
 12696  	return false
 12697  }
 12698  func rewriteValueARM64_OpARM64MOVWloadidx4(v *Value) bool {
 12699  	v_2 := v.Args[2]
 12700  	v_1 := v.Args[1]
 12701  	v_0 := v.Args[0]
 12702  	// match: (MOVWloadidx4 ptr (MOVDconst [c]) mem)
 12703  	// cond: is32Bit(c<<2)
 12704  	// result: (MOVWload [int32(c)<<2] ptr mem)
 12705  	for {
 12706  		ptr := v_0
 12707  		if v_1.Op != OpARM64MOVDconst {
 12708  			break
 12709  		}
 12710  		c := auxIntToInt64(v_1.AuxInt)
 12711  		mem := v_2
 12712  		if !(is32Bit(c << 2)) {
 12713  			break
 12714  		}
 12715  		v.reset(OpARM64MOVWload)
 12716  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
 12717  		v.AddArg2(ptr, mem)
 12718  		return true
 12719  	}
 12720  	return false
 12721  }
 12722  func rewriteValueARM64_OpARM64MOVWreg(v *Value) bool {
 12723  	v_0 := v.Args[0]
 12724  	// match: (MOVWreg (MOVDconst [c]))
 12725  	// result: (MOVDconst [int64(int32(c))])
 12726  	for {
 12727  		if v_0.Op != OpARM64MOVDconst {
 12728  			break
 12729  		}
 12730  		c := auxIntToInt64(v_0.AuxInt)
 12731  		v.reset(OpARM64MOVDconst)
 12732  		v.AuxInt = int64ToAuxInt(int64(int32(c)))
 12733  		return true
 12734  	}
 12735  	// match: (MOVWreg x)
 12736  	// cond: v.Type.Size() <= 4
 12737  	// result: x
 12738  	for {
 12739  		x := v_0
 12740  		if !(v.Type.Size() <= 4) {
 12741  			break
 12742  		}
 12743  		v.copyOf(x)
 12744  		return true
 12745  	}
 12746  	// match: (MOVWreg <t> (ANDconst x [c]))
 12747  	// cond: uint64(c) & uint64(0xffffffff80000000) == 0
 12748  	// result: (ANDconst <t> x [c])
 12749  	for {
 12750  		t := v.Type
 12751  		if v_0.Op != OpARM64ANDconst {
 12752  			break
 12753  		}
 12754  		c := auxIntToInt64(v_0.AuxInt)
 12755  		x := v_0.Args[0]
 12756  		if !(uint64(c)&uint64(0xffffffff80000000) == 0) {
 12757  			break
 12758  		}
 12759  		v.reset(OpARM64ANDconst)
 12760  		v.Type = t
 12761  		v.AuxInt = int64ToAuxInt(c)
 12762  		v.AddArg(x)
 12763  		return true
 12764  	}
 12765  	// match: (MOVWreg (SLLconst [lc] x))
 12766  	// cond: lc < 32
 12767  	// result: (SBFIZ [armBFAuxInt(lc, 32-lc)] x)
 12768  	for {
 12769  		if v_0.Op != OpARM64SLLconst {
 12770  			break
 12771  		}
 12772  		lc := auxIntToInt64(v_0.AuxInt)
 12773  		x := v_0.Args[0]
 12774  		if !(lc < 32) {
 12775  			break
 12776  		}
 12777  		v.reset(OpARM64SBFIZ)
 12778  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 32-lc))
 12779  		v.AddArg(x)
 12780  		return true
 12781  	}
 12782  	// match: (MOVWreg (SBFX [bfc] x))
 12783  	// cond: bfc.width() <= 32
 12784  	// result: (SBFX [bfc] x)
 12785  	for {
 12786  		if v_0.Op != OpARM64SBFX {
 12787  			break
 12788  		}
 12789  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 12790  		x := v_0.Args[0]
 12791  		if !(bfc.width() <= 32) {
 12792  			break
 12793  		}
 12794  		v.reset(OpARM64SBFX)
 12795  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 12796  		v.AddArg(x)
 12797  		return true
 12798  	}
 12799  	return false
 12800  }
 12801  func rewriteValueARM64_OpARM64MOVWstore(v *Value) bool {
 12802  	v_2 := v.Args[2]
 12803  	v_1 := v.Args[1]
 12804  	v_0 := v.Args[0]
 12805  	b := v.Block
 12806  	config := b.Func.Config
 12807  	// match: (MOVWstore [off] {sym} ptr (FMOVSfpgp val) mem)
 12808  	// result: (FMOVSstore [off] {sym} ptr val mem)
 12809  	for {
 12810  		off := auxIntToInt32(v.AuxInt)
 12811  		sym := auxToSym(v.Aux)
 12812  		ptr := v_0
 12813  		if v_1.Op != OpARM64FMOVSfpgp {
 12814  			break
 12815  		}
 12816  		val := v_1.Args[0]
 12817  		mem := v_2
 12818  		v.reset(OpARM64FMOVSstore)
 12819  		v.AuxInt = int32ToAuxInt(off)
 12820  		v.Aux = symToAux(sym)
 12821  		v.AddArg3(ptr, val, mem)
 12822  		return true
 12823  	}
 12824  	// match: (MOVWstore [off1] {sym} (ADDconst [off2] ptr) val mem)
 12825  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 12826  	// result: (MOVWstore [off1+int32(off2)] {sym} ptr val mem)
 12827  	for {
 12828  		off1 := auxIntToInt32(v.AuxInt)
 12829  		sym := auxToSym(v.Aux)
 12830  		if v_0.Op != OpARM64ADDconst {
 12831  			break
 12832  		}
 12833  		off2 := auxIntToInt64(v_0.AuxInt)
 12834  		ptr := v_0.Args[0]
 12835  		val := v_1
 12836  		mem := v_2
 12837  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 12838  			break
 12839  		}
 12840  		v.reset(OpARM64MOVWstore)
 12841  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 12842  		v.Aux = symToAux(sym)
 12843  		v.AddArg3(ptr, val, mem)
 12844  		return true
 12845  	}
 12846  	// match: (MOVWstore [off] {sym} (ADD ptr idx) val mem)
 12847  	// cond: off == 0 && sym == nil
 12848  	// result: (MOVWstoreidx ptr idx val mem)
 12849  	for {
 12850  		off := auxIntToInt32(v.AuxInt)
 12851  		sym := auxToSym(v.Aux)
 12852  		if v_0.Op != OpARM64ADD {
 12853  			break
 12854  		}
 12855  		idx := v_0.Args[1]
 12856  		ptr := v_0.Args[0]
 12857  		val := v_1
 12858  		mem := v_2
 12859  		if !(off == 0 && sym == nil) {
 12860  			break
 12861  		}
 12862  		v.reset(OpARM64MOVWstoreidx)
 12863  		v.AddArg4(ptr, idx, val, mem)
 12864  		return true
 12865  	}
 12866  	// match: (MOVWstore [off] {sym} (ADDshiftLL [2] ptr idx) val mem)
 12867  	// cond: off == 0 && sym == nil
 12868  	// result: (MOVWstoreidx4 ptr idx val mem)
 12869  	for {
 12870  		off := auxIntToInt32(v.AuxInt)
 12871  		sym := auxToSym(v.Aux)
 12872  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
 12873  			break
 12874  		}
 12875  		idx := v_0.Args[1]
 12876  		ptr := v_0.Args[0]
 12877  		val := v_1
 12878  		mem := v_2
 12879  		if !(off == 0 && sym == nil) {
 12880  			break
 12881  		}
 12882  		v.reset(OpARM64MOVWstoreidx4)
 12883  		v.AddArg4(ptr, idx, val, mem)
 12884  		return true
 12885  	}
 12886  	// match: (MOVWstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
 12887  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 12888  	// result: (MOVWstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
 12889  	for {
 12890  		off1 := auxIntToInt32(v.AuxInt)
 12891  		sym1 := auxToSym(v.Aux)
 12892  		if v_0.Op != OpARM64MOVDaddr {
 12893  			break
 12894  		}
 12895  		off2 := auxIntToInt32(v_0.AuxInt)
 12896  		sym2 := auxToSym(v_0.Aux)
 12897  		ptr := v_0.Args[0]
 12898  		val := v_1
 12899  		mem := v_2
 12900  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 12901  			break
 12902  		}
 12903  		v.reset(OpARM64MOVWstore)
 12904  		v.AuxInt = int32ToAuxInt(off1 + off2)
 12905  		v.Aux = symToAux(mergeSym(sym1, sym2))
 12906  		v.AddArg3(ptr, val, mem)
 12907  		return true
 12908  	}
 12909  	// match: (MOVWstore [off] {sym} ptr (MOVWreg x) mem)
 12910  	// result: (MOVWstore [off] {sym} ptr x mem)
 12911  	for {
 12912  		off := auxIntToInt32(v.AuxInt)
 12913  		sym := auxToSym(v.Aux)
 12914  		ptr := v_0
 12915  		if v_1.Op != OpARM64MOVWreg {
 12916  			break
 12917  		}
 12918  		x := v_1.Args[0]
 12919  		mem := v_2
 12920  		v.reset(OpARM64MOVWstore)
 12921  		v.AuxInt = int32ToAuxInt(off)
 12922  		v.Aux = symToAux(sym)
 12923  		v.AddArg3(ptr, x, mem)
 12924  		return true
 12925  	}
 12926  	// match: (MOVWstore [off] {sym} ptr (MOVWUreg x) mem)
 12927  	// result: (MOVWstore [off] {sym} ptr x mem)
 12928  	for {
 12929  		off := auxIntToInt32(v.AuxInt)
 12930  		sym := auxToSym(v.Aux)
 12931  		ptr := v_0
 12932  		if v_1.Op != OpARM64MOVWUreg {
 12933  			break
 12934  		}
 12935  		x := v_1.Args[0]
 12936  		mem := v_2
 12937  		v.reset(OpARM64MOVWstore)
 12938  		v.AuxInt = int32ToAuxInt(off)
 12939  		v.Aux = symToAux(sym)
 12940  		v.AddArg3(ptr, x, mem)
 12941  		return true
 12942  	}
 12943  	return false
 12944  }
 12945  func rewriteValueARM64_OpARM64MOVWstoreidx(v *Value) bool {
 12946  	v_3 := v.Args[3]
 12947  	v_2 := v.Args[2]
 12948  	v_1 := v.Args[1]
 12949  	v_0 := v.Args[0]
 12950  	// match: (MOVWstoreidx ptr (MOVDconst [c]) val mem)
 12951  	// cond: is32Bit(c)
 12952  	// result: (MOVWstore [int32(c)] ptr val mem)
 12953  	for {
 12954  		ptr := v_0
 12955  		if v_1.Op != OpARM64MOVDconst {
 12956  			break
 12957  		}
 12958  		c := auxIntToInt64(v_1.AuxInt)
 12959  		val := v_2
 12960  		mem := v_3
 12961  		if !(is32Bit(c)) {
 12962  			break
 12963  		}
 12964  		v.reset(OpARM64MOVWstore)
 12965  		v.AuxInt = int32ToAuxInt(int32(c))
 12966  		v.AddArg3(ptr, val, mem)
 12967  		return true
 12968  	}
 12969  	// match: (MOVWstoreidx (MOVDconst [c]) idx val mem)
 12970  	// cond: is32Bit(c)
 12971  	// result: (MOVWstore [int32(c)] idx val mem)
 12972  	for {
 12973  		if v_0.Op != OpARM64MOVDconst {
 12974  			break
 12975  		}
 12976  		c := auxIntToInt64(v_0.AuxInt)
 12977  		idx := v_1
 12978  		val := v_2
 12979  		mem := v_3
 12980  		if !(is32Bit(c)) {
 12981  			break
 12982  		}
 12983  		v.reset(OpARM64MOVWstore)
 12984  		v.AuxInt = int32ToAuxInt(int32(c))
 12985  		v.AddArg3(idx, val, mem)
 12986  		return true
 12987  	}
 12988  	// match: (MOVWstoreidx ptr (SLLconst [2] idx) val mem)
 12989  	// result: (MOVWstoreidx4 ptr idx val mem)
 12990  	for {
 12991  		ptr := v_0
 12992  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
 12993  			break
 12994  		}
 12995  		idx := v_1.Args[0]
 12996  		val := v_2
 12997  		mem := v_3
 12998  		v.reset(OpARM64MOVWstoreidx4)
 12999  		v.AddArg4(ptr, idx, val, mem)
 13000  		return true
 13001  	}
 13002  	// match: (MOVWstoreidx (SLLconst [2] idx) ptr val mem)
 13003  	// result: (MOVWstoreidx4 ptr idx val mem)
 13004  	for {
 13005  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
 13006  			break
 13007  		}
 13008  		idx := v_0.Args[0]
 13009  		ptr := v_1
 13010  		val := v_2
 13011  		mem := v_3
 13012  		v.reset(OpARM64MOVWstoreidx4)
 13013  		v.AddArg4(ptr, idx, val, mem)
 13014  		return true
 13015  	}
 13016  	// match: (MOVWstoreidx ptr idx (MOVWreg x) mem)
 13017  	// result: (MOVWstoreidx ptr idx x mem)
 13018  	for {
 13019  		ptr := v_0
 13020  		idx := v_1
 13021  		if v_2.Op != OpARM64MOVWreg {
 13022  			break
 13023  		}
 13024  		x := v_2.Args[0]
 13025  		mem := v_3
 13026  		v.reset(OpARM64MOVWstoreidx)
 13027  		v.AddArg4(ptr, idx, x, mem)
 13028  		return true
 13029  	}
 13030  	// match: (MOVWstoreidx ptr idx (MOVWUreg x) mem)
 13031  	// result: (MOVWstoreidx ptr idx x mem)
 13032  	for {
 13033  		ptr := v_0
 13034  		idx := v_1
 13035  		if v_2.Op != OpARM64MOVWUreg {
 13036  			break
 13037  		}
 13038  		x := v_2.Args[0]
 13039  		mem := v_3
 13040  		v.reset(OpARM64MOVWstoreidx)
 13041  		v.AddArg4(ptr, idx, x, mem)
 13042  		return true
 13043  	}
 13044  	return false
 13045  }
 13046  func rewriteValueARM64_OpARM64MOVWstoreidx4(v *Value) bool {
 13047  	v_3 := v.Args[3]
 13048  	v_2 := v.Args[2]
 13049  	v_1 := v.Args[1]
 13050  	v_0 := v.Args[0]
 13051  	// match: (MOVWstoreidx4 ptr (MOVDconst [c]) val mem)
 13052  	// cond: is32Bit(c<<2)
 13053  	// result: (MOVWstore [int32(c)<<2] ptr val mem)
 13054  	for {
 13055  		ptr := v_0
 13056  		if v_1.Op != OpARM64MOVDconst {
 13057  			break
 13058  		}
 13059  		c := auxIntToInt64(v_1.AuxInt)
 13060  		val := v_2
 13061  		mem := v_3
 13062  		if !(is32Bit(c << 2)) {
 13063  			break
 13064  		}
 13065  		v.reset(OpARM64MOVWstore)
 13066  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
 13067  		v.AddArg3(ptr, val, mem)
 13068  		return true
 13069  	}
 13070  	// match: (MOVWstoreidx4 ptr idx (MOVWreg x) mem)
 13071  	// result: (MOVWstoreidx4 ptr idx x mem)
 13072  	for {
 13073  		ptr := v_0
 13074  		idx := v_1
 13075  		if v_2.Op != OpARM64MOVWreg {
 13076  			break
 13077  		}
 13078  		x := v_2.Args[0]
 13079  		mem := v_3
 13080  		v.reset(OpARM64MOVWstoreidx4)
 13081  		v.AddArg4(ptr, idx, x, mem)
 13082  		return true
 13083  	}
 13084  	// match: (MOVWstoreidx4 ptr idx (MOVWUreg x) mem)
 13085  	// result: (MOVWstoreidx4 ptr idx x mem)
 13086  	for {
 13087  		ptr := v_0
 13088  		idx := v_1
 13089  		if v_2.Op != OpARM64MOVWUreg {
 13090  			break
 13091  		}
 13092  		x := v_2.Args[0]
 13093  		mem := v_3
 13094  		v.reset(OpARM64MOVWstoreidx4)
 13095  		v.AddArg4(ptr, idx, x, mem)
 13096  		return true
 13097  	}
 13098  	return false
 13099  }
 13100  func rewriteValueARM64_OpARM64MSUB(v *Value) bool {
 13101  	v_2 := v.Args[2]
 13102  	v_1 := v.Args[1]
 13103  	v_0 := v.Args[0]
 13104  	b := v.Block
 13105  	// match: (MSUB a x (MOVDconst [-1]))
 13106  	// result: (ADD a x)
 13107  	for {
 13108  		a := v_0
 13109  		x := v_1
 13110  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != -1 {
 13111  			break
 13112  		}
 13113  		v.reset(OpARM64ADD)
 13114  		v.AddArg2(a, x)
 13115  		return true
 13116  	}
 13117  	// match: (MSUB a _ (MOVDconst [0]))
 13118  	// result: a
 13119  	for {
 13120  		a := v_0
 13121  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 0 {
 13122  			break
 13123  		}
 13124  		v.copyOf(a)
 13125  		return true
 13126  	}
 13127  	// match: (MSUB a x (MOVDconst [1]))
 13128  	// result: (SUB a x)
 13129  	for {
 13130  		a := v_0
 13131  		x := v_1
 13132  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 1 {
 13133  			break
 13134  		}
 13135  		v.reset(OpARM64SUB)
 13136  		v.AddArg2(a, x)
 13137  		return true
 13138  	}
 13139  	// match: (MSUB a x (MOVDconst [c]))
 13140  	// cond: isPowerOfTwo(c)
 13141  	// result: (SUBshiftLL a x [log64(c)])
 13142  	for {
 13143  		a := v_0
 13144  		x := v_1
 13145  		if v_2.Op != OpARM64MOVDconst {
 13146  			break
 13147  		}
 13148  		c := auxIntToInt64(v_2.AuxInt)
 13149  		if !(isPowerOfTwo(c)) {
 13150  			break
 13151  		}
 13152  		v.reset(OpARM64SUBshiftLL)
 13153  		v.AuxInt = int64ToAuxInt(log64(c))
 13154  		v.AddArg2(a, x)
 13155  		return true
 13156  	}
 13157  	// match: (MSUB a x (MOVDconst [c]))
 13158  	// cond: isPowerOfTwo(c-1) && c>=3
 13159  	// result: (SUB a (ADDshiftLL <x.Type> x x [log64(c-1)]))
 13160  	for {
 13161  		a := v_0
 13162  		x := v_1
 13163  		if v_2.Op != OpARM64MOVDconst {
 13164  			break
 13165  		}
 13166  		c := auxIntToInt64(v_2.AuxInt)
 13167  		if !(isPowerOfTwo(c-1) && c >= 3) {
 13168  			break
 13169  		}
 13170  		v.reset(OpARM64SUB)
 13171  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13172  		v0.AuxInt = int64ToAuxInt(log64(c - 1))
 13173  		v0.AddArg2(x, x)
 13174  		v.AddArg2(a, v0)
 13175  		return true
 13176  	}
 13177  	// match: (MSUB a x (MOVDconst [c]))
 13178  	// cond: isPowerOfTwo(c+1) && c>=7
 13179  	// result: (ADD a (SUBshiftLL <x.Type> x x [log64(c+1)]))
 13180  	for {
 13181  		a := v_0
 13182  		x := v_1
 13183  		if v_2.Op != OpARM64MOVDconst {
 13184  			break
 13185  		}
 13186  		c := auxIntToInt64(v_2.AuxInt)
 13187  		if !(isPowerOfTwo(c+1) && c >= 7) {
 13188  			break
 13189  		}
 13190  		v.reset(OpARM64ADD)
 13191  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13192  		v0.AuxInt = int64ToAuxInt(log64(c + 1))
 13193  		v0.AddArg2(x, x)
 13194  		v.AddArg2(a, v0)
 13195  		return true
 13196  	}
 13197  	// match: (MSUB a x (MOVDconst [c]))
 13198  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
 13199  	// result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
 13200  	for {
 13201  		a := v_0
 13202  		x := v_1
 13203  		if v_2.Op != OpARM64MOVDconst {
 13204  			break
 13205  		}
 13206  		c := auxIntToInt64(v_2.AuxInt)
 13207  		if !(c%3 == 0 && isPowerOfTwo(c/3)) {
 13208  			break
 13209  		}
 13210  		v.reset(OpARM64ADDshiftLL)
 13211  		v.AuxInt = int64ToAuxInt(log64(c / 3))
 13212  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13213  		v0.AuxInt = int64ToAuxInt(2)
 13214  		v0.AddArg2(x, x)
 13215  		v.AddArg2(a, v0)
 13216  		return true
 13217  	}
 13218  	// match: (MSUB a x (MOVDconst [c]))
 13219  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
 13220  	// result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
 13221  	for {
 13222  		a := v_0
 13223  		x := v_1
 13224  		if v_2.Op != OpARM64MOVDconst {
 13225  			break
 13226  		}
 13227  		c := auxIntToInt64(v_2.AuxInt)
 13228  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
 13229  			break
 13230  		}
 13231  		v.reset(OpARM64SUBshiftLL)
 13232  		v.AuxInt = int64ToAuxInt(log64(c / 5))
 13233  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13234  		v0.AuxInt = int64ToAuxInt(2)
 13235  		v0.AddArg2(x, x)
 13236  		v.AddArg2(a, v0)
 13237  		return true
 13238  	}
 13239  	// match: (MSUB a x (MOVDconst [c]))
 13240  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
 13241  	// result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
 13242  	for {
 13243  		a := v_0
 13244  		x := v_1
 13245  		if v_2.Op != OpARM64MOVDconst {
 13246  			break
 13247  		}
 13248  		c := auxIntToInt64(v_2.AuxInt)
 13249  		if !(c%7 == 0 && isPowerOfTwo(c/7)) {
 13250  			break
 13251  		}
 13252  		v.reset(OpARM64ADDshiftLL)
 13253  		v.AuxInt = int64ToAuxInt(log64(c / 7))
 13254  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13255  		v0.AuxInt = int64ToAuxInt(3)
 13256  		v0.AddArg2(x, x)
 13257  		v.AddArg2(a, v0)
 13258  		return true
 13259  	}
 13260  	// match: (MSUB a x (MOVDconst [c]))
 13261  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
 13262  	// result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
 13263  	for {
 13264  		a := v_0
 13265  		x := v_1
 13266  		if v_2.Op != OpARM64MOVDconst {
 13267  			break
 13268  		}
 13269  		c := auxIntToInt64(v_2.AuxInt)
 13270  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
 13271  			break
 13272  		}
 13273  		v.reset(OpARM64SUBshiftLL)
 13274  		v.AuxInt = int64ToAuxInt(log64(c / 9))
 13275  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13276  		v0.AuxInt = int64ToAuxInt(3)
 13277  		v0.AddArg2(x, x)
 13278  		v.AddArg2(a, v0)
 13279  		return true
 13280  	}
 13281  	// match: (MSUB a (MOVDconst [-1]) x)
 13282  	// result: (ADD a x)
 13283  	for {
 13284  		a := v_0
 13285  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
 13286  			break
 13287  		}
 13288  		x := v_2
 13289  		v.reset(OpARM64ADD)
 13290  		v.AddArg2(a, x)
 13291  		return true
 13292  	}
 13293  	// match: (MSUB a (MOVDconst [0]) _)
 13294  	// result: a
 13295  	for {
 13296  		a := v_0
 13297  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
 13298  			break
 13299  		}
 13300  		v.copyOf(a)
 13301  		return true
 13302  	}
 13303  	// match: (MSUB a (MOVDconst [1]) x)
 13304  	// result: (SUB a x)
 13305  	for {
 13306  		a := v_0
 13307  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 13308  			break
 13309  		}
 13310  		x := v_2
 13311  		v.reset(OpARM64SUB)
 13312  		v.AddArg2(a, x)
 13313  		return true
 13314  	}
 13315  	// match: (MSUB a (MOVDconst [c]) x)
 13316  	// cond: isPowerOfTwo(c)
 13317  	// result: (SUBshiftLL a x [log64(c)])
 13318  	for {
 13319  		a := v_0
 13320  		if v_1.Op != OpARM64MOVDconst {
 13321  			break
 13322  		}
 13323  		c := auxIntToInt64(v_1.AuxInt)
 13324  		x := v_2
 13325  		if !(isPowerOfTwo(c)) {
 13326  			break
 13327  		}
 13328  		v.reset(OpARM64SUBshiftLL)
 13329  		v.AuxInt = int64ToAuxInt(log64(c))
 13330  		v.AddArg2(a, x)
 13331  		return true
 13332  	}
 13333  	// match: (MSUB a (MOVDconst [c]) x)
 13334  	// cond: isPowerOfTwo(c-1) && c>=3
 13335  	// result: (SUB a (ADDshiftLL <x.Type> x x [log64(c-1)]))
 13336  	for {
 13337  		a := v_0
 13338  		if v_1.Op != OpARM64MOVDconst {
 13339  			break
 13340  		}
 13341  		c := auxIntToInt64(v_1.AuxInt)
 13342  		x := v_2
 13343  		if !(isPowerOfTwo(c-1) && c >= 3) {
 13344  			break
 13345  		}
 13346  		v.reset(OpARM64SUB)
 13347  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13348  		v0.AuxInt = int64ToAuxInt(log64(c - 1))
 13349  		v0.AddArg2(x, x)
 13350  		v.AddArg2(a, v0)
 13351  		return true
 13352  	}
 13353  	// match: (MSUB a (MOVDconst [c]) x)
 13354  	// cond: isPowerOfTwo(c+1) && c>=7
 13355  	// result: (ADD a (SUBshiftLL <x.Type> x x [log64(c+1)]))
 13356  	for {
 13357  		a := v_0
 13358  		if v_1.Op != OpARM64MOVDconst {
 13359  			break
 13360  		}
 13361  		c := auxIntToInt64(v_1.AuxInt)
 13362  		x := v_2
 13363  		if !(isPowerOfTwo(c+1) && c >= 7) {
 13364  			break
 13365  		}
 13366  		v.reset(OpARM64ADD)
 13367  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13368  		v0.AuxInt = int64ToAuxInt(log64(c + 1))
 13369  		v0.AddArg2(x, x)
 13370  		v.AddArg2(a, v0)
 13371  		return true
 13372  	}
 13373  	// match: (MSUB a (MOVDconst [c]) x)
 13374  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
 13375  	// result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
 13376  	for {
 13377  		a := v_0
 13378  		if v_1.Op != OpARM64MOVDconst {
 13379  			break
 13380  		}
 13381  		c := auxIntToInt64(v_1.AuxInt)
 13382  		x := v_2
 13383  		if !(c%3 == 0 && isPowerOfTwo(c/3)) {
 13384  			break
 13385  		}
 13386  		v.reset(OpARM64ADDshiftLL)
 13387  		v.AuxInt = int64ToAuxInt(log64(c / 3))
 13388  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13389  		v0.AuxInt = int64ToAuxInt(2)
 13390  		v0.AddArg2(x, x)
 13391  		v.AddArg2(a, v0)
 13392  		return true
 13393  	}
 13394  	// match: (MSUB a (MOVDconst [c]) x)
 13395  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
 13396  	// result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
 13397  	for {
 13398  		a := v_0
 13399  		if v_1.Op != OpARM64MOVDconst {
 13400  			break
 13401  		}
 13402  		c := auxIntToInt64(v_1.AuxInt)
 13403  		x := v_2
 13404  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
 13405  			break
 13406  		}
 13407  		v.reset(OpARM64SUBshiftLL)
 13408  		v.AuxInt = int64ToAuxInt(log64(c / 5))
 13409  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13410  		v0.AuxInt = int64ToAuxInt(2)
 13411  		v0.AddArg2(x, x)
 13412  		v.AddArg2(a, v0)
 13413  		return true
 13414  	}
 13415  	// match: (MSUB a (MOVDconst [c]) x)
 13416  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
 13417  	// result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
 13418  	for {
 13419  		a := v_0
 13420  		if v_1.Op != OpARM64MOVDconst {
 13421  			break
 13422  		}
 13423  		c := auxIntToInt64(v_1.AuxInt)
 13424  		x := v_2
 13425  		if !(c%7 == 0 && isPowerOfTwo(c/7)) {
 13426  			break
 13427  		}
 13428  		v.reset(OpARM64ADDshiftLL)
 13429  		v.AuxInt = int64ToAuxInt(log64(c / 7))
 13430  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13431  		v0.AuxInt = int64ToAuxInt(3)
 13432  		v0.AddArg2(x, x)
 13433  		v.AddArg2(a, v0)
 13434  		return true
 13435  	}
 13436  	// match: (MSUB a (MOVDconst [c]) x)
 13437  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
 13438  	// result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
 13439  	for {
 13440  		a := v_0
 13441  		if v_1.Op != OpARM64MOVDconst {
 13442  			break
 13443  		}
 13444  		c := auxIntToInt64(v_1.AuxInt)
 13445  		x := v_2
 13446  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
 13447  			break
 13448  		}
 13449  		v.reset(OpARM64SUBshiftLL)
 13450  		v.AuxInt = int64ToAuxInt(log64(c / 9))
 13451  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13452  		v0.AuxInt = int64ToAuxInt(3)
 13453  		v0.AddArg2(x, x)
 13454  		v.AddArg2(a, v0)
 13455  		return true
 13456  	}
 13457  	// match: (MSUB (MOVDconst [c]) x y)
 13458  	// result: (ADDconst [c] (MNEG <x.Type> x y))
 13459  	for {
 13460  		if v_0.Op != OpARM64MOVDconst {
 13461  			break
 13462  		}
 13463  		c := auxIntToInt64(v_0.AuxInt)
 13464  		x := v_1
 13465  		y := v_2
 13466  		v.reset(OpARM64ADDconst)
 13467  		v.AuxInt = int64ToAuxInt(c)
 13468  		v0 := b.NewValue0(v.Pos, OpARM64MNEG, x.Type)
 13469  		v0.AddArg2(x, y)
 13470  		v.AddArg(v0)
 13471  		return true
 13472  	}
 13473  	// match: (MSUB a (MOVDconst [c]) (MOVDconst [d]))
 13474  	// result: (SUBconst [c*d] a)
 13475  	for {
 13476  		a := v_0
 13477  		if v_1.Op != OpARM64MOVDconst {
 13478  			break
 13479  		}
 13480  		c := auxIntToInt64(v_1.AuxInt)
 13481  		if v_2.Op != OpARM64MOVDconst {
 13482  			break
 13483  		}
 13484  		d := auxIntToInt64(v_2.AuxInt)
 13485  		v.reset(OpARM64SUBconst)
 13486  		v.AuxInt = int64ToAuxInt(c * d)
 13487  		v.AddArg(a)
 13488  		return true
 13489  	}
 13490  	return false
 13491  }
 13492  func rewriteValueARM64_OpARM64MSUBW(v *Value) bool {
 13493  	v_2 := v.Args[2]
 13494  	v_1 := v.Args[1]
 13495  	v_0 := v.Args[0]
 13496  	b := v.Block
 13497  	// match: (MSUBW a x (MOVDconst [c]))
 13498  	// cond: int32(c)==-1
 13499  	// result: (MOVWUreg (ADD <a.Type> a x))
 13500  	for {
 13501  		a := v_0
 13502  		x := v_1
 13503  		if v_2.Op != OpARM64MOVDconst {
 13504  			break
 13505  		}
 13506  		c := auxIntToInt64(v_2.AuxInt)
 13507  		if !(int32(c) == -1) {
 13508  			break
 13509  		}
 13510  		v.reset(OpARM64MOVWUreg)
 13511  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
 13512  		v0.AddArg2(a, x)
 13513  		v.AddArg(v0)
 13514  		return true
 13515  	}
 13516  	// match: (MSUBW a _ (MOVDconst [c]))
 13517  	// cond: int32(c)==0
 13518  	// result: (MOVWUreg a)
 13519  	for {
 13520  		a := v_0
 13521  		if v_2.Op != OpARM64MOVDconst {
 13522  			break
 13523  		}
 13524  		c := auxIntToInt64(v_2.AuxInt)
 13525  		if !(int32(c) == 0) {
 13526  			break
 13527  		}
 13528  		v.reset(OpARM64MOVWUreg)
 13529  		v.AddArg(a)
 13530  		return true
 13531  	}
 13532  	// match: (MSUBW a x (MOVDconst [c]))
 13533  	// cond: int32(c)==1
 13534  	// result: (MOVWUreg (SUB <a.Type> a x))
 13535  	for {
 13536  		a := v_0
 13537  		x := v_1
 13538  		if v_2.Op != OpARM64MOVDconst {
 13539  			break
 13540  		}
 13541  		c := auxIntToInt64(v_2.AuxInt)
 13542  		if !(int32(c) == 1) {
 13543  			break
 13544  		}
 13545  		v.reset(OpARM64MOVWUreg)
 13546  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
 13547  		v0.AddArg2(a, x)
 13548  		v.AddArg(v0)
 13549  		return true
 13550  	}
 13551  	// match: (MSUBW a x (MOVDconst [c]))
 13552  	// cond: isPowerOfTwo(c)
 13553  	// result: (MOVWUreg (SUBshiftLL <a.Type> a x [log64(c)]))
 13554  	for {
 13555  		a := v_0
 13556  		x := v_1
 13557  		if v_2.Op != OpARM64MOVDconst {
 13558  			break
 13559  		}
 13560  		c := auxIntToInt64(v_2.AuxInt)
 13561  		if !(isPowerOfTwo(c)) {
 13562  			break
 13563  		}
 13564  		v.reset(OpARM64MOVWUreg)
 13565  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 13566  		v0.AuxInt = int64ToAuxInt(log64(c))
 13567  		v0.AddArg2(a, x)
 13568  		v.AddArg(v0)
 13569  		return true
 13570  	}
 13571  	// match: (MSUBW a x (MOVDconst [c]))
 13572  	// cond: isPowerOfTwo(c-1) && int32(c)>=3
 13573  	// result: (MOVWUreg (SUB <a.Type> a (ADDshiftLL <x.Type> x x [log64(c-1)])))
 13574  	for {
 13575  		a := v_0
 13576  		x := v_1
 13577  		if v_2.Op != OpARM64MOVDconst {
 13578  			break
 13579  		}
 13580  		c := auxIntToInt64(v_2.AuxInt)
 13581  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
 13582  			break
 13583  		}
 13584  		v.reset(OpARM64MOVWUreg)
 13585  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
 13586  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13587  		v1.AuxInt = int64ToAuxInt(log64(c - 1))
 13588  		v1.AddArg2(x, x)
 13589  		v0.AddArg2(a, v1)
 13590  		v.AddArg(v0)
 13591  		return true
 13592  	}
 13593  	// match: (MSUBW a x (MOVDconst [c]))
 13594  	// cond: isPowerOfTwo(c+1) && int32(c)>=7
 13595  	// result: (MOVWUreg (ADD <a.Type> a (SUBshiftLL <x.Type> x x [log64(c+1)])))
 13596  	for {
 13597  		a := v_0
 13598  		x := v_1
 13599  		if v_2.Op != OpARM64MOVDconst {
 13600  			break
 13601  		}
 13602  		c := auxIntToInt64(v_2.AuxInt)
 13603  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
 13604  			break
 13605  		}
 13606  		v.reset(OpARM64MOVWUreg)
 13607  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
 13608  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13609  		v1.AuxInt = int64ToAuxInt(log64(c + 1))
 13610  		v1.AddArg2(x, x)
 13611  		v0.AddArg2(a, v1)
 13612  		v.AddArg(v0)
 13613  		return true
 13614  	}
 13615  	// match: (MSUBW a x (MOVDconst [c]))
 13616  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
 13617  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)]))
 13618  	for {
 13619  		a := v_0
 13620  		x := v_1
 13621  		if v_2.Op != OpARM64MOVDconst {
 13622  			break
 13623  		}
 13624  		c := auxIntToInt64(v_2.AuxInt)
 13625  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
 13626  			break
 13627  		}
 13628  		v.reset(OpARM64MOVWUreg)
 13629  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
 13630  		v0.AuxInt = int64ToAuxInt(log64(c / 3))
 13631  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13632  		v1.AuxInt = int64ToAuxInt(2)
 13633  		v1.AddArg2(x, x)
 13634  		v0.AddArg2(a, v1)
 13635  		v.AddArg(v0)
 13636  		return true
 13637  	}
 13638  	// match: (MSUBW a x (MOVDconst [c]))
 13639  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
 13640  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)]))
 13641  	for {
 13642  		a := v_0
 13643  		x := v_1
 13644  		if v_2.Op != OpARM64MOVDconst {
 13645  			break
 13646  		}
 13647  		c := auxIntToInt64(v_2.AuxInt)
 13648  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
 13649  			break
 13650  		}
 13651  		v.reset(OpARM64MOVWUreg)
 13652  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 13653  		v0.AuxInt = int64ToAuxInt(log64(c / 5))
 13654  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13655  		v1.AuxInt = int64ToAuxInt(2)
 13656  		v1.AddArg2(x, x)
 13657  		v0.AddArg2(a, v1)
 13658  		v.AddArg(v0)
 13659  		return true
 13660  	}
 13661  	// match: (MSUBW a x (MOVDconst [c]))
 13662  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
 13663  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)]))
 13664  	for {
 13665  		a := v_0
 13666  		x := v_1
 13667  		if v_2.Op != OpARM64MOVDconst {
 13668  			break
 13669  		}
 13670  		c := auxIntToInt64(v_2.AuxInt)
 13671  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
 13672  			break
 13673  		}
 13674  		v.reset(OpARM64MOVWUreg)
 13675  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
 13676  		v0.AuxInt = int64ToAuxInt(log64(c / 7))
 13677  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13678  		v1.AuxInt = int64ToAuxInt(3)
 13679  		v1.AddArg2(x, x)
 13680  		v0.AddArg2(a, v1)
 13681  		v.AddArg(v0)
 13682  		return true
 13683  	}
 13684  	// match: (MSUBW a x (MOVDconst [c]))
 13685  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
 13686  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)]))
 13687  	for {
 13688  		a := v_0
 13689  		x := v_1
 13690  		if v_2.Op != OpARM64MOVDconst {
 13691  			break
 13692  		}
 13693  		c := auxIntToInt64(v_2.AuxInt)
 13694  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
 13695  			break
 13696  		}
 13697  		v.reset(OpARM64MOVWUreg)
 13698  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 13699  		v0.AuxInt = int64ToAuxInt(log64(c / 9))
 13700  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13701  		v1.AuxInt = int64ToAuxInt(3)
 13702  		v1.AddArg2(x, x)
 13703  		v0.AddArg2(a, v1)
 13704  		v.AddArg(v0)
 13705  		return true
 13706  	}
 13707  	// match: (MSUBW a (MOVDconst [c]) x)
 13708  	// cond: int32(c)==-1
 13709  	// result: (MOVWUreg (ADD <a.Type> a x))
 13710  	for {
 13711  		a := v_0
 13712  		if v_1.Op != OpARM64MOVDconst {
 13713  			break
 13714  		}
 13715  		c := auxIntToInt64(v_1.AuxInt)
 13716  		x := v_2
 13717  		if !(int32(c) == -1) {
 13718  			break
 13719  		}
 13720  		v.reset(OpARM64MOVWUreg)
 13721  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
 13722  		v0.AddArg2(a, x)
 13723  		v.AddArg(v0)
 13724  		return true
 13725  	}
 13726  	// match: (MSUBW a (MOVDconst [c]) _)
 13727  	// cond: int32(c)==0
 13728  	// result: (MOVWUreg a)
 13729  	for {
 13730  		a := v_0
 13731  		if v_1.Op != OpARM64MOVDconst {
 13732  			break
 13733  		}
 13734  		c := auxIntToInt64(v_1.AuxInt)
 13735  		if !(int32(c) == 0) {
 13736  			break
 13737  		}
 13738  		v.reset(OpARM64MOVWUreg)
 13739  		v.AddArg(a)
 13740  		return true
 13741  	}
 13742  	// match: (MSUBW a (MOVDconst [c]) x)
 13743  	// cond: int32(c)==1
 13744  	// result: (MOVWUreg (SUB <a.Type> a x))
 13745  	for {
 13746  		a := v_0
 13747  		if v_1.Op != OpARM64MOVDconst {
 13748  			break
 13749  		}
 13750  		c := auxIntToInt64(v_1.AuxInt)
 13751  		x := v_2
 13752  		if !(int32(c) == 1) {
 13753  			break
 13754  		}
 13755  		v.reset(OpARM64MOVWUreg)
 13756  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
 13757  		v0.AddArg2(a, x)
 13758  		v.AddArg(v0)
 13759  		return true
 13760  	}
 13761  	// match: (MSUBW a (MOVDconst [c]) x)
 13762  	// cond: isPowerOfTwo(c)
 13763  	// result: (MOVWUreg (SUBshiftLL <a.Type> a x [log64(c)]))
 13764  	for {
 13765  		a := v_0
 13766  		if v_1.Op != OpARM64MOVDconst {
 13767  			break
 13768  		}
 13769  		c := auxIntToInt64(v_1.AuxInt)
 13770  		x := v_2
 13771  		if !(isPowerOfTwo(c)) {
 13772  			break
 13773  		}
 13774  		v.reset(OpARM64MOVWUreg)
 13775  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 13776  		v0.AuxInt = int64ToAuxInt(log64(c))
 13777  		v0.AddArg2(a, x)
 13778  		v.AddArg(v0)
 13779  		return true
 13780  	}
 13781  	// match: (MSUBW a (MOVDconst [c]) x)
 13782  	// cond: isPowerOfTwo(c-1) && int32(c)>=3
 13783  	// result: (MOVWUreg (SUB <a.Type> a (ADDshiftLL <x.Type> x x [log64(c-1)])))
 13784  	for {
 13785  		a := v_0
 13786  		if v_1.Op != OpARM64MOVDconst {
 13787  			break
 13788  		}
 13789  		c := auxIntToInt64(v_1.AuxInt)
 13790  		x := v_2
 13791  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
 13792  			break
 13793  		}
 13794  		v.reset(OpARM64MOVWUreg)
 13795  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
 13796  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13797  		v1.AuxInt = int64ToAuxInt(log64(c - 1))
 13798  		v1.AddArg2(x, x)
 13799  		v0.AddArg2(a, v1)
 13800  		v.AddArg(v0)
 13801  		return true
 13802  	}
 13803  	// match: (MSUBW a (MOVDconst [c]) x)
 13804  	// cond: isPowerOfTwo(c+1) && int32(c)>=7
 13805  	// result: (MOVWUreg (ADD <a.Type> a (SUBshiftLL <x.Type> x x [log64(c+1)])))
 13806  	for {
 13807  		a := v_0
 13808  		if v_1.Op != OpARM64MOVDconst {
 13809  			break
 13810  		}
 13811  		c := auxIntToInt64(v_1.AuxInt)
 13812  		x := v_2
 13813  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
 13814  			break
 13815  		}
 13816  		v.reset(OpARM64MOVWUreg)
 13817  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
 13818  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13819  		v1.AuxInt = int64ToAuxInt(log64(c + 1))
 13820  		v1.AddArg2(x, x)
 13821  		v0.AddArg2(a, v1)
 13822  		v.AddArg(v0)
 13823  		return true
 13824  	}
 13825  	// match: (MSUBW a (MOVDconst [c]) x)
 13826  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
 13827  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)]))
 13828  	for {
 13829  		a := v_0
 13830  		if v_1.Op != OpARM64MOVDconst {
 13831  			break
 13832  		}
 13833  		c := auxIntToInt64(v_1.AuxInt)
 13834  		x := v_2
 13835  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
 13836  			break
 13837  		}
 13838  		v.reset(OpARM64MOVWUreg)
 13839  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
 13840  		v0.AuxInt = int64ToAuxInt(log64(c / 3))
 13841  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13842  		v1.AuxInt = int64ToAuxInt(2)
 13843  		v1.AddArg2(x, x)
 13844  		v0.AddArg2(a, v1)
 13845  		v.AddArg(v0)
 13846  		return true
 13847  	}
 13848  	// match: (MSUBW a (MOVDconst [c]) x)
 13849  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
 13850  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)]))
 13851  	for {
 13852  		a := v_0
 13853  		if v_1.Op != OpARM64MOVDconst {
 13854  			break
 13855  		}
 13856  		c := auxIntToInt64(v_1.AuxInt)
 13857  		x := v_2
 13858  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
 13859  			break
 13860  		}
 13861  		v.reset(OpARM64MOVWUreg)
 13862  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 13863  		v0.AuxInt = int64ToAuxInt(log64(c / 5))
 13864  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13865  		v1.AuxInt = int64ToAuxInt(2)
 13866  		v1.AddArg2(x, x)
 13867  		v0.AddArg2(a, v1)
 13868  		v.AddArg(v0)
 13869  		return true
 13870  	}
 13871  	// match: (MSUBW a (MOVDconst [c]) x)
 13872  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
 13873  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)]))
 13874  	for {
 13875  		a := v_0
 13876  		if v_1.Op != OpARM64MOVDconst {
 13877  			break
 13878  		}
 13879  		c := auxIntToInt64(v_1.AuxInt)
 13880  		x := v_2
 13881  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
 13882  			break
 13883  		}
 13884  		v.reset(OpARM64MOVWUreg)
 13885  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
 13886  		v0.AuxInt = int64ToAuxInt(log64(c / 7))
 13887  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13888  		v1.AuxInt = int64ToAuxInt(3)
 13889  		v1.AddArg2(x, x)
 13890  		v0.AddArg2(a, v1)
 13891  		v.AddArg(v0)
 13892  		return true
 13893  	}
 13894  	// match: (MSUBW a (MOVDconst [c]) x)
 13895  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
 13896  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)]))
 13897  	for {
 13898  		a := v_0
 13899  		if v_1.Op != OpARM64MOVDconst {
 13900  			break
 13901  		}
 13902  		c := auxIntToInt64(v_1.AuxInt)
 13903  		x := v_2
 13904  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
 13905  			break
 13906  		}
 13907  		v.reset(OpARM64MOVWUreg)
 13908  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 13909  		v0.AuxInt = int64ToAuxInt(log64(c / 9))
 13910  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13911  		v1.AuxInt = int64ToAuxInt(3)
 13912  		v1.AddArg2(x, x)
 13913  		v0.AddArg2(a, v1)
 13914  		v.AddArg(v0)
 13915  		return true
 13916  	}
 13917  	// match: (MSUBW (MOVDconst [c]) x y)
 13918  	// result: (MOVWUreg (ADDconst <x.Type> [c] (MNEGW <x.Type> x y)))
 13919  	for {
 13920  		if v_0.Op != OpARM64MOVDconst {
 13921  			break
 13922  		}
 13923  		c := auxIntToInt64(v_0.AuxInt)
 13924  		x := v_1
 13925  		y := v_2
 13926  		v.reset(OpARM64MOVWUreg)
 13927  		v0 := b.NewValue0(v.Pos, OpARM64ADDconst, x.Type)
 13928  		v0.AuxInt = int64ToAuxInt(c)
 13929  		v1 := b.NewValue0(v.Pos, OpARM64MNEGW, x.Type)
 13930  		v1.AddArg2(x, y)
 13931  		v0.AddArg(v1)
 13932  		v.AddArg(v0)
 13933  		return true
 13934  	}
 13935  	// match: (MSUBW a (MOVDconst [c]) (MOVDconst [d]))
 13936  	// result: (MOVWUreg (SUBconst <a.Type> [c*d] a))
 13937  	for {
 13938  		a := v_0
 13939  		if v_1.Op != OpARM64MOVDconst {
 13940  			break
 13941  		}
 13942  		c := auxIntToInt64(v_1.AuxInt)
 13943  		if v_2.Op != OpARM64MOVDconst {
 13944  			break
 13945  		}
 13946  		d := auxIntToInt64(v_2.AuxInt)
 13947  		v.reset(OpARM64MOVWUreg)
 13948  		v0 := b.NewValue0(v.Pos, OpARM64SUBconst, a.Type)
 13949  		v0.AuxInt = int64ToAuxInt(c * d)
 13950  		v0.AddArg(a)
 13951  		v.AddArg(v0)
 13952  		return true
 13953  	}
 13954  	return false
 13955  }
 13956  func rewriteValueARM64_OpARM64MUL(v *Value) bool {
 13957  	v_1 := v.Args[1]
 13958  	v_0 := v.Args[0]
 13959  	b := v.Block
 13960  	config := b.Func.Config
 13961  	// match: (MUL (NEG x) y)
 13962  	// result: (MNEG x y)
 13963  	for {
 13964  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13965  			if v_0.Op != OpARM64NEG {
 13966  				continue
 13967  			}
 13968  			x := v_0.Args[0]
 13969  			y := v_1
 13970  			v.reset(OpARM64MNEG)
 13971  			v.AddArg2(x, y)
 13972  			return true
 13973  		}
 13974  		break
 13975  	}
 13976  	// match: (MUL _ (MOVDconst [0]))
 13977  	// result: (MOVDconst [0])
 13978  	for {
 13979  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13980  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
 13981  				continue
 13982  			}
 13983  			v.reset(OpARM64MOVDconst)
 13984  			v.AuxInt = int64ToAuxInt(0)
 13985  			return true
 13986  		}
 13987  		break
 13988  	}
 13989  	// match: (MUL x (MOVDconst [1]))
 13990  	// result: x
 13991  	for {
 13992  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13993  			x := v_0
 13994  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 13995  				continue
 13996  			}
 13997  			v.copyOf(x)
 13998  			return true
 13999  		}
 14000  		break
 14001  	}
 14002  	// match: (MUL x (MOVDconst [c]))
 14003  	// cond: canMulStrengthReduce(config, c)
 14004  	// result: {mulStrengthReduce(v, x, c)}
 14005  	for {
 14006  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14007  			x := v_0
 14008  			if v_1.Op != OpARM64MOVDconst {
 14009  				continue
 14010  			}
 14011  			c := auxIntToInt64(v_1.AuxInt)
 14012  			if !(canMulStrengthReduce(config, c)) {
 14013  				continue
 14014  			}
 14015  			v.copyOf(mulStrengthReduce(v, x, c))
 14016  			return true
 14017  		}
 14018  		break
 14019  	}
 14020  	// match: (MUL (MOVDconst [c]) (MOVDconst [d]))
 14021  	// result: (MOVDconst [c*d])
 14022  	for {
 14023  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14024  			if v_0.Op != OpARM64MOVDconst {
 14025  				continue
 14026  			}
 14027  			c := auxIntToInt64(v_0.AuxInt)
 14028  			if v_1.Op != OpARM64MOVDconst {
 14029  				continue
 14030  			}
 14031  			d := auxIntToInt64(v_1.AuxInt)
 14032  			v.reset(OpARM64MOVDconst)
 14033  			v.AuxInt = int64ToAuxInt(c * d)
 14034  			return true
 14035  		}
 14036  		break
 14037  	}
 14038  	// match: (MUL r:(MOVWUreg x) s:(MOVWUreg y))
 14039  	// cond: r.Uses == 1 && s.Uses == 1
 14040  	// result: (UMULL x y)
 14041  	for {
 14042  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14043  			r := v_0
 14044  			if r.Op != OpARM64MOVWUreg {
 14045  				continue
 14046  			}
 14047  			x := r.Args[0]
 14048  			s := v_1
 14049  			if s.Op != OpARM64MOVWUreg {
 14050  				continue
 14051  			}
 14052  			y := s.Args[0]
 14053  			if !(r.Uses == 1 && s.Uses == 1) {
 14054  				continue
 14055  			}
 14056  			v.reset(OpARM64UMULL)
 14057  			v.AddArg2(x, y)
 14058  			return true
 14059  		}
 14060  		break
 14061  	}
 14062  	// match: (MUL r:(MOVWreg x) s:(MOVWreg y))
 14063  	// cond: r.Uses == 1 && s.Uses == 1
 14064  	// result: (MULL x y)
 14065  	for {
 14066  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14067  			r := v_0
 14068  			if r.Op != OpARM64MOVWreg {
 14069  				continue
 14070  			}
 14071  			x := r.Args[0]
 14072  			s := v_1
 14073  			if s.Op != OpARM64MOVWreg {
 14074  				continue
 14075  			}
 14076  			y := s.Args[0]
 14077  			if !(r.Uses == 1 && s.Uses == 1) {
 14078  				continue
 14079  			}
 14080  			v.reset(OpARM64MULL)
 14081  			v.AddArg2(x, y)
 14082  			return true
 14083  		}
 14084  		break
 14085  	}
 14086  	return false
 14087  }
 14088  func rewriteValueARM64_OpARM64MULW(v *Value) bool {
 14089  	v_1 := v.Args[1]
 14090  	v_0 := v.Args[0]
 14091  	b := v.Block
 14092  	config := b.Func.Config
 14093  	// match: (MULW (NEG x) y)
 14094  	// result: (MNEGW x y)
 14095  	for {
 14096  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14097  			if v_0.Op != OpARM64NEG {
 14098  				continue
 14099  			}
 14100  			x := v_0.Args[0]
 14101  			y := v_1
 14102  			v.reset(OpARM64MNEGW)
 14103  			v.AddArg2(x, y)
 14104  			return true
 14105  		}
 14106  		break
 14107  	}
 14108  	// match: (MULW _ (MOVDconst [c]))
 14109  	// cond: int32(c)==0
 14110  	// result: (MOVDconst [0])
 14111  	for {
 14112  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14113  			if v_1.Op != OpARM64MOVDconst {
 14114  				continue
 14115  			}
 14116  			c := auxIntToInt64(v_1.AuxInt)
 14117  			if !(int32(c) == 0) {
 14118  				continue
 14119  			}
 14120  			v.reset(OpARM64MOVDconst)
 14121  			v.AuxInt = int64ToAuxInt(0)
 14122  			return true
 14123  		}
 14124  		break
 14125  	}
 14126  	// match: (MULW x (MOVDconst [c]))
 14127  	// cond: int32(c)==1
 14128  	// result: (MOVWUreg x)
 14129  	for {
 14130  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14131  			x := v_0
 14132  			if v_1.Op != OpARM64MOVDconst {
 14133  				continue
 14134  			}
 14135  			c := auxIntToInt64(v_1.AuxInt)
 14136  			if !(int32(c) == 1) {
 14137  				continue
 14138  			}
 14139  			v.reset(OpARM64MOVWUreg)
 14140  			v.AddArg(x)
 14141  			return true
 14142  		}
 14143  		break
 14144  	}
 14145  	// match: (MULW x (MOVDconst [c]))
 14146  	// cond: v.Type.Size() <= 4 && canMulStrengthReduce32(config, int32(c))
 14147  	// result: {mulStrengthReduce32(v, x, int32(c))}
 14148  	for {
 14149  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14150  			x := v_0
 14151  			if v_1.Op != OpARM64MOVDconst {
 14152  				continue
 14153  			}
 14154  			c := auxIntToInt64(v_1.AuxInt)
 14155  			if !(v.Type.Size() <= 4 && canMulStrengthReduce32(config, int32(c))) {
 14156  				continue
 14157  			}
 14158  			v.copyOf(mulStrengthReduce32(v, x, int32(c)))
 14159  			return true
 14160  		}
 14161  		break
 14162  	}
 14163  	// match: (MULW (MOVDconst [c]) (MOVDconst [d]))
 14164  	// result: (MOVDconst [int64(uint32(c*d))])
 14165  	for {
 14166  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14167  			if v_0.Op != OpARM64MOVDconst {
 14168  				continue
 14169  			}
 14170  			c := auxIntToInt64(v_0.AuxInt)
 14171  			if v_1.Op != OpARM64MOVDconst {
 14172  				continue
 14173  			}
 14174  			d := auxIntToInt64(v_1.AuxInt)
 14175  			v.reset(OpARM64MOVDconst)
 14176  			v.AuxInt = int64ToAuxInt(int64(uint32(c * d)))
 14177  			return true
 14178  		}
 14179  		break
 14180  	}
 14181  	return false
 14182  }
 14183  func rewriteValueARM64_OpARM64MVN(v *Value) bool {
 14184  	v_0 := v.Args[0]
 14185  	// match: (MVN (XOR x y))
 14186  	// result: (EON x y)
 14187  	for {
 14188  		if v_0.Op != OpARM64XOR {
 14189  			break
 14190  		}
 14191  		y := v_0.Args[1]
 14192  		x := v_0.Args[0]
 14193  		v.reset(OpARM64EON)
 14194  		v.AddArg2(x, y)
 14195  		return true
 14196  	}
 14197  	// match: (MVN (MOVDconst [c]))
 14198  	// result: (MOVDconst [^c])
 14199  	for {
 14200  		if v_0.Op != OpARM64MOVDconst {
 14201  			break
 14202  		}
 14203  		c := auxIntToInt64(v_0.AuxInt)
 14204  		v.reset(OpARM64MOVDconst)
 14205  		v.AuxInt = int64ToAuxInt(^c)
 14206  		return true
 14207  	}
 14208  	// match: (MVN x:(SLLconst [c] y))
 14209  	// cond: clobberIfDead(x)
 14210  	// result: (MVNshiftLL [c] y)
 14211  	for {
 14212  		x := v_0
 14213  		if x.Op != OpARM64SLLconst {
 14214  			break
 14215  		}
 14216  		c := auxIntToInt64(x.AuxInt)
 14217  		y := x.Args[0]
 14218  		if !(clobberIfDead(x)) {
 14219  			break
 14220  		}
 14221  		v.reset(OpARM64MVNshiftLL)
 14222  		v.AuxInt = int64ToAuxInt(c)
 14223  		v.AddArg(y)
 14224  		return true
 14225  	}
 14226  	// match: (MVN x:(SRLconst [c] y))
 14227  	// cond: clobberIfDead(x)
 14228  	// result: (MVNshiftRL [c] y)
 14229  	for {
 14230  		x := v_0
 14231  		if x.Op != OpARM64SRLconst {
 14232  			break
 14233  		}
 14234  		c := auxIntToInt64(x.AuxInt)
 14235  		y := x.Args[0]
 14236  		if !(clobberIfDead(x)) {
 14237  			break
 14238  		}
 14239  		v.reset(OpARM64MVNshiftRL)
 14240  		v.AuxInt = int64ToAuxInt(c)
 14241  		v.AddArg(y)
 14242  		return true
 14243  	}
 14244  	// match: (MVN x:(SRAconst [c] y))
 14245  	// cond: clobberIfDead(x)
 14246  	// result: (MVNshiftRA [c] y)
 14247  	for {
 14248  		x := v_0
 14249  		if x.Op != OpARM64SRAconst {
 14250  			break
 14251  		}
 14252  		c := auxIntToInt64(x.AuxInt)
 14253  		y := x.Args[0]
 14254  		if !(clobberIfDead(x)) {
 14255  			break
 14256  		}
 14257  		v.reset(OpARM64MVNshiftRA)
 14258  		v.AuxInt = int64ToAuxInt(c)
 14259  		v.AddArg(y)
 14260  		return true
 14261  	}
 14262  	// match: (MVN x:(RORconst [c] y))
 14263  	// cond: clobberIfDead(x)
 14264  	// result: (MVNshiftRO [c] y)
 14265  	for {
 14266  		x := v_0
 14267  		if x.Op != OpARM64RORconst {
 14268  			break
 14269  		}
 14270  		c := auxIntToInt64(x.AuxInt)
 14271  		y := x.Args[0]
 14272  		if !(clobberIfDead(x)) {
 14273  			break
 14274  		}
 14275  		v.reset(OpARM64MVNshiftRO)
 14276  		v.AuxInt = int64ToAuxInt(c)
 14277  		v.AddArg(y)
 14278  		return true
 14279  	}
 14280  	return false
 14281  }
 14282  func rewriteValueARM64_OpARM64MVNshiftLL(v *Value) bool {
 14283  	v_0 := v.Args[0]
 14284  	// match: (MVNshiftLL (MOVDconst [c]) [d])
 14285  	// result: (MOVDconst [^int64(uint64(c)<<uint64(d))])
 14286  	for {
 14287  		d := auxIntToInt64(v.AuxInt)
 14288  		if v_0.Op != OpARM64MOVDconst {
 14289  			break
 14290  		}
 14291  		c := auxIntToInt64(v_0.AuxInt)
 14292  		v.reset(OpARM64MOVDconst)
 14293  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
 14294  		return true
 14295  	}
 14296  	return false
 14297  }
 14298  func rewriteValueARM64_OpARM64MVNshiftRA(v *Value) bool {
 14299  	v_0 := v.Args[0]
 14300  	// match: (MVNshiftRA (MOVDconst [c]) [d])
 14301  	// result: (MOVDconst [^(c>>uint64(d))])
 14302  	for {
 14303  		d := auxIntToInt64(v.AuxInt)
 14304  		if v_0.Op != OpARM64MOVDconst {
 14305  			break
 14306  		}
 14307  		c := auxIntToInt64(v_0.AuxInt)
 14308  		v.reset(OpARM64MOVDconst)
 14309  		v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
 14310  		return true
 14311  	}
 14312  	return false
 14313  }
 14314  func rewriteValueARM64_OpARM64MVNshiftRL(v *Value) bool {
 14315  	v_0 := v.Args[0]
 14316  	// match: (MVNshiftRL (MOVDconst [c]) [d])
 14317  	// result: (MOVDconst [^int64(uint64(c)>>uint64(d))])
 14318  	for {
 14319  		d := auxIntToInt64(v.AuxInt)
 14320  		if v_0.Op != OpARM64MOVDconst {
 14321  			break
 14322  		}
 14323  		c := auxIntToInt64(v_0.AuxInt)
 14324  		v.reset(OpARM64MOVDconst)
 14325  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
 14326  		return true
 14327  	}
 14328  	return false
 14329  }
 14330  func rewriteValueARM64_OpARM64MVNshiftRO(v *Value) bool {
 14331  	v_0 := v.Args[0]
 14332  	// match: (MVNshiftRO (MOVDconst [c]) [d])
 14333  	// result: (MOVDconst [^rotateRight64(c, d)])
 14334  	for {
 14335  		d := auxIntToInt64(v.AuxInt)
 14336  		if v_0.Op != OpARM64MOVDconst {
 14337  			break
 14338  		}
 14339  		c := auxIntToInt64(v_0.AuxInt)
 14340  		v.reset(OpARM64MOVDconst)
 14341  		v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
 14342  		return true
 14343  	}
 14344  	return false
 14345  }
 14346  func rewriteValueARM64_OpARM64NEG(v *Value) bool {
 14347  	v_0 := v.Args[0]
 14348  	// match: (NEG (MUL x y))
 14349  	// result: (MNEG x y)
 14350  	for {
 14351  		if v_0.Op != OpARM64MUL {
 14352  			break
 14353  		}
 14354  		y := v_0.Args[1]
 14355  		x := v_0.Args[0]
 14356  		v.reset(OpARM64MNEG)
 14357  		v.AddArg2(x, y)
 14358  		return true
 14359  	}
 14360  	// match: (NEG (MULW x y))
 14361  	// cond: v.Type.Size() <= 4
 14362  	// result: (MNEGW x y)
 14363  	for {
 14364  		if v_0.Op != OpARM64MULW {
 14365  			break
 14366  		}
 14367  		y := v_0.Args[1]
 14368  		x := v_0.Args[0]
 14369  		if !(v.Type.Size() <= 4) {
 14370  			break
 14371  		}
 14372  		v.reset(OpARM64MNEGW)
 14373  		v.AddArg2(x, y)
 14374  		return true
 14375  	}
 14376  	// match: (NEG (SUB x y))
 14377  	// result: (SUB y x)
 14378  	for {
 14379  		if v_0.Op != OpARM64SUB {
 14380  			break
 14381  		}
 14382  		y := v_0.Args[1]
 14383  		x := v_0.Args[0]
 14384  		v.reset(OpARM64SUB)
 14385  		v.AddArg2(y, x)
 14386  		return true
 14387  	}
 14388  	// match: (NEG (NEG x))
 14389  	// result: x
 14390  	for {
 14391  		if v_0.Op != OpARM64NEG {
 14392  			break
 14393  		}
 14394  		x := v_0.Args[0]
 14395  		v.copyOf(x)
 14396  		return true
 14397  	}
 14398  	// match: (NEG (MOVDconst [c]))
 14399  	// result: (MOVDconst [-c])
 14400  	for {
 14401  		if v_0.Op != OpARM64MOVDconst {
 14402  			break
 14403  		}
 14404  		c := auxIntToInt64(v_0.AuxInt)
 14405  		v.reset(OpARM64MOVDconst)
 14406  		v.AuxInt = int64ToAuxInt(-c)
 14407  		return true
 14408  	}
 14409  	// match: (NEG x:(SLLconst [c] y))
 14410  	// cond: clobberIfDead(x)
 14411  	// result: (NEGshiftLL [c] y)
 14412  	for {
 14413  		x := v_0
 14414  		if x.Op != OpARM64SLLconst {
 14415  			break
 14416  		}
 14417  		c := auxIntToInt64(x.AuxInt)
 14418  		y := x.Args[0]
 14419  		if !(clobberIfDead(x)) {
 14420  			break
 14421  		}
 14422  		v.reset(OpARM64NEGshiftLL)
 14423  		v.AuxInt = int64ToAuxInt(c)
 14424  		v.AddArg(y)
 14425  		return true
 14426  	}
 14427  	// match: (NEG x:(SRLconst [c] y))
 14428  	// cond: clobberIfDead(x)
 14429  	// result: (NEGshiftRL [c] y)
 14430  	for {
 14431  		x := v_0
 14432  		if x.Op != OpARM64SRLconst {
 14433  			break
 14434  		}
 14435  		c := auxIntToInt64(x.AuxInt)
 14436  		y := x.Args[0]
 14437  		if !(clobberIfDead(x)) {
 14438  			break
 14439  		}
 14440  		v.reset(OpARM64NEGshiftRL)
 14441  		v.AuxInt = int64ToAuxInt(c)
 14442  		v.AddArg(y)
 14443  		return true
 14444  	}
 14445  	// match: (NEG x:(SRAconst [c] y))
 14446  	// cond: clobberIfDead(x)
 14447  	// result: (NEGshiftRA [c] y)
 14448  	for {
 14449  		x := v_0
 14450  		if x.Op != OpARM64SRAconst {
 14451  			break
 14452  		}
 14453  		c := auxIntToInt64(x.AuxInt)
 14454  		y := x.Args[0]
 14455  		if !(clobberIfDead(x)) {
 14456  			break
 14457  		}
 14458  		v.reset(OpARM64NEGshiftRA)
 14459  		v.AuxInt = int64ToAuxInt(c)
 14460  		v.AddArg(y)
 14461  		return true
 14462  	}
 14463  	return false
 14464  }
 14465  func rewriteValueARM64_OpARM64NEGshiftLL(v *Value) bool {
 14466  	v_0 := v.Args[0]
 14467  	// match: (NEGshiftLL (MOVDconst [c]) [d])
 14468  	// result: (MOVDconst [-int64(uint64(c)<<uint64(d))])
 14469  	for {
 14470  		d := auxIntToInt64(v.AuxInt)
 14471  		if v_0.Op != OpARM64MOVDconst {
 14472  			break
 14473  		}
 14474  		c := auxIntToInt64(v_0.AuxInt)
 14475  		v.reset(OpARM64MOVDconst)
 14476  		v.AuxInt = int64ToAuxInt(-int64(uint64(c) << uint64(d)))
 14477  		return true
 14478  	}
 14479  	return false
 14480  }
 14481  func rewriteValueARM64_OpARM64NEGshiftRA(v *Value) bool {
 14482  	v_0 := v.Args[0]
 14483  	// match: (NEGshiftRA (MOVDconst [c]) [d])
 14484  	// result: (MOVDconst [-(c>>uint64(d))])
 14485  	for {
 14486  		d := auxIntToInt64(v.AuxInt)
 14487  		if v_0.Op != OpARM64MOVDconst {
 14488  			break
 14489  		}
 14490  		c := auxIntToInt64(v_0.AuxInt)
 14491  		v.reset(OpARM64MOVDconst)
 14492  		v.AuxInt = int64ToAuxInt(-(c >> uint64(d)))
 14493  		return true
 14494  	}
 14495  	return false
 14496  }
 14497  func rewriteValueARM64_OpARM64NEGshiftRL(v *Value) bool {
 14498  	v_0 := v.Args[0]
 14499  	// match: (NEGshiftRL (MOVDconst [c]) [d])
 14500  	// result: (MOVDconst [-int64(uint64(c)>>uint64(d))])
 14501  	for {
 14502  		d := auxIntToInt64(v.AuxInt)
 14503  		if v_0.Op != OpARM64MOVDconst {
 14504  			break
 14505  		}
 14506  		c := auxIntToInt64(v_0.AuxInt)
 14507  		v.reset(OpARM64MOVDconst)
 14508  		v.AuxInt = int64ToAuxInt(-int64(uint64(c) >> uint64(d)))
 14509  		return true
 14510  	}
 14511  	return false
 14512  }
 14513  func rewriteValueARM64_OpARM64NotEqual(v *Value) bool {
 14514  	v_0 := v.Args[0]
 14515  	b := v.Block
 14516  	// match: (NotEqual (CMPconst [0] z:(AND x y)))
 14517  	// cond: z.Uses == 1
 14518  	// result: (NotEqual (TST x y))
 14519  	for {
 14520  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 14521  			break
 14522  		}
 14523  		z := v_0.Args[0]
 14524  		if z.Op != OpARM64AND {
 14525  			break
 14526  		}
 14527  		y := z.Args[1]
 14528  		x := z.Args[0]
 14529  		if !(z.Uses == 1) {
 14530  			break
 14531  		}
 14532  		v.reset(OpARM64NotEqual)
 14533  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
 14534  		v0.AddArg2(x, y)
 14535  		v.AddArg(v0)
 14536  		return true
 14537  	}
 14538  	// match: (NotEqual (CMPWconst [0] x:(ANDconst [c] y)))
 14539  	// cond: x.Uses == 1
 14540  	// result: (NotEqual (TSTWconst [int32(c)] y))
 14541  	for {
 14542  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 14543  			break
 14544  		}
 14545  		x := v_0.Args[0]
 14546  		if x.Op != OpARM64ANDconst {
 14547  			break
 14548  		}
 14549  		c := auxIntToInt64(x.AuxInt)
 14550  		y := x.Args[0]
 14551  		if !(x.Uses == 1) {
 14552  			break
 14553  		}
 14554  		v.reset(OpARM64NotEqual)
 14555  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
 14556  		v0.AuxInt = int32ToAuxInt(int32(c))
 14557  		v0.AddArg(y)
 14558  		v.AddArg(v0)
 14559  		return true
 14560  	}
 14561  	// match: (NotEqual (CMPWconst [0] z:(AND x y)))
 14562  	// cond: z.Uses == 1
 14563  	// result: (NotEqual (TSTW x y))
 14564  	for {
 14565  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 14566  			break
 14567  		}
 14568  		z := v_0.Args[0]
 14569  		if z.Op != OpARM64AND {
 14570  			break
 14571  		}
 14572  		y := z.Args[1]
 14573  		x := z.Args[0]
 14574  		if !(z.Uses == 1) {
 14575  			break
 14576  		}
 14577  		v.reset(OpARM64NotEqual)
 14578  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
 14579  		v0.AddArg2(x, y)
 14580  		v.AddArg(v0)
 14581  		return true
 14582  	}
 14583  	// match: (NotEqual (CMPconst [0] x:(ANDconst [c] y)))
 14584  	// cond: x.Uses == 1
 14585  	// result: (NotEqual (TSTconst [c] y))
 14586  	for {
 14587  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 14588  			break
 14589  		}
 14590  		x := v_0.Args[0]
 14591  		if x.Op != OpARM64ANDconst {
 14592  			break
 14593  		}
 14594  		c := auxIntToInt64(x.AuxInt)
 14595  		y := x.Args[0]
 14596  		if !(x.Uses == 1) {
 14597  			break
 14598  		}
 14599  		v.reset(OpARM64NotEqual)
 14600  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
 14601  		v0.AuxInt = int64ToAuxInt(c)
 14602  		v0.AddArg(y)
 14603  		v.AddArg(v0)
 14604  		return true
 14605  	}
 14606  	// match: (NotEqual (CMP x z:(NEG y)))
 14607  	// cond: z.Uses == 1
 14608  	// result: (NotEqual (CMN x y))
 14609  	for {
 14610  		if v_0.Op != OpARM64CMP {
 14611  			break
 14612  		}
 14613  		_ = v_0.Args[1]
 14614  		x := v_0.Args[0]
 14615  		z := v_0.Args[1]
 14616  		if z.Op != OpARM64NEG {
 14617  			break
 14618  		}
 14619  		y := z.Args[0]
 14620  		if !(z.Uses == 1) {
 14621  			break
 14622  		}
 14623  		v.reset(OpARM64NotEqual)
 14624  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
 14625  		v0.AddArg2(x, y)
 14626  		v.AddArg(v0)
 14627  		return true
 14628  	}
 14629  	// match: (NotEqual (CMPW x z:(NEG y)))
 14630  	// cond: z.Uses == 1
 14631  	// result: (NotEqual (CMNW x y))
 14632  	for {
 14633  		if v_0.Op != OpARM64CMPW {
 14634  			break
 14635  		}
 14636  		_ = v_0.Args[1]
 14637  		x := v_0.Args[0]
 14638  		z := v_0.Args[1]
 14639  		if z.Op != OpARM64NEG {
 14640  			break
 14641  		}
 14642  		y := z.Args[0]
 14643  		if !(z.Uses == 1) {
 14644  			break
 14645  		}
 14646  		v.reset(OpARM64NotEqual)
 14647  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
 14648  		v0.AddArg2(x, y)
 14649  		v.AddArg(v0)
 14650  		return true
 14651  	}
 14652  	// match: (NotEqual (CMPconst [0] x:(ADDconst [c] y)))
 14653  	// cond: x.Uses == 1
 14654  	// result: (NotEqual (CMNconst [c] y))
 14655  	for {
 14656  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 14657  			break
 14658  		}
 14659  		x := v_0.Args[0]
 14660  		if x.Op != OpARM64ADDconst {
 14661  			break
 14662  		}
 14663  		c := auxIntToInt64(x.AuxInt)
 14664  		y := x.Args[0]
 14665  		if !(x.Uses == 1) {
 14666  			break
 14667  		}
 14668  		v.reset(OpARM64NotEqual)
 14669  		v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
 14670  		v0.AuxInt = int64ToAuxInt(c)
 14671  		v0.AddArg(y)
 14672  		v.AddArg(v0)
 14673  		return true
 14674  	}
 14675  	// match: (NotEqual (CMPWconst [0] x:(ADDconst [c] y)))
 14676  	// cond: x.Uses == 1
 14677  	// result: (NotEqual (CMNWconst [int32(c)] y))
 14678  	for {
 14679  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 14680  			break
 14681  		}
 14682  		x := v_0.Args[0]
 14683  		if x.Op != OpARM64ADDconst {
 14684  			break
 14685  		}
 14686  		c := auxIntToInt64(x.AuxInt)
 14687  		y := x.Args[0]
 14688  		if !(x.Uses == 1) {
 14689  			break
 14690  		}
 14691  		v.reset(OpARM64NotEqual)
 14692  		v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
 14693  		v0.AuxInt = int32ToAuxInt(int32(c))
 14694  		v0.AddArg(y)
 14695  		v.AddArg(v0)
 14696  		return true
 14697  	}
 14698  	// match: (NotEqual (CMPconst [0] z:(ADD x y)))
 14699  	// cond: z.Uses == 1
 14700  	// result: (NotEqual (CMN x y))
 14701  	for {
 14702  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 14703  			break
 14704  		}
 14705  		z := v_0.Args[0]
 14706  		if z.Op != OpARM64ADD {
 14707  			break
 14708  		}
 14709  		y := z.Args[1]
 14710  		x := z.Args[0]
 14711  		if !(z.Uses == 1) {
 14712  			break
 14713  		}
 14714  		v.reset(OpARM64NotEqual)
 14715  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
 14716  		v0.AddArg2(x, y)
 14717  		v.AddArg(v0)
 14718  		return true
 14719  	}
 14720  	// match: (NotEqual (CMPWconst [0] z:(ADD x y)))
 14721  	// cond: z.Uses == 1
 14722  	// result: (NotEqual (CMNW x y))
 14723  	for {
 14724  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 14725  			break
 14726  		}
 14727  		z := v_0.Args[0]
 14728  		if z.Op != OpARM64ADD {
 14729  			break
 14730  		}
 14731  		y := z.Args[1]
 14732  		x := z.Args[0]
 14733  		if !(z.Uses == 1) {
 14734  			break
 14735  		}
 14736  		v.reset(OpARM64NotEqual)
 14737  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
 14738  		v0.AddArg2(x, y)
 14739  		v.AddArg(v0)
 14740  		return true
 14741  	}
 14742  	// match: (NotEqual (CMPconst [0] z:(MADD a x y)))
 14743  	// cond: z.Uses == 1
 14744  	// result: (NotEqual (CMN a (MUL <x.Type> x y)))
 14745  	for {
 14746  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 14747  			break
 14748  		}
 14749  		z := v_0.Args[0]
 14750  		if z.Op != OpARM64MADD {
 14751  			break
 14752  		}
 14753  		y := z.Args[2]
 14754  		a := z.Args[0]
 14755  		x := z.Args[1]
 14756  		if !(z.Uses == 1) {
 14757  			break
 14758  		}
 14759  		v.reset(OpARM64NotEqual)
 14760  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
 14761  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
 14762  		v1.AddArg2(x, y)
 14763  		v0.AddArg2(a, v1)
 14764  		v.AddArg(v0)
 14765  		return true
 14766  	}
 14767  	// match: (NotEqual (CMPWconst [0] z:(MADDW a x y)))
 14768  	// cond: z.Uses == 1
 14769  	// result: (NotEqual (CMNW a (MULW <x.Type> x y)))
 14770  	for {
 14771  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 14772  			break
 14773  		}
 14774  		z := v_0.Args[0]
 14775  		if z.Op != OpARM64MADDW {
 14776  			break
 14777  		}
 14778  		y := z.Args[2]
 14779  		a := z.Args[0]
 14780  		x := z.Args[1]
 14781  		if !(z.Uses == 1) {
 14782  			break
 14783  		}
 14784  		v.reset(OpARM64NotEqual)
 14785  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
 14786  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
 14787  		v1.AddArg2(x, y)
 14788  		v0.AddArg2(a, v1)
 14789  		v.AddArg(v0)
 14790  		return true
 14791  	}
 14792  	// match: (NotEqual (CMPconst [0] z:(MSUB a x y)))
 14793  	// cond: z.Uses == 1
 14794  	// result: (NotEqual (CMP a (MUL <x.Type> x y)))
 14795  	for {
 14796  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 14797  			break
 14798  		}
 14799  		z := v_0.Args[0]
 14800  		if z.Op != OpARM64MSUB {
 14801  			break
 14802  		}
 14803  		y := z.Args[2]
 14804  		a := z.Args[0]
 14805  		x := z.Args[1]
 14806  		if !(z.Uses == 1) {
 14807  			break
 14808  		}
 14809  		v.reset(OpARM64NotEqual)
 14810  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 14811  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
 14812  		v1.AddArg2(x, y)
 14813  		v0.AddArg2(a, v1)
 14814  		v.AddArg(v0)
 14815  		return true
 14816  	}
 14817  	// match: (NotEqual (CMPWconst [0] z:(MSUBW a x y)))
 14818  	// cond: z.Uses == 1
 14819  	// result: (NotEqual (CMPW a (MULW <x.Type> x y)))
 14820  	for {
 14821  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 14822  			break
 14823  		}
 14824  		z := v_0.Args[0]
 14825  		if z.Op != OpARM64MSUBW {
 14826  			break
 14827  		}
 14828  		y := z.Args[2]
 14829  		a := z.Args[0]
 14830  		x := z.Args[1]
 14831  		if !(z.Uses == 1) {
 14832  			break
 14833  		}
 14834  		v.reset(OpARM64NotEqual)
 14835  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 14836  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
 14837  		v1.AddArg2(x, y)
 14838  		v0.AddArg2(a, v1)
 14839  		v.AddArg(v0)
 14840  		return true
 14841  	}
 14842  	// match: (NotEqual (FlagConstant [fc]))
 14843  	// result: (MOVDconst [b2i(fc.ne())])
 14844  	for {
 14845  		if v_0.Op != OpARM64FlagConstant {
 14846  			break
 14847  		}
 14848  		fc := auxIntToFlagConstant(v_0.AuxInt)
 14849  		v.reset(OpARM64MOVDconst)
 14850  		v.AuxInt = int64ToAuxInt(b2i(fc.ne()))
 14851  		return true
 14852  	}
 14853  	// match: (NotEqual (InvertFlags x))
 14854  	// result: (NotEqual x)
 14855  	for {
 14856  		if v_0.Op != OpARM64InvertFlags {
 14857  			break
 14858  		}
 14859  		x := v_0.Args[0]
 14860  		v.reset(OpARM64NotEqual)
 14861  		v.AddArg(x)
 14862  		return true
 14863  	}
 14864  	return false
 14865  }
 14866  func rewriteValueARM64_OpARM64OR(v *Value) bool {
 14867  	v_1 := v.Args[1]
 14868  	v_0 := v.Args[0]
 14869  	// match: (OR x (MOVDconst [c]))
 14870  	// result: (ORconst [c] x)
 14871  	for {
 14872  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14873  			x := v_0
 14874  			if v_1.Op != OpARM64MOVDconst {
 14875  				continue
 14876  			}
 14877  			c := auxIntToInt64(v_1.AuxInt)
 14878  			v.reset(OpARM64ORconst)
 14879  			v.AuxInt = int64ToAuxInt(c)
 14880  			v.AddArg(x)
 14881  			return true
 14882  		}
 14883  		break
 14884  	}
 14885  	// match: (OR x x)
 14886  	// result: x
 14887  	for {
 14888  		x := v_0
 14889  		if x != v_1 {
 14890  			break
 14891  		}
 14892  		v.copyOf(x)
 14893  		return true
 14894  	}
 14895  	// match: (OR x (MVN y))
 14896  	// result: (ORN x y)
 14897  	for {
 14898  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14899  			x := v_0
 14900  			if v_1.Op != OpARM64MVN {
 14901  				continue
 14902  			}
 14903  			y := v_1.Args[0]
 14904  			v.reset(OpARM64ORN)
 14905  			v.AddArg2(x, y)
 14906  			return true
 14907  		}
 14908  		break
 14909  	}
 14910  	// match: (OR x0 x1:(SLLconst [c] y))
 14911  	// cond: clobberIfDead(x1)
 14912  	// result: (ORshiftLL x0 y [c])
 14913  	for {
 14914  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14915  			x0 := v_0
 14916  			x1 := v_1
 14917  			if x1.Op != OpARM64SLLconst {
 14918  				continue
 14919  			}
 14920  			c := auxIntToInt64(x1.AuxInt)
 14921  			y := x1.Args[0]
 14922  			if !(clobberIfDead(x1)) {
 14923  				continue
 14924  			}
 14925  			v.reset(OpARM64ORshiftLL)
 14926  			v.AuxInt = int64ToAuxInt(c)
 14927  			v.AddArg2(x0, y)
 14928  			return true
 14929  		}
 14930  		break
 14931  	}
 14932  	// match: (OR x0 x1:(SRLconst [c] y))
 14933  	// cond: clobberIfDead(x1)
 14934  	// result: (ORshiftRL x0 y [c])
 14935  	for {
 14936  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14937  			x0 := v_0
 14938  			x1 := v_1
 14939  			if x1.Op != OpARM64SRLconst {
 14940  				continue
 14941  			}
 14942  			c := auxIntToInt64(x1.AuxInt)
 14943  			y := x1.Args[0]
 14944  			if !(clobberIfDead(x1)) {
 14945  				continue
 14946  			}
 14947  			v.reset(OpARM64ORshiftRL)
 14948  			v.AuxInt = int64ToAuxInt(c)
 14949  			v.AddArg2(x0, y)
 14950  			return true
 14951  		}
 14952  		break
 14953  	}
 14954  	// match: (OR x0 x1:(SRAconst [c] y))
 14955  	// cond: clobberIfDead(x1)
 14956  	// result: (ORshiftRA x0 y [c])
 14957  	for {
 14958  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14959  			x0 := v_0
 14960  			x1 := v_1
 14961  			if x1.Op != OpARM64SRAconst {
 14962  				continue
 14963  			}
 14964  			c := auxIntToInt64(x1.AuxInt)
 14965  			y := x1.Args[0]
 14966  			if !(clobberIfDead(x1)) {
 14967  				continue
 14968  			}
 14969  			v.reset(OpARM64ORshiftRA)
 14970  			v.AuxInt = int64ToAuxInt(c)
 14971  			v.AddArg2(x0, y)
 14972  			return true
 14973  		}
 14974  		break
 14975  	}
 14976  	// match: (OR x0 x1:(RORconst [c] y))
 14977  	// cond: clobberIfDead(x1)
 14978  	// result: (ORshiftRO x0 y [c])
 14979  	for {
 14980  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14981  			x0 := v_0
 14982  			x1 := v_1
 14983  			if x1.Op != OpARM64RORconst {
 14984  				continue
 14985  			}
 14986  			c := auxIntToInt64(x1.AuxInt)
 14987  			y := x1.Args[0]
 14988  			if !(clobberIfDead(x1)) {
 14989  				continue
 14990  			}
 14991  			v.reset(OpARM64ORshiftRO)
 14992  			v.AuxInt = int64ToAuxInt(c)
 14993  			v.AddArg2(x0, y)
 14994  			return true
 14995  		}
 14996  		break
 14997  	}
 14998  	// match: (OR (UBFIZ [bfc] x) (ANDconst [ac] y))
 14999  	// cond: ac == ^((1<<uint(bfc.width())-1) << uint(bfc.lsb()))
 15000  	// result: (BFI [bfc] y x)
 15001  	for {
 15002  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 15003  			if v_0.Op != OpARM64UBFIZ {
 15004  				continue
 15005  			}
 15006  			bfc := auxIntToArm64BitField(v_0.AuxInt)
 15007  			x := v_0.Args[0]
 15008  			if v_1.Op != OpARM64ANDconst {
 15009  				continue
 15010  			}
 15011  			ac := auxIntToInt64(v_1.AuxInt)
 15012  			y := v_1.Args[0]
 15013  			if !(ac == ^((1<<uint(bfc.width()) - 1) << uint(bfc.lsb()))) {
 15014  				continue
 15015  			}
 15016  			v.reset(OpARM64BFI)
 15017  			v.AuxInt = arm64BitFieldToAuxInt(bfc)
 15018  			v.AddArg2(y, x)
 15019  			return true
 15020  		}
 15021  		break
 15022  	}
 15023  	// match: (OR (UBFX [bfc] x) (ANDconst [ac] y))
 15024  	// cond: ac == ^(1<<uint(bfc.width())-1)
 15025  	// result: (BFXIL [bfc] y x)
 15026  	for {
 15027  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 15028  			if v_0.Op != OpARM64UBFX {
 15029  				continue
 15030  			}
 15031  			bfc := auxIntToArm64BitField(v_0.AuxInt)
 15032  			x := v_0.Args[0]
 15033  			if v_1.Op != OpARM64ANDconst {
 15034  				continue
 15035  			}
 15036  			ac := auxIntToInt64(v_1.AuxInt)
 15037  			y := v_1.Args[0]
 15038  			if !(ac == ^(1<<uint(bfc.width()) - 1)) {
 15039  				continue
 15040  			}
 15041  			v.reset(OpARM64BFXIL)
 15042  			v.AuxInt = arm64BitFieldToAuxInt(bfc)
 15043  			v.AddArg2(y, x)
 15044  			return true
 15045  		}
 15046  		break
 15047  	}
 15048  	return false
 15049  }
 15050  func rewriteValueARM64_OpARM64ORN(v *Value) bool {
 15051  	v_1 := v.Args[1]
 15052  	v_0 := v.Args[0]
 15053  	// match: (ORN x (MOVDconst [c]))
 15054  	// result: (ORconst [^c] x)
 15055  	for {
 15056  		x := v_0
 15057  		if v_1.Op != OpARM64MOVDconst {
 15058  			break
 15059  		}
 15060  		c := auxIntToInt64(v_1.AuxInt)
 15061  		v.reset(OpARM64ORconst)
 15062  		v.AuxInt = int64ToAuxInt(^c)
 15063  		v.AddArg(x)
 15064  		return true
 15065  	}
 15066  	// match: (ORN x x)
 15067  	// result: (MOVDconst [-1])
 15068  	for {
 15069  		x := v_0
 15070  		if x != v_1 {
 15071  			break
 15072  		}
 15073  		v.reset(OpARM64MOVDconst)
 15074  		v.AuxInt = int64ToAuxInt(-1)
 15075  		return true
 15076  	}
 15077  	// match: (ORN x0 x1:(SLLconst [c] y))
 15078  	// cond: clobberIfDead(x1)
 15079  	// result: (ORNshiftLL x0 y [c])
 15080  	for {
 15081  		x0 := v_0
 15082  		x1 := v_1
 15083  		if x1.Op != OpARM64SLLconst {
 15084  			break
 15085  		}
 15086  		c := auxIntToInt64(x1.AuxInt)
 15087  		y := x1.Args[0]
 15088  		if !(clobberIfDead(x1)) {
 15089  			break
 15090  		}
 15091  		v.reset(OpARM64ORNshiftLL)
 15092  		v.AuxInt = int64ToAuxInt(c)
 15093  		v.AddArg2(x0, y)
 15094  		return true
 15095  	}
 15096  	// match: (ORN x0 x1:(SRLconst [c] y))
 15097  	// cond: clobberIfDead(x1)
 15098  	// result: (ORNshiftRL x0 y [c])
 15099  	for {
 15100  		x0 := v_0
 15101  		x1 := v_1
 15102  		if x1.Op != OpARM64SRLconst {
 15103  			break
 15104  		}
 15105  		c := auxIntToInt64(x1.AuxInt)
 15106  		y := x1.Args[0]
 15107  		if !(clobberIfDead(x1)) {
 15108  			break
 15109  		}
 15110  		v.reset(OpARM64ORNshiftRL)
 15111  		v.AuxInt = int64ToAuxInt(c)
 15112  		v.AddArg2(x0, y)
 15113  		return true
 15114  	}
 15115  	// match: (ORN x0 x1:(SRAconst [c] y))
 15116  	// cond: clobberIfDead(x1)
 15117  	// result: (ORNshiftRA x0 y [c])
 15118  	for {
 15119  		x0 := v_0
 15120  		x1 := v_1
 15121  		if x1.Op != OpARM64SRAconst {
 15122  			break
 15123  		}
 15124  		c := auxIntToInt64(x1.AuxInt)
 15125  		y := x1.Args[0]
 15126  		if !(clobberIfDead(x1)) {
 15127  			break
 15128  		}
 15129  		v.reset(OpARM64ORNshiftRA)
 15130  		v.AuxInt = int64ToAuxInt(c)
 15131  		v.AddArg2(x0, y)
 15132  		return true
 15133  	}
 15134  	// match: (ORN x0 x1:(RORconst [c] y))
 15135  	// cond: clobberIfDead(x1)
 15136  	// result: (ORNshiftRO x0 y [c])
 15137  	for {
 15138  		x0 := v_0
 15139  		x1 := v_1
 15140  		if x1.Op != OpARM64RORconst {
 15141  			break
 15142  		}
 15143  		c := auxIntToInt64(x1.AuxInt)
 15144  		y := x1.Args[0]
 15145  		if !(clobberIfDead(x1)) {
 15146  			break
 15147  		}
 15148  		v.reset(OpARM64ORNshiftRO)
 15149  		v.AuxInt = int64ToAuxInt(c)
 15150  		v.AddArg2(x0, y)
 15151  		return true
 15152  	}
 15153  	return false
 15154  }
 15155  func rewriteValueARM64_OpARM64ORNshiftLL(v *Value) bool {
 15156  	v_1 := v.Args[1]
 15157  	v_0 := v.Args[0]
 15158  	// match: (ORNshiftLL x (MOVDconst [c]) [d])
 15159  	// result: (ORconst x [^int64(uint64(c)<<uint64(d))])
 15160  	for {
 15161  		d := auxIntToInt64(v.AuxInt)
 15162  		x := v_0
 15163  		if v_1.Op != OpARM64MOVDconst {
 15164  			break
 15165  		}
 15166  		c := auxIntToInt64(v_1.AuxInt)
 15167  		v.reset(OpARM64ORconst)
 15168  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
 15169  		v.AddArg(x)
 15170  		return true
 15171  	}
 15172  	// match: (ORNshiftLL (SLLconst x [c]) x [c])
 15173  	// result: (MOVDconst [-1])
 15174  	for {
 15175  		c := auxIntToInt64(v.AuxInt)
 15176  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
 15177  			break
 15178  		}
 15179  		x := v_0.Args[0]
 15180  		if x != v_1 {
 15181  			break
 15182  		}
 15183  		v.reset(OpARM64MOVDconst)
 15184  		v.AuxInt = int64ToAuxInt(-1)
 15185  		return true
 15186  	}
 15187  	return false
 15188  }
 15189  func rewriteValueARM64_OpARM64ORNshiftRA(v *Value) bool {
 15190  	v_1 := v.Args[1]
 15191  	v_0 := v.Args[0]
 15192  	// match: (ORNshiftRA x (MOVDconst [c]) [d])
 15193  	// result: (ORconst x [^(c>>uint64(d))])
 15194  	for {
 15195  		d := auxIntToInt64(v.AuxInt)
 15196  		x := v_0
 15197  		if v_1.Op != OpARM64MOVDconst {
 15198  			break
 15199  		}
 15200  		c := auxIntToInt64(v_1.AuxInt)
 15201  		v.reset(OpARM64ORconst)
 15202  		v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
 15203  		v.AddArg(x)
 15204  		return true
 15205  	}
 15206  	// match: (ORNshiftRA (SRAconst x [c]) x [c])
 15207  	// result: (MOVDconst [-1])
 15208  	for {
 15209  		c := auxIntToInt64(v.AuxInt)
 15210  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
 15211  			break
 15212  		}
 15213  		x := v_0.Args[0]
 15214  		if x != v_1 {
 15215  			break
 15216  		}
 15217  		v.reset(OpARM64MOVDconst)
 15218  		v.AuxInt = int64ToAuxInt(-1)
 15219  		return true
 15220  	}
 15221  	return false
 15222  }
 15223  func rewriteValueARM64_OpARM64ORNshiftRL(v *Value) bool {
 15224  	v_1 := v.Args[1]
 15225  	v_0 := v.Args[0]
 15226  	// match: (ORNshiftRL x (MOVDconst [c]) [d])
 15227  	// result: (ORconst x [^int64(uint64(c)>>uint64(d))])
 15228  	for {
 15229  		d := auxIntToInt64(v.AuxInt)
 15230  		x := v_0
 15231  		if v_1.Op != OpARM64MOVDconst {
 15232  			break
 15233  		}
 15234  		c := auxIntToInt64(v_1.AuxInt)
 15235  		v.reset(OpARM64ORconst)
 15236  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
 15237  		v.AddArg(x)
 15238  		return true
 15239  	}
 15240  	// match: (ORNshiftRL (SRLconst x [c]) x [c])
 15241  	// result: (MOVDconst [-1])
 15242  	for {
 15243  		c := auxIntToInt64(v.AuxInt)
 15244  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
 15245  			break
 15246  		}
 15247  		x := v_0.Args[0]
 15248  		if x != v_1 {
 15249  			break
 15250  		}
 15251  		v.reset(OpARM64MOVDconst)
 15252  		v.AuxInt = int64ToAuxInt(-1)
 15253  		return true
 15254  	}
 15255  	return false
 15256  }
 15257  func rewriteValueARM64_OpARM64ORNshiftRO(v *Value) bool {
 15258  	v_1 := v.Args[1]
 15259  	v_0 := v.Args[0]
 15260  	// match: (ORNshiftRO x (MOVDconst [c]) [d])
 15261  	// result: (ORconst x [^rotateRight64(c, d)])
 15262  	for {
 15263  		d := auxIntToInt64(v.AuxInt)
 15264  		x := v_0
 15265  		if v_1.Op != OpARM64MOVDconst {
 15266  			break
 15267  		}
 15268  		c := auxIntToInt64(v_1.AuxInt)
 15269  		v.reset(OpARM64ORconst)
 15270  		v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
 15271  		v.AddArg(x)
 15272  		return true
 15273  	}
 15274  	// match: (ORNshiftRO (RORconst x [c]) x [c])
 15275  	// result: (MOVDconst [-1])
 15276  	for {
 15277  		c := auxIntToInt64(v.AuxInt)
 15278  		if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
 15279  			break
 15280  		}
 15281  		x := v_0.Args[0]
 15282  		if x != v_1 {
 15283  			break
 15284  		}
 15285  		v.reset(OpARM64MOVDconst)
 15286  		v.AuxInt = int64ToAuxInt(-1)
 15287  		return true
 15288  	}
 15289  	return false
 15290  }
 15291  func rewriteValueARM64_OpARM64ORconst(v *Value) bool {
 15292  	v_0 := v.Args[0]
 15293  	// match: (ORconst [0] x)
 15294  	// result: x
 15295  	for {
 15296  		if auxIntToInt64(v.AuxInt) != 0 {
 15297  			break
 15298  		}
 15299  		x := v_0
 15300  		v.copyOf(x)
 15301  		return true
 15302  	}
 15303  	// match: (ORconst [-1] _)
 15304  	// result: (MOVDconst [-1])
 15305  	for {
 15306  		if auxIntToInt64(v.AuxInt) != -1 {
 15307  			break
 15308  		}
 15309  		v.reset(OpARM64MOVDconst)
 15310  		v.AuxInt = int64ToAuxInt(-1)
 15311  		return true
 15312  	}
 15313  	// match: (ORconst [c] (MOVDconst [d]))
 15314  	// result: (MOVDconst [c|d])
 15315  	for {
 15316  		c := auxIntToInt64(v.AuxInt)
 15317  		if v_0.Op != OpARM64MOVDconst {
 15318  			break
 15319  		}
 15320  		d := auxIntToInt64(v_0.AuxInt)
 15321  		v.reset(OpARM64MOVDconst)
 15322  		v.AuxInt = int64ToAuxInt(c | d)
 15323  		return true
 15324  	}
 15325  	// match: (ORconst [c] (ORconst [d] x))
 15326  	// result: (ORconst [c|d] x)
 15327  	for {
 15328  		c := auxIntToInt64(v.AuxInt)
 15329  		if v_0.Op != OpARM64ORconst {
 15330  			break
 15331  		}
 15332  		d := auxIntToInt64(v_0.AuxInt)
 15333  		x := v_0.Args[0]
 15334  		v.reset(OpARM64ORconst)
 15335  		v.AuxInt = int64ToAuxInt(c | d)
 15336  		v.AddArg(x)
 15337  		return true
 15338  	}
 15339  	// match: (ORconst [c1] (ANDconst [c2] x))
 15340  	// cond: c2|c1 == ^0
 15341  	// result: (ORconst [c1] x)
 15342  	for {
 15343  		c1 := auxIntToInt64(v.AuxInt)
 15344  		if v_0.Op != OpARM64ANDconst {
 15345  			break
 15346  		}
 15347  		c2 := auxIntToInt64(v_0.AuxInt)
 15348  		x := v_0.Args[0]
 15349  		if !(c2|c1 == ^0) {
 15350  			break
 15351  		}
 15352  		v.reset(OpARM64ORconst)
 15353  		v.AuxInt = int64ToAuxInt(c1)
 15354  		v.AddArg(x)
 15355  		return true
 15356  	}
 15357  	return false
 15358  }
 15359  func rewriteValueARM64_OpARM64ORshiftLL(v *Value) bool {
 15360  	v_1 := v.Args[1]
 15361  	v_0 := v.Args[0]
 15362  	b := v.Block
 15363  	typ := &b.Func.Config.Types
 15364  	// match: (ORshiftLL (MOVDconst [c]) x [d])
 15365  	// result: (ORconst [c] (SLLconst <x.Type> x [d]))
 15366  	for {
 15367  		d := auxIntToInt64(v.AuxInt)
 15368  		if v_0.Op != OpARM64MOVDconst {
 15369  			break
 15370  		}
 15371  		c := auxIntToInt64(v_0.AuxInt)
 15372  		x := v_1
 15373  		v.reset(OpARM64ORconst)
 15374  		v.AuxInt = int64ToAuxInt(c)
 15375  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 15376  		v0.AuxInt = int64ToAuxInt(d)
 15377  		v0.AddArg(x)
 15378  		v.AddArg(v0)
 15379  		return true
 15380  	}
 15381  	// match: (ORshiftLL x (MOVDconst [c]) [d])
 15382  	// result: (ORconst x [int64(uint64(c)<<uint64(d))])
 15383  	for {
 15384  		d := auxIntToInt64(v.AuxInt)
 15385  		x := v_0
 15386  		if v_1.Op != OpARM64MOVDconst {
 15387  			break
 15388  		}
 15389  		c := auxIntToInt64(v_1.AuxInt)
 15390  		v.reset(OpARM64ORconst)
 15391  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
 15392  		v.AddArg(x)
 15393  		return true
 15394  	}
 15395  	// match: (ORshiftLL y:(SLLconst x [c]) x [c])
 15396  	// result: y
 15397  	for {
 15398  		c := auxIntToInt64(v.AuxInt)
 15399  		y := v_0
 15400  		if y.Op != OpARM64SLLconst || auxIntToInt64(y.AuxInt) != c {
 15401  			break
 15402  		}
 15403  		x := y.Args[0]
 15404  		if x != v_1 {
 15405  			break
 15406  		}
 15407  		v.copyOf(y)
 15408  		return true
 15409  	}
 15410  	// match: (ORshiftLL <typ.UInt16> [8] (UBFX <typ.UInt16> [armBFAuxInt(8, 8)] x) x)
 15411  	// result: (REV16W x)
 15412  	for {
 15413  		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) {
 15414  			break
 15415  		}
 15416  		x := v_0.Args[0]
 15417  		if x != v_1 {
 15418  			break
 15419  		}
 15420  		v.reset(OpARM64REV16W)
 15421  		v.AddArg(x)
 15422  		return true
 15423  	}
 15424  	// match: (ORshiftLL [8] (UBFX [armBFAuxInt(8, 24)] (ANDconst [c1] x)) (ANDconst [c2] x))
 15425  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
 15426  	// result: (REV16W x)
 15427  	for {
 15428  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64UBFX || auxIntToArm64BitField(v_0.AuxInt) != armBFAuxInt(8, 24) {
 15429  			break
 15430  		}
 15431  		v_0_0 := v_0.Args[0]
 15432  		if v_0_0.Op != OpARM64ANDconst {
 15433  			break
 15434  		}
 15435  		c1 := auxIntToInt64(v_0_0.AuxInt)
 15436  		x := v_0_0.Args[0]
 15437  		if v_1.Op != OpARM64ANDconst {
 15438  			break
 15439  		}
 15440  		c2 := auxIntToInt64(v_1.AuxInt)
 15441  		if x != v_1.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
 15442  			break
 15443  		}
 15444  		v.reset(OpARM64REV16W)
 15445  		v.AddArg(x)
 15446  		return true
 15447  	}
 15448  	// match: (ORshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
 15449  	// cond: (uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff)
 15450  	// result: (REV16 x)
 15451  	for {
 15452  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
 15453  			break
 15454  		}
 15455  		v_0_0 := v_0.Args[0]
 15456  		if v_0_0.Op != OpARM64ANDconst {
 15457  			break
 15458  		}
 15459  		c1 := auxIntToInt64(v_0_0.AuxInt)
 15460  		x := v_0_0.Args[0]
 15461  		if v_1.Op != OpARM64ANDconst {
 15462  			break
 15463  		}
 15464  		c2 := auxIntToInt64(v_1.AuxInt)
 15465  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
 15466  			break
 15467  		}
 15468  		v.reset(OpARM64REV16)
 15469  		v.AddArg(x)
 15470  		return true
 15471  	}
 15472  	// match: (ORshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
 15473  	// cond: (uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff)
 15474  	// result: (REV16 (ANDconst <x.Type> [0xffffffff] x))
 15475  	for {
 15476  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
 15477  			break
 15478  		}
 15479  		v_0_0 := v_0.Args[0]
 15480  		if v_0_0.Op != OpARM64ANDconst {
 15481  			break
 15482  		}
 15483  		c1 := auxIntToInt64(v_0_0.AuxInt)
 15484  		x := v_0_0.Args[0]
 15485  		if v_1.Op != OpARM64ANDconst {
 15486  			break
 15487  		}
 15488  		c2 := auxIntToInt64(v_1.AuxInt)
 15489  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
 15490  			break
 15491  		}
 15492  		v.reset(OpARM64REV16)
 15493  		v0 := b.NewValue0(v.Pos, OpARM64ANDconst, x.Type)
 15494  		v0.AuxInt = int64ToAuxInt(0xffffffff)
 15495  		v0.AddArg(x)
 15496  		v.AddArg(v0)
 15497  		return true
 15498  	}
 15499  	// match: ( ORshiftLL [c] (SRLconst x [64-c]) x2)
 15500  	// result: (EXTRconst [64-c] x2 x)
 15501  	for {
 15502  		c := auxIntToInt64(v.AuxInt)
 15503  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 64-c {
 15504  			break
 15505  		}
 15506  		x := v_0.Args[0]
 15507  		x2 := v_1
 15508  		v.reset(OpARM64EXTRconst)
 15509  		v.AuxInt = int64ToAuxInt(64 - c)
 15510  		v.AddArg2(x2, x)
 15511  		return true
 15512  	}
 15513  	// match: ( ORshiftLL <t> [c] (UBFX [bfc] x) x2)
 15514  	// cond: c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)
 15515  	// result: (EXTRWconst [32-c] x2 x)
 15516  	for {
 15517  		t := v.Type
 15518  		c := auxIntToInt64(v.AuxInt)
 15519  		if v_0.Op != OpARM64UBFX {
 15520  			break
 15521  		}
 15522  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 15523  		x := v_0.Args[0]
 15524  		x2 := v_1
 15525  		if !(c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)) {
 15526  			break
 15527  		}
 15528  		v.reset(OpARM64EXTRWconst)
 15529  		v.AuxInt = int64ToAuxInt(32 - c)
 15530  		v.AddArg2(x2, x)
 15531  		return true
 15532  	}
 15533  	// match: (ORshiftLL [s] (ANDconst [xc] x) (ANDconst [yc] y))
 15534  	// cond: xc == ^(yc << s) && yc & (yc+1) == 0 && yc > 0 && s+log64(yc+1) <= 64
 15535  	// result: (BFI [armBFAuxInt(s, log64(yc+1))] x y)
 15536  	for {
 15537  		s := auxIntToInt64(v.AuxInt)
 15538  		if v_0.Op != OpARM64ANDconst {
 15539  			break
 15540  		}
 15541  		xc := auxIntToInt64(v_0.AuxInt)
 15542  		x := v_0.Args[0]
 15543  		if v_1.Op != OpARM64ANDconst {
 15544  			break
 15545  		}
 15546  		yc := auxIntToInt64(v_1.AuxInt)
 15547  		y := v_1.Args[0]
 15548  		if !(xc == ^(yc<<s) && yc&(yc+1) == 0 && yc > 0 && s+log64(yc+1) <= 64) {
 15549  			break
 15550  		}
 15551  		v.reset(OpARM64BFI)
 15552  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(s, log64(yc+1)))
 15553  		v.AddArg2(x, y)
 15554  		return true
 15555  	}
 15556  	// match: (ORshiftLL [sc] (UBFX [bfc] x) (SRLconst [sc] y))
 15557  	// cond: sc == bfc.width()
 15558  	// result: (BFXIL [bfc] y x)
 15559  	for {
 15560  		sc := auxIntToInt64(v.AuxInt)
 15561  		if v_0.Op != OpARM64UBFX {
 15562  			break
 15563  		}
 15564  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 15565  		x := v_0.Args[0]
 15566  		if v_1.Op != OpARM64SRLconst || auxIntToInt64(v_1.AuxInt) != sc {
 15567  			break
 15568  		}
 15569  		y := v_1.Args[0]
 15570  		if !(sc == bfc.width()) {
 15571  			break
 15572  		}
 15573  		v.reset(OpARM64BFXIL)
 15574  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 15575  		v.AddArg2(y, x)
 15576  		return true
 15577  	}
 15578  	return false
 15579  }
 15580  func rewriteValueARM64_OpARM64ORshiftRA(v *Value) bool {
 15581  	v_1 := v.Args[1]
 15582  	v_0 := v.Args[0]
 15583  	b := v.Block
 15584  	// match: (ORshiftRA (MOVDconst [c]) x [d])
 15585  	// result: (ORconst [c] (SRAconst <x.Type> x [d]))
 15586  	for {
 15587  		d := auxIntToInt64(v.AuxInt)
 15588  		if v_0.Op != OpARM64MOVDconst {
 15589  			break
 15590  		}
 15591  		c := auxIntToInt64(v_0.AuxInt)
 15592  		x := v_1
 15593  		v.reset(OpARM64ORconst)
 15594  		v.AuxInt = int64ToAuxInt(c)
 15595  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
 15596  		v0.AuxInt = int64ToAuxInt(d)
 15597  		v0.AddArg(x)
 15598  		v.AddArg(v0)
 15599  		return true
 15600  	}
 15601  	// match: (ORshiftRA x (MOVDconst [c]) [d])
 15602  	// result: (ORconst x [c>>uint64(d)])
 15603  	for {
 15604  		d := auxIntToInt64(v.AuxInt)
 15605  		x := v_0
 15606  		if v_1.Op != OpARM64MOVDconst {
 15607  			break
 15608  		}
 15609  		c := auxIntToInt64(v_1.AuxInt)
 15610  		v.reset(OpARM64ORconst)
 15611  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
 15612  		v.AddArg(x)
 15613  		return true
 15614  	}
 15615  	// match: (ORshiftRA y:(SRAconst x [c]) x [c])
 15616  	// result: y
 15617  	for {
 15618  		c := auxIntToInt64(v.AuxInt)
 15619  		y := v_0
 15620  		if y.Op != OpARM64SRAconst || auxIntToInt64(y.AuxInt) != c {
 15621  			break
 15622  		}
 15623  		x := y.Args[0]
 15624  		if x != v_1 {
 15625  			break
 15626  		}
 15627  		v.copyOf(y)
 15628  		return true
 15629  	}
 15630  	return false
 15631  }
 15632  func rewriteValueARM64_OpARM64ORshiftRL(v *Value) bool {
 15633  	v_1 := v.Args[1]
 15634  	v_0 := v.Args[0]
 15635  	b := v.Block
 15636  	// match: (ORshiftRL (MOVDconst [c]) x [d])
 15637  	// result: (ORconst [c] (SRLconst <x.Type> x [d]))
 15638  	for {
 15639  		d := auxIntToInt64(v.AuxInt)
 15640  		if v_0.Op != OpARM64MOVDconst {
 15641  			break
 15642  		}
 15643  		c := auxIntToInt64(v_0.AuxInt)
 15644  		x := v_1
 15645  		v.reset(OpARM64ORconst)
 15646  		v.AuxInt = int64ToAuxInt(c)
 15647  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
 15648  		v0.AuxInt = int64ToAuxInt(d)
 15649  		v0.AddArg(x)
 15650  		v.AddArg(v0)
 15651  		return true
 15652  	}
 15653  	// match: (ORshiftRL x (MOVDconst [c]) [d])
 15654  	// result: (ORconst x [int64(uint64(c)>>uint64(d))])
 15655  	for {
 15656  		d := auxIntToInt64(v.AuxInt)
 15657  		x := v_0
 15658  		if v_1.Op != OpARM64MOVDconst {
 15659  			break
 15660  		}
 15661  		c := auxIntToInt64(v_1.AuxInt)
 15662  		v.reset(OpARM64ORconst)
 15663  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
 15664  		v.AddArg(x)
 15665  		return true
 15666  	}
 15667  	// match: (ORshiftRL y:(SRLconst x [c]) x [c])
 15668  	// result: y
 15669  	for {
 15670  		c := auxIntToInt64(v.AuxInt)
 15671  		y := v_0
 15672  		if y.Op != OpARM64SRLconst || auxIntToInt64(y.AuxInt) != c {
 15673  			break
 15674  		}
 15675  		x := y.Args[0]
 15676  		if x != v_1 {
 15677  			break
 15678  		}
 15679  		v.copyOf(y)
 15680  		return true
 15681  	}
 15682  	// match: (ORshiftRL [rc] (ANDconst [ac] x) (SLLconst [lc] y))
 15683  	// cond: lc > rc && ac == ^((1<<uint(64-lc)-1) << uint64(lc-rc))
 15684  	// result: (BFI [armBFAuxInt(lc-rc, 64-lc)] x y)
 15685  	for {
 15686  		rc := auxIntToInt64(v.AuxInt)
 15687  		if v_0.Op != OpARM64ANDconst {
 15688  			break
 15689  		}
 15690  		ac := auxIntToInt64(v_0.AuxInt)
 15691  		x := v_0.Args[0]
 15692  		if v_1.Op != OpARM64SLLconst {
 15693  			break
 15694  		}
 15695  		lc := auxIntToInt64(v_1.AuxInt)
 15696  		y := v_1.Args[0]
 15697  		if !(lc > rc && ac == ^((1<<uint(64-lc)-1)<<uint64(lc-rc))) {
 15698  			break
 15699  		}
 15700  		v.reset(OpARM64BFI)
 15701  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc-rc, 64-lc))
 15702  		v.AddArg2(x, y)
 15703  		return true
 15704  	}
 15705  	// match: (ORshiftRL [rc] (ANDconst [ac] y) (SLLconst [lc] x))
 15706  	// cond: lc < rc && ac == ^((1<<uint(64-rc)-1))
 15707  	// result: (BFXIL [armBFAuxInt(rc-lc, 64-rc)] y x)
 15708  	for {
 15709  		rc := auxIntToInt64(v.AuxInt)
 15710  		if v_0.Op != OpARM64ANDconst {
 15711  			break
 15712  		}
 15713  		ac := auxIntToInt64(v_0.AuxInt)
 15714  		y := v_0.Args[0]
 15715  		if v_1.Op != OpARM64SLLconst {
 15716  			break
 15717  		}
 15718  		lc := auxIntToInt64(v_1.AuxInt)
 15719  		x := v_1.Args[0]
 15720  		if !(lc < rc && ac == ^(1<<uint(64-rc)-1)) {
 15721  			break
 15722  		}
 15723  		v.reset(OpARM64BFXIL)
 15724  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc-lc, 64-rc))
 15725  		v.AddArg2(y, x)
 15726  		return true
 15727  	}
 15728  	return false
 15729  }
 15730  func rewriteValueARM64_OpARM64ORshiftRO(v *Value) bool {
 15731  	v_1 := v.Args[1]
 15732  	v_0 := v.Args[0]
 15733  	b := v.Block
 15734  	// match: (ORshiftRO (MOVDconst [c]) x [d])
 15735  	// result: (ORconst [c] (RORconst <x.Type> x [d]))
 15736  	for {
 15737  		d := auxIntToInt64(v.AuxInt)
 15738  		if v_0.Op != OpARM64MOVDconst {
 15739  			break
 15740  		}
 15741  		c := auxIntToInt64(v_0.AuxInt)
 15742  		x := v_1
 15743  		v.reset(OpARM64ORconst)
 15744  		v.AuxInt = int64ToAuxInt(c)
 15745  		v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
 15746  		v0.AuxInt = int64ToAuxInt(d)
 15747  		v0.AddArg(x)
 15748  		v.AddArg(v0)
 15749  		return true
 15750  	}
 15751  	// match: (ORshiftRO x (MOVDconst [c]) [d])
 15752  	// result: (ORconst x [rotateRight64(c, d)])
 15753  	for {
 15754  		d := auxIntToInt64(v.AuxInt)
 15755  		x := v_0
 15756  		if v_1.Op != OpARM64MOVDconst {
 15757  			break
 15758  		}
 15759  		c := auxIntToInt64(v_1.AuxInt)
 15760  		v.reset(OpARM64ORconst)
 15761  		v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
 15762  		v.AddArg(x)
 15763  		return true
 15764  	}
 15765  	// match: (ORshiftRO y:(RORconst x [c]) x [c])
 15766  	// result: y
 15767  	for {
 15768  		c := auxIntToInt64(v.AuxInt)
 15769  		y := v_0
 15770  		if y.Op != OpARM64RORconst || auxIntToInt64(y.AuxInt) != c {
 15771  			break
 15772  		}
 15773  		x := y.Args[0]
 15774  		if x != v_1 {
 15775  			break
 15776  		}
 15777  		v.copyOf(y)
 15778  		return true
 15779  	}
 15780  	return false
 15781  }
 15782  func rewriteValueARM64_OpARM64REV(v *Value) bool {
 15783  	v_0 := v.Args[0]
 15784  	// match: (REV (REV p))
 15785  	// result: p
 15786  	for {
 15787  		if v_0.Op != OpARM64REV {
 15788  			break
 15789  		}
 15790  		p := v_0.Args[0]
 15791  		v.copyOf(p)
 15792  		return true
 15793  	}
 15794  	return false
 15795  }
 15796  func rewriteValueARM64_OpARM64REV16(v *Value) bool {
 15797  	v_0 := v.Args[0]
 15798  	// match: (REV16 (MOVWUreg x))
 15799  	// result: (REV16W x)
 15800  	for {
 15801  		if v_0.Op != OpARM64MOVWUreg {
 15802  			break
 15803  		}
 15804  		x := v_0.Args[0]
 15805  		v.reset(OpARM64REV16W)
 15806  		v.AddArg(x)
 15807  		return true
 15808  	}
 15809  	return false
 15810  }
 15811  func rewriteValueARM64_OpARM64REVW(v *Value) bool {
 15812  	v_0 := v.Args[0]
 15813  	// match: (REVW (REVW p))
 15814  	// result: p
 15815  	for {
 15816  		if v_0.Op != OpARM64REVW {
 15817  			break
 15818  		}
 15819  		p := v_0.Args[0]
 15820  		v.copyOf(p)
 15821  		return true
 15822  	}
 15823  	return false
 15824  }
 15825  func rewriteValueARM64_OpARM64ROR(v *Value) bool {
 15826  	v_1 := v.Args[1]
 15827  	v_0 := v.Args[0]
 15828  	// match: (ROR x (MOVDconst [c]))
 15829  	// result: (RORconst x [c&63])
 15830  	for {
 15831  		x := v_0
 15832  		if v_1.Op != OpARM64MOVDconst {
 15833  			break
 15834  		}
 15835  		c := auxIntToInt64(v_1.AuxInt)
 15836  		v.reset(OpARM64RORconst)
 15837  		v.AuxInt = int64ToAuxInt(c & 63)
 15838  		v.AddArg(x)
 15839  		return true
 15840  	}
 15841  	return false
 15842  }
 15843  func rewriteValueARM64_OpARM64RORW(v *Value) bool {
 15844  	v_1 := v.Args[1]
 15845  	v_0 := v.Args[0]
 15846  	// match: (RORW x (MOVDconst [c]))
 15847  	// result: (RORWconst x [c&31])
 15848  	for {
 15849  		x := v_0
 15850  		if v_1.Op != OpARM64MOVDconst {
 15851  			break
 15852  		}
 15853  		c := auxIntToInt64(v_1.AuxInt)
 15854  		v.reset(OpARM64RORWconst)
 15855  		v.AuxInt = int64ToAuxInt(c & 31)
 15856  		v.AddArg(x)
 15857  		return true
 15858  	}
 15859  	return false
 15860  }
 15861  func rewriteValueARM64_OpARM64SBCSflags(v *Value) bool {
 15862  	v_2 := v.Args[2]
 15863  	v_1 := v.Args[1]
 15864  	v_0 := v.Args[0]
 15865  	b := v.Block
 15866  	typ := &b.Func.Config.Types
 15867  	// match: (SBCSflags x y (Select1 <types.TypeFlags> (NEGSflags (NEG <typ.UInt64> (NGCzerocarry <typ.UInt64> bo)))))
 15868  	// result: (SBCSflags x y bo)
 15869  	for {
 15870  		x := v_0
 15871  		y := v_1
 15872  		if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
 15873  			break
 15874  		}
 15875  		v_2_0 := v_2.Args[0]
 15876  		if v_2_0.Op != OpARM64NEGSflags {
 15877  			break
 15878  		}
 15879  		v_2_0_0 := v_2_0.Args[0]
 15880  		if v_2_0_0.Op != OpARM64NEG || v_2_0_0.Type != typ.UInt64 {
 15881  			break
 15882  		}
 15883  		v_2_0_0_0 := v_2_0_0.Args[0]
 15884  		if v_2_0_0_0.Op != OpARM64NGCzerocarry || v_2_0_0_0.Type != typ.UInt64 {
 15885  			break
 15886  		}
 15887  		bo := v_2_0_0_0.Args[0]
 15888  		v.reset(OpARM64SBCSflags)
 15889  		v.AddArg3(x, y, bo)
 15890  		return true
 15891  	}
 15892  	// match: (SBCSflags x y (Select1 <types.TypeFlags> (NEGSflags (MOVDconst [0]))))
 15893  	// result: (SUBSflags x y)
 15894  	for {
 15895  		x := v_0
 15896  		y := v_1
 15897  		if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
 15898  			break
 15899  		}
 15900  		v_2_0 := v_2.Args[0]
 15901  		if v_2_0.Op != OpARM64NEGSflags {
 15902  			break
 15903  		}
 15904  		v_2_0_0 := v_2_0.Args[0]
 15905  		if v_2_0_0.Op != OpARM64MOVDconst || auxIntToInt64(v_2_0_0.AuxInt) != 0 {
 15906  			break
 15907  		}
 15908  		v.reset(OpARM64SUBSflags)
 15909  		v.AddArg2(x, y)
 15910  		return true
 15911  	}
 15912  	return false
 15913  }
 15914  func rewriteValueARM64_OpARM64SBFX(v *Value) bool {
 15915  	v_0 := v.Args[0]
 15916  	// match: (SBFX [bfc] s:(SLLconst [sc] x))
 15917  	// cond: s.Uses == 1 && sc <= bfc.lsb()
 15918  	// result: (SBFX [armBFAuxInt(bfc.lsb() - sc, bfc.width())] x)
 15919  	for {
 15920  		bfc := auxIntToArm64BitField(v.AuxInt)
 15921  		s := v_0
 15922  		if s.Op != OpARM64SLLconst {
 15923  			break
 15924  		}
 15925  		sc := auxIntToInt64(s.AuxInt)
 15926  		x := s.Args[0]
 15927  		if !(s.Uses == 1 && sc <= bfc.lsb()) {
 15928  			break
 15929  		}
 15930  		v.reset(OpARM64SBFX)
 15931  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
 15932  		v.AddArg(x)
 15933  		return true
 15934  	}
 15935  	// match: (SBFX [bfc] s:(SLLconst [sc] x))
 15936  	// cond: s.Uses == 1 && sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()
 15937  	// result: (SBFIZ [armBFAuxInt(sc - bfc.lsb(), bfc.width() - (sc-bfc.lsb()))] x)
 15938  	for {
 15939  		bfc := auxIntToArm64BitField(v.AuxInt)
 15940  		s := v_0
 15941  		if s.Op != OpARM64SLLconst {
 15942  			break
 15943  		}
 15944  		sc := auxIntToInt64(s.AuxInt)
 15945  		x := s.Args[0]
 15946  		if !(s.Uses == 1 && sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()) {
 15947  			break
 15948  		}
 15949  		v.reset(OpARM64SBFIZ)
 15950  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.width()-(sc-bfc.lsb())))
 15951  		v.AddArg(x)
 15952  		return true
 15953  	}
 15954  	return false
 15955  }
 15956  func rewriteValueARM64_OpARM64SLL(v *Value) bool {
 15957  	v_1 := v.Args[1]
 15958  	v_0 := v.Args[0]
 15959  	// match: (SLL x (MOVDconst [c]))
 15960  	// result: (SLLconst x [c&63])
 15961  	for {
 15962  		x := v_0
 15963  		if v_1.Op != OpARM64MOVDconst {
 15964  			break
 15965  		}
 15966  		c := auxIntToInt64(v_1.AuxInt)
 15967  		v.reset(OpARM64SLLconst)
 15968  		v.AuxInt = int64ToAuxInt(c & 63)
 15969  		v.AddArg(x)
 15970  		return true
 15971  	}
 15972  	// match: (SLL x (ANDconst [63] y))
 15973  	// result: (SLL x y)
 15974  	for {
 15975  		x := v_0
 15976  		if v_1.Op != OpARM64ANDconst || auxIntToInt64(v_1.AuxInt) != 63 {
 15977  			break
 15978  		}
 15979  		y := v_1.Args[0]
 15980  		v.reset(OpARM64SLL)
 15981  		v.AddArg2(x, y)
 15982  		return true
 15983  	}
 15984  	return false
 15985  }
 15986  func rewriteValueARM64_OpARM64SLLconst(v *Value) bool {
 15987  	v_0 := v.Args[0]
 15988  	// match: (SLLconst [c] (MOVDconst [d]))
 15989  	// result: (MOVDconst [d<<uint64(c)])
 15990  	for {
 15991  		c := auxIntToInt64(v.AuxInt)
 15992  		if v_0.Op != OpARM64MOVDconst {
 15993  			break
 15994  		}
 15995  		d := auxIntToInt64(v_0.AuxInt)
 15996  		v.reset(OpARM64MOVDconst)
 15997  		v.AuxInt = int64ToAuxInt(d << uint64(c))
 15998  		return true
 15999  	}
 16000  	// match: (SLLconst [c] (SRLconst [c] x))
 16001  	// cond: 0 < c && c < 64
 16002  	// result: (ANDconst [^(1<<uint(c)-1)] x)
 16003  	for {
 16004  		c := auxIntToInt64(v.AuxInt)
 16005  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
 16006  			break
 16007  		}
 16008  		x := v_0.Args[0]
 16009  		if !(0 < c && c < 64) {
 16010  			break
 16011  		}
 16012  		v.reset(OpARM64ANDconst)
 16013  		v.AuxInt = int64ToAuxInt(^(1<<uint(c) - 1))
 16014  		v.AddArg(x)
 16015  		return true
 16016  	}
 16017  	// match: (SLLconst [lc] (MOVWreg x))
 16018  	// result: (SBFIZ [armBFAuxInt(lc, min(32, 64-lc))] x)
 16019  	for {
 16020  		lc := auxIntToInt64(v.AuxInt)
 16021  		if v_0.Op != OpARM64MOVWreg {
 16022  			break
 16023  		}
 16024  		x := v_0.Args[0]
 16025  		v.reset(OpARM64SBFIZ)
 16026  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(32, 64-lc)))
 16027  		v.AddArg(x)
 16028  		return true
 16029  	}
 16030  	// match: (SLLconst [lc] (MOVHreg x))
 16031  	// result: (SBFIZ [armBFAuxInt(lc, min(16, 64-lc))] x)
 16032  	for {
 16033  		lc := auxIntToInt64(v.AuxInt)
 16034  		if v_0.Op != OpARM64MOVHreg {
 16035  			break
 16036  		}
 16037  		x := v_0.Args[0]
 16038  		v.reset(OpARM64SBFIZ)
 16039  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(16, 64-lc)))
 16040  		v.AddArg(x)
 16041  		return true
 16042  	}
 16043  	// match: (SLLconst [lc] (MOVBreg x))
 16044  	// result: (SBFIZ [armBFAuxInt(lc, min(8, 64-lc))] x)
 16045  	for {
 16046  		lc := auxIntToInt64(v.AuxInt)
 16047  		if v_0.Op != OpARM64MOVBreg {
 16048  			break
 16049  		}
 16050  		x := v_0.Args[0]
 16051  		v.reset(OpARM64SBFIZ)
 16052  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(8, 64-lc)))
 16053  		v.AddArg(x)
 16054  		return true
 16055  	}
 16056  	// match: (SLLconst [lc] (MOVWUreg x))
 16057  	// result: (UBFIZ [armBFAuxInt(lc, min(32, 64-lc))] x)
 16058  	for {
 16059  		lc := auxIntToInt64(v.AuxInt)
 16060  		if v_0.Op != OpARM64MOVWUreg {
 16061  			break
 16062  		}
 16063  		x := v_0.Args[0]
 16064  		v.reset(OpARM64UBFIZ)
 16065  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(32, 64-lc)))
 16066  		v.AddArg(x)
 16067  		return true
 16068  	}
 16069  	// match: (SLLconst [lc] (MOVHUreg x))
 16070  	// result: (UBFIZ [armBFAuxInt(lc, min(16, 64-lc))] x)
 16071  	for {
 16072  		lc := auxIntToInt64(v.AuxInt)
 16073  		if v_0.Op != OpARM64MOVHUreg {
 16074  			break
 16075  		}
 16076  		x := v_0.Args[0]
 16077  		v.reset(OpARM64UBFIZ)
 16078  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(16, 64-lc)))
 16079  		v.AddArg(x)
 16080  		return true
 16081  	}
 16082  	// match: (SLLconst [lc] (MOVBUreg x))
 16083  	// result: (UBFIZ [armBFAuxInt(lc, min(8, 64-lc))] x)
 16084  	for {
 16085  		lc := auxIntToInt64(v.AuxInt)
 16086  		if v_0.Op != OpARM64MOVBUreg {
 16087  			break
 16088  		}
 16089  		x := v_0.Args[0]
 16090  		v.reset(OpARM64UBFIZ)
 16091  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(8, 64-lc)))
 16092  		v.AddArg(x)
 16093  		return true
 16094  	}
 16095  	// match: (SLLconst [sc] (ANDconst [ac] x))
 16096  	// cond: isARM64BFMask(sc, ac, 0)
 16097  	// result: (UBFIZ [armBFAuxInt(sc, arm64BFWidth(ac, 0))] x)
 16098  	for {
 16099  		sc := auxIntToInt64(v.AuxInt)
 16100  		if v_0.Op != OpARM64ANDconst {
 16101  			break
 16102  		}
 16103  		ac := auxIntToInt64(v_0.AuxInt)
 16104  		x := v_0.Args[0]
 16105  		if !(isARM64BFMask(sc, ac, 0)) {
 16106  			break
 16107  		}
 16108  		v.reset(OpARM64UBFIZ)
 16109  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, 0)))
 16110  		v.AddArg(x)
 16111  		return true
 16112  	}
 16113  	// match: (SLLconst [sc] (UBFIZ [bfc] x))
 16114  	// cond: sc+bfc.width()+bfc.lsb() < 64
 16115  	// result: (UBFIZ [armBFAuxInt(bfc.lsb()+sc, bfc.width())] x)
 16116  	for {
 16117  		sc := auxIntToInt64(v.AuxInt)
 16118  		if v_0.Op != OpARM64UBFIZ {
 16119  			break
 16120  		}
 16121  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 16122  		x := v_0.Args[0]
 16123  		if !(sc+bfc.width()+bfc.lsb() < 64) {
 16124  			break
 16125  		}
 16126  		v.reset(OpARM64UBFIZ)
 16127  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()))
 16128  		v.AddArg(x)
 16129  		return true
 16130  	}
 16131  	return false
 16132  }
 16133  func rewriteValueARM64_OpARM64SRA(v *Value) bool {
 16134  	v_1 := v.Args[1]
 16135  	v_0 := v.Args[0]
 16136  	// match: (SRA x (MOVDconst [c]))
 16137  	// result: (SRAconst x [c&63])
 16138  	for {
 16139  		x := v_0
 16140  		if v_1.Op != OpARM64MOVDconst {
 16141  			break
 16142  		}
 16143  		c := auxIntToInt64(v_1.AuxInt)
 16144  		v.reset(OpARM64SRAconst)
 16145  		v.AuxInt = int64ToAuxInt(c & 63)
 16146  		v.AddArg(x)
 16147  		return true
 16148  	}
 16149  	// match: (SRA x (ANDconst [63] y))
 16150  	// result: (SRA x y)
 16151  	for {
 16152  		x := v_0
 16153  		if v_1.Op != OpARM64ANDconst || auxIntToInt64(v_1.AuxInt) != 63 {
 16154  			break
 16155  		}
 16156  		y := v_1.Args[0]
 16157  		v.reset(OpARM64SRA)
 16158  		v.AddArg2(x, y)
 16159  		return true
 16160  	}
 16161  	return false
 16162  }
 16163  func rewriteValueARM64_OpARM64SRAconst(v *Value) bool {
 16164  	v_0 := v.Args[0]
 16165  	// match: (SRAconst [c] (MOVDconst [d]))
 16166  	// result: (MOVDconst [d>>uint64(c)])
 16167  	for {
 16168  		c := auxIntToInt64(v.AuxInt)
 16169  		if v_0.Op != OpARM64MOVDconst {
 16170  			break
 16171  		}
 16172  		d := auxIntToInt64(v_0.AuxInt)
 16173  		v.reset(OpARM64MOVDconst)
 16174  		v.AuxInt = int64ToAuxInt(d >> uint64(c))
 16175  		return true
 16176  	}
 16177  	// match: (SRAconst [rc] (SLLconst [lc] x))
 16178  	// cond: lc > rc
 16179  	// result: (SBFIZ [armBFAuxInt(lc-rc, 64-lc)] x)
 16180  	for {
 16181  		rc := auxIntToInt64(v.AuxInt)
 16182  		if v_0.Op != OpARM64SLLconst {
 16183  			break
 16184  		}
 16185  		lc := auxIntToInt64(v_0.AuxInt)
 16186  		x := v_0.Args[0]
 16187  		if !(lc > rc) {
 16188  			break
 16189  		}
 16190  		v.reset(OpARM64SBFIZ)
 16191  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc-rc, 64-lc))
 16192  		v.AddArg(x)
 16193  		return true
 16194  	}
 16195  	// match: (SRAconst [rc] (SLLconst [lc] x))
 16196  	// cond: lc <= rc
 16197  	// result: (SBFX [armBFAuxInt(rc-lc, 64-rc)] x)
 16198  	for {
 16199  		rc := auxIntToInt64(v.AuxInt)
 16200  		if v_0.Op != OpARM64SLLconst {
 16201  			break
 16202  		}
 16203  		lc := auxIntToInt64(v_0.AuxInt)
 16204  		x := v_0.Args[0]
 16205  		if !(lc <= rc) {
 16206  			break
 16207  		}
 16208  		v.reset(OpARM64SBFX)
 16209  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc-lc, 64-rc))
 16210  		v.AddArg(x)
 16211  		return true
 16212  	}
 16213  	// match: (SRAconst [rc] (MOVWreg x))
 16214  	// cond: rc < 32
 16215  	// result: (SBFX [armBFAuxInt(rc, 32-rc)] x)
 16216  	for {
 16217  		rc := auxIntToInt64(v.AuxInt)
 16218  		if v_0.Op != OpARM64MOVWreg {
 16219  			break
 16220  		}
 16221  		x := v_0.Args[0]
 16222  		if !(rc < 32) {
 16223  			break
 16224  		}
 16225  		v.reset(OpARM64SBFX)
 16226  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 32-rc))
 16227  		v.AddArg(x)
 16228  		return true
 16229  	}
 16230  	// match: (SRAconst [rc] (MOVHreg x))
 16231  	// cond: rc < 16
 16232  	// result: (SBFX [armBFAuxInt(rc, 16-rc)] x)
 16233  	for {
 16234  		rc := auxIntToInt64(v.AuxInt)
 16235  		if v_0.Op != OpARM64MOVHreg {
 16236  			break
 16237  		}
 16238  		x := v_0.Args[0]
 16239  		if !(rc < 16) {
 16240  			break
 16241  		}
 16242  		v.reset(OpARM64SBFX)
 16243  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 16-rc))
 16244  		v.AddArg(x)
 16245  		return true
 16246  	}
 16247  	// match: (SRAconst [rc] (MOVBreg x))
 16248  	// cond: rc < 8
 16249  	// result: (SBFX [armBFAuxInt(rc, 8-rc)] x)
 16250  	for {
 16251  		rc := auxIntToInt64(v.AuxInt)
 16252  		if v_0.Op != OpARM64MOVBreg {
 16253  			break
 16254  		}
 16255  		x := v_0.Args[0]
 16256  		if !(rc < 8) {
 16257  			break
 16258  		}
 16259  		v.reset(OpARM64SBFX)
 16260  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 8-rc))
 16261  		v.AddArg(x)
 16262  		return true
 16263  	}
 16264  	// match: (SRAconst [sc] (SBFIZ [bfc] x))
 16265  	// cond: sc < bfc.lsb()
 16266  	// result: (SBFIZ [armBFAuxInt(bfc.lsb()-sc, bfc.width())] x)
 16267  	for {
 16268  		sc := auxIntToInt64(v.AuxInt)
 16269  		if v_0.Op != OpARM64SBFIZ {
 16270  			break
 16271  		}
 16272  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 16273  		x := v_0.Args[0]
 16274  		if !(sc < bfc.lsb()) {
 16275  			break
 16276  		}
 16277  		v.reset(OpARM64SBFIZ)
 16278  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
 16279  		v.AddArg(x)
 16280  		return true
 16281  	}
 16282  	// match: (SRAconst [sc] (SBFIZ [bfc] x))
 16283  	// cond: sc >= bfc.lsb() && sc < bfc.lsb()+bfc.width()
 16284  	// result: (SBFX [armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc)] x)
 16285  	for {
 16286  		sc := auxIntToInt64(v.AuxInt)
 16287  		if v_0.Op != OpARM64SBFIZ {
 16288  			break
 16289  		}
 16290  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 16291  		x := v_0.Args[0]
 16292  		if !(sc >= bfc.lsb() && sc < bfc.lsb()+bfc.width()) {
 16293  			break
 16294  		}
 16295  		v.reset(OpARM64SBFX)
 16296  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc))
 16297  		v.AddArg(x)
 16298  		return true
 16299  	}
 16300  	return false
 16301  }
 16302  func rewriteValueARM64_OpARM64SRL(v *Value) bool {
 16303  	v_1 := v.Args[1]
 16304  	v_0 := v.Args[0]
 16305  	// match: (SRL x (MOVDconst [c]))
 16306  	// result: (SRLconst x [c&63])
 16307  	for {
 16308  		x := v_0
 16309  		if v_1.Op != OpARM64MOVDconst {
 16310  			break
 16311  		}
 16312  		c := auxIntToInt64(v_1.AuxInt)
 16313  		v.reset(OpARM64SRLconst)
 16314  		v.AuxInt = int64ToAuxInt(c & 63)
 16315  		v.AddArg(x)
 16316  		return true
 16317  	}
 16318  	// match: (SRL x (ANDconst [63] y))
 16319  	// result: (SRL x y)
 16320  	for {
 16321  		x := v_0
 16322  		if v_1.Op != OpARM64ANDconst || auxIntToInt64(v_1.AuxInt) != 63 {
 16323  			break
 16324  		}
 16325  		y := v_1.Args[0]
 16326  		v.reset(OpARM64SRL)
 16327  		v.AddArg2(x, y)
 16328  		return true
 16329  	}
 16330  	return false
 16331  }
 16332  func rewriteValueARM64_OpARM64SRLconst(v *Value) bool {
 16333  	v_0 := v.Args[0]
 16334  	// match: (SRLconst [c] (MOVDconst [d]))
 16335  	// result: (MOVDconst [int64(uint64(d)>>uint64(c))])
 16336  	for {
 16337  		c := auxIntToInt64(v.AuxInt)
 16338  		if v_0.Op != OpARM64MOVDconst {
 16339  			break
 16340  		}
 16341  		d := auxIntToInt64(v_0.AuxInt)
 16342  		v.reset(OpARM64MOVDconst)
 16343  		v.AuxInt = int64ToAuxInt(int64(uint64(d) >> uint64(c)))
 16344  		return true
 16345  	}
 16346  	// match: (SRLconst [c] (SLLconst [c] x))
 16347  	// cond: 0 < c && c < 64
 16348  	// result: (ANDconst [1<<uint(64-c)-1] x)
 16349  	for {
 16350  		c := auxIntToInt64(v.AuxInt)
 16351  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
 16352  			break
 16353  		}
 16354  		x := v_0.Args[0]
 16355  		if !(0 < c && c < 64) {
 16356  			break
 16357  		}
 16358  		v.reset(OpARM64ANDconst)
 16359  		v.AuxInt = int64ToAuxInt(1<<uint(64-c) - 1)
 16360  		v.AddArg(x)
 16361  		return true
 16362  	}
 16363  	// match: (SRLconst [rc] (MOVWUreg x))
 16364  	// cond: rc >= 32
 16365  	// result: (MOVDconst [0])
 16366  	for {
 16367  		rc := auxIntToInt64(v.AuxInt)
 16368  		if v_0.Op != OpARM64MOVWUreg {
 16369  			break
 16370  		}
 16371  		if !(rc >= 32) {
 16372  			break
 16373  		}
 16374  		v.reset(OpARM64MOVDconst)
 16375  		v.AuxInt = int64ToAuxInt(0)
 16376  		return true
 16377  	}
 16378  	// match: (SRLconst [rc] (MOVHUreg x))
 16379  	// cond: rc >= 16
 16380  	// result: (MOVDconst [0])
 16381  	for {
 16382  		rc := auxIntToInt64(v.AuxInt)
 16383  		if v_0.Op != OpARM64MOVHUreg {
 16384  			break
 16385  		}
 16386  		if !(rc >= 16) {
 16387  			break
 16388  		}
 16389  		v.reset(OpARM64MOVDconst)
 16390  		v.AuxInt = int64ToAuxInt(0)
 16391  		return true
 16392  	}
 16393  	// match: (SRLconst [rc] (MOVBUreg x))
 16394  	// cond: rc >= 8
 16395  	// result: (MOVDconst [0])
 16396  	for {
 16397  		rc := auxIntToInt64(v.AuxInt)
 16398  		if v_0.Op != OpARM64MOVBUreg {
 16399  			break
 16400  		}
 16401  		if !(rc >= 8) {
 16402  			break
 16403  		}
 16404  		v.reset(OpARM64MOVDconst)
 16405  		v.AuxInt = int64ToAuxInt(0)
 16406  		return true
 16407  	}
 16408  	// match: (SRLconst [rc] (SLLconst [lc] x))
 16409  	// cond: lc > rc
 16410  	// result: (UBFIZ [armBFAuxInt(lc-rc, 64-lc)] x)
 16411  	for {
 16412  		rc := auxIntToInt64(v.AuxInt)
 16413  		if v_0.Op != OpARM64SLLconst {
 16414  			break
 16415  		}
 16416  		lc := auxIntToInt64(v_0.AuxInt)
 16417  		x := v_0.Args[0]
 16418  		if !(lc > rc) {
 16419  			break
 16420  		}
 16421  		v.reset(OpARM64UBFIZ)
 16422  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc-rc, 64-lc))
 16423  		v.AddArg(x)
 16424  		return true
 16425  	}
 16426  	// match: (SRLconst [rc] (SLLconst [lc] x))
 16427  	// cond: lc < rc
 16428  	// result: (UBFX [armBFAuxInt(rc-lc, 64-rc)] x)
 16429  	for {
 16430  		rc := auxIntToInt64(v.AuxInt)
 16431  		if v_0.Op != OpARM64SLLconst {
 16432  			break
 16433  		}
 16434  		lc := auxIntToInt64(v_0.AuxInt)
 16435  		x := v_0.Args[0]
 16436  		if !(lc < rc) {
 16437  			break
 16438  		}
 16439  		v.reset(OpARM64UBFX)
 16440  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc-lc, 64-rc))
 16441  		v.AddArg(x)
 16442  		return true
 16443  	}
 16444  	// match: (SRLconst [rc] (MOVWUreg x))
 16445  	// cond: rc < 32
 16446  	// result: (UBFX [armBFAuxInt(rc, 32-rc)] x)
 16447  	for {
 16448  		rc := auxIntToInt64(v.AuxInt)
 16449  		if v_0.Op != OpARM64MOVWUreg {
 16450  			break
 16451  		}
 16452  		x := v_0.Args[0]
 16453  		if !(rc < 32) {
 16454  			break
 16455  		}
 16456  		v.reset(OpARM64UBFX)
 16457  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 32-rc))
 16458  		v.AddArg(x)
 16459  		return true
 16460  	}
 16461  	// match: (SRLconst [rc] (MOVHUreg x))
 16462  	// cond: rc < 16
 16463  	// result: (UBFX [armBFAuxInt(rc, 16-rc)] x)
 16464  	for {
 16465  		rc := auxIntToInt64(v.AuxInt)
 16466  		if v_0.Op != OpARM64MOVHUreg {
 16467  			break
 16468  		}
 16469  		x := v_0.Args[0]
 16470  		if !(rc < 16) {
 16471  			break
 16472  		}
 16473  		v.reset(OpARM64UBFX)
 16474  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 16-rc))
 16475  		v.AddArg(x)
 16476  		return true
 16477  	}
 16478  	// match: (SRLconst [rc] (MOVBUreg x))
 16479  	// cond: rc < 8
 16480  	// result: (UBFX [armBFAuxInt(rc, 8-rc)] x)
 16481  	for {
 16482  		rc := auxIntToInt64(v.AuxInt)
 16483  		if v_0.Op != OpARM64MOVBUreg {
 16484  			break
 16485  		}
 16486  		x := v_0.Args[0]
 16487  		if !(rc < 8) {
 16488  			break
 16489  		}
 16490  		v.reset(OpARM64UBFX)
 16491  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 8-rc))
 16492  		v.AddArg(x)
 16493  		return true
 16494  	}
 16495  	// match: (SRLconst [sc] (ANDconst [ac] x))
 16496  	// cond: isARM64BFMask(sc, ac, sc)
 16497  	// result: (UBFX [armBFAuxInt(sc, arm64BFWidth(ac, sc))] x)
 16498  	for {
 16499  		sc := auxIntToInt64(v.AuxInt)
 16500  		if v_0.Op != OpARM64ANDconst {
 16501  			break
 16502  		}
 16503  		ac := auxIntToInt64(v_0.AuxInt)
 16504  		x := v_0.Args[0]
 16505  		if !(isARM64BFMask(sc, ac, sc)) {
 16506  			break
 16507  		}
 16508  		v.reset(OpARM64UBFX)
 16509  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, sc)))
 16510  		v.AddArg(x)
 16511  		return true
 16512  	}
 16513  	// match: (SRLconst [sc] (UBFX [bfc] x))
 16514  	// cond: sc < bfc.width()
 16515  	// result: (UBFX [armBFAuxInt(bfc.lsb()+sc, bfc.width()-sc)] x)
 16516  	for {
 16517  		sc := auxIntToInt64(v.AuxInt)
 16518  		if v_0.Op != OpARM64UBFX {
 16519  			break
 16520  		}
 16521  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 16522  		x := v_0.Args[0]
 16523  		if !(sc < bfc.width()) {
 16524  			break
 16525  		}
 16526  		v.reset(OpARM64UBFX)
 16527  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()-sc))
 16528  		v.AddArg(x)
 16529  		return true
 16530  	}
 16531  	// match: (SRLconst [sc] (UBFIZ [bfc] x))
 16532  	// cond: sc == bfc.lsb()
 16533  	// result: (ANDconst [1<<uint(bfc.width())-1] x)
 16534  	for {
 16535  		sc := auxIntToInt64(v.AuxInt)
 16536  		if v_0.Op != OpARM64UBFIZ {
 16537  			break
 16538  		}
 16539  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 16540  		x := v_0.Args[0]
 16541  		if !(sc == bfc.lsb()) {
 16542  			break
 16543  		}
 16544  		v.reset(OpARM64ANDconst)
 16545  		v.AuxInt = int64ToAuxInt(1<<uint(bfc.width()) - 1)
 16546  		v.AddArg(x)
 16547  		return true
 16548  	}
 16549  	// match: (SRLconst [sc] (UBFIZ [bfc] x))
 16550  	// cond: sc < bfc.lsb()
 16551  	// result: (UBFIZ [armBFAuxInt(bfc.lsb()-sc, bfc.width())] x)
 16552  	for {
 16553  		sc := auxIntToInt64(v.AuxInt)
 16554  		if v_0.Op != OpARM64UBFIZ {
 16555  			break
 16556  		}
 16557  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 16558  		x := v_0.Args[0]
 16559  		if !(sc < bfc.lsb()) {
 16560  			break
 16561  		}
 16562  		v.reset(OpARM64UBFIZ)
 16563  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
 16564  		v.AddArg(x)
 16565  		return true
 16566  	}
 16567  	// match: (SRLconst [sc] (UBFIZ [bfc] x))
 16568  	// cond: sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()
 16569  	// result: (UBFX [armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc)] x)
 16570  	for {
 16571  		sc := auxIntToInt64(v.AuxInt)
 16572  		if v_0.Op != OpARM64UBFIZ {
 16573  			break
 16574  		}
 16575  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 16576  		x := v_0.Args[0]
 16577  		if !(sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()) {
 16578  			break
 16579  		}
 16580  		v.reset(OpARM64UBFX)
 16581  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc))
 16582  		v.AddArg(x)
 16583  		return true
 16584  	}
 16585  	return false
 16586  }
 16587  func rewriteValueARM64_OpARM64STP(v *Value) bool {
 16588  	v_3 := v.Args[3]
 16589  	v_2 := v.Args[2]
 16590  	v_1 := v.Args[1]
 16591  	v_0 := v.Args[0]
 16592  	b := v.Block
 16593  	config := b.Func.Config
 16594  	// match: (STP [off1] {sym} (ADDconst [off2] ptr) val1 val2 mem)
 16595  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 16596  	// result: (STP [off1+int32(off2)] {sym} ptr val1 val2 mem)
 16597  	for {
 16598  		off1 := auxIntToInt32(v.AuxInt)
 16599  		sym := auxToSym(v.Aux)
 16600  		if v_0.Op != OpARM64ADDconst {
 16601  			break
 16602  		}
 16603  		off2 := auxIntToInt64(v_0.AuxInt)
 16604  		ptr := v_0.Args[0]
 16605  		val1 := v_1
 16606  		val2 := v_2
 16607  		mem := v_3
 16608  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 16609  			break
 16610  		}
 16611  		v.reset(OpARM64STP)
 16612  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 16613  		v.Aux = symToAux(sym)
 16614  		v.AddArg4(ptr, val1, val2, mem)
 16615  		return true
 16616  	}
 16617  	// match: (STP [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val1 val2 mem)
 16618  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 16619  	// result: (STP [off1+off2] {mergeSym(sym1,sym2)} ptr val1 val2 mem)
 16620  	for {
 16621  		off1 := auxIntToInt32(v.AuxInt)
 16622  		sym1 := auxToSym(v.Aux)
 16623  		if v_0.Op != OpARM64MOVDaddr {
 16624  			break
 16625  		}
 16626  		off2 := auxIntToInt32(v_0.AuxInt)
 16627  		sym2 := auxToSym(v_0.Aux)
 16628  		ptr := v_0.Args[0]
 16629  		val1 := v_1
 16630  		val2 := v_2
 16631  		mem := v_3
 16632  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 16633  			break
 16634  		}
 16635  		v.reset(OpARM64STP)
 16636  		v.AuxInt = int32ToAuxInt(off1 + off2)
 16637  		v.Aux = symToAux(mergeSym(sym1, sym2))
 16638  		v.AddArg4(ptr, val1, val2, mem)
 16639  		return true
 16640  	}
 16641  	return false
 16642  }
 16643  func rewriteValueARM64_OpARM64SUB(v *Value) bool {
 16644  	v_1 := v.Args[1]
 16645  	v_0 := v.Args[0]
 16646  	b := v.Block
 16647  	// match: (SUB x (MOVDconst [c]))
 16648  	// result: (SUBconst [c] x)
 16649  	for {
 16650  		x := v_0
 16651  		if v_1.Op != OpARM64MOVDconst {
 16652  			break
 16653  		}
 16654  		c := auxIntToInt64(v_1.AuxInt)
 16655  		v.reset(OpARM64SUBconst)
 16656  		v.AuxInt = int64ToAuxInt(c)
 16657  		v.AddArg(x)
 16658  		return true
 16659  	}
 16660  	// match: (SUB a l:(MUL x y))
 16661  	// cond: l.Uses==1 && clobber(l)
 16662  	// result: (MSUB a x y)
 16663  	for {
 16664  		a := v_0
 16665  		l := v_1
 16666  		if l.Op != OpARM64MUL {
 16667  			break
 16668  		}
 16669  		y := l.Args[1]
 16670  		x := l.Args[0]
 16671  		if !(l.Uses == 1 && clobber(l)) {
 16672  			break
 16673  		}
 16674  		v.reset(OpARM64MSUB)
 16675  		v.AddArg3(a, x, y)
 16676  		return true
 16677  	}
 16678  	// match: (SUB a l:(MNEG x y))
 16679  	// cond: l.Uses==1 && clobber(l)
 16680  	// result: (MADD a x y)
 16681  	for {
 16682  		a := v_0
 16683  		l := v_1
 16684  		if l.Op != OpARM64MNEG {
 16685  			break
 16686  		}
 16687  		y := l.Args[1]
 16688  		x := l.Args[0]
 16689  		if !(l.Uses == 1 && clobber(l)) {
 16690  			break
 16691  		}
 16692  		v.reset(OpARM64MADD)
 16693  		v.AddArg3(a, x, y)
 16694  		return true
 16695  	}
 16696  	// match: (SUB a l:(MULW x y))
 16697  	// cond: v.Type.Size() <= 4 && l.Uses==1 && clobber(l)
 16698  	// result: (MSUBW a x y)
 16699  	for {
 16700  		a := v_0
 16701  		l := v_1
 16702  		if l.Op != OpARM64MULW {
 16703  			break
 16704  		}
 16705  		y := l.Args[1]
 16706  		x := l.Args[0]
 16707  		if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
 16708  			break
 16709  		}
 16710  		v.reset(OpARM64MSUBW)
 16711  		v.AddArg3(a, x, y)
 16712  		return true
 16713  	}
 16714  	// match: (SUB a l:(MNEGW x y))
 16715  	// cond: v.Type.Size() <= 4 && l.Uses==1 && clobber(l)
 16716  	// result: (MADDW a x y)
 16717  	for {
 16718  		a := v_0
 16719  		l := v_1
 16720  		if l.Op != OpARM64MNEGW {
 16721  			break
 16722  		}
 16723  		y := l.Args[1]
 16724  		x := l.Args[0]
 16725  		if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
 16726  			break
 16727  		}
 16728  		v.reset(OpARM64MADDW)
 16729  		v.AddArg3(a, x, y)
 16730  		return true
 16731  	}
 16732  	// match: (SUB <t> a p:(ADDconst [c] m:(MUL _ _)))
 16733  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 16734  	// result: (SUBconst [c] (SUB <v.Type> a m))
 16735  	for {
 16736  		t := v.Type
 16737  		a := v_0
 16738  		p := v_1
 16739  		if p.Op != OpARM64ADDconst {
 16740  			break
 16741  		}
 16742  		c := auxIntToInt64(p.AuxInt)
 16743  		m := p.Args[0]
 16744  		if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 16745  			break
 16746  		}
 16747  		v.reset(OpARM64SUBconst)
 16748  		v.AuxInt = int64ToAuxInt(c)
 16749  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 16750  		v0.AddArg2(a, m)
 16751  		v.AddArg(v0)
 16752  		return true
 16753  	}
 16754  	// match: (SUB <t> a p:(ADDconst [c] m:(MULW _ _)))
 16755  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 16756  	// result: (SUBconst [c] (SUB <v.Type> a m))
 16757  	for {
 16758  		t := v.Type
 16759  		a := v_0
 16760  		p := v_1
 16761  		if p.Op != OpARM64ADDconst {
 16762  			break
 16763  		}
 16764  		c := auxIntToInt64(p.AuxInt)
 16765  		m := p.Args[0]
 16766  		if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 16767  			break
 16768  		}
 16769  		v.reset(OpARM64SUBconst)
 16770  		v.AuxInt = int64ToAuxInt(c)
 16771  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 16772  		v0.AddArg2(a, m)
 16773  		v.AddArg(v0)
 16774  		return true
 16775  	}
 16776  	// match: (SUB <t> a p:(ADDconst [c] m:(MNEG _ _)))
 16777  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 16778  	// result: (SUBconst [c] (SUB <v.Type> a m))
 16779  	for {
 16780  		t := v.Type
 16781  		a := v_0
 16782  		p := v_1
 16783  		if p.Op != OpARM64ADDconst {
 16784  			break
 16785  		}
 16786  		c := auxIntToInt64(p.AuxInt)
 16787  		m := p.Args[0]
 16788  		if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 16789  			break
 16790  		}
 16791  		v.reset(OpARM64SUBconst)
 16792  		v.AuxInt = int64ToAuxInt(c)
 16793  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 16794  		v0.AddArg2(a, m)
 16795  		v.AddArg(v0)
 16796  		return true
 16797  	}
 16798  	// match: (SUB <t> a p:(ADDconst [c] m:(MNEGW _ _)))
 16799  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 16800  	// result: (SUBconst [c] (SUB <v.Type> a m))
 16801  	for {
 16802  		t := v.Type
 16803  		a := v_0
 16804  		p := v_1
 16805  		if p.Op != OpARM64ADDconst {
 16806  			break
 16807  		}
 16808  		c := auxIntToInt64(p.AuxInt)
 16809  		m := p.Args[0]
 16810  		if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 16811  			break
 16812  		}
 16813  		v.reset(OpARM64SUBconst)
 16814  		v.AuxInt = int64ToAuxInt(c)
 16815  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 16816  		v0.AddArg2(a, m)
 16817  		v.AddArg(v0)
 16818  		return true
 16819  	}
 16820  	// match: (SUB <t> a p:(SUBconst [c] m:(MUL _ _)))
 16821  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 16822  	// result: (ADDconst [c] (SUB <v.Type> a m))
 16823  	for {
 16824  		t := v.Type
 16825  		a := v_0
 16826  		p := v_1
 16827  		if p.Op != OpARM64SUBconst {
 16828  			break
 16829  		}
 16830  		c := auxIntToInt64(p.AuxInt)
 16831  		m := p.Args[0]
 16832  		if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 16833  			break
 16834  		}
 16835  		v.reset(OpARM64ADDconst)
 16836  		v.AuxInt = int64ToAuxInt(c)
 16837  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 16838  		v0.AddArg2(a, m)
 16839  		v.AddArg(v0)
 16840  		return true
 16841  	}
 16842  	// match: (SUB <t> a p:(SUBconst [c] m:(MULW _ _)))
 16843  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 16844  	// result: (ADDconst [c] (SUB <v.Type> a m))
 16845  	for {
 16846  		t := v.Type
 16847  		a := v_0
 16848  		p := v_1
 16849  		if p.Op != OpARM64SUBconst {
 16850  			break
 16851  		}
 16852  		c := auxIntToInt64(p.AuxInt)
 16853  		m := p.Args[0]
 16854  		if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 16855  			break
 16856  		}
 16857  		v.reset(OpARM64ADDconst)
 16858  		v.AuxInt = int64ToAuxInt(c)
 16859  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 16860  		v0.AddArg2(a, m)
 16861  		v.AddArg(v0)
 16862  		return true
 16863  	}
 16864  	// match: (SUB <t> a p:(SUBconst [c] m:(MNEG _ _)))
 16865  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 16866  	// result: (ADDconst [c] (SUB <v.Type> a m))
 16867  	for {
 16868  		t := v.Type
 16869  		a := v_0
 16870  		p := v_1
 16871  		if p.Op != OpARM64SUBconst {
 16872  			break
 16873  		}
 16874  		c := auxIntToInt64(p.AuxInt)
 16875  		m := p.Args[0]
 16876  		if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 16877  			break
 16878  		}
 16879  		v.reset(OpARM64ADDconst)
 16880  		v.AuxInt = int64ToAuxInt(c)
 16881  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 16882  		v0.AddArg2(a, m)
 16883  		v.AddArg(v0)
 16884  		return true
 16885  	}
 16886  	// match: (SUB <t> a p:(SUBconst [c] m:(MNEGW _ _)))
 16887  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 16888  	// result: (ADDconst [c] (SUB <v.Type> a m))
 16889  	for {
 16890  		t := v.Type
 16891  		a := v_0
 16892  		p := v_1
 16893  		if p.Op != OpARM64SUBconst {
 16894  			break
 16895  		}
 16896  		c := auxIntToInt64(p.AuxInt)
 16897  		m := p.Args[0]
 16898  		if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 16899  			break
 16900  		}
 16901  		v.reset(OpARM64ADDconst)
 16902  		v.AuxInt = int64ToAuxInt(c)
 16903  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 16904  		v0.AddArg2(a, m)
 16905  		v.AddArg(v0)
 16906  		return true
 16907  	}
 16908  	// match: (SUB x (NEG y))
 16909  	// result: (ADD x y)
 16910  	for {
 16911  		x := v_0
 16912  		if v_1.Op != OpARM64NEG {
 16913  			break
 16914  		}
 16915  		y := v_1.Args[0]
 16916  		v.reset(OpARM64ADD)
 16917  		v.AddArg2(x, y)
 16918  		return true
 16919  	}
 16920  	// match: (SUB x x)
 16921  	// result: (MOVDconst [0])
 16922  	for {
 16923  		x := v_0
 16924  		if x != v_1 {
 16925  			break
 16926  		}
 16927  		v.reset(OpARM64MOVDconst)
 16928  		v.AuxInt = int64ToAuxInt(0)
 16929  		return true
 16930  	}
 16931  	// match: (SUB x (SUB y z))
 16932  	// result: (SUB (ADD <v.Type> x z) y)
 16933  	for {
 16934  		x := v_0
 16935  		if v_1.Op != OpARM64SUB {
 16936  			break
 16937  		}
 16938  		z := v_1.Args[1]
 16939  		y := v_1.Args[0]
 16940  		v.reset(OpARM64SUB)
 16941  		v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
 16942  		v0.AddArg2(x, z)
 16943  		v.AddArg2(v0, y)
 16944  		return true
 16945  	}
 16946  	// match: (SUB (SUB x y) z)
 16947  	// result: (SUB x (ADD <y.Type> y z))
 16948  	for {
 16949  		if v_0.Op != OpARM64SUB {
 16950  			break
 16951  		}
 16952  		y := v_0.Args[1]
 16953  		x := v_0.Args[0]
 16954  		z := v_1
 16955  		v.reset(OpARM64SUB)
 16956  		v0 := b.NewValue0(v.Pos, OpARM64ADD, y.Type)
 16957  		v0.AddArg2(y, z)
 16958  		v.AddArg2(x, v0)
 16959  		return true
 16960  	}
 16961  	// match: (SUB x0 x1:(SLLconst [c] y))
 16962  	// cond: clobberIfDead(x1)
 16963  	// result: (SUBshiftLL x0 y [c])
 16964  	for {
 16965  		x0 := v_0
 16966  		x1 := v_1
 16967  		if x1.Op != OpARM64SLLconst {
 16968  			break
 16969  		}
 16970  		c := auxIntToInt64(x1.AuxInt)
 16971  		y := x1.Args[0]
 16972  		if !(clobberIfDead(x1)) {
 16973  			break
 16974  		}
 16975  		v.reset(OpARM64SUBshiftLL)
 16976  		v.AuxInt = int64ToAuxInt(c)
 16977  		v.AddArg2(x0, y)
 16978  		return true
 16979  	}
 16980  	// match: (SUB x0 x1:(SRLconst [c] y))
 16981  	// cond: clobberIfDead(x1)
 16982  	// result: (SUBshiftRL x0 y [c])
 16983  	for {
 16984  		x0 := v_0
 16985  		x1 := v_1
 16986  		if x1.Op != OpARM64SRLconst {
 16987  			break
 16988  		}
 16989  		c := auxIntToInt64(x1.AuxInt)
 16990  		y := x1.Args[0]
 16991  		if !(clobberIfDead(x1)) {
 16992  			break
 16993  		}
 16994  		v.reset(OpARM64SUBshiftRL)
 16995  		v.AuxInt = int64ToAuxInt(c)
 16996  		v.AddArg2(x0, y)
 16997  		return true
 16998  	}
 16999  	// match: (SUB x0 x1:(SRAconst [c] y))
 17000  	// cond: clobberIfDead(x1)
 17001  	// result: (SUBshiftRA x0 y [c])
 17002  	for {
 17003  		x0 := v_0
 17004  		x1 := v_1
 17005  		if x1.Op != OpARM64SRAconst {
 17006  			break
 17007  		}
 17008  		c := auxIntToInt64(x1.AuxInt)
 17009  		y := x1.Args[0]
 17010  		if !(clobberIfDead(x1)) {
 17011  			break
 17012  		}
 17013  		v.reset(OpARM64SUBshiftRA)
 17014  		v.AuxInt = int64ToAuxInt(c)
 17015  		v.AddArg2(x0, y)
 17016  		return true
 17017  	}
 17018  	return false
 17019  }
 17020  func rewriteValueARM64_OpARM64SUBconst(v *Value) bool {
 17021  	v_0 := v.Args[0]
 17022  	// match: (SUBconst [0] x)
 17023  	// result: x
 17024  	for {
 17025  		if auxIntToInt64(v.AuxInt) != 0 {
 17026  			break
 17027  		}
 17028  		x := v_0
 17029  		v.copyOf(x)
 17030  		return true
 17031  	}
 17032  	// match: (SUBconst [c] (MOVDconst [d]))
 17033  	// result: (MOVDconst [d-c])
 17034  	for {
 17035  		c := auxIntToInt64(v.AuxInt)
 17036  		if v_0.Op != OpARM64MOVDconst {
 17037  			break
 17038  		}
 17039  		d := auxIntToInt64(v_0.AuxInt)
 17040  		v.reset(OpARM64MOVDconst)
 17041  		v.AuxInt = int64ToAuxInt(d - c)
 17042  		return true
 17043  	}
 17044  	// match: (SUBconst [c] (SUBconst [d] x))
 17045  	// result: (ADDconst [-c-d] x)
 17046  	for {
 17047  		c := auxIntToInt64(v.AuxInt)
 17048  		if v_0.Op != OpARM64SUBconst {
 17049  			break
 17050  		}
 17051  		d := auxIntToInt64(v_0.AuxInt)
 17052  		x := v_0.Args[0]
 17053  		v.reset(OpARM64ADDconst)
 17054  		v.AuxInt = int64ToAuxInt(-c - d)
 17055  		v.AddArg(x)
 17056  		return true
 17057  	}
 17058  	// match: (SUBconst [c] (ADDconst [d] x))
 17059  	// result: (ADDconst [-c+d] x)
 17060  	for {
 17061  		c := auxIntToInt64(v.AuxInt)
 17062  		if v_0.Op != OpARM64ADDconst {
 17063  			break
 17064  		}
 17065  		d := auxIntToInt64(v_0.AuxInt)
 17066  		x := v_0.Args[0]
 17067  		v.reset(OpARM64ADDconst)
 17068  		v.AuxInt = int64ToAuxInt(-c + d)
 17069  		v.AddArg(x)
 17070  		return true
 17071  	}
 17072  	return false
 17073  }
 17074  func rewriteValueARM64_OpARM64SUBshiftLL(v *Value) bool {
 17075  	v_1 := v.Args[1]
 17076  	v_0 := v.Args[0]
 17077  	// match: (SUBshiftLL x (MOVDconst [c]) [d])
 17078  	// result: (SUBconst x [int64(uint64(c)<<uint64(d))])
 17079  	for {
 17080  		d := auxIntToInt64(v.AuxInt)
 17081  		x := v_0
 17082  		if v_1.Op != OpARM64MOVDconst {
 17083  			break
 17084  		}
 17085  		c := auxIntToInt64(v_1.AuxInt)
 17086  		v.reset(OpARM64SUBconst)
 17087  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
 17088  		v.AddArg(x)
 17089  		return true
 17090  	}
 17091  	// match: (SUBshiftLL (SLLconst x [c]) x [c])
 17092  	// result: (MOVDconst [0])
 17093  	for {
 17094  		c := auxIntToInt64(v.AuxInt)
 17095  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
 17096  			break
 17097  		}
 17098  		x := v_0.Args[0]
 17099  		if x != v_1 {
 17100  			break
 17101  		}
 17102  		v.reset(OpARM64MOVDconst)
 17103  		v.AuxInt = int64ToAuxInt(0)
 17104  		return true
 17105  	}
 17106  	return false
 17107  }
 17108  func rewriteValueARM64_OpARM64SUBshiftRA(v *Value) bool {
 17109  	v_1 := v.Args[1]
 17110  	v_0 := v.Args[0]
 17111  	// match: (SUBshiftRA x (MOVDconst [c]) [d])
 17112  	// result: (SUBconst x [c>>uint64(d)])
 17113  	for {
 17114  		d := auxIntToInt64(v.AuxInt)
 17115  		x := v_0
 17116  		if v_1.Op != OpARM64MOVDconst {
 17117  			break
 17118  		}
 17119  		c := auxIntToInt64(v_1.AuxInt)
 17120  		v.reset(OpARM64SUBconst)
 17121  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
 17122  		v.AddArg(x)
 17123  		return true
 17124  	}
 17125  	// match: (SUBshiftRA (SRAconst x [c]) x [c])
 17126  	// result: (MOVDconst [0])
 17127  	for {
 17128  		c := auxIntToInt64(v.AuxInt)
 17129  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
 17130  			break
 17131  		}
 17132  		x := v_0.Args[0]
 17133  		if x != v_1 {
 17134  			break
 17135  		}
 17136  		v.reset(OpARM64MOVDconst)
 17137  		v.AuxInt = int64ToAuxInt(0)
 17138  		return true
 17139  	}
 17140  	return false
 17141  }
 17142  func rewriteValueARM64_OpARM64SUBshiftRL(v *Value) bool {
 17143  	v_1 := v.Args[1]
 17144  	v_0 := v.Args[0]
 17145  	// match: (SUBshiftRL x (MOVDconst [c]) [d])
 17146  	// result: (SUBconst x [int64(uint64(c)>>uint64(d))])
 17147  	for {
 17148  		d := auxIntToInt64(v.AuxInt)
 17149  		x := v_0
 17150  		if v_1.Op != OpARM64MOVDconst {
 17151  			break
 17152  		}
 17153  		c := auxIntToInt64(v_1.AuxInt)
 17154  		v.reset(OpARM64SUBconst)
 17155  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
 17156  		v.AddArg(x)
 17157  		return true
 17158  	}
 17159  	// match: (SUBshiftRL (SRLconst x [c]) x [c])
 17160  	// result: (MOVDconst [0])
 17161  	for {
 17162  		c := auxIntToInt64(v.AuxInt)
 17163  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
 17164  			break
 17165  		}
 17166  		x := v_0.Args[0]
 17167  		if x != v_1 {
 17168  			break
 17169  		}
 17170  		v.reset(OpARM64MOVDconst)
 17171  		v.AuxInt = int64ToAuxInt(0)
 17172  		return true
 17173  	}
 17174  	return false
 17175  }
 17176  func rewriteValueARM64_OpARM64TST(v *Value) bool {
 17177  	v_1 := v.Args[1]
 17178  	v_0 := v.Args[0]
 17179  	// match: (TST x (MOVDconst [c]))
 17180  	// result: (TSTconst [c] x)
 17181  	for {
 17182  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 17183  			x := v_0
 17184  			if v_1.Op != OpARM64MOVDconst {
 17185  				continue
 17186  			}
 17187  			c := auxIntToInt64(v_1.AuxInt)
 17188  			v.reset(OpARM64TSTconst)
 17189  			v.AuxInt = int64ToAuxInt(c)
 17190  			v.AddArg(x)
 17191  			return true
 17192  		}
 17193  		break
 17194  	}
 17195  	// match: (TST x0 x1:(SLLconst [c] y))
 17196  	// cond: clobberIfDead(x1)
 17197  	// result: (TSTshiftLL x0 y [c])
 17198  	for {
 17199  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 17200  			x0 := v_0
 17201  			x1 := v_1
 17202  			if x1.Op != OpARM64SLLconst {
 17203  				continue
 17204  			}
 17205  			c := auxIntToInt64(x1.AuxInt)
 17206  			y := x1.Args[0]
 17207  			if !(clobberIfDead(x1)) {
 17208  				continue
 17209  			}
 17210  			v.reset(OpARM64TSTshiftLL)
 17211  			v.AuxInt = int64ToAuxInt(c)
 17212  			v.AddArg2(x0, y)
 17213  			return true
 17214  		}
 17215  		break
 17216  	}
 17217  	// match: (TST x0 x1:(SRLconst [c] y))
 17218  	// cond: clobberIfDead(x1)
 17219  	// result: (TSTshiftRL x0 y [c])
 17220  	for {
 17221  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 17222  			x0 := v_0
 17223  			x1 := v_1
 17224  			if x1.Op != OpARM64SRLconst {
 17225  				continue
 17226  			}
 17227  			c := auxIntToInt64(x1.AuxInt)
 17228  			y := x1.Args[0]
 17229  			if !(clobberIfDead(x1)) {
 17230  				continue
 17231  			}
 17232  			v.reset(OpARM64TSTshiftRL)
 17233  			v.AuxInt = int64ToAuxInt(c)
 17234  			v.AddArg2(x0, y)
 17235  			return true
 17236  		}
 17237  		break
 17238  	}
 17239  	// match: (TST x0 x1:(SRAconst [c] y))
 17240  	// cond: clobberIfDead(x1)
 17241  	// result: (TSTshiftRA x0 y [c])
 17242  	for {
 17243  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 17244  			x0 := v_0
 17245  			x1 := v_1
 17246  			if x1.Op != OpARM64SRAconst {
 17247  				continue
 17248  			}
 17249  			c := auxIntToInt64(x1.AuxInt)
 17250  			y := x1.Args[0]
 17251  			if !(clobberIfDead(x1)) {
 17252  				continue
 17253  			}
 17254  			v.reset(OpARM64TSTshiftRA)
 17255  			v.AuxInt = int64ToAuxInt(c)
 17256  			v.AddArg2(x0, y)
 17257  			return true
 17258  		}
 17259  		break
 17260  	}
 17261  	// match: (TST x0 x1:(RORconst [c] y))
 17262  	// cond: clobberIfDead(x1)
 17263  	// result: (TSTshiftRO x0 y [c])
 17264  	for {
 17265  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 17266  			x0 := v_0
 17267  			x1 := v_1
 17268  			if x1.Op != OpARM64RORconst {
 17269  				continue
 17270  			}
 17271  			c := auxIntToInt64(x1.AuxInt)
 17272  			y := x1.Args[0]
 17273  			if !(clobberIfDead(x1)) {
 17274  				continue
 17275  			}
 17276  			v.reset(OpARM64TSTshiftRO)
 17277  			v.AuxInt = int64ToAuxInt(c)
 17278  			v.AddArg2(x0, y)
 17279  			return true
 17280  		}
 17281  		break
 17282  	}
 17283  	return false
 17284  }
 17285  func rewriteValueARM64_OpARM64TSTW(v *Value) bool {
 17286  	v_1 := v.Args[1]
 17287  	v_0 := v.Args[0]
 17288  	// match: (TSTW x (MOVDconst [c]))
 17289  	// result: (TSTWconst [int32(c)] x)
 17290  	for {
 17291  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 17292  			x := v_0
 17293  			if v_1.Op != OpARM64MOVDconst {
 17294  				continue
 17295  			}
 17296  			c := auxIntToInt64(v_1.AuxInt)
 17297  			v.reset(OpARM64TSTWconst)
 17298  			v.AuxInt = int32ToAuxInt(int32(c))
 17299  			v.AddArg(x)
 17300  			return true
 17301  		}
 17302  		break
 17303  	}
 17304  	return false
 17305  }
 17306  func rewriteValueARM64_OpARM64TSTWconst(v *Value) bool {
 17307  	v_0 := v.Args[0]
 17308  	// match: (TSTWconst (MOVDconst [x]) [y])
 17309  	// result: (FlagConstant [logicFlags32(int32(x)&y)])
 17310  	for {
 17311  		y := auxIntToInt32(v.AuxInt)
 17312  		if v_0.Op != OpARM64MOVDconst {
 17313  			break
 17314  		}
 17315  		x := auxIntToInt64(v_0.AuxInt)
 17316  		v.reset(OpARM64FlagConstant)
 17317  		v.AuxInt = flagConstantToAuxInt(logicFlags32(int32(x) & y))
 17318  		return true
 17319  	}
 17320  	return false
 17321  }
 17322  func rewriteValueARM64_OpARM64TSTconst(v *Value) bool {
 17323  	v_0 := v.Args[0]
 17324  	// match: (TSTconst (MOVDconst [x]) [y])
 17325  	// result: (FlagConstant [logicFlags64(x&y)])
 17326  	for {
 17327  		y := auxIntToInt64(v.AuxInt)
 17328  		if v_0.Op != OpARM64MOVDconst {
 17329  			break
 17330  		}
 17331  		x := auxIntToInt64(v_0.AuxInt)
 17332  		v.reset(OpARM64FlagConstant)
 17333  		v.AuxInt = flagConstantToAuxInt(logicFlags64(x & y))
 17334  		return true
 17335  	}
 17336  	return false
 17337  }
 17338  func rewriteValueARM64_OpARM64TSTshiftLL(v *Value) bool {
 17339  	v_1 := v.Args[1]
 17340  	v_0 := v.Args[0]
 17341  	b := v.Block
 17342  	// match: (TSTshiftLL (MOVDconst [c]) x [d])
 17343  	// result: (TSTconst [c] (SLLconst <x.Type> x [d]))
 17344  	for {
 17345  		d := auxIntToInt64(v.AuxInt)
 17346  		if v_0.Op != OpARM64MOVDconst {
 17347  			break
 17348  		}
 17349  		c := auxIntToInt64(v_0.AuxInt)
 17350  		x := v_1
 17351  		v.reset(OpARM64TSTconst)
 17352  		v.AuxInt = int64ToAuxInt(c)
 17353  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 17354  		v0.AuxInt = int64ToAuxInt(d)
 17355  		v0.AddArg(x)
 17356  		v.AddArg(v0)
 17357  		return true
 17358  	}
 17359  	// match: (TSTshiftLL x (MOVDconst [c]) [d])
 17360  	// result: (TSTconst x [int64(uint64(c)<<uint64(d))])
 17361  	for {
 17362  		d := auxIntToInt64(v.AuxInt)
 17363  		x := v_0
 17364  		if v_1.Op != OpARM64MOVDconst {
 17365  			break
 17366  		}
 17367  		c := auxIntToInt64(v_1.AuxInt)
 17368  		v.reset(OpARM64TSTconst)
 17369  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
 17370  		v.AddArg(x)
 17371  		return true
 17372  	}
 17373  	return false
 17374  }
 17375  func rewriteValueARM64_OpARM64TSTshiftRA(v *Value) bool {
 17376  	v_1 := v.Args[1]
 17377  	v_0 := v.Args[0]
 17378  	b := v.Block
 17379  	// match: (TSTshiftRA (MOVDconst [c]) x [d])
 17380  	// result: (TSTconst [c] (SRAconst <x.Type> x [d]))
 17381  	for {
 17382  		d := auxIntToInt64(v.AuxInt)
 17383  		if v_0.Op != OpARM64MOVDconst {
 17384  			break
 17385  		}
 17386  		c := auxIntToInt64(v_0.AuxInt)
 17387  		x := v_1
 17388  		v.reset(OpARM64TSTconst)
 17389  		v.AuxInt = int64ToAuxInt(c)
 17390  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
 17391  		v0.AuxInt = int64ToAuxInt(d)
 17392  		v0.AddArg(x)
 17393  		v.AddArg(v0)
 17394  		return true
 17395  	}
 17396  	// match: (TSTshiftRA x (MOVDconst [c]) [d])
 17397  	// result: (TSTconst x [c>>uint64(d)])
 17398  	for {
 17399  		d := auxIntToInt64(v.AuxInt)
 17400  		x := v_0
 17401  		if v_1.Op != OpARM64MOVDconst {
 17402  			break
 17403  		}
 17404  		c := auxIntToInt64(v_1.AuxInt)
 17405  		v.reset(OpARM64TSTconst)
 17406  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
 17407  		v.AddArg(x)
 17408  		return true
 17409  	}
 17410  	return false
 17411  }
 17412  func rewriteValueARM64_OpARM64TSTshiftRL(v *Value) bool {
 17413  	v_1 := v.Args[1]
 17414  	v_0 := v.Args[0]
 17415  	b := v.Block
 17416  	// match: (TSTshiftRL (MOVDconst [c]) x [d])
 17417  	// result: (TSTconst [c] (SRLconst <x.Type> x [d]))
 17418  	for {
 17419  		d := auxIntToInt64(v.AuxInt)
 17420  		if v_0.Op != OpARM64MOVDconst {
 17421  			break
 17422  		}
 17423  		c := auxIntToInt64(v_0.AuxInt)
 17424  		x := v_1
 17425  		v.reset(OpARM64TSTconst)
 17426  		v.AuxInt = int64ToAuxInt(c)
 17427  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
 17428  		v0.AuxInt = int64ToAuxInt(d)
 17429  		v0.AddArg(x)
 17430  		v.AddArg(v0)
 17431  		return true
 17432  	}
 17433  	// match: (TSTshiftRL x (MOVDconst [c]) [d])
 17434  	// result: (TSTconst x [int64(uint64(c)>>uint64(d))])
 17435  	for {
 17436  		d := auxIntToInt64(v.AuxInt)
 17437  		x := v_0
 17438  		if v_1.Op != OpARM64MOVDconst {
 17439  			break
 17440  		}
 17441  		c := auxIntToInt64(v_1.AuxInt)
 17442  		v.reset(OpARM64TSTconst)
 17443  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
 17444  		v.AddArg(x)
 17445  		return true
 17446  	}
 17447  	return false
 17448  }
 17449  func rewriteValueARM64_OpARM64TSTshiftRO(v *Value) bool {
 17450  	v_1 := v.Args[1]
 17451  	v_0 := v.Args[0]
 17452  	b := v.Block
 17453  	// match: (TSTshiftRO (MOVDconst [c]) x [d])
 17454  	// result: (TSTconst [c] (RORconst <x.Type> x [d]))
 17455  	for {
 17456  		d := auxIntToInt64(v.AuxInt)
 17457  		if v_0.Op != OpARM64MOVDconst {
 17458  			break
 17459  		}
 17460  		c := auxIntToInt64(v_0.AuxInt)
 17461  		x := v_1
 17462  		v.reset(OpARM64TSTconst)
 17463  		v.AuxInt = int64ToAuxInt(c)
 17464  		v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
 17465  		v0.AuxInt = int64ToAuxInt(d)
 17466  		v0.AddArg(x)
 17467  		v.AddArg(v0)
 17468  		return true
 17469  	}
 17470  	// match: (TSTshiftRO x (MOVDconst [c]) [d])
 17471  	// result: (TSTconst x [rotateRight64(c, d)])
 17472  	for {
 17473  		d := auxIntToInt64(v.AuxInt)
 17474  		x := v_0
 17475  		if v_1.Op != OpARM64MOVDconst {
 17476  			break
 17477  		}
 17478  		c := auxIntToInt64(v_1.AuxInt)
 17479  		v.reset(OpARM64TSTconst)
 17480  		v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
 17481  		v.AddArg(x)
 17482  		return true
 17483  	}
 17484  	return false
 17485  }
 17486  func rewriteValueARM64_OpARM64UBFIZ(v *Value) bool {
 17487  	v_0 := v.Args[0]
 17488  	// match: (UBFIZ [bfc] (SLLconst [sc] x))
 17489  	// cond: sc < bfc.width()
 17490  	// result: (UBFIZ [armBFAuxInt(bfc.lsb()+sc, bfc.width()-sc)] x)
 17491  	for {
 17492  		bfc := auxIntToArm64BitField(v.AuxInt)
 17493  		if v_0.Op != OpARM64SLLconst {
 17494  			break
 17495  		}
 17496  		sc := auxIntToInt64(v_0.AuxInt)
 17497  		x := v_0.Args[0]
 17498  		if !(sc < bfc.width()) {
 17499  			break
 17500  		}
 17501  		v.reset(OpARM64UBFIZ)
 17502  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()-sc))
 17503  		v.AddArg(x)
 17504  		return true
 17505  	}
 17506  	return false
 17507  }
 17508  func rewriteValueARM64_OpARM64UBFX(v *Value) bool {
 17509  	v_0 := v.Args[0]
 17510  	// match: (UBFX [bfc] (ANDconst [c] x))
 17511  	// cond: isARM64BFMask(0, c, 0) && bfc.lsb() + bfc.width() <= arm64BFWidth(c, 0)
 17512  	// result: (UBFX [bfc] x)
 17513  	for {
 17514  		bfc := auxIntToArm64BitField(v.AuxInt)
 17515  		if v_0.Op != OpARM64ANDconst {
 17516  			break
 17517  		}
 17518  		c := auxIntToInt64(v_0.AuxInt)
 17519  		x := v_0.Args[0]
 17520  		if !(isARM64BFMask(0, c, 0) && bfc.lsb()+bfc.width() <= arm64BFWidth(c, 0)) {
 17521  			break
 17522  		}
 17523  		v.reset(OpARM64UBFX)
 17524  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 17525  		v.AddArg(x)
 17526  		return true
 17527  	}
 17528  	// match: (UBFX [bfc] e:(MOVWUreg x))
 17529  	// cond: e.Uses == 1 && bfc.lsb() < 32
 17530  	// result: (UBFX [armBFAuxInt(bfc.lsb(), min(bfc.width(), 32-bfc.lsb()))] x)
 17531  	for {
 17532  		bfc := auxIntToArm64BitField(v.AuxInt)
 17533  		e := v_0
 17534  		if e.Op != OpARM64MOVWUreg {
 17535  			break
 17536  		}
 17537  		x := e.Args[0]
 17538  		if !(e.Uses == 1 && bfc.lsb() < 32) {
 17539  			break
 17540  		}
 17541  		v.reset(OpARM64UBFX)
 17542  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), 32-bfc.lsb())))
 17543  		v.AddArg(x)
 17544  		return true
 17545  	}
 17546  	// match: (UBFX [bfc] e:(MOVHUreg x))
 17547  	// cond: e.Uses == 1 && bfc.lsb() < 16
 17548  	// result: (UBFX [armBFAuxInt(bfc.lsb(), min(bfc.width(), 16-bfc.lsb()))] x)
 17549  	for {
 17550  		bfc := auxIntToArm64BitField(v.AuxInt)
 17551  		e := v_0
 17552  		if e.Op != OpARM64MOVHUreg {
 17553  			break
 17554  		}
 17555  		x := e.Args[0]
 17556  		if !(e.Uses == 1 && bfc.lsb() < 16) {
 17557  			break
 17558  		}
 17559  		v.reset(OpARM64UBFX)
 17560  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), 16-bfc.lsb())))
 17561  		v.AddArg(x)
 17562  		return true
 17563  	}
 17564  	// match: (UBFX [bfc] e:(MOVBUreg x))
 17565  	// cond: e.Uses == 1 && bfc.lsb() < 8
 17566  	// result: (UBFX [armBFAuxInt(bfc.lsb(), min(bfc.width(), 8-bfc.lsb()))] x)
 17567  	for {
 17568  		bfc := auxIntToArm64BitField(v.AuxInt)
 17569  		e := v_0
 17570  		if e.Op != OpARM64MOVBUreg {
 17571  			break
 17572  		}
 17573  		x := e.Args[0]
 17574  		if !(e.Uses == 1 && bfc.lsb() < 8) {
 17575  			break
 17576  		}
 17577  		v.reset(OpARM64UBFX)
 17578  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), 8-bfc.lsb())))
 17579  		v.AddArg(x)
 17580  		return true
 17581  	}
 17582  	// match: (UBFX [bfc] (SRLconst [sc] x))
 17583  	// cond: sc+bfc.width()+bfc.lsb() < 64
 17584  	// result: (UBFX [armBFAuxInt(bfc.lsb()+sc, bfc.width())] x)
 17585  	for {
 17586  		bfc := auxIntToArm64BitField(v.AuxInt)
 17587  		if v_0.Op != OpARM64SRLconst {
 17588  			break
 17589  		}
 17590  		sc := auxIntToInt64(v_0.AuxInt)
 17591  		x := v_0.Args[0]
 17592  		if !(sc+bfc.width()+bfc.lsb() < 64) {
 17593  			break
 17594  		}
 17595  		v.reset(OpARM64UBFX)
 17596  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()))
 17597  		v.AddArg(x)
 17598  		return true
 17599  	}
 17600  	// match: (UBFX [bfc] (SLLconst [sc] x))
 17601  	// cond: sc == bfc.lsb()
 17602  	// result: (ANDconst [1<<uint(bfc.width())-1] x)
 17603  	for {
 17604  		bfc := auxIntToArm64BitField(v.AuxInt)
 17605  		if v_0.Op != OpARM64SLLconst {
 17606  			break
 17607  		}
 17608  		sc := auxIntToInt64(v_0.AuxInt)
 17609  		x := v_0.Args[0]
 17610  		if !(sc == bfc.lsb()) {
 17611  			break
 17612  		}
 17613  		v.reset(OpARM64ANDconst)
 17614  		v.AuxInt = int64ToAuxInt(1<<uint(bfc.width()) - 1)
 17615  		v.AddArg(x)
 17616  		return true
 17617  	}
 17618  	// match: (UBFX [bfc] (SLLconst [sc] x))
 17619  	// cond: sc < bfc.lsb()
 17620  	// result: (UBFX [armBFAuxInt(bfc.lsb()-sc, bfc.width())] x)
 17621  	for {
 17622  		bfc := auxIntToArm64BitField(v.AuxInt)
 17623  		if v_0.Op != OpARM64SLLconst {
 17624  			break
 17625  		}
 17626  		sc := auxIntToInt64(v_0.AuxInt)
 17627  		x := v_0.Args[0]
 17628  		if !(sc < bfc.lsb()) {
 17629  			break
 17630  		}
 17631  		v.reset(OpARM64UBFX)
 17632  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
 17633  		v.AddArg(x)
 17634  		return true
 17635  	}
 17636  	// match: (UBFX [bfc] (SLLconst [sc] x))
 17637  	// cond: sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()
 17638  	// result: (UBFIZ [armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc)] x)
 17639  	for {
 17640  		bfc := auxIntToArm64BitField(v.AuxInt)
 17641  		if v_0.Op != OpARM64SLLconst {
 17642  			break
 17643  		}
 17644  		sc := auxIntToInt64(v_0.AuxInt)
 17645  		x := v_0.Args[0]
 17646  		if !(sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()) {
 17647  			break
 17648  		}
 17649  		v.reset(OpARM64UBFIZ)
 17650  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc))
 17651  		v.AddArg(x)
 17652  		return true
 17653  	}
 17654  	return false
 17655  }
 17656  func rewriteValueARM64_OpARM64UDIV(v *Value) bool {
 17657  	v_1 := v.Args[1]
 17658  	v_0 := v.Args[0]
 17659  	// match: (UDIV x (MOVDconst [1]))
 17660  	// result: x
 17661  	for {
 17662  		x := v_0
 17663  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 17664  			break
 17665  		}
 17666  		v.copyOf(x)
 17667  		return true
 17668  	}
 17669  	// match: (UDIV x (MOVDconst [c]))
 17670  	// cond: isPowerOfTwo(c)
 17671  	// result: (SRLconst [log64(c)] x)
 17672  	for {
 17673  		x := v_0
 17674  		if v_1.Op != OpARM64MOVDconst {
 17675  			break
 17676  		}
 17677  		c := auxIntToInt64(v_1.AuxInt)
 17678  		if !(isPowerOfTwo(c)) {
 17679  			break
 17680  		}
 17681  		v.reset(OpARM64SRLconst)
 17682  		v.AuxInt = int64ToAuxInt(log64(c))
 17683  		v.AddArg(x)
 17684  		return true
 17685  	}
 17686  	// match: (UDIV (MOVDconst [c]) (MOVDconst [d]))
 17687  	// cond: d != 0
 17688  	// result: (MOVDconst [int64(uint64(c)/uint64(d))])
 17689  	for {
 17690  		if v_0.Op != OpARM64MOVDconst {
 17691  			break
 17692  		}
 17693  		c := auxIntToInt64(v_0.AuxInt)
 17694  		if v_1.Op != OpARM64MOVDconst {
 17695  			break
 17696  		}
 17697  		d := auxIntToInt64(v_1.AuxInt)
 17698  		if !(d != 0) {
 17699  			break
 17700  		}
 17701  		v.reset(OpARM64MOVDconst)
 17702  		v.AuxInt = int64ToAuxInt(int64(uint64(c) / uint64(d)))
 17703  		return true
 17704  	}
 17705  	return false
 17706  }
 17707  func rewriteValueARM64_OpARM64UDIVW(v *Value) bool {
 17708  	v_1 := v.Args[1]
 17709  	v_0 := v.Args[0]
 17710  	b := v.Block
 17711  	// match: (UDIVW x (MOVDconst [c]))
 17712  	// cond: uint32(c)==1
 17713  	// result: (MOVWUreg x)
 17714  	for {
 17715  		x := v_0
 17716  		if v_1.Op != OpARM64MOVDconst {
 17717  			break
 17718  		}
 17719  		c := auxIntToInt64(v_1.AuxInt)
 17720  		if !(uint32(c) == 1) {
 17721  			break
 17722  		}
 17723  		v.reset(OpARM64MOVWUreg)
 17724  		v.AddArg(x)
 17725  		return true
 17726  	}
 17727  	// match: (UDIVW x (MOVDconst [c]))
 17728  	// cond: isPowerOfTwo(c) && is32Bit(c)
 17729  	// result: (SRLconst [log64(c)] (MOVWUreg <v.Type> x))
 17730  	for {
 17731  		x := v_0
 17732  		if v_1.Op != OpARM64MOVDconst {
 17733  			break
 17734  		}
 17735  		c := auxIntToInt64(v_1.AuxInt)
 17736  		if !(isPowerOfTwo(c) && is32Bit(c)) {
 17737  			break
 17738  		}
 17739  		v.reset(OpARM64SRLconst)
 17740  		v.AuxInt = int64ToAuxInt(log64(c))
 17741  		v0 := b.NewValue0(v.Pos, OpARM64MOVWUreg, v.Type)
 17742  		v0.AddArg(x)
 17743  		v.AddArg(v0)
 17744  		return true
 17745  	}
 17746  	// match: (UDIVW (MOVDconst [c]) (MOVDconst [d]))
 17747  	// cond: d != 0
 17748  	// result: (MOVDconst [int64(uint32(c)/uint32(d))])
 17749  	for {
 17750  		if v_0.Op != OpARM64MOVDconst {
 17751  			break
 17752  		}
 17753  		c := auxIntToInt64(v_0.AuxInt)
 17754  		if v_1.Op != OpARM64MOVDconst {
 17755  			break
 17756  		}
 17757  		d := auxIntToInt64(v_1.AuxInt)
 17758  		if !(d != 0) {
 17759  			break
 17760  		}
 17761  		v.reset(OpARM64MOVDconst)
 17762  		v.AuxInt = int64ToAuxInt(int64(uint32(c) / uint32(d)))
 17763  		return true
 17764  	}
 17765  	return false
 17766  }
 17767  func rewriteValueARM64_OpARM64UMOD(v *Value) bool {
 17768  	v_1 := v.Args[1]
 17769  	v_0 := v.Args[0]
 17770  	b := v.Block
 17771  	typ := &b.Func.Config.Types
 17772  	// match: (UMOD <typ.UInt64> x y)
 17773  	// result: (MSUB <typ.UInt64> x y (UDIV <typ.UInt64> x y))
 17774  	for {
 17775  		if v.Type != typ.UInt64 {
 17776  			break
 17777  		}
 17778  		x := v_0
 17779  		y := v_1
 17780  		v.reset(OpARM64MSUB)
 17781  		v.Type = typ.UInt64
 17782  		v0 := b.NewValue0(v.Pos, OpARM64UDIV, typ.UInt64)
 17783  		v0.AddArg2(x, y)
 17784  		v.AddArg3(x, y, v0)
 17785  		return true
 17786  	}
 17787  	// match: (UMOD _ (MOVDconst [1]))
 17788  	// result: (MOVDconst [0])
 17789  	for {
 17790  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 17791  			break
 17792  		}
 17793  		v.reset(OpARM64MOVDconst)
 17794  		v.AuxInt = int64ToAuxInt(0)
 17795  		return true
 17796  	}
 17797  	// match: (UMOD x (MOVDconst [c]))
 17798  	// cond: isPowerOfTwo(c)
 17799  	// result: (ANDconst [c-1] x)
 17800  	for {
 17801  		x := v_0
 17802  		if v_1.Op != OpARM64MOVDconst {
 17803  			break
 17804  		}
 17805  		c := auxIntToInt64(v_1.AuxInt)
 17806  		if !(isPowerOfTwo(c)) {
 17807  			break
 17808  		}
 17809  		v.reset(OpARM64ANDconst)
 17810  		v.AuxInt = int64ToAuxInt(c - 1)
 17811  		v.AddArg(x)
 17812  		return true
 17813  	}
 17814  	// match: (UMOD (MOVDconst [c]) (MOVDconst [d]))
 17815  	// cond: d != 0
 17816  	// result: (MOVDconst [int64(uint64(c)%uint64(d))])
 17817  	for {
 17818  		if v_0.Op != OpARM64MOVDconst {
 17819  			break
 17820  		}
 17821  		c := auxIntToInt64(v_0.AuxInt)
 17822  		if v_1.Op != OpARM64MOVDconst {
 17823  			break
 17824  		}
 17825  		d := auxIntToInt64(v_1.AuxInt)
 17826  		if !(d != 0) {
 17827  			break
 17828  		}
 17829  		v.reset(OpARM64MOVDconst)
 17830  		v.AuxInt = int64ToAuxInt(int64(uint64(c) % uint64(d)))
 17831  		return true
 17832  	}
 17833  	return false
 17834  }
 17835  func rewriteValueARM64_OpARM64UMODW(v *Value) bool {
 17836  	v_1 := v.Args[1]
 17837  	v_0 := v.Args[0]
 17838  	b := v.Block
 17839  	typ := &b.Func.Config.Types
 17840  	// match: (UMODW <typ.UInt32> x y)
 17841  	// result: (MSUBW <typ.UInt32> x y (UDIVW <typ.UInt32> x y))
 17842  	for {
 17843  		if v.Type != typ.UInt32 {
 17844  			break
 17845  		}
 17846  		x := v_0
 17847  		y := v_1
 17848  		v.reset(OpARM64MSUBW)
 17849  		v.Type = typ.UInt32
 17850  		v0 := b.NewValue0(v.Pos, OpARM64UDIVW, typ.UInt32)
 17851  		v0.AddArg2(x, y)
 17852  		v.AddArg3(x, y, v0)
 17853  		return true
 17854  	}
 17855  	// match: (UMODW _ (MOVDconst [c]))
 17856  	// cond: uint32(c)==1
 17857  	// result: (MOVDconst [0])
 17858  	for {
 17859  		if v_1.Op != OpARM64MOVDconst {
 17860  			break
 17861  		}
 17862  		c := auxIntToInt64(v_1.AuxInt)
 17863  		if !(uint32(c) == 1) {
 17864  			break
 17865  		}
 17866  		v.reset(OpARM64MOVDconst)
 17867  		v.AuxInt = int64ToAuxInt(0)
 17868  		return true
 17869  	}
 17870  	// match: (UMODW x (MOVDconst [c]))
 17871  	// cond: isPowerOfTwo(c) && is32Bit(c)
 17872  	// result: (ANDconst [c-1] x)
 17873  	for {
 17874  		x := v_0
 17875  		if v_1.Op != OpARM64MOVDconst {
 17876  			break
 17877  		}
 17878  		c := auxIntToInt64(v_1.AuxInt)
 17879  		if !(isPowerOfTwo(c) && is32Bit(c)) {
 17880  			break
 17881  		}
 17882  		v.reset(OpARM64ANDconst)
 17883  		v.AuxInt = int64ToAuxInt(c - 1)
 17884  		v.AddArg(x)
 17885  		return true
 17886  	}
 17887  	// match: (UMODW (MOVDconst [c]) (MOVDconst [d]))
 17888  	// cond: d != 0
 17889  	// result: (MOVDconst [int64(uint32(c)%uint32(d))])
 17890  	for {
 17891  		if v_0.Op != OpARM64MOVDconst {
 17892  			break
 17893  		}
 17894  		c := auxIntToInt64(v_0.AuxInt)
 17895  		if v_1.Op != OpARM64MOVDconst {
 17896  			break
 17897  		}
 17898  		d := auxIntToInt64(v_1.AuxInt)
 17899  		if !(d != 0) {
 17900  			break
 17901  		}
 17902  		v.reset(OpARM64MOVDconst)
 17903  		v.AuxInt = int64ToAuxInt(int64(uint32(c) % uint32(d)))
 17904  		return true
 17905  	}
 17906  	return false
 17907  }
 17908  func rewriteValueARM64_OpARM64VBIF16B(v *Value) bool {
 17909  	v_2 := v.Args[2]
 17910  	v_1 := v.Args[1]
 17911  	v_0 := v.Args[0]
 17912  	// match: (VBIF16B x y (VNOT16B mask))
 17913  	// result: (VBIT16B x y mask)
 17914  	for {
 17915  		x := v_0
 17916  		y := v_1
 17917  		if v_2.Op != OpARM64VNOT16B {
 17918  			break
 17919  		}
 17920  		mask := v_2.Args[0]
 17921  		v.reset(OpARM64VBIT16B)
 17922  		v.AddArg3(x, y, mask)
 17923  		return true
 17924  	}
 17925  	return false
 17926  }
 17927  func rewriteValueARM64_OpARM64VBIT16B(v *Value) bool {
 17928  	v_2 := v.Args[2]
 17929  	v_1 := v.Args[1]
 17930  	v_0 := v.Args[0]
 17931  	// match: (VBIT16B x y (VNOT16B mask))
 17932  	// result: (VBIF16B x y mask)
 17933  	for {
 17934  		x := v_0
 17935  		y := v_1
 17936  		if v_2.Op != OpARM64VNOT16B {
 17937  			break
 17938  		}
 17939  		mask := v_2.Args[0]
 17940  		v.reset(OpARM64VBIF16B)
 17941  		v.AddArg3(x, y, mask)
 17942  		return true
 17943  	}
 17944  	return false
 17945  }
 17946  func rewriteValueARM64_OpARM64VDUPBbcast(v *Value) bool {
 17947  	v_0 := v.Args[0]
 17948  	// match: (VDUPBbcast [i] (VMOVBins [j] _ (MOVDconst [c])))
 17949  	// cond: i == j && c>=-128 && c<=255
 17950  	// result: (VMOVI16B [uint8(c)])
 17951  	for {
 17952  		i := auxIntToUint8(v.AuxInt)
 17953  		if v_0.Op != OpARM64VMOVBins {
 17954  			break
 17955  		}
 17956  		j := auxIntToUint8(v_0.AuxInt)
 17957  		_ = v_0.Args[1]
 17958  		v_0_1 := v_0.Args[1]
 17959  		if v_0_1.Op != OpARM64MOVDconst {
 17960  			break
 17961  		}
 17962  		c := auxIntToInt64(v_0_1.AuxInt)
 17963  		if !(i == j && c >= -128 && c <= 255) {
 17964  			break
 17965  		}
 17966  		v.reset(OpARM64VMOVI16B)
 17967  		v.AuxInt = uint8ToAuxInt(uint8(c))
 17968  		return true
 17969  	}
 17970  	return false
 17971  }
 17972  func rewriteValueARM64_OpARM64VFCVTL4S(v *Value) bool {
 17973  	v_0 := v.Args[0]
 17974  	// match: (VFCVTL4S (VDUPDextr [1] x))
 17975  	// result: (VFCVTL2_4S x)
 17976  	for {
 17977  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 17978  			break
 17979  		}
 17980  		x := v_0.Args[0]
 17981  		v.reset(OpARM64VFCVTL2_4S)
 17982  		v.AddArg(x)
 17983  		return true
 17984  	}
 17985  	return false
 17986  }
 17987  func rewriteValueARM64_OpARM64VMOVDins0(v *Value) bool {
 17988  	v_1 := v.Args[1]
 17989  	v_0 := v.Args[0]
 17990  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VFCVTN2D y)))
 17991  	// result: (VFCVTN2_2D dst y)
 17992  	for {
 17993  		if auxIntToUint8(v.AuxInt) != 1 {
 17994  			break
 17995  		}
 17996  		dst := v_0
 17997  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 17998  			break
 17999  		}
 18000  		v_1_0 := v_1.Args[0]
 18001  		if v_1_0.Op != OpARM64VFCVTN2D {
 18002  			break
 18003  		}
 18004  		y := v_1_0.Args[0]
 18005  		v.reset(OpARM64VFCVTN2_2D)
 18006  		v.AddArg2(dst, y)
 18007  		return true
 18008  	}
 18009  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VSHRN2D [c] y)))
 18010  	// result: (VSHRN2_2D dst [c] y)
 18011  	for {
 18012  		if auxIntToUint8(v.AuxInt) != 1 {
 18013  			break
 18014  		}
 18015  		dst := v_0
 18016  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18017  			break
 18018  		}
 18019  		v_1_0 := v_1.Args[0]
 18020  		if v_1_0.Op != OpARM64VSHRN2D {
 18021  			break
 18022  		}
 18023  		c := auxIntToUint8(v_1_0.AuxInt)
 18024  		y := v_1_0.Args[0]
 18025  		v.reset(OpARM64VSHRN2_2D)
 18026  		v.AuxInt = uint8ToAuxInt(c)
 18027  		v.AddArg2(dst, y)
 18028  		return true
 18029  	}
 18030  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VSHRN4S [c] y)))
 18031  	// result: (VSHRN2_4S dst [c] y)
 18032  	for {
 18033  		if auxIntToUint8(v.AuxInt) != 1 {
 18034  			break
 18035  		}
 18036  		dst := v_0
 18037  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18038  			break
 18039  		}
 18040  		v_1_0 := v_1.Args[0]
 18041  		if v_1_0.Op != OpARM64VSHRN4S {
 18042  			break
 18043  		}
 18044  		c := auxIntToUint8(v_1_0.AuxInt)
 18045  		y := v_1_0.Args[0]
 18046  		v.reset(OpARM64VSHRN2_4S)
 18047  		v.AuxInt = uint8ToAuxInt(c)
 18048  		v.AddArg2(dst, y)
 18049  		return true
 18050  	}
 18051  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VSHRN8H [c] y)))
 18052  	// result: (VSHRN2_8H dst [c] y)
 18053  	for {
 18054  		if auxIntToUint8(v.AuxInt) != 1 {
 18055  			break
 18056  		}
 18057  		dst := v_0
 18058  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18059  			break
 18060  		}
 18061  		v_1_0 := v_1.Args[0]
 18062  		if v_1_0.Op != OpARM64VSHRN8H {
 18063  			break
 18064  		}
 18065  		c := auxIntToUint8(v_1_0.AuxInt)
 18066  		y := v_1_0.Args[0]
 18067  		v.reset(OpARM64VSHRN2_8H)
 18068  		v.AuxInt = uint8ToAuxInt(c)
 18069  		v.AddArg2(dst, y)
 18070  		return true
 18071  	}
 18072  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VSQXTN2D y)))
 18073  	// result: (VSQXTN2_2D dst y)
 18074  	for {
 18075  		if auxIntToUint8(v.AuxInt) != 1 {
 18076  			break
 18077  		}
 18078  		dst := v_0
 18079  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18080  			break
 18081  		}
 18082  		v_1_0 := v_1.Args[0]
 18083  		if v_1_0.Op != OpARM64VSQXTN2D {
 18084  			break
 18085  		}
 18086  		y := v_1_0.Args[0]
 18087  		v.reset(OpARM64VSQXTN2_2D)
 18088  		v.AddArg2(dst, y)
 18089  		return true
 18090  	}
 18091  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VSQXTN4S y)))
 18092  	// result: (VSQXTN2_4S dst y)
 18093  	for {
 18094  		if auxIntToUint8(v.AuxInt) != 1 {
 18095  			break
 18096  		}
 18097  		dst := v_0
 18098  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18099  			break
 18100  		}
 18101  		v_1_0 := v_1.Args[0]
 18102  		if v_1_0.Op != OpARM64VSQXTN4S {
 18103  			break
 18104  		}
 18105  		y := v_1_0.Args[0]
 18106  		v.reset(OpARM64VSQXTN2_4S)
 18107  		v.AddArg2(dst, y)
 18108  		return true
 18109  	}
 18110  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VSQXTN8H y)))
 18111  	// result: (VSQXTN2_8H dst y)
 18112  	for {
 18113  		if auxIntToUint8(v.AuxInt) != 1 {
 18114  			break
 18115  		}
 18116  		dst := v_0
 18117  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18118  			break
 18119  		}
 18120  		v_1_0 := v_1.Args[0]
 18121  		if v_1_0.Op != OpARM64VSQXTN8H {
 18122  			break
 18123  		}
 18124  		y := v_1_0.Args[0]
 18125  		v.reset(OpARM64VSQXTN2_8H)
 18126  		v.AddArg2(dst, y)
 18127  		return true
 18128  	}
 18129  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VSQXTUN2D y)))
 18130  	// result: (VSQXTUN2_2D dst y)
 18131  	for {
 18132  		if auxIntToUint8(v.AuxInt) != 1 {
 18133  			break
 18134  		}
 18135  		dst := v_0
 18136  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18137  			break
 18138  		}
 18139  		v_1_0 := v_1.Args[0]
 18140  		if v_1_0.Op != OpARM64VSQXTUN2D {
 18141  			break
 18142  		}
 18143  		y := v_1_0.Args[0]
 18144  		v.reset(OpARM64VSQXTUN2_2D)
 18145  		v.AddArg2(dst, y)
 18146  		return true
 18147  	}
 18148  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VSQXTUN4S y)))
 18149  	// result: (VSQXTUN2_4S dst y)
 18150  	for {
 18151  		if auxIntToUint8(v.AuxInt) != 1 {
 18152  			break
 18153  		}
 18154  		dst := v_0
 18155  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18156  			break
 18157  		}
 18158  		v_1_0 := v_1.Args[0]
 18159  		if v_1_0.Op != OpARM64VSQXTUN4S {
 18160  			break
 18161  		}
 18162  		y := v_1_0.Args[0]
 18163  		v.reset(OpARM64VSQXTUN2_4S)
 18164  		v.AddArg2(dst, y)
 18165  		return true
 18166  	}
 18167  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VSQXTUN8H y)))
 18168  	// result: (VSQXTUN2_8H dst y)
 18169  	for {
 18170  		if auxIntToUint8(v.AuxInt) != 1 {
 18171  			break
 18172  		}
 18173  		dst := v_0
 18174  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18175  			break
 18176  		}
 18177  		v_1_0 := v_1.Args[0]
 18178  		if v_1_0.Op != OpARM64VSQXTUN8H {
 18179  			break
 18180  		}
 18181  		y := v_1_0.Args[0]
 18182  		v.reset(OpARM64VSQXTUN2_8H)
 18183  		v.AddArg2(dst, y)
 18184  		return true
 18185  	}
 18186  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VUQXTN2D y)))
 18187  	// result: (VUQXTN2_2D dst y)
 18188  	for {
 18189  		if auxIntToUint8(v.AuxInt) != 1 {
 18190  			break
 18191  		}
 18192  		dst := v_0
 18193  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18194  			break
 18195  		}
 18196  		v_1_0 := v_1.Args[0]
 18197  		if v_1_0.Op != OpARM64VUQXTN2D {
 18198  			break
 18199  		}
 18200  		y := v_1_0.Args[0]
 18201  		v.reset(OpARM64VUQXTN2_2D)
 18202  		v.AddArg2(dst, y)
 18203  		return true
 18204  	}
 18205  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VUQXTN4S y)))
 18206  	// result: (VUQXTN2_4S dst y)
 18207  	for {
 18208  		if auxIntToUint8(v.AuxInt) != 1 {
 18209  			break
 18210  		}
 18211  		dst := v_0
 18212  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18213  			break
 18214  		}
 18215  		v_1_0 := v_1.Args[0]
 18216  		if v_1_0.Op != OpARM64VUQXTN4S {
 18217  			break
 18218  		}
 18219  		y := v_1_0.Args[0]
 18220  		v.reset(OpARM64VUQXTN2_4S)
 18221  		v.AddArg2(dst, y)
 18222  		return true
 18223  	}
 18224  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VUQXTN8H y)))
 18225  	// result: (VUQXTN2_8H dst y)
 18226  	for {
 18227  		if auxIntToUint8(v.AuxInt) != 1 {
 18228  			break
 18229  		}
 18230  		dst := v_0
 18231  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18232  			break
 18233  		}
 18234  		v_1_0 := v_1.Args[0]
 18235  		if v_1_0.Op != OpARM64VUQXTN8H {
 18236  			break
 18237  		}
 18238  		y := v_1_0.Args[0]
 18239  		v.reset(OpARM64VUQXTN2_8H)
 18240  		v.AddArg2(dst, y)
 18241  		return true
 18242  	}
 18243  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VXTN2D y)))
 18244  	// result: (VXTN2_2D dst y)
 18245  	for {
 18246  		if auxIntToUint8(v.AuxInt) != 1 {
 18247  			break
 18248  		}
 18249  		dst := v_0
 18250  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18251  			break
 18252  		}
 18253  		v_1_0 := v_1.Args[0]
 18254  		if v_1_0.Op != OpARM64VXTN2D {
 18255  			break
 18256  		}
 18257  		y := v_1_0.Args[0]
 18258  		v.reset(OpARM64VXTN2_2D)
 18259  		v.AddArg2(dst, y)
 18260  		return true
 18261  	}
 18262  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VXTN4S y)))
 18263  	// result: (VXTN2_4S dst y)
 18264  	for {
 18265  		if auxIntToUint8(v.AuxInt) != 1 {
 18266  			break
 18267  		}
 18268  		dst := v_0
 18269  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18270  			break
 18271  		}
 18272  		v_1_0 := v_1.Args[0]
 18273  		if v_1_0.Op != OpARM64VXTN4S {
 18274  			break
 18275  		}
 18276  		y := v_1_0.Args[0]
 18277  		v.reset(OpARM64VXTN2_4S)
 18278  		v.AddArg2(dst, y)
 18279  		return true
 18280  	}
 18281  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VXTN8H y)))
 18282  	// result: (VXTN2_8H dst y)
 18283  	for {
 18284  		if auxIntToUint8(v.AuxInt) != 1 {
 18285  			break
 18286  		}
 18287  		dst := v_0
 18288  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18289  			break
 18290  		}
 18291  		v_1_0 := v_1.Args[0]
 18292  		if v_1_0.Op != OpARM64VXTN8H {
 18293  			break
 18294  		}
 18295  		y := v_1_0.Args[0]
 18296  		v.reset(OpARM64VXTN2_8H)
 18297  		v.AddArg2(dst, y)
 18298  		return true
 18299  	}
 18300  	// match: (VMOVDins0 [0] (VMOVI16B [0]) y:(VDUPDextr [i] _))
 18301  	// result: y
 18302  	for {
 18303  		if auxIntToUint8(v.AuxInt) != 0 || v_0.Op != OpARM64VMOVI16B || auxIntToUint8(v_0.AuxInt) != 0 {
 18304  			break
 18305  		}
 18306  		y := v_1
 18307  		if y.Op != OpARM64VDUPDextr {
 18308  			break
 18309  		}
 18310  		v.copyOf(y)
 18311  		return true
 18312  	}
 18313  	return false
 18314  }
 18315  func rewriteValueARM64_OpARM64VMOVSins0(v *Value) bool {
 18316  	v_1 := v.Args[1]
 18317  	v_0 := v.Args[0]
 18318  	// match: (VMOVSins0 [0] (VMOVI16B [0]) y:(VDUPSextr [i] _))
 18319  	// result: y
 18320  	for {
 18321  		if auxIntToUint8(v.AuxInt) != 0 || v_0.Op != OpARM64VMOVI16B || auxIntToUint8(v_0.AuxInt) != 0 {
 18322  			break
 18323  		}
 18324  		y := v_1
 18325  		if y.Op != OpARM64VDUPSextr {
 18326  			break
 18327  		}
 18328  		v.copyOf(y)
 18329  		return true
 18330  	}
 18331  	return false
 18332  }
 18333  func rewriteValueARM64_OpARM64VPMULL2D(v *Value) bool {
 18334  	v_1 := v.Args[1]
 18335  	v_0 := v.Args[0]
 18336  	// match: (VPMULL2D (VDUPDextr [1] x) (VDUPDextr [1] y))
 18337  	// result: (VPMULL2_2D x y)
 18338  	for {
 18339  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 18340  			if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18341  				continue
 18342  			}
 18343  			x := v_0.Args[0]
 18344  			if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 1 {
 18345  				continue
 18346  			}
 18347  			y := v_1.Args[0]
 18348  			v.reset(OpARM64VPMULL2_2D)
 18349  			v.AddArg2(x, y)
 18350  			return true
 18351  		}
 18352  		break
 18353  	}
 18354  	return false
 18355  }
 18356  func rewriteValueARM64_OpARM64VSHL16B(v *Value) bool {
 18357  	v_0 := v.Args[0]
 18358  	// match: (VSHL16B [a] x)
 18359  	// cond: a==0
 18360  	// result: x
 18361  	for {
 18362  		a := auxIntToUint8(v.AuxInt)
 18363  		x := v_0
 18364  		if !(a == 0) {
 18365  			break
 18366  		}
 18367  		v.copyOf(x)
 18368  		return true
 18369  	}
 18370  	return false
 18371  }
 18372  func rewriteValueARM64_OpARM64VSHL2D(v *Value) bool {
 18373  	v_0 := v.Args[0]
 18374  	// match: (VSHL2D [a] x)
 18375  	// cond: a==0
 18376  	// result: x
 18377  	for {
 18378  		a := auxIntToUint8(v.AuxInt)
 18379  		x := v_0
 18380  		if !(a == 0) {
 18381  			break
 18382  		}
 18383  		v.copyOf(x)
 18384  		return true
 18385  	}
 18386  	return false
 18387  }
 18388  func rewriteValueARM64_OpARM64VSHL4S(v *Value) bool {
 18389  	v_0 := v.Args[0]
 18390  	// match: (VSHL4S [a] x)
 18391  	// cond: a==0
 18392  	// result: x
 18393  	for {
 18394  		a := auxIntToUint8(v.AuxInt)
 18395  		x := v_0
 18396  		if !(a == 0) {
 18397  			break
 18398  		}
 18399  		v.copyOf(x)
 18400  		return true
 18401  	}
 18402  	return false
 18403  }
 18404  func rewriteValueARM64_OpARM64VSHL8H(v *Value) bool {
 18405  	v_0 := v.Args[0]
 18406  	// match: (VSHL8H [a] x)
 18407  	// cond: a==0
 18408  	// result: x
 18409  	for {
 18410  		a := auxIntToUint8(v.AuxInt)
 18411  		x := v_0
 18412  		if !(a == 0) {
 18413  			break
 18414  		}
 18415  		v.copyOf(x)
 18416  		return true
 18417  	}
 18418  	return false
 18419  }
 18420  func rewriteValueARM64_OpARM64VSHRN2D(v *Value) bool {
 18421  	v_0 := v.Args[0]
 18422  	// match: (VSHRN2D [0] x)
 18423  	// result: (VXTN2D x)
 18424  	for {
 18425  		if auxIntToUint8(v.AuxInt) != 0 {
 18426  			break
 18427  		}
 18428  		x := v_0
 18429  		v.reset(OpARM64VXTN2D)
 18430  		v.AddArg(x)
 18431  		return true
 18432  	}
 18433  	return false
 18434  }
 18435  func rewriteValueARM64_OpARM64VSHRN4S(v *Value) bool {
 18436  	v_0 := v.Args[0]
 18437  	// match: (VSHRN4S [0] x)
 18438  	// result: (VXTN4S x)
 18439  	for {
 18440  		if auxIntToUint8(v.AuxInt) != 0 {
 18441  			break
 18442  		}
 18443  		x := v_0
 18444  		v.reset(OpARM64VXTN4S)
 18445  		v.AddArg(x)
 18446  		return true
 18447  	}
 18448  	return false
 18449  }
 18450  func rewriteValueARM64_OpARM64VSHRN8H(v *Value) bool {
 18451  	v_0 := v.Args[0]
 18452  	// match: (VSHRN8H [0] x)
 18453  	// result: (VXTN8H x)
 18454  	for {
 18455  		if auxIntToUint8(v.AuxInt) != 0 {
 18456  			break
 18457  		}
 18458  		x := v_0
 18459  		v.reset(OpARM64VXTN8H)
 18460  		v.AddArg(x)
 18461  		return true
 18462  	}
 18463  	return false
 18464  }
 18465  func rewriteValueARM64_OpARM64VSMULL16B(v *Value) bool {
 18466  	v_1 := v.Args[1]
 18467  	v_0 := v.Args[0]
 18468  	// match: (VSMULL16B (VDUPDextr [1] x) (VDUPDextr [1] y))
 18469  	// result: (VSMULL2_16B x y)
 18470  	for {
 18471  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 18472  			if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18473  				continue
 18474  			}
 18475  			x := v_0.Args[0]
 18476  			if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 1 {
 18477  				continue
 18478  			}
 18479  			y := v_1.Args[0]
 18480  			v.reset(OpARM64VSMULL2_16B)
 18481  			v.AddArg2(x, y)
 18482  			return true
 18483  		}
 18484  		break
 18485  	}
 18486  	return false
 18487  }
 18488  func rewriteValueARM64_OpARM64VSMULL4S(v *Value) bool {
 18489  	v_1 := v.Args[1]
 18490  	v_0 := v.Args[0]
 18491  	// match: (VSMULL4S (VDUPDextr [1] x) (VDUPDextr [1] y))
 18492  	// result: (VSMULL2_4S x y)
 18493  	for {
 18494  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 18495  			if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18496  				continue
 18497  			}
 18498  			x := v_0.Args[0]
 18499  			if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 1 {
 18500  				continue
 18501  			}
 18502  			y := v_1.Args[0]
 18503  			v.reset(OpARM64VSMULL2_4S)
 18504  			v.AddArg2(x, y)
 18505  			return true
 18506  		}
 18507  		break
 18508  	}
 18509  	return false
 18510  }
 18511  func rewriteValueARM64_OpARM64VSMULL8H(v *Value) bool {
 18512  	v_1 := v.Args[1]
 18513  	v_0 := v.Args[0]
 18514  	// match: (VSMULL8H (VDUPDextr [1] x) (VDUPDextr [1] y))
 18515  	// result: (VSMULL2_8H x y)
 18516  	for {
 18517  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 18518  			if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18519  				continue
 18520  			}
 18521  			x := v_0.Args[0]
 18522  			if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 1 {
 18523  				continue
 18524  			}
 18525  			y := v_1.Args[0]
 18526  			v.reset(OpARM64VSMULL2_8H)
 18527  			v.AddArg2(x, y)
 18528  			return true
 18529  		}
 18530  		break
 18531  	}
 18532  	return false
 18533  }
 18534  func rewriteValueARM64_OpARM64VSQSHL16Bconst(v *Value) bool {
 18535  	v_0 := v.Args[0]
 18536  	// match: (VSQSHL16Bconst [a] x)
 18537  	// cond: a==0
 18538  	// result: x
 18539  	for {
 18540  		a := auxIntToUint8(v.AuxInt)
 18541  		x := v_0
 18542  		if !(a == 0) {
 18543  			break
 18544  		}
 18545  		v.copyOf(x)
 18546  		return true
 18547  	}
 18548  	return false
 18549  }
 18550  func rewriteValueARM64_OpARM64VSQSHL2Dconst(v *Value) bool {
 18551  	v_0 := v.Args[0]
 18552  	// match: (VSQSHL2Dconst [a] x)
 18553  	// cond: a==0
 18554  	// result: x
 18555  	for {
 18556  		a := auxIntToUint8(v.AuxInt)
 18557  		x := v_0
 18558  		if !(a == 0) {
 18559  			break
 18560  		}
 18561  		v.copyOf(x)
 18562  		return true
 18563  	}
 18564  	return false
 18565  }
 18566  func rewriteValueARM64_OpARM64VSQSHL4Sconst(v *Value) bool {
 18567  	v_0 := v.Args[0]
 18568  	// match: (VSQSHL4Sconst [a] x)
 18569  	// cond: a==0
 18570  	// result: x
 18571  	for {
 18572  		a := auxIntToUint8(v.AuxInt)
 18573  		x := v_0
 18574  		if !(a == 0) {
 18575  			break
 18576  		}
 18577  		v.copyOf(x)
 18578  		return true
 18579  	}
 18580  	return false
 18581  }
 18582  func rewriteValueARM64_OpARM64VSQSHL8Hconst(v *Value) bool {
 18583  	v_0 := v.Args[0]
 18584  	// match: (VSQSHL8Hconst [a] x)
 18585  	// cond: a==0
 18586  	// result: x
 18587  	for {
 18588  		a := auxIntToUint8(v.AuxInt)
 18589  		x := v_0
 18590  		if !(a == 0) {
 18591  			break
 18592  		}
 18593  		v.copyOf(x)
 18594  		return true
 18595  	}
 18596  	return false
 18597  }
 18598  func rewriteValueARM64_OpARM64VSSHLL16B(v *Value) bool {
 18599  	v_0 := v.Args[0]
 18600  	// match: (VSSHLL16B [a] (VDUPDextr [1] x))
 18601  	// result: (VSSHLL2_16B [a] x)
 18602  	for {
 18603  		a := auxIntToUint8(v.AuxInt)
 18604  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18605  			break
 18606  		}
 18607  		x := v_0.Args[0]
 18608  		v.reset(OpARM64VSSHLL2_16B)
 18609  		v.AuxInt = uint8ToAuxInt(a)
 18610  		v.AddArg(x)
 18611  		return true
 18612  	}
 18613  	return false
 18614  }
 18615  func rewriteValueARM64_OpARM64VSSHLL4S(v *Value) bool {
 18616  	v_0 := v.Args[0]
 18617  	// match: (VSSHLL4S [a] (VDUPDextr [1] x))
 18618  	// result: (VSSHLL2_4S [a] x)
 18619  	for {
 18620  		a := auxIntToUint8(v.AuxInt)
 18621  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18622  			break
 18623  		}
 18624  		x := v_0.Args[0]
 18625  		v.reset(OpARM64VSSHLL2_4S)
 18626  		v.AuxInt = uint8ToAuxInt(a)
 18627  		v.AddArg(x)
 18628  		return true
 18629  	}
 18630  	return false
 18631  }
 18632  func rewriteValueARM64_OpARM64VSSHLL8H(v *Value) bool {
 18633  	v_0 := v.Args[0]
 18634  	// match: (VSSHLL8H [a] (VDUPDextr [1] x))
 18635  	// result: (VSSHLL2_8H [a] x)
 18636  	for {
 18637  		a := auxIntToUint8(v.AuxInt)
 18638  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18639  			break
 18640  		}
 18641  		x := v_0.Args[0]
 18642  		v.reset(OpARM64VSSHLL2_8H)
 18643  		v.AuxInt = uint8ToAuxInt(a)
 18644  		v.AddArg(x)
 18645  		return true
 18646  	}
 18647  	return false
 18648  }
 18649  func rewriteValueARM64_OpARM64VSSHR16B(v *Value) bool {
 18650  	v_0 := v.Args[0]
 18651  	// match: (VSSHR16B [a] x)
 18652  	// cond: a==0
 18653  	// result: x
 18654  	for {
 18655  		a := auxIntToUint8(v.AuxInt)
 18656  		x := v_0
 18657  		if !(a == 0) {
 18658  			break
 18659  		}
 18660  		v.copyOf(x)
 18661  		return true
 18662  	}
 18663  	return false
 18664  }
 18665  func rewriteValueARM64_OpARM64VSSHR2D(v *Value) bool {
 18666  	v_0 := v.Args[0]
 18667  	// match: (VSSHR2D [a] x)
 18668  	// cond: a==0
 18669  	// result: x
 18670  	for {
 18671  		a := auxIntToUint8(v.AuxInt)
 18672  		x := v_0
 18673  		if !(a == 0) {
 18674  			break
 18675  		}
 18676  		v.copyOf(x)
 18677  		return true
 18678  	}
 18679  	return false
 18680  }
 18681  func rewriteValueARM64_OpARM64VSSHR4S(v *Value) bool {
 18682  	v_0 := v.Args[0]
 18683  	// match: (VSSHR4S [a] x)
 18684  	// cond: a==0
 18685  	// result: x
 18686  	for {
 18687  		a := auxIntToUint8(v.AuxInt)
 18688  		x := v_0
 18689  		if !(a == 0) {
 18690  			break
 18691  		}
 18692  		v.copyOf(x)
 18693  		return true
 18694  	}
 18695  	return false
 18696  }
 18697  func rewriteValueARM64_OpARM64VSSHR8H(v *Value) bool {
 18698  	v_0 := v.Args[0]
 18699  	// match: (VSSHR8H [a] x)
 18700  	// cond: a==0
 18701  	// result: x
 18702  	for {
 18703  		a := auxIntToUint8(v.AuxInt)
 18704  		x := v_0
 18705  		if !(a == 0) {
 18706  			break
 18707  		}
 18708  		v.copyOf(x)
 18709  		return true
 18710  	}
 18711  	return false
 18712  }
 18713  func rewriteValueARM64_OpARM64VSXTL16B(v *Value) bool {
 18714  	v_0 := v.Args[0]
 18715  	// match: (VSXTL16B (VDUPDextr [1] x))
 18716  	// result: (VSXTL2_16B x)
 18717  	for {
 18718  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18719  			break
 18720  		}
 18721  		x := v_0.Args[0]
 18722  		v.reset(OpARM64VSXTL2_16B)
 18723  		v.AddArg(x)
 18724  		return true
 18725  	}
 18726  	return false
 18727  }
 18728  func rewriteValueARM64_OpARM64VSXTL4S(v *Value) bool {
 18729  	v_0 := v.Args[0]
 18730  	// match: (VSXTL4S (VDUPDextr [1] x))
 18731  	// result: (VSXTL2_4S x)
 18732  	for {
 18733  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18734  			break
 18735  		}
 18736  		x := v_0.Args[0]
 18737  		v.reset(OpARM64VSXTL2_4S)
 18738  		v.AddArg(x)
 18739  		return true
 18740  	}
 18741  	return false
 18742  }
 18743  func rewriteValueARM64_OpARM64VSXTL8H(v *Value) bool {
 18744  	v_0 := v.Args[0]
 18745  	// match: (VSXTL8H (VDUPDextr [1] x))
 18746  	// result: (VSXTL2_8H x)
 18747  	for {
 18748  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18749  			break
 18750  		}
 18751  		x := v_0.Args[0]
 18752  		v.reset(OpARM64VSXTL2_8H)
 18753  		v.AddArg(x)
 18754  		return true
 18755  	}
 18756  	return false
 18757  }
 18758  func rewriteValueARM64_OpARM64VUMULL16B(v *Value) bool {
 18759  	v_1 := v.Args[1]
 18760  	v_0 := v.Args[0]
 18761  	// match: (VUMULL16B (VDUPDextr [1] x) (VDUPDextr [1] y))
 18762  	// result: (VUMULL2_16B x y)
 18763  	for {
 18764  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 18765  			if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18766  				continue
 18767  			}
 18768  			x := v_0.Args[0]
 18769  			if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 1 {
 18770  				continue
 18771  			}
 18772  			y := v_1.Args[0]
 18773  			v.reset(OpARM64VUMULL2_16B)
 18774  			v.AddArg2(x, y)
 18775  			return true
 18776  		}
 18777  		break
 18778  	}
 18779  	return false
 18780  }
 18781  func rewriteValueARM64_OpARM64VUMULL4S(v *Value) bool {
 18782  	v_1 := v.Args[1]
 18783  	v_0 := v.Args[0]
 18784  	// match: (VUMULL4S (VDUPDextr [1] x) (VDUPDextr [1] y))
 18785  	// result: (VUMULL2_4S x y)
 18786  	for {
 18787  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 18788  			if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18789  				continue
 18790  			}
 18791  			x := v_0.Args[0]
 18792  			if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 1 {
 18793  				continue
 18794  			}
 18795  			y := v_1.Args[0]
 18796  			v.reset(OpARM64VUMULL2_4S)
 18797  			v.AddArg2(x, y)
 18798  			return true
 18799  		}
 18800  		break
 18801  	}
 18802  	return false
 18803  }
 18804  func rewriteValueARM64_OpARM64VUMULL8H(v *Value) bool {
 18805  	v_1 := v.Args[1]
 18806  	v_0 := v.Args[0]
 18807  	// match: (VUMULL8H (VDUPDextr [1] x) (VDUPDextr [1] y))
 18808  	// result: (VUMULL2_8H x y)
 18809  	for {
 18810  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 18811  			if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18812  				continue
 18813  			}
 18814  			x := v_0.Args[0]
 18815  			if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 1 {
 18816  				continue
 18817  			}
 18818  			y := v_1.Args[0]
 18819  			v.reset(OpARM64VUMULL2_8H)
 18820  			v.AddArg2(x, y)
 18821  			return true
 18822  		}
 18823  		break
 18824  	}
 18825  	return false
 18826  }
 18827  func rewriteValueARM64_OpARM64VUQSHL16Bconst(v *Value) bool {
 18828  	v_0 := v.Args[0]
 18829  	// match: (VUQSHL16Bconst [a] x)
 18830  	// cond: a==0
 18831  	// result: x
 18832  	for {
 18833  		a := auxIntToUint8(v.AuxInt)
 18834  		x := v_0
 18835  		if !(a == 0) {
 18836  			break
 18837  		}
 18838  		v.copyOf(x)
 18839  		return true
 18840  	}
 18841  	return false
 18842  }
 18843  func rewriteValueARM64_OpARM64VUQSHL2Dconst(v *Value) bool {
 18844  	v_0 := v.Args[0]
 18845  	// match: (VUQSHL2Dconst [a] x)
 18846  	// cond: a==0
 18847  	// result: x
 18848  	for {
 18849  		a := auxIntToUint8(v.AuxInt)
 18850  		x := v_0
 18851  		if !(a == 0) {
 18852  			break
 18853  		}
 18854  		v.copyOf(x)
 18855  		return true
 18856  	}
 18857  	return false
 18858  }
 18859  func rewriteValueARM64_OpARM64VUQSHL4Sconst(v *Value) bool {
 18860  	v_0 := v.Args[0]
 18861  	// match: (VUQSHL4Sconst [a] x)
 18862  	// cond: a==0
 18863  	// result: x
 18864  	for {
 18865  		a := auxIntToUint8(v.AuxInt)
 18866  		x := v_0
 18867  		if !(a == 0) {
 18868  			break
 18869  		}
 18870  		v.copyOf(x)
 18871  		return true
 18872  	}
 18873  	return false
 18874  }
 18875  func rewriteValueARM64_OpARM64VUQSHL8Hconst(v *Value) bool {
 18876  	v_0 := v.Args[0]
 18877  	// match: (VUQSHL8Hconst [a] x)
 18878  	// cond: a==0
 18879  	// result: x
 18880  	for {
 18881  		a := auxIntToUint8(v.AuxInt)
 18882  		x := v_0
 18883  		if !(a == 0) {
 18884  			break
 18885  		}
 18886  		v.copyOf(x)
 18887  		return true
 18888  	}
 18889  	return false
 18890  }
 18891  func rewriteValueARM64_OpARM64VUSHLL16B(v *Value) bool {
 18892  	v_0 := v.Args[0]
 18893  	// match: (VUSHLL16B [a] (VDUPDextr [1] x))
 18894  	// result: (VUSHLL2_16B [a] x)
 18895  	for {
 18896  		a := auxIntToUint8(v.AuxInt)
 18897  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18898  			break
 18899  		}
 18900  		x := v_0.Args[0]
 18901  		v.reset(OpARM64VUSHLL2_16B)
 18902  		v.AuxInt = uint8ToAuxInt(a)
 18903  		v.AddArg(x)
 18904  		return true
 18905  	}
 18906  	return false
 18907  }
 18908  func rewriteValueARM64_OpARM64VUSHLL4S(v *Value) bool {
 18909  	v_0 := v.Args[0]
 18910  	// match: (VUSHLL4S [a] (VDUPDextr [1] x))
 18911  	// result: (VUSHLL2_4S [a] x)
 18912  	for {
 18913  		a := auxIntToUint8(v.AuxInt)
 18914  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18915  			break
 18916  		}
 18917  		x := v_0.Args[0]
 18918  		v.reset(OpARM64VUSHLL2_4S)
 18919  		v.AuxInt = uint8ToAuxInt(a)
 18920  		v.AddArg(x)
 18921  		return true
 18922  	}
 18923  	return false
 18924  }
 18925  func rewriteValueARM64_OpARM64VUSHLL8H(v *Value) bool {
 18926  	v_0 := v.Args[0]
 18927  	// match: (VUSHLL8H [a] (VDUPDextr [1] x))
 18928  	// result: (VUSHLL2_8H [a] x)
 18929  	for {
 18930  		a := auxIntToUint8(v.AuxInt)
 18931  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18932  			break
 18933  		}
 18934  		x := v_0.Args[0]
 18935  		v.reset(OpARM64VUSHLL2_8H)
 18936  		v.AuxInt = uint8ToAuxInt(a)
 18937  		v.AddArg(x)
 18938  		return true
 18939  	}
 18940  	return false
 18941  }
 18942  func rewriteValueARM64_OpARM64VUSHR16B(v *Value) bool {
 18943  	v_0 := v.Args[0]
 18944  	// match: (VUSHR16B [a] x)
 18945  	// cond: a==0
 18946  	// result: x
 18947  	for {
 18948  		a := auxIntToUint8(v.AuxInt)
 18949  		x := v_0
 18950  		if !(a == 0) {
 18951  			break
 18952  		}
 18953  		v.copyOf(x)
 18954  		return true
 18955  	}
 18956  	return false
 18957  }
 18958  func rewriteValueARM64_OpARM64VUSHR2D(v *Value) bool {
 18959  	v_0 := v.Args[0]
 18960  	// match: (VUSHR2D [a] x)
 18961  	// cond: a==0
 18962  	// result: x
 18963  	for {
 18964  		a := auxIntToUint8(v.AuxInt)
 18965  		x := v_0
 18966  		if !(a == 0) {
 18967  			break
 18968  		}
 18969  		v.copyOf(x)
 18970  		return true
 18971  	}
 18972  	return false
 18973  }
 18974  func rewriteValueARM64_OpARM64VUSHR4S(v *Value) bool {
 18975  	v_0 := v.Args[0]
 18976  	// match: (VUSHR4S [a] x)
 18977  	// cond: a==0
 18978  	// result: x
 18979  	for {
 18980  		a := auxIntToUint8(v.AuxInt)
 18981  		x := v_0
 18982  		if !(a == 0) {
 18983  			break
 18984  		}
 18985  		v.copyOf(x)
 18986  		return true
 18987  	}
 18988  	return false
 18989  }
 18990  func rewriteValueARM64_OpARM64VUSHR8H(v *Value) bool {
 18991  	v_0 := v.Args[0]
 18992  	// match: (VUSHR8H [a] x)
 18993  	// cond: a==0
 18994  	// result: x
 18995  	for {
 18996  		a := auxIntToUint8(v.AuxInt)
 18997  		x := v_0
 18998  		if !(a == 0) {
 18999  			break
 19000  		}
 19001  		v.copyOf(x)
 19002  		return true
 19003  	}
 19004  	return false
 19005  }
 19006  func rewriteValueARM64_OpARM64VUXTL16B(v *Value) bool {
 19007  	v_0 := v.Args[0]
 19008  	// match: (VUXTL16B (VDUPDextr [1] x))
 19009  	// result: (VUXTL2_16B x)
 19010  	for {
 19011  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 19012  			break
 19013  		}
 19014  		x := v_0.Args[0]
 19015  		v.reset(OpARM64VUXTL2_16B)
 19016  		v.AddArg(x)
 19017  		return true
 19018  	}
 19019  	return false
 19020  }
 19021  func rewriteValueARM64_OpARM64VUXTL4S(v *Value) bool {
 19022  	v_0 := v.Args[0]
 19023  	// match: (VUXTL4S (VDUPDextr [1] x))
 19024  	// result: (VUXTL2_4S x)
 19025  	for {
 19026  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 19027  			break
 19028  		}
 19029  		x := v_0.Args[0]
 19030  		v.reset(OpARM64VUXTL2_4S)
 19031  		v.AddArg(x)
 19032  		return true
 19033  	}
 19034  	return false
 19035  }
 19036  func rewriteValueARM64_OpARM64VUXTL8H(v *Value) bool {
 19037  	v_0 := v.Args[0]
 19038  	// match: (VUXTL8H (VDUPDextr [1] x))
 19039  	// result: (VUXTL2_8H x)
 19040  	for {
 19041  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 19042  			break
 19043  		}
 19044  		x := v_0.Args[0]
 19045  		v.reset(OpARM64VUXTL2_8H)
 19046  		v.AddArg(x)
 19047  		return true
 19048  	}
 19049  	return false
 19050  }
 19051  func rewriteValueARM64_OpARM64XOR(v *Value) bool {
 19052  	v_1 := v.Args[1]
 19053  	v_0 := v.Args[0]
 19054  	// match: (XOR x (MOVDconst [c]))
 19055  	// result: (XORconst [c] x)
 19056  	for {
 19057  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 19058  			x := v_0
 19059  			if v_1.Op != OpARM64MOVDconst {
 19060  				continue
 19061  			}
 19062  			c := auxIntToInt64(v_1.AuxInt)
 19063  			v.reset(OpARM64XORconst)
 19064  			v.AuxInt = int64ToAuxInt(c)
 19065  			v.AddArg(x)
 19066  			return true
 19067  		}
 19068  		break
 19069  	}
 19070  	// match: (XOR x x)
 19071  	// result: (MOVDconst [0])
 19072  	for {
 19073  		x := v_0
 19074  		if x != v_1 {
 19075  			break
 19076  		}
 19077  		v.reset(OpARM64MOVDconst)
 19078  		v.AuxInt = int64ToAuxInt(0)
 19079  		return true
 19080  	}
 19081  	// match: (XOR x (MVN y))
 19082  	// result: (EON x y)
 19083  	for {
 19084  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 19085  			x := v_0
 19086  			if v_1.Op != OpARM64MVN {
 19087  				continue
 19088  			}
 19089  			y := v_1.Args[0]
 19090  			v.reset(OpARM64EON)
 19091  			v.AddArg2(x, y)
 19092  			return true
 19093  		}
 19094  		break
 19095  	}
 19096  	// match: (XOR x0 x1:(SLLconst [c] y))
 19097  	// cond: clobberIfDead(x1)
 19098  	// result: (XORshiftLL x0 y [c])
 19099  	for {
 19100  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 19101  			x0 := v_0
 19102  			x1 := v_1
 19103  			if x1.Op != OpARM64SLLconst {
 19104  				continue
 19105  			}
 19106  			c := auxIntToInt64(x1.AuxInt)
 19107  			y := x1.Args[0]
 19108  			if !(clobberIfDead(x1)) {
 19109  				continue
 19110  			}
 19111  			v.reset(OpARM64XORshiftLL)
 19112  			v.AuxInt = int64ToAuxInt(c)
 19113  			v.AddArg2(x0, y)
 19114  			return true
 19115  		}
 19116  		break
 19117  	}
 19118  	// match: (XOR x0 x1:(SRLconst [c] y))
 19119  	// cond: clobberIfDead(x1)
 19120  	// result: (XORshiftRL x0 y [c])
 19121  	for {
 19122  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 19123  			x0 := v_0
 19124  			x1 := v_1
 19125  			if x1.Op != OpARM64SRLconst {
 19126  				continue
 19127  			}
 19128  			c := auxIntToInt64(x1.AuxInt)
 19129  			y := x1.Args[0]
 19130  			if !(clobberIfDead(x1)) {
 19131  				continue
 19132  			}
 19133  			v.reset(OpARM64XORshiftRL)
 19134  			v.AuxInt = int64ToAuxInt(c)
 19135  			v.AddArg2(x0, y)
 19136  			return true
 19137  		}
 19138  		break
 19139  	}
 19140  	// match: (XOR x0 x1:(SRAconst [c] y))
 19141  	// cond: clobberIfDead(x1)
 19142  	// result: (XORshiftRA x0 y [c])
 19143  	for {
 19144  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 19145  			x0 := v_0
 19146  			x1 := v_1
 19147  			if x1.Op != OpARM64SRAconst {
 19148  				continue
 19149  			}
 19150  			c := auxIntToInt64(x1.AuxInt)
 19151  			y := x1.Args[0]
 19152  			if !(clobberIfDead(x1)) {
 19153  				continue
 19154  			}
 19155  			v.reset(OpARM64XORshiftRA)
 19156  			v.AuxInt = int64ToAuxInt(c)
 19157  			v.AddArg2(x0, y)
 19158  			return true
 19159  		}
 19160  		break
 19161  	}
 19162  	// match: (XOR x0 x1:(RORconst [c] y))
 19163  	// cond: clobberIfDead(x1)
 19164  	// result: (XORshiftRO x0 y [c])
 19165  	for {
 19166  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 19167  			x0 := v_0
 19168  			x1 := v_1
 19169  			if x1.Op != OpARM64RORconst {
 19170  				continue
 19171  			}
 19172  			c := auxIntToInt64(x1.AuxInt)
 19173  			y := x1.Args[0]
 19174  			if !(clobberIfDead(x1)) {
 19175  				continue
 19176  			}
 19177  			v.reset(OpARM64XORshiftRO)
 19178  			v.AuxInt = int64ToAuxInt(c)
 19179  			v.AddArg2(x0, y)
 19180  			return true
 19181  		}
 19182  		break
 19183  	}
 19184  	return false
 19185  }
 19186  func rewriteValueARM64_OpARM64XORconst(v *Value) bool {
 19187  	v_0 := v.Args[0]
 19188  	// match: (XORconst [0] x)
 19189  	// result: x
 19190  	for {
 19191  		if auxIntToInt64(v.AuxInt) != 0 {
 19192  			break
 19193  		}
 19194  		x := v_0
 19195  		v.copyOf(x)
 19196  		return true
 19197  	}
 19198  	// match: (XORconst [-1] x)
 19199  	// result: (MVN x)
 19200  	for {
 19201  		if auxIntToInt64(v.AuxInt) != -1 {
 19202  			break
 19203  		}
 19204  		x := v_0
 19205  		v.reset(OpARM64MVN)
 19206  		v.AddArg(x)
 19207  		return true
 19208  	}
 19209  	// match: (XORconst [c] (MOVDconst [d]))
 19210  	// result: (MOVDconst [c^d])
 19211  	for {
 19212  		c := auxIntToInt64(v.AuxInt)
 19213  		if v_0.Op != OpARM64MOVDconst {
 19214  			break
 19215  		}
 19216  		d := auxIntToInt64(v_0.AuxInt)
 19217  		v.reset(OpARM64MOVDconst)
 19218  		v.AuxInt = int64ToAuxInt(c ^ d)
 19219  		return true
 19220  	}
 19221  	// match: (XORconst [c] (XORconst [d] x))
 19222  	// result: (XORconst [c^d] x)
 19223  	for {
 19224  		c := auxIntToInt64(v.AuxInt)
 19225  		if v_0.Op != OpARM64XORconst {
 19226  			break
 19227  		}
 19228  		d := auxIntToInt64(v_0.AuxInt)
 19229  		x := v_0.Args[0]
 19230  		v.reset(OpARM64XORconst)
 19231  		v.AuxInt = int64ToAuxInt(c ^ d)
 19232  		v.AddArg(x)
 19233  		return true
 19234  	}
 19235  	return false
 19236  }
 19237  func rewriteValueARM64_OpARM64XORshiftLL(v *Value) bool {
 19238  	v_1 := v.Args[1]
 19239  	v_0 := v.Args[0]
 19240  	b := v.Block
 19241  	typ := &b.Func.Config.Types
 19242  	// match: (XORshiftLL (MOVDconst [c]) x [d])
 19243  	// result: (XORconst [c] (SLLconst <x.Type> x [d]))
 19244  	for {
 19245  		d := auxIntToInt64(v.AuxInt)
 19246  		if v_0.Op != OpARM64MOVDconst {
 19247  			break
 19248  		}
 19249  		c := auxIntToInt64(v_0.AuxInt)
 19250  		x := v_1
 19251  		v.reset(OpARM64XORconst)
 19252  		v.AuxInt = int64ToAuxInt(c)
 19253  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 19254  		v0.AuxInt = int64ToAuxInt(d)
 19255  		v0.AddArg(x)
 19256  		v.AddArg(v0)
 19257  		return true
 19258  	}
 19259  	// match: (XORshiftLL x (MOVDconst [c]) [d])
 19260  	// result: (XORconst x [int64(uint64(c)<<uint64(d))])
 19261  	for {
 19262  		d := auxIntToInt64(v.AuxInt)
 19263  		x := v_0
 19264  		if v_1.Op != OpARM64MOVDconst {
 19265  			break
 19266  		}
 19267  		c := auxIntToInt64(v_1.AuxInt)
 19268  		v.reset(OpARM64XORconst)
 19269  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
 19270  		v.AddArg(x)
 19271  		return true
 19272  	}
 19273  	// match: (XORshiftLL (SLLconst x [c]) x [c])
 19274  	// result: (MOVDconst [0])
 19275  	for {
 19276  		c := auxIntToInt64(v.AuxInt)
 19277  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
 19278  			break
 19279  		}
 19280  		x := v_0.Args[0]
 19281  		if x != v_1 {
 19282  			break
 19283  		}
 19284  		v.reset(OpARM64MOVDconst)
 19285  		v.AuxInt = int64ToAuxInt(0)
 19286  		return true
 19287  	}
 19288  	// match: (XORshiftLL <typ.UInt16> [8] (UBFX <typ.UInt16> [armBFAuxInt(8, 8)] x) x)
 19289  	// result: (REV16W x)
 19290  	for {
 19291  		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) {
 19292  			break
 19293  		}
 19294  		x := v_0.Args[0]
 19295  		if x != v_1 {
 19296  			break
 19297  		}
 19298  		v.reset(OpARM64REV16W)
 19299  		v.AddArg(x)
 19300  		return true
 19301  	}
 19302  	// match: (XORshiftLL [8] (UBFX [armBFAuxInt(8, 24)] (ANDconst [c1] x)) (ANDconst [c2] x))
 19303  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
 19304  	// result: (REV16W x)
 19305  	for {
 19306  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64UBFX || auxIntToArm64BitField(v_0.AuxInt) != armBFAuxInt(8, 24) {
 19307  			break
 19308  		}
 19309  		v_0_0 := v_0.Args[0]
 19310  		if v_0_0.Op != OpARM64ANDconst {
 19311  			break
 19312  		}
 19313  		c1 := auxIntToInt64(v_0_0.AuxInt)
 19314  		x := v_0_0.Args[0]
 19315  		if v_1.Op != OpARM64ANDconst {
 19316  			break
 19317  		}
 19318  		c2 := auxIntToInt64(v_1.AuxInt)
 19319  		if x != v_1.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
 19320  			break
 19321  		}
 19322  		v.reset(OpARM64REV16W)
 19323  		v.AddArg(x)
 19324  		return true
 19325  	}
 19326  	// match: (XORshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
 19327  	// cond: (uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff)
 19328  	// result: (REV16 x)
 19329  	for {
 19330  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
 19331  			break
 19332  		}
 19333  		v_0_0 := v_0.Args[0]
 19334  		if v_0_0.Op != OpARM64ANDconst {
 19335  			break
 19336  		}
 19337  		c1 := auxIntToInt64(v_0_0.AuxInt)
 19338  		x := v_0_0.Args[0]
 19339  		if v_1.Op != OpARM64ANDconst {
 19340  			break
 19341  		}
 19342  		c2 := auxIntToInt64(v_1.AuxInt)
 19343  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
 19344  			break
 19345  		}
 19346  		v.reset(OpARM64REV16)
 19347  		v.AddArg(x)
 19348  		return true
 19349  	}
 19350  	// match: (XORshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
 19351  	// cond: (uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff)
 19352  	// result: (REV16 (ANDconst <x.Type> [0xffffffff] x))
 19353  	for {
 19354  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
 19355  			break
 19356  		}
 19357  		v_0_0 := v_0.Args[0]
 19358  		if v_0_0.Op != OpARM64ANDconst {
 19359  			break
 19360  		}
 19361  		c1 := auxIntToInt64(v_0_0.AuxInt)
 19362  		x := v_0_0.Args[0]
 19363  		if v_1.Op != OpARM64ANDconst {
 19364  			break
 19365  		}
 19366  		c2 := auxIntToInt64(v_1.AuxInt)
 19367  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
 19368  			break
 19369  		}
 19370  		v.reset(OpARM64REV16)
 19371  		v0 := b.NewValue0(v.Pos, OpARM64ANDconst, x.Type)
 19372  		v0.AuxInt = int64ToAuxInt(0xffffffff)
 19373  		v0.AddArg(x)
 19374  		v.AddArg(v0)
 19375  		return true
 19376  	}
 19377  	// match: (XORshiftLL [c] (SRLconst x [64-c]) x2)
 19378  	// result: (EXTRconst [64-c] x2 x)
 19379  	for {
 19380  		c := auxIntToInt64(v.AuxInt)
 19381  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 64-c {
 19382  			break
 19383  		}
 19384  		x := v_0.Args[0]
 19385  		x2 := v_1
 19386  		v.reset(OpARM64EXTRconst)
 19387  		v.AuxInt = int64ToAuxInt(64 - c)
 19388  		v.AddArg2(x2, x)
 19389  		return true
 19390  	}
 19391  	// match: (XORshiftLL <t> [c] (UBFX [bfc] x) x2)
 19392  	// cond: c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)
 19393  	// result: (EXTRWconst [32-c] x2 x)
 19394  	for {
 19395  		t := v.Type
 19396  		c := auxIntToInt64(v.AuxInt)
 19397  		if v_0.Op != OpARM64UBFX {
 19398  			break
 19399  		}
 19400  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 19401  		x := v_0.Args[0]
 19402  		x2 := v_1
 19403  		if !(c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)) {
 19404  			break
 19405  		}
 19406  		v.reset(OpARM64EXTRWconst)
 19407  		v.AuxInt = int64ToAuxInt(32 - c)
 19408  		v.AddArg2(x2, x)
 19409  		return true
 19410  	}
 19411  	return false
 19412  }
 19413  func rewriteValueARM64_OpARM64XORshiftRA(v *Value) bool {
 19414  	v_1 := v.Args[1]
 19415  	v_0 := v.Args[0]
 19416  	b := v.Block
 19417  	// match: (XORshiftRA (MOVDconst [c]) x [d])
 19418  	// result: (XORconst [c] (SRAconst <x.Type> x [d]))
 19419  	for {
 19420  		d := auxIntToInt64(v.AuxInt)
 19421  		if v_0.Op != OpARM64MOVDconst {
 19422  			break
 19423  		}
 19424  		c := auxIntToInt64(v_0.AuxInt)
 19425  		x := v_1
 19426  		v.reset(OpARM64XORconst)
 19427  		v.AuxInt = int64ToAuxInt(c)
 19428  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
 19429  		v0.AuxInt = int64ToAuxInt(d)
 19430  		v0.AddArg(x)
 19431  		v.AddArg(v0)
 19432  		return true
 19433  	}
 19434  	// match: (XORshiftRA x (MOVDconst [c]) [d])
 19435  	// result: (XORconst x [c>>uint64(d)])
 19436  	for {
 19437  		d := auxIntToInt64(v.AuxInt)
 19438  		x := v_0
 19439  		if v_1.Op != OpARM64MOVDconst {
 19440  			break
 19441  		}
 19442  		c := auxIntToInt64(v_1.AuxInt)
 19443  		v.reset(OpARM64XORconst)
 19444  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
 19445  		v.AddArg(x)
 19446  		return true
 19447  	}
 19448  	// match: (XORshiftRA (SRAconst x [c]) x [c])
 19449  	// result: (MOVDconst [0])
 19450  	for {
 19451  		c := auxIntToInt64(v.AuxInt)
 19452  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
 19453  			break
 19454  		}
 19455  		x := v_0.Args[0]
 19456  		if x != v_1 {
 19457  			break
 19458  		}
 19459  		v.reset(OpARM64MOVDconst)
 19460  		v.AuxInt = int64ToAuxInt(0)
 19461  		return true
 19462  	}
 19463  	return false
 19464  }
 19465  func rewriteValueARM64_OpARM64XORshiftRL(v *Value) bool {
 19466  	v_1 := v.Args[1]
 19467  	v_0 := v.Args[0]
 19468  	b := v.Block
 19469  	// match: (XORshiftRL (MOVDconst [c]) x [d])
 19470  	// result: (XORconst [c] (SRLconst <x.Type> x [d]))
 19471  	for {
 19472  		d := auxIntToInt64(v.AuxInt)
 19473  		if v_0.Op != OpARM64MOVDconst {
 19474  			break
 19475  		}
 19476  		c := auxIntToInt64(v_0.AuxInt)
 19477  		x := v_1
 19478  		v.reset(OpARM64XORconst)
 19479  		v.AuxInt = int64ToAuxInt(c)
 19480  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
 19481  		v0.AuxInt = int64ToAuxInt(d)
 19482  		v0.AddArg(x)
 19483  		v.AddArg(v0)
 19484  		return true
 19485  	}
 19486  	// match: (XORshiftRL x (MOVDconst [c]) [d])
 19487  	// result: (XORconst x [int64(uint64(c)>>uint64(d))])
 19488  	for {
 19489  		d := auxIntToInt64(v.AuxInt)
 19490  		x := v_0
 19491  		if v_1.Op != OpARM64MOVDconst {
 19492  			break
 19493  		}
 19494  		c := auxIntToInt64(v_1.AuxInt)
 19495  		v.reset(OpARM64XORconst)
 19496  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
 19497  		v.AddArg(x)
 19498  		return true
 19499  	}
 19500  	// match: (XORshiftRL (SRLconst x [c]) x [c])
 19501  	// result: (MOVDconst [0])
 19502  	for {
 19503  		c := auxIntToInt64(v.AuxInt)
 19504  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
 19505  			break
 19506  		}
 19507  		x := v_0.Args[0]
 19508  		if x != v_1 {
 19509  			break
 19510  		}
 19511  		v.reset(OpARM64MOVDconst)
 19512  		v.AuxInt = int64ToAuxInt(0)
 19513  		return true
 19514  	}
 19515  	return false
 19516  }
 19517  func rewriteValueARM64_OpARM64XORshiftRO(v *Value) bool {
 19518  	v_1 := v.Args[1]
 19519  	v_0 := v.Args[0]
 19520  	b := v.Block
 19521  	// match: (XORshiftRO (MOVDconst [c]) x [d])
 19522  	// result: (XORconst [c] (RORconst <x.Type> x [d]))
 19523  	for {
 19524  		d := auxIntToInt64(v.AuxInt)
 19525  		if v_0.Op != OpARM64MOVDconst {
 19526  			break
 19527  		}
 19528  		c := auxIntToInt64(v_0.AuxInt)
 19529  		x := v_1
 19530  		v.reset(OpARM64XORconst)
 19531  		v.AuxInt = int64ToAuxInt(c)
 19532  		v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
 19533  		v0.AuxInt = int64ToAuxInt(d)
 19534  		v0.AddArg(x)
 19535  		v.AddArg(v0)
 19536  		return true
 19537  	}
 19538  	// match: (XORshiftRO x (MOVDconst [c]) [d])
 19539  	// result: (XORconst x [rotateRight64(c, d)])
 19540  	for {
 19541  		d := auxIntToInt64(v.AuxInt)
 19542  		x := v_0
 19543  		if v_1.Op != OpARM64MOVDconst {
 19544  			break
 19545  		}
 19546  		c := auxIntToInt64(v_1.AuxInt)
 19547  		v.reset(OpARM64XORconst)
 19548  		v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
 19549  		v.AddArg(x)
 19550  		return true
 19551  	}
 19552  	// match: (XORshiftRO (RORconst x [c]) x [c])
 19553  	// result: (MOVDconst [0])
 19554  	for {
 19555  		c := auxIntToInt64(v.AuxInt)
 19556  		if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
 19557  			break
 19558  		}
 19559  		x := v_0.Args[0]
 19560  		if x != v_1 {
 19561  			break
 19562  		}
 19563  		v.reset(OpARM64MOVDconst)
 19564  		v.AuxInt = int64ToAuxInt(0)
 19565  		return true
 19566  	}
 19567  	return false
 19568  }
 19569  func rewriteValueARM64_OpAddr(v *Value) bool {
 19570  	v_0 := v.Args[0]
 19571  	// match: (Addr {sym} base)
 19572  	// result: (MOVDaddr {sym} base)
 19573  	for {
 19574  		sym := auxToSym(v.Aux)
 19575  		base := v_0
 19576  		v.reset(OpARM64MOVDaddr)
 19577  		v.Aux = symToAux(sym)
 19578  		v.AddArg(base)
 19579  		return true
 19580  	}
 19581  }
 19582  func rewriteValueARM64_OpAvg64u(v *Value) bool {
 19583  	v_1 := v.Args[1]
 19584  	v_0 := v.Args[0]
 19585  	b := v.Block
 19586  	// match: (Avg64u <t> x y)
 19587  	// result: (ADD (SRLconst <t> (SUB <t> x y) [1]) y)
 19588  	for {
 19589  		t := v.Type
 19590  		x := v_0
 19591  		y := v_1
 19592  		v.reset(OpARM64ADD)
 19593  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, t)
 19594  		v0.AuxInt = int64ToAuxInt(1)
 19595  		v1 := b.NewValue0(v.Pos, OpARM64SUB, t)
 19596  		v1.AddArg2(x, y)
 19597  		v0.AddArg(v1)
 19598  		v.AddArg2(v0, y)
 19599  		return true
 19600  	}
 19601  }
 19602  func rewriteValueARM64_OpBitLen16(v *Value) bool {
 19603  	v_0 := v.Args[0]
 19604  	b := v.Block
 19605  	typ := &b.Func.Config.Types
 19606  	// match: (BitLen16 x)
 19607  	// result: (BitLen64 (ZeroExt16to64 x))
 19608  	for {
 19609  		x := v_0
 19610  		v.reset(OpBitLen64)
 19611  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 19612  		v0.AddArg(x)
 19613  		v.AddArg(v0)
 19614  		return true
 19615  	}
 19616  }
 19617  func rewriteValueARM64_OpBitLen32(v *Value) bool {
 19618  	v_0 := v.Args[0]
 19619  	b := v.Block
 19620  	typ := &b.Func.Config.Types
 19621  	// match: (BitLen32 x)
 19622  	// result: (SUB (MOVDconst [32]) (CLZW <typ.Int> x))
 19623  	for {
 19624  		x := v_0
 19625  		v.reset(OpARM64SUB)
 19626  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 19627  		v0.AuxInt = int64ToAuxInt(32)
 19628  		v1 := b.NewValue0(v.Pos, OpARM64CLZW, typ.Int)
 19629  		v1.AddArg(x)
 19630  		v.AddArg2(v0, v1)
 19631  		return true
 19632  	}
 19633  }
 19634  func rewriteValueARM64_OpBitLen64(v *Value) bool {
 19635  	v_0 := v.Args[0]
 19636  	b := v.Block
 19637  	typ := &b.Func.Config.Types
 19638  	// match: (BitLen64 x)
 19639  	// result: (SUB (MOVDconst [64]) (CLZ <typ.Int> x))
 19640  	for {
 19641  		x := v_0
 19642  		v.reset(OpARM64SUB)
 19643  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 19644  		v0.AuxInt = int64ToAuxInt(64)
 19645  		v1 := b.NewValue0(v.Pos, OpARM64CLZ, typ.Int)
 19646  		v1.AddArg(x)
 19647  		v.AddArg2(v0, v1)
 19648  		return true
 19649  	}
 19650  }
 19651  func rewriteValueARM64_OpBitLen8(v *Value) bool {
 19652  	v_0 := v.Args[0]
 19653  	b := v.Block
 19654  	typ := &b.Func.Config.Types
 19655  	// match: (BitLen8 x)
 19656  	// result: (BitLen64 (ZeroExt8to64 x))
 19657  	for {
 19658  		x := v_0
 19659  		v.reset(OpBitLen64)
 19660  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 19661  		v0.AddArg(x)
 19662  		v.AddArg(v0)
 19663  		return true
 19664  	}
 19665  }
 19666  func rewriteValueARM64_OpBitRev16(v *Value) bool {
 19667  	v_0 := v.Args[0]
 19668  	b := v.Block
 19669  	typ := &b.Func.Config.Types
 19670  	// match: (BitRev16 x)
 19671  	// result: (SRLconst [48] (RBIT <typ.UInt64> x))
 19672  	for {
 19673  		x := v_0
 19674  		v.reset(OpARM64SRLconst)
 19675  		v.AuxInt = int64ToAuxInt(48)
 19676  		v0 := b.NewValue0(v.Pos, OpARM64RBIT, typ.UInt64)
 19677  		v0.AddArg(x)
 19678  		v.AddArg(v0)
 19679  		return true
 19680  	}
 19681  }
 19682  func rewriteValueARM64_OpBitRev8(v *Value) bool {
 19683  	v_0 := v.Args[0]
 19684  	b := v.Block
 19685  	typ := &b.Func.Config.Types
 19686  	// match: (BitRev8 x)
 19687  	// result: (SRLconst [56] (RBIT <typ.UInt64> x))
 19688  	for {
 19689  		x := v_0
 19690  		v.reset(OpARM64SRLconst)
 19691  		v.AuxInt = int64ToAuxInt(56)
 19692  		v0 := b.NewValue0(v.Pos, OpARM64RBIT, typ.UInt64)
 19693  		v0.AddArg(x)
 19694  		v.AddArg(v0)
 19695  		return true
 19696  	}
 19697  }
 19698  func rewriteValueARM64_OpCondSelect(v *Value) bool {
 19699  	v_2 := v.Args[2]
 19700  	v_1 := v.Args[1]
 19701  	v_0 := v.Args[0]
 19702  	b := v.Block
 19703  	// match: (CondSelect x y boolval)
 19704  	// cond: flagArg(boolval) != nil
 19705  	// result: (CSEL [boolval.Op] x y flagArg(boolval))
 19706  	for {
 19707  		x := v_0
 19708  		y := v_1
 19709  		boolval := v_2
 19710  		if !(flagArg(boolval) != nil) {
 19711  			break
 19712  		}
 19713  		v.reset(OpARM64CSEL)
 19714  		v.AuxInt = opToAuxInt(boolval.Op)
 19715  		v.AddArg3(x, y, flagArg(boolval))
 19716  		return true
 19717  	}
 19718  	// match: (CondSelect x y boolval)
 19719  	// cond: flagArg(boolval) == nil
 19720  	// result: (CSEL [OpARM64NotEqual] x y (TSTWconst [1] boolval))
 19721  	for {
 19722  		x := v_0
 19723  		y := v_1
 19724  		boolval := v_2
 19725  		if !(flagArg(boolval) == nil) {
 19726  			break
 19727  		}
 19728  		v.reset(OpARM64CSEL)
 19729  		v.AuxInt = opToAuxInt(OpARM64NotEqual)
 19730  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
 19731  		v0.AuxInt = int32ToAuxInt(1)
 19732  		v0.AddArg(boolval)
 19733  		v.AddArg3(x, y, v0)
 19734  		return true
 19735  	}
 19736  	return false
 19737  }
 19738  func rewriteValueARM64_OpConst16(v *Value) bool {
 19739  	// match: (Const16 [val])
 19740  	// result: (MOVDconst [int64(val)])
 19741  	for {
 19742  		val := auxIntToInt16(v.AuxInt)
 19743  		v.reset(OpARM64MOVDconst)
 19744  		v.AuxInt = int64ToAuxInt(int64(val))
 19745  		return true
 19746  	}
 19747  }
 19748  func rewriteValueARM64_OpConst32(v *Value) bool {
 19749  	// match: (Const32 [val])
 19750  	// result: (MOVDconst [int64(val)])
 19751  	for {
 19752  		val := auxIntToInt32(v.AuxInt)
 19753  		v.reset(OpARM64MOVDconst)
 19754  		v.AuxInt = int64ToAuxInt(int64(val))
 19755  		return true
 19756  	}
 19757  }
 19758  func rewriteValueARM64_OpConst32F(v *Value) bool {
 19759  	// match: (Const32F [val])
 19760  	// result: (FMOVSconst [float64(val)])
 19761  	for {
 19762  		val := auxIntToFloat32(v.AuxInt)
 19763  		v.reset(OpARM64FMOVSconst)
 19764  		v.AuxInt = float64ToAuxInt(float64(val))
 19765  		return true
 19766  	}
 19767  }
 19768  func rewriteValueARM64_OpConst64(v *Value) bool {
 19769  	// match: (Const64 [val])
 19770  	// result: (MOVDconst [int64(val)])
 19771  	for {
 19772  		val := auxIntToInt64(v.AuxInt)
 19773  		v.reset(OpARM64MOVDconst)
 19774  		v.AuxInt = int64ToAuxInt(int64(val))
 19775  		return true
 19776  	}
 19777  }
 19778  func rewriteValueARM64_OpConst64F(v *Value) bool {
 19779  	// match: (Const64F [val])
 19780  	// result: (FMOVDconst [float64(val)])
 19781  	for {
 19782  		val := auxIntToFloat64(v.AuxInt)
 19783  		v.reset(OpARM64FMOVDconst)
 19784  		v.AuxInt = float64ToAuxInt(float64(val))
 19785  		return true
 19786  	}
 19787  }
 19788  func rewriteValueARM64_OpConst8(v *Value) bool {
 19789  	// match: (Const8 [val])
 19790  	// result: (MOVDconst [int64(val)])
 19791  	for {
 19792  		val := auxIntToInt8(v.AuxInt)
 19793  		v.reset(OpARM64MOVDconst)
 19794  		v.AuxInt = int64ToAuxInt(int64(val))
 19795  		return true
 19796  	}
 19797  }
 19798  func rewriteValueARM64_OpConstBool(v *Value) bool {
 19799  	// match: (ConstBool [t])
 19800  	// result: (MOVDconst [b2i(t)])
 19801  	for {
 19802  		t := auxIntToBool(v.AuxInt)
 19803  		v.reset(OpARM64MOVDconst)
 19804  		v.AuxInt = int64ToAuxInt(b2i(t))
 19805  		return true
 19806  	}
 19807  }
 19808  func rewriteValueARM64_OpConstNil(v *Value) bool {
 19809  	// match: (ConstNil)
 19810  	// result: (MOVDconst [0])
 19811  	for {
 19812  		v.reset(OpARM64MOVDconst)
 19813  		v.AuxInt = int64ToAuxInt(0)
 19814  		return true
 19815  	}
 19816  }
 19817  func rewriteValueARM64_OpCtz16(v *Value) bool {
 19818  	v_0 := v.Args[0]
 19819  	b := v.Block
 19820  	typ := &b.Func.Config.Types
 19821  	// match: (Ctz16 <t> x)
 19822  	// result: (CLZW <t> (RBITW <typ.UInt32> (ORconst <typ.UInt32> [0x10000] x)))
 19823  	for {
 19824  		t := v.Type
 19825  		x := v_0
 19826  		v.reset(OpARM64CLZW)
 19827  		v.Type = t
 19828  		v0 := b.NewValue0(v.Pos, OpARM64RBITW, typ.UInt32)
 19829  		v1 := b.NewValue0(v.Pos, OpARM64ORconst, typ.UInt32)
 19830  		v1.AuxInt = int64ToAuxInt(0x10000)
 19831  		v1.AddArg(x)
 19832  		v0.AddArg(v1)
 19833  		v.AddArg(v0)
 19834  		return true
 19835  	}
 19836  }
 19837  func rewriteValueARM64_OpCtz32(v *Value) bool {
 19838  	v_0 := v.Args[0]
 19839  	b := v.Block
 19840  	// match: (Ctz32 <t> x)
 19841  	// result: (CLZW (RBITW <t> x))
 19842  	for {
 19843  		t := v.Type
 19844  		x := v_0
 19845  		v.reset(OpARM64CLZW)
 19846  		v0 := b.NewValue0(v.Pos, OpARM64RBITW, t)
 19847  		v0.AddArg(x)
 19848  		v.AddArg(v0)
 19849  		return true
 19850  	}
 19851  }
 19852  func rewriteValueARM64_OpCtz64(v *Value) bool {
 19853  	v_0 := v.Args[0]
 19854  	b := v.Block
 19855  	// match: (Ctz64 <t> x)
 19856  	// result: (CLZ (RBIT <t> x))
 19857  	for {
 19858  		t := v.Type
 19859  		x := v_0
 19860  		v.reset(OpARM64CLZ)
 19861  		v0 := b.NewValue0(v.Pos, OpARM64RBIT, t)
 19862  		v0.AddArg(x)
 19863  		v.AddArg(v0)
 19864  		return true
 19865  	}
 19866  }
 19867  func rewriteValueARM64_OpCtz8(v *Value) bool {
 19868  	v_0 := v.Args[0]
 19869  	b := v.Block
 19870  	typ := &b.Func.Config.Types
 19871  	// match: (Ctz8 <t> x)
 19872  	// result: (CLZW <t> (RBITW <typ.UInt32> (ORconst <typ.UInt32> [0x100] x)))
 19873  	for {
 19874  		t := v.Type
 19875  		x := v_0
 19876  		v.reset(OpARM64CLZW)
 19877  		v.Type = t
 19878  		v0 := b.NewValue0(v.Pos, OpARM64RBITW, typ.UInt32)
 19879  		v1 := b.NewValue0(v.Pos, OpARM64ORconst, typ.UInt32)
 19880  		v1.AuxInt = int64ToAuxInt(0x100)
 19881  		v1.AddArg(x)
 19882  		v0.AddArg(v1)
 19883  		v.AddArg(v0)
 19884  		return true
 19885  	}
 19886  }
 19887  func rewriteValueARM64_OpDiv16(v *Value) bool {
 19888  	v_1 := v.Args[1]
 19889  	v_0 := v.Args[0]
 19890  	b := v.Block
 19891  	typ := &b.Func.Config.Types
 19892  	// match: (Div16 [false] x y)
 19893  	// result: (DIVW (SignExt16to32 x) (SignExt16to32 y))
 19894  	for {
 19895  		if auxIntToBool(v.AuxInt) != false {
 19896  			break
 19897  		}
 19898  		x := v_0
 19899  		y := v_1
 19900  		v.reset(OpARM64DIVW)
 19901  		v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 19902  		v0.AddArg(x)
 19903  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 19904  		v1.AddArg(y)
 19905  		v.AddArg2(v0, v1)
 19906  		return true
 19907  	}
 19908  	return false
 19909  }
 19910  func rewriteValueARM64_OpDiv16u(v *Value) bool {
 19911  	v_1 := v.Args[1]
 19912  	v_0 := v.Args[0]
 19913  	b := v.Block
 19914  	typ := &b.Func.Config.Types
 19915  	// match: (Div16u x y)
 19916  	// result: (UDIVW (ZeroExt16to32 x) (ZeroExt16to32 y))
 19917  	for {
 19918  		x := v_0
 19919  		y := v_1
 19920  		v.reset(OpARM64UDIVW)
 19921  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 19922  		v0.AddArg(x)
 19923  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 19924  		v1.AddArg(y)
 19925  		v.AddArg2(v0, v1)
 19926  		return true
 19927  	}
 19928  }
 19929  func rewriteValueARM64_OpDiv32(v *Value) bool {
 19930  	v_1 := v.Args[1]
 19931  	v_0 := v.Args[0]
 19932  	// match: (Div32 [false] x y)
 19933  	// result: (DIVW x y)
 19934  	for {
 19935  		if auxIntToBool(v.AuxInt) != false {
 19936  			break
 19937  		}
 19938  		x := v_0
 19939  		y := v_1
 19940  		v.reset(OpARM64DIVW)
 19941  		v.AddArg2(x, y)
 19942  		return true
 19943  	}
 19944  	return false
 19945  }
 19946  func rewriteValueARM64_OpDiv64(v *Value) bool {
 19947  	v_1 := v.Args[1]
 19948  	v_0 := v.Args[0]
 19949  	// match: (Div64 [false] x y)
 19950  	// result: (DIV x y)
 19951  	for {
 19952  		if auxIntToBool(v.AuxInt) != false {
 19953  			break
 19954  		}
 19955  		x := v_0
 19956  		y := v_1
 19957  		v.reset(OpARM64DIV)
 19958  		v.AddArg2(x, y)
 19959  		return true
 19960  	}
 19961  	return false
 19962  }
 19963  func rewriteValueARM64_OpDiv8(v *Value) bool {
 19964  	v_1 := v.Args[1]
 19965  	v_0 := v.Args[0]
 19966  	b := v.Block
 19967  	typ := &b.Func.Config.Types
 19968  	// match: (Div8 x y)
 19969  	// result: (DIVW (SignExt8to32 x) (SignExt8to32 y))
 19970  	for {
 19971  		x := v_0
 19972  		y := v_1
 19973  		v.reset(OpARM64DIVW)
 19974  		v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 19975  		v0.AddArg(x)
 19976  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 19977  		v1.AddArg(y)
 19978  		v.AddArg2(v0, v1)
 19979  		return true
 19980  	}
 19981  }
 19982  func rewriteValueARM64_OpDiv8u(v *Value) bool {
 19983  	v_1 := v.Args[1]
 19984  	v_0 := v.Args[0]
 19985  	b := v.Block
 19986  	typ := &b.Func.Config.Types
 19987  	// match: (Div8u x y)
 19988  	// result: (UDIVW (ZeroExt8to32 x) (ZeroExt8to32 y))
 19989  	for {
 19990  		x := v_0
 19991  		y := v_1
 19992  		v.reset(OpARM64UDIVW)
 19993  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 19994  		v0.AddArg(x)
 19995  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 19996  		v1.AddArg(y)
 19997  		v.AddArg2(v0, v1)
 19998  		return true
 19999  	}
 20000  }
 20001  func rewriteValueARM64_OpEq16(v *Value) bool {
 20002  	v_1 := v.Args[1]
 20003  	v_0 := v.Args[0]
 20004  	b := v.Block
 20005  	typ := &b.Func.Config.Types
 20006  	// match: (Eq16 x y)
 20007  	// result: (Equal (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
 20008  	for {
 20009  		x := v_0
 20010  		y := v_1
 20011  		v.reset(OpARM64Equal)
 20012  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20013  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 20014  		v1.AddArg(x)
 20015  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 20016  		v2.AddArg(y)
 20017  		v0.AddArg2(v1, v2)
 20018  		v.AddArg(v0)
 20019  		return true
 20020  	}
 20021  }
 20022  func rewriteValueARM64_OpEq32(v *Value) bool {
 20023  	v_1 := v.Args[1]
 20024  	v_0 := v.Args[0]
 20025  	b := v.Block
 20026  	// match: (Eq32 x y)
 20027  	// result: (Equal (CMPW x y))
 20028  	for {
 20029  		x := v_0
 20030  		y := v_1
 20031  		v.reset(OpARM64Equal)
 20032  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20033  		v0.AddArg2(x, y)
 20034  		v.AddArg(v0)
 20035  		return true
 20036  	}
 20037  }
 20038  func rewriteValueARM64_OpEq32F(v *Value) bool {
 20039  	v_1 := v.Args[1]
 20040  	v_0 := v.Args[0]
 20041  	b := v.Block
 20042  	// match: (Eq32F x y)
 20043  	// result: (Equal (FCMPS x y))
 20044  	for {
 20045  		x := v_0
 20046  		y := v_1
 20047  		v.reset(OpARM64Equal)
 20048  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
 20049  		v0.AddArg2(x, y)
 20050  		v.AddArg(v0)
 20051  		return true
 20052  	}
 20053  }
 20054  func rewriteValueARM64_OpEq64(v *Value) bool {
 20055  	v_1 := v.Args[1]
 20056  	v_0 := v.Args[0]
 20057  	b := v.Block
 20058  	// match: (Eq64 x y)
 20059  	// result: (Equal (CMP x y))
 20060  	for {
 20061  		x := v_0
 20062  		y := v_1
 20063  		v.reset(OpARM64Equal)
 20064  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 20065  		v0.AddArg2(x, y)
 20066  		v.AddArg(v0)
 20067  		return true
 20068  	}
 20069  }
 20070  func rewriteValueARM64_OpEq64F(v *Value) bool {
 20071  	v_1 := v.Args[1]
 20072  	v_0 := v.Args[0]
 20073  	b := v.Block
 20074  	// match: (Eq64F x y)
 20075  	// result: (Equal (FCMPD x y))
 20076  	for {
 20077  		x := v_0
 20078  		y := v_1
 20079  		v.reset(OpARM64Equal)
 20080  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
 20081  		v0.AddArg2(x, y)
 20082  		v.AddArg(v0)
 20083  		return true
 20084  	}
 20085  }
 20086  func rewriteValueARM64_OpEq8(v *Value) bool {
 20087  	v_1 := v.Args[1]
 20088  	v_0 := v.Args[0]
 20089  	b := v.Block
 20090  	typ := &b.Func.Config.Types
 20091  	// match: (Eq8 x y)
 20092  	// result: (Equal (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
 20093  	for {
 20094  		x := v_0
 20095  		y := v_1
 20096  		v.reset(OpARM64Equal)
 20097  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20098  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 20099  		v1.AddArg(x)
 20100  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 20101  		v2.AddArg(y)
 20102  		v0.AddArg2(v1, v2)
 20103  		v.AddArg(v0)
 20104  		return true
 20105  	}
 20106  }
 20107  func rewriteValueARM64_OpEqB(v *Value) bool {
 20108  	v_1 := v.Args[1]
 20109  	v_0 := v.Args[0]
 20110  	b := v.Block
 20111  	typ := &b.Func.Config.Types
 20112  	// match: (EqB x y)
 20113  	// result: (XOR (MOVDconst [1]) (XOR <typ.Bool> x y))
 20114  	for {
 20115  		x := v_0
 20116  		y := v_1
 20117  		v.reset(OpARM64XOR)
 20118  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20119  		v0.AuxInt = int64ToAuxInt(1)
 20120  		v1 := b.NewValue0(v.Pos, OpARM64XOR, typ.Bool)
 20121  		v1.AddArg2(x, y)
 20122  		v.AddArg2(v0, v1)
 20123  		return true
 20124  	}
 20125  }
 20126  func rewriteValueARM64_OpEqPtr(v *Value) bool {
 20127  	v_1 := v.Args[1]
 20128  	v_0 := v.Args[0]
 20129  	b := v.Block
 20130  	// match: (EqPtr x y)
 20131  	// result: (Equal (CMP x y))
 20132  	for {
 20133  		x := v_0
 20134  		y := v_1
 20135  		v.reset(OpARM64Equal)
 20136  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 20137  		v0.AddArg2(x, y)
 20138  		v.AddArg(v0)
 20139  		return true
 20140  	}
 20141  }
 20142  func rewriteValueARM64_OpFMA(v *Value) bool {
 20143  	v_2 := v.Args[2]
 20144  	v_1 := v.Args[1]
 20145  	v_0 := v.Args[0]
 20146  	// match: (FMA x y z)
 20147  	// result: (FMADDD z x y)
 20148  	for {
 20149  		x := v_0
 20150  		y := v_1
 20151  		z := v_2
 20152  		v.reset(OpARM64FMADDD)
 20153  		v.AddArg3(z, x, y)
 20154  		return true
 20155  	}
 20156  }
 20157  func rewriteValueARM64_OpHmul32(v *Value) bool {
 20158  	v_1 := v.Args[1]
 20159  	v_0 := v.Args[0]
 20160  	b := v.Block
 20161  	typ := &b.Func.Config.Types
 20162  	// match: (Hmul32 x y)
 20163  	// result: (SRAconst (MULL <typ.Int64> x y) [32])
 20164  	for {
 20165  		x := v_0
 20166  		y := v_1
 20167  		v.reset(OpARM64SRAconst)
 20168  		v.AuxInt = int64ToAuxInt(32)
 20169  		v0 := b.NewValue0(v.Pos, OpARM64MULL, typ.Int64)
 20170  		v0.AddArg2(x, y)
 20171  		v.AddArg(v0)
 20172  		return true
 20173  	}
 20174  }
 20175  func rewriteValueARM64_OpHmul32u(v *Value) bool {
 20176  	v_1 := v.Args[1]
 20177  	v_0 := v.Args[0]
 20178  	b := v.Block
 20179  	typ := &b.Func.Config.Types
 20180  	// match: (Hmul32u x y)
 20181  	// result: (SRAconst (UMULL <typ.UInt64> x y) [32])
 20182  	for {
 20183  		x := v_0
 20184  		y := v_1
 20185  		v.reset(OpARM64SRAconst)
 20186  		v.AuxInt = int64ToAuxInt(32)
 20187  		v0 := b.NewValue0(v.Pos, OpARM64UMULL, typ.UInt64)
 20188  		v0.AddArg2(x, y)
 20189  		v.AddArg(v0)
 20190  		return true
 20191  	}
 20192  }
 20193  func rewriteValueARM64_OpIsInBounds(v *Value) bool {
 20194  	v_1 := v.Args[1]
 20195  	v_0 := v.Args[0]
 20196  	b := v.Block
 20197  	// match: (IsInBounds idx len)
 20198  	// result: (LessThanU (CMP idx len))
 20199  	for {
 20200  		idx := v_0
 20201  		len := v_1
 20202  		v.reset(OpARM64LessThanU)
 20203  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 20204  		v0.AddArg2(idx, len)
 20205  		v.AddArg(v0)
 20206  		return true
 20207  	}
 20208  }
 20209  func rewriteValueARM64_OpIsNonNil(v *Value) bool {
 20210  	v_0 := v.Args[0]
 20211  	b := v.Block
 20212  	// match: (IsNonNil ptr)
 20213  	// result: (NotEqual (CMPconst [0] ptr))
 20214  	for {
 20215  		ptr := v_0
 20216  		v.reset(OpARM64NotEqual)
 20217  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20218  		v0.AuxInt = int64ToAuxInt(0)
 20219  		v0.AddArg(ptr)
 20220  		v.AddArg(v0)
 20221  		return true
 20222  	}
 20223  }
 20224  func rewriteValueARM64_OpIsSliceInBounds(v *Value) bool {
 20225  	v_1 := v.Args[1]
 20226  	v_0 := v.Args[0]
 20227  	b := v.Block
 20228  	// match: (IsSliceInBounds idx len)
 20229  	// result: (LessEqualU (CMP idx len))
 20230  	for {
 20231  		idx := v_0
 20232  		len := v_1
 20233  		v.reset(OpARM64LessEqualU)
 20234  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 20235  		v0.AddArg2(idx, len)
 20236  		v.AddArg(v0)
 20237  		return true
 20238  	}
 20239  }
 20240  func rewriteValueARM64_OpLeq16(v *Value) bool {
 20241  	v_1 := v.Args[1]
 20242  	v_0 := v.Args[0]
 20243  	b := v.Block
 20244  	typ := &b.Func.Config.Types
 20245  	// match: (Leq16 x y)
 20246  	// result: (LessEqual (CMPW (SignExt16to32 x) (SignExt16to32 y)))
 20247  	for {
 20248  		x := v_0
 20249  		y := v_1
 20250  		v.reset(OpARM64LessEqual)
 20251  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20252  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 20253  		v1.AddArg(x)
 20254  		v2 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 20255  		v2.AddArg(y)
 20256  		v0.AddArg2(v1, v2)
 20257  		v.AddArg(v0)
 20258  		return true
 20259  	}
 20260  }
 20261  func rewriteValueARM64_OpLeq16U(v *Value) bool {
 20262  	v_1 := v.Args[1]
 20263  	v_0 := v.Args[0]
 20264  	b := v.Block
 20265  	typ := &b.Func.Config.Types
 20266  	// match: (Leq16U x zero:(MOVDconst [0]))
 20267  	// result: (Eq16 x zero)
 20268  	for {
 20269  		x := v_0
 20270  		zero := v_1
 20271  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 20272  			break
 20273  		}
 20274  		v.reset(OpEq16)
 20275  		v.AddArg2(x, zero)
 20276  		return true
 20277  	}
 20278  	// match: (Leq16U (MOVDconst [1]) x)
 20279  	// result: (Neq16 (MOVDconst [0]) x)
 20280  	for {
 20281  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
 20282  			break
 20283  		}
 20284  		x := v_1
 20285  		v.reset(OpNeq16)
 20286  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20287  		v0.AuxInt = int64ToAuxInt(0)
 20288  		v.AddArg2(v0, x)
 20289  		return true
 20290  	}
 20291  	// match: (Leq16U x y)
 20292  	// result: (LessEqualU (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
 20293  	for {
 20294  		x := v_0
 20295  		y := v_1
 20296  		v.reset(OpARM64LessEqualU)
 20297  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20298  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 20299  		v1.AddArg(x)
 20300  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 20301  		v2.AddArg(y)
 20302  		v0.AddArg2(v1, v2)
 20303  		v.AddArg(v0)
 20304  		return true
 20305  	}
 20306  }
 20307  func rewriteValueARM64_OpLeq32(v *Value) bool {
 20308  	v_1 := v.Args[1]
 20309  	v_0 := v.Args[0]
 20310  	b := v.Block
 20311  	// match: (Leq32 x y)
 20312  	// result: (LessEqual (CMPW x y))
 20313  	for {
 20314  		x := v_0
 20315  		y := v_1
 20316  		v.reset(OpARM64LessEqual)
 20317  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20318  		v0.AddArg2(x, y)
 20319  		v.AddArg(v0)
 20320  		return true
 20321  	}
 20322  }
 20323  func rewriteValueARM64_OpLeq32F(v *Value) bool {
 20324  	v_1 := v.Args[1]
 20325  	v_0 := v.Args[0]
 20326  	b := v.Block
 20327  	// match: (Leq32F x y)
 20328  	// result: (LessEqualF (FCMPS x y))
 20329  	for {
 20330  		x := v_0
 20331  		y := v_1
 20332  		v.reset(OpARM64LessEqualF)
 20333  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
 20334  		v0.AddArg2(x, y)
 20335  		v.AddArg(v0)
 20336  		return true
 20337  	}
 20338  }
 20339  func rewriteValueARM64_OpLeq32U(v *Value) bool {
 20340  	v_1 := v.Args[1]
 20341  	v_0 := v.Args[0]
 20342  	b := v.Block
 20343  	typ := &b.Func.Config.Types
 20344  	// match: (Leq32U x zero:(MOVDconst [0]))
 20345  	// result: (Eq32 x zero)
 20346  	for {
 20347  		x := v_0
 20348  		zero := v_1
 20349  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 20350  			break
 20351  		}
 20352  		v.reset(OpEq32)
 20353  		v.AddArg2(x, zero)
 20354  		return true
 20355  	}
 20356  	// match: (Leq32U (MOVDconst [1]) x)
 20357  	// result: (Neq32 (MOVDconst [0]) x)
 20358  	for {
 20359  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
 20360  			break
 20361  		}
 20362  		x := v_1
 20363  		v.reset(OpNeq32)
 20364  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20365  		v0.AuxInt = int64ToAuxInt(0)
 20366  		v.AddArg2(v0, x)
 20367  		return true
 20368  	}
 20369  	// match: (Leq32U x y)
 20370  	// result: (LessEqualU (CMPW x y))
 20371  	for {
 20372  		x := v_0
 20373  		y := v_1
 20374  		v.reset(OpARM64LessEqualU)
 20375  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20376  		v0.AddArg2(x, y)
 20377  		v.AddArg(v0)
 20378  		return true
 20379  	}
 20380  }
 20381  func rewriteValueARM64_OpLeq64(v *Value) bool {
 20382  	v_1 := v.Args[1]
 20383  	v_0 := v.Args[0]
 20384  	b := v.Block
 20385  	// match: (Leq64 x y)
 20386  	// result: (LessEqual (CMP x y))
 20387  	for {
 20388  		x := v_0
 20389  		y := v_1
 20390  		v.reset(OpARM64LessEqual)
 20391  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 20392  		v0.AddArg2(x, y)
 20393  		v.AddArg(v0)
 20394  		return true
 20395  	}
 20396  }
 20397  func rewriteValueARM64_OpLeq64F(v *Value) bool {
 20398  	v_1 := v.Args[1]
 20399  	v_0 := v.Args[0]
 20400  	b := v.Block
 20401  	// match: (Leq64F x y)
 20402  	// result: (LessEqualF (FCMPD x y))
 20403  	for {
 20404  		x := v_0
 20405  		y := v_1
 20406  		v.reset(OpARM64LessEqualF)
 20407  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
 20408  		v0.AddArg2(x, y)
 20409  		v.AddArg(v0)
 20410  		return true
 20411  	}
 20412  }
 20413  func rewriteValueARM64_OpLeq64U(v *Value) bool {
 20414  	v_1 := v.Args[1]
 20415  	v_0 := v.Args[0]
 20416  	b := v.Block
 20417  	typ := &b.Func.Config.Types
 20418  	// match: (Leq64U x zero:(MOVDconst [0]))
 20419  	// result: (Eq64 x zero)
 20420  	for {
 20421  		x := v_0
 20422  		zero := v_1
 20423  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 20424  			break
 20425  		}
 20426  		v.reset(OpEq64)
 20427  		v.AddArg2(x, zero)
 20428  		return true
 20429  	}
 20430  	// match: (Leq64U (MOVDconst [1]) x)
 20431  	// result: (Neq64 (MOVDconst [0]) x)
 20432  	for {
 20433  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
 20434  			break
 20435  		}
 20436  		x := v_1
 20437  		v.reset(OpNeq64)
 20438  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20439  		v0.AuxInt = int64ToAuxInt(0)
 20440  		v.AddArg2(v0, x)
 20441  		return true
 20442  	}
 20443  	// match: (Leq64U x y)
 20444  	// result: (LessEqualU (CMP x y))
 20445  	for {
 20446  		x := v_0
 20447  		y := v_1
 20448  		v.reset(OpARM64LessEqualU)
 20449  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 20450  		v0.AddArg2(x, y)
 20451  		v.AddArg(v0)
 20452  		return true
 20453  	}
 20454  }
 20455  func rewriteValueARM64_OpLeq8(v *Value) bool {
 20456  	v_1 := v.Args[1]
 20457  	v_0 := v.Args[0]
 20458  	b := v.Block
 20459  	typ := &b.Func.Config.Types
 20460  	// match: (Leq8 x y)
 20461  	// result: (LessEqual (CMPW (SignExt8to32 x) (SignExt8to32 y)))
 20462  	for {
 20463  		x := v_0
 20464  		y := v_1
 20465  		v.reset(OpARM64LessEqual)
 20466  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20467  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 20468  		v1.AddArg(x)
 20469  		v2 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 20470  		v2.AddArg(y)
 20471  		v0.AddArg2(v1, v2)
 20472  		v.AddArg(v0)
 20473  		return true
 20474  	}
 20475  }
 20476  func rewriteValueARM64_OpLeq8U(v *Value) bool {
 20477  	v_1 := v.Args[1]
 20478  	v_0 := v.Args[0]
 20479  	b := v.Block
 20480  	typ := &b.Func.Config.Types
 20481  	// match: (Leq8U x zero:(MOVDconst [0]))
 20482  	// result: (Eq8 x zero)
 20483  	for {
 20484  		x := v_0
 20485  		zero := v_1
 20486  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 20487  			break
 20488  		}
 20489  		v.reset(OpEq8)
 20490  		v.AddArg2(x, zero)
 20491  		return true
 20492  	}
 20493  	// match: (Leq8U (MOVDconst [1]) x)
 20494  	// result: (Neq8 (MOVDconst [0]) x)
 20495  	for {
 20496  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
 20497  			break
 20498  		}
 20499  		x := v_1
 20500  		v.reset(OpNeq8)
 20501  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20502  		v0.AuxInt = int64ToAuxInt(0)
 20503  		v.AddArg2(v0, x)
 20504  		return true
 20505  	}
 20506  	// match: (Leq8U x y)
 20507  	// result: (LessEqualU (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
 20508  	for {
 20509  		x := v_0
 20510  		y := v_1
 20511  		v.reset(OpARM64LessEqualU)
 20512  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20513  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 20514  		v1.AddArg(x)
 20515  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 20516  		v2.AddArg(y)
 20517  		v0.AddArg2(v1, v2)
 20518  		v.AddArg(v0)
 20519  		return true
 20520  	}
 20521  }
 20522  func rewriteValueARM64_OpLess16(v *Value) bool {
 20523  	v_1 := v.Args[1]
 20524  	v_0 := v.Args[0]
 20525  	b := v.Block
 20526  	typ := &b.Func.Config.Types
 20527  	// match: (Less16 x y)
 20528  	// result: (LessThan (CMPW (SignExt16to32 x) (SignExt16to32 y)))
 20529  	for {
 20530  		x := v_0
 20531  		y := v_1
 20532  		v.reset(OpARM64LessThan)
 20533  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20534  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 20535  		v1.AddArg(x)
 20536  		v2 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 20537  		v2.AddArg(y)
 20538  		v0.AddArg2(v1, v2)
 20539  		v.AddArg(v0)
 20540  		return true
 20541  	}
 20542  }
 20543  func rewriteValueARM64_OpLess16U(v *Value) bool {
 20544  	v_1 := v.Args[1]
 20545  	v_0 := v.Args[0]
 20546  	b := v.Block
 20547  	typ := &b.Func.Config.Types
 20548  	// match: (Less16U zero:(MOVDconst [0]) x)
 20549  	// result: (Neq16 zero x)
 20550  	for {
 20551  		zero := v_0
 20552  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 20553  			break
 20554  		}
 20555  		x := v_1
 20556  		v.reset(OpNeq16)
 20557  		v.AddArg2(zero, x)
 20558  		return true
 20559  	}
 20560  	// match: (Less16U x (MOVDconst [1]))
 20561  	// result: (Eq16 x (MOVDconst [0]))
 20562  	for {
 20563  		x := v_0
 20564  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 20565  			break
 20566  		}
 20567  		v.reset(OpEq16)
 20568  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20569  		v0.AuxInt = int64ToAuxInt(0)
 20570  		v.AddArg2(x, v0)
 20571  		return true
 20572  	}
 20573  	// match: (Less16U x y)
 20574  	// result: (LessThanU (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
 20575  	for {
 20576  		x := v_0
 20577  		y := v_1
 20578  		v.reset(OpARM64LessThanU)
 20579  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20580  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 20581  		v1.AddArg(x)
 20582  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 20583  		v2.AddArg(y)
 20584  		v0.AddArg2(v1, v2)
 20585  		v.AddArg(v0)
 20586  		return true
 20587  	}
 20588  }
 20589  func rewriteValueARM64_OpLess32(v *Value) bool {
 20590  	v_1 := v.Args[1]
 20591  	v_0 := v.Args[0]
 20592  	b := v.Block
 20593  	// match: (Less32 x y)
 20594  	// result: (LessThan (CMPW x y))
 20595  	for {
 20596  		x := v_0
 20597  		y := v_1
 20598  		v.reset(OpARM64LessThan)
 20599  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20600  		v0.AddArg2(x, y)
 20601  		v.AddArg(v0)
 20602  		return true
 20603  	}
 20604  }
 20605  func rewriteValueARM64_OpLess32F(v *Value) bool {
 20606  	v_1 := v.Args[1]
 20607  	v_0 := v.Args[0]
 20608  	b := v.Block
 20609  	// match: (Less32F x y)
 20610  	// result: (LessThanF (FCMPS x y))
 20611  	for {
 20612  		x := v_0
 20613  		y := v_1
 20614  		v.reset(OpARM64LessThanF)
 20615  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
 20616  		v0.AddArg2(x, y)
 20617  		v.AddArg(v0)
 20618  		return true
 20619  	}
 20620  }
 20621  func rewriteValueARM64_OpLess32U(v *Value) bool {
 20622  	v_1 := v.Args[1]
 20623  	v_0 := v.Args[0]
 20624  	b := v.Block
 20625  	typ := &b.Func.Config.Types
 20626  	// match: (Less32U zero:(MOVDconst [0]) x)
 20627  	// result: (Neq32 zero x)
 20628  	for {
 20629  		zero := v_0
 20630  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 20631  			break
 20632  		}
 20633  		x := v_1
 20634  		v.reset(OpNeq32)
 20635  		v.AddArg2(zero, x)
 20636  		return true
 20637  	}
 20638  	// match: (Less32U x (MOVDconst [1]))
 20639  	// result: (Eq32 x (MOVDconst [0]))
 20640  	for {
 20641  		x := v_0
 20642  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 20643  			break
 20644  		}
 20645  		v.reset(OpEq32)
 20646  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20647  		v0.AuxInt = int64ToAuxInt(0)
 20648  		v.AddArg2(x, v0)
 20649  		return true
 20650  	}
 20651  	// match: (Less32U x y)
 20652  	// result: (LessThanU (CMPW x y))
 20653  	for {
 20654  		x := v_0
 20655  		y := v_1
 20656  		v.reset(OpARM64LessThanU)
 20657  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20658  		v0.AddArg2(x, y)
 20659  		v.AddArg(v0)
 20660  		return true
 20661  	}
 20662  }
 20663  func rewriteValueARM64_OpLess64(v *Value) bool {
 20664  	v_1 := v.Args[1]
 20665  	v_0 := v.Args[0]
 20666  	b := v.Block
 20667  	// match: (Less64 x y)
 20668  	// result: (LessThan (CMP x y))
 20669  	for {
 20670  		x := v_0
 20671  		y := v_1
 20672  		v.reset(OpARM64LessThan)
 20673  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 20674  		v0.AddArg2(x, y)
 20675  		v.AddArg(v0)
 20676  		return true
 20677  	}
 20678  }
 20679  func rewriteValueARM64_OpLess64F(v *Value) bool {
 20680  	v_1 := v.Args[1]
 20681  	v_0 := v.Args[0]
 20682  	b := v.Block
 20683  	// match: (Less64F x y)
 20684  	// result: (LessThanF (FCMPD x y))
 20685  	for {
 20686  		x := v_0
 20687  		y := v_1
 20688  		v.reset(OpARM64LessThanF)
 20689  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
 20690  		v0.AddArg2(x, y)
 20691  		v.AddArg(v0)
 20692  		return true
 20693  	}
 20694  }
 20695  func rewriteValueARM64_OpLess64U(v *Value) bool {
 20696  	v_1 := v.Args[1]
 20697  	v_0 := v.Args[0]
 20698  	b := v.Block
 20699  	typ := &b.Func.Config.Types
 20700  	// match: (Less64U zero:(MOVDconst [0]) x)
 20701  	// result: (Neq64 zero x)
 20702  	for {
 20703  		zero := v_0
 20704  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 20705  			break
 20706  		}
 20707  		x := v_1
 20708  		v.reset(OpNeq64)
 20709  		v.AddArg2(zero, x)
 20710  		return true
 20711  	}
 20712  	// match: (Less64U x (MOVDconst [1]))
 20713  	// result: (Eq64 x (MOVDconst [0]))
 20714  	for {
 20715  		x := v_0
 20716  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 20717  			break
 20718  		}
 20719  		v.reset(OpEq64)
 20720  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20721  		v0.AuxInt = int64ToAuxInt(0)
 20722  		v.AddArg2(x, v0)
 20723  		return true
 20724  	}
 20725  	// match: (Less64U x y)
 20726  	// result: (LessThanU (CMP x y))
 20727  	for {
 20728  		x := v_0
 20729  		y := v_1
 20730  		v.reset(OpARM64LessThanU)
 20731  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 20732  		v0.AddArg2(x, y)
 20733  		v.AddArg(v0)
 20734  		return true
 20735  	}
 20736  }
 20737  func rewriteValueARM64_OpLess8(v *Value) bool {
 20738  	v_1 := v.Args[1]
 20739  	v_0 := v.Args[0]
 20740  	b := v.Block
 20741  	typ := &b.Func.Config.Types
 20742  	// match: (Less8 x y)
 20743  	// result: (LessThan (CMPW (SignExt8to32 x) (SignExt8to32 y)))
 20744  	for {
 20745  		x := v_0
 20746  		y := v_1
 20747  		v.reset(OpARM64LessThan)
 20748  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20749  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 20750  		v1.AddArg(x)
 20751  		v2 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 20752  		v2.AddArg(y)
 20753  		v0.AddArg2(v1, v2)
 20754  		v.AddArg(v0)
 20755  		return true
 20756  	}
 20757  }
 20758  func rewriteValueARM64_OpLess8U(v *Value) bool {
 20759  	v_1 := v.Args[1]
 20760  	v_0 := v.Args[0]
 20761  	b := v.Block
 20762  	typ := &b.Func.Config.Types
 20763  	// match: (Less8U zero:(MOVDconst [0]) x)
 20764  	// result: (Neq8 zero x)
 20765  	for {
 20766  		zero := v_0
 20767  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 20768  			break
 20769  		}
 20770  		x := v_1
 20771  		v.reset(OpNeq8)
 20772  		v.AddArg2(zero, x)
 20773  		return true
 20774  	}
 20775  	// match: (Less8U x (MOVDconst [1]))
 20776  	// result: (Eq8 x (MOVDconst [0]))
 20777  	for {
 20778  		x := v_0
 20779  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 20780  			break
 20781  		}
 20782  		v.reset(OpEq8)
 20783  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20784  		v0.AuxInt = int64ToAuxInt(0)
 20785  		v.AddArg2(x, v0)
 20786  		return true
 20787  	}
 20788  	// match: (Less8U x y)
 20789  	// result: (LessThanU (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
 20790  	for {
 20791  		x := v_0
 20792  		y := v_1
 20793  		v.reset(OpARM64LessThanU)
 20794  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20795  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 20796  		v1.AddArg(x)
 20797  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 20798  		v2.AddArg(y)
 20799  		v0.AddArg2(v1, v2)
 20800  		v.AddArg(v0)
 20801  		return true
 20802  	}
 20803  }
 20804  func rewriteValueARM64_OpLoad(v *Value) bool {
 20805  	v_1 := v.Args[1]
 20806  	v_0 := v.Args[0]
 20807  	// match: (Load <t> ptr mem)
 20808  	// cond: t.IsBoolean()
 20809  	// result: (MOVBUload ptr mem)
 20810  	for {
 20811  		t := v.Type
 20812  		ptr := v_0
 20813  		mem := v_1
 20814  		if !(t.IsBoolean()) {
 20815  			break
 20816  		}
 20817  		v.reset(OpARM64MOVBUload)
 20818  		v.AddArg2(ptr, mem)
 20819  		return true
 20820  	}
 20821  	// match: (Load <t> ptr mem)
 20822  	// cond: (is8BitInt(t) && t.IsSigned())
 20823  	// result: (MOVBload ptr mem)
 20824  	for {
 20825  		t := v.Type
 20826  		ptr := v_0
 20827  		mem := v_1
 20828  		if !(is8BitInt(t) && t.IsSigned()) {
 20829  			break
 20830  		}
 20831  		v.reset(OpARM64MOVBload)
 20832  		v.AddArg2(ptr, mem)
 20833  		return true
 20834  	}
 20835  	// match: (Load <t> ptr mem)
 20836  	// cond: (is8BitInt(t) && !t.IsSigned())
 20837  	// result: (MOVBUload ptr mem)
 20838  	for {
 20839  		t := v.Type
 20840  		ptr := v_0
 20841  		mem := v_1
 20842  		if !(is8BitInt(t) && !t.IsSigned()) {
 20843  			break
 20844  		}
 20845  		v.reset(OpARM64MOVBUload)
 20846  		v.AddArg2(ptr, mem)
 20847  		return true
 20848  	}
 20849  	// match: (Load <t> ptr mem)
 20850  	// cond: (is16BitInt(t) && t.IsSigned())
 20851  	// result: (MOVHload ptr mem)
 20852  	for {
 20853  		t := v.Type
 20854  		ptr := v_0
 20855  		mem := v_1
 20856  		if !(is16BitInt(t) && t.IsSigned()) {
 20857  			break
 20858  		}
 20859  		v.reset(OpARM64MOVHload)
 20860  		v.AddArg2(ptr, mem)
 20861  		return true
 20862  	}
 20863  	// match: (Load <t> ptr mem)
 20864  	// cond: (is16BitInt(t) && !t.IsSigned())
 20865  	// result: (MOVHUload ptr mem)
 20866  	for {
 20867  		t := v.Type
 20868  		ptr := v_0
 20869  		mem := v_1
 20870  		if !(is16BitInt(t) && !t.IsSigned()) {
 20871  			break
 20872  		}
 20873  		v.reset(OpARM64MOVHUload)
 20874  		v.AddArg2(ptr, mem)
 20875  		return true
 20876  	}
 20877  	// match: (Load <t> ptr mem)
 20878  	// cond: (is32BitInt(t) && t.IsSigned())
 20879  	// result: (MOVWload ptr mem)
 20880  	for {
 20881  		t := v.Type
 20882  		ptr := v_0
 20883  		mem := v_1
 20884  		if !(is32BitInt(t) && t.IsSigned()) {
 20885  			break
 20886  		}
 20887  		v.reset(OpARM64MOVWload)
 20888  		v.AddArg2(ptr, mem)
 20889  		return true
 20890  	}
 20891  	// match: (Load <t> ptr mem)
 20892  	// cond: (is32BitInt(t) && !t.IsSigned())
 20893  	// result: (MOVWUload ptr mem)
 20894  	for {
 20895  		t := v.Type
 20896  		ptr := v_0
 20897  		mem := v_1
 20898  		if !(is32BitInt(t) && !t.IsSigned()) {
 20899  			break
 20900  		}
 20901  		v.reset(OpARM64MOVWUload)
 20902  		v.AddArg2(ptr, mem)
 20903  		return true
 20904  	}
 20905  	// match: (Load <t> ptr mem)
 20906  	// cond: (is64BitInt(t) || isPtr(t))
 20907  	// result: (MOVDload ptr mem)
 20908  	for {
 20909  		t := v.Type
 20910  		ptr := v_0
 20911  		mem := v_1
 20912  		if !(is64BitInt(t) || isPtr(t)) {
 20913  			break
 20914  		}
 20915  		v.reset(OpARM64MOVDload)
 20916  		v.AddArg2(ptr, mem)
 20917  		return true
 20918  	}
 20919  	// match: (Load <t> ptr mem)
 20920  	// cond: is32BitFloat(t)
 20921  	// result: (FMOVSload ptr mem)
 20922  	for {
 20923  		t := v.Type
 20924  		ptr := v_0
 20925  		mem := v_1
 20926  		if !(is32BitFloat(t)) {
 20927  			break
 20928  		}
 20929  		v.reset(OpARM64FMOVSload)
 20930  		v.AddArg2(ptr, mem)
 20931  		return true
 20932  	}
 20933  	// match: (Load <t> ptr mem)
 20934  	// cond: is64BitFloat(t)
 20935  	// result: (FMOVDload ptr mem)
 20936  	for {
 20937  		t := v.Type
 20938  		ptr := v_0
 20939  		mem := v_1
 20940  		if !(is64BitFloat(t)) {
 20941  			break
 20942  		}
 20943  		v.reset(OpARM64FMOVDload)
 20944  		v.AddArg2(ptr, mem)
 20945  		return true
 20946  	}
 20947  	// match: (Load <t> ptr mem)
 20948  	// cond: t.Size() == 16
 20949  	// result: (FMOVQload ptr mem)
 20950  	for {
 20951  		t := v.Type
 20952  		ptr := v_0
 20953  		mem := v_1
 20954  		if !(t.Size() == 16) {
 20955  			break
 20956  		}
 20957  		v.reset(OpARM64FMOVQload)
 20958  		v.AddArg2(ptr, mem)
 20959  		return true
 20960  	}
 20961  	return false
 20962  }
 20963  func rewriteValueARM64_OpLocalAddr(v *Value) bool {
 20964  	v_1 := v.Args[1]
 20965  	v_0 := v.Args[0]
 20966  	b := v.Block
 20967  	typ := &b.Func.Config.Types
 20968  	// match: (LocalAddr <t> {sym} base mem)
 20969  	// cond: t.Elem().HasPointers()
 20970  	// result: (MOVDaddr {sym} (SPanchored base mem))
 20971  	for {
 20972  		t := v.Type
 20973  		sym := auxToSym(v.Aux)
 20974  		base := v_0
 20975  		mem := v_1
 20976  		if !(t.Elem().HasPointers()) {
 20977  			break
 20978  		}
 20979  		v.reset(OpARM64MOVDaddr)
 20980  		v.Aux = symToAux(sym)
 20981  		v0 := b.NewValue0(v.Pos, OpSPanchored, typ.Uintptr)
 20982  		v0.AddArg2(base, mem)
 20983  		v.AddArg(v0)
 20984  		return true
 20985  	}
 20986  	// match: (LocalAddr <t> {sym} base _)
 20987  	// cond: !t.Elem().HasPointers()
 20988  	// result: (MOVDaddr {sym} base)
 20989  	for {
 20990  		t := v.Type
 20991  		sym := auxToSym(v.Aux)
 20992  		base := v_0
 20993  		if !(!t.Elem().HasPointers()) {
 20994  			break
 20995  		}
 20996  		v.reset(OpARM64MOVDaddr)
 20997  		v.Aux = symToAux(sym)
 20998  		v.AddArg(base)
 20999  		return true
 21000  	}
 21001  	return false
 21002  }
 21003  func rewriteValueARM64_OpLsh64x16(v *Value) bool {
 21004  	v_1 := v.Args[1]
 21005  	v_0 := v.Args[0]
 21006  	b := v.Block
 21007  	typ := &b.Func.Config.Types
 21008  	// match: (Lsh64x16 <t> x y)
 21009  	// cond: shiftIsBounded(v)
 21010  	// result: (SLL <t> x y)
 21011  	for {
 21012  		t := v.Type
 21013  		x := v_0
 21014  		y := v_1
 21015  		if !(shiftIsBounded(v)) {
 21016  			break
 21017  		}
 21018  		v.reset(OpARM64SLL)
 21019  		v.Type = t
 21020  		v.AddArg2(x, y)
 21021  		return true
 21022  	}
 21023  	// match: (Lsh64x16 <t> [bounded] x y)
 21024  	// cond: !shiftIsBounded(v)
 21025  	// result: (Lsh64x32 <t> [bounded] x (ZeroExt16to32 y))
 21026  	for {
 21027  		t := v.Type
 21028  		bounded := auxIntToBool(v.AuxInt)
 21029  		x := v_0
 21030  		y := v_1
 21031  		if !(!shiftIsBounded(v)) {
 21032  			break
 21033  		}
 21034  		v.reset(OpLsh64x32)
 21035  		v.Type = t
 21036  		v.AuxInt = boolToAuxInt(bounded)
 21037  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 21038  		v0.AddArg(y)
 21039  		v.AddArg2(x, v0)
 21040  		return true
 21041  	}
 21042  	return false
 21043  }
 21044  func rewriteValueARM64_OpLsh64x32(v *Value) bool {
 21045  	v_1 := v.Args[1]
 21046  	v_0 := v.Args[0]
 21047  	b := v.Block
 21048  	// match: (Lsh64x32 <t> x y)
 21049  	// cond: shiftIsBounded(v)
 21050  	// result: (SLL <t> x y)
 21051  	for {
 21052  		t := v.Type
 21053  		x := v_0
 21054  		y := v_1
 21055  		if !(shiftIsBounded(v)) {
 21056  			break
 21057  		}
 21058  		v.reset(OpARM64SLL)
 21059  		v.Type = t
 21060  		v.AddArg2(x, y)
 21061  		return true
 21062  	}
 21063  	// match: (Lsh64x32 <t> x y)
 21064  	// cond: !shiftIsBounded(v)
 21065  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPWconst [64] y))
 21066  	for {
 21067  		t := v.Type
 21068  		x := v_0
 21069  		y := v_1
 21070  		if !(!shiftIsBounded(v)) {
 21071  			break
 21072  		}
 21073  		v.reset(OpARM64CSEL)
 21074  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21075  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 21076  		v0.AddArg2(x, y)
 21077  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 21078  		v1.AuxInt = int64ToAuxInt(0)
 21079  		v2 := b.NewValue0(v.Pos, OpARM64CMPWconst, types.TypeFlags)
 21080  		v2.AuxInt = int32ToAuxInt(64)
 21081  		v2.AddArg(y)
 21082  		v.AddArg3(v0, v1, v2)
 21083  		return true
 21084  	}
 21085  	return false
 21086  }
 21087  func rewriteValueARM64_OpLsh64x64(v *Value) bool {
 21088  	v_1 := v.Args[1]
 21089  	v_0 := v.Args[0]
 21090  	b := v.Block
 21091  	// match: (Lsh64x64 <t> x y)
 21092  	// cond: shiftIsBounded(v)
 21093  	// result: (SLL <t> x y)
 21094  	for {
 21095  		t := v.Type
 21096  		x := v_0
 21097  		y := v_1
 21098  		if !(shiftIsBounded(v)) {
 21099  			break
 21100  		}
 21101  		v.reset(OpARM64SLL)
 21102  		v.Type = t
 21103  		v.AddArg2(x, y)
 21104  		return true
 21105  	}
 21106  	// match: (Lsh64x64 <t> x y)
 21107  	// cond: !shiftIsBounded(v)
 21108  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] y))
 21109  	for {
 21110  		t := v.Type
 21111  		x := v_0
 21112  		y := v_1
 21113  		if !(!shiftIsBounded(v)) {
 21114  			break
 21115  		}
 21116  		v.reset(OpARM64CSEL)
 21117  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21118  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 21119  		v0.AddArg2(x, y)
 21120  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 21121  		v1.AuxInt = int64ToAuxInt(0)
 21122  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21123  		v2.AuxInt = int64ToAuxInt(64)
 21124  		v2.AddArg(y)
 21125  		v.AddArg3(v0, v1, v2)
 21126  		return true
 21127  	}
 21128  	return false
 21129  }
 21130  func rewriteValueARM64_OpLsh64x8(v *Value) bool {
 21131  	v_1 := v.Args[1]
 21132  	v_0 := v.Args[0]
 21133  	b := v.Block
 21134  	typ := &b.Func.Config.Types
 21135  	// match: (Lsh64x8 <t> x y)
 21136  	// cond: shiftIsBounded(v)
 21137  	// result: (SLL <t> x y)
 21138  	for {
 21139  		t := v.Type
 21140  		x := v_0
 21141  		y := v_1
 21142  		if !(shiftIsBounded(v)) {
 21143  			break
 21144  		}
 21145  		v.reset(OpARM64SLL)
 21146  		v.Type = t
 21147  		v.AddArg2(x, y)
 21148  		return true
 21149  	}
 21150  	// match: (Lsh64x8 <t> [bounded] x y)
 21151  	// cond: !shiftIsBounded(v)
 21152  	// result: (Lsh64x32 <t> [bounded] x (ZeroExt8to32 y))
 21153  	for {
 21154  		t := v.Type
 21155  		bounded := auxIntToBool(v.AuxInt)
 21156  		x := v_0
 21157  		y := v_1
 21158  		if !(!shiftIsBounded(v)) {
 21159  			break
 21160  		}
 21161  		v.reset(OpLsh64x32)
 21162  		v.Type = t
 21163  		v.AuxInt = boolToAuxInt(bounded)
 21164  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 21165  		v0.AddArg(y)
 21166  		v.AddArg2(x, v0)
 21167  		return true
 21168  	}
 21169  	return false
 21170  }
 21171  func rewriteValueARM64_OpMod16(v *Value) bool {
 21172  	v_1 := v.Args[1]
 21173  	v_0 := v.Args[0]
 21174  	b := v.Block
 21175  	typ := &b.Func.Config.Types
 21176  	// match: (Mod16 x y)
 21177  	// result: (MODW (SignExt16to32 x) (SignExt16to32 y))
 21178  	for {
 21179  		x := v_0
 21180  		y := v_1
 21181  		v.reset(OpARM64MODW)
 21182  		v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 21183  		v0.AddArg(x)
 21184  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 21185  		v1.AddArg(y)
 21186  		v.AddArg2(v0, v1)
 21187  		return true
 21188  	}
 21189  }
 21190  func rewriteValueARM64_OpMod16u(v *Value) bool {
 21191  	v_1 := v.Args[1]
 21192  	v_0 := v.Args[0]
 21193  	b := v.Block
 21194  	typ := &b.Func.Config.Types
 21195  	// match: (Mod16u x y)
 21196  	// result: (UMODW (ZeroExt16to32 x) (ZeroExt16to32 y))
 21197  	for {
 21198  		x := v_0
 21199  		y := v_1
 21200  		v.reset(OpARM64UMODW)
 21201  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 21202  		v0.AddArg(x)
 21203  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 21204  		v1.AddArg(y)
 21205  		v.AddArg2(v0, v1)
 21206  		return true
 21207  	}
 21208  }
 21209  func rewriteValueARM64_OpMod32(v *Value) bool {
 21210  	v_1 := v.Args[1]
 21211  	v_0 := v.Args[0]
 21212  	// match: (Mod32 x y)
 21213  	// result: (MODW x y)
 21214  	for {
 21215  		x := v_0
 21216  		y := v_1
 21217  		v.reset(OpARM64MODW)
 21218  		v.AddArg2(x, y)
 21219  		return true
 21220  	}
 21221  }
 21222  func rewriteValueARM64_OpMod64(v *Value) bool {
 21223  	v_1 := v.Args[1]
 21224  	v_0 := v.Args[0]
 21225  	// match: (Mod64 x y)
 21226  	// result: (MOD x y)
 21227  	for {
 21228  		x := v_0
 21229  		y := v_1
 21230  		v.reset(OpARM64MOD)
 21231  		v.AddArg2(x, y)
 21232  		return true
 21233  	}
 21234  }
 21235  func rewriteValueARM64_OpMod8(v *Value) bool {
 21236  	v_1 := v.Args[1]
 21237  	v_0 := v.Args[0]
 21238  	b := v.Block
 21239  	typ := &b.Func.Config.Types
 21240  	// match: (Mod8 x y)
 21241  	// result: (MODW (SignExt8to32 x) (SignExt8to32 y))
 21242  	for {
 21243  		x := v_0
 21244  		y := v_1
 21245  		v.reset(OpARM64MODW)
 21246  		v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 21247  		v0.AddArg(x)
 21248  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 21249  		v1.AddArg(y)
 21250  		v.AddArg2(v0, v1)
 21251  		return true
 21252  	}
 21253  }
 21254  func rewriteValueARM64_OpMod8u(v *Value) bool {
 21255  	v_1 := v.Args[1]
 21256  	v_0 := v.Args[0]
 21257  	b := v.Block
 21258  	typ := &b.Func.Config.Types
 21259  	// match: (Mod8u x y)
 21260  	// result: (UMODW (ZeroExt8to32 x) (ZeroExt8to32 y))
 21261  	for {
 21262  		x := v_0
 21263  		y := v_1
 21264  		v.reset(OpARM64UMODW)
 21265  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 21266  		v0.AddArg(x)
 21267  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 21268  		v1.AddArg(y)
 21269  		v.AddArg2(v0, v1)
 21270  		return true
 21271  	}
 21272  }
 21273  func rewriteValueARM64_OpMove(v *Value) bool {
 21274  	v_2 := v.Args[2]
 21275  	v_1 := v.Args[1]
 21276  	v_0 := v.Args[0]
 21277  	b := v.Block
 21278  	typ := &b.Func.Config.Types
 21279  	// match: (Move [0] _ _ mem)
 21280  	// result: mem
 21281  	for {
 21282  		if auxIntToInt64(v.AuxInt) != 0 {
 21283  			break
 21284  		}
 21285  		mem := v_2
 21286  		v.copyOf(mem)
 21287  		return true
 21288  	}
 21289  	// match: (Move [1] dst src mem)
 21290  	// result: (MOVBstore dst (MOVBUload src mem) mem)
 21291  	for {
 21292  		if auxIntToInt64(v.AuxInt) != 1 {
 21293  			break
 21294  		}
 21295  		dst := v_0
 21296  		src := v_1
 21297  		mem := v_2
 21298  		v.reset(OpARM64MOVBstore)
 21299  		v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
 21300  		v0.AddArg2(src, mem)
 21301  		v.AddArg3(dst, v0, mem)
 21302  		return true
 21303  	}
 21304  	// match: (Move [2] dst src mem)
 21305  	// result: (MOVHstore dst (MOVHUload src mem) mem)
 21306  	for {
 21307  		if auxIntToInt64(v.AuxInt) != 2 {
 21308  			break
 21309  		}
 21310  		dst := v_0
 21311  		src := v_1
 21312  		mem := v_2
 21313  		v.reset(OpARM64MOVHstore)
 21314  		v0 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
 21315  		v0.AddArg2(src, mem)
 21316  		v.AddArg3(dst, v0, mem)
 21317  		return true
 21318  	}
 21319  	// match: (Move [3] dst src mem)
 21320  	// result: (MOVBstore [2] dst (MOVBUload [2] src mem) (MOVHstore dst (MOVHUload src mem) mem))
 21321  	for {
 21322  		if auxIntToInt64(v.AuxInt) != 3 {
 21323  			break
 21324  		}
 21325  		dst := v_0
 21326  		src := v_1
 21327  		mem := v_2
 21328  		v.reset(OpARM64MOVBstore)
 21329  		v.AuxInt = int32ToAuxInt(2)
 21330  		v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
 21331  		v0.AuxInt = int32ToAuxInt(2)
 21332  		v0.AddArg2(src, mem)
 21333  		v1 := b.NewValue0(v.Pos, OpARM64MOVHstore, types.TypeMem)
 21334  		v2 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
 21335  		v2.AddArg2(src, mem)
 21336  		v1.AddArg3(dst, v2, mem)
 21337  		v.AddArg3(dst, v0, v1)
 21338  		return true
 21339  	}
 21340  	// match: (Move [4] dst src mem)
 21341  	// result: (MOVWstore dst (MOVWUload src mem) mem)
 21342  	for {
 21343  		if auxIntToInt64(v.AuxInt) != 4 {
 21344  			break
 21345  		}
 21346  		dst := v_0
 21347  		src := v_1
 21348  		mem := v_2
 21349  		v.reset(OpARM64MOVWstore)
 21350  		v0 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 21351  		v0.AddArg2(src, mem)
 21352  		v.AddArg3(dst, v0, mem)
 21353  		return true
 21354  	}
 21355  	// match: (Move [5] dst src mem)
 21356  	// result: (MOVBstore [4] dst (MOVBUload [4] src mem) (MOVWstore dst (MOVWUload src mem) mem))
 21357  	for {
 21358  		if auxIntToInt64(v.AuxInt) != 5 {
 21359  			break
 21360  		}
 21361  		dst := v_0
 21362  		src := v_1
 21363  		mem := v_2
 21364  		v.reset(OpARM64MOVBstore)
 21365  		v.AuxInt = int32ToAuxInt(4)
 21366  		v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
 21367  		v0.AuxInt = int32ToAuxInt(4)
 21368  		v0.AddArg2(src, mem)
 21369  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 21370  		v2 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 21371  		v2.AddArg2(src, mem)
 21372  		v1.AddArg3(dst, v2, mem)
 21373  		v.AddArg3(dst, v0, v1)
 21374  		return true
 21375  	}
 21376  	// match: (Move [6] dst src mem)
 21377  	// result: (MOVHstore [4] dst (MOVHUload [4] src mem) (MOVWstore dst (MOVWUload src mem) mem))
 21378  	for {
 21379  		if auxIntToInt64(v.AuxInt) != 6 {
 21380  			break
 21381  		}
 21382  		dst := v_0
 21383  		src := v_1
 21384  		mem := v_2
 21385  		v.reset(OpARM64MOVHstore)
 21386  		v.AuxInt = int32ToAuxInt(4)
 21387  		v0 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
 21388  		v0.AuxInt = int32ToAuxInt(4)
 21389  		v0.AddArg2(src, mem)
 21390  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 21391  		v2 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 21392  		v2.AddArg2(src, mem)
 21393  		v1.AddArg3(dst, v2, mem)
 21394  		v.AddArg3(dst, v0, v1)
 21395  		return true
 21396  	}
 21397  	// match: (Move [7] dst src mem)
 21398  	// result: (MOVWstore [3] dst (MOVWUload [3] src mem) (MOVWstore dst (MOVWUload src mem) mem))
 21399  	for {
 21400  		if auxIntToInt64(v.AuxInt) != 7 {
 21401  			break
 21402  		}
 21403  		dst := v_0
 21404  		src := v_1
 21405  		mem := v_2
 21406  		v.reset(OpARM64MOVWstore)
 21407  		v.AuxInt = int32ToAuxInt(3)
 21408  		v0 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 21409  		v0.AuxInt = int32ToAuxInt(3)
 21410  		v0.AddArg2(src, mem)
 21411  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 21412  		v2 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 21413  		v2.AddArg2(src, mem)
 21414  		v1.AddArg3(dst, v2, mem)
 21415  		v.AddArg3(dst, v0, v1)
 21416  		return true
 21417  	}
 21418  	// match: (Move [8] dst src mem)
 21419  	// result: (MOVDstore dst (MOVDload src mem) mem)
 21420  	for {
 21421  		if auxIntToInt64(v.AuxInt) != 8 {
 21422  			break
 21423  		}
 21424  		dst := v_0
 21425  		src := v_1
 21426  		mem := v_2
 21427  		v.reset(OpARM64MOVDstore)
 21428  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21429  		v0.AddArg2(src, mem)
 21430  		v.AddArg3(dst, v0, mem)
 21431  		return true
 21432  	}
 21433  	// match: (Move [9] dst src mem)
 21434  	// result: (MOVBstore [8] dst (MOVBUload [8] src mem) (MOVDstore dst (MOVDload src mem) mem))
 21435  	for {
 21436  		if auxIntToInt64(v.AuxInt) != 9 {
 21437  			break
 21438  		}
 21439  		dst := v_0
 21440  		src := v_1
 21441  		mem := v_2
 21442  		v.reset(OpARM64MOVBstore)
 21443  		v.AuxInt = int32ToAuxInt(8)
 21444  		v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
 21445  		v0.AuxInt = int32ToAuxInt(8)
 21446  		v0.AddArg2(src, mem)
 21447  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 21448  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21449  		v2.AddArg2(src, mem)
 21450  		v1.AddArg3(dst, v2, mem)
 21451  		v.AddArg3(dst, v0, v1)
 21452  		return true
 21453  	}
 21454  	// match: (Move [10] dst src mem)
 21455  	// result: (MOVHstore [8] dst (MOVHUload [8] src mem) (MOVDstore dst (MOVDload src mem) mem))
 21456  	for {
 21457  		if auxIntToInt64(v.AuxInt) != 10 {
 21458  			break
 21459  		}
 21460  		dst := v_0
 21461  		src := v_1
 21462  		mem := v_2
 21463  		v.reset(OpARM64MOVHstore)
 21464  		v.AuxInt = int32ToAuxInt(8)
 21465  		v0 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
 21466  		v0.AuxInt = int32ToAuxInt(8)
 21467  		v0.AddArg2(src, mem)
 21468  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 21469  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21470  		v2.AddArg2(src, mem)
 21471  		v1.AddArg3(dst, v2, mem)
 21472  		v.AddArg3(dst, v0, v1)
 21473  		return true
 21474  	}
 21475  	// match: (Move [11] dst src mem)
 21476  	// result: (MOVDstore [3] dst (MOVDload [3] src mem) (MOVDstore dst (MOVDload src mem) mem))
 21477  	for {
 21478  		if auxIntToInt64(v.AuxInt) != 11 {
 21479  			break
 21480  		}
 21481  		dst := v_0
 21482  		src := v_1
 21483  		mem := v_2
 21484  		v.reset(OpARM64MOVDstore)
 21485  		v.AuxInt = int32ToAuxInt(3)
 21486  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21487  		v0.AuxInt = int32ToAuxInt(3)
 21488  		v0.AddArg2(src, mem)
 21489  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 21490  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21491  		v2.AddArg2(src, mem)
 21492  		v1.AddArg3(dst, v2, mem)
 21493  		v.AddArg3(dst, v0, v1)
 21494  		return true
 21495  	}
 21496  	// match: (Move [12] dst src mem)
 21497  	// result: (MOVWstore [8] dst (MOVWUload [8] src mem) (MOVDstore dst (MOVDload src mem) mem))
 21498  	for {
 21499  		if auxIntToInt64(v.AuxInt) != 12 {
 21500  			break
 21501  		}
 21502  		dst := v_0
 21503  		src := v_1
 21504  		mem := v_2
 21505  		v.reset(OpARM64MOVWstore)
 21506  		v.AuxInt = int32ToAuxInt(8)
 21507  		v0 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 21508  		v0.AuxInt = int32ToAuxInt(8)
 21509  		v0.AddArg2(src, mem)
 21510  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 21511  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21512  		v2.AddArg2(src, mem)
 21513  		v1.AddArg3(dst, v2, mem)
 21514  		v.AddArg3(dst, v0, v1)
 21515  		return true
 21516  	}
 21517  	// match: (Move [13] dst src mem)
 21518  	// result: (MOVDstore [5] dst (MOVDload [5] src mem) (MOVDstore dst (MOVDload src mem) mem))
 21519  	for {
 21520  		if auxIntToInt64(v.AuxInt) != 13 {
 21521  			break
 21522  		}
 21523  		dst := v_0
 21524  		src := v_1
 21525  		mem := v_2
 21526  		v.reset(OpARM64MOVDstore)
 21527  		v.AuxInt = int32ToAuxInt(5)
 21528  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21529  		v0.AuxInt = int32ToAuxInt(5)
 21530  		v0.AddArg2(src, mem)
 21531  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 21532  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21533  		v2.AddArg2(src, mem)
 21534  		v1.AddArg3(dst, v2, mem)
 21535  		v.AddArg3(dst, v0, v1)
 21536  		return true
 21537  	}
 21538  	// match: (Move [14] dst src mem)
 21539  	// result: (MOVDstore [6] dst (MOVDload [6] src mem) (MOVDstore dst (MOVDload src mem) mem))
 21540  	for {
 21541  		if auxIntToInt64(v.AuxInt) != 14 {
 21542  			break
 21543  		}
 21544  		dst := v_0
 21545  		src := v_1
 21546  		mem := v_2
 21547  		v.reset(OpARM64MOVDstore)
 21548  		v.AuxInt = int32ToAuxInt(6)
 21549  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21550  		v0.AuxInt = int32ToAuxInt(6)
 21551  		v0.AddArg2(src, mem)
 21552  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 21553  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21554  		v2.AddArg2(src, mem)
 21555  		v1.AddArg3(dst, v2, mem)
 21556  		v.AddArg3(dst, v0, v1)
 21557  		return true
 21558  	}
 21559  	// match: (Move [15] dst src mem)
 21560  	// result: (MOVDstore [7] dst (MOVDload [7] src mem) (MOVDstore dst (MOVDload src mem) mem))
 21561  	for {
 21562  		if auxIntToInt64(v.AuxInt) != 15 {
 21563  			break
 21564  		}
 21565  		dst := v_0
 21566  		src := v_1
 21567  		mem := v_2
 21568  		v.reset(OpARM64MOVDstore)
 21569  		v.AuxInt = int32ToAuxInt(7)
 21570  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21571  		v0.AuxInt = int32ToAuxInt(7)
 21572  		v0.AddArg2(src, mem)
 21573  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 21574  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21575  		v2.AddArg2(src, mem)
 21576  		v1.AddArg3(dst, v2, mem)
 21577  		v.AddArg3(dst, v0, v1)
 21578  		return true
 21579  	}
 21580  	// match: (Move [16] dst src mem)
 21581  	// result: (FMOVQstore dst (FMOVQload src mem) mem)
 21582  	for {
 21583  		if auxIntToInt64(v.AuxInt) != 16 {
 21584  			break
 21585  		}
 21586  		dst := v_0
 21587  		src := v_1
 21588  		mem := v_2
 21589  		v.reset(OpARM64FMOVQstore)
 21590  		v0 := b.NewValue0(v.Pos, OpARM64FMOVQload, typ.Vec128)
 21591  		v0.AddArg2(src, mem)
 21592  		v.AddArg3(dst, v0, mem)
 21593  		return true
 21594  	}
 21595  	// match: (Move [s] dst src mem)
 21596  	// cond: s > 16 && s <= 24
 21597  	// result: (MOVDstore [int32(s-8)] dst (MOVDload [int32(s-8)] src mem) (FMOVQstore dst (FMOVQload src mem) mem))
 21598  	for {
 21599  		s := auxIntToInt64(v.AuxInt)
 21600  		dst := v_0
 21601  		src := v_1
 21602  		mem := v_2
 21603  		if !(s > 16 && s <= 24) {
 21604  			break
 21605  		}
 21606  		v.reset(OpARM64MOVDstore)
 21607  		v.AuxInt = int32ToAuxInt(int32(s - 8))
 21608  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21609  		v0.AuxInt = int32ToAuxInt(int32(s - 8))
 21610  		v0.AddArg2(src, mem)
 21611  		v1 := b.NewValue0(v.Pos, OpARM64FMOVQstore, types.TypeMem)
 21612  		v2 := b.NewValue0(v.Pos, OpARM64FMOVQload, typ.Vec128)
 21613  		v2.AddArg2(src, mem)
 21614  		v1.AddArg3(dst, v2, mem)
 21615  		v.AddArg3(dst, v0, v1)
 21616  		return true
 21617  	}
 21618  	// match: (Move [s] dst src mem)
 21619  	// cond: s > 24 && s < 32
 21620  	// result: (FMOVQstore [int32(s-16)] dst (FMOVQload [int32(s-16)] src mem) (FMOVQstore dst (FMOVQload src mem) mem))
 21621  	for {
 21622  		s := auxIntToInt64(v.AuxInt)
 21623  		dst := v_0
 21624  		src := v_1
 21625  		mem := v_2
 21626  		if !(s > 24 && s < 32) {
 21627  			break
 21628  		}
 21629  		v.reset(OpARM64FMOVQstore)
 21630  		v.AuxInt = int32ToAuxInt(int32(s - 16))
 21631  		v0 := b.NewValue0(v.Pos, OpARM64FMOVQload, typ.Vec128)
 21632  		v0.AuxInt = int32ToAuxInt(int32(s - 16))
 21633  		v0.AddArg2(src, mem)
 21634  		v1 := b.NewValue0(v.Pos, OpARM64FMOVQstore, types.TypeMem)
 21635  		v2 := b.NewValue0(v.Pos, OpARM64FMOVQload, typ.Vec128)
 21636  		v2.AddArg2(src, mem)
 21637  		v1.AddArg3(dst, v2, mem)
 21638  		v.AddArg3(dst, v0, v1)
 21639  		return true
 21640  	}
 21641  	// match: (Move [32] dst src mem)
 21642  	// result: (FSTPQ dst (Select0 <typ.Vec128> (FLDPQ src mem)) (Select1 <typ.Vec128> (FLDPQ src mem)) mem)
 21643  	for {
 21644  		if auxIntToInt64(v.AuxInt) != 32 {
 21645  			break
 21646  		}
 21647  		dst := v_0
 21648  		src := v_1
 21649  		mem := v_2
 21650  		v.reset(OpARM64FSTPQ)
 21651  		v0 := b.NewValue0(v.Pos, OpSelect0, typ.Vec128)
 21652  		v1 := b.NewValue0(v.Pos, OpARM64FLDPQ, types.NewTuple(typ.Vec128, typ.Vec128))
 21653  		v1.AddArg2(src, mem)
 21654  		v0.AddArg(v1)
 21655  		v2 := b.NewValue0(v.Pos, OpSelect1, typ.Vec128)
 21656  		v2.AddArg(v1)
 21657  		v.AddArg4(dst, v0, v2, mem)
 21658  		return true
 21659  	}
 21660  	// match: (Move [s] dst src mem)
 21661  	// cond: s > 32 && s <= 40
 21662  	// 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))
 21663  	for {
 21664  		s := auxIntToInt64(v.AuxInt)
 21665  		dst := v_0
 21666  		src := v_1
 21667  		mem := v_2
 21668  		if !(s > 32 && s <= 40) {
 21669  			break
 21670  		}
 21671  		v.reset(OpARM64MOVDstore)
 21672  		v.AuxInt = int32ToAuxInt(int32(s - 8))
 21673  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21674  		v0.AuxInt = int32ToAuxInt(int32(s - 8))
 21675  		v0.AddArg2(src, mem)
 21676  		v1 := b.NewValue0(v.Pos, OpARM64FSTPQ, types.TypeMem)
 21677  		v2 := b.NewValue0(v.Pos, OpSelect0, typ.Vec128)
 21678  		v3 := b.NewValue0(v.Pos, OpARM64FLDPQ, types.NewTuple(typ.Vec128, typ.Vec128))
 21679  		v3.AddArg2(src, mem)
 21680  		v2.AddArg(v3)
 21681  		v4 := b.NewValue0(v.Pos, OpSelect1, typ.Vec128)
 21682  		v4.AddArg(v3)
 21683  		v1.AddArg4(dst, v2, v4, mem)
 21684  		v.AddArg3(dst, v0, v1)
 21685  		return true
 21686  	}
 21687  	// match: (Move [s] dst src mem)
 21688  	// cond: s > 40 && s <= 48
 21689  	// 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))
 21690  	for {
 21691  		s := auxIntToInt64(v.AuxInt)
 21692  		dst := v_0
 21693  		src := v_1
 21694  		mem := v_2
 21695  		if !(s > 40 && s <= 48) {
 21696  			break
 21697  		}
 21698  		v.reset(OpARM64FMOVQstore)
 21699  		v.AuxInt = int32ToAuxInt(int32(s - 16))
 21700  		v0 := b.NewValue0(v.Pos, OpARM64FMOVQload, typ.Vec128)
 21701  		v0.AuxInt = int32ToAuxInt(int32(s - 16))
 21702  		v0.AddArg2(src, mem)
 21703  		v1 := b.NewValue0(v.Pos, OpARM64FSTPQ, types.TypeMem)
 21704  		v2 := b.NewValue0(v.Pos, OpSelect0, typ.Vec128)
 21705  		v3 := b.NewValue0(v.Pos, OpARM64FLDPQ, types.NewTuple(typ.Vec128, typ.Vec128))
 21706  		v3.AddArg2(src, mem)
 21707  		v2.AddArg(v3)
 21708  		v4 := b.NewValue0(v.Pos, OpSelect1, typ.Vec128)
 21709  		v4.AddArg(v3)
 21710  		v1.AddArg4(dst, v2, v4, mem)
 21711  		v.AddArg3(dst, v0, v1)
 21712  		return true
 21713  	}
 21714  	// match: (Move [s] dst src mem)
 21715  	// cond: s > 48 && s <= 64
 21716  	// 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))
 21717  	for {
 21718  		s := auxIntToInt64(v.AuxInt)
 21719  		dst := v_0
 21720  		src := v_1
 21721  		mem := v_2
 21722  		if !(s > 48 && s <= 64) {
 21723  			break
 21724  		}
 21725  		v.reset(OpARM64FSTPQ)
 21726  		v.AuxInt = int32ToAuxInt(int32(s - 32))
 21727  		v0 := b.NewValue0(v.Pos, OpSelect0, typ.Vec128)
 21728  		v1 := b.NewValue0(v.Pos, OpARM64FLDPQ, types.NewTuple(typ.Vec128, typ.Vec128))
 21729  		v1.AuxInt = int32ToAuxInt(int32(s - 32))
 21730  		v1.AddArg2(src, mem)
 21731  		v0.AddArg(v1)
 21732  		v2 := b.NewValue0(v.Pos, OpSelect1, typ.Vec128)
 21733  		v2.AddArg(v1)
 21734  		v3 := b.NewValue0(v.Pos, OpARM64FSTPQ, types.TypeMem)
 21735  		v4 := b.NewValue0(v.Pos, OpSelect0, typ.Vec128)
 21736  		v5 := b.NewValue0(v.Pos, OpARM64FLDPQ, types.NewTuple(typ.Vec128, typ.Vec128))
 21737  		v5.AddArg2(src, mem)
 21738  		v4.AddArg(v5)
 21739  		v6 := b.NewValue0(v.Pos, OpSelect1, typ.Vec128)
 21740  		v6.AddArg(v5)
 21741  		v3.AddArg4(dst, v4, v6, mem)
 21742  		v.AddArg4(dst, v0, v2, v3)
 21743  		return true
 21744  	}
 21745  	// match: (Move [s] dst src mem)
 21746  	// cond: s > 64 && s < 192 && logLargeCopy(v, s)
 21747  	// result: (LoweredMove [s] dst src mem)
 21748  	for {
 21749  		s := auxIntToInt64(v.AuxInt)
 21750  		dst := v_0
 21751  		src := v_1
 21752  		mem := v_2
 21753  		if !(s > 64 && s < 192 && logLargeCopy(v, s)) {
 21754  			break
 21755  		}
 21756  		v.reset(OpARM64LoweredMove)
 21757  		v.AuxInt = int64ToAuxInt(s)
 21758  		v.AddArg3(dst, src, mem)
 21759  		return true
 21760  	}
 21761  	// match: (Move [s] dst src mem)
 21762  	// cond: s >= 192 && logLargeCopy(v, s)
 21763  	// result: (LoweredMoveLoop [s] dst src mem)
 21764  	for {
 21765  		s := auxIntToInt64(v.AuxInt)
 21766  		dst := v_0
 21767  		src := v_1
 21768  		mem := v_2
 21769  		if !(s >= 192 && logLargeCopy(v, s)) {
 21770  			break
 21771  		}
 21772  		v.reset(OpARM64LoweredMoveLoop)
 21773  		v.AuxInt = int64ToAuxInt(s)
 21774  		v.AddArg3(dst, src, mem)
 21775  		return true
 21776  	}
 21777  	return false
 21778  }
 21779  func rewriteValueARM64_OpMulAddFloat32x4(v *Value) bool {
 21780  	v_2 := v.Args[2]
 21781  	v_1 := v.Args[1]
 21782  	v_0 := v.Args[0]
 21783  	// match: (MulAddFloat32x4 x y z)
 21784  	// result: (VFMLA4S z x y)
 21785  	for {
 21786  		x := v_0
 21787  		y := v_1
 21788  		z := v_2
 21789  		v.reset(OpARM64VFMLA4S)
 21790  		v.AddArg3(z, x, y)
 21791  		return true
 21792  	}
 21793  }
 21794  func rewriteValueARM64_OpMulAddFloat64x2(v *Value) bool {
 21795  	v_2 := v.Args[2]
 21796  	v_1 := v.Args[1]
 21797  	v_0 := v.Args[0]
 21798  	// match: (MulAddFloat64x2 x y z)
 21799  	// result: (VFMLA2D z x y)
 21800  	for {
 21801  		x := v_0
 21802  		y := v_1
 21803  		z := v_2
 21804  		v.reset(OpARM64VFMLA2D)
 21805  		v.AddArg3(z, x, y)
 21806  		return true
 21807  	}
 21808  }
 21809  func rewriteValueARM64_OpMulAddInt16x8(v *Value) bool {
 21810  	v_2 := v.Args[2]
 21811  	v_1 := v.Args[1]
 21812  	v_0 := v.Args[0]
 21813  	// match: (MulAddInt16x8 x y z)
 21814  	// result: (VMLA8H z x y)
 21815  	for {
 21816  		x := v_0
 21817  		y := v_1
 21818  		z := v_2
 21819  		v.reset(OpARM64VMLA8H)
 21820  		v.AddArg3(z, x, y)
 21821  		return true
 21822  	}
 21823  }
 21824  func rewriteValueARM64_OpMulAddInt32x4(v *Value) bool {
 21825  	v_2 := v.Args[2]
 21826  	v_1 := v.Args[1]
 21827  	v_0 := v.Args[0]
 21828  	// match: (MulAddInt32x4 x y z)
 21829  	// result: (VMLA4S z x y)
 21830  	for {
 21831  		x := v_0
 21832  		y := v_1
 21833  		z := v_2
 21834  		v.reset(OpARM64VMLA4S)
 21835  		v.AddArg3(z, x, y)
 21836  		return true
 21837  	}
 21838  }
 21839  func rewriteValueARM64_OpMulAddInt8x16(v *Value) bool {
 21840  	v_2 := v.Args[2]
 21841  	v_1 := v.Args[1]
 21842  	v_0 := v.Args[0]
 21843  	// match: (MulAddInt8x16 x y z)
 21844  	// result: (VMLA16B z x y)
 21845  	for {
 21846  		x := v_0
 21847  		y := v_1
 21848  		z := v_2
 21849  		v.reset(OpARM64VMLA16B)
 21850  		v.AddArg3(z, x, y)
 21851  		return true
 21852  	}
 21853  }
 21854  func rewriteValueARM64_OpMulAddUint16x8(v *Value) bool {
 21855  	v_2 := v.Args[2]
 21856  	v_1 := v.Args[1]
 21857  	v_0 := v.Args[0]
 21858  	// match: (MulAddUint16x8 x y z)
 21859  	// result: (VMLA8H z x y)
 21860  	for {
 21861  		x := v_0
 21862  		y := v_1
 21863  		z := v_2
 21864  		v.reset(OpARM64VMLA8H)
 21865  		v.AddArg3(z, x, y)
 21866  		return true
 21867  	}
 21868  }
 21869  func rewriteValueARM64_OpMulAddUint32x4(v *Value) bool {
 21870  	v_2 := v.Args[2]
 21871  	v_1 := v.Args[1]
 21872  	v_0 := v.Args[0]
 21873  	// match: (MulAddUint32x4 x y z)
 21874  	// result: (VMLA4S z x y)
 21875  	for {
 21876  		x := v_0
 21877  		y := v_1
 21878  		z := v_2
 21879  		v.reset(OpARM64VMLA4S)
 21880  		v.AddArg3(z, x, y)
 21881  		return true
 21882  	}
 21883  }
 21884  func rewriteValueARM64_OpMulAddUint8x16(v *Value) bool {
 21885  	v_2 := v.Args[2]
 21886  	v_1 := v.Args[1]
 21887  	v_0 := v.Args[0]
 21888  	// match: (MulAddUint8x16 x y z)
 21889  	// result: (VMLA16B z x y)
 21890  	for {
 21891  		x := v_0
 21892  		y := v_1
 21893  		z := v_2
 21894  		v.reset(OpARM64VMLA16B)
 21895  		v.AddArg3(z, x, y)
 21896  		return true
 21897  	}
 21898  }
 21899  func rewriteValueARM64_OpNeq16(v *Value) bool {
 21900  	v_1 := v.Args[1]
 21901  	v_0 := v.Args[0]
 21902  	b := v.Block
 21903  	typ := &b.Func.Config.Types
 21904  	// match: (Neq16 x y)
 21905  	// result: (NotEqual (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
 21906  	for {
 21907  		x := v_0
 21908  		y := v_1
 21909  		v.reset(OpARM64NotEqual)
 21910  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 21911  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 21912  		v1.AddArg(x)
 21913  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 21914  		v2.AddArg(y)
 21915  		v0.AddArg2(v1, v2)
 21916  		v.AddArg(v0)
 21917  		return true
 21918  	}
 21919  }
 21920  func rewriteValueARM64_OpNeq32(v *Value) bool {
 21921  	v_1 := v.Args[1]
 21922  	v_0 := v.Args[0]
 21923  	b := v.Block
 21924  	// match: (Neq32 x y)
 21925  	// result: (NotEqual (CMPW x y))
 21926  	for {
 21927  		x := v_0
 21928  		y := v_1
 21929  		v.reset(OpARM64NotEqual)
 21930  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 21931  		v0.AddArg2(x, y)
 21932  		v.AddArg(v0)
 21933  		return true
 21934  	}
 21935  }
 21936  func rewriteValueARM64_OpNeq32F(v *Value) bool {
 21937  	v_1 := v.Args[1]
 21938  	v_0 := v.Args[0]
 21939  	b := v.Block
 21940  	// match: (Neq32F x y)
 21941  	// result: (NotEqual (FCMPS x y))
 21942  	for {
 21943  		x := v_0
 21944  		y := v_1
 21945  		v.reset(OpARM64NotEqual)
 21946  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
 21947  		v0.AddArg2(x, y)
 21948  		v.AddArg(v0)
 21949  		return true
 21950  	}
 21951  }
 21952  func rewriteValueARM64_OpNeq64(v *Value) bool {
 21953  	v_1 := v.Args[1]
 21954  	v_0 := v.Args[0]
 21955  	b := v.Block
 21956  	// match: (Neq64 x y)
 21957  	// result: (NotEqual (CMP x y))
 21958  	for {
 21959  		x := v_0
 21960  		y := v_1
 21961  		v.reset(OpARM64NotEqual)
 21962  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 21963  		v0.AddArg2(x, y)
 21964  		v.AddArg(v0)
 21965  		return true
 21966  	}
 21967  }
 21968  func rewriteValueARM64_OpNeq64F(v *Value) bool {
 21969  	v_1 := v.Args[1]
 21970  	v_0 := v.Args[0]
 21971  	b := v.Block
 21972  	// match: (Neq64F x y)
 21973  	// result: (NotEqual (FCMPD x y))
 21974  	for {
 21975  		x := v_0
 21976  		y := v_1
 21977  		v.reset(OpARM64NotEqual)
 21978  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
 21979  		v0.AddArg2(x, y)
 21980  		v.AddArg(v0)
 21981  		return true
 21982  	}
 21983  }
 21984  func rewriteValueARM64_OpNeq8(v *Value) bool {
 21985  	v_1 := v.Args[1]
 21986  	v_0 := v.Args[0]
 21987  	b := v.Block
 21988  	typ := &b.Func.Config.Types
 21989  	// match: (Neq8 x y)
 21990  	// result: (NotEqual (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
 21991  	for {
 21992  		x := v_0
 21993  		y := v_1
 21994  		v.reset(OpARM64NotEqual)
 21995  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 21996  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 21997  		v1.AddArg(x)
 21998  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 21999  		v2.AddArg(y)
 22000  		v0.AddArg2(v1, v2)
 22001  		v.AddArg(v0)
 22002  		return true
 22003  	}
 22004  }
 22005  func rewriteValueARM64_OpNeqPtr(v *Value) bool {
 22006  	v_1 := v.Args[1]
 22007  	v_0 := v.Args[0]
 22008  	b := v.Block
 22009  	// match: (NeqPtr x y)
 22010  	// result: (NotEqual (CMP x y))
 22011  	for {
 22012  		x := v_0
 22013  		y := v_1
 22014  		v.reset(OpARM64NotEqual)
 22015  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 22016  		v0.AddArg2(x, y)
 22017  		v.AddArg(v0)
 22018  		return true
 22019  	}
 22020  }
 22021  func rewriteValueARM64_OpNot(v *Value) bool {
 22022  	v_0 := v.Args[0]
 22023  	b := v.Block
 22024  	typ := &b.Func.Config.Types
 22025  	// match: (Not x)
 22026  	// result: (XOR (MOVDconst [1]) x)
 22027  	for {
 22028  		x := v_0
 22029  		v.reset(OpARM64XOR)
 22030  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22031  		v0.AuxInt = int64ToAuxInt(1)
 22032  		v.AddArg2(v0, x)
 22033  		return true
 22034  	}
 22035  }
 22036  func rewriteValueARM64_OpOffPtr(v *Value) bool {
 22037  	v_0 := v.Args[0]
 22038  	// match: (OffPtr [off] ptr:(SP))
 22039  	// cond: is32Bit(off)
 22040  	// result: (MOVDaddr [int32(off)] ptr)
 22041  	for {
 22042  		off := auxIntToInt64(v.AuxInt)
 22043  		ptr := v_0
 22044  		if ptr.Op != OpSP || !(is32Bit(off)) {
 22045  			break
 22046  		}
 22047  		v.reset(OpARM64MOVDaddr)
 22048  		v.AuxInt = int32ToAuxInt(int32(off))
 22049  		v.AddArg(ptr)
 22050  		return true
 22051  	}
 22052  	// match: (OffPtr [off] ptr)
 22053  	// result: (ADDconst [off] ptr)
 22054  	for {
 22055  		off := auxIntToInt64(v.AuxInt)
 22056  		ptr := v_0
 22057  		v.reset(OpARM64ADDconst)
 22058  		v.AuxInt = int64ToAuxInt(off)
 22059  		v.AddArg(ptr)
 22060  		return true
 22061  	}
 22062  }
 22063  func rewriteValueARM64_OpPopCount16(v *Value) bool {
 22064  	v_0 := v.Args[0]
 22065  	b := v.Block
 22066  	typ := &b.Func.Config.Types
 22067  	// match: (PopCount16 <t> x)
 22068  	// result: (FMOVDfpgp <t> (VUADDLV <typ.Float64> (VCNT <typ.Float64> (FMOVDgpfp <typ.Float64> (ZeroExt16to64 x)))))
 22069  	for {
 22070  		t := v.Type
 22071  		x := v_0
 22072  		v.reset(OpARM64FMOVDfpgp)
 22073  		v.Type = t
 22074  		v0 := b.NewValue0(v.Pos, OpARM64VUADDLV, typ.Float64)
 22075  		v1 := b.NewValue0(v.Pos, OpARM64VCNT, typ.Float64)
 22076  		v2 := b.NewValue0(v.Pos, OpARM64FMOVDgpfp, typ.Float64)
 22077  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 22078  		v3.AddArg(x)
 22079  		v2.AddArg(v3)
 22080  		v1.AddArg(v2)
 22081  		v0.AddArg(v1)
 22082  		v.AddArg(v0)
 22083  		return true
 22084  	}
 22085  }
 22086  func rewriteValueARM64_OpPopCount32(v *Value) bool {
 22087  	v_0 := v.Args[0]
 22088  	b := v.Block
 22089  	typ := &b.Func.Config.Types
 22090  	// match: (PopCount32 <t> x)
 22091  	// result: (FMOVDfpgp <t> (VUADDLV <typ.Float64> (VCNT <typ.Float64> (FMOVDgpfp <typ.Float64> (ZeroExt32to64 x)))))
 22092  	for {
 22093  		t := v.Type
 22094  		x := v_0
 22095  		v.reset(OpARM64FMOVDfpgp)
 22096  		v.Type = t
 22097  		v0 := b.NewValue0(v.Pos, OpARM64VUADDLV, typ.Float64)
 22098  		v1 := b.NewValue0(v.Pos, OpARM64VCNT, typ.Float64)
 22099  		v2 := b.NewValue0(v.Pos, OpARM64FMOVDgpfp, typ.Float64)
 22100  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 22101  		v3.AddArg(x)
 22102  		v2.AddArg(v3)
 22103  		v1.AddArg(v2)
 22104  		v0.AddArg(v1)
 22105  		v.AddArg(v0)
 22106  		return true
 22107  	}
 22108  }
 22109  func rewriteValueARM64_OpPopCount64(v *Value) bool {
 22110  	v_0 := v.Args[0]
 22111  	b := v.Block
 22112  	typ := &b.Func.Config.Types
 22113  	// match: (PopCount64 <t> x)
 22114  	// result: (FMOVDfpgp <t> (VUADDLV <typ.Float64> (VCNT <typ.Float64> (FMOVDgpfp <typ.Float64> x))))
 22115  	for {
 22116  		t := v.Type
 22117  		x := v_0
 22118  		v.reset(OpARM64FMOVDfpgp)
 22119  		v.Type = t
 22120  		v0 := b.NewValue0(v.Pos, OpARM64VUADDLV, typ.Float64)
 22121  		v1 := b.NewValue0(v.Pos, OpARM64VCNT, typ.Float64)
 22122  		v2 := b.NewValue0(v.Pos, OpARM64FMOVDgpfp, typ.Float64)
 22123  		v2.AddArg(x)
 22124  		v1.AddArg(v2)
 22125  		v0.AddArg(v1)
 22126  		v.AddArg(v0)
 22127  		return true
 22128  	}
 22129  }
 22130  func rewriteValueARM64_OpPrefetchCache(v *Value) bool {
 22131  	v_1 := v.Args[1]
 22132  	v_0 := v.Args[0]
 22133  	// match: (PrefetchCache addr mem)
 22134  	// result: (PRFM [0] addr mem)
 22135  	for {
 22136  		addr := v_0
 22137  		mem := v_1
 22138  		v.reset(OpARM64PRFM)
 22139  		v.AuxInt = int64ToAuxInt(0)
 22140  		v.AddArg2(addr, mem)
 22141  		return true
 22142  	}
 22143  }
 22144  func rewriteValueARM64_OpPrefetchCacheStreamed(v *Value) bool {
 22145  	v_1 := v.Args[1]
 22146  	v_0 := v.Args[0]
 22147  	// match: (PrefetchCacheStreamed addr mem)
 22148  	// result: (PRFM [1] addr mem)
 22149  	for {
 22150  		addr := v_0
 22151  		mem := v_1
 22152  		v.reset(OpARM64PRFM)
 22153  		v.AuxInt = int64ToAuxInt(1)
 22154  		v.AddArg2(addr, mem)
 22155  		return true
 22156  	}
 22157  }
 22158  func rewriteValueARM64_OpPubBarrier(v *Value) bool {
 22159  	v_0 := v.Args[0]
 22160  	// match: (PubBarrier mem)
 22161  	// result: (DMB [0xe] mem)
 22162  	for {
 22163  		mem := v_0
 22164  		v.reset(OpARM64DMB)
 22165  		v.AuxInt = int64ToAuxInt(0xe)
 22166  		v.AddArg(mem)
 22167  		return true
 22168  	}
 22169  }
 22170  func rewriteValueARM64_OpRotateLeft16(v *Value) bool {
 22171  	v_1 := v.Args[1]
 22172  	v_0 := v.Args[0]
 22173  	b := v.Block
 22174  	typ := &b.Func.Config.Types
 22175  	// match: (RotateLeft16 <t> x (MOVDconst [c]))
 22176  	// result: (Or16 (Lsh16x64 <t> x (MOVDconst [c&15])) (Rsh16Ux64 <t> x (MOVDconst [-c&15])))
 22177  	for {
 22178  		t := v.Type
 22179  		x := v_0
 22180  		if v_1.Op != OpARM64MOVDconst {
 22181  			break
 22182  		}
 22183  		c := auxIntToInt64(v_1.AuxInt)
 22184  		v.reset(OpOr16)
 22185  		v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
 22186  		v1 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22187  		v1.AuxInt = int64ToAuxInt(c & 15)
 22188  		v0.AddArg2(x, v1)
 22189  		v2 := b.NewValue0(v.Pos, OpRsh16Ux64, t)
 22190  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22191  		v3.AuxInt = int64ToAuxInt(-c & 15)
 22192  		v2.AddArg2(x, v3)
 22193  		v.AddArg2(v0, v2)
 22194  		return true
 22195  	}
 22196  	// match: (RotateLeft16 <t> x y)
 22197  	// result: (RORW <t> (ORshiftLL <typ.UInt32> (ZeroExt16to32 x) (ZeroExt16to32 x) [16]) (NEG <typ.Int64> y))
 22198  	for {
 22199  		t := v.Type
 22200  		x := v_0
 22201  		y := v_1
 22202  		v.reset(OpARM64RORW)
 22203  		v.Type = t
 22204  		v0 := b.NewValue0(v.Pos, OpARM64ORshiftLL, typ.UInt32)
 22205  		v0.AuxInt = int64ToAuxInt(16)
 22206  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 22207  		v1.AddArg(x)
 22208  		v0.AddArg2(v1, v1)
 22209  		v2 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 22210  		v2.AddArg(y)
 22211  		v.AddArg2(v0, v2)
 22212  		return true
 22213  	}
 22214  }
 22215  func rewriteValueARM64_OpRotateLeft32(v *Value) bool {
 22216  	v_1 := v.Args[1]
 22217  	v_0 := v.Args[0]
 22218  	b := v.Block
 22219  	// match: (RotateLeft32 x y)
 22220  	// result: (RORW x (NEG <y.Type> y))
 22221  	for {
 22222  		x := v_0
 22223  		y := v_1
 22224  		v.reset(OpARM64RORW)
 22225  		v0 := b.NewValue0(v.Pos, OpARM64NEG, y.Type)
 22226  		v0.AddArg(y)
 22227  		v.AddArg2(x, v0)
 22228  		return true
 22229  	}
 22230  }
 22231  func rewriteValueARM64_OpRotateLeft64(v *Value) bool {
 22232  	v_1 := v.Args[1]
 22233  	v_0 := v.Args[0]
 22234  	b := v.Block
 22235  	// match: (RotateLeft64 x y)
 22236  	// result: (ROR x (NEG <y.Type> y))
 22237  	for {
 22238  		x := v_0
 22239  		y := v_1
 22240  		v.reset(OpARM64ROR)
 22241  		v0 := b.NewValue0(v.Pos, OpARM64NEG, y.Type)
 22242  		v0.AddArg(y)
 22243  		v.AddArg2(x, v0)
 22244  		return true
 22245  	}
 22246  }
 22247  func rewriteValueARM64_OpRotateLeft8(v *Value) bool {
 22248  	v_1 := v.Args[1]
 22249  	v_0 := v.Args[0]
 22250  	b := v.Block
 22251  	typ := &b.Func.Config.Types
 22252  	// match: (RotateLeft8 <t> x (MOVDconst [c]))
 22253  	// result: (Or8 (Lsh8x64 <t> x (MOVDconst [c&7])) (Rsh8Ux64 <t> x (MOVDconst [-c&7])))
 22254  	for {
 22255  		t := v.Type
 22256  		x := v_0
 22257  		if v_1.Op != OpARM64MOVDconst {
 22258  			break
 22259  		}
 22260  		c := auxIntToInt64(v_1.AuxInt)
 22261  		v.reset(OpOr8)
 22262  		v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
 22263  		v1 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22264  		v1.AuxInt = int64ToAuxInt(c & 7)
 22265  		v0.AddArg2(x, v1)
 22266  		v2 := b.NewValue0(v.Pos, OpRsh8Ux64, t)
 22267  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22268  		v3.AuxInt = int64ToAuxInt(-c & 7)
 22269  		v2.AddArg2(x, v3)
 22270  		v.AddArg2(v0, v2)
 22271  		return true
 22272  	}
 22273  	// match: (RotateLeft8 <t> x y)
 22274  	// result: (OR <t> (SLL <t> x (ANDconst <typ.Int64> [7] y)) (SRL <t> (ZeroExt8to64 x) (ANDconst <typ.Int64> [7] (NEG <typ.Int64> y))))
 22275  	for {
 22276  		t := v.Type
 22277  		x := v_0
 22278  		y := v_1
 22279  		v.reset(OpARM64OR)
 22280  		v.Type = t
 22281  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 22282  		v1 := b.NewValue0(v.Pos, OpARM64ANDconst, typ.Int64)
 22283  		v1.AuxInt = int64ToAuxInt(7)
 22284  		v1.AddArg(y)
 22285  		v0.AddArg2(x, v1)
 22286  		v2 := b.NewValue0(v.Pos, OpARM64SRL, t)
 22287  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 22288  		v3.AddArg(x)
 22289  		v4 := b.NewValue0(v.Pos, OpARM64ANDconst, typ.Int64)
 22290  		v4.AuxInt = int64ToAuxInt(7)
 22291  		v5 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 22292  		v5.AddArg(y)
 22293  		v4.AddArg(v5)
 22294  		v2.AddArg2(v3, v4)
 22295  		v.AddArg2(v0, v2)
 22296  		return true
 22297  	}
 22298  }
 22299  func rewriteValueARM64_OpRsh16Ux16(v *Value) bool {
 22300  	v_1 := v.Args[1]
 22301  	v_0 := v.Args[0]
 22302  	b := v.Block
 22303  	typ := &b.Func.Config.Types
 22304  	// match: (Rsh16Ux16 <t> [bounded] x y)
 22305  	// result: (Rsh64Ux16 <t> [bounded] (ZeroExt16to64 x) y)
 22306  	for {
 22307  		t := v.Type
 22308  		bounded := auxIntToBool(v.AuxInt)
 22309  		x := v_0
 22310  		y := v_1
 22311  		v.reset(OpRsh64Ux16)
 22312  		v.Type = t
 22313  		v.AuxInt = boolToAuxInt(bounded)
 22314  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 22315  		v0.AddArg(x)
 22316  		v.AddArg2(v0, y)
 22317  		return true
 22318  	}
 22319  }
 22320  func rewriteValueARM64_OpRsh16Ux32(v *Value) bool {
 22321  	v_1 := v.Args[1]
 22322  	v_0 := v.Args[0]
 22323  	b := v.Block
 22324  	typ := &b.Func.Config.Types
 22325  	// match: (Rsh16Ux32 <t> [bounded] x y)
 22326  	// result: (Rsh64Ux32 <t> [bounded] (ZeroExt16to64 x) y)
 22327  	for {
 22328  		t := v.Type
 22329  		bounded := auxIntToBool(v.AuxInt)
 22330  		x := v_0
 22331  		y := v_1
 22332  		v.reset(OpRsh64Ux32)
 22333  		v.Type = t
 22334  		v.AuxInt = boolToAuxInt(bounded)
 22335  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 22336  		v0.AddArg(x)
 22337  		v.AddArg2(v0, y)
 22338  		return true
 22339  	}
 22340  }
 22341  func rewriteValueARM64_OpRsh16Ux64(v *Value) bool {
 22342  	v_1 := v.Args[1]
 22343  	v_0 := v.Args[0]
 22344  	b := v.Block
 22345  	typ := &b.Func.Config.Types
 22346  	// match: (Rsh16Ux64 <t> [bounded] x y)
 22347  	// result: (Rsh64Ux64 <t> [bounded] (ZeroExt16to64 x) y)
 22348  	for {
 22349  		t := v.Type
 22350  		bounded := auxIntToBool(v.AuxInt)
 22351  		x := v_0
 22352  		y := v_1
 22353  		v.reset(OpRsh64Ux64)
 22354  		v.Type = t
 22355  		v.AuxInt = boolToAuxInt(bounded)
 22356  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 22357  		v0.AddArg(x)
 22358  		v.AddArg2(v0, y)
 22359  		return true
 22360  	}
 22361  }
 22362  func rewriteValueARM64_OpRsh16Ux8(v *Value) bool {
 22363  	v_1 := v.Args[1]
 22364  	v_0 := v.Args[0]
 22365  	b := v.Block
 22366  	typ := &b.Func.Config.Types
 22367  	// match: (Rsh16Ux8 <t> [bounded] x y)
 22368  	// result: (Rsh64Ux8 <t> [bounded] (ZeroExt16to64 x) y)
 22369  	for {
 22370  		t := v.Type
 22371  		bounded := auxIntToBool(v.AuxInt)
 22372  		x := v_0
 22373  		y := v_1
 22374  		v.reset(OpRsh64Ux8)
 22375  		v.Type = t
 22376  		v.AuxInt = boolToAuxInt(bounded)
 22377  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 22378  		v0.AddArg(x)
 22379  		v.AddArg2(v0, y)
 22380  		return true
 22381  	}
 22382  }
 22383  func rewriteValueARM64_OpRsh16x16(v *Value) bool {
 22384  	v_1 := v.Args[1]
 22385  	v_0 := v.Args[0]
 22386  	b := v.Block
 22387  	typ := &b.Func.Config.Types
 22388  	// match: (Rsh16x16 <t> [bounded] x y)
 22389  	// result: (Rsh64x16 <t> [bounded] (SignExt16to64 x) y)
 22390  	for {
 22391  		t := v.Type
 22392  		bounded := auxIntToBool(v.AuxInt)
 22393  		x := v_0
 22394  		y := v_1
 22395  		v.reset(OpRsh64x16)
 22396  		v.Type = t
 22397  		v.AuxInt = boolToAuxInt(bounded)
 22398  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 22399  		v0.AddArg(x)
 22400  		v.AddArg2(v0, y)
 22401  		return true
 22402  	}
 22403  }
 22404  func rewriteValueARM64_OpRsh16x32(v *Value) bool {
 22405  	v_1 := v.Args[1]
 22406  	v_0 := v.Args[0]
 22407  	b := v.Block
 22408  	typ := &b.Func.Config.Types
 22409  	// match: (Rsh16x32 <t> [bounded] x y)
 22410  	// result: (Rsh64x32 <t> [bounded] (SignExt16to64 x) y)
 22411  	for {
 22412  		t := v.Type
 22413  		bounded := auxIntToBool(v.AuxInt)
 22414  		x := v_0
 22415  		y := v_1
 22416  		v.reset(OpRsh64x32)
 22417  		v.Type = t
 22418  		v.AuxInt = boolToAuxInt(bounded)
 22419  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 22420  		v0.AddArg(x)
 22421  		v.AddArg2(v0, y)
 22422  		return true
 22423  	}
 22424  }
 22425  func rewriteValueARM64_OpRsh16x64(v *Value) bool {
 22426  	v_1 := v.Args[1]
 22427  	v_0 := v.Args[0]
 22428  	b := v.Block
 22429  	typ := &b.Func.Config.Types
 22430  	// match: (Rsh16x64 <t> [bounded] x y)
 22431  	// result: (Rsh64x64 <t> [bounded] (SignExt16to64 x) y)
 22432  	for {
 22433  		t := v.Type
 22434  		bounded := auxIntToBool(v.AuxInt)
 22435  		x := v_0
 22436  		y := v_1
 22437  		v.reset(OpRsh64x64)
 22438  		v.Type = t
 22439  		v.AuxInt = boolToAuxInt(bounded)
 22440  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 22441  		v0.AddArg(x)
 22442  		v.AddArg2(v0, y)
 22443  		return true
 22444  	}
 22445  }
 22446  func rewriteValueARM64_OpRsh16x8(v *Value) bool {
 22447  	v_1 := v.Args[1]
 22448  	v_0 := v.Args[0]
 22449  	b := v.Block
 22450  	typ := &b.Func.Config.Types
 22451  	// match: (Rsh16x8 <t> [bounded] x y)
 22452  	// result: (Rsh64x8 <t> [bounded] (SignExt16to64 x) y)
 22453  	for {
 22454  		t := v.Type
 22455  		bounded := auxIntToBool(v.AuxInt)
 22456  		x := v_0
 22457  		y := v_1
 22458  		v.reset(OpRsh64x8)
 22459  		v.Type = t
 22460  		v.AuxInt = boolToAuxInt(bounded)
 22461  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 22462  		v0.AddArg(x)
 22463  		v.AddArg2(v0, y)
 22464  		return true
 22465  	}
 22466  }
 22467  func rewriteValueARM64_OpRsh32Ux16(v *Value) bool {
 22468  	v_1 := v.Args[1]
 22469  	v_0 := v.Args[0]
 22470  	b := v.Block
 22471  	typ := &b.Func.Config.Types
 22472  	// match: (Rsh32Ux16 <t> [bounded] x y)
 22473  	// result: (Rsh64Ux16 <t> [bounded] (ZeroExt32to64 x) y)
 22474  	for {
 22475  		t := v.Type
 22476  		bounded := auxIntToBool(v.AuxInt)
 22477  		x := v_0
 22478  		y := v_1
 22479  		v.reset(OpRsh64Ux16)
 22480  		v.Type = t
 22481  		v.AuxInt = boolToAuxInt(bounded)
 22482  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 22483  		v0.AddArg(x)
 22484  		v.AddArg2(v0, y)
 22485  		return true
 22486  	}
 22487  }
 22488  func rewriteValueARM64_OpRsh32Ux32(v *Value) bool {
 22489  	v_1 := v.Args[1]
 22490  	v_0 := v.Args[0]
 22491  	b := v.Block
 22492  	typ := &b.Func.Config.Types
 22493  	// match: (Rsh32Ux32 <t> [bounded] x y)
 22494  	// result: (Rsh64Ux32 <t> [bounded] (ZeroExt32to64 x) y)
 22495  	for {
 22496  		t := v.Type
 22497  		bounded := auxIntToBool(v.AuxInt)
 22498  		x := v_0
 22499  		y := v_1
 22500  		v.reset(OpRsh64Ux32)
 22501  		v.Type = t
 22502  		v.AuxInt = boolToAuxInt(bounded)
 22503  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 22504  		v0.AddArg(x)
 22505  		v.AddArg2(v0, y)
 22506  		return true
 22507  	}
 22508  }
 22509  func rewriteValueARM64_OpRsh32Ux64(v *Value) bool {
 22510  	v_1 := v.Args[1]
 22511  	v_0 := v.Args[0]
 22512  	b := v.Block
 22513  	typ := &b.Func.Config.Types
 22514  	// match: (Rsh32Ux64 <t> [bounded] x y)
 22515  	// result: (Rsh64Ux64 <t> [bounded] (ZeroExt32to64 x) y)
 22516  	for {
 22517  		t := v.Type
 22518  		bounded := auxIntToBool(v.AuxInt)
 22519  		x := v_0
 22520  		y := v_1
 22521  		v.reset(OpRsh64Ux64)
 22522  		v.Type = t
 22523  		v.AuxInt = boolToAuxInt(bounded)
 22524  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 22525  		v0.AddArg(x)
 22526  		v.AddArg2(v0, y)
 22527  		return true
 22528  	}
 22529  }
 22530  func rewriteValueARM64_OpRsh32Ux8(v *Value) bool {
 22531  	v_1 := v.Args[1]
 22532  	v_0 := v.Args[0]
 22533  	b := v.Block
 22534  	typ := &b.Func.Config.Types
 22535  	// match: (Rsh32Ux8 <t> [bounded] x y)
 22536  	// result: (Rsh64Ux8 <t> [bounded] (ZeroExt32to64 x) y)
 22537  	for {
 22538  		t := v.Type
 22539  		bounded := auxIntToBool(v.AuxInt)
 22540  		x := v_0
 22541  		y := v_1
 22542  		v.reset(OpRsh64Ux8)
 22543  		v.Type = t
 22544  		v.AuxInt = boolToAuxInt(bounded)
 22545  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 22546  		v0.AddArg(x)
 22547  		v.AddArg2(v0, y)
 22548  		return true
 22549  	}
 22550  }
 22551  func rewriteValueARM64_OpRsh32x16(v *Value) bool {
 22552  	v_1 := v.Args[1]
 22553  	v_0 := v.Args[0]
 22554  	b := v.Block
 22555  	typ := &b.Func.Config.Types
 22556  	// match: (Rsh32x16 <t> [bounded] x y)
 22557  	// result: (Rsh64x16 <t> [bounded] (SignExt32to64 x) y)
 22558  	for {
 22559  		t := v.Type
 22560  		bounded := auxIntToBool(v.AuxInt)
 22561  		x := v_0
 22562  		y := v_1
 22563  		v.reset(OpRsh64x16)
 22564  		v.Type = t
 22565  		v.AuxInt = boolToAuxInt(bounded)
 22566  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 22567  		v0.AddArg(x)
 22568  		v.AddArg2(v0, y)
 22569  		return true
 22570  	}
 22571  }
 22572  func rewriteValueARM64_OpRsh32x32(v *Value) bool {
 22573  	v_1 := v.Args[1]
 22574  	v_0 := v.Args[0]
 22575  	b := v.Block
 22576  	typ := &b.Func.Config.Types
 22577  	// match: (Rsh32x32 <t> [bounded] x y)
 22578  	// result: (Rsh64x32 <t> [bounded] (SignExt32to64 x) y)
 22579  	for {
 22580  		t := v.Type
 22581  		bounded := auxIntToBool(v.AuxInt)
 22582  		x := v_0
 22583  		y := v_1
 22584  		v.reset(OpRsh64x32)
 22585  		v.Type = t
 22586  		v.AuxInt = boolToAuxInt(bounded)
 22587  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 22588  		v0.AddArg(x)
 22589  		v.AddArg2(v0, y)
 22590  		return true
 22591  	}
 22592  }
 22593  func rewriteValueARM64_OpRsh32x64(v *Value) bool {
 22594  	v_1 := v.Args[1]
 22595  	v_0 := v.Args[0]
 22596  	b := v.Block
 22597  	typ := &b.Func.Config.Types
 22598  	// match: (Rsh32x64 <t> [bounded] x y)
 22599  	// result: (Rsh64x64 <t> [bounded] (SignExt32to64 x) y)
 22600  	for {
 22601  		t := v.Type
 22602  		bounded := auxIntToBool(v.AuxInt)
 22603  		x := v_0
 22604  		y := v_1
 22605  		v.reset(OpRsh64x64)
 22606  		v.Type = t
 22607  		v.AuxInt = boolToAuxInt(bounded)
 22608  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 22609  		v0.AddArg(x)
 22610  		v.AddArg2(v0, y)
 22611  		return true
 22612  	}
 22613  }
 22614  func rewriteValueARM64_OpRsh32x8(v *Value) bool {
 22615  	v_1 := v.Args[1]
 22616  	v_0 := v.Args[0]
 22617  	b := v.Block
 22618  	typ := &b.Func.Config.Types
 22619  	// match: (Rsh32x8 <t> [bounded] x y)
 22620  	// result: (Rsh64x8 <t> [bounded] (SignExt32to64 x) y)
 22621  	for {
 22622  		t := v.Type
 22623  		bounded := auxIntToBool(v.AuxInt)
 22624  		x := v_0
 22625  		y := v_1
 22626  		v.reset(OpRsh64x8)
 22627  		v.Type = t
 22628  		v.AuxInt = boolToAuxInt(bounded)
 22629  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 22630  		v0.AddArg(x)
 22631  		v.AddArg2(v0, y)
 22632  		return true
 22633  	}
 22634  }
 22635  func rewriteValueARM64_OpRsh64Ux16(v *Value) bool {
 22636  	v_1 := v.Args[1]
 22637  	v_0 := v.Args[0]
 22638  	b := v.Block
 22639  	typ := &b.Func.Config.Types
 22640  	// match: (Rsh64Ux16 <t> x y)
 22641  	// cond: shiftIsBounded(v)
 22642  	// result: (SRL <t> x y)
 22643  	for {
 22644  		t := v.Type
 22645  		x := v_0
 22646  		y := v_1
 22647  		if !(shiftIsBounded(v)) {
 22648  			break
 22649  		}
 22650  		v.reset(OpARM64SRL)
 22651  		v.Type = t
 22652  		v.AddArg2(x, y)
 22653  		return true
 22654  	}
 22655  	// match: (Rsh64Ux16 <t> [bounded] x y)
 22656  	// cond: !shiftIsBounded(v)
 22657  	// result: (Rsh64Ux32 <t> [bounded] x (ZeroExt16to32 y))
 22658  	for {
 22659  		t := v.Type
 22660  		bounded := auxIntToBool(v.AuxInt)
 22661  		x := v_0
 22662  		y := v_1
 22663  		if !(!shiftIsBounded(v)) {
 22664  			break
 22665  		}
 22666  		v.reset(OpRsh64Ux32)
 22667  		v.Type = t
 22668  		v.AuxInt = boolToAuxInt(bounded)
 22669  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 22670  		v0.AddArg(y)
 22671  		v.AddArg2(x, v0)
 22672  		return true
 22673  	}
 22674  	return false
 22675  }
 22676  func rewriteValueARM64_OpRsh64Ux32(v *Value) bool {
 22677  	v_1 := v.Args[1]
 22678  	v_0 := v.Args[0]
 22679  	b := v.Block
 22680  	// match: (Rsh64Ux32 <t> x y)
 22681  	// cond: shiftIsBounded(v)
 22682  	// result: (SRL <t> x y)
 22683  	for {
 22684  		t := v.Type
 22685  		x := v_0
 22686  		y := v_1
 22687  		if !(shiftIsBounded(v)) {
 22688  			break
 22689  		}
 22690  		v.reset(OpARM64SRL)
 22691  		v.Type = t
 22692  		v.AddArg2(x, y)
 22693  		return true
 22694  	}
 22695  	// match: (Rsh64Ux32 <t> x y)
 22696  	// cond: !shiftIsBounded(v)
 22697  	// result: (CSEL [OpARM64LessThanU] (SRL <t> x y) (Const64 <t> [0]) (CMPWconst [64] y))
 22698  	for {
 22699  		t := v.Type
 22700  		x := v_0
 22701  		y := v_1
 22702  		if !(!shiftIsBounded(v)) {
 22703  			break
 22704  		}
 22705  		v.reset(OpARM64CSEL)
 22706  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 22707  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 22708  		v0.AddArg2(x, y)
 22709  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 22710  		v1.AuxInt = int64ToAuxInt(0)
 22711  		v2 := b.NewValue0(v.Pos, OpARM64CMPWconst, types.TypeFlags)
 22712  		v2.AuxInt = int32ToAuxInt(64)
 22713  		v2.AddArg(y)
 22714  		v.AddArg3(v0, v1, v2)
 22715  		return true
 22716  	}
 22717  	return false
 22718  }
 22719  func rewriteValueARM64_OpRsh64Ux64(v *Value) bool {
 22720  	v_1 := v.Args[1]
 22721  	v_0 := v.Args[0]
 22722  	b := v.Block
 22723  	// match: (Rsh64Ux64 <t> x y)
 22724  	// cond: shiftIsBounded(v)
 22725  	// result: (SRL <t> x y)
 22726  	for {
 22727  		t := v.Type
 22728  		x := v_0
 22729  		y := v_1
 22730  		if !(shiftIsBounded(v)) {
 22731  			break
 22732  		}
 22733  		v.reset(OpARM64SRL)
 22734  		v.Type = t
 22735  		v.AddArg2(x, y)
 22736  		return true
 22737  	}
 22738  	// match: (Rsh64Ux64 <t> x y)
 22739  	// cond: !shiftIsBounded(v)
 22740  	// result: (CSEL [OpARM64LessThanU] (SRL <t> x y) (Const64 <t> [0]) (CMPconst [64] y))
 22741  	for {
 22742  		t := v.Type
 22743  		x := v_0
 22744  		y := v_1
 22745  		if !(!shiftIsBounded(v)) {
 22746  			break
 22747  		}
 22748  		v.reset(OpARM64CSEL)
 22749  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 22750  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 22751  		v0.AddArg2(x, y)
 22752  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 22753  		v1.AuxInt = int64ToAuxInt(0)
 22754  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 22755  		v2.AuxInt = int64ToAuxInt(64)
 22756  		v2.AddArg(y)
 22757  		v.AddArg3(v0, v1, v2)
 22758  		return true
 22759  	}
 22760  	return false
 22761  }
 22762  func rewriteValueARM64_OpRsh64Ux8(v *Value) bool {
 22763  	v_1 := v.Args[1]
 22764  	v_0 := v.Args[0]
 22765  	b := v.Block
 22766  	typ := &b.Func.Config.Types
 22767  	// match: (Rsh64Ux8 <t> x y)
 22768  	// cond: shiftIsBounded(v)
 22769  	// result: (SRL <t> x y)
 22770  	for {
 22771  		t := v.Type
 22772  		x := v_0
 22773  		y := v_1
 22774  		if !(shiftIsBounded(v)) {
 22775  			break
 22776  		}
 22777  		v.reset(OpARM64SRL)
 22778  		v.Type = t
 22779  		v.AddArg2(x, y)
 22780  		return true
 22781  	}
 22782  	// match: (Rsh64Ux8 <t> [bounded] x y)
 22783  	// cond: !shiftIsBounded(v)
 22784  	// result: (Rsh64Ux32 <t> [bounded] x (ZeroExt8to32 y))
 22785  	for {
 22786  		t := v.Type
 22787  		bounded := auxIntToBool(v.AuxInt)
 22788  		x := v_0
 22789  		y := v_1
 22790  		if !(!shiftIsBounded(v)) {
 22791  			break
 22792  		}
 22793  		v.reset(OpRsh64Ux32)
 22794  		v.Type = t
 22795  		v.AuxInt = boolToAuxInt(bounded)
 22796  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 22797  		v0.AddArg(y)
 22798  		v.AddArg2(x, v0)
 22799  		return true
 22800  	}
 22801  	return false
 22802  }
 22803  func rewriteValueARM64_OpRsh64x16(v *Value) bool {
 22804  	v_1 := v.Args[1]
 22805  	v_0 := v.Args[0]
 22806  	b := v.Block
 22807  	typ := &b.Func.Config.Types
 22808  	// match: (Rsh64x16 <t> x y)
 22809  	// cond: shiftIsBounded(v)
 22810  	// result: (SRA <t> x y)
 22811  	for {
 22812  		t := v.Type
 22813  		x := v_0
 22814  		y := v_1
 22815  		if !(shiftIsBounded(v)) {
 22816  			break
 22817  		}
 22818  		v.reset(OpARM64SRA)
 22819  		v.Type = t
 22820  		v.AddArg2(x, y)
 22821  		return true
 22822  	}
 22823  	// match: (Rsh64x16 <t> [bounded] x y)
 22824  	// cond: !shiftIsBounded(v)
 22825  	// result: (Rsh64x32 <t> [bounded] x (ZeroExt16to32 y))
 22826  	for {
 22827  		t := v.Type
 22828  		bounded := auxIntToBool(v.AuxInt)
 22829  		x := v_0
 22830  		y := v_1
 22831  		if !(!shiftIsBounded(v)) {
 22832  			break
 22833  		}
 22834  		v.reset(OpRsh64x32)
 22835  		v.Type = t
 22836  		v.AuxInt = boolToAuxInt(bounded)
 22837  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 22838  		v0.AddArg(y)
 22839  		v.AddArg2(x, v0)
 22840  		return true
 22841  	}
 22842  	return false
 22843  }
 22844  func rewriteValueARM64_OpRsh64x32(v *Value) bool {
 22845  	v_1 := v.Args[1]
 22846  	v_0 := v.Args[0]
 22847  	b := v.Block
 22848  	// match: (Rsh64x32 <t> x y)
 22849  	// cond: shiftIsBounded(v)
 22850  	// result: (SRA <t> x y)
 22851  	for {
 22852  		t := v.Type
 22853  		x := v_0
 22854  		y := v_1
 22855  		if !(shiftIsBounded(v)) {
 22856  			break
 22857  		}
 22858  		v.reset(OpARM64SRA)
 22859  		v.Type = t
 22860  		v.AddArg2(x, y)
 22861  		return true
 22862  	}
 22863  	// match: (Rsh64x32 <t> x y)
 22864  	// cond: !shiftIsBounded(v)
 22865  	// result: (SRA x (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPWconst [64] y)))
 22866  	for {
 22867  		x := v_0
 22868  		y := v_1
 22869  		if !(!shiftIsBounded(v)) {
 22870  			break
 22871  		}
 22872  		v.reset(OpARM64SRA)
 22873  		v0 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 22874  		v0.AuxInt = opToAuxInt(OpARM64LessThanU)
 22875  		v1 := b.NewValue0(v.Pos, OpConst64, y.Type)
 22876  		v1.AuxInt = int64ToAuxInt(63)
 22877  		v2 := b.NewValue0(v.Pos, OpARM64CMPWconst, types.TypeFlags)
 22878  		v2.AuxInt = int32ToAuxInt(64)
 22879  		v2.AddArg(y)
 22880  		v0.AddArg3(y, v1, v2)
 22881  		v.AddArg2(x, v0)
 22882  		return true
 22883  	}
 22884  	return false
 22885  }
 22886  func rewriteValueARM64_OpRsh64x64(v *Value) bool {
 22887  	v_1 := v.Args[1]
 22888  	v_0 := v.Args[0]
 22889  	b := v.Block
 22890  	// match: (Rsh64x64 <t> x y)
 22891  	// cond: shiftIsBounded(v)
 22892  	// result: (SRA <t> x y)
 22893  	for {
 22894  		t := v.Type
 22895  		x := v_0
 22896  		y := v_1
 22897  		if !(shiftIsBounded(v)) {
 22898  			break
 22899  		}
 22900  		v.reset(OpARM64SRA)
 22901  		v.Type = t
 22902  		v.AddArg2(x, y)
 22903  		return true
 22904  	}
 22905  	// match: (Rsh64x64 <t> x y)
 22906  	// cond: !shiftIsBounded(v)
 22907  	// result: (SRA x (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] y)))
 22908  	for {
 22909  		x := v_0
 22910  		y := v_1
 22911  		if !(!shiftIsBounded(v)) {
 22912  			break
 22913  		}
 22914  		v.reset(OpARM64SRA)
 22915  		v0 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 22916  		v0.AuxInt = opToAuxInt(OpARM64LessThanU)
 22917  		v1 := b.NewValue0(v.Pos, OpConst64, y.Type)
 22918  		v1.AuxInt = int64ToAuxInt(63)
 22919  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 22920  		v2.AuxInt = int64ToAuxInt(64)
 22921  		v2.AddArg(y)
 22922  		v0.AddArg3(y, v1, v2)
 22923  		v.AddArg2(x, v0)
 22924  		return true
 22925  	}
 22926  	return false
 22927  }
 22928  func rewriteValueARM64_OpRsh64x8(v *Value) bool {
 22929  	v_1 := v.Args[1]
 22930  	v_0 := v.Args[0]
 22931  	b := v.Block
 22932  	typ := &b.Func.Config.Types
 22933  	// match: (Rsh64x8 <t> x y)
 22934  	// cond: shiftIsBounded(v)
 22935  	// result: (SRA <t> x y)
 22936  	for {
 22937  		t := v.Type
 22938  		x := v_0
 22939  		y := v_1
 22940  		if !(shiftIsBounded(v)) {
 22941  			break
 22942  		}
 22943  		v.reset(OpARM64SRA)
 22944  		v.Type = t
 22945  		v.AddArg2(x, y)
 22946  		return true
 22947  	}
 22948  	// match: (Rsh64x8 <t> [bounded] x y)
 22949  	// cond: !shiftIsBounded(v)
 22950  	// result: (Rsh64x32 <t> [bounded] x (ZeroExt8to32 y))
 22951  	for {
 22952  		t := v.Type
 22953  		bounded := auxIntToBool(v.AuxInt)
 22954  		x := v_0
 22955  		y := v_1
 22956  		if !(!shiftIsBounded(v)) {
 22957  			break
 22958  		}
 22959  		v.reset(OpRsh64x32)
 22960  		v.Type = t
 22961  		v.AuxInt = boolToAuxInt(bounded)
 22962  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 22963  		v0.AddArg(y)
 22964  		v.AddArg2(x, v0)
 22965  		return true
 22966  	}
 22967  	return false
 22968  }
 22969  func rewriteValueARM64_OpRsh8Ux16(v *Value) bool {
 22970  	v_1 := v.Args[1]
 22971  	v_0 := v.Args[0]
 22972  	b := v.Block
 22973  	typ := &b.Func.Config.Types
 22974  	// match: (Rsh8Ux16 <t> [bounded] x y)
 22975  	// result: (Rsh64Ux16 <t> [bounded] (ZeroExt8to64 x) y)
 22976  	for {
 22977  		t := v.Type
 22978  		bounded := auxIntToBool(v.AuxInt)
 22979  		x := v_0
 22980  		y := v_1
 22981  		v.reset(OpRsh64Ux16)
 22982  		v.Type = t
 22983  		v.AuxInt = boolToAuxInt(bounded)
 22984  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 22985  		v0.AddArg(x)
 22986  		v.AddArg2(v0, y)
 22987  		return true
 22988  	}
 22989  }
 22990  func rewriteValueARM64_OpRsh8Ux32(v *Value) bool {
 22991  	v_1 := v.Args[1]
 22992  	v_0 := v.Args[0]
 22993  	b := v.Block
 22994  	typ := &b.Func.Config.Types
 22995  	// match: (Rsh8Ux32 <t> [bounded] x y)
 22996  	// result: (Rsh64Ux32 <t> [bounded] (ZeroExt8to64 x) y)
 22997  	for {
 22998  		t := v.Type
 22999  		bounded := auxIntToBool(v.AuxInt)
 23000  		x := v_0
 23001  		y := v_1
 23002  		v.reset(OpRsh64Ux32)
 23003  		v.Type = t
 23004  		v.AuxInt = boolToAuxInt(bounded)
 23005  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 23006  		v0.AddArg(x)
 23007  		v.AddArg2(v0, y)
 23008  		return true
 23009  	}
 23010  }
 23011  func rewriteValueARM64_OpRsh8Ux64(v *Value) bool {
 23012  	v_1 := v.Args[1]
 23013  	v_0 := v.Args[0]
 23014  	b := v.Block
 23015  	typ := &b.Func.Config.Types
 23016  	// match: (Rsh8Ux64 <t> [bounded] x y)
 23017  	// result: (Rsh64Ux64 <t> [bounded] (ZeroExt8to64 x) y)
 23018  	for {
 23019  		t := v.Type
 23020  		bounded := auxIntToBool(v.AuxInt)
 23021  		x := v_0
 23022  		y := v_1
 23023  		v.reset(OpRsh64Ux64)
 23024  		v.Type = t
 23025  		v.AuxInt = boolToAuxInt(bounded)
 23026  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 23027  		v0.AddArg(x)
 23028  		v.AddArg2(v0, y)
 23029  		return true
 23030  	}
 23031  }
 23032  func rewriteValueARM64_OpRsh8Ux8(v *Value) bool {
 23033  	v_1 := v.Args[1]
 23034  	v_0 := v.Args[0]
 23035  	b := v.Block
 23036  	typ := &b.Func.Config.Types
 23037  	// match: (Rsh8Ux8 <t> [bounded] x y)
 23038  	// result: (Rsh64Ux8 <t> [bounded] (ZeroExt8to64 x) y)
 23039  	for {
 23040  		t := v.Type
 23041  		bounded := auxIntToBool(v.AuxInt)
 23042  		x := v_0
 23043  		y := v_1
 23044  		v.reset(OpRsh64Ux8)
 23045  		v.Type = t
 23046  		v.AuxInt = boolToAuxInt(bounded)
 23047  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 23048  		v0.AddArg(x)
 23049  		v.AddArg2(v0, y)
 23050  		return true
 23051  	}
 23052  }
 23053  func rewriteValueARM64_OpRsh8x16(v *Value) bool {
 23054  	v_1 := v.Args[1]
 23055  	v_0 := v.Args[0]
 23056  	b := v.Block
 23057  	typ := &b.Func.Config.Types
 23058  	// match: (Rsh8x16 <t> [bounded] x y)
 23059  	// result: (Rsh64x16 <t> [bounded] (SignExt8to64 x) y)
 23060  	for {
 23061  		t := v.Type
 23062  		bounded := auxIntToBool(v.AuxInt)
 23063  		x := v_0
 23064  		y := v_1
 23065  		v.reset(OpRsh64x16)
 23066  		v.Type = t
 23067  		v.AuxInt = boolToAuxInt(bounded)
 23068  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 23069  		v0.AddArg(x)
 23070  		v.AddArg2(v0, y)
 23071  		return true
 23072  	}
 23073  }
 23074  func rewriteValueARM64_OpRsh8x32(v *Value) bool {
 23075  	v_1 := v.Args[1]
 23076  	v_0 := v.Args[0]
 23077  	b := v.Block
 23078  	typ := &b.Func.Config.Types
 23079  	// match: (Rsh8x32 <t> [bounded] x y)
 23080  	// result: (Rsh64x32 <t> [bounded] (SignExt8to64 x) y)
 23081  	for {
 23082  		t := v.Type
 23083  		bounded := auxIntToBool(v.AuxInt)
 23084  		x := v_0
 23085  		y := v_1
 23086  		v.reset(OpRsh64x32)
 23087  		v.Type = t
 23088  		v.AuxInt = boolToAuxInt(bounded)
 23089  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 23090  		v0.AddArg(x)
 23091  		v.AddArg2(v0, y)
 23092  		return true
 23093  	}
 23094  }
 23095  func rewriteValueARM64_OpRsh8x64(v *Value) bool {
 23096  	v_1 := v.Args[1]
 23097  	v_0 := v.Args[0]
 23098  	b := v.Block
 23099  	typ := &b.Func.Config.Types
 23100  	// match: (Rsh8x64 <t> [bounded] x y)
 23101  	// result: (Rsh64x64 <t> [bounded] (SignExt8to64 x) y)
 23102  	for {
 23103  		t := v.Type
 23104  		bounded := auxIntToBool(v.AuxInt)
 23105  		x := v_0
 23106  		y := v_1
 23107  		v.reset(OpRsh64x64)
 23108  		v.Type = t
 23109  		v.AuxInt = boolToAuxInt(bounded)
 23110  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 23111  		v0.AddArg(x)
 23112  		v.AddArg2(v0, y)
 23113  		return true
 23114  	}
 23115  }
 23116  func rewriteValueARM64_OpRsh8x8(v *Value) bool {
 23117  	v_1 := v.Args[1]
 23118  	v_0 := v.Args[0]
 23119  	b := v.Block
 23120  	typ := &b.Func.Config.Types
 23121  	// match: (Rsh8x8 <t> [bounded] x y)
 23122  	// result: (Rsh64x8 <t> [bounded] (SignExt8to64 x) y)
 23123  	for {
 23124  		t := v.Type
 23125  		bounded := auxIntToBool(v.AuxInt)
 23126  		x := v_0
 23127  		y := v_1
 23128  		v.reset(OpRsh64x8)
 23129  		v.Type = t
 23130  		v.AuxInt = boolToAuxInt(bounded)
 23131  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 23132  		v0.AddArg(x)
 23133  		v.AddArg2(v0, y)
 23134  		return true
 23135  	}
 23136  }
 23137  func rewriteValueARM64_OpSelect0(v *Value) bool {
 23138  	v_0 := v.Args[0]
 23139  	b := v.Block
 23140  	typ := &b.Func.Config.Types
 23141  	// match: (Select0 (Mul64uhilo x y))
 23142  	// result: (UMULH x y)
 23143  	for {
 23144  		if v_0.Op != OpMul64uhilo {
 23145  			break
 23146  		}
 23147  		y := v_0.Args[1]
 23148  		x := v_0.Args[0]
 23149  		v.reset(OpARM64UMULH)
 23150  		v.AddArg2(x, y)
 23151  		return true
 23152  	}
 23153  	// match: (Select0 (Add64carry x y c))
 23154  	// result: (Select0 <typ.UInt64> (ADCSflags x y (Select1 <types.TypeFlags> (ADDSconstflags [-1] c))))
 23155  	for {
 23156  		if v_0.Op != OpAdd64carry {
 23157  			break
 23158  		}
 23159  		c := v_0.Args[2]
 23160  		x := v_0.Args[0]
 23161  		y := v_0.Args[1]
 23162  		v.reset(OpSelect0)
 23163  		v.Type = typ.UInt64
 23164  		v0 := b.NewValue0(v.Pos, OpARM64ADCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 23165  		v1 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 23166  		v2 := b.NewValue0(v.Pos, OpARM64ADDSconstflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 23167  		v2.AuxInt = int64ToAuxInt(-1)
 23168  		v2.AddArg(c)
 23169  		v1.AddArg(v2)
 23170  		v0.AddArg3(x, y, v1)
 23171  		v.AddArg(v0)
 23172  		return true
 23173  	}
 23174  	// match: (Select0 (Sub64borrow x y bo))
 23175  	// result: (Select0 <typ.UInt64> (SBCSflags x y (Select1 <types.TypeFlags> (NEGSflags bo))))
 23176  	for {
 23177  		if v_0.Op != OpSub64borrow {
 23178  			break
 23179  		}
 23180  		bo := v_0.Args[2]
 23181  		x := v_0.Args[0]
 23182  		y := v_0.Args[1]
 23183  		v.reset(OpSelect0)
 23184  		v.Type = typ.UInt64
 23185  		v0 := b.NewValue0(v.Pos, OpARM64SBCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 23186  		v1 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 23187  		v2 := b.NewValue0(v.Pos, OpARM64NEGSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 23188  		v2.AddArg(bo)
 23189  		v1.AddArg(v2)
 23190  		v0.AddArg3(x, y, v1)
 23191  		v.AddArg(v0)
 23192  		return true
 23193  	}
 23194  	// match: (Select0 (Mul64uover x y))
 23195  	// result: (MUL x y)
 23196  	for {
 23197  		if v_0.Op != OpMul64uover {
 23198  			break
 23199  		}
 23200  		y := v_0.Args[1]
 23201  		x := v_0.Args[0]
 23202  		v.reset(OpARM64MUL)
 23203  		v.AddArg2(x, y)
 23204  		return true
 23205  	}
 23206  	return false
 23207  }
 23208  func rewriteValueARM64_OpSelect1(v *Value) bool {
 23209  	v_0 := v.Args[0]
 23210  	b := v.Block
 23211  	typ := &b.Func.Config.Types
 23212  	// match: (Select1 (Mul64uhilo x y))
 23213  	// result: (MUL x y)
 23214  	for {
 23215  		if v_0.Op != OpMul64uhilo {
 23216  			break
 23217  		}
 23218  		y := v_0.Args[1]
 23219  		x := v_0.Args[0]
 23220  		v.reset(OpARM64MUL)
 23221  		v.AddArg2(x, y)
 23222  		return true
 23223  	}
 23224  	// match: (Select1 (Add64carry x y c))
 23225  	// result: (ADCzerocarry <typ.UInt64> (Select1 <types.TypeFlags> (ADCSflags x y (Select1 <types.TypeFlags> (ADDSconstflags [-1] c)))))
 23226  	for {
 23227  		if v_0.Op != OpAdd64carry {
 23228  			break
 23229  		}
 23230  		c := v_0.Args[2]
 23231  		x := v_0.Args[0]
 23232  		y := v_0.Args[1]
 23233  		v.reset(OpARM64ADCzerocarry)
 23234  		v.Type = typ.UInt64
 23235  		v0 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 23236  		v1 := b.NewValue0(v.Pos, OpARM64ADCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 23237  		v2 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 23238  		v3 := b.NewValue0(v.Pos, OpARM64ADDSconstflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 23239  		v3.AuxInt = int64ToAuxInt(-1)
 23240  		v3.AddArg(c)
 23241  		v2.AddArg(v3)
 23242  		v1.AddArg3(x, y, v2)
 23243  		v0.AddArg(v1)
 23244  		v.AddArg(v0)
 23245  		return true
 23246  	}
 23247  	// match: (Select1 (Sub64borrow x y bo))
 23248  	// result: (NEG <typ.UInt64> (NGCzerocarry <typ.UInt64> (Select1 <types.TypeFlags> (SBCSflags x y (Select1 <types.TypeFlags> (NEGSflags bo))))))
 23249  	for {
 23250  		if v_0.Op != OpSub64borrow {
 23251  			break
 23252  		}
 23253  		bo := v_0.Args[2]
 23254  		x := v_0.Args[0]
 23255  		y := v_0.Args[1]
 23256  		v.reset(OpARM64NEG)
 23257  		v.Type = typ.UInt64
 23258  		v0 := b.NewValue0(v.Pos, OpARM64NGCzerocarry, typ.UInt64)
 23259  		v1 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 23260  		v2 := b.NewValue0(v.Pos, OpARM64SBCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 23261  		v3 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 23262  		v4 := b.NewValue0(v.Pos, OpARM64NEGSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 23263  		v4.AddArg(bo)
 23264  		v3.AddArg(v4)
 23265  		v2.AddArg3(x, y, v3)
 23266  		v1.AddArg(v2)
 23267  		v0.AddArg(v1)
 23268  		v.AddArg(v0)
 23269  		return true
 23270  	}
 23271  	// match: (Select1 (Mul64uover x y))
 23272  	// result: (NotEqual (CMPconst (UMULH <typ.UInt64> x y) [0]))
 23273  	for {
 23274  		if v_0.Op != OpMul64uover {
 23275  			break
 23276  		}
 23277  		y := v_0.Args[1]
 23278  		x := v_0.Args[0]
 23279  		v.reset(OpARM64NotEqual)
 23280  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23281  		v0.AuxInt = int64ToAuxInt(0)
 23282  		v1 := b.NewValue0(v.Pos, OpARM64UMULH, typ.UInt64)
 23283  		v1.AddArg2(x, y)
 23284  		v0.AddArg(v1)
 23285  		v.AddArg(v0)
 23286  		return true
 23287  	}
 23288  	return false
 23289  }
 23290  func rewriteValueARM64_OpSelectN(v *Value) bool {
 23291  	v_0 := v.Args[0]
 23292  	b := v.Block
 23293  	config := b.Func.Config
 23294  	// match: (SelectN [0] call:(CALLstatic {sym} s1:(MOVDstore _ (MOVDconst [sz]) s2:(MOVDstore _ src s3:(MOVDstore {t} _ dst mem)))))
 23295  	// 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)
 23296  	// result: (Move [sz] dst src mem)
 23297  	for {
 23298  		if auxIntToInt64(v.AuxInt) != 0 {
 23299  			break
 23300  		}
 23301  		call := v_0
 23302  		if call.Op != OpARM64CALLstatic || len(call.Args) != 1 {
 23303  			break
 23304  		}
 23305  		sym := auxToCall(call.Aux)
 23306  		s1 := call.Args[0]
 23307  		if s1.Op != OpARM64MOVDstore {
 23308  			break
 23309  		}
 23310  		_ = s1.Args[2]
 23311  		s1_1 := s1.Args[1]
 23312  		if s1_1.Op != OpARM64MOVDconst {
 23313  			break
 23314  		}
 23315  		sz := auxIntToInt64(s1_1.AuxInt)
 23316  		s2 := s1.Args[2]
 23317  		if s2.Op != OpARM64MOVDstore {
 23318  			break
 23319  		}
 23320  		_ = s2.Args[2]
 23321  		src := s2.Args[1]
 23322  		s3 := s2.Args[2]
 23323  		if s3.Op != OpARM64MOVDstore {
 23324  			break
 23325  		}
 23326  		mem := s3.Args[2]
 23327  		dst := s3.Args[1]
 23328  		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)) {
 23329  			break
 23330  		}
 23331  		v.reset(OpMove)
 23332  		v.AuxInt = int64ToAuxInt(sz)
 23333  		v.AddArg3(dst, src, mem)
 23334  		return true
 23335  	}
 23336  	// match: (SelectN [0] call:(CALLstatic {sym} dst src (MOVDconst [sz]) mem))
 23337  	// cond: sz >= 0 && isSameCall(sym, "runtime.memmove") && call.Uses == 1 && isInlinableMemmove(dst, src, sz, config) && clobber(call)
 23338  	// result: (Move [sz] dst src mem)
 23339  	for {
 23340  		if auxIntToInt64(v.AuxInt) != 0 {
 23341  			break
 23342  		}
 23343  		call := v_0
 23344  		if call.Op != OpARM64CALLstatic || len(call.Args) != 4 {
 23345  			break
 23346  		}
 23347  		sym := auxToCall(call.Aux)
 23348  		mem := call.Args[3]
 23349  		dst := call.Args[0]
 23350  		src := call.Args[1]
 23351  		call_2 := call.Args[2]
 23352  		if call_2.Op != OpARM64MOVDconst {
 23353  			break
 23354  		}
 23355  		sz := auxIntToInt64(call_2.AuxInt)
 23356  		if !(sz >= 0 && isSameCall(sym, "runtime.memmove") && call.Uses == 1 && isInlinableMemmove(dst, src, sz, config) && clobber(call)) {
 23357  			break
 23358  		}
 23359  		v.reset(OpMove)
 23360  		v.AuxInt = int64ToAuxInt(sz)
 23361  		v.AddArg3(dst, src, mem)
 23362  		return true
 23363  	}
 23364  	return false
 23365  }
 23366  func rewriteValueARM64_OpShiftAllLeftInt16x8(v *Value) bool {
 23367  	v_1 := v.Args[1]
 23368  	v_0 := v.Args[0]
 23369  	b := v.Block
 23370  	typ := &b.Func.Config.Types
 23371  	// match: (ShiftAllLeftInt16x8 x y)
 23372  	// result: (VSSHL8H x (VDUPHbcast [0] (VMOVHins [0] x (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y)))))
 23373  	for {
 23374  		x := v_0
 23375  		y := v_1
 23376  		v.reset(OpARM64VSSHL8H)
 23377  		v0 := b.NewValue0(v.Pos, OpARM64VDUPHbcast, typ.Vec128)
 23378  		v0.AuxInt = uint8ToAuxInt(0)
 23379  		v1 := b.NewValue0(v.Pos, OpARM64VMOVHins, typ.Vec128)
 23380  		v1.AuxInt = uint8ToAuxInt(0)
 23381  		v2 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23382  		v2.AuxInt = opToAuxInt(OpARM64LessThanU)
 23383  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23384  		v3.AuxInt = int64ToAuxInt(127)
 23385  		v4 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23386  		v4.AuxInt = int64ToAuxInt(127)
 23387  		v4.AddArg(y)
 23388  		v2.AddArg3(y, v3, v4)
 23389  		v1.AddArg2(x, v2)
 23390  		v0.AddArg(v1)
 23391  		v.AddArg2(x, v0)
 23392  		return true
 23393  	}
 23394  }
 23395  func rewriteValueARM64_OpShiftAllLeftInt32x4(v *Value) bool {
 23396  	v_1 := v.Args[1]
 23397  	v_0 := v.Args[0]
 23398  	b := v.Block
 23399  	typ := &b.Func.Config.Types
 23400  	// match: (ShiftAllLeftInt32x4 x y)
 23401  	// result: (VSSHL4S x (VDUPSbcast [0] (VMOVSins [0] x (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y)))))
 23402  	for {
 23403  		x := v_0
 23404  		y := v_1
 23405  		v.reset(OpARM64VSSHL4S)
 23406  		v0 := b.NewValue0(v.Pos, OpARM64VDUPSbcast, typ.Vec128)
 23407  		v0.AuxInt = uint8ToAuxInt(0)
 23408  		v1 := b.NewValue0(v.Pos, OpARM64VMOVSins, typ.Vec128)
 23409  		v1.AuxInt = uint8ToAuxInt(0)
 23410  		v2 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23411  		v2.AuxInt = opToAuxInt(OpARM64LessThanU)
 23412  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23413  		v3.AuxInt = int64ToAuxInt(127)
 23414  		v4 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23415  		v4.AuxInt = int64ToAuxInt(127)
 23416  		v4.AddArg(y)
 23417  		v2.AddArg3(y, v3, v4)
 23418  		v1.AddArg2(x, v2)
 23419  		v0.AddArg(v1)
 23420  		v.AddArg2(x, v0)
 23421  		return true
 23422  	}
 23423  }
 23424  func rewriteValueARM64_OpShiftAllLeftInt64x2(v *Value) bool {
 23425  	v_1 := v.Args[1]
 23426  	v_0 := v.Args[0]
 23427  	b := v.Block
 23428  	typ := &b.Func.Config.Types
 23429  	// match: (ShiftAllLeftInt64x2 x y)
 23430  	// result: (VSSHL2D x (VDUPDbcast [0] (VMOVDins [0] x (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y)))))
 23431  	for {
 23432  		x := v_0
 23433  		y := v_1
 23434  		v.reset(OpARM64VSSHL2D)
 23435  		v0 := b.NewValue0(v.Pos, OpARM64VDUPDbcast, typ.Vec128)
 23436  		v0.AuxInt = uint8ToAuxInt(0)
 23437  		v1 := b.NewValue0(v.Pos, OpARM64VMOVDins, typ.Vec128)
 23438  		v1.AuxInt = uint8ToAuxInt(0)
 23439  		v2 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23440  		v2.AuxInt = opToAuxInt(OpARM64LessThanU)
 23441  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23442  		v3.AuxInt = int64ToAuxInt(127)
 23443  		v4 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23444  		v4.AuxInt = int64ToAuxInt(127)
 23445  		v4.AddArg(y)
 23446  		v2.AddArg3(y, v3, v4)
 23447  		v1.AddArg2(x, v2)
 23448  		v0.AddArg(v1)
 23449  		v.AddArg2(x, v0)
 23450  		return true
 23451  	}
 23452  }
 23453  func rewriteValueARM64_OpShiftAllLeftInt8x16(v *Value) bool {
 23454  	v_1 := v.Args[1]
 23455  	v_0 := v.Args[0]
 23456  	b := v.Block
 23457  	typ := &b.Func.Config.Types
 23458  	// match: (ShiftAllLeftInt8x16 x y)
 23459  	// result: (VSSHL16B x (VDUPBbcast [0] (VMOVBins [0] x (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y)))))
 23460  	for {
 23461  		x := v_0
 23462  		y := v_1
 23463  		v.reset(OpARM64VSSHL16B)
 23464  		v0 := b.NewValue0(v.Pos, OpARM64VDUPBbcast, typ.Vec128)
 23465  		v0.AuxInt = uint8ToAuxInt(0)
 23466  		v1 := b.NewValue0(v.Pos, OpARM64VMOVBins, typ.Vec128)
 23467  		v1.AuxInt = uint8ToAuxInt(0)
 23468  		v2 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23469  		v2.AuxInt = opToAuxInt(OpARM64LessThanU)
 23470  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23471  		v3.AuxInt = int64ToAuxInt(127)
 23472  		v4 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23473  		v4.AuxInt = int64ToAuxInt(127)
 23474  		v4.AddArg(y)
 23475  		v2.AddArg3(y, v3, v4)
 23476  		v1.AddArg2(x, v2)
 23477  		v0.AddArg(v1)
 23478  		v.AddArg2(x, v0)
 23479  		return true
 23480  	}
 23481  }
 23482  func rewriteValueARM64_OpShiftAllLeftUint16x8(v *Value) bool {
 23483  	v_1 := v.Args[1]
 23484  	v_0 := v.Args[0]
 23485  	b := v.Block
 23486  	typ := &b.Func.Config.Types
 23487  	// match: (ShiftAllLeftUint16x8 x y)
 23488  	// result: (VUSHL8H x (VDUPHbcast [0] (VMOVHins [0] x (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y)))))
 23489  	for {
 23490  		x := v_0
 23491  		y := v_1
 23492  		v.reset(OpARM64VUSHL8H)
 23493  		v0 := b.NewValue0(v.Pos, OpARM64VDUPHbcast, typ.Vec128)
 23494  		v0.AuxInt = uint8ToAuxInt(0)
 23495  		v1 := b.NewValue0(v.Pos, OpARM64VMOVHins, typ.Vec128)
 23496  		v1.AuxInt = uint8ToAuxInt(0)
 23497  		v2 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23498  		v2.AuxInt = opToAuxInt(OpARM64LessThanU)
 23499  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23500  		v3.AuxInt = int64ToAuxInt(127)
 23501  		v4 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23502  		v4.AuxInt = int64ToAuxInt(127)
 23503  		v4.AddArg(y)
 23504  		v2.AddArg3(y, v3, v4)
 23505  		v1.AddArg2(x, v2)
 23506  		v0.AddArg(v1)
 23507  		v.AddArg2(x, v0)
 23508  		return true
 23509  	}
 23510  }
 23511  func rewriteValueARM64_OpShiftAllLeftUint32x4(v *Value) bool {
 23512  	v_1 := v.Args[1]
 23513  	v_0 := v.Args[0]
 23514  	b := v.Block
 23515  	typ := &b.Func.Config.Types
 23516  	// match: (ShiftAllLeftUint32x4 x y)
 23517  	// result: (VUSHL4S x (VDUPSbcast [0] (VMOVSins [0] x (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y)))))
 23518  	for {
 23519  		x := v_0
 23520  		y := v_1
 23521  		v.reset(OpARM64VUSHL4S)
 23522  		v0 := b.NewValue0(v.Pos, OpARM64VDUPSbcast, typ.Vec128)
 23523  		v0.AuxInt = uint8ToAuxInt(0)
 23524  		v1 := b.NewValue0(v.Pos, OpARM64VMOVSins, typ.Vec128)
 23525  		v1.AuxInt = uint8ToAuxInt(0)
 23526  		v2 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23527  		v2.AuxInt = opToAuxInt(OpARM64LessThanU)
 23528  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23529  		v3.AuxInt = int64ToAuxInt(127)
 23530  		v4 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23531  		v4.AuxInt = int64ToAuxInt(127)
 23532  		v4.AddArg(y)
 23533  		v2.AddArg3(y, v3, v4)
 23534  		v1.AddArg2(x, v2)
 23535  		v0.AddArg(v1)
 23536  		v.AddArg2(x, v0)
 23537  		return true
 23538  	}
 23539  }
 23540  func rewriteValueARM64_OpShiftAllLeftUint64x2(v *Value) bool {
 23541  	v_1 := v.Args[1]
 23542  	v_0 := v.Args[0]
 23543  	b := v.Block
 23544  	typ := &b.Func.Config.Types
 23545  	// match: (ShiftAllLeftUint64x2 x y)
 23546  	// result: (VUSHL2D x (VDUPDbcast [0] (VMOVDins [0] x (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y)))))
 23547  	for {
 23548  		x := v_0
 23549  		y := v_1
 23550  		v.reset(OpARM64VUSHL2D)
 23551  		v0 := b.NewValue0(v.Pos, OpARM64VDUPDbcast, typ.Vec128)
 23552  		v0.AuxInt = uint8ToAuxInt(0)
 23553  		v1 := b.NewValue0(v.Pos, OpARM64VMOVDins, typ.Vec128)
 23554  		v1.AuxInt = uint8ToAuxInt(0)
 23555  		v2 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23556  		v2.AuxInt = opToAuxInt(OpARM64LessThanU)
 23557  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23558  		v3.AuxInt = int64ToAuxInt(127)
 23559  		v4 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23560  		v4.AuxInt = int64ToAuxInt(127)
 23561  		v4.AddArg(y)
 23562  		v2.AddArg3(y, v3, v4)
 23563  		v1.AddArg2(x, v2)
 23564  		v0.AddArg(v1)
 23565  		v.AddArg2(x, v0)
 23566  		return true
 23567  	}
 23568  }
 23569  func rewriteValueARM64_OpShiftAllLeftUint8x16(v *Value) bool {
 23570  	v_1 := v.Args[1]
 23571  	v_0 := v.Args[0]
 23572  	b := v.Block
 23573  	typ := &b.Func.Config.Types
 23574  	// match: (ShiftAllLeftUint8x16 x y)
 23575  	// result: (VUSHL16B x (VDUPBbcast [0] (VMOVBins [0] x (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y)))))
 23576  	for {
 23577  		x := v_0
 23578  		y := v_1
 23579  		v.reset(OpARM64VUSHL16B)
 23580  		v0 := b.NewValue0(v.Pos, OpARM64VDUPBbcast, typ.Vec128)
 23581  		v0.AuxInt = uint8ToAuxInt(0)
 23582  		v1 := b.NewValue0(v.Pos, OpARM64VMOVBins, typ.Vec128)
 23583  		v1.AuxInt = uint8ToAuxInt(0)
 23584  		v2 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23585  		v2.AuxInt = opToAuxInt(OpARM64LessThanU)
 23586  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23587  		v3.AuxInt = int64ToAuxInt(127)
 23588  		v4 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23589  		v4.AuxInt = int64ToAuxInt(127)
 23590  		v4.AddArg(y)
 23591  		v2.AddArg3(y, v3, v4)
 23592  		v1.AddArg2(x, v2)
 23593  		v0.AddArg(v1)
 23594  		v.AddArg2(x, v0)
 23595  		return true
 23596  	}
 23597  }
 23598  func rewriteValueARM64_OpShiftAllRightInt16x8(v *Value) bool {
 23599  	v_1 := v.Args[1]
 23600  	v_0 := v.Args[0]
 23601  	b := v.Block
 23602  	typ := &b.Func.Config.Types
 23603  	// match: (ShiftAllRightInt16x8 x y)
 23604  	// result: (VSSHL8H x (VDUPHbcast [0] (VMOVHins [0] x (NEG <typ.Int64> (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y))))))
 23605  	for {
 23606  		x := v_0
 23607  		y := v_1
 23608  		v.reset(OpARM64VSSHL8H)
 23609  		v0 := b.NewValue0(v.Pos, OpARM64VDUPHbcast, typ.Vec128)
 23610  		v0.AuxInt = uint8ToAuxInt(0)
 23611  		v1 := b.NewValue0(v.Pos, OpARM64VMOVHins, typ.Vec128)
 23612  		v1.AuxInt = uint8ToAuxInt(0)
 23613  		v2 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 23614  		v3 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23615  		v3.AuxInt = opToAuxInt(OpARM64LessThanU)
 23616  		v4 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23617  		v4.AuxInt = int64ToAuxInt(127)
 23618  		v5 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23619  		v5.AuxInt = int64ToAuxInt(127)
 23620  		v5.AddArg(y)
 23621  		v3.AddArg3(y, v4, v5)
 23622  		v2.AddArg(v3)
 23623  		v1.AddArg2(x, v2)
 23624  		v0.AddArg(v1)
 23625  		v.AddArg2(x, v0)
 23626  		return true
 23627  	}
 23628  }
 23629  func rewriteValueARM64_OpShiftAllRightInt32x4(v *Value) bool {
 23630  	v_1 := v.Args[1]
 23631  	v_0 := v.Args[0]
 23632  	b := v.Block
 23633  	typ := &b.Func.Config.Types
 23634  	// match: (ShiftAllRightInt32x4 x y)
 23635  	// result: (VSSHL4S x (VDUPSbcast [0] (VMOVSins [0] x (NEG <typ.Int64> (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y))))))
 23636  	for {
 23637  		x := v_0
 23638  		y := v_1
 23639  		v.reset(OpARM64VSSHL4S)
 23640  		v0 := b.NewValue0(v.Pos, OpARM64VDUPSbcast, typ.Vec128)
 23641  		v0.AuxInt = uint8ToAuxInt(0)
 23642  		v1 := b.NewValue0(v.Pos, OpARM64VMOVSins, typ.Vec128)
 23643  		v1.AuxInt = uint8ToAuxInt(0)
 23644  		v2 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 23645  		v3 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23646  		v3.AuxInt = opToAuxInt(OpARM64LessThanU)
 23647  		v4 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23648  		v4.AuxInt = int64ToAuxInt(127)
 23649  		v5 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23650  		v5.AuxInt = int64ToAuxInt(127)
 23651  		v5.AddArg(y)
 23652  		v3.AddArg3(y, v4, v5)
 23653  		v2.AddArg(v3)
 23654  		v1.AddArg2(x, v2)
 23655  		v0.AddArg(v1)
 23656  		v.AddArg2(x, v0)
 23657  		return true
 23658  	}
 23659  }
 23660  func rewriteValueARM64_OpShiftAllRightInt64x2(v *Value) bool {
 23661  	v_1 := v.Args[1]
 23662  	v_0 := v.Args[0]
 23663  	b := v.Block
 23664  	typ := &b.Func.Config.Types
 23665  	// match: (ShiftAllRightInt64x2 x y)
 23666  	// result: (VSSHL2D x (VDUPDbcast [0] (VMOVDins [0] x (NEG <typ.Int64> (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y))))))
 23667  	for {
 23668  		x := v_0
 23669  		y := v_1
 23670  		v.reset(OpARM64VSSHL2D)
 23671  		v0 := b.NewValue0(v.Pos, OpARM64VDUPDbcast, typ.Vec128)
 23672  		v0.AuxInt = uint8ToAuxInt(0)
 23673  		v1 := b.NewValue0(v.Pos, OpARM64VMOVDins, typ.Vec128)
 23674  		v1.AuxInt = uint8ToAuxInt(0)
 23675  		v2 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 23676  		v3 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23677  		v3.AuxInt = opToAuxInt(OpARM64LessThanU)
 23678  		v4 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23679  		v4.AuxInt = int64ToAuxInt(127)
 23680  		v5 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23681  		v5.AuxInt = int64ToAuxInt(127)
 23682  		v5.AddArg(y)
 23683  		v3.AddArg3(y, v4, v5)
 23684  		v2.AddArg(v3)
 23685  		v1.AddArg2(x, v2)
 23686  		v0.AddArg(v1)
 23687  		v.AddArg2(x, v0)
 23688  		return true
 23689  	}
 23690  }
 23691  func rewriteValueARM64_OpShiftAllRightInt8x16(v *Value) bool {
 23692  	v_1 := v.Args[1]
 23693  	v_0 := v.Args[0]
 23694  	b := v.Block
 23695  	typ := &b.Func.Config.Types
 23696  	// match: (ShiftAllRightInt8x16 x y)
 23697  	// result: (VSSHL16B x (VDUPBbcast [0] (VMOVBins [0] x (NEG <typ.Int64> (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y))))))
 23698  	for {
 23699  		x := v_0
 23700  		y := v_1
 23701  		v.reset(OpARM64VSSHL16B)
 23702  		v0 := b.NewValue0(v.Pos, OpARM64VDUPBbcast, typ.Vec128)
 23703  		v0.AuxInt = uint8ToAuxInt(0)
 23704  		v1 := b.NewValue0(v.Pos, OpARM64VMOVBins, typ.Vec128)
 23705  		v1.AuxInt = uint8ToAuxInt(0)
 23706  		v2 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 23707  		v3 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23708  		v3.AuxInt = opToAuxInt(OpARM64LessThanU)
 23709  		v4 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23710  		v4.AuxInt = int64ToAuxInt(127)
 23711  		v5 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23712  		v5.AuxInt = int64ToAuxInt(127)
 23713  		v5.AddArg(y)
 23714  		v3.AddArg3(y, v4, v5)
 23715  		v2.AddArg(v3)
 23716  		v1.AddArg2(x, v2)
 23717  		v0.AddArg(v1)
 23718  		v.AddArg2(x, v0)
 23719  		return true
 23720  	}
 23721  }
 23722  func rewriteValueARM64_OpShiftAllRightUint16x8(v *Value) bool {
 23723  	v_1 := v.Args[1]
 23724  	v_0 := v.Args[0]
 23725  	b := v.Block
 23726  	typ := &b.Func.Config.Types
 23727  	// match: (ShiftAllRightUint16x8 x y)
 23728  	// result: (VUSHL8H x (VDUPHbcast [0] (VMOVHins [0] x (NEG <typ.Int64> (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y))))))
 23729  	for {
 23730  		x := v_0
 23731  		y := v_1
 23732  		v.reset(OpARM64VUSHL8H)
 23733  		v0 := b.NewValue0(v.Pos, OpARM64VDUPHbcast, typ.Vec128)
 23734  		v0.AuxInt = uint8ToAuxInt(0)
 23735  		v1 := b.NewValue0(v.Pos, OpARM64VMOVHins, typ.Vec128)
 23736  		v1.AuxInt = uint8ToAuxInt(0)
 23737  		v2 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 23738  		v3 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23739  		v3.AuxInt = opToAuxInt(OpARM64LessThanU)
 23740  		v4 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23741  		v4.AuxInt = int64ToAuxInt(127)
 23742  		v5 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23743  		v5.AuxInt = int64ToAuxInt(127)
 23744  		v5.AddArg(y)
 23745  		v3.AddArg3(y, v4, v5)
 23746  		v2.AddArg(v3)
 23747  		v1.AddArg2(x, v2)
 23748  		v0.AddArg(v1)
 23749  		v.AddArg2(x, v0)
 23750  		return true
 23751  	}
 23752  }
 23753  func rewriteValueARM64_OpShiftAllRightUint32x4(v *Value) bool {
 23754  	v_1 := v.Args[1]
 23755  	v_0 := v.Args[0]
 23756  	b := v.Block
 23757  	typ := &b.Func.Config.Types
 23758  	// match: (ShiftAllRightUint32x4 x y)
 23759  	// result: (VUSHL4S x (VDUPSbcast [0] (VMOVSins [0] x (NEG <typ.Int64> (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y))))))
 23760  	for {
 23761  		x := v_0
 23762  		y := v_1
 23763  		v.reset(OpARM64VUSHL4S)
 23764  		v0 := b.NewValue0(v.Pos, OpARM64VDUPSbcast, typ.Vec128)
 23765  		v0.AuxInt = uint8ToAuxInt(0)
 23766  		v1 := b.NewValue0(v.Pos, OpARM64VMOVSins, typ.Vec128)
 23767  		v1.AuxInt = uint8ToAuxInt(0)
 23768  		v2 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 23769  		v3 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23770  		v3.AuxInt = opToAuxInt(OpARM64LessThanU)
 23771  		v4 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23772  		v4.AuxInt = int64ToAuxInt(127)
 23773  		v5 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23774  		v5.AuxInt = int64ToAuxInt(127)
 23775  		v5.AddArg(y)
 23776  		v3.AddArg3(y, v4, v5)
 23777  		v2.AddArg(v3)
 23778  		v1.AddArg2(x, v2)
 23779  		v0.AddArg(v1)
 23780  		v.AddArg2(x, v0)
 23781  		return true
 23782  	}
 23783  }
 23784  func rewriteValueARM64_OpShiftAllRightUint64x2(v *Value) bool {
 23785  	v_1 := v.Args[1]
 23786  	v_0 := v.Args[0]
 23787  	b := v.Block
 23788  	typ := &b.Func.Config.Types
 23789  	// match: (ShiftAllRightUint64x2 x y)
 23790  	// result: (VUSHL2D x (VDUPDbcast [0] (VMOVDins [0] x (NEG <typ.Int64> (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y))))))
 23791  	for {
 23792  		x := v_0
 23793  		y := v_1
 23794  		v.reset(OpARM64VUSHL2D)
 23795  		v0 := b.NewValue0(v.Pos, OpARM64VDUPDbcast, typ.Vec128)
 23796  		v0.AuxInt = uint8ToAuxInt(0)
 23797  		v1 := b.NewValue0(v.Pos, OpARM64VMOVDins, typ.Vec128)
 23798  		v1.AuxInt = uint8ToAuxInt(0)
 23799  		v2 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 23800  		v3 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23801  		v3.AuxInt = opToAuxInt(OpARM64LessThanU)
 23802  		v4 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23803  		v4.AuxInt = int64ToAuxInt(127)
 23804  		v5 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23805  		v5.AuxInt = int64ToAuxInt(127)
 23806  		v5.AddArg(y)
 23807  		v3.AddArg3(y, v4, v5)
 23808  		v2.AddArg(v3)
 23809  		v1.AddArg2(x, v2)
 23810  		v0.AddArg(v1)
 23811  		v.AddArg2(x, v0)
 23812  		return true
 23813  	}
 23814  }
 23815  func rewriteValueARM64_OpShiftAllRightUint8x16(v *Value) bool {
 23816  	v_1 := v.Args[1]
 23817  	v_0 := v.Args[0]
 23818  	b := v.Block
 23819  	typ := &b.Func.Config.Types
 23820  	// match: (ShiftAllRightUint8x16 x y)
 23821  	// result: (VUSHL16B x (VDUPBbcast [0] (VMOVBins [0] x (NEG <typ.Int64> (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y))))))
 23822  	for {
 23823  		x := v_0
 23824  		y := v_1
 23825  		v.reset(OpARM64VUSHL16B)
 23826  		v0 := b.NewValue0(v.Pos, OpARM64VDUPBbcast, typ.Vec128)
 23827  		v0.AuxInt = uint8ToAuxInt(0)
 23828  		v1 := b.NewValue0(v.Pos, OpARM64VMOVBins, typ.Vec128)
 23829  		v1.AuxInt = uint8ToAuxInt(0)
 23830  		v2 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 23831  		v3 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23832  		v3.AuxInt = opToAuxInt(OpARM64LessThanU)
 23833  		v4 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23834  		v4.AuxInt = int64ToAuxInt(127)
 23835  		v5 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23836  		v5.AuxInt = int64ToAuxInt(127)
 23837  		v5.AddArg(y)
 23838  		v3.AddArg3(y, v4, v5)
 23839  		v2.AddArg(v3)
 23840  		v1.AddArg2(x, v2)
 23841  		v0.AddArg(v1)
 23842  		v.AddArg2(x, v0)
 23843  		return true
 23844  	}
 23845  }
 23846  func rewriteValueARM64_OpSlicemask(v *Value) bool {
 23847  	v_0 := v.Args[0]
 23848  	b := v.Block
 23849  	// match: (Slicemask <t> x)
 23850  	// result: (SRAconst (NEG <t> x) [63])
 23851  	for {
 23852  		t := v.Type
 23853  		x := v_0
 23854  		v.reset(OpARM64SRAconst)
 23855  		v.AuxInt = int64ToAuxInt(63)
 23856  		v0 := b.NewValue0(v.Pos, OpARM64NEG, t)
 23857  		v0.AddArg(x)
 23858  		v.AddArg(v0)
 23859  		return true
 23860  	}
 23861  }
 23862  func rewriteValueARM64_OpStore(v *Value) bool {
 23863  	v_2 := v.Args[2]
 23864  	v_1 := v.Args[1]
 23865  	v_0 := v.Args[0]
 23866  	// match: (Store {t} ptr val mem)
 23867  	// cond: t.Size() == 1
 23868  	// result: (MOVBstore ptr val mem)
 23869  	for {
 23870  		t := auxToType(v.Aux)
 23871  		ptr := v_0
 23872  		val := v_1
 23873  		mem := v_2
 23874  		if !(t.Size() == 1) {
 23875  			break
 23876  		}
 23877  		v.reset(OpARM64MOVBstore)
 23878  		v.AddArg3(ptr, val, mem)
 23879  		return true
 23880  	}
 23881  	// match: (Store {t} ptr val mem)
 23882  	// cond: t.Size() == 2
 23883  	// result: (MOVHstore ptr val mem)
 23884  	for {
 23885  		t := auxToType(v.Aux)
 23886  		ptr := v_0
 23887  		val := v_1
 23888  		mem := v_2
 23889  		if !(t.Size() == 2) {
 23890  			break
 23891  		}
 23892  		v.reset(OpARM64MOVHstore)
 23893  		v.AddArg3(ptr, val, mem)
 23894  		return true
 23895  	}
 23896  	// match: (Store {t} ptr val mem)
 23897  	// cond: t.Size() == 4 && !t.IsFloat()
 23898  	// result: (MOVWstore ptr val mem)
 23899  	for {
 23900  		t := auxToType(v.Aux)
 23901  		ptr := v_0
 23902  		val := v_1
 23903  		mem := v_2
 23904  		if !(t.Size() == 4 && !t.IsFloat()) {
 23905  			break
 23906  		}
 23907  		v.reset(OpARM64MOVWstore)
 23908  		v.AddArg3(ptr, val, mem)
 23909  		return true
 23910  	}
 23911  	// match: (Store {t} ptr val mem)
 23912  	// cond: t.Size() == 8 && !t.IsFloat()
 23913  	// result: (MOVDstore ptr val mem)
 23914  	for {
 23915  		t := auxToType(v.Aux)
 23916  		ptr := v_0
 23917  		val := v_1
 23918  		mem := v_2
 23919  		if !(t.Size() == 8 && !t.IsFloat()) {
 23920  			break
 23921  		}
 23922  		v.reset(OpARM64MOVDstore)
 23923  		v.AddArg3(ptr, val, mem)
 23924  		return true
 23925  	}
 23926  	// match: (Store {t} ptr val mem)
 23927  	// cond: t.Size() == 4 && t.IsFloat()
 23928  	// result: (FMOVSstore ptr val mem)
 23929  	for {
 23930  		t := auxToType(v.Aux)
 23931  		ptr := v_0
 23932  		val := v_1
 23933  		mem := v_2
 23934  		if !(t.Size() == 4 && t.IsFloat()) {
 23935  			break
 23936  		}
 23937  		v.reset(OpARM64FMOVSstore)
 23938  		v.AddArg3(ptr, val, mem)
 23939  		return true
 23940  	}
 23941  	// match: (Store {t} ptr val mem)
 23942  	// cond: t.Size() == 8 && t.IsFloat()
 23943  	// result: (FMOVDstore ptr val mem)
 23944  	for {
 23945  		t := auxToType(v.Aux)
 23946  		ptr := v_0
 23947  		val := v_1
 23948  		mem := v_2
 23949  		if !(t.Size() == 8 && t.IsFloat()) {
 23950  			break
 23951  		}
 23952  		v.reset(OpARM64FMOVDstore)
 23953  		v.AddArg3(ptr, val, mem)
 23954  		return true
 23955  	}
 23956  	// match: (Store {t} ptr val mem)
 23957  	// cond: t.Size() == 16
 23958  	// result: (FMOVQstore ptr val mem)
 23959  	for {
 23960  		t := auxToType(v.Aux)
 23961  		ptr := v_0
 23962  		val := v_1
 23963  		mem := v_2
 23964  		if !(t.Size() == 16) {
 23965  			break
 23966  		}
 23967  		v.reset(OpARM64FMOVQstore)
 23968  		v.AddArg3(ptr, val, mem)
 23969  		return true
 23970  	}
 23971  	return false
 23972  }
 23973  func rewriteValueARM64_OpZero(v *Value) bool {
 23974  	v_1 := v.Args[1]
 23975  	v_0 := v.Args[0]
 23976  	b := v.Block
 23977  	typ := &b.Func.Config.Types
 23978  	// match: (Zero [0] _ mem)
 23979  	// result: mem
 23980  	for {
 23981  		if auxIntToInt64(v.AuxInt) != 0 {
 23982  			break
 23983  		}
 23984  		mem := v_1
 23985  		v.copyOf(mem)
 23986  		return true
 23987  	}
 23988  	// match: (Zero [1] ptr mem)
 23989  	// result: (MOVBstore ptr (MOVDconst [0]) mem)
 23990  	for {
 23991  		if auxIntToInt64(v.AuxInt) != 1 {
 23992  			break
 23993  		}
 23994  		ptr := v_0
 23995  		mem := v_1
 23996  		v.reset(OpARM64MOVBstore)
 23997  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23998  		v0.AuxInt = int64ToAuxInt(0)
 23999  		v.AddArg3(ptr, v0, mem)
 24000  		return true
 24001  	}
 24002  	// match: (Zero [2] ptr mem)
 24003  	// result: (MOVHstore ptr (MOVDconst [0]) mem)
 24004  	for {
 24005  		if auxIntToInt64(v.AuxInt) != 2 {
 24006  			break
 24007  		}
 24008  		ptr := v_0
 24009  		mem := v_1
 24010  		v.reset(OpARM64MOVHstore)
 24011  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24012  		v0.AuxInt = int64ToAuxInt(0)
 24013  		v.AddArg3(ptr, v0, mem)
 24014  		return true
 24015  	}
 24016  	// match: (Zero [4] ptr mem)
 24017  	// result: (MOVWstore ptr (MOVDconst [0]) mem)
 24018  	for {
 24019  		if auxIntToInt64(v.AuxInt) != 4 {
 24020  			break
 24021  		}
 24022  		ptr := v_0
 24023  		mem := v_1
 24024  		v.reset(OpARM64MOVWstore)
 24025  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24026  		v0.AuxInt = int64ToAuxInt(0)
 24027  		v.AddArg3(ptr, v0, mem)
 24028  		return true
 24029  	}
 24030  	// match: (Zero [3] ptr mem)
 24031  	// result: (MOVBstore [2] ptr (MOVDconst [0]) (MOVHstore ptr (MOVDconst [0]) mem))
 24032  	for {
 24033  		if auxIntToInt64(v.AuxInt) != 3 {
 24034  			break
 24035  		}
 24036  		ptr := v_0
 24037  		mem := v_1
 24038  		v.reset(OpARM64MOVBstore)
 24039  		v.AuxInt = int32ToAuxInt(2)
 24040  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24041  		v0.AuxInt = int64ToAuxInt(0)
 24042  		v1 := b.NewValue0(v.Pos, OpARM64MOVHstore, types.TypeMem)
 24043  		v1.AddArg3(ptr, v0, mem)
 24044  		v.AddArg3(ptr, v0, v1)
 24045  		return true
 24046  	}
 24047  	// match: (Zero [5] ptr mem)
 24048  	// result: (MOVBstore [4] ptr (MOVDconst [0]) (MOVWstore ptr (MOVDconst [0]) mem))
 24049  	for {
 24050  		if auxIntToInt64(v.AuxInt) != 5 {
 24051  			break
 24052  		}
 24053  		ptr := v_0
 24054  		mem := v_1
 24055  		v.reset(OpARM64MOVBstore)
 24056  		v.AuxInt = int32ToAuxInt(4)
 24057  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24058  		v0.AuxInt = int64ToAuxInt(0)
 24059  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 24060  		v1.AddArg3(ptr, v0, mem)
 24061  		v.AddArg3(ptr, v0, v1)
 24062  		return true
 24063  	}
 24064  	// match: (Zero [6] ptr mem)
 24065  	// result: (MOVHstore [4] ptr (MOVDconst [0]) (MOVWstore ptr (MOVDconst [0]) mem))
 24066  	for {
 24067  		if auxIntToInt64(v.AuxInt) != 6 {
 24068  			break
 24069  		}
 24070  		ptr := v_0
 24071  		mem := v_1
 24072  		v.reset(OpARM64MOVHstore)
 24073  		v.AuxInt = int32ToAuxInt(4)
 24074  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24075  		v0.AuxInt = int64ToAuxInt(0)
 24076  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 24077  		v1.AddArg3(ptr, v0, mem)
 24078  		v.AddArg3(ptr, v0, v1)
 24079  		return true
 24080  	}
 24081  	// match: (Zero [7] ptr mem)
 24082  	// result: (MOVWstore [3] ptr (MOVDconst [0]) (MOVWstore ptr (MOVDconst [0]) mem))
 24083  	for {
 24084  		if auxIntToInt64(v.AuxInt) != 7 {
 24085  			break
 24086  		}
 24087  		ptr := v_0
 24088  		mem := v_1
 24089  		v.reset(OpARM64MOVWstore)
 24090  		v.AuxInt = int32ToAuxInt(3)
 24091  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24092  		v0.AuxInt = int64ToAuxInt(0)
 24093  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 24094  		v1.AddArg3(ptr, v0, mem)
 24095  		v.AddArg3(ptr, v0, v1)
 24096  		return true
 24097  	}
 24098  	// match: (Zero [8] ptr mem)
 24099  	// result: (MOVDstore ptr (MOVDconst [0]) mem)
 24100  	for {
 24101  		if auxIntToInt64(v.AuxInt) != 8 {
 24102  			break
 24103  		}
 24104  		ptr := v_0
 24105  		mem := v_1
 24106  		v.reset(OpARM64MOVDstore)
 24107  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24108  		v0.AuxInt = int64ToAuxInt(0)
 24109  		v.AddArg3(ptr, v0, mem)
 24110  		return true
 24111  	}
 24112  	// match: (Zero [9] ptr mem)
 24113  	// result: (MOVBstore [8] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 24114  	for {
 24115  		if auxIntToInt64(v.AuxInt) != 9 {
 24116  			break
 24117  		}
 24118  		ptr := v_0
 24119  		mem := v_1
 24120  		v.reset(OpARM64MOVBstore)
 24121  		v.AuxInt = int32ToAuxInt(8)
 24122  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24123  		v0.AuxInt = int64ToAuxInt(0)
 24124  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 24125  		v1.AddArg3(ptr, v0, mem)
 24126  		v.AddArg3(ptr, v0, v1)
 24127  		return true
 24128  	}
 24129  	// match: (Zero [10] ptr mem)
 24130  	// result: (MOVHstore [8] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 24131  	for {
 24132  		if auxIntToInt64(v.AuxInt) != 10 {
 24133  			break
 24134  		}
 24135  		ptr := v_0
 24136  		mem := v_1
 24137  		v.reset(OpARM64MOVHstore)
 24138  		v.AuxInt = int32ToAuxInt(8)
 24139  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24140  		v0.AuxInt = int64ToAuxInt(0)
 24141  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 24142  		v1.AddArg3(ptr, v0, mem)
 24143  		v.AddArg3(ptr, v0, v1)
 24144  		return true
 24145  	}
 24146  	// match: (Zero [11] ptr mem)
 24147  	// result: (MOVDstore [3] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 24148  	for {
 24149  		if auxIntToInt64(v.AuxInt) != 11 {
 24150  			break
 24151  		}
 24152  		ptr := v_0
 24153  		mem := v_1
 24154  		v.reset(OpARM64MOVDstore)
 24155  		v.AuxInt = int32ToAuxInt(3)
 24156  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24157  		v0.AuxInt = int64ToAuxInt(0)
 24158  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 24159  		v1.AddArg3(ptr, v0, mem)
 24160  		v.AddArg3(ptr, v0, v1)
 24161  		return true
 24162  	}
 24163  	// match: (Zero [12] ptr mem)
 24164  	// result: (MOVWstore [8] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 24165  	for {
 24166  		if auxIntToInt64(v.AuxInt) != 12 {
 24167  			break
 24168  		}
 24169  		ptr := v_0
 24170  		mem := v_1
 24171  		v.reset(OpARM64MOVWstore)
 24172  		v.AuxInt = int32ToAuxInt(8)
 24173  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24174  		v0.AuxInt = int64ToAuxInt(0)
 24175  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 24176  		v1.AddArg3(ptr, v0, mem)
 24177  		v.AddArg3(ptr, v0, v1)
 24178  		return true
 24179  	}
 24180  	// match: (Zero [13] ptr mem)
 24181  	// result: (MOVDstore [5] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 24182  	for {
 24183  		if auxIntToInt64(v.AuxInt) != 13 {
 24184  			break
 24185  		}
 24186  		ptr := v_0
 24187  		mem := v_1
 24188  		v.reset(OpARM64MOVDstore)
 24189  		v.AuxInt = int32ToAuxInt(5)
 24190  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24191  		v0.AuxInt = int64ToAuxInt(0)
 24192  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 24193  		v1.AddArg3(ptr, v0, mem)
 24194  		v.AddArg3(ptr, v0, v1)
 24195  		return true
 24196  	}
 24197  	// match: (Zero [14] ptr mem)
 24198  	// result: (MOVDstore [6] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 24199  	for {
 24200  		if auxIntToInt64(v.AuxInt) != 14 {
 24201  			break
 24202  		}
 24203  		ptr := v_0
 24204  		mem := v_1
 24205  		v.reset(OpARM64MOVDstore)
 24206  		v.AuxInt = int32ToAuxInt(6)
 24207  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24208  		v0.AuxInt = int64ToAuxInt(0)
 24209  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 24210  		v1.AddArg3(ptr, v0, mem)
 24211  		v.AddArg3(ptr, v0, v1)
 24212  		return true
 24213  	}
 24214  	// match: (Zero [15] ptr mem)
 24215  	// result: (MOVDstore [7] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 24216  	for {
 24217  		if auxIntToInt64(v.AuxInt) != 15 {
 24218  			break
 24219  		}
 24220  		ptr := v_0
 24221  		mem := v_1
 24222  		v.reset(OpARM64MOVDstore)
 24223  		v.AuxInt = int32ToAuxInt(7)
 24224  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24225  		v0.AuxInt = int64ToAuxInt(0)
 24226  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 24227  		v1.AddArg3(ptr, v0, mem)
 24228  		v.AddArg3(ptr, v0, v1)
 24229  		return true
 24230  	}
 24231  	// match: (Zero [16] ptr mem)
 24232  	// result: (STP [0] ptr (MOVDconst [0]) (MOVDconst [0]) mem)
 24233  	for {
 24234  		if auxIntToInt64(v.AuxInt) != 16 {
 24235  			break
 24236  		}
 24237  		ptr := v_0
 24238  		mem := v_1
 24239  		v.reset(OpARM64STP)
 24240  		v.AuxInt = int32ToAuxInt(0)
 24241  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24242  		v0.AuxInt = int64ToAuxInt(0)
 24243  		v.AddArg4(ptr, v0, v0, mem)
 24244  		return true
 24245  	}
 24246  	// match: (Zero [s] ptr mem)
 24247  	// cond: s > 16 && s < 192
 24248  	// result: (LoweredZero [s] ptr mem)
 24249  	for {
 24250  		s := auxIntToInt64(v.AuxInt)
 24251  		ptr := v_0
 24252  		mem := v_1
 24253  		if !(s > 16 && s < 192) {
 24254  			break
 24255  		}
 24256  		v.reset(OpARM64LoweredZero)
 24257  		v.AuxInt = int64ToAuxInt(s)
 24258  		v.AddArg2(ptr, mem)
 24259  		return true
 24260  	}
 24261  	// match: (Zero [s] ptr mem)
 24262  	// cond: s >= 192
 24263  	// result: (LoweredZeroLoop [s] ptr mem)
 24264  	for {
 24265  		s := auxIntToInt64(v.AuxInt)
 24266  		ptr := v_0
 24267  		mem := v_1
 24268  		if !(s >= 192) {
 24269  			break
 24270  		}
 24271  		v.reset(OpARM64LoweredZeroLoop)
 24272  		v.AuxInt = int64ToAuxInt(s)
 24273  		v.AddArg2(ptr, mem)
 24274  		return true
 24275  	}
 24276  	return false
 24277  }
 24278  func rewriteValueARM64_OpZeroSIMD(v *Value) bool {
 24279  	// match: (ZeroSIMD <t>)
 24280  	// cond: t.Size() == 16
 24281  	// result: (VMOVI16B [0] <t>)
 24282  	for {
 24283  		t := v.Type
 24284  		if !(t.Size() == 16) {
 24285  			break
 24286  		}
 24287  		v.reset(OpARM64VMOVI16B)
 24288  		v.Type = t
 24289  		v.AuxInt = uint8ToAuxInt(0)
 24290  		return true
 24291  	}
 24292  	return false
 24293  }
 24294  func rewriteValueARM64_Opbroadcast1To16Int8x16(v *Value) bool {
 24295  	v_0 := v.Args[0]
 24296  	// match: (broadcast1To16Int8x16 x)
 24297  	// result: (VDUPBbcast [0] x)
 24298  	for {
 24299  		x := v_0
 24300  		v.reset(OpARM64VDUPBbcast)
 24301  		v.AuxInt = uint8ToAuxInt(0)
 24302  		v.AddArg(x)
 24303  		return true
 24304  	}
 24305  }
 24306  func rewriteValueARM64_Opbroadcast1To16Uint8x16(v *Value) bool {
 24307  	v_0 := v.Args[0]
 24308  	// match: (broadcast1To16Uint8x16 x)
 24309  	// result: (VDUPBbcast [0] x)
 24310  	for {
 24311  		x := v_0
 24312  		v.reset(OpARM64VDUPBbcast)
 24313  		v.AuxInt = uint8ToAuxInt(0)
 24314  		v.AddArg(x)
 24315  		return true
 24316  	}
 24317  }
 24318  func rewriteValueARM64_Opbroadcast1To2Float64x2(v *Value) bool {
 24319  	v_0 := v.Args[0]
 24320  	// match: (broadcast1To2Float64x2 x)
 24321  	// result: (VDUPDbcast [0] x)
 24322  	for {
 24323  		x := v_0
 24324  		v.reset(OpARM64VDUPDbcast)
 24325  		v.AuxInt = uint8ToAuxInt(0)
 24326  		v.AddArg(x)
 24327  		return true
 24328  	}
 24329  }
 24330  func rewriteValueARM64_Opbroadcast1To2Int64x2(v *Value) bool {
 24331  	v_0 := v.Args[0]
 24332  	// match: (broadcast1To2Int64x2 x)
 24333  	// result: (VDUPDbcast [0] x)
 24334  	for {
 24335  		x := v_0
 24336  		v.reset(OpARM64VDUPDbcast)
 24337  		v.AuxInt = uint8ToAuxInt(0)
 24338  		v.AddArg(x)
 24339  		return true
 24340  	}
 24341  }
 24342  func rewriteValueARM64_Opbroadcast1To2Uint64x2(v *Value) bool {
 24343  	v_0 := v.Args[0]
 24344  	// match: (broadcast1To2Uint64x2 x)
 24345  	// result: (VDUPDbcast [0] x)
 24346  	for {
 24347  		x := v_0
 24348  		v.reset(OpARM64VDUPDbcast)
 24349  		v.AuxInt = uint8ToAuxInt(0)
 24350  		v.AddArg(x)
 24351  		return true
 24352  	}
 24353  }
 24354  func rewriteValueARM64_Opbroadcast1To4Float32x4(v *Value) bool {
 24355  	v_0 := v.Args[0]
 24356  	// match: (broadcast1To4Float32x4 x)
 24357  	// result: (VDUPSbcast [0] x)
 24358  	for {
 24359  		x := v_0
 24360  		v.reset(OpARM64VDUPSbcast)
 24361  		v.AuxInt = uint8ToAuxInt(0)
 24362  		v.AddArg(x)
 24363  		return true
 24364  	}
 24365  }
 24366  func rewriteValueARM64_Opbroadcast1To4Int32x4(v *Value) bool {
 24367  	v_0 := v.Args[0]
 24368  	// match: (broadcast1To4Int32x4 x)
 24369  	// result: (VDUPSbcast [0] x)
 24370  	for {
 24371  		x := v_0
 24372  		v.reset(OpARM64VDUPSbcast)
 24373  		v.AuxInt = uint8ToAuxInt(0)
 24374  		v.AddArg(x)
 24375  		return true
 24376  	}
 24377  }
 24378  func rewriteValueARM64_Opbroadcast1To4Uint32x4(v *Value) bool {
 24379  	v_0 := v.Args[0]
 24380  	// match: (broadcast1To4Uint32x4 x)
 24381  	// result: (VDUPSbcast [0] x)
 24382  	for {
 24383  		x := v_0
 24384  		v.reset(OpARM64VDUPSbcast)
 24385  		v.AuxInt = uint8ToAuxInt(0)
 24386  		v.AddArg(x)
 24387  		return true
 24388  	}
 24389  }
 24390  func rewriteValueARM64_Opbroadcast1To8Int16x8(v *Value) bool {
 24391  	v_0 := v.Args[0]
 24392  	// match: (broadcast1To8Int16x8 x)
 24393  	// result: (VDUPHbcast [0] x)
 24394  	for {
 24395  		x := v_0
 24396  		v.reset(OpARM64VDUPHbcast)
 24397  		v.AuxInt = uint8ToAuxInt(0)
 24398  		v.AddArg(x)
 24399  		return true
 24400  	}
 24401  }
 24402  func rewriteValueARM64_Opbroadcast1To8Uint16x8(v *Value) bool {
 24403  	v_0 := v.Args[0]
 24404  	// match: (broadcast1To8Uint16x8 x)
 24405  	// result: (VDUPHbcast [0] x)
 24406  	for {
 24407  		x := v_0
 24408  		v.reset(OpARM64VDUPHbcast)
 24409  		v.AuxInt = uint8ToAuxInt(0)
 24410  		v.AddArg(x)
 24411  		return true
 24412  	}
 24413  }
 24414  func rewriteBlockARM64(b *Block) bool {
 24415  	typ := &b.Func.Config.Types
 24416  	switch b.Kind {
 24417  	case block.BlockARM64EQ:
 24418  		// match: (EQ (CMPconst [0] z:(AND x y)) yes no)
 24419  		// cond: z.Uses == 1
 24420  		// result: (EQ (TST x y) yes no)
 24421  		for b.Controls[0].Op == OpARM64CMPconst {
 24422  			v_0 := b.Controls[0]
 24423  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24424  				break
 24425  			}
 24426  			z := v_0.Args[0]
 24427  			if z.Op != OpARM64AND {
 24428  				break
 24429  			}
 24430  			_ = z.Args[1]
 24431  			z_0 := z.Args[0]
 24432  			z_1 := z.Args[1]
 24433  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24434  				x := z_0
 24435  				y := z_1
 24436  				if !(z.Uses == 1) {
 24437  					continue
 24438  				}
 24439  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 24440  				v0.AddArg2(x, y)
 24441  				b.resetWithControl(block.BlockARM64EQ, v0)
 24442  				return true
 24443  			}
 24444  			break
 24445  		}
 24446  		// match: (EQ (CMPconst [0] x:(ANDconst [c] y)) yes no)
 24447  		// cond: x.Uses == 1
 24448  		// result: (EQ (TSTconst [c] y) yes no)
 24449  		for b.Controls[0].Op == OpARM64CMPconst {
 24450  			v_0 := b.Controls[0]
 24451  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24452  				break
 24453  			}
 24454  			x := v_0.Args[0]
 24455  			if x.Op != OpARM64ANDconst {
 24456  				break
 24457  			}
 24458  			c := auxIntToInt64(x.AuxInt)
 24459  			y := x.Args[0]
 24460  			if !(x.Uses == 1) {
 24461  				break
 24462  			}
 24463  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 24464  			v0.AuxInt = int64ToAuxInt(c)
 24465  			v0.AddArg(y)
 24466  			b.resetWithControl(block.BlockARM64EQ, v0)
 24467  			return true
 24468  		}
 24469  		// match: (EQ (CMPWconst [0] z:(AND x y)) yes no)
 24470  		// cond: z.Uses == 1
 24471  		// result: (EQ (TSTW x y) yes no)
 24472  		for b.Controls[0].Op == OpARM64CMPWconst {
 24473  			v_0 := b.Controls[0]
 24474  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24475  				break
 24476  			}
 24477  			z := v_0.Args[0]
 24478  			if z.Op != OpARM64AND {
 24479  				break
 24480  			}
 24481  			_ = z.Args[1]
 24482  			z_0 := z.Args[0]
 24483  			z_1 := z.Args[1]
 24484  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24485  				x := z_0
 24486  				y := z_1
 24487  				if !(z.Uses == 1) {
 24488  					continue
 24489  				}
 24490  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 24491  				v0.AddArg2(x, y)
 24492  				b.resetWithControl(block.BlockARM64EQ, v0)
 24493  				return true
 24494  			}
 24495  			break
 24496  		}
 24497  		// match: (EQ (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 24498  		// cond: x.Uses == 1
 24499  		// result: (EQ (TSTWconst [int32(c)] y) yes no)
 24500  		for b.Controls[0].Op == OpARM64CMPWconst {
 24501  			v_0 := b.Controls[0]
 24502  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24503  				break
 24504  			}
 24505  			x := v_0.Args[0]
 24506  			if x.Op != OpARM64ANDconst {
 24507  				break
 24508  			}
 24509  			c := auxIntToInt64(x.AuxInt)
 24510  			y := x.Args[0]
 24511  			if !(x.Uses == 1) {
 24512  				break
 24513  			}
 24514  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 24515  			v0.AuxInt = int32ToAuxInt(int32(c))
 24516  			v0.AddArg(y)
 24517  			b.resetWithControl(block.BlockARM64EQ, v0)
 24518  			return true
 24519  		}
 24520  		// match: (EQ (CMPconst [0] x:(ADDconst [c] y)) yes no)
 24521  		// cond: x.Uses == 1
 24522  		// result: (EQ (CMNconst [c] y) yes no)
 24523  		for b.Controls[0].Op == OpARM64CMPconst {
 24524  			v_0 := b.Controls[0]
 24525  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24526  				break
 24527  			}
 24528  			x := v_0.Args[0]
 24529  			if x.Op != OpARM64ADDconst {
 24530  				break
 24531  			}
 24532  			c := auxIntToInt64(x.AuxInt)
 24533  			y := x.Args[0]
 24534  			if !(x.Uses == 1) {
 24535  				break
 24536  			}
 24537  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 24538  			v0.AuxInt = int64ToAuxInt(c)
 24539  			v0.AddArg(y)
 24540  			b.resetWithControl(block.BlockARM64EQ, v0)
 24541  			return true
 24542  		}
 24543  		// match: (EQ (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 24544  		// cond: x.Uses == 1
 24545  		// result: (EQ (CMNWconst [int32(c)] y) yes no)
 24546  		for b.Controls[0].Op == OpARM64CMPWconst {
 24547  			v_0 := b.Controls[0]
 24548  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24549  				break
 24550  			}
 24551  			x := v_0.Args[0]
 24552  			if x.Op != OpARM64ADDconst {
 24553  				break
 24554  			}
 24555  			c := auxIntToInt64(x.AuxInt)
 24556  			y := x.Args[0]
 24557  			if !(x.Uses == 1) {
 24558  				break
 24559  			}
 24560  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 24561  			v0.AuxInt = int32ToAuxInt(int32(c))
 24562  			v0.AddArg(y)
 24563  			b.resetWithControl(block.BlockARM64EQ, v0)
 24564  			return true
 24565  		}
 24566  		// match: (EQ (CMPconst [0] z:(ADD x y)) yes no)
 24567  		// cond: z.Uses == 1
 24568  		// result: (EQ (CMN x y) yes no)
 24569  		for b.Controls[0].Op == OpARM64CMPconst {
 24570  			v_0 := b.Controls[0]
 24571  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24572  				break
 24573  			}
 24574  			z := v_0.Args[0]
 24575  			if z.Op != OpARM64ADD {
 24576  				break
 24577  			}
 24578  			_ = z.Args[1]
 24579  			z_0 := z.Args[0]
 24580  			z_1 := z.Args[1]
 24581  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24582  				x := z_0
 24583  				y := z_1
 24584  				if !(z.Uses == 1) {
 24585  					continue
 24586  				}
 24587  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24588  				v0.AddArg2(x, y)
 24589  				b.resetWithControl(block.BlockARM64EQ, v0)
 24590  				return true
 24591  			}
 24592  			break
 24593  		}
 24594  		// match: (EQ (CMPWconst [0] z:(ADD x y)) yes no)
 24595  		// cond: z.Uses == 1
 24596  		// result: (EQ (CMNW x y) yes no)
 24597  		for b.Controls[0].Op == OpARM64CMPWconst {
 24598  			v_0 := b.Controls[0]
 24599  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24600  				break
 24601  			}
 24602  			z := v_0.Args[0]
 24603  			if z.Op != OpARM64ADD {
 24604  				break
 24605  			}
 24606  			_ = z.Args[1]
 24607  			z_0 := z.Args[0]
 24608  			z_1 := z.Args[1]
 24609  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24610  				x := z_0
 24611  				y := z_1
 24612  				if !(z.Uses == 1) {
 24613  					continue
 24614  				}
 24615  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24616  				v0.AddArg2(x, y)
 24617  				b.resetWithControl(block.BlockARM64EQ, v0)
 24618  				return true
 24619  			}
 24620  			break
 24621  		}
 24622  		// match: (EQ (CMP x z:(NEG y)) yes no)
 24623  		// cond: z.Uses == 1
 24624  		// result: (EQ (CMN x y) yes no)
 24625  		for b.Controls[0].Op == OpARM64CMP {
 24626  			v_0 := b.Controls[0]
 24627  			_ = v_0.Args[1]
 24628  			x := v_0.Args[0]
 24629  			z := v_0.Args[1]
 24630  			if z.Op != OpARM64NEG {
 24631  				break
 24632  			}
 24633  			y := z.Args[0]
 24634  			if !(z.Uses == 1) {
 24635  				break
 24636  			}
 24637  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24638  			v0.AddArg2(x, y)
 24639  			b.resetWithControl(block.BlockARM64EQ, v0)
 24640  			return true
 24641  		}
 24642  		// match: (EQ (CMPW x z:(NEG y)) yes no)
 24643  		// cond: z.Uses == 1
 24644  		// result: (EQ (CMNW x y) yes no)
 24645  		for b.Controls[0].Op == OpARM64CMPW {
 24646  			v_0 := b.Controls[0]
 24647  			_ = v_0.Args[1]
 24648  			x := v_0.Args[0]
 24649  			z := v_0.Args[1]
 24650  			if z.Op != OpARM64NEG {
 24651  				break
 24652  			}
 24653  			y := z.Args[0]
 24654  			if !(z.Uses == 1) {
 24655  				break
 24656  			}
 24657  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24658  			v0.AddArg2(x, y)
 24659  			b.resetWithControl(block.BlockARM64EQ, v0)
 24660  			return true
 24661  		}
 24662  		// match: (EQ (CMPconst [0] x) yes no)
 24663  		// result: (Z x yes no)
 24664  		for b.Controls[0].Op == OpARM64CMPconst {
 24665  			v_0 := b.Controls[0]
 24666  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24667  				break
 24668  			}
 24669  			x := v_0.Args[0]
 24670  			b.resetWithControl(block.BlockARM64Z, x)
 24671  			return true
 24672  		}
 24673  		// match: (EQ (CMPWconst [0] x) yes no)
 24674  		// result: (ZW x yes no)
 24675  		for b.Controls[0].Op == OpARM64CMPWconst {
 24676  			v_0 := b.Controls[0]
 24677  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24678  				break
 24679  			}
 24680  			x := v_0.Args[0]
 24681  			b.resetWithControl(block.BlockARM64ZW, x)
 24682  			return true
 24683  		}
 24684  		// match: (EQ (CMPconst [0] z:(MADD a x y)) yes no)
 24685  		// cond: z.Uses==1
 24686  		// result: (EQ (CMN a (MUL <x.Type> x y)) yes no)
 24687  		for b.Controls[0].Op == OpARM64CMPconst {
 24688  			v_0 := b.Controls[0]
 24689  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24690  				break
 24691  			}
 24692  			z := v_0.Args[0]
 24693  			if z.Op != OpARM64MADD {
 24694  				break
 24695  			}
 24696  			y := z.Args[2]
 24697  			a := z.Args[0]
 24698  			x := z.Args[1]
 24699  			if !(z.Uses == 1) {
 24700  				break
 24701  			}
 24702  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24703  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 24704  			v1.AddArg2(x, y)
 24705  			v0.AddArg2(a, v1)
 24706  			b.resetWithControl(block.BlockARM64EQ, v0)
 24707  			return true
 24708  		}
 24709  		// match: (EQ (CMPWconst [0] z:(MADDW a x y)) yes no)
 24710  		// cond: z.Uses==1
 24711  		// result: (EQ (CMNW a (MULW <x.Type> x y)) yes no)
 24712  		for b.Controls[0].Op == OpARM64CMPWconst {
 24713  			v_0 := b.Controls[0]
 24714  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24715  				break
 24716  			}
 24717  			z := v_0.Args[0]
 24718  			if z.Op != OpARM64MADDW {
 24719  				break
 24720  			}
 24721  			y := z.Args[2]
 24722  			a := z.Args[0]
 24723  			x := z.Args[1]
 24724  			if !(z.Uses == 1) {
 24725  				break
 24726  			}
 24727  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24728  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 24729  			v1.AddArg2(x, y)
 24730  			v0.AddArg2(a, v1)
 24731  			b.resetWithControl(block.BlockARM64EQ, v0)
 24732  			return true
 24733  		}
 24734  		// match: (EQ (CMPconst [0] z:(MSUB a x y)) yes no)
 24735  		// cond: z.Uses==1
 24736  		// result: (EQ (CMP a (MUL <x.Type> x y)) yes no)
 24737  		for b.Controls[0].Op == OpARM64CMPconst {
 24738  			v_0 := b.Controls[0]
 24739  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24740  				break
 24741  			}
 24742  			z := v_0.Args[0]
 24743  			if z.Op != OpARM64MSUB {
 24744  				break
 24745  			}
 24746  			y := z.Args[2]
 24747  			a := z.Args[0]
 24748  			x := z.Args[1]
 24749  			if !(z.Uses == 1) {
 24750  				break
 24751  			}
 24752  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 24753  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 24754  			v1.AddArg2(x, y)
 24755  			v0.AddArg2(a, v1)
 24756  			b.resetWithControl(block.BlockARM64EQ, v0)
 24757  			return true
 24758  		}
 24759  		// match: (EQ (CMPWconst [0] z:(MSUBW a x y)) yes no)
 24760  		// cond: z.Uses==1
 24761  		// result: (EQ (CMPW a (MULW <x.Type> x y)) yes no)
 24762  		for b.Controls[0].Op == OpARM64CMPWconst {
 24763  			v_0 := b.Controls[0]
 24764  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24765  				break
 24766  			}
 24767  			z := v_0.Args[0]
 24768  			if z.Op != OpARM64MSUBW {
 24769  				break
 24770  			}
 24771  			y := z.Args[2]
 24772  			a := z.Args[0]
 24773  			x := z.Args[1]
 24774  			if !(z.Uses == 1) {
 24775  				break
 24776  			}
 24777  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 24778  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 24779  			v1.AddArg2(x, y)
 24780  			v0.AddArg2(a, v1)
 24781  			b.resetWithControl(block.BlockARM64EQ, v0)
 24782  			return true
 24783  		}
 24784  		// match: (EQ (TSTconst [c] x) yes no)
 24785  		// cond: oneBit(c)
 24786  		// result: (TBZ [int64(ntz64(c))] x yes no)
 24787  		for b.Controls[0].Op == OpARM64TSTconst {
 24788  			v_0 := b.Controls[0]
 24789  			c := auxIntToInt64(v_0.AuxInt)
 24790  			x := v_0.Args[0]
 24791  			if !(oneBit(c)) {
 24792  				break
 24793  			}
 24794  			b.resetWithControl(block.BlockARM64TBZ, x)
 24795  			b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
 24796  			return true
 24797  		}
 24798  		// match: (EQ (TSTWconst [c] x) yes no)
 24799  		// cond: oneBit(int64(uint32(c)))
 24800  		// result: (TBZ [int64(ntz64(int64(uint32(c))))] x yes no)
 24801  		for b.Controls[0].Op == OpARM64TSTWconst {
 24802  			v_0 := b.Controls[0]
 24803  			c := auxIntToInt32(v_0.AuxInt)
 24804  			x := v_0.Args[0]
 24805  			if !(oneBit(int64(uint32(c)))) {
 24806  				break
 24807  			}
 24808  			b.resetWithControl(block.BlockARM64TBZ, x)
 24809  			b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
 24810  			return true
 24811  		}
 24812  		// match: (EQ (FlagConstant [fc]) yes no)
 24813  		// cond: fc.eq()
 24814  		// result: (First yes no)
 24815  		for b.Controls[0].Op == OpARM64FlagConstant {
 24816  			v_0 := b.Controls[0]
 24817  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24818  			if !(fc.eq()) {
 24819  				break
 24820  			}
 24821  			b.Reset(block.BlockFirst)
 24822  			return true
 24823  		}
 24824  		// match: (EQ (FlagConstant [fc]) yes no)
 24825  		// cond: !fc.eq()
 24826  		// result: (First no yes)
 24827  		for b.Controls[0].Op == OpARM64FlagConstant {
 24828  			v_0 := b.Controls[0]
 24829  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24830  			if !(!fc.eq()) {
 24831  				break
 24832  			}
 24833  			b.Reset(block.BlockFirst)
 24834  			b.swapSuccessors()
 24835  			return true
 24836  		}
 24837  		// match: (EQ (InvertFlags cmp) yes no)
 24838  		// result: (EQ cmp yes no)
 24839  		for b.Controls[0].Op == OpARM64InvertFlags {
 24840  			v_0 := b.Controls[0]
 24841  			cmp := v_0.Args[0]
 24842  			b.resetWithControl(block.BlockARM64EQ, cmp)
 24843  			return true
 24844  		}
 24845  	case block.BlockARM64FGE:
 24846  		// match: (FGE (InvertFlags cmp) yes no)
 24847  		// result: (FLE cmp yes no)
 24848  		for b.Controls[0].Op == OpARM64InvertFlags {
 24849  			v_0 := b.Controls[0]
 24850  			cmp := v_0.Args[0]
 24851  			b.resetWithControl(block.BlockARM64FLE, cmp)
 24852  			return true
 24853  		}
 24854  	case block.BlockARM64FGT:
 24855  		// match: (FGT (InvertFlags cmp) yes no)
 24856  		// result: (FLT cmp yes no)
 24857  		for b.Controls[0].Op == OpARM64InvertFlags {
 24858  			v_0 := b.Controls[0]
 24859  			cmp := v_0.Args[0]
 24860  			b.resetWithControl(block.BlockARM64FLT, cmp)
 24861  			return true
 24862  		}
 24863  	case block.BlockARM64FLE:
 24864  		// match: (FLE (InvertFlags cmp) yes no)
 24865  		// result: (FGE cmp yes no)
 24866  		for b.Controls[0].Op == OpARM64InvertFlags {
 24867  			v_0 := b.Controls[0]
 24868  			cmp := v_0.Args[0]
 24869  			b.resetWithControl(block.BlockARM64FGE, cmp)
 24870  			return true
 24871  		}
 24872  	case block.BlockARM64FLT:
 24873  		// match: (FLT (InvertFlags cmp) yes no)
 24874  		// result: (FGT cmp yes no)
 24875  		for b.Controls[0].Op == OpARM64InvertFlags {
 24876  			v_0 := b.Controls[0]
 24877  			cmp := v_0.Args[0]
 24878  			b.resetWithControl(block.BlockARM64FGT, cmp)
 24879  			return true
 24880  		}
 24881  	case block.BlockARM64GE:
 24882  		// match: (GE (CMPconst [0] z:(AND x y)) yes no)
 24883  		// cond: z.Uses == 1
 24884  		// result: (GE (TST x y) yes no)
 24885  		for b.Controls[0].Op == OpARM64CMPconst {
 24886  			v_0 := b.Controls[0]
 24887  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24888  				break
 24889  			}
 24890  			z := v_0.Args[0]
 24891  			if z.Op != OpARM64AND {
 24892  				break
 24893  			}
 24894  			_ = z.Args[1]
 24895  			z_0 := z.Args[0]
 24896  			z_1 := z.Args[1]
 24897  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24898  				x := z_0
 24899  				y := z_1
 24900  				if !(z.Uses == 1) {
 24901  					continue
 24902  				}
 24903  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 24904  				v0.AddArg2(x, y)
 24905  				b.resetWithControl(block.BlockARM64GE, v0)
 24906  				return true
 24907  			}
 24908  			break
 24909  		}
 24910  		// match: (GE (CMPconst [0] x:(ANDconst [c] y)) yes no)
 24911  		// cond: x.Uses == 1
 24912  		// result: (GE (TSTconst [c] y) yes no)
 24913  		for b.Controls[0].Op == OpARM64CMPconst {
 24914  			v_0 := b.Controls[0]
 24915  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24916  				break
 24917  			}
 24918  			x := v_0.Args[0]
 24919  			if x.Op != OpARM64ANDconst {
 24920  				break
 24921  			}
 24922  			c := auxIntToInt64(x.AuxInt)
 24923  			y := x.Args[0]
 24924  			if !(x.Uses == 1) {
 24925  				break
 24926  			}
 24927  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 24928  			v0.AuxInt = int64ToAuxInt(c)
 24929  			v0.AddArg(y)
 24930  			b.resetWithControl(block.BlockARM64GE, v0)
 24931  			return true
 24932  		}
 24933  		// match: (GE (CMPWconst [0] z:(AND x y)) yes no)
 24934  		// cond: z.Uses == 1
 24935  		// result: (GE (TSTW x y) yes no)
 24936  		for b.Controls[0].Op == OpARM64CMPWconst {
 24937  			v_0 := b.Controls[0]
 24938  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24939  				break
 24940  			}
 24941  			z := v_0.Args[0]
 24942  			if z.Op != OpARM64AND {
 24943  				break
 24944  			}
 24945  			_ = z.Args[1]
 24946  			z_0 := z.Args[0]
 24947  			z_1 := z.Args[1]
 24948  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24949  				x := z_0
 24950  				y := z_1
 24951  				if !(z.Uses == 1) {
 24952  					continue
 24953  				}
 24954  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 24955  				v0.AddArg2(x, y)
 24956  				b.resetWithControl(block.BlockARM64GE, v0)
 24957  				return true
 24958  			}
 24959  			break
 24960  		}
 24961  		// match: (GE (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 24962  		// cond: x.Uses == 1
 24963  		// result: (GE (TSTWconst [int32(c)] y) yes no)
 24964  		for b.Controls[0].Op == OpARM64CMPWconst {
 24965  			v_0 := b.Controls[0]
 24966  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24967  				break
 24968  			}
 24969  			x := v_0.Args[0]
 24970  			if x.Op != OpARM64ANDconst {
 24971  				break
 24972  			}
 24973  			c := auxIntToInt64(x.AuxInt)
 24974  			y := x.Args[0]
 24975  			if !(x.Uses == 1) {
 24976  				break
 24977  			}
 24978  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 24979  			v0.AuxInt = int32ToAuxInt(int32(c))
 24980  			v0.AddArg(y)
 24981  			b.resetWithControl(block.BlockARM64GE, v0)
 24982  			return true
 24983  		}
 24984  		// match: (GE (CMPconst [0] x:(ADDconst [c] y)) yes no)
 24985  		// cond: x.Uses == 1
 24986  		// result: (GEnoov (CMNconst [c] y) yes no)
 24987  		for b.Controls[0].Op == OpARM64CMPconst {
 24988  			v_0 := b.Controls[0]
 24989  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24990  				break
 24991  			}
 24992  			x := v_0.Args[0]
 24993  			if x.Op != OpARM64ADDconst {
 24994  				break
 24995  			}
 24996  			c := auxIntToInt64(x.AuxInt)
 24997  			y := x.Args[0]
 24998  			if !(x.Uses == 1) {
 24999  				break
 25000  			}
 25001  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 25002  			v0.AuxInt = int64ToAuxInt(c)
 25003  			v0.AddArg(y)
 25004  			b.resetWithControl(block.BlockARM64GEnoov, v0)
 25005  			return true
 25006  		}
 25007  		// match: (GE (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 25008  		// cond: x.Uses == 1
 25009  		// result: (GEnoov (CMNWconst [int32(c)] y) yes no)
 25010  		for b.Controls[0].Op == OpARM64CMPWconst {
 25011  			v_0 := b.Controls[0]
 25012  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25013  				break
 25014  			}
 25015  			x := v_0.Args[0]
 25016  			if x.Op != OpARM64ADDconst {
 25017  				break
 25018  			}
 25019  			c := auxIntToInt64(x.AuxInt)
 25020  			y := x.Args[0]
 25021  			if !(x.Uses == 1) {
 25022  				break
 25023  			}
 25024  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 25025  			v0.AuxInt = int32ToAuxInt(int32(c))
 25026  			v0.AddArg(y)
 25027  			b.resetWithControl(block.BlockARM64GEnoov, v0)
 25028  			return true
 25029  		}
 25030  		// match: (GE (CMPconst [0] z:(ADD x y)) yes no)
 25031  		// cond: z.Uses == 1
 25032  		// result: (GEnoov (CMN x y) yes no)
 25033  		for b.Controls[0].Op == OpARM64CMPconst {
 25034  			v_0 := b.Controls[0]
 25035  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25036  				break
 25037  			}
 25038  			z := v_0.Args[0]
 25039  			if z.Op != OpARM64ADD {
 25040  				break
 25041  			}
 25042  			_ = z.Args[1]
 25043  			z_0 := z.Args[0]
 25044  			z_1 := z.Args[1]
 25045  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25046  				x := z_0
 25047  				y := z_1
 25048  				if !(z.Uses == 1) {
 25049  					continue
 25050  				}
 25051  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 25052  				v0.AddArg2(x, y)
 25053  				b.resetWithControl(block.BlockARM64GEnoov, v0)
 25054  				return true
 25055  			}
 25056  			break
 25057  		}
 25058  		// match: (GE (CMPWconst [0] z:(ADD x y)) yes no)
 25059  		// cond: z.Uses == 1
 25060  		// result: (GEnoov (CMNW x y) yes no)
 25061  		for b.Controls[0].Op == OpARM64CMPWconst {
 25062  			v_0 := b.Controls[0]
 25063  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25064  				break
 25065  			}
 25066  			z := v_0.Args[0]
 25067  			if z.Op != OpARM64ADD {
 25068  				break
 25069  			}
 25070  			_ = z.Args[1]
 25071  			z_0 := z.Args[0]
 25072  			z_1 := z.Args[1]
 25073  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25074  				x := z_0
 25075  				y := z_1
 25076  				if !(z.Uses == 1) {
 25077  					continue
 25078  				}
 25079  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 25080  				v0.AddArg2(x, y)
 25081  				b.resetWithControl(block.BlockARM64GEnoov, v0)
 25082  				return true
 25083  			}
 25084  			break
 25085  		}
 25086  		// match: (GE (CMPconst [0] z:(MADD a x y)) yes no)
 25087  		// cond: z.Uses==1
 25088  		// result: (GEnoov (CMN a (MUL <x.Type> x y)) yes no)
 25089  		for b.Controls[0].Op == OpARM64CMPconst {
 25090  			v_0 := b.Controls[0]
 25091  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25092  				break
 25093  			}
 25094  			z := v_0.Args[0]
 25095  			if z.Op != OpARM64MADD {
 25096  				break
 25097  			}
 25098  			y := z.Args[2]
 25099  			a := z.Args[0]
 25100  			x := z.Args[1]
 25101  			if !(z.Uses == 1) {
 25102  				break
 25103  			}
 25104  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 25105  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 25106  			v1.AddArg2(x, y)
 25107  			v0.AddArg2(a, v1)
 25108  			b.resetWithControl(block.BlockARM64GEnoov, v0)
 25109  			return true
 25110  		}
 25111  		// match: (GE (CMPWconst [0] z:(MADDW a x y)) yes no)
 25112  		// cond: z.Uses==1
 25113  		// result: (GEnoov (CMNW a (MULW <x.Type> x y)) yes no)
 25114  		for b.Controls[0].Op == OpARM64CMPWconst {
 25115  			v_0 := b.Controls[0]
 25116  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25117  				break
 25118  			}
 25119  			z := v_0.Args[0]
 25120  			if z.Op != OpARM64MADDW {
 25121  				break
 25122  			}
 25123  			y := z.Args[2]
 25124  			a := z.Args[0]
 25125  			x := z.Args[1]
 25126  			if !(z.Uses == 1) {
 25127  				break
 25128  			}
 25129  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 25130  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 25131  			v1.AddArg2(x, y)
 25132  			v0.AddArg2(a, v1)
 25133  			b.resetWithControl(block.BlockARM64GEnoov, v0)
 25134  			return true
 25135  		}
 25136  		// match: (GE (CMPWconst [0] x) yes no)
 25137  		// result: (TBZ [31] x yes no)
 25138  		for b.Controls[0].Op == OpARM64CMPWconst {
 25139  			v_0 := b.Controls[0]
 25140  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25141  				break
 25142  			}
 25143  			x := v_0.Args[0]
 25144  			b.resetWithControl(block.BlockARM64TBZ, x)
 25145  			b.AuxInt = int64ToAuxInt(31)
 25146  			return true
 25147  		}
 25148  		// match: (GE (CMPconst [0] x) yes no)
 25149  		// result: (TBZ [63] x yes no)
 25150  		for b.Controls[0].Op == OpARM64CMPconst {
 25151  			v_0 := b.Controls[0]
 25152  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25153  				break
 25154  			}
 25155  			x := v_0.Args[0]
 25156  			b.resetWithControl(block.BlockARM64TBZ, x)
 25157  			b.AuxInt = int64ToAuxInt(63)
 25158  			return true
 25159  		}
 25160  		// match: (GE (CMPWconst [128] x) yes no)
 25161  		// cond: ZeroUpper56Bits(x, 3)
 25162  		// result: (TBNZ [7] x yes no)
 25163  		for b.Controls[0].Op == OpARM64CMPWconst {
 25164  			v_0 := b.Controls[0]
 25165  			if auxIntToInt32(v_0.AuxInt) != 128 {
 25166  				break
 25167  			}
 25168  			x := v_0.Args[0]
 25169  			if !(ZeroUpper56Bits(x, 3)) {
 25170  				break
 25171  			}
 25172  			b.resetWithControl(block.BlockARM64TBNZ, x)
 25173  			b.AuxInt = int64ToAuxInt(7)
 25174  			return true
 25175  		}
 25176  		// match: (GE (CMPconst [128] x) yes no)
 25177  		// cond: ZeroUpper56Bits(x, 3)
 25178  		// result: (TBNZ [7] x yes no)
 25179  		for b.Controls[0].Op == OpARM64CMPconst {
 25180  			v_0 := b.Controls[0]
 25181  			if auxIntToInt64(v_0.AuxInt) != 128 {
 25182  				break
 25183  			}
 25184  			x := v_0.Args[0]
 25185  			if !(ZeroUpper56Bits(x, 3)) {
 25186  				break
 25187  			}
 25188  			b.resetWithControl(block.BlockARM64TBNZ, x)
 25189  			b.AuxInt = int64ToAuxInt(7)
 25190  			return true
 25191  		}
 25192  		// match: (GE (FlagConstant [fc]) yes no)
 25193  		// cond: fc.ge()
 25194  		// result: (First yes no)
 25195  		for b.Controls[0].Op == OpARM64FlagConstant {
 25196  			v_0 := b.Controls[0]
 25197  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25198  			if !(fc.ge()) {
 25199  				break
 25200  			}
 25201  			b.Reset(block.BlockFirst)
 25202  			return true
 25203  		}
 25204  		// match: (GE (FlagConstant [fc]) yes no)
 25205  		// cond: !fc.ge()
 25206  		// result: (First no yes)
 25207  		for b.Controls[0].Op == OpARM64FlagConstant {
 25208  			v_0 := b.Controls[0]
 25209  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25210  			if !(!fc.ge()) {
 25211  				break
 25212  			}
 25213  			b.Reset(block.BlockFirst)
 25214  			b.swapSuccessors()
 25215  			return true
 25216  		}
 25217  		// match: (GE (InvertFlags cmp) yes no)
 25218  		// result: (LE cmp yes no)
 25219  		for b.Controls[0].Op == OpARM64InvertFlags {
 25220  			v_0 := b.Controls[0]
 25221  			cmp := v_0.Args[0]
 25222  			b.resetWithControl(block.BlockARM64LE, cmp)
 25223  			return true
 25224  		}
 25225  	case block.BlockARM64GEnoov:
 25226  		// match: (GEnoov (FlagConstant [fc]) yes no)
 25227  		// cond: fc.geNoov()
 25228  		// result: (First yes no)
 25229  		for b.Controls[0].Op == OpARM64FlagConstant {
 25230  			v_0 := b.Controls[0]
 25231  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25232  			if !(fc.geNoov()) {
 25233  				break
 25234  			}
 25235  			b.Reset(block.BlockFirst)
 25236  			return true
 25237  		}
 25238  		// match: (GEnoov (FlagConstant [fc]) yes no)
 25239  		// cond: !fc.geNoov()
 25240  		// result: (First no yes)
 25241  		for b.Controls[0].Op == OpARM64FlagConstant {
 25242  			v_0 := b.Controls[0]
 25243  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25244  			if !(!fc.geNoov()) {
 25245  				break
 25246  			}
 25247  			b.Reset(block.BlockFirst)
 25248  			b.swapSuccessors()
 25249  			return true
 25250  		}
 25251  	case block.BlockARM64GT:
 25252  		// match: (GT (CMPconst [0] z:(AND x y)) yes no)
 25253  		// cond: z.Uses == 1
 25254  		// result: (GT (TST x y) yes no)
 25255  		for b.Controls[0].Op == OpARM64CMPconst {
 25256  			v_0 := b.Controls[0]
 25257  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25258  				break
 25259  			}
 25260  			z := v_0.Args[0]
 25261  			if z.Op != OpARM64AND {
 25262  				break
 25263  			}
 25264  			_ = z.Args[1]
 25265  			z_0 := z.Args[0]
 25266  			z_1 := z.Args[1]
 25267  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25268  				x := z_0
 25269  				y := z_1
 25270  				if !(z.Uses == 1) {
 25271  					continue
 25272  				}
 25273  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 25274  				v0.AddArg2(x, y)
 25275  				b.resetWithControl(block.BlockARM64GT, v0)
 25276  				return true
 25277  			}
 25278  			break
 25279  		}
 25280  		// match: (GT (CMPconst [0] x:(ANDconst [c] y)) yes no)
 25281  		// cond: x.Uses == 1
 25282  		// result: (GT (TSTconst [c] y) yes no)
 25283  		for b.Controls[0].Op == OpARM64CMPconst {
 25284  			v_0 := b.Controls[0]
 25285  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25286  				break
 25287  			}
 25288  			x := v_0.Args[0]
 25289  			if x.Op != OpARM64ANDconst {
 25290  				break
 25291  			}
 25292  			c := auxIntToInt64(x.AuxInt)
 25293  			y := x.Args[0]
 25294  			if !(x.Uses == 1) {
 25295  				break
 25296  			}
 25297  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 25298  			v0.AuxInt = int64ToAuxInt(c)
 25299  			v0.AddArg(y)
 25300  			b.resetWithControl(block.BlockARM64GT, v0)
 25301  			return true
 25302  		}
 25303  		// match: (GT (CMPWconst [0] z:(AND x y)) yes no)
 25304  		// cond: z.Uses == 1
 25305  		// result: (GT (TSTW x y) yes no)
 25306  		for b.Controls[0].Op == OpARM64CMPWconst {
 25307  			v_0 := b.Controls[0]
 25308  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25309  				break
 25310  			}
 25311  			z := v_0.Args[0]
 25312  			if z.Op != OpARM64AND {
 25313  				break
 25314  			}
 25315  			_ = z.Args[1]
 25316  			z_0 := z.Args[0]
 25317  			z_1 := z.Args[1]
 25318  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25319  				x := z_0
 25320  				y := z_1
 25321  				if !(z.Uses == 1) {
 25322  					continue
 25323  				}
 25324  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 25325  				v0.AddArg2(x, y)
 25326  				b.resetWithControl(block.BlockARM64GT, v0)
 25327  				return true
 25328  			}
 25329  			break
 25330  		}
 25331  		// match: (GT (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 25332  		// cond: x.Uses == 1
 25333  		// result: (GT (TSTWconst [int32(c)] y) yes no)
 25334  		for b.Controls[0].Op == OpARM64CMPWconst {
 25335  			v_0 := b.Controls[0]
 25336  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25337  				break
 25338  			}
 25339  			x := v_0.Args[0]
 25340  			if x.Op != OpARM64ANDconst {
 25341  				break
 25342  			}
 25343  			c := auxIntToInt64(x.AuxInt)
 25344  			y := x.Args[0]
 25345  			if !(x.Uses == 1) {
 25346  				break
 25347  			}
 25348  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 25349  			v0.AuxInt = int32ToAuxInt(int32(c))
 25350  			v0.AddArg(y)
 25351  			b.resetWithControl(block.BlockARM64GT, v0)
 25352  			return true
 25353  		}
 25354  		// match: (GT (CMPconst [0] x:(ADDconst [c] y)) yes no)
 25355  		// cond: x.Uses == 1
 25356  		// result: (GTnoov (CMNconst [c] y) yes no)
 25357  		for b.Controls[0].Op == OpARM64CMPconst {
 25358  			v_0 := b.Controls[0]
 25359  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25360  				break
 25361  			}
 25362  			x := v_0.Args[0]
 25363  			if x.Op != OpARM64ADDconst {
 25364  				break
 25365  			}
 25366  			c := auxIntToInt64(x.AuxInt)
 25367  			y := x.Args[0]
 25368  			if !(x.Uses == 1) {
 25369  				break
 25370  			}
 25371  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 25372  			v0.AuxInt = int64ToAuxInt(c)
 25373  			v0.AddArg(y)
 25374  			b.resetWithControl(block.BlockARM64GTnoov, v0)
 25375  			return true
 25376  		}
 25377  		// match: (GT (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 25378  		// cond: x.Uses == 1
 25379  		// result: (GTnoov (CMNWconst [int32(c)] y) yes no)
 25380  		for b.Controls[0].Op == OpARM64CMPWconst {
 25381  			v_0 := b.Controls[0]
 25382  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25383  				break
 25384  			}
 25385  			x := v_0.Args[0]
 25386  			if x.Op != OpARM64ADDconst {
 25387  				break
 25388  			}
 25389  			c := auxIntToInt64(x.AuxInt)
 25390  			y := x.Args[0]
 25391  			if !(x.Uses == 1) {
 25392  				break
 25393  			}
 25394  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 25395  			v0.AuxInt = int32ToAuxInt(int32(c))
 25396  			v0.AddArg(y)
 25397  			b.resetWithControl(block.BlockARM64GTnoov, v0)
 25398  			return true
 25399  		}
 25400  		// match: (GT (CMPconst [0] z:(ADD x y)) yes no)
 25401  		// cond: z.Uses == 1
 25402  		// result: (GTnoov (CMN x y) yes no)
 25403  		for b.Controls[0].Op == OpARM64CMPconst {
 25404  			v_0 := b.Controls[0]
 25405  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25406  				break
 25407  			}
 25408  			z := v_0.Args[0]
 25409  			if z.Op != OpARM64ADD {
 25410  				break
 25411  			}
 25412  			_ = z.Args[1]
 25413  			z_0 := z.Args[0]
 25414  			z_1 := z.Args[1]
 25415  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25416  				x := z_0
 25417  				y := z_1
 25418  				if !(z.Uses == 1) {
 25419  					continue
 25420  				}
 25421  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 25422  				v0.AddArg2(x, y)
 25423  				b.resetWithControl(block.BlockARM64GTnoov, v0)
 25424  				return true
 25425  			}
 25426  			break
 25427  		}
 25428  		// match: (GT (CMPWconst [0] z:(ADD x y)) yes no)
 25429  		// cond: z.Uses == 1
 25430  		// result: (GTnoov (CMNW x y) yes no)
 25431  		for b.Controls[0].Op == OpARM64CMPWconst {
 25432  			v_0 := b.Controls[0]
 25433  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25434  				break
 25435  			}
 25436  			z := v_0.Args[0]
 25437  			if z.Op != OpARM64ADD {
 25438  				break
 25439  			}
 25440  			_ = z.Args[1]
 25441  			z_0 := z.Args[0]
 25442  			z_1 := z.Args[1]
 25443  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25444  				x := z_0
 25445  				y := z_1
 25446  				if !(z.Uses == 1) {
 25447  					continue
 25448  				}
 25449  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 25450  				v0.AddArg2(x, y)
 25451  				b.resetWithControl(block.BlockARM64GTnoov, v0)
 25452  				return true
 25453  			}
 25454  			break
 25455  		}
 25456  		// match: (GT (CMPconst [0] z:(MADD a x y)) yes no)
 25457  		// cond: z.Uses==1
 25458  		// result: (GTnoov (CMN a (MUL <x.Type> x y)) yes no)
 25459  		for b.Controls[0].Op == OpARM64CMPconst {
 25460  			v_0 := b.Controls[0]
 25461  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25462  				break
 25463  			}
 25464  			z := v_0.Args[0]
 25465  			if z.Op != OpARM64MADD {
 25466  				break
 25467  			}
 25468  			y := z.Args[2]
 25469  			a := z.Args[0]
 25470  			x := z.Args[1]
 25471  			if !(z.Uses == 1) {
 25472  				break
 25473  			}
 25474  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 25475  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 25476  			v1.AddArg2(x, y)
 25477  			v0.AddArg2(a, v1)
 25478  			b.resetWithControl(block.BlockARM64GTnoov, v0)
 25479  			return true
 25480  		}
 25481  		// match: (GT (CMPWconst [0] z:(MADDW a x y)) yes no)
 25482  		// cond: z.Uses==1
 25483  		// result: (GTnoov (CMNW a (MULW <x.Type> x y)) yes no)
 25484  		for b.Controls[0].Op == OpARM64CMPWconst {
 25485  			v_0 := b.Controls[0]
 25486  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25487  				break
 25488  			}
 25489  			z := v_0.Args[0]
 25490  			if z.Op != OpARM64MADDW {
 25491  				break
 25492  			}
 25493  			y := z.Args[2]
 25494  			a := z.Args[0]
 25495  			x := z.Args[1]
 25496  			if !(z.Uses == 1) {
 25497  				break
 25498  			}
 25499  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 25500  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 25501  			v1.AddArg2(x, y)
 25502  			v0.AddArg2(a, v1)
 25503  			b.resetWithControl(block.BlockARM64GTnoov, v0)
 25504  			return true
 25505  		}
 25506  		// match: (GT (FlagConstant [fc]) yes no)
 25507  		// cond: fc.gt()
 25508  		// result: (First yes no)
 25509  		for b.Controls[0].Op == OpARM64FlagConstant {
 25510  			v_0 := b.Controls[0]
 25511  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25512  			if !(fc.gt()) {
 25513  				break
 25514  			}
 25515  			b.Reset(block.BlockFirst)
 25516  			return true
 25517  		}
 25518  		// match: (GT (FlagConstant [fc]) yes no)
 25519  		// cond: !fc.gt()
 25520  		// result: (First no yes)
 25521  		for b.Controls[0].Op == OpARM64FlagConstant {
 25522  			v_0 := b.Controls[0]
 25523  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25524  			if !(!fc.gt()) {
 25525  				break
 25526  			}
 25527  			b.Reset(block.BlockFirst)
 25528  			b.swapSuccessors()
 25529  			return true
 25530  		}
 25531  		// match: (GT (InvertFlags cmp) yes no)
 25532  		// result: (LT cmp yes no)
 25533  		for b.Controls[0].Op == OpARM64InvertFlags {
 25534  			v_0 := b.Controls[0]
 25535  			cmp := v_0.Args[0]
 25536  			b.resetWithControl(block.BlockARM64LT, cmp)
 25537  			return true
 25538  		}
 25539  	case block.BlockARM64GTnoov:
 25540  		// match: (GTnoov (FlagConstant [fc]) yes no)
 25541  		// cond: fc.gtNoov()
 25542  		// result: (First yes no)
 25543  		for b.Controls[0].Op == OpARM64FlagConstant {
 25544  			v_0 := b.Controls[0]
 25545  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25546  			if !(fc.gtNoov()) {
 25547  				break
 25548  			}
 25549  			b.Reset(block.BlockFirst)
 25550  			return true
 25551  		}
 25552  		// match: (GTnoov (FlagConstant [fc]) yes no)
 25553  		// cond: !fc.gtNoov()
 25554  		// result: (First no yes)
 25555  		for b.Controls[0].Op == OpARM64FlagConstant {
 25556  			v_0 := b.Controls[0]
 25557  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25558  			if !(!fc.gtNoov()) {
 25559  				break
 25560  			}
 25561  			b.Reset(block.BlockFirst)
 25562  			b.swapSuccessors()
 25563  			return true
 25564  		}
 25565  	case block.BlockIf:
 25566  		// match: (If (Equal cc) yes no)
 25567  		// result: (EQ cc yes no)
 25568  		for b.Controls[0].Op == OpARM64Equal {
 25569  			v_0 := b.Controls[0]
 25570  			cc := v_0.Args[0]
 25571  			b.resetWithControl(block.BlockARM64EQ, cc)
 25572  			return true
 25573  		}
 25574  		// match: (If (NotEqual cc) yes no)
 25575  		// result: (NE cc yes no)
 25576  		for b.Controls[0].Op == OpARM64NotEqual {
 25577  			v_0 := b.Controls[0]
 25578  			cc := v_0.Args[0]
 25579  			b.resetWithControl(block.BlockARM64NE, cc)
 25580  			return true
 25581  		}
 25582  		// match: (If (LessThan cc) yes no)
 25583  		// result: (LT cc yes no)
 25584  		for b.Controls[0].Op == OpARM64LessThan {
 25585  			v_0 := b.Controls[0]
 25586  			cc := v_0.Args[0]
 25587  			b.resetWithControl(block.BlockARM64LT, cc)
 25588  			return true
 25589  		}
 25590  		// match: (If (LessThanU cc) yes no)
 25591  		// result: (ULT cc yes no)
 25592  		for b.Controls[0].Op == OpARM64LessThanU {
 25593  			v_0 := b.Controls[0]
 25594  			cc := v_0.Args[0]
 25595  			b.resetWithControl(block.BlockARM64ULT, cc)
 25596  			return true
 25597  		}
 25598  		// match: (If (LessEqual cc) yes no)
 25599  		// result: (LE cc yes no)
 25600  		for b.Controls[0].Op == OpARM64LessEqual {
 25601  			v_0 := b.Controls[0]
 25602  			cc := v_0.Args[0]
 25603  			b.resetWithControl(block.BlockARM64LE, cc)
 25604  			return true
 25605  		}
 25606  		// match: (If (LessEqualU cc) yes no)
 25607  		// result: (ULE cc yes no)
 25608  		for b.Controls[0].Op == OpARM64LessEqualU {
 25609  			v_0 := b.Controls[0]
 25610  			cc := v_0.Args[0]
 25611  			b.resetWithControl(block.BlockARM64ULE, cc)
 25612  			return true
 25613  		}
 25614  		// match: (If (GreaterThan cc) yes no)
 25615  		// result: (GT cc yes no)
 25616  		for b.Controls[0].Op == OpARM64GreaterThan {
 25617  			v_0 := b.Controls[0]
 25618  			cc := v_0.Args[0]
 25619  			b.resetWithControl(block.BlockARM64GT, cc)
 25620  			return true
 25621  		}
 25622  		// match: (If (GreaterThanU cc) yes no)
 25623  		// result: (UGT cc yes no)
 25624  		for b.Controls[0].Op == OpARM64GreaterThanU {
 25625  			v_0 := b.Controls[0]
 25626  			cc := v_0.Args[0]
 25627  			b.resetWithControl(block.BlockARM64UGT, cc)
 25628  			return true
 25629  		}
 25630  		// match: (If (GreaterEqual cc) yes no)
 25631  		// result: (GE cc yes no)
 25632  		for b.Controls[0].Op == OpARM64GreaterEqual {
 25633  			v_0 := b.Controls[0]
 25634  			cc := v_0.Args[0]
 25635  			b.resetWithControl(block.BlockARM64GE, cc)
 25636  			return true
 25637  		}
 25638  		// match: (If (GreaterEqualU cc) yes no)
 25639  		// result: (UGE cc yes no)
 25640  		for b.Controls[0].Op == OpARM64GreaterEqualU {
 25641  			v_0 := b.Controls[0]
 25642  			cc := v_0.Args[0]
 25643  			b.resetWithControl(block.BlockARM64UGE, cc)
 25644  			return true
 25645  		}
 25646  		// match: (If (LessThanF cc) yes no)
 25647  		// result: (FLT cc yes no)
 25648  		for b.Controls[0].Op == OpARM64LessThanF {
 25649  			v_0 := b.Controls[0]
 25650  			cc := v_0.Args[0]
 25651  			b.resetWithControl(block.BlockARM64FLT, cc)
 25652  			return true
 25653  		}
 25654  		// match: (If (LessEqualF cc) yes no)
 25655  		// result: (FLE cc yes no)
 25656  		for b.Controls[0].Op == OpARM64LessEqualF {
 25657  			v_0 := b.Controls[0]
 25658  			cc := v_0.Args[0]
 25659  			b.resetWithControl(block.BlockARM64FLE, cc)
 25660  			return true
 25661  		}
 25662  		// match: (If (GreaterThanF cc) yes no)
 25663  		// result: (FGT cc yes no)
 25664  		for b.Controls[0].Op == OpARM64GreaterThanF {
 25665  			v_0 := b.Controls[0]
 25666  			cc := v_0.Args[0]
 25667  			b.resetWithControl(block.BlockARM64FGT, cc)
 25668  			return true
 25669  		}
 25670  		// match: (If (GreaterEqualF cc) yes no)
 25671  		// result: (FGE cc yes no)
 25672  		for b.Controls[0].Op == OpARM64GreaterEqualF {
 25673  			v_0 := b.Controls[0]
 25674  			cc := v_0.Args[0]
 25675  			b.resetWithControl(block.BlockARM64FGE, cc)
 25676  			return true
 25677  		}
 25678  		// match: (If cond yes no)
 25679  		// result: (TBNZ [0] cond yes no)
 25680  		for {
 25681  			cond := b.Controls[0]
 25682  			b.resetWithControl(block.BlockARM64TBNZ, cond)
 25683  			b.AuxInt = int64ToAuxInt(0)
 25684  			return true
 25685  		}
 25686  	case block.BlockJumpTable:
 25687  		// match: (JumpTable idx)
 25688  		// result: (JUMPTABLE {makeJumpTableSym(b)} idx (MOVDaddr <typ.Uintptr> {makeJumpTableSym(b)} (SB)))
 25689  		for {
 25690  			idx := b.Controls[0]
 25691  			v0 := b.NewValue0(b.Pos, OpARM64MOVDaddr, typ.Uintptr)
 25692  			v0.Aux = symToAux(makeJumpTableSym(b))
 25693  			v1 := b.NewValue0(b.Pos, OpSB, typ.Uintptr)
 25694  			v0.AddArg(v1)
 25695  			b.resetWithControl2(block.BlockARM64JUMPTABLE, idx, v0)
 25696  			b.Aux = symToAux(makeJumpTableSym(b))
 25697  			return true
 25698  		}
 25699  	case block.BlockARM64LE:
 25700  		// match: (LE (CMPconst [0] z:(AND x y)) yes no)
 25701  		// cond: z.Uses == 1
 25702  		// result: (LE (TST x y) yes no)
 25703  		for b.Controls[0].Op == OpARM64CMPconst {
 25704  			v_0 := b.Controls[0]
 25705  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25706  				break
 25707  			}
 25708  			z := v_0.Args[0]
 25709  			if z.Op != OpARM64AND {
 25710  				break
 25711  			}
 25712  			_ = z.Args[1]
 25713  			z_0 := z.Args[0]
 25714  			z_1 := z.Args[1]
 25715  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25716  				x := z_0
 25717  				y := z_1
 25718  				if !(z.Uses == 1) {
 25719  					continue
 25720  				}
 25721  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 25722  				v0.AddArg2(x, y)
 25723  				b.resetWithControl(block.BlockARM64LE, v0)
 25724  				return true
 25725  			}
 25726  			break
 25727  		}
 25728  		// match: (LE (CMPconst [0] x:(ANDconst [c] y)) yes no)
 25729  		// cond: x.Uses == 1
 25730  		// result: (LE (TSTconst [c] y) yes no)
 25731  		for b.Controls[0].Op == OpARM64CMPconst {
 25732  			v_0 := b.Controls[0]
 25733  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25734  				break
 25735  			}
 25736  			x := v_0.Args[0]
 25737  			if x.Op != OpARM64ANDconst {
 25738  				break
 25739  			}
 25740  			c := auxIntToInt64(x.AuxInt)
 25741  			y := x.Args[0]
 25742  			if !(x.Uses == 1) {
 25743  				break
 25744  			}
 25745  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 25746  			v0.AuxInt = int64ToAuxInt(c)
 25747  			v0.AddArg(y)
 25748  			b.resetWithControl(block.BlockARM64LE, v0)
 25749  			return true
 25750  		}
 25751  		// match: (LE (CMPWconst [0] z:(AND x y)) yes no)
 25752  		// cond: z.Uses == 1
 25753  		// result: (LE (TSTW x y) yes no)
 25754  		for b.Controls[0].Op == OpARM64CMPWconst {
 25755  			v_0 := b.Controls[0]
 25756  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25757  				break
 25758  			}
 25759  			z := v_0.Args[0]
 25760  			if z.Op != OpARM64AND {
 25761  				break
 25762  			}
 25763  			_ = z.Args[1]
 25764  			z_0 := z.Args[0]
 25765  			z_1 := z.Args[1]
 25766  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25767  				x := z_0
 25768  				y := z_1
 25769  				if !(z.Uses == 1) {
 25770  					continue
 25771  				}
 25772  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 25773  				v0.AddArg2(x, y)
 25774  				b.resetWithControl(block.BlockARM64LE, v0)
 25775  				return true
 25776  			}
 25777  			break
 25778  		}
 25779  		// match: (LE (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 25780  		// cond: x.Uses == 1
 25781  		// result: (LE (TSTWconst [int32(c)] y) yes no)
 25782  		for b.Controls[0].Op == OpARM64CMPWconst {
 25783  			v_0 := b.Controls[0]
 25784  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25785  				break
 25786  			}
 25787  			x := v_0.Args[0]
 25788  			if x.Op != OpARM64ANDconst {
 25789  				break
 25790  			}
 25791  			c := auxIntToInt64(x.AuxInt)
 25792  			y := x.Args[0]
 25793  			if !(x.Uses == 1) {
 25794  				break
 25795  			}
 25796  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 25797  			v0.AuxInt = int32ToAuxInt(int32(c))
 25798  			v0.AddArg(y)
 25799  			b.resetWithControl(block.BlockARM64LE, v0)
 25800  			return true
 25801  		}
 25802  		// match: (LE (CMPconst [0] x:(ADDconst [c] y)) yes no)
 25803  		// cond: x.Uses == 1
 25804  		// result: (LEnoov (CMNconst [c] y) yes no)
 25805  		for b.Controls[0].Op == OpARM64CMPconst {
 25806  			v_0 := b.Controls[0]
 25807  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25808  				break
 25809  			}
 25810  			x := v_0.Args[0]
 25811  			if x.Op != OpARM64ADDconst {
 25812  				break
 25813  			}
 25814  			c := auxIntToInt64(x.AuxInt)
 25815  			y := x.Args[0]
 25816  			if !(x.Uses == 1) {
 25817  				break
 25818  			}
 25819  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 25820  			v0.AuxInt = int64ToAuxInt(c)
 25821  			v0.AddArg(y)
 25822  			b.resetWithControl(block.BlockARM64LEnoov, v0)
 25823  			return true
 25824  		}
 25825  		// match: (LE (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 25826  		// cond: x.Uses == 1
 25827  		// result: (LEnoov (CMNWconst [int32(c)] y) yes no)
 25828  		for b.Controls[0].Op == OpARM64CMPWconst {
 25829  			v_0 := b.Controls[0]
 25830  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25831  				break
 25832  			}
 25833  			x := v_0.Args[0]
 25834  			if x.Op != OpARM64ADDconst {
 25835  				break
 25836  			}
 25837  			c := auxIntToInt64(x.AuxInt)
 25838  			y := x.Args[0]
 25839  			if !(x.Uses == 1) {
 25840  				break
 25841  			}
 25842  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 25843  			v0.AuxInt = int32ToAuxInt(int32(c))
 25844  			v0.AddArg(y)
 25845  			b.resetWithControl(block.BlockARM64LEnoov, v0)
 25846  			return true
 25847  		}
 25848  		// match: (LE (CMPconst [0] z:(ADD x y)) yes no)
 25849  		// cond: z.Uses == 1
 25850  		// result: (LEnoov (CMN x y) yes no)
 25851  		for b.Controls[0].Op == OpARM64CMPconst {
 25852  			v_0 := b.Controls[0]
 25853  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25854  				break
 25855  			}
 25856  			z := v_0.Args[0]
 25857  			if z.Op != OpARM64ADD {
 25858  				break
 25859  			}
 25860  			_ = z.Args[1]
 25861  			z_0 := z.Args[0]
 25862  			z_1 := z.Args[1]
 25863  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25864  				x := z_0
 25865  				y := z_1
 25866  				if !(z.Uses == 1) {
 25867  					continue
 25868  				}
 25869  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 25870  				v0.AddArg2(x, y)
 25871  				b.resetWithControl(block.BlockARM64LEnoov, v0)
 25872  				return true
 25873  			}
 25874  			break
 25875  		}
 25876  		// match: (LE (CMPWconst [0] z:(ADD x y)) yes no)
 25877  		// cond: z.Uses == 1
 25878  		// result: (LEnoov (CMNW x y) yes no)
 25879  		for b.Controls[0].Op == OpARM64CMPWconst {
 25880  			v_0 := b.Controls[0]
 25881  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25882  				break
 25883  			}
 25884  			z := v_0.Args[0]
 25885  			if z.Op != OpARM64ADD {
 25886  				break
 25887  			}
 25888  			_ = z.Args[1]
 25889  			z_0 := z.Args[0]
 25890  			z_1 := z.Args[1]
 25891  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25892  				x := z_0
 25893  				y := z_1
 25894  				if !(z.Uses == 1) {
 25895  					continue
 25896  				}
 25897  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 25898  				v0.AddArg2(x, y)
 25899  				b.resetWithControl(block.BlockARM64LEnoov, v0)
 25900  				return true
 25901  			}
 25902  			break
 25903  		}
 25904  		// match: (LE (CMPconst [0] z:(MADD a x y)) yes no)
 25905  		// cond: z.Uses==1
 25906  		// result: (LEnoov (CMN a (MUL <x.Type> x y)) yes no)
 25907  		for b.Controls[0].Op == OpARM64CMPconst {
 25908  			v_0 := b.Controls[0]
 25909  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25910  				break
 25911  			}
 25912  			z := v_0.Args[0]
 25913  			if z.Op != OpARM64MADD {
 25914  				break
 25915  			}
 25916  			y := z.Args[2]
 25917  			a := z.Args[0]
 25918  			x := z.Args[1]
 25919  			if !(z.Uses == 1) {
 25920  				break
 25921  			}
 25922  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 25923  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 25924  			v1.AddArg2(x, y)
 25925  			v0.AddArg2(a, v1)
 25926  			b.resetWithControl(block.BlockARM64LEnoov, v0)
 25927  			return true
 25928  		}
 25929  		// match: (LE (CMPWconst [0] z:(MADDW a x y)) yes no)
 25930  		// cond: z.Uses==1
 25931  		// result: (LEnoov (CMNW a (MULW <x.Type> x y)) yes no)
 25932  		for b.Controls[0].Op == OpARM64CMPWconst {
 25933  			v_0 := b.Controls[0]
 25934  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25935  				break
 25936  			}
 25937  			z := v_0.Args[0]
 25938  			if z.Op != OpARM64MADDW {
 25939  				break
 25940  			}
 25941  			y := z.Args[2]
 25942  			a := z.Args[0]
 25943  			x := z.Args[1]
 25944  			if !(z.Uses == 1) {
 25945  				break
 25946  			}
 25947  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 25948  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 25949  			v1.AddArg2(x, y)
 25950  			v0.AddArg2(a, v1)
 25951  			b.resetWithControl(block.BlockARM64LEnoov, v0)
 25952  			return true
 25953  		}
 25954  		// match: (LE (FlagConstant [fc]) yes no)
 25955  		// cond: fc.le()
 25956  		// result: (First yes no)
 25957  		for b.Controls[0].Op == OpARM64FlagConstant {
 25958  			v_0 := b.Controls[0]
 25959  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25960  			if !(fc.le()) {
 25961  				break
 25962  			}
 25963  			b.Reset(block.BlockFirst)
 25964  			return true
 25965  		}
 25966  		// match: (LE (FlagConstant [fc]) yes no)
 25967  		// cond: !fc.le()
 25968  		// result: (First no yes)
 25969  		for b.Controls[0].Op == OpARM64FlagConstant {
 25970  			v_0 := b.Controls[0]
 25971  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25972  			if !(!fc.le()) {
 25973  				break
 25974  			}
 25975  			b.Reset(block.BlockFirst)
 25976  			b.swapSuccessors()
 25977  			return true
 25978  		}
 25979  		// match: (LE (InvertFlags cmp) yes no)
 25980  		// result: (GE cmp yes no)
 25981  		for b.Controls[0].Op == OpARM64InvertFlags {
 25982  			v_0 := b.Controls[0]
 25983  			cmp := v_0.Args[0]
 25984  			b.resetWithControl(block.BlockARM64GE, cmp)
 25985  			return true
 25986  		}
 25987  	case block.BlockARM64LEnoov:
 25988  		// match: (LEnoov (FlagConstant [fc]) yes no)
 25989  		// cond: fc.leNoov()
 25990  		// result: (First yes no)
 25991  		for b.Controls[0].Op == OpARM64FlagConstant {
 25992  			v_0 := b.Controls[0]
 25993  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25994  			if !(fc.leNoov()) {
 25995  				break
 25996  			}
 25997  			b.Reset(block.BlockFirst)
 25998  			return true
 25999  		}
 26000  		// match: (LEnoov (FlagConstant [fc]) yes no)
 26001  		// cond: !fc.leNoov()
 26002  		// result: (First no yes)
 26003  		for b.Controls[0].Op == OpARM64FlagConstant {
 26004  			v_0 := b.Controls[0]
 26005  			fc := auxIntToFlagConstant(v_0.AuxInt)
 26006  			if !(!fc.leNoov()) {
 26007  				break
 26008  			}
 26009  			b.Reset(block.BlockFirst)
 26010  			b.swapSuccessors()
 26011  			return true
 26012  		}
 26013  	case block.BlockARM64LT:
 26014  		// match: (LT (CMPconst [0] z:(AND x y)) yes no)
 26015  		// cond: z.Uses == 1
 26016  		// result: (LT (TST x y) yes no)
 26017  		for b.Controls[0].Op == OpARM64CMPconst {
 26018  			v_0 := b.Controls[0]
 26019  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26020  				break
 26021  			}
 26022  			z := v_0.Args[0]
 26023  			if z.Op != OpARM64AND {
 26024  				break
 26025  			}
 26026  			_ = z.Args[1]
 26027  			z_0 := z.Args[0]
 26028  			z_1 := z.Args[1]
 26029  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 26030  				x := z_0
 26031  				y := z_1
 26032  				if !(z.Uses == 1) {
 26033  					continue
 26034  				}
 26035  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 26036  				v0.AddArg2(x, y)
 26037  				b.resetWithControl(block.BlockARM64LT, v0)
 26038  				return true
 26039  			}
 26040  			break
 26041  		}
 26042  		// match: (LT (CMPconst [0] x:(ANDconst [c] y)) yes no)
 26043  		// cond: x.Uses == 1
 26044  		// result: (LT (TSTconst [c] y) yes no)
 26045  		for b.Controls[0].Op == OpARM64CMPconst {
 26046  			v_0 := b.Controls[0]
 26047  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26048  				break
 26049  			}
 26050  			x := v_0.Args[0]
 26051  			if x.Op != OpARM64ANDconst {
 26052  				break
 26053  			}
 26054  			c := auxIntToInt64(x.AuxInt)
 26055  			y := x.Args[0]
 26056  			if !(x.Uses == 1) {
 26057  				break
 26058  			}
 26059  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 26060  			v0.AuxInt = int64ToAuxInt(c)
 26061  			v0.AddArg(y)
 26062  			b.resetWithControl(block.BlockARM64LT, v0)
 26063  			return true
 26064  		}
 26065  		// match: (LT (CMPWconst [0] z:(AND x y)) yes no)
 26066  		// cond: z.Uses == 1
 26067  		// result: (LT (TSTW x y) yes no)
 26068  		for b.Controls[0].Op == OpARM64CMPWconst {
 26069  			v_0 := b.Controls[0]
 26070  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26071  				break
 26072  			}
 26073  			z := v_0.Args[0]
 26074  			if z.Op != OpARM64AND {
 26075  				break
 26076  			}
 26077  			_ = z.Args[1]
 26078  			z_0 := z.Args[0]
 26079  			z_1 := z.Args[1]
 26080  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 26081  				x := z_0
 26082  				y := z_1
 26083  				if !(z.Uses == 1) {
 26084  					continue
 26085  				}
 26086  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 26087  				v0.AddArg2(x, y)
 26088  				b.resetWithControl(block.BlockARM64LT, v0)
 26089  				return true
 26090  			}
 26091  			break
 26092  		}
 26093  		// match: (LT (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 26094  		// cond: x.Uses == 1
 26095  		// result: (LT (TSTWconst [int32(c)] y) yes no)
 26096  		for b.Controls[0].Op == OpARM64CMPWconst {
 26097  			v_0 := b.Controls[0]
 26098  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26099  				break
 26100  			}
 26101  			x := v_0.Args[0]
 26102  			if x.Op != OpARM64ANDconst {
 26103  				break
 26104  			}
 26105  			c := auxIntToInt64(x.AuxInt)
 26106  			y := x.Args[0]
 26107  			if !(x.Uses == 1) {
 26108  				break
 26109  			}
 26110  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 26111  			v0.AuxInt = int32ToAuxInt(int32(c))
 26112  			v0.AddArg(y)
 26113  			b.resetWithControl(block.BlockARM64LT, v0)
 26114  			return true
 26115  		}
 26116  		// match: (LT (CMPconst [0] x:(ADDconst [c] y)) yes no)
 26117  		// cond: x.Uses == 1
 26118  		// result: (LTnoov (CMNconst [c] y) yes no)
 26119  		for b.Controls[0].Op == OpARM64CMPconst {
 26120  			v_0 := b.Controls[0]
 26121  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26122  				break
 26123  			}
 26124  			x := v_0.Args[0]
 26125  			if x.Op != OpARM64ADDconst {
 26126  				break
 26127  			}
 26128  			c := auxIntToInt64(x.AuxInt)
 26129  			y := x.Args[0]
 26130  			if !(x.Uses == 1) {
 26131  				break
 26132  			}
 26133  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 26134  			v0.AuxInt = int64ToAuxInt(c)
 26135  			v0.AddArg(y)
 26136  			b.resetWithControl(block.BlockARM64LTnoov, v0)
 26137  			return true
 26138  		}
 26139  		// match: (LT (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 26140  		// cond: x.Uses == 1
 26141  		// result: (LTnoov (CMNWconst [int32(c)] y) yes no)
 26142  		for b.Controls[0].Op == OpARM64CMPWconst {
 26143  			v_0 := b.Controls[0]
 26144  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26145  				break
 26146  			}
 26147  			x := v_0.Args[0]
 26148  			if x.Op != OpARM64ADDconst {
 26149  				break
 26150  			}
 26151  			c := auxIntToInt64(x.AuxInt)
 26152  			y := x.Args[0]
 26153  			if !(x.Uses == 1) {
 26154  				break
 26155  			}
 26156  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 26157  			v0.AuxInt = int32ToAuxInt(int32(c))
 26158  			v0.AddArg(y)
 26159  			b.resetWithControl(block.BlockARM64LTnoov, v0)
 26160  			return true
 26161  		}
 26162  		// match: (LT (CMPconst [0] z:(ADD x y)) yes no)
 26163  		// cond: z.Uses == 1
 26164  		// result: (LTnoov (CMN x y) yes no)
 26165  		for b.Controls[0].Op == OpARM64CMPconst {
 26166  			v_0 := b.Controls[0]
 26167  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26168  				break
 26169  			}
 26170  			z := v_0.Args[0]
 26171  			if z.Op != OpARM64ADD {
 26172  				break
 26173  			}
 26174  			_ = z.Args[1]
 26175  			z_0 := z.Args[0]
 26176  			z_1 := z.Args[1]
 26177  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 26178  				x := z_0
 26179  				y := z_1
 26180  				if !(z.Uses == 1) {
 26181  					continue
 26182  				}
 26183  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 26184  				v0.AddArg2(x, y)
 26185  				b.resetWithControl(block.BlockARM64LTnoov, v0)
 26186  				return true
 26187  			}
 26188  			break
 26189  		}
 26190  		// match: (LT (CMPWconst [0] z:(ADD x y)) yes no)
 26191  		// cond: z.Uses == 1
 26192  		// result: (LTnoov (CMNW x y) yes no)
 26193  		for b.Controls[0].Op == OpARM64CMPWconst {
 26194  			v_0 := b.Controls[0]
 26195  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26196  				break
 26197  			}
 26198  			z := v_0.Args[0]
 26199  			if z.Op != OpARM64ADD {
 26200  				break
 26201  			}
 26202  			_ = z.Args[1]
 26203  			z_0 := z.Args[0]
 26204  			z_1 := z.Args[1]
 26205  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 26206  				x := z_0
 26207  				y := z_1
 26208  				if !(z.Uses == 1) {
 26209  					continue
 26210  				}
 26211  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 26212  				v0.AddArg2(x, y)
 26213  				b.resetWithControl(block.BlockARM64LTnoov, v0)
 26214  				return true
 26215  			}
 26216  			break
 26217  		}
 26218  		// match: (LT (CMPconst [0] z:(MADD a x y)) yes no)
 26219  		// cond: z.Uses==1
 26220  		// result: (LTnoov (CMN a (MUL <x.Type> x y)) yes no)
 26221  		for b.Controls[0].Op == OpARM64CMPconst {
 26222  			v_0 := b.Controls[0]
 26223  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26224  				break
 26225  			}
 26226  			z := v_0.Args[0]
 26227  			if z.Op != OpARM64MADD {
 26228  				break
 26229  			}
 26230  			y := z.Args[2]
 26231  			a := z.Args[0]
 26232  			x := z.Args[1]
 26233  			if !(z.Uses == 1) {
 26234  				break
 26235  			}
 26236  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 26237  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 26238  			v1.AddArg2(x, y)
 26239  			v0.AddArg2(a, v1)
 26240  			b.resetWithControl(block.BlockARM64LTnoov, v0)
 26241  			return true
 26242  		}
 26243  		// match: (LT (CMPWconst [0] z:(MADDW a x y)) yes no)
 26244  		// cond: z.Uses==1
 26245  		// result: (LTnoov (CMNW a (MULW <x.Type> x y)) yes no)
 26246  		for b.Controls[0].Op == OpARM64CMPWconst {
 26247  			v_0 := b.Controls[0]
 26248  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26249  				break
 26250  			}
 26251  			z := v_0.Args[0]
 26252  			if z.Op != OpARM64MADDW {
 26253  				break
 26254  			}
 26255  			y := z.Args[2]
 26256  			a := z.Args[0]
 26257  			x := z.Args[1]
 26258  			if !(z.Uses == 1) {
 26259  				break
 26260  			}
 26261  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 26262  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 26263  			v1.AddArg2(x, y)
 26264  			v0.AddArg2(a, v1)
 26265  			b.resetWithControl(block.BlockARM64LTnoov, v0)
 26266  			return true
 26267  		}
 26268  		// match: (LT (CMPWconst [0] x) yes no)
 26269  		// result: (TBNZ [31] x yes no)
 26270  		for b.Controls[0].Op == OpARM64CMPWconst {
 26271  			v_0 := b.Controls[0]
 26272  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26273  				break
 26274  			}
 26275  			x := v_0.Args[0]
 26276  			b.resetWithControl(block.BlockARM64TBNZ, x)
 26277  			b.AuxInt = int64ToAuxInt(31)
 26278  			return true
 26279  		}
 26280  		// match: (LT (CMPconst [0] x) yes no)
 26281  		// result: (TBNZ [63] x yes no)
 26282  		for b.Controls[0].Op == OpARM64CMPconst {
 26283  			v_0 := b.Controls[0]
 26284  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26285  				break
 26286  			}
 26287  			x := v_0.Args[0]
 26288  			b.resetWithControl(block.BlockARM64TBNZ, x)
 26289  			b.AuxInt = int64ToAuxInt(63)
 26290  			return true
 26291  		}
 26292  		// match: (LT (CMPWconst [128] x) yes no)
 26293  		// cond: ZeroUpper56Bits(x, 3)
 26294  		// result: (TBZ [7] x yes no)
 26295  		for b.Controls[0].Op == OpARM64CMPWconst {
 26296  			v_0 := b.Controls[0]
 26297  			if auxIntToInt32(v_0.AuxInt) != 128 {
 26298  				break
 26299  			}
 26300  			x := v_0.Args[0]
 26301  			if !(ZeroUpper56Bits(x, 3)) {
 26302  				break
 26303  			}
 26304  			b.resetWithControl(block.BlockARM64TBZ, x)
 26305  			b.AuxInt = int64ToAuxInt(7)
 26306  			return true
 26307  		}
 26308  		// match: (LT (CMPconst [128] x) yes no)
 26309  		// cond: ZeroUpper56Bits(x, 3)
 26310  		// result: (TBZ [7] x yes no)
 26311  		for b.Controls[0].Op == OpARM64CMPconst {
 26312  			v_0 := b.Controls[0]
 26313  			if auxIntToInt64(v_0.AuxInt) != 128 {
 26314  				break
 26315  			}
 26316  			x := v_0.Args[0]
 26317  			if !(ZeroUpper56Bits(x, 3)) {
 26318  				break
 26319  			}
 26320  			b.resetWithControl(block.BlockARM64TBZ, x)
 26321  			b.AuxInt = int64ToAuxInt(7)
 26322  			return true
 26323  		}
 26324  		// match: (LT (FlagConstant [fc]) yes no)
 26325  		// cond: fc.lt()
 26326  		// result: (First yes no)
 26327  		for b.Controls[0].Op == OpARM64FlagConstant {
 26328  			v_0 := b.Controls[0]
 26329  			fc := auxIntToFlagConstant(v_0.AuxInt)
 26330  			if !(fc.lt()) {
 26331  				break
 26332  			}
 26333  			b.Reset(block.BlockFirst)
 26334  			return true
 26335  		}
 26336  		// match: (LT (FlagConstant [fc]) yes no)
 26337  		// cond: !fc.lt()
 26338  		// result: (First no yes)
 26339  		for b.Controls[0].Op == OpARM64FlagConstant {
 26340  			v_0 := b.Controls[0]
 26341  			fc := auxIntToFlagConstant(v_0.AuxInt)
 26342  			if !(!fc.lt()) {
 26343  				break
 26344  			}
 26345  			b.Reset(block.BlockFirst)
 26346  			b.swapSuccessors()
 26347  			return true
 26348  		}
 26349  		// match: (LT (InvertFlags cmp) yes no)
 26350  		// result: (GT cmp yes no)
 26351  		for b.Controls[0].Op == OpARM64InvertFlags {
 26352  			v_0 := b.Controls[0]
 26353  			cmp := v_0.Args[0]
 26354  			b.resetWithControl(block.BlockARM64GT, cmp)
 26355  			return true
 26356  		}
 26357  	case block.BlockARM64LTnoov:
 26358  		// match: (LTnoov (FlagConstant [fc]) yes no)
 26359  		// cond: fc.ltNoov()
 26360  		// result: (First yes no)
 26361  		for b.Controls[0].Op == OpARM64FlagConstant {
 26362  			v_0 := b.Controls[0]
 26363  			fc := auxIntToFlagConstant(v_0.AuxInt)
 26364  			if !(fc.ltNoov()) {
 26365  				break
 26366  			}
 26367  			b.Reset(block.BlockFirst)
 26368  			return true
 26369  		}
 26370  		// match: (LTnoov (FlagConstant [fc]) yes no)
 26371  		// cond: !fc.ltNoov()
 26372  		// result: (First no yes)
 26373  		for b.Controls[0].Op == OpARM64FlagConstant {
 26374  			v_0 := b.Controls[0]
 26375  			fc := auxIntToFlagConstant(v_0.AuxInt)
 26376  			if !(!fc.ltNoov()) {
 26377  				break
 26378  			}
 26379  			b.Reset(block.BlockFirst)
 26380  			b.swapSuccessors()
 26381  			return true
 26382  		}
 26383  	case block.BlockARM64NE:
 26384  		// match: (NE (CMPconst [0] z:(AND x y)) yes no)
 26385  		// cond: z.Uses == 1
 26386  		// result: (NE (TST x y) yes no)
 26387  		for b.Controls[0].Op == OpARM64CMPconst {
 26388  			v_0 := b.Controls[0]
 26389  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26390  				break
 26391  			}
 26392  			z := v_0.Args[0]
 26393  			if z.Op != OpARM64AND {
 26394  				break
 26395  			}
 26396  			_ = z.Args[1]
 26397  			z_0 := z.Args[0]
 26398  			z_1 := z.Args[1]
 26399  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 26400  				x := z_0
 26401  				y := z_1
 26402  				if !(z.Uses == 1) {
 26403  					continue
 26404  				}
 26405  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 26406  				v0.AddArg2(x, y)
 26407  				b.resetWithControl(block.BlockARM64NE, v0)
 26408  				return true
 26409  			}
 26410  			break
 26411  		}
 26412  		// match: (NE (CMPconst [0] x:(ANDconst [c] y)) yes no)
 26413  		// cond: x.Uses == 1
 26414  		// result: (NE (TSTconst [c] y) yes no)
 26415  		for b.Controls[0].Op == OpARM64CMPconst {
 26416  			v_0 := b.Controls[0]
 26417  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26418  				break
 26419  			}
 26420  			x := v_0.Args[0]
 26421  			if x.Op != OpARM64ANDconst {
 26422  				break
 26423  			}
 26424  			c := auxIntToInt64(x.AuxInt)
 26425  			y := x.Args[0]
 26426  			if !(x.Uses == 1) {
 26427  				break
 26428  			}
 26429  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 26430  			v0.AuxInt = int64ToAuxInt(c)
 26431  			v0.AddArg(y)
 26432  			b.resetWithControl(block.BlockARM64NE, v0)
 26433  			return true
 26434  		}
 26435  		// match: (NE (CMPWconst [0] z:(AND x y)) yes no)
 26436  		// cond: z.Uses == 1
 26437  		// result: (NE (TSTW x y) yes no)
 26438  		for b.Controls[0].Op == OpARM64CMPWconst {
 26439  			v_0 := b.Controls[0]
 26440  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26441  				break
 26442  			}
 26443  			z := v_0.Args[0]
 26444  			if z.Op != OpARM64AND {
 26445  				break
 26446  			}
 26447  			_ = z.Args[1]
 26448  			z_0 := z.Args[0]
 26449  			z_1 := z.Args[1]
 26450  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 26451  				x := z_0
 26452  				y := z_1
 26453  				if !(z.Uses == 1) {
 26454  					continue
 26455  				}
 26456  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 26457  				v0.AddArg2(x, y)
 26458  				b.resetWithControl(block.BlockARM64NE, v0)
 26459  				return true
 26460  			}
 26461  			break
 26462  		}
 26463  		// match: (NE (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 26464  		// cond: x.Uses == 1
 26465  		// result: (NE (TSTWconst [int32(c)] y) yes no)
 26466  		for b.Controls[0].Op == OpARM64CMPWconst {
 26467  			v_0 := b.Controls[0]
 26468  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26469  				break
 26470  			}
 26471  			x := v_0.Args[0]
 26472  			if x.Op != OpARM64ANDconst {
 26473  				break
 26474  			}
 26475  			c := auxIntToInt64(x.AuxInt)
 26476  			y := x.Args[0]
 26477  			if !(x.Uses == 1) {
 26478  				break
 26479  			}
 26480  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 26481  			v0.AuxInt = int32ToAuxInt(int32(c))
 26482  			v0.AddArg(y)
 26483  			b.resetWithControl(block.BlockARM64NE, v0)
 26484  			return true
 26485  		}
 26486  		// match: (NE (CMPconst [0] x:(ADDconst [c] y)) yes no)
 26487  		// cond: x.Uses == 1
 26488  		// result: (NE (CMNconst [c] y) yes no)
 26489  		for b.Controls[0].Op == OpARM64CMPconst {
 26490  			v_0 := b.Controls[0]
 26491  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26492  				break
 26493  			}
 26494  			x := v_0.Args[0]
 26495  			if x.Op != OpARM64ADDconst {
 26496  				break
 26497  			}
 26498  			c := auxIntToInt64(x.AuxInt)
 26499  			y := x.Args[0]
 26500  			if !(x.Uses == 1) {
 26501  				break
 26502  			}
 26503  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 26504  			v0.AuxInt = int64ToAuxInt(c)
 26505  			v0.AddArg(y)
 26506  			b.resetWithControl(block.BlockARM64NE, v0)
 26507  			return true
 26508  		}
 26509  		// match: (NE (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 26510  		// cond: x.Uses == 1
 26511  		// result: (NE (CMNWconst [int32(c)] y) yes no)
 26512  		for b.Controls[0].Op == OpARM64CMPWconst {
 26513  			v_0 := b.Controls[0]
 26514  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26515  				break
 26516  			}
 26517  			x := v_0.Args[0]
 26518  			if x.Op != OpARM64ADDconst {
 26519  				break
 26520  			}
 26521  			c := auxIntToInt64(x.AuxInt)
 26522  			y := x.Args[0]
 26523  			if !(x.Uses == 1) {
 26524  				break
 26525  			}
 26526  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 26527  			v0.AuxInt = int32ToAuxInt(int32(c))
 26528  			v0.AddArg(y)
 26529  			b.resetWithControl(block.BlockARM64NE, v0)
 26530  			return true
 26531  		}
 26532  		// match: (NE (CMPconst [0] z:(ADD x y)) yes no)
 26533  		// cond: z.Uses == 1
 26534  		// result: (NE (CMN x y) yes no)
 26535  		for b.Controls[0].Op == OpARM64CMPconst {
 26536  			v_0 := b.Controls[0]
 26537  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26538  				break
 26539  			}
 26540  			z := v_0.Args[0]
 26541  			if z.Op != OpARM64ADD {
 26542  				break
 26543  			}
 26544  			_ = z.Args[1]
 26545  			z_0 := z.Args[0]
 26546  			z_1 := z.Args[1]
 26547  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 26548  				x := z_0
 26549  				y := z_1
 26550  				if !(z.Uses == 1) {
 26551  					continue
 26552  				}
 26553  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 26554  				v0.AddArg2(x, y)
 26555  				b.resetWithControl(block.BlockARM64NE, v0)
 26556  				return true
 26557  			}
 26558  			break
 26559  		}
 26560  		// match: (NE (CMPWconst [0] z:(ADD x y)) yes no)
 26561  		// cond: z.Uses == 1
 26562  		// result: (NE (CMNW x y) yes no)
 26563  		for b.Controls[0].Op == OpARM64CMPWconst {
 26564  			v_0 := b.Controls[0]
 26565  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26566  				break
 26567  			}
 26568  			z := v_0.Args[0]
 26569  			if z.Op != OpARM64ADD {
 26570  				break
 26571  			}
 26572  			_ = z.Args[1]
 26573  			z_0 := z.Args[0]
 26574  			z_1 := z.Args[1]
 26575  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 26576  				x := z_0
 26577  				y := z_1
 26578  				if !(z.Uses == 1) {
 26579  					continue
 26580  				}
 26581  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 26582  				v0.AddArg2(x, y)
 26583  				b.resetWithControl(block.BlockARM64NE, v0)
 26584  				return true
 26585  			}
 26586  			break
 26587  		}
 26588  		// match: (NE (CMP x z:(NEG y)) yes no)
 26589  		// cond: z.Uses == 1
 26590  		// result: (NE (CMN x y) yes no)
 26591  		for b.Controls[0].Op == OpARM64CMP {
 26592  			v_0 := b.Controls[0]
 26593  			_ = v_0.Args[1]
 26594  			x := v_0.Args[0]
 26595  			z := v_0.Args[1]
 26596  			if z.Op != OpARM64NEG {
 26597  				break
 26598  			}
 26599  			y := z.Args[0]
 26600  			if !(z.Uses == 1) {
 26601  				break
 26602  			}
 26603  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 26604  			v0.AddArg2(x, y)
 26605  			b.resetWithControl(block.BlockARM64NE, v0)
 26606  			return true
 26607  		}
 26608  		// match: (NE (CMPW x z:(NEG y)) yes no)
 26609  		// cond: z.Uses == 1
 26610  		// result: (NE (CMNW x y) yes no)
 26611  		for b.Controls[0].Op == OpARM64CMPW {
 26612  			v_0 := b.Controls[0]
 26613  			_ = v_0.Args[1]
 26614  			x := v_0.Args[0]
 26615  			z := v_0.Args[1]
 26616  			if z.Op != OpARM64NEG {
 26617  				break
 26618  			}
 26619  			y := z.Args[0]
 26620  			if !(z.Uses == 1) {
 26621  				break
 26622  			}
 26623  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 26624  			v0.AddArg2(x, y)
 26625  			b.resetWithControl(block.BlockARM64NE, v0)
 26626  			return true
 26627  		}
 26628  		// match: (NE (CMPconst [0] x) yes no)
 26629  		// result: (NZ x yes no)
 26630  		for b.Controls[0].Op == OpARM64CMPconst {
 26631  			v_0 := b.Controls[0]
 26632  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26633  				break
 26634  			}
 26635  			x := v_0.Args[0]
 26636  			b.resetWithControl(block.BlockARM64NZ, x)
 26637  			return true
 26638  		}
 26639  		// match: (NE (CMPWconst [0] x) yes no)
 26640  		// result: (NZW x yes no)
 26641  		for b.Controls[0].Op == OpARM64CMPWconst {
 26642  			v_0 := b.Controls[0]
 26643  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26644  				break
 26645  			}
 26646  			x := v_0.Args[0]
 26647  			b.resetWithControl(block.BlockARM64NZW, x)
 26648  			return true
 26649  		}
 26650  		// match: (NE (CMPconst [0] z:(MADD a x y)) yes no)
 26651  		// cond: z.Uses==1
 26652  		// result: (NE (CMN a (MUL <x.Type> x y)) yes no)
 26653  		for b.Controls[0].Op == OpARM64CMPconst {
 26654  			v_0 := b.Controls[0]
 26655  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26656  				break
 26657  			}
 26658  			z := v_0.Args[0]
 26659  			if z.Op != OpARM64MADD {
 26660  				break
 26661  			}
 26662  			y := z.Args[2]
 26663  			a := z.Args[0]
 26664  			x := z.Args[1]
 26665  			if !(z.Uses == 1) {
 26666  				break
 26667  			}
 26668  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 26669  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 26670  			v1.AddArg2(x, y)
 26671  			v0.AddArg2(a, v1)
 26672  			b.resetWithControl(block.BlockARM64NE, v0)
 26673  			return true
 26674  		}
 26675  		// match: (NE (CMPWconst [0] z:(MADDW a x y)) yes no)
 26676  		// cond: z.Uses==1
 26677  		// result: (NE (CMNW a (MULW <x.Type> x y)) yes no)
 26678  		for b.Controls[0].Op == OpARM64CMPWconst {
 26679  			v_0 := b.Controls[0]
 26680  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26681  				break
 26682  			}
 26683  			z := v_0.Args[0]
 26684  			if z.Op != OpARM64MADDW {
 26685  				break
 26686  			}
 26687  			y := z.Args[2]
 26688  			a := z.Args[0]
 26689  			x := z.Args[1]
 26690  			if !(z.Uses == 1) {
 26691  				break
 26692  			}
 26693  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 26694  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 26695  			v1.AddArg2(x, y)
 26696  			v0.AddArg2(a, v1)
 26697  			b.resetWithControl(block.BlockARM64NE, v0)
 26698  			return true
 26699  		}
 26700  		// match: (NE (CMPconst [0] z:(MSUB a x y)) yes no)
 26701  		// cond: z.Uses==1
 26702  		// result: (NE (CMP a (MUL <x.Type> x y)) yes no)
 26703  		for b.Controls[0].Op == OpARM64CMPconst {
 26704  			v_0 := b.Controls[0]
 26705  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26706  				break
 26707  			}
 26708  			z := v_0.Args[0]
 26709  			if z.Op != OpARM64MSUB {
 26710  				break
 26711  			}
 26712  			y := z.Args[2]
 26713  			a := z.Args[0]
 26714  			x := z.Args[1]
 26715  			if !(z.Uses == 1) {
 26716  				break
 26717  			}
 26718  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 26719  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 26720  			v1.AddArg2(x, y)
 26721  			v0.AddArg2(a, v1)
 26722  			b.resetWithControl(block.BlockARM64NE, v0)
 26723  			return true
 26724  		}
 26725  		// match: (NE (CMPWconst [0] z:(MSUBW a x y)) yes no)
 26726  		// cond: z.Uses==1
 26727  		// result: (NE (CMPW a (MULW <x.Type> x y)) yes no)
 26728  		for b.Controls[0].Op == OpARM64CMPWconst {
 26729  			v_0 := b.Controls[0]
 26730  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26731  				break
 26732  			}
 26733  			z := v_0.Args[0]
 26734  			if z.Op != OpARM64MSUBW {
 26735  				break
 26736  			}
 26737  			y := z.Args[2]
 26738  			a := z.Args[0]
 26739  			x := z.Args[1]
 26740  			if !(z.Uses == 1) {
 26741  				break
 26742  			}
 26743  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 26744  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 26745  			v1.AddArg2(x, y)
 26746  			v0.AddArg2(a, v1)
 26747  			b.resetWithControl(block.BlockARM64NE, v0)
 26748  			return true
 26749  		}
 26750  		// match: (NE (TSTconst [c] x) yes no)
 26751  		// cond: oneBit(c)
 26752  		// result: (TBNZ [int64(ntz64(c))] x yes no)
 26753  		for b.Controls[0].Op == OpARM64TSTconst {
 26754  			v_0 := b.Controls[0]
 26755  			c := auxIntToInt64(v_0.AuxInt)
 26756  			x := v_0.Args[0]
 26757  			if !(oneBit(c)) {
 26758  				break
 26759  			}
 26760  			b.resetWithControl(block.BlockARM64TBNZ, x)
 26761  			b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
 26762  			return true
 26763  		}
 26764  		// match: (NE (TSTWconst [c] x) yes no)
 26765  		// cond: oneBit(int64(uint32(c)))
 26766  		// result: (TBNZ [int64(ntz64(int64(uint32(c))))] x yes no)
 26767  		for b.Controls[0].Op == OpARM64TSTWconst {
 26768  			v_0 := b.Controls[0]
 26769  			c := auxIntToInt32(v_0.AuxInt)
 26770  			x := v_0.Args[0]
 26771  			if !(oneBit(int64(uint32(c)))) {
 26772  				break
 26773  			}
 26774  			b.resetWithControl(block.BlockARM64TBNZ, x)
 26775  			b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
 26776  			return true
 26777  		}
 26778  		// match: (NE (FlagConstant [fc]) yes no)
 26779  		// cond: fc.ne()
 26780  		// result: (First yes no)
 26781  		for b.Controls[0].Op == OpARM64FlagConstant {
 26782  			v_0 := b.Controls[0]
 26783  			fc := auxIntToFlagConstant(v_0.AuxInt)
 26784  			if !(fc.ne()) {
 26785  				break
 26786  			}
 26787  			b.Reset(block.BlockFirst)
 26788  			return true
 26789  		}
 26790  		// match: (NE (FlagConstant [fc]) yes no)
 26791  		// cond: !fc.ne()
 26792  		// result: (First no yes)
 26793  		for b.Controls[0].Op == OpARM64FlagConstant {
 26794  			v_0 := b.Controls[0]
 26795  			fc := auxIntToFlagConstant(v_0.AuxInt)
 26796  			if !(!fc.ne()) {
 26797  				break
 26798  			}
 26799  			b.Reset(block.BlockFirst)
 26800  			b.swapSuccessors()
 26801  			return true
 26802  		}
 26803  		// match: (NE (InvertFlags cmp) yes no)
 26804  		// result: (NE cmp yes no)
 26805  		for b.Controls[0].Op == OpARM64InvertFlags {
 26806  			v_0 := b.Controls[0]
 26807  			cmp := v_0.Args[0]
 26808  			b.resetWithControl(block.BlockARM64NE, cmp)
 26809  			return true
 26810  		}
 26811  	case block.BlockARM64NZ:
 26812  		// match: (NZ (Equal cc) yes no)
 26813  		// result: (EQ cc yes no)
 26814  		for b.Controls[0].Op == OpARM64Equal {
 26815  			v_0 := b.Controls[0]
 26816  			cc := v_0.Args[0]
 26817  			b.resetWithControl(block.BlockARM64EQ, cc)
 26818  			return true
 26819  		}
 26820  		// match: (NZ (NotEqual cc) yes no)
 26821  		// result: (NE cc yes no)
 26822  		for b.Controls[0].Op == OpARM64NotEqual {
 26823  			v_0 := b.Controls[0]
 26824  			cc := v_0.Args[0]
 26825  			b.resetWithControl(block.BlockARM64NE, cc)
 26826  			return true
 26827  		}
 26828  		// match: (NZ (LessThan cc) yes no)
 26829  		// result: (LT cc yes no)
 26830  		for b.Controls[0].Op == OpARM64LessThan {
 26831  			v_0 := b.Controls[0]
 26832  			cc := v_0.Args[0]
 26833  			b.resetWithControl(block.BlockARM64LT, cc)
 26834  			return true
 26835  		}
 26836  		// match: (NZ (LessThanU cc) yes no)
 26837  		// result: (ULT cc yes no)
 26838  		for b.Controls[0].Op == OpARM64LessThanU {
 26839  			v_0 := b.Controls[0]
 26840  			cc := v_0.Args[0]
 26841  			b.resetWithControl(block.BlockARM64ULT, cc)
 26842  			return true
 26843  		}
 26844  		// match: (NZ (LessEqual cc) yes no)
 26845  		// result: (LE cc yes no)
 26846  		for b.Controls[0].Op == OpARM64LessEqual {
 26847  			v_0 := b.Controls[0]
 26848  			cc := v_0.Args[0]
 26849  			b.resetWithControl(block.BlockARM64LE, cc)
 26850  			return true
 26851  		}
 26852  		// match: (NZ (LessEqualU cc) yes no)
 26853  		// result: (ULE cc yes no)
 26854  		for b.Controls[0].Op == OpARM64LessEqualU {
 26855  			v_0 := b.Controls[0]
 26856  			cc := v_0.Args[0]
 26857  			b.resetWithControl(block.BlockARM64ULE, cc)
 26858  			return true
 26859  		}
 26860  		// match: (NZ (GreaterThan cc) yes no)
 26861  		// result: (GT cc yes no)
 26862  		for b.Controls[0].Op == OpARM64GreaterThan {
 26863  			v_0 := b.Controls[0]
 26864  			cc := v_0.Args[0]
 26865  			b.resetWithControl(block.BlockARM64GT, cc)
 26866  			return true
 26867  		}
 26868  		// match: (NZ (GreaterThanU cc) yes no)
 26869  		// result: (UGT cc yes no)
 26870  		for b.Controls[0].Op == OpARM64GreaterThanU {
 26871  			v_0 := b.Controls[0]
 26872  			cc := v_0.Args[0]
 26873  			b.resetWithControl(block.BlockARM64UGT, cc)
 26874  			return true
 26875  		}
 26876  		// match: (NZ (GreaterEqual cc) yes no)
 26877  		// result: (GE cc yes no)
 26878  		for b.Controls[0].Op == OpARM64GreaterEqual {
 26879  			v_0 := b.Controls[0]
 26880  			cc := v_0.Args[0]
 26881  			b.resetWithControl(block.BlockARM64GE, cc)
 26882  			return true
 26883  		}
 26884  		// match: (NZ (GreaterEqualU cc) yes no)
 26885  		// result: (UGE cc yes no)
 26886  		for b.Controls[0].Op == OpARM64GreaterEqualU {
 26887  			v_0 := b.Controls[0]
 26888  			cc := v_0.Args[0]
 26889  			b.resetWithControl(block.BlockARM64UGE, cc)
 26890  			return true
 26891  		}
 26892  		// match: (NZ (LessThanF cc) yes no)
 26893  		// result: (FLT cc yes no)
 26894  		for b.Controls[0].Op == OpARM64LessThanF {
 26895  			v_0 := b.Controls[0]
 26896  			cc := v_0.Args[0]
 26897  			b.resetWithControl(block.BlockARM64FLT, cc)
 26898  			return true
 26899  		}
 26900  		// match: (NZ (LessEqualF cc) yes no)
 26901  		// result: (FLE cc yes no)
 26902  		for b.Controls[0].Op == OpARM64LessEqualF {
 26903  			v_0 := b.Controls[0]
 26904  			cc := v_0.Args[0]
 26905  			b.resetWithControl(block.BlockARM64FLE, cc)
 26906  			return true
 26907  		}
 26908  		// match: (NZ (GreaterThanF cc) yes no)
 26909  		// result: (FGT cc yes no)
 26910  		for b.Controls[0].Op == OpARM64GreaterThanF {
 26911  			v_0 := b.Controls[0]
 26912  			cc := v_0.Args[0]
 26913  			b.resetWithControl(block.BlockARM64FGT, cc)
 26914  			return true
 26915  		}
 26916  		// match: (NZ (GreaterEqualF cc) yes no)
 26917  		// result: (FGE cc yes no)
 26918  		for b.Controls[0].Op == OpARM64GreaterEqualF {
 26919  			v_0 := b.Controls[0]
 26920  			cc := v_0.Args[0]
 26921  			b.resetWithControl(block.BlockARM64FGE, cc)
 26922  			return true
 26923  		}
 26924  		// match: (NZ sub:(SUB x y))
 26925  		// cond: sub.Uses == 1
 26926  		// result: (NE (CMP x y))
 26927  		for b.Controls[0].Op == OpARM64SUB {
 26928  			sub := b.Controls[0]
 26929  			y := sub.Args[1]
 26930  			x := sub.Args[0]
 26931  			if !(sub.Uses == 1) {
 26932  				break
 26933  			}
 26934  			v0 := b.NewValue0(sub.Pos, OpARM64CMP, types.TypeFlags)
 26935  			v0.AddArg2(x, y)
 26936  			b.resetWithControl(block.BlockARM64NE, v0)
 26937  			return true
 26938  		}
 26939  		// match: (NZ sub:(SUBconst [c] y))
 26940  		// cond: sub.Uses == 1
 26941  		// result: (NE (CMPconst [c] y))
 26942  		for b.Controls[0].Op == OpARM64SUBconst {
 26943  			sub := b.Controls[0]
 26944  			c := auxIntToInt64(sub.AuxInt)
 26945  			y := sub.Args[0]
 26946  			if !(sub.Uses == 1) {
 26947  				break
 26948  			}
 26949  			v0 := b.NewValue0(sub.Pos, OpARM64CMPconst, types.TypeFlags)
 26950  			v0.AuxInt = int64ToAuxInt(c)
 26951  			v0.AddArg(y)
 26952  			b.resetWithControl(block.BlockARM64NE, v0)
 26953  			return true
 26954  		}
 26955  		// match: (NZ (ANDconst [c] x) yes no)
 26956  		// cond: oneBit(c)
 26957  		// result: (TBNZ [int64(ntz64(c))] x yes no)
 26958  		for b.Controls[0].Op == OpARM64ANDconst {
 26959  			v_0 := b.Controls[0]
 26960  			c := auxIntToInt64(v_0.AuxInt)
 26961  			x := v_0.Args[0]
 26962  			if !(oneBit(c)) {
 26963  				break
 26964  			}
 26965  			b.resetWithControl(block.BlockARM64TBNZ, x)
 26966  			b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
 26967  			return true
 26968  		}
 26969  		// match: (NZ s:(SRLconst [63] x) yes no)
 26970  		// cond: s.Uses == 1
 26971  		// result: (TBNZ [63] x yes no)
 26972  		for b.Controls[0].Op == OpARM64SRLconst {
 26973  			s := b.Controls[0]
 26974  			if auxIntToInt64(s.AuxInt) != 63 {
 26975  				break
 26976  			}
 26977  			x := s.Args[0]
 26978  			if !(s.Uses == 1) {
 26979  				break
 26980  			}
 26981  			b.resetWithControl(block.BlockARM64TBNZ, x)
 26982  			b.AuxInt = int64ToAuxInt(63)
 26983  			return true
 26984  		}
 26985  		// match: (NZ s:(SRAconst [63] x) yes no)
 26986  		// cond: s.Uses == 1
 26987  		// result: (TBNZ [63] x yes no)
 26988  		for b.Controls[0].Op == OpARM64SRAconst {
 26989  			s := b.Controls[0]
 26990  			if auxIntToInt64(s.AuxInt) != 63 {
 26991  				break
 26992  			}
 26993  			x := s.Args[0]
 26994  			if !(s.Uses == 1) {
 26995  				break
 26996  			}
 26997  			b.resetWithControl(block.BlockARM64TBNZ, x)
 26998  			b.AuxInt = int64ToAuxInt(63)
 26999  			return true
 27000  		}
 27001  		// match: (NZ (MOVDconst [0]) yes no)
 27002  		// result: (First no yes)
 27003  		for b.Controls[0].Op == OpARM64MOVDconst {
 27004  			v_0 := b.Controls[0]
 27005  			if auxIntToInt64(v_0.AuxInt) != 0 {
 27006  				break
 27007  			}
 27008  			b.Reset(block.BlockFirst)
 27009  			b.swapSuccessors()
 27010  			return true
 27011  		}
 27012  		// match: (NZ (MOVDconst [c]) yes no)
 27013  		// cond: c != 0
 27014  		// result: (First yes no)
 27015  		for b.Controls[0].Op == OpARM64MOVDconst {
 27016  			v_0 := b.Controls[0]
 27017  			c := auxIntToInt64(v_0.AuxInt)
 27018  			if !(c != 0) {
 27019  				break
 27020  			}
 27021  			b.Reset(block.BlockFirst)
 27022  			return true
 27023  		}
 27024  	case block.BlockARM64NZW:
 27025  		// match: (NZW sub:(SUB x y))
 27026  		// cond: sub.Uses == 1
 27027  		// result: (NE (CMPW x y))
 27028  		for b.Controls[0].Op == OpARM64SUB {
 27029  			sub := b.Controls[0]
 27030  			y := sub.Args[1]
 27031  			x := sub.Args[0]
 27032  			if !(sub.Uses == 1) {
 27033  				break
 27034  			}
 27035  			v0 := b.NewValue0(sub.Pos, OpARM64CMPW, types.TypeFlags)
 27036  			v0.AddArg2(x, y)
 27037  			b.resetWithControl(block.BlockARM64NE, v0)
 27038  			return true
 27039  		}
 27040  		// match: (NZW sub:(SUBconst [c] y))
 27041  		// cond: sub.Uses == 1
 27042  		// result: (NE (CMPWconst [int32(c)] y))
 27043  		for b.Controls[0].Op == OpARM64SUBconst {
 27044  			sub := b.Controls[0]
 27045  			c := auxIntToInt64(sub.AuxInt)
 27046  			y := sub.Args[0]
 27047  			if !(sub.Uses == 1) {
 27048  				break
 27049  			}
 27050  			v0 := b.NewValue0(sub.Pos, OpARM64CMPWconst, types.TypeFlags)
 27051  			v0.AuxInt = int32ToAuxInt(int32(c))
 27052  			v0.AddArg(y)
 27053  			b.resetWithControl(block.BlockARM64NE, v0)
 27054  			return true
 27055  		}
 27056  		// match: (NZW (ANDconst [c] x) yes no)
 27057  		// cond: oneBit(int64(uint32(c)))
 27058  		// result: (TBNZ [int64(ntz64(int64(uint32(c))))] x yes no)
 27059  		for b.Controls[0].Op == OpARM64ANDconst {
 27060  			v_0 := b.Controls[0]
 27061  			c := auxIntToInt64(v_0.AuxInt)
 27062  			x := v_0.Args[0]
 27063  			if !(oneBit(int64(uint32(c)))) {
 27064  				break
 27065  			}
 27066  			b.resetWithControl(block.BlockARM64TBNZ, x)
 27067  			b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
 27068  			return true
 27069  		}
 27070  		// match: (NZW (MOVDconst [c]) yes no)
 27071  		// cond: int32(c) == 0
 27072  		// result: (First no yes)
 27073  		for b.Controls[0].Op == OpARM64MOVDconst {
 27074  			v_0 := b.Controls[0]
 27075  			c := auxIntToInt64(v_0.AuxInt)
 27076  			if !(int32(c) == 0) {
 27077  				break
 27078  			}
 27079  			b.Reset(block.BlockFirst)
 27080  			b.swapSuccessors()
 27081  			return true
 27082  		}
 27083  		// match: (NZW (MOVDconst [c]) yes no)
 27084  		// cond: int32(c) != 0
 27085  		// result: (First yes no)
 27086  		for b.Controls[0].Op == OpARM64MOVDconst {
 27087  			v_0 := b.Controls[0]
 27088  			c := auxIntToInt64(v_0.AuxInt)
 27089  			if !(int32(c) != 0) {
 27090  				break
 27091  			}
 27092  			b.Reset(block.BlockFirst)
 27093  			return true
 27094  		}
 27095  	case block.BlockARM64TBNZ:
 27096  		// match: (TBNZ [0] (Equal cc) yes no)
 27097  		// result: (EQ cc yes no)
 27098  		for b.Controls[0].Op == OpARM64Equal {
 27099  			v_0 := b.Controls[0]
 27100  			cc := v_0.Args[0]
 27101  			if auxIntToInt64(b.AuxInt) != 0 {
 27102  				break
 27103  			}
 27104  			b.resetWithControl(block.BlockARM64EQ, cc)
 27105  			return true
 27106  		}
 27107  		// match: (TBNZ [0] (NotEqual cc) yes no)
 27108  		// result: (NE cc yes no)
 27109  		for b.Controls[0].Op == OpARM64NotEqual {
 27110  			v_0 := b.Controls[0]
 27111  			cc := v_0.Args[0]
 27112  			if auxIntToInt64(b.AuxInt) != 0 {
 27113  				break
 27114  			}
 27115  			b.resetWithControl(block.BlockARM64NE, cc)
 27116  			return true
 27117  		}
 27118  		// match: (TBNZ [0] (LessThan cc) yes no)
 27119  		// result: (LT cc yes no)
 27120  		for b.Controls[0].Op == OpARM64LessThan {
 27121  			v_0 := b.Controls[0]
 27122  			cc := v_0.Args[0]
 27123  			if auxIntToInt64(b.AuxInt) != 0 {
 27124  				break
 27125  			}
 27126  			b.resetWithControl(block.BlockARM64LT, cc)
 27127  			return true
 27128  		}
 27129  		// match: (TBNZ [0] (LessThanU cc) yes no)
 27130  		// result: (ULT cc yes no)
 27131  		for b.Controls[0].Op == OpARM64LessThanU {
 27132  			v_0 := b.Controls[0]
 27133  			cc := v_0.Args[0]
 27134  			if auxIntToInt64(b.AuxInt) != 0 {
 27135  				break
 27136  			}
 27137  			b.resetWithControl(block.BlockARM64ULT, cc)
 27138  			return true
 27139  		}
 27140  		// match: (TBNZ [0] (LessEqual cc) yes no)
 27141  		// result: (LE cc yes no)
 27142  		for b.Controls[0].Op == OpARM64LessEqual {
 27143  			v_0 := b.Controls[0]
 27144  			cc := v_0.Args[0]
 27145  			if auxIntToInt64(b.AuxInt) != 0 {
 27146  				break
 27147  			}
 27148  			b.resetWithControl(block.BlockARM64LE, cc)
 27149  			return true
 27150  		}
 27151  		// match: (TBNZ [0] (LessEqualU cc) yes no)
 27152  		// result: (ULE cc yes no)
 27153  		for b.Controls[0].Op == OpARM64LessEqualU {
 27154  			v_0 := b.Controls[0]
 27155  			cc := v_0.Args[0]
 27156  			if auxIntToInt64(b.AuxInt) != 0 {
 27157  				break
 27158  			}
 27159  			b.resetWithControl(block.BlockARM64ULE, cc)
 27160  			return true
 27161  		}
 27162  		// match: (TBNZ [0] (GreaterThan cc) yes no)
 27163  		// result: (GT cc yes no)
 27164  		for b.Controls[0].Op == OpARM64GreaterThan {
 27165  			v_0 := b.Controls[0]
 27166  			cc := v_0.Args[0]
 27167  			if auxIntToInt64(b.AuxInt) != 0 {
 27168  				break
 27169  			}
 27170  			b.resetWithControl(block.BlockARM64GT, cc)
 27171  			return true
 27172  		}
 27173  		// match: (TBNZ [0] (GreaterThanU cc) yes no)
 27174  		// result: (UGT cc yes no)
 27175  		for b.Controls[0].Op == OpARM64GreaterThanU {
 27176  			v_0 := b.Controls[0]
 27177  			cc := v_0.Args[0]
 27178  			if auxIntToInt64(b.AuxInt) != 0 {
 27179  				break
 27180  			}
 27181  			b.resetWithControl(block.BlockARM64UGT, cc)
 27182  			return true
 27183  		}
 27184  		// match: (TBNZ [0] (GreaterEqual cc) yes no)
 27185  		// result: (GE cc yes no)
 27186  		for b.Controls[0].Op == OpARM64GreaterEqual {
 27187  			v_0 := b.Controls[0]
 27188  			cc := v_0.Args[0]
 27189  			if auxIntToInt64(b.AuxInt) != 0 {
 27190  				break
 27191  			}
 27192  			b.resetWithControl(block.BlockARM64GE, cc)
 27193  			return true
 27194  		}
 27195  		// match: (TBNZ [0] (GreaterEqualU cc) yes no)
 27196  		// result: (UGE cc yes no)
 27197  		for b.Controls[0].Op == OpARM64GreaterEqualU {
 27198  			v_0 := b.Controls[0]
 27199  			cc := v_0.Args[0]
 27200  			if auxIntToInt64(b.AuxInt) != 0 {
 27201  				break
 27202  			}
 27203  			b.resetWithControl(block.BlockARM64UGE, cc)
 27204  			return true
 27205  		}
 27206  		// match: (TBNZ [0] (LessThanF cc) yes no)
 27207  		// result: (FLT cc yes no)
 27208  		for b.Controls[0].Op == OpARM64LessThanF {
 27209  			v_0 := b.Controls[0]
 27210  			cc := v_0.Args[0]
 27211  			if auxIntToInt64(b.AuxInt) != 0 {
 27212  				break
 27213  			}
 27214  			b.resetWithControl(block.BlockARM64FLT, cc)
 27215  			return true
 27216  		}
 27217  		// match: (TBNZ [0] (LessEqualF cc) yes no)
 27218  		// result: (FLE cc yes no)
 27219  		for b.Controls[0].Op == OpARM64LessEqualF {
 27220  			v_0 := b.Controls[0]
 27221  			cc := v_0.Args[0]
 27222  			if auxIntToInt64(b.AuxInt) != 0 {
 27223  				break
 27224  			}
 27225  			b.resetWithControl(block.BlockARM64FLE, cc)
 27226  			return true
 27227  		}
 27228  		// match: (TBNZ [0] (GreaterThanF cc) yes no)
 27229  		// result: (FGT cc yes no)
 27230  		for b.Controls[0].Op == OpARM64GreaterThanF {
 27231  			v_0 := b.Controls[0]
 27232  			cc := v_0.Args[0]
 27233  			if auxIntToInt64(b.AuxInt) != 0 {
 27234  				break
 27235  			}
 27236  			b.resetWithControl(block.BlockARM64FGT, cc)
 27237  			return true
 27238  		}
 27239  		// match: (TBNZ [0] (GreaterEqualF cc) yes no)
 27240  		// result: (FGE cc yes no)
 27241  		for b.Controls[0].Op == OpARM64GreaterEqualF {
 27242  			v_0 := b.Controls[0]
 27243  			cc := v_0.Args[0]
 27244  			if auxIntToInt64(b.AuxInt) != 0 {
 27245  				break
 27246  			}
 27247  			b.resetWithControl(block.BlockARM64FGE, cc)
 27248  			return true
 27249  		}
 27250  		// match: (TBNZ [0] (XORconst [1] x) yes no)
 27251  		// result: (TBZ [0] x yes no)
 27252  		for b.Controls[0].Op == OpARM64XORconst {
 27253  			v_0 := b.Controls[0]
 27254  			if auxIntToInt64(v_0.AuxInt) != 1 {
 27255  				break
 27256  			}
 27257  			x := v_0.Args[0]
 27258  			if auxIntToInt64(b.AuxInt) != 0 {
 27259  				break
 27260  			}
 27261  			b.resetWithControl(block.BlockARM64TBZ, x)
 27262  			b.AuxInt = int64ToAuxInt(0)
 27263  			return true
 27264  		}
 27265  		// match: (TBNZ [t] sv:(SRLconst [s] x) yes no)
 27266  		// cond: t+s < 64 && sv.Uses == 1
 27267  		// result: (TBNZ [t+s] x yes no )
 27268  		for b.Controls[0].Op == OpARM64SRLconst {
 27269  			sv := b.Controls[0]
 27270  			s := auxIntToInt64(sv.AuxInt)
 27271  			x := sv.Args[0]
 27272  			t := auxIntToInt64(b.AuxInt)
 27273  			if !(t+s < 64 && sv.Uses == 1) {
 27274  				break
 27275  			}
 27276  			b.resetWithControl(block.BlockARM64TBNZ, x)
 27277  			b.AuxInt = int64ToAuxInt(t + s)
 27278  			return true
 27279  		}
 27280  		// match: (TBNZ [t] (SRLconst [s] x) yes no)
 27281  		// cond: t+s >= 64
 27282  		// result: (First no yes)
 27283  		for b.Controls[0].Op == OpARM64SRLconst {
 27284  			v_0 := b.Controls[0]
 27285  			s := auxIntToInt64(v_0.AuxInt)
 27286  			t := auxIntToInt64(b.AuxInt)
 27287  			if !(t+s >= 64) {
 27288  				break
 27289  			}
 27290  			b.Reset(block.BlockFirst)
 27291  			b.swapSuccessors()
 27292  			return true
 27293  		}
 27294  		// match: (TBNZ [t] sv:(SLLconst [s] x) yes no)
 27295  		// cond: t-s >= 0 && sv.Uses == 1
 27296  		// result: (TBNZ [t-s] x yes no )
 27297  		for b.Controls[0].Op == OpARM64SLLconst {
 27298  			sv := b.Controls[0]
 27299  			s := auxIntToInt64(sv.AuxInt)
 27300  			x := sv.Args[0]
 27301  			t := auxIntToInt64(b.AuxInt)
 27302  			if !(t-s >= 0 && sv.Uses == 1) {
 27303  				break
 27304  			}
 27305  			b.resetWithControl(block.BlockARM64TBNZ, x)
 27306  			b.AuxInt = int64ToAuxInt(t - s)
 27307  			return true
 27308  		}
 27309  		// match: (TBNZ [t] (SLLconst [s] x) yes no)
 27310  		// cond: t-s < 0
 27311  		// result: (First no yes)
 27312  		for b.Controls[0].Op == OpARM64SLLconst {
 27313  			v_0 := b.Controls[0]
 27314  			s := auxIntToInt64(v_0.AuxInt)
 27315  			t := auxIntToInt64(b.AuxInt)
 27316  			if !(t-s < 0) {
 27317  				break
 27318  			}
 27319  			b.Reset(block.BlockFirst)
 27320  			b.swapSuccessors()
 27321  			return true
 27322  		}
 27323  		// match: (TBNZ [t] rv:(RORconst [r] x) yes no)
 27324  		// cond: rv.Uses == 1
 27325  		// result: (TBNZ [int64(uint64(t+r)%64)] x yes no)
 27326  		for b.Controls[0].Op == OpARM64RORconst {
 27327  			rv := b.Controls[0]
 27328  			r := auxIntToInt64(rv.AuxInt)
 27329  			x := rv.Args[0]
 27330  			t := auxIntToInt64(b.AuxInt)
 27331  			if !(rv.Uses == 1) {
 27332  				break
 27333  			}
 27334  			b.resetWithControl(block.BlockARM64TBNZ, x)
 27335  			b.AuxInt = int64ToAuxInt(int64(uint64(t+r) % 64))
 27336  			return true
 27337  		}
 27338  		// match: (TBNZ [t] sv:(SRAconst [s] x) yes no)
 27339  		// cond: t+s < 64 && sv.Uses == 1
 27340  		// result: (TBNZ [t+s] x yes no)
 27341  		for b.Controls[0].Op == OpARM64SRAconst {
 27342  			sv := b.Controls[0]
 27343  			s := auxIntToInt64(sv.AuxInt)
 27344  			x := sv.Args[0]
 27345  			t := auxIntToInt64(b.AuxInt)
 27346  			if !(t+s < 64 && sv.Uses == 1) {
 27347  				break
 27348  			}
 27349  			b.resetWithControl(block.BlockARM64TBNZ, x)
 27350  			b.AuxInt = int64ToAuxInt(t + s)
 27351  			return true
 27352  		}
 27353  		// match: (TBNZ [t] sv:(SRAconst [s] x) yes no)
 27354  		// cond: t+s >= 64 && sv.Uses == 1
 27355  		// result: (TBNZ [63 ] x yes no)
 27356  		for b.Controls[0].Op == OpARM64SRAconst {
 27357  			sv := b.Controls[0]
 27358  			s := auxIntToInt64(sv.AuxInt)
 27359  			x := sv.Args[0]
 27360  			t := auxIntToInt64(b.AuxInt)
 27361  			if !(t+s >= 64 && sv.Uses == 1) {
 27362  				break
 27363  			}
 27364  			b.resetWithControl(block.BlockARM64TBNZ, x)
 27365  			b.AuxInt = int64ToAuxInt(63)
 27366  			return true
 27367  		}
 27368  	case block.BlockARM64TBZ:
 27369  		// match: (TBZ [0] (XORconst [1] x) yes no)
 27370  		// result: (TBNZ [0] x yes no)
 27371  		for b.Controls[0].Op == OpARM64XORconst {
 27372  			v_0 := b.Controls[0]
 27373  			if auxIntToInt64(v_0.AuxInt) != 1 {
 27374  				break
 27375  			}
 27376  			x := v_0.Args[0]
 27377  			if auxIntToInt64(b.AuxInt) != 0 {
 27378  				break
 27379  			}
 27380  			b.resetWithControl(block.BlockARM64TBNZ, x)
 27381  			b.AuxInt = int64ToAuxInt(0)
 27382  			return true
 27383  		}
 27384  		// match: (TBZ [t] sv:(SRLconst [s] x) yes no)
 27385  		// cond: t+s < 64 && sv.Uses == 1
 27386  		// result: (TBZ [t+s] x yes no )
 27387  		for b.Controls[0].Op == OpARM64SRLconst {
 27388  			sv := b.Controls[0]
 27389  			s := auxIntToInt64(sv.AuxInt)
 27390  			x := sv.Args[0]
 27391  			t := auxIntToInt64(b.AuxInt)
 27392  			if !(t+s < 64 && sv.Uses == 1) {
 27393  				break
 27394  			}
 27395  			b.resetWithControl(block.BlockARM64TBZ, x)
 27396  			b.AuxInt = int64ToAuxInt(t + s)
 27397  			return true
 27398  		}
 27399  		// match: (TBZ [t] (SRLconst [s] x) yes no)
 27400  		// cond: t+s >= 64
 27401  		// result: (First yes no )
 27402  		for b.Controls[0].Op == OpARM64SRLconst {
 27403  			v_0 := b.Controls[0]
 27404  			s := auxIntToInt64(v_0.AuxInt)
 27405  			t := auxIntToInt64(b.AuxInt)
 27406  			if !(t+s >= 64) {
 27407  				break
 27408  			}
 27409  			b.Reset(block.BlockFirst)
 27410  			return true
 27411  		}
 27412  		// match: (TBZ [t] sv:(SLLconst [s] x) yes no)
 27413  		// cond: t-s >= 0 && sv.Uses == 1
 27414  		// result: (TBZ [t-s] x yes no )
 27415  		for b.Controls[0].Op == OpARM64SLLconst {
 27416  			sv := b.Controls[0]
 27417  			s := auxIntToInt64(sv.AuxInt)
 27418  			x := sv.Args[0]
 27419  			t := auxIntToInt64(b.AuxInt)
 27420  			if !(t-s >= 0 && sv.Uses == 1) {
 27421  				break
 27422  			}
 27423  			b.resetWithControl(block.BlockARM64TBZ, x)
 27424  			b.AuxInt = int64ToAuxInt(t - s)
 27425  			return true
 27426  		}
 27427  		// match: (TBZ [t] (SLLconst [s] x) yes no)
 27428  		// cond: t-s < 0
 27429  		// result: (First yes no )
 27430  		for b.Controls[0].Op == OpARM64SLLconst {
 27431  			v_0 := b.Controls[0]
 27432  			s := auxIntToInt64(v_0.AuxInt)
 27433  			t := auxIntToInt64(b.AuxInt)
 27434  			if !(t-s < 0) {
 27435  				break
 27436  			}
 27437  			b.Reset(block.BlockFirst)
 27438  			return true
 27439  		}
 27440  		// match: (TBZ [t] rv:(RORconst [r] x) yes no)
 27441  		// cond: rv.Uses == 1
 27442  		// result: (TBZ [int64(uint64(t+r)%64)] x yes no)
 27443  		for b.Controls[0].Op == OpARM64RORconst {
 27444  			rv := b.Controls[0]
 27445  			r := auxIntToInt64(rv.AuxInt)
 27446  			x := rv.Args[0]
 27447  			t := auxIntToInt64(b.AuxInt)
 27448  			if !(rv.Uses == 1) {
 27449  				break
 27450  			}
 27451  			b.resetWithControl(block.BlockARM64TBZ, x)
 27452  			b.AuxInt = int64ToAuxInt(int64(uint64(t+r) % 64))
 27453  			return true
 27454  		}
 27455  		// match: (TBZ [t] sv:(SRAconst [s] x) yes no)
 27456  		// cond: t+s < 64 && sv.Uses == 1
 27457  		// result: (TBZ [t+s] x yes no)
 27458  		for b.Controls[0].Op == OpARM64SRAconst {
 27459  			sv := b.Controls[0]
 27460  			s := auxIntToInt64(sv.AuxInt)
 27461  			x := sv.Args[0]
 27462  			t := auxIntToInt64(b.AuxInt)
 27463  			if !(t+s < 64 && sv.Uses == 1) {
 27464  				break
 27465  			}
 27466  			b.resetWithControl(block.BlockARM64TBZ, x)
 27467  			b.AuxInt = int64ToAuxInt(t + s)
 27468  			return true
 27469  		}
 27470  		// match: (TBZ [t] sv:(SRAconst [s] x) yes no)
 27471  		// cond: t+s >= 64 && sv.Uses == 1
 27472  		// result: (TBZ [63 ] x yes no)
 27473  		for b.Controls[0].Op == OpARM64SRAconst {
 27474  			sv := b.Controls[0]
 27475  			s := auxIntToInt64(sv.AuxInt)
 27476  			x := sv.Args[0]
 27477  			t := auxIntToInt64(b.AuxInt)
 27478  			if !(t+s >= 64 && sv.Uses == 1) {
 27479  				break
 27480  			}
 27481  			b.resetWithControl(block.BlockARM64TBZ, x)
 27482  			b.AuxInt = int64ToAuxInt(63)
 27483  			return true
 27484  		}
 27485  	case block.BlockARM64UGE:
 27486  		// match: (UGE (CMPWconst [128] x) yes no)
 27487  		// cond: ZeroUpper56Bits(x, 3)
 27488  		// result: (TBNZ [7] x yes no)
 27489  		for b.Controls[0].Op == OpARM64CMPWconst {
 27490  			v_0 := b.Controls[0]
 27491  			if auxIntToInt32(v_0.AuxInt) != 128 {
 27492  				break
 27493  			}
 27494  			x := v_0.Args[0]
 27495  			if !(ZeroUpper56Bits(x, 3)) {
 27496  				break
 27497  			}
 27498  			b.resetWithControl(block.BlockARM64TBNZ, x)
 27499  			b.AuxInt = int64ToAuxInt(7)
 27500  			return true
 27501  		}
 27502  		// match: (UGE (CMPconst [128] x) yes no)
 27503  		// cond: ZeroUpper56Bits(x, 3)
 27504  		// result: (TBNZ [7] x yes no)
 27505  		for b.Controls[0].Op == OpARM64CMPconst {
 27506  			v_0 := b.Controls[0]
 27507  			if auxIntToInt64(v_0.AuxInt) != 128 {
 27508  				break
 27509  			}
 27510  			x := v_0.Args[0]
 27511  			if !(ZeroUpper56Bits(x, 3)) {
 27512  				break
 27513  			}
 27514  			b.resetWithControl(block.BlockARM64TBNZ, x)
 27515  			b.AuxInt = int64ToAuxInt(7)
 27516  			return true
 27517  		}
 27518  		// match: (UGE (FlagConstant [fc]) yes no)
 27519  		// cond: fc.uge()
 27520  		// result: (First yes no)
 27521  		for b.Controls[0].Op == OpARM64FlagConstant {
 27522  			v_0 := b.Controls[0]
 27523  			fc := auxIntToFlagConstant(v_0.AuxInt)
 27524  			if !(fc.uge()) {
 27525  				break
 27526  			}
 27527  			b.Reset(block.BlockFirst)
 27528  			return true
 27529  		}
 27530  		// match: (UGE (FlagConstant [fc]) yes no)
 27531  		// cond: !fc.uge()
 27532  		// result: (First no yes)
 27533  		for b.Controls[0].Op == OpARM64FlagConstant {
 27534  			v_0 := b.Controls[0]
 27535  			fc := auxIntToFlagConstant(v_0.AuxInt)
 27536  			if !(!fc.uge()) {
 27537  				break
 27538  			}
 27539  			b.Reset(block.BlockFirst)
 27540  			b.swapSuccessors()
 27541  			return true
 27542  		}
 27543  		// match: (UGE (InvertFlags cmp) yes no)
 27544  		// result: (ULE cmp yes no)
 27545  		for b.Controls[0].Op == OpARM64InvertFlags {
 27546  			v_0 := b.Controls[0]
 27547  			cmp := v_0.Args[0]
 27548  			b.resetWithControl(block.BlockARM64ULE, cmp)
 27549  			return true
 27550  		}
 27551  	case block.BlockARM64UGT:
 27552  		// match: (UGT (CMPconst [0] x))
 27553  		// result: (NE (CMPconst [0] x))
 27554  		for b.Controls[0].Op == OpARM64CMPconst {
 27555  			v_0 := b.Controls[0]
 27556  			if auxIntToInt64(v_0.AuxInt) != 0 {
 27557  				break
 27558  			}
 27559  			x := v_0.Args[0]
 27560  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPconst, types.TypeFlags)
 27561  			v0.AuxInt = int64ToAuxInt(0)
 27562  			v0.AddArg(x)
 27563  			b.resetWithControl(block.BlockARM64NE, v0)
 27564  			return true
 27565  		}
 27566  		// match: (UGT (CMPWconst [0] x))
 27567  		// result: (NE (CMPWconst [0] x))
 27568  		for b.Controls[0].Op == OpARM64CMPWconst {
 27569  			v_0 := b.Controls[0]
 27570  			if auxIntToInt32(v_0.AuxInt) != 0 {
 27571  				break
 27572  			}
 27573  			x := v_0.Args[0]
 27574  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPWconst, types.TypeFlags)
 27575  			v0.AuxInt = int32ToAuxInt(0)
 27576  			v0.AddArg(x)
 27577  			b.resetWithControl(block.BlockARM64NE, v0)
 27578  			return true
 27579  		}
 27580  		// match: (UGT (FlagConstant [fc]) yes no)
 27581  		// cond: fc.ugt()
 27582  		// result: (First yes no)
 27583  		for b.Controls[0].Op == OpARM64FlagConstant {
 27584  			v_0 := b.Controls[0]
 27585  			fc := auxIntToFlagConstant(v_0.AuxInt)
 27586  			if !(fc.ugt()) {
 27587  				break
 27588  			}
 27589  			b.Reset(block.BlockFirst)
 27590  			return true
 27591  		}
 27592  		// match: (UGT (FlagConstant [fc]) yes no)
 27593  		// cond: !fc.ugt()
 27594  		// result: (First no yes)
 27595  		for b.Controls[0].Op == OpARM64FlagConstant {
 27596  			v_0 := b.Controls[0]
 27597  			fc := auxIntToFlagConstant(v_0.AuxInt)
 27598  			if !(!fc.ugt()) {
 27599  				break
 27600  			}
 27601  			b.Reset(block.BlockFirst)
 27602  			b.swapSuccessors()
 27603  			return true
 27604  		}
 27605  		// match: (UGT (InvertFlags cmp) yes no)
 27606  		// result: (ULT cmp yes no)
 27607  		for b.Controls[0].Op == OpARM64InvertFlags {
 27608  			v_0 := b.Controls[0]
 27609  			cmp := v_0.Args[0]
 27610  			b.resetWithControl(block.BlockARM64ULT, cmp)
 27611  			return true
 27612  		}
 27613  	case block.BlockARM64ULE:
 27614  		// match: (ULE (CMPconst [0] x))
 27615  		// result: (EQ (CMPconst [0] x))
 27616  		for b.Controls[0].Op == OpARM64CMPconst {
 27617  			v_0 := b.Controls[0]
 27618  			if auxIntToInt64(v_0.AuxInt) != 0 {
 27619  				break
 27620  			}
 27621  			x := v_0.Args[0]
 27622  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPconst, types.TypeFlags)
 27623  			v0.AuxInt = int64ToAuxInt(0)
 27624  			v0.AddArg(x)
 27625  			b.resetWithControl(block.BlockARM64EQ, v0)
 27626  			return true
 27627  		}
 27628  		// match: (ULE (CMPWconst [0] x))
 27629  		// result: (EQ (CMPWconst [0] x))
 27630  		for b.Controls[0].Op == OpARM64CMPWconst {
 27631  			v_0 := b.Controls[0]
 27632  			if auxIntToInt32(v_0.AuxInt) != 0 {
 27633  				break
 27634  			}
 27635  			x := v_0.Args[0]
 27636  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPWconst, types.TypeFlags)
 27637  			v0.AuxInt = int32ToAuxInt(0)
 27638  			v0.AddArg(x)
 27639  			b.resetWithControl(block.BlockARM64EQ, v0)
 27640  			return true
 27641  		}
 27642  		// match: (ULE (FlagConstant [fc]) yes no)
 27643  		// cond: fc.ule()
 27644  		// result: (First yes no)
 27645  		for b.Controls[0].Op == OpARM64FlagConstant {
 27646  			v_0 := b.Controls[0]
 27647  			fc := auxIntToFlagConstant(v_0.AuxInt)
 27648  			if !(fc.ule()) {
 27649  				break
 27650  			}
 27651  			b.Reset(block.BlockFirst)
 27652  			return true
 27653  		}
 27654  		// match: (ULE (FlagConstant [fc]) yes no)
 27655  		// cond: !fc.ule()
 27656  		// result: (First no yes)
 27657  		for b.Controls[0].Op == OpARM64FlagConstant {
 27658  			v_0 := b.Controls[0]
 27659  			fc := auxIntToFlagConstant(v_0.AuxInt)
 27660  			if !(!fc.ule()) {
 27661  				break
 27662  			}
 27663  			b.Reset(block.BlockFirst)
 27664  			b.swapSuccessors()
 27665  			return true
 27666  		}
 27667  		// match: (ULE (InvertFlags cmp) yes no)
 27668  		// result: (UGE cmp yes no)
 27669  		for b.Controls[0].Op == OpARM64InvertFlags {
 27670  			v_0 := b.Controls[0]
 27671  			cmp := v_0.Args[0]
 27672  			b.resetWithControl(block.BlockARM64UGE, cmp)
 27673  			return true
 27674  		}
 27675  	case block.BlockARM64ULT:
 27676  		// match: (ULT (CMPWconst [128] x) yes no)
 27677  		// cond: ZeroUpper56Bits(x, 3)
 27678  		// result: (TBZ [7] x yes no)
 27679  		for b.Controls[0].Op == OpARM64CMPWconst {
 27680  			v_0 := b.Controls[0]
 27681  			if auxIntToInt32(v_0.AuxInt) != 128 {
 27682  				break
 27683  			}
 27684  			x := v_0.Args[0]
 27685  			if !(ZeroUpper56Bits(x, 3)) {
 27686  				break
 27687  			}
 27688  			b.resetWithControl(block.BlockARM64TBZ, x)
 27689  			b.AuxInt = int64ToAuxInt(7)
 27690  			return true
 27691  		}
 27692  		// match: (ULT (CMPconst [128] x) yes no)
 27693  		// cond: ZeroUpper56Bits(x, 3)
 27694  		// result: (TBZ [7] x yes no)
 27695  		for b.Controls[0].Op == OpARM64CMPconst {
 27696  			v_0 := b.Controls[0]
 27697  			if auxIntToInt64(v_0.AuxInt) != 128 {
 27698  				break
 27699  			}
 27700  			x := v_0.Args[0]
 27701  			if !(ZeroUpper56Bits(x, 3)) {
 27702  				break
 27703  			}
 27704  			b.resetWithControl(block.BlockARM64TBZ, x)
 27705  			b.AuxInt = int64ToAuxInt(7)
 27706  			return true
 27707  		}
 27708  		// match: (ULT (FlagConstant [fc]) yes no)
 27709  		// cond: fc.ult()
 27710  		// result: (First yes no)
 27711  		for b.Controls[0].Op == OpARM64FlagConstant {
 27712  			v_0 := b.Controls[0]
 27713  			fc := auxIntToFlagConstant(v_0.AuxInt)
 27714  			if !(fc.ult()) {
 27715  				break
 27716  			}
 27717  			b.Reset(block.BlockFirst)
 27718  			return true
 27719  		}
 27720  		// match: (ULT (FlagConstant [fc]) yes no)
 27721  		// cond: !fc.ult()
 27722  		// result: (First no yes)
 27723  		for b.Controls[0].Op == OpARM64FlagConstant {
 27724  			v_0 := b.Controls[0]
 27725  			fc := auxIntToFlagConstant(v_0.AuxInt)
 27726  			if !(!fc.ult()) {
 27727  				break
 27728  			}
 27729  			b.Reset(block.BlockFirst)
 27730  			b.swapSuccessors()
 27731  			return true
 27732  		}
 27733  		// match: (ULT (InvertFlags cmp) yes no)
 27734  		// result: (UGT cmp yes no)
 27735  		for b.Controls[0].Op == OpARM64InvertFlags {
 27736  			v_0 := b.Controls[0]
 27737  			cmp := v_0.Args[0]
 27738  			b.resetWithControl(block.BlockARM64UGT, cmp)
 27739  			return true
 27740  		}
 27741  	case block.BlockARM64Z:
 27742  		// match: (Z sub:(SUB x y))
 27743  		// cond: sub.Uses == 1
 27744  		// result: (EQ (CMP x y))
 27745  		for b.Controls[0].Op == OpARM64SUB {
 27746  			sub := b.Controls[0]
 27747  			y := sub.Args[1]
 27748  			x := sub.Args[0]
 27749  			if !(sub.Uses == 1) {
 27750  				break
 27751  			}
 27752  			v0 := b.NewValue0(sub.Pos, OpARM64CMP, types.TypeFlags)
 27753  			v0.AddArg2(x, y)
 27754  			b.resetWithControl(block.BlockARM64EQ, v0)
 27755  			return true
 27756  		}
 27757  		// match: (Z sub:(SUBconst [c] y))
 27758  		// cond: sub.Uses == 1
 27759  		// result: (EQ (CMPconst [c] y))
 27760  		for b.Controls[0].Op == OpARM64SUBconst {
 27761  			sub := b.Controls[0]
 27762  			c := auxIntToInt64(sub.AuxInt)
 27763  			y := sub.Args[0]
 27764  			if !(sub.Uses == 1) {
 27765  				break
 27766  			}
 27767  			v0 := b.NewValue0(sub.Pos, OpARM64CMPconst, types.TypeFlags)
 27768  			v0.AuxInt = int64ToAuxInt(c)
 27769  			v0.AddArg(y)
 27770  			b.resetWithControl(block.BlockARM64EQ, v0)
 27771  			return true
 27772  		}
 27773  		// match: (Z (ANDconst [c] x) yes no)
 27774  		// cond: oneBit(c)
 27775  		// result: (TBZ [int64(ntz64(c))] x yes no)
 27776  		for b.Controls[0].Op == OpARM64ANDconst {
 27777  			v_0 := b.Controls[0]
 27778  			c := auxIntToInt64(v_0.AuxInt)
 27779  			x := v_0.Args[0]
 27780  			if !(oneBit(c)) {
 27781  				break
 27782  			}
 27783  			b.resetWithControl(block.BlockARM64TBZ, x)
 27784  			b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
 27785  			return true
 27786  		}
 27787  		// match: (Z s:(SRLconst [63] x) yes no)
 27788  		// cond: s.Uses == 1
 27789  		// result: (TBZ [63] x yes no)
 27790  		for b.Controls[0].Op == OpARM64SRLconst {
 27791  			s := b.Controls[0]
 27792  			if auxIntToInt64(s.AuxInt) != 63 {
 27793  				break
 27794  			}
 27795  			x := s.Args[0]
 27796  			if !(s.Uses == 1) {
 27797  				break
 27798  			}
 27799  			b.resetWithControl(block.BlockARM64TBZ, x)
 27800  			b.AuxInt = int64ToAuxInt(63)
 27801  			return true
 27802  		}
 27803  		// match: (Z s:(SRAconst [63] x) yes no)
 27804  		// cond: s.Uses == 1
 27805  		// result: (TBZ [63] x yes no)
 27806  		for b.Controls[0].Op == OpARM64SRAconst {
 27807  			s := b.Controls[0]
 27808  			if auxIntToInt64(s.AuxInt) != 63 {
 27809  				break
 27810  			}
 27811  			x := s.Args[0]
 27812  			if !(s.Uses == 1) {
 27813  				break
 27814  			}
 27815  			b.resetWithControl(block.BlockARM64TBZ, x)
 27816  			b.AuxInt = int64ToAuxInt(63)
 27817  			return true
 27818  		}
 27819  		// match: (Z (MOVDconst [0]) yes no)
 27820  		// result: (First yes no)
 27821  		for b.Controls[0].Op == OpARM64MOVDconst {
 27822  			v_0 := b.Controls[0]
 27823  			if auxIntToInt64(v_0.AuxInt) != 0 {
 27824  				break
 27825  			}
 27826  			b.Reset(block.BlockFirst)
 27827  			return true
 27828  		}
 27829  		// match: (Z (MOVDconst [c]) yes no)
 27830  		// cond: c != 0
 27831  		// result: (First no yes)
 27832  		for b.Controls[0].Op == OpARM64MOVDconst {
 27833  			v_0 := b.Controls[0]
 27834  			c := auxIntToInt64(v_0.AuxInt)
 27835  			if !(c != 0) {
 27836  				break
 27837  			}
 27838  			b.Reset(block.BlockFirst)
 27839  			b.swapSuccessors()
 27840  			return true
 27841  		}
 27842  	case block.BlockARM64ZW:
 27843  		// match: (ZW sub:(SUB x y))
 27844  		// cond: sub.Uses == 1
 27845  		// result: (EQ (CMPW x y))
 27846  		for b.Controls[0].Op == OpARM64SUB {
 27847  			sub := b.Controls[0]
 27848  			y := sub.Args[1]
 27849  			x := sub.Args[0]
 27850  			if !(sub.Uses == 1) {
 27851  				break
 27852  			}
 27853  			v0 := b.NewValue0(sub.Pos, OpARM64CMPW, types.TypeFlags)
 27854  			v0.AddArg2(x, y)
 27855  			b.resetWithControl(block.BlockARM64EQ, v0)
 27856  			return true
 27857  		}
 27858  		// match: (ZW sub:(SUBconst [c] y))
 27859  		// cond: sub.Uses == 1
 27860  		// result: (EQ (CMPWconst [int32(c)] y))
 27861  		for b.Controls[0].Op == OpARM64SUBconst {
 27862  			sub := b.Controls[0]
 27863  			c := auxIntToInt64(sub.AuxInt)
 27864  			y := sub.Args[0]
 27865  			if !(sub.Uses == 1) {
 27866  				break
 27867  			}
 27868  			v0 := b.NewValue0(sub.Pos, OpARM64CMPWconst, types.TypeFlags)
 27869  			v0.AuxInt = int32ToAuxInt(int32(c))
 27870  			v0.AddArg(y)
 27871  			b.resetWithControl(block.BlockARM64EQ, v0)
 27872  			return true
 27873  		}
 27874  		// match: (ZW (ANDconst [c] x) yes no)
 27875  		// cond: oneBit(int64(uint32(c)))
 27876  		// result: (TBZ [int64(ntz64(int64(uint32(c))))] x yes no)
 27877  		for b.Controls[0].Op == OpARM64ANDconst {
 27878  			v_0 := b.Controls[0]
 27879  			c := auxIntToInt64(v_0.AuxInt)
 27880  			x := v_0.Args[0]
 27881  			if !(oneBit(int64(uint32(c)))) {
 27882  				break
 27883  			}
 27884  			b.resetWithControl(block.BlockARM64TBZ, x)
 27885  			b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
 27886  			return true
 27887  		}
 27888  		// match: (ZW (MOVDconst [c]) yes no)
 27889  		// cond: int32(c) == 0
 27890  		// result: (First yes no)
 27891  		for b.Controls[0].Op == OpARM64MOVDconst {
 27892  			v_0 := b.Controls[0]
 27893  			c := auxIntToInt64(v_0.AuxInt)
 27894  			if !(int32(c) == 0) {
 27895  				break
 27896  			}
 27897  			b.Reset(block.BlockFirst)
 27898  			return true
 27899  		}
 27900  		// match: (ZW (MOVDconst [c]) yes no)
 27901  		// cond: int32(c) != 0
 27902  		// result: (First no yes)
 27903  		for b.Controls[0].Op == OpARM64MOVDconst {
 27904  			v_0 := b.Controls[0]
 27905  			c := auxIntToInt64(v_0.AuxInt)
 27906  			if !(int32(c) != 0) {
 27907  				break
 27908  			}
 27909  			b.Reset(block.BlockFirst)
 27910  			b.swapSuccessors()
 27911  			return true
 27912  		}
 27913  	}
 27914  	return false
 27915  }
 27916  

View as plain text